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,208,865 | 6,208,885 | django/innodb -- problem with old sessions and transactions | We just switched our MySQL database from MyIsam to Innodb, and we are seeing an odd issue arise in Django. Whenever we make a database transaction, the existing sessions do not pick it up...ever. We can see the new record in the database from a mysql terminal, but the existing django sessions (ie a shell that was alrea... | Your create() command commits the transaction for the current shell, but doesn't do anything to the transaction in the second shell. https://docs.djangoproject.com/en/dev/topics/db/transactions/ Your second thread that can't see what's done in the first because it is in a transaction of its own. Transactions isolate th... | django/innodb -- problem with old sessions and transactions We just switched our MySQL database from MyIsam to Innodb, and we are seeing an odd issue arise in Django. Whenever we make a database transaction, the existing sessions do not pick it up...ever. We can see the new record in the database from a mysql terminal,... | TITLE:
django/innodb -- problem with old sessions and transactions
QUESTION:
We just switched our MySQL database from MyIsam to Innodb, and we are seeing an odd issue arise in Django. Whenever we make a database transaction, the existing sessions do not pick it up...ever. We can see the new record in the database from... | [
"mysql",
"django",
"innodb",
"celery"
] | 4 | 7 | 1,049 | 1 | 0 | 2011-06-01T23:25:10.587000 | 2011-06-01T23:27:40.247000 |
6,208,874 | 6,208,969 | Is there a way to sort gmail using a bookmarklet? | I was looking for a simple solution to sorting my Gmail by Sender, so that I can select all mail from a specific sender and archiving them, but I cannot find a working bookmarklet. I have searched a few places and found the following bookmarklets: javascript:function toArray (c) {var a, k;a = new Array;for (k=0; k < c.... | Would a GMail filter work for this? Next to the "Search the Web" button at the top of the GMail page is "Create a filter". | Is there a way to sort gmail using a bookmarklet? I was looking for a simple solution to sorting my Gmail by Sender, so that I can select all mail from a specific sender and archiving them, but I cannot find a working bookmarklet. I have searched a few places and found the following bookmarklets: javascript:function to... | TITLE:
Is there a way to sort gmail using a bookmarklet?
QUESTION:
I was looking for a simple solution to sorting my Gmail by Sender, so that I can select all mail from a specific sender and archiving them, but I cannot find a working bookmarklet. I have searched a few places and found the following bookmarklets: java... | [
"javascript",
"sorting",
"gmail",
"bookmarklet"
] | 1 | 1 | 458 | 1 | 0 | 2011-06-01T23:25:58.833000 | 2011-06-01T23:41:25.890000 |
6,208,877 | 6,208,902 | Assigning callbacks for a $.post call in jQuery | I have this script that works pretty well, but it keeps triggering the "error" callback, even though there is no error: $(".comment-form").submit(function(e) { e.preventDefault();
var $form = $(this), text = $form.find('textarea').val(); url = $form.attr('action');
$.post(url, { comment: text, beforeSend: function() ... | You're passing the callbacks as part of the data to be posted, so they're getting evaluated as part of the post call. Try this: $.post(url, { comment: text }, function(data) { alert(data); }); or $.ajax(url, { data: { comment: text }, type: "POST", beforeSend: function() { alert("before send"); }, error: function() { a... | Assigning callbacks for a $.post call in jQuery I have this script that works pretty well, but it keeps triggering the "error" callback, even though there is no error: $(".comment-form").submit(function(e) { e.preventDefault();
var $form = $(this), text = $form.find('textarea').val(); url = $form.attr('action');
$.po... | TITLE:
Assigning callbacks for a $.post call in jQuery
QUESTION:
I have this script that works pretty well, but it keeps triggering the "error" callback, even though there is no error: $(".comment-form").submit(function(e) { e.preventDefault();
var $form = $(this), text = $form.find('textarea').val(); url = $form.att... | [
"jquery"
] | 4 | 11 | 18,191 | 4 | 0 | 2011-06-01T23:26:52.110000 | 2011-06-01T23:32:01.430000 |
6,208,878 | 6,209,025 | Java version of matlab's linspace | Is there a java version of matlab's colon operator or linspace? For instance, I'd like to make a for loop for evenly spaced numbers, but I don't want to bother with creating an array of those numbers manually. For example to get all integers from 1 to 30, in matlab I would type: 1:30 or linspace(1,30) | For the two variable call, @x4u is correct. The three variable call will be quite a bit harder to emulate. For instance, i think that linspace(1,30,60) should produce values 1, 1.5, 2, 2.5, 3, 3.5..., or maybe that's the values for linspace(1,30,59)--either way, same problem. With this format you'll have to do the calc... | Java version of matlab's linspace Is there a java version of matlab's colon operator or linspace? For instance, I'd like to make a for loop for evenly spaced numbers, but I don't want to bother with creating an array of those numbers manually. For example to get all integers from 1 to 30, in matlab I would type: 1:30 o... | TITLE:
Java version of matlab's linspace
QUESTION:
Is there a java version of matlab's colon operator or linspace? For instance, I'd like to make a for loop for evenly spaced numbers, but I don't want to bother with creating an array of those numbers manually. For example to get all integers from 1 to 30, in matlab I ... | [
"java",
"matlab"
] | 7 | 7 | 12,532 | 7 | 0 | 2011-06-01T23:26:57.910000 | 2011-06-01T23:53:17.370000 |
6,208,881 | 6,208,948 | how to open new view on touch even for uitextfield | I am just woundering if it is possible and if so how I could go about loading a new view when the user touches a uitextfield? What I am trying to do is load a new view where the user will use a picker to populate the UItextField instead of typing the word. any help would be greatly appreciated | What you need here is the inputView property of UITextField. If you set this for a text field, then instead of the usual keyboard, the inputView object will pop up. I had created this example for a related problem which uses a UIPickerView as an inputView to a UITextField object. You can check it to see if it helps. | how to open new view on touch even for uitextfield I am just woundering if it is possible and if so how I could go about loading a new view when the user touches a uitextfield? What I am trying to do is load a new view where the user will use a picker to populate the UItextField instead of typing the word. any help wou... | TITLE:
how to open new view on touch even for uitextfield
QUESTION:
I am just woundering if it is possible and if so how I could go about loading a new view when the user touches a uitextfield? What I am trying to do is load a new view where the user will use a picker to populate the UItextField instead of typing the ... | [
"iphone",
"uitextfield",
"picker"
] | 1 | 1 | 355 | 1 | 0 | 2011-06-01T23:27:16.750000 | 2011-06-01T23:38:13.473000 |
6,208,884 | 6,208,972 | How To Reload Table? | I have 2 views we are dealing with. Main View, and Sub View. Main View's tablecell's string shows the count of the number of objects in that cell's subView. When I delete a cell from the subview, and go back to the mainView, the string that shows the count should go down by 1. Right now this string is not changing unti... | If your data is in fact being updated correctly on the model side of things, you should be able to call [tableView reloadData]; and everything will update correctly. You can probably put this in viewWillAppear. Hope this helps. | How To Reload Table? I have 2 views we are dealing with. Main View, and Sub View. Main View's tablecell's string shows the count of the number of objects in that cell's subView. When I delete a cell from the subview, and go back to the mainView, the string that shows the count should go down by 1. Right now this string... | TITLE:
How To Reload Table?
QUESTION:
I have 2 views we are dealing with. Main View, and Sub View. Main View's tablecell's string shows the count of the number of objects in that cell's subView. When I delete a cell from the subview, and go back to the mainView, the string that shows the count should go down by 1. Rig... | [
"iphone",
"objective-c",
"uitableview"
] | 0 | 2 | 177 | 2 | 0 | 2011-06-01T23:27:29.777000 | 2011-06-01T23:41:50.107000 |
6,208,886 | 6,215,612 | Proper structure of AJAX handler | My.NET project handles AJAX requests. There are no UI controls at all, it simply responds with text to every AJAX post. This is my current structure: <% SynchLock DBNull.Value Main End SynchLock %> This works but I think it can be improved; I'm not sure how to proceed. Some of the activities call subfunctions and I'm l... | You shouldn't use ASPX pages for AJAX requests. Just use an HTTPHandler. http://msdn.microsoft.com/en-us/library/system.web.ihttphandler(v=VS.90).aspx | Proper structure of AJAX handler My.NET project handles AJAX requests. There are no UI controls at all, it simply responds with text to every AJAX post. This is my current structure: <% SynchLock DBNull.Value Main End SynchLock %> This works but I think it can be improved; I'm not sure how to proceed. Some of the activ... | TITLE:
Proper structure of AJAX handler
QUESTION:
My.NET project handles AJAX requests. There are no UI controls at all, it simply responds with text to every AJAX post. This is my current structure: <% SynchLock DBNull.Value Main End SynchLock %> This works but I think it can be improved; I'm not sure how to proceed.... | [
".net",
"asp.net",
"vb.net"
] | 0 | 1 | 143 | 2 | 0 | 2011-06-01T23:27:41.743000 | 2011-06-02T14:02:59.450000 |
6,208,895 | 6,209,219 | How to implement the Sensor Manager on a ViewSonic Tablet? | I have recently acquired a ViewSonic G Tablet running Android 2.2 for the development of applications. I have a few applications that use the Sensor Manager to read the orientation values of the phone. I have tested these applications on a few different android phones and they work fine (the sensors are found and the v... | Orientation requires both accelerometer and magnetometer combines both sensors to give an up/down and lateral orientation. Perhaps your tablet only has an accelerometer. This should be sufficient for determining which way is up/down, you should access the accelerometer directly. | How to implement the Sensor Manager on a ViewSonic Tablet? I have recently acquired a ViewSonic G Tablet running Android 2.2 for the development of applications. I have a few applications that use the Sensor Manager to read the orientation values of the phone. I have tested these applications on a few different android... | TITLE:
How to implement the Sensor Manager on a ViewSonic Tablet?
QUESTION:
I have recently acquired a ViewSonic G Tablet running Android 2.2 for the development of applications. I have a few applications that use the Sensor Manager to read the orientation values of the phone. I have tested these applications on a few... | [
"android",
"tablet",
"android-sensors"
] | 0 | 1 | 257 | 1 | 0 | 2011-06-01T23:29:56.100000 | 2011-06-02T00:29:29.410000 |
6,208,901 | 6,234,540 | Android, Multiple Views on screen but only one will respond to touch | I have a main FrameLayout and a collection of balls 5 by 7 (each a View) under it. I added onTouchEvent() to switch colors. But regardless which ball I click, only the bottom right ball responds to my touch event (it was the last one to be drawn). Is there a way to get each ball recognize its own touch event? A thought... | solved with 2 LinearLayout(s). see here for a good answer. I tried both answers one using LinearLayout(s) and the other, TableLayout. The one using LinearLayout(s) will keep the cells the same size regardless of the text length | Android, Multiple Views on screen but only one will respond to touch I have a main FrameLayout and a collection of balls 5 by 7 (each a View) under it. I added onTouchEvent() to switch colors. But regardless which ball I click, only the bottom right ball responds to my touch event (it was the last one to be drawn). Is ... | TITLE:
Android, Multiple Views on screen but only one will respond to touch
QUESTION:
I have a main FrameLayout and a collection of balls 5 by 7 (each a View) under it. I added onTouchEvent() to switch colors. But regardless which ball I click, only the bottom right ball responds to my touch event (it was the last one... | [
"android",
"android-layout"
] | 0 | 0 | 1,297 | 2 | 0 | 2011-06-01T23:31:25.673000 | 2011-06-04T03:40:46.947000 |
6,208,910 | 6,208,936 | What is up with jQuery Nivo Slider on my site? | I have installed the Nivo Slider (http://nivo.dev7studios.com/) that uses jQuery on my site which is a Magento ecommerce site. My site is http://bikeshop.gostorego.com/ Any ideas why on the homepage you can see where the slider goes, but the loading icon is only present not showing the slides? Thanks | jQuery isn't being loaded on the page. This is how you're attempting to load it: Firebug shows that this URL is what's actually being requested: http://bikeshop.gostorego.com/%E2%80%99https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js%E2%80%99 So, those unusual quotes are the problem; you need normal sing... | What is up with jQuery Nivo Slider on my site? I have installed the Nivo Slider (http://nivo.dev7studios.com/) that uses jQuery on my site which is a Magento ecommerce site. My site is http://bikeshop.gostorego.com/ Any ideas why on the homepage you can see where the slider goes, but the loading icon is only present no... | TITLE:
What is up with jQuery Nivo Slider on my site?
QUESTION:
I have installed the Nivo Slider (http://nivo.dev7studios.com/) that uses jQuery on my site which is a Magento ecommerce site. My site is http://bikeshop.gostorego.com/ Any ideas why on the homepage you can see where the slider goes, but the loading icon ... | [
"jquery",
"magento",
"slider"
] | 0 | 1 | 1,883 | 2 | 0 | 2011-06-01T23:33:10.150000 | 2011-06-01T23:36:45.890000 |
6,208,911 | 6,208,939 | How does foursquare determine the timezone of a checkin? | Looking at their checkin api when you add a checkin it does not require passing in any datetime or timezone information, but when you query a users checkin history it returns a timezone field indicating the timezone of where the checkin took place. I imagine somehow they're looking it up by lat/lng or something. Does a... | It's most certainly a location-based look up against the check-in location. My guess is that they compute and cache the timezone for a venue when it is created. I'd store this information as a map of tuples to strings keyed on data like city,[state],country in a distributed hash table database like memcached. I'd keep ... | How does foursquare determine the timezone of a checkin? Looking at their checkin api when you add a checkin it does not require passing in any datetime or timezone information, but when you query a users checkin history it returns a timezone field indicating the timezone of where the checkin took place. I imagine some... | TITLE:
How does foursquare determine the timezone of a checkin?
QUESTION:
Looking at their checkin api when you add a checkin it does not require passing in any datetime or timezone information, but when you query a users checkin history it returns a timezone field indicating the timezone of where the checkin took pla... | [
"api",
"geolocation",
"timezone",
"foursquare"
] | 1 | 1 | 829 | 1 | 0 | 2011-06-01T23:33:18.900000 | 2011-06-01T23:36:51.450000 |
6,208,915 | 6,216,885 | Collection add event fires on two independent Collections | Trying to understand the insides of backbone.js (Todos App) framework by adding some extra functionalities, my Todos App triggers an collection.add event on both collections, the original TodoList and my own UnsavedList This is what I did: Adding an 'Mark All Done' button to document trough _.template that checks all u... | Even though I could have lived with an { silent: true } option, I was too curious about this behavior and figured out myself looking in the source code: Every time a model is added to an collection, the model itself triggers the add-event. And in my case both, the TodoList as well as UnsavedList are listening to 'add' ... | Collection add event fires on two independent Collections Trying to understand the insides of backbone.js (Todos App) framework by adding some extra functionalities, my Todos App triggers an collection.add event on both collections, the original TodoList and my own UnsavedList This is what I did: Adding an 'Mark All Do... | TITLE:
Collection add event fires on two independent Collections
QUESTION:
Trying to understand the insides of backbone.js (Todos App) framework by adding some extra functionalities, my Todos App triggers an collection.add event on both collections, the original TodoList and my own UnsavedList This is what I did: Addi... | [
"javascript",
"backbone.js"
] | 0 | 0 | 319 | 1 | 0 | 2011-06-01T23:33:45.677000 | 2011-06-02T15:47:20.863000 |
6,208,917 | 6,241,348 | Zend: Action Helper Pre-Dispatch Conditional on Route | I have two Action Helpers, one for Auth, and one for ACL. For my default route, I am using the helpers' pre-dispatch hooks to fire them on every request (Auth first, then ACL). I have a second route however, and for this route I only want Auth to fire. (ACL is a non-issue for the second route). What's the easiest way t... | OK. I had wondered if there was a way to configure the Action Helper on a per-route basis, but I'm happy with the consensus in the comments above. I'll put an if-then in the ACL Action Heper. Thanks! | Zend: Action Helper Pre-Dispatch Conditional on Route I have two Action Helpers, one for Auth, and one for ACL. For my default route, I am using the helpers' pre-dispatch hooks to fire them on every request (Auth first, then ACL). I have a second route however, and for this route I only want Auth to fire. (ACL is a non... | TITLE:
Zend: Action Helper Pre-Dispatch Conditional on Route
QUESTION:
I have two Action Helpers, one for Auth, and one for ACL. For my default route, I am using the helpers' pre-dispatch hooks to fire them on every request (Auth first, then ACL). I have a second route however, and for this route I only want Auth to f... | [
"zend-framework"
] | 2 | 0 | 504 | 1 | 0 | 2011-06-01T23:33:50.370000 | 2011-06-05T06:21:45.407000 |
6,208,919 | 6,208,982 | Null checks on extension methods that do not need an instance? | I recently asked this question on the subject, which was closed as a duplicate of this one - as was this one before mine. However, I want to ask a more specific question on a corner case that I feel none of the above questions, or their answers, really covers: How should an extension method that doesn't really need an ... | Personally, I have an issue with extension methods that do not throw on a null instance. I understand that extension methods are syntactic sugar for static methods. However, their use is like that of an instance method. Hence, I believe they should behave as if they were an instance method and throw when the "this" ins... | Null checks on extension methods that do not need an instance? I recently asked this question on the subject, which was closed as a duplicate of this one - as was this one before mine. However, I want to ask a more specific question on a corner case that I feel none of the above questions, or their answers, really cove... | TITLE:
Null checks on extension methods that do not need an instance?
QUESTION:
I recently asked this question on the subject, which was closed as a duplicate of this one - as was this one before mine. However, I want to ask a more specific question on a corner case that I feel none of the above questions, or their an... | [
"c#",
"null",
"extension-methods"
] | 1 | 7 | 1,011 | 3 | 0 | 2011-06-01T23:34:02.163000 | 2011-06-01T23:44:18.653000 |
6,208,920 | 6,209,135 | Why can't Bundler locate this gem? | Why can't bundler locate the Mechanize gem? The following is in my Rails project's Gemfile: gem 'mechanize',:git => 'git://github.com/tenderlove/mechanize.git' Running bundle install throws the following error: Updating git://github.com/tenderlove/mechanize.git Fetching source index for http://rubygems.org/ Could not f... | It looks as though the project is missing a gemspec and one won't be getting added. You should be able to clone the project into your vendor/gems directory. You will need to create a mechanize.gemspec file, too. You would then require it in your Gemfile using something like. gem 'mechanize',:path => 'vendor/gems/mechan... | Why can't Bundler locate this gem? Why can't bundler locate the Mechanize gem? The following is in my Rails project's Gemfile: gem 'mechanize',:git => 'git://github.com/tenderlove/mechanize.git' Running bundle install throws the following error: Updating git://github.com/tenderlove/mechanize.git Fetching source index f... | TITLE:
Why can't Bundler locate this gem?
QUESTION:
Why can't bundler locate the Mechanize gem? The following is in my Rails project's Gemfile: gem 'mechanize',:git => 'git://github.com/tenderlove/mechanize.git' Running bundle install throws the following error: Updating git://github.com/tenderlove/mechanize.git Fetch... | [
"ruby-on-rails",
"git",
"github",
"mechanize",
"bundler"
] | 3 | 6 | 3,114 | 5 | 0 | 2011-06-01T23:34:16.017000 | 2011-06-02T00:11:07.423000 |
6,208,924 | 6,214,884 | Yesod fails to install (namely the text package) | I'm trying to install Yesod via cabal, but it keeps failing on installing Data.Text. I tried installing text separately with cabal install text, resulting in an error message: Resolving dependencies... Configuring text-0.11.1.0... Preprocessing library text-0.11.1.0... Building text-0.11.1.0...
Data/Text/Lazy/Builder/... | This is a ghc7.0 related issue (and listed at hackage under "Build failure"). Try to install text-0.11.0.8 that should work for yesod. | Yesod fails to install (namely the text package) I'm trying to install Yesod via cabal, but it keeps failing on installing Data.Text. I tried installing text separately with cabal install text, resulting in an error message: Resolving dependencies... Configuring text-0.11.1.0... Preprocessing library text-0.11.1.0... B... | TITLE:
Yesod fails to install (namely the text package)
QUESTION:
I'm trying to install Yesod via cabal, but it keeps failing on installing Data.Text. I tried installing text separately with cabal install text, resulting in an error message: Resolving dependencies... Configuring text-0.11.1.0... Preprocessing library ... | [
"haskell",
"cabal",
"yesod"
] | 2 | 2 | 579 | 1 | 0 | 2011-06-01T23:35:09.497000 | 2011-06-02T13:05:10.963000 |
6,208,928 | 6,209,019 | Find all integers that multiplied gives X? | If I have a number, let's say 12, how can I calculate all integers that multiplied will give 12? Example: If 12, then the solution would be 1x12, 2x6, 3x4. How would that be done? | Christian's Works for a brute force method, to be more elegant try to implement some integer factorization algorithm. EDIT: After digging though CPAN (you always should) I found Math::Factor::XS, here is an example (also I mocked up a pure Perl example using grep/map): #!/usr/bin/perl use strict; use warnings; use 5.10... | Find all integers that multiplied gives X? If I have a number, let's say 12, how can I calculate all integers that multiplied will give 12? Example: If 12, then the solution would be 1x12, 2x6, 3x4. How would that be done? | TITLE:
Find all integers that multiplied gives X?
QUESTION:
If I have a number, let's say 12, how can I calculate all integers that multiplied will give 12? Example: If 12, then the solution would be 1x12, 2x6, 3x4. How would that be done?
ANSWER:
Christian's Works for a brute force method, to be more elegant try to ... | [
"perl"
] | 3 | 7 | 159 | 2 | 0 | 2011-06-01T23:35:32.990000 | 2011-06-01T23:52:09.513000 |
6,208,929 | 6,209,102 | How Can I Modify/"Spoof" Standard Browser JS DOM Objects (Window.location) at Runtime? | I'd like to dynamically change some of the standard JS DOM objects from within a web browser. For instance, when I execute: var site = location; I want to specify a new value for my browser's "window.location" object other than the "correct" one (the URL used to access the requested page) at run time, either through a ... | Not sure if I understand you correctly, but if you want to change the loaded URL you can do that by setting window.location.href. If your intent is to replace DOM buildins then you will be sad to hear, that most build-in objects (host objects) aren't regular JavaScript objects and their behaviour is not clearly defined... | How Can I Modify/"Spoof" Standard Browser JS DOM Objects (Window.location) at Runtime? I'd like to dynamically change some of the standard JS DOM objects from within a web browser. For instance, when I execute: var site = location; I want to specify a new value for my browser's "window.location" object other than the "... | TITLE:
How Can I Modify/"Spoof" Standard Browser JS DOM Objects (Window.location) at Runtime?
QUESTION:
I'd like to dynamically change some of the standard JS DOM objects from within a web browser. For instance, when I execute: var site = location; I want to specify a new value for my browser's "window.location" objec... | [
"javascript",
"dom",
"firebug",
"spoofing"
] | 1 | 0 | 1,359 | 1 | 0 | 2011-06-01T23:35:43.207000 | 2011-06-02T00:05:51.130000 |
6,208,930 | 6,208,995 | TFS branching, what are the advantages | I am pretty new to TFS and source control. I unable to understand the advantage of branching. Since i can do the same stuff by creating 2 folder main and development, when I am done with development.I can merge the code using any diff tool with the main branch. Then whats the point of having branches? I know there must... | (UPDATE: TFS now supports git for version control so the rest of this answer no longer applies) I would google branch-per-feature. The main advantage of branching is that you can work on a feature and not be interrupted by anyone else's work. When you are ready, you can merge and see if many features work well together... | TFS branching, what are the advantages I am pretty new to TFS and source control. I unable to understand the advantage of branching. Since i can do the same stuff by creating 2 folder main and development, when I am done with development.I can merge the code using any diff tool with the main branch. Then whats the poin... | TITLE:
TFS branching, what are the advantages
QUESTION:
I am pretty new to TFS and source control. I unable to understand the advantage of branching. Since i can do the same stuff by creating 2 folder main and development, when I am done with development.I can merge the code using any diff tool with the main branch. T... | [
"tfs",
"version-control",
"branching-and-merging"
] | 7 | 32 | 4,212 | 2 | 0 | 2011-06-01T23:35:58.220000 | 2011-06-01T23:47:06.170000 |
6,208,932 | 6,208,968 | putting linq to objects query result into a typed dictionary | Still kinda new to LINQ. Seems like there should be a more elegant way to do this using ToDictionary, but can't figure it out. Here's my code I want to clean up: var EventOccurrencesMappedToPatientMeds = from pm in allPtMeds from e in thisUsersEventOccurrencesPlusEventData where e.EventContainer.Event.PatientMedId == p... | You can use the overloaded Enumerable.Select method to include the index, then use ToDictionary: var dict = EventOccurrencesMappedToPatientMeds.Select((e, i) => new { Event = e, Index = i + 1 }).ToDictionary(o => o.Index, o => (ScheduleEventOccurrenceMedPair)o.Event); | putting linq to objects query result into a typed dictionary Still kinda new to LINQ. Seems like there should be a more elegant way to do this using ToDictionary, but can't figure it out. Here's my code I want to clean up: var EventOccurrencesMappedToPatientMeds = from pm in allPtMeds from e in thisUsersEventOccurrence... | TITLE:
putting linq to objects query result into a typed dictionary
QUESTION:
Still kinda new to LINQ. Seems like there should be a more elegant way to do this using ToDictionary, but can't figure it out. Here's my code I want to clean up: var EventOccurrencesMappedToPatientMeds = from pm in allPtMeds from e in thisUs... | [
"c#",
"linq"
] | 2 | 2 | 238 | 2 | 0 | 2011-06-01T23:36:25.043000 | 2011-06-01T23:41:20.963000 |
6,208,937 | 6,208,966 | Securing PHP MySQL code | I have a PHP search suggestion script which uses MySQL as its back-end. I am aware there are many vunerabilities in my code, I was just wondering what I can do to make it more secure. Here is my code: real_escape_string($_POST['query']); if(strlen($query)>0){ $suggestions=$database->query( "SELECT * FROM search WHERE n... | Actually there aren't, considering you are escaping the only external value in the SQL Anyway I suggest you to use PDO::prepare for queries. Go here for further infos http://it.php.net/manual/en/pdo.prepare.php Example: $sth = $dbh->prepare('SELECT * FROM article WHERE id =?'); $sth->execute(array(1)); $red = $sth->fet... | Securing PHP MySQL code I have a PHP search suggestion script which uses MySQL as its back-end. I am aware there are many vunerabilities in my code, I was just wondering what I can do to make it more secure. Here is my code: real_escape_string($_POST['query']); if(strlen($query)>0){ $suggestions=$database->query( "SELE... | TITLE:
Securing PHP MySQL code
QUESTION:
I have a PHP search suggestion script which uses MySQL as its back-end. I am aware there are many vunerabilities in my code, I was just wondering what I can do to make it more secure. Here is my code: real_escape_string($_POST['query']); if(strlen($query)>0){ $suggestions=$data... | [
"php",
"mysql"
] | 2 | 4 | 470 | 2 | 0 | 2011-06-01T23:36:48 | 2011-06-01T23:40:56.810000 |
6,208,952 | 6,209,020 | Django - Render the <label> of a single form field | I'm selectively rendering fields on a form. class SomeForm(forms.Form): foo = forms.ChoiceField(label='Some Foo',...) bar = forms.BooleanField(label='Some Bar',...)... I've got a custom tag that, based on some other logic, lets me iterate over the fields of the form that I need using the FIELD context variable in the t... | https://docs.djangoproject.com/en/dev/topics/forms/#s-looping-over-the-form-s-fields Shows you can do {{ FIELD.label_tag }} Should render something like Fieldlabel: | Django - Render the <label> of a single form field I'm selectively rendering fields on a form. class SomeForm(forms.Form): foo = forms.ChoiceField(label='Some Foo',...) bar = forms.BooleanField(label='Some Bar',...)... I've got a custom tag that, based on some other logic, lets me iterate over the fields of the form th... | TITLE:
Django - Render the <label> of a single form field
QUESTION:
I'm selectively rendering fields on a form. class SomeForm(forms.Form): foo = forms.ChoiceField(label='Some Foo',...) bar = forms.BooleanField(label='Some Bar',...)... I've got a custom tag that, based on some other logic, lets me iterate over the fie... | [
"django",
"django-forms"
] | 20 | 29 | 24,686 | 2 | 0 | 2011-06-01T23:38:43.427000 | 2011-06-01T23:52:12.563000 |
6,208,964 | 6,208,981 | How to loop over an Array with JavaScript? | I have a string that has data separated by a pipe character ( | ). Example var somestring = "data1|data2|data3"; var separated = somestring.split("|"); I know how to use the split() to separate each data. However, I don't know how many pipes there will be in the resulting Array. In jQuery or JavaScript, how do I loop o... | In jQuery or JavaScript, how do I loop through each separated variable? You basically just need to iterate over the resulting Array. jQuery $.each loop This method is easy to work with, and benefits in the variables used being encapsulated. $.each(separated, function(index, chunk) { // `chunk` is each member of the arr... | How to loop over an Array with JavaScript? I have a string that has data separated by a pipe character ( | ). Example var somestring = "data1|data2|data3"; var separated = somestring.split("|"); I know how to use the split() to separate each data. However, I don't know how many pipes there will be in the resulting Arra... | TITLE:
How to loop over an Array with JavaScript?
QUESTION:
I have a string that has data separated by a pipe character ( | ). Example var somestring = "data1|data2|data3"; var separated = somestring.split("|"); I know how to use the split() to separate each data. However, I don't know how many pipes there will be in ... | [
"javascript",
"jquery",
"arrays"
] | 10 | 35 | 23,547 | 6 | 0 | 2011-06-01T23:40:40.970000 | 2011-06-01T23:44:01.290000 |
6,208,970 | 6,215,409 | How to find the source video size using VMR9 renderless mode | My application uses VMR9 Renderless mode to play a WMV file. I build a filter graph with IGraphBuilder::RenderFile and control playback with IMediaControl. Everything plays okay, but I can't figure out how to determine the source video size. Any ideas? Note: This question was asked before in How can I adjust the video ... | Firstly you want the Video renderer. You can do this by using EnumFilters on the IGraphBuilder interface. Then call EnumPins on that filter to find the input pin. You can then call ConnectionMediaType to get the media type being fed into that filter. Now depending what formattype is set to you can cast the pbFormat poi... | How to find the source video size using VMR9 renderless mode My application uses VMR9 Renderless mode to play a WMV file. I build a filter graph with IGraphBuilder::RenderFile and control playback with IMediaControl. Everything plays okay, but I can't figure out how to determine the source video size. Any ideas? Note: ... | TITLE:
How to find the source video size using VMR9 renderless mode
QUESTION:
My application uses VMR9 Renderless mode to play a WMV file. I build a filter graph with IGraphBuilder::RenderFile and control playback with IMediaControl. Everything plays okay, but I can't figure out how to determine the source video size.... | [
"directx",
"directshow"
] | 2 | 1 | 625 | 2 | 0 | 2011-06-01T23:41:38 | 2011-06-02T13:47:59.023000 |
6,208,980 | 6,209,065 | Sorting a list of RGB triplets into a spectrum | I have a list of RGB triplets, and I'd like to plot them in such a way that they form something like a spectrum. I've converted them to HSV, which people seem to recommend. from PIL import Image, ImageDraw import colorsys
def make_rainbow_rgb(colors, width, height): """colors is an array of RGB tuples, with values bet... | You're trying to convert a three-dimensional space into a one-dimensional space. There's no guarantee that you can make a pleasing rainbow out of it, as Oli says. What you can do is "bucket" the colors into a few different categories based on saturation and value/lightness, and then sort within the categories, to get s... | Sorting a list of RGB triplets into a spectrum I have a list of RGB triplets, and I'd like to plot them in such a way that they form something like a spectrum. I've converted them to HSV, which people seem to recommend. from PIL import Image, ImageDraw import colorsys
def make_rainbow_rgb(colors, width, height): """co... | TITLE:
Sorting a list of RGB triplets into a spectrum
QUESTION:
I have a list of RGB triplets, and I'd like to plot them in such a way that they form something like a spectrum. I've converted them to HSV, which people seem to recommend. from PIL import Image, ImageDraw import colorsys
def make_rainbow_rgb(colors, wid... | [
"python",
"python-imaging-library",
"color-space",
"spectrum",
"hsv"
] | 19 | 12 | 9,782 | 5 | 0 | 2011-06-01T23:43:45.937000 | 2011-06-01T23:59:35.907000 |
6,208,987 | 6,260,242 | ruby 1.8.7 gems are installed but-- they aren't? | I have a rails 2.3.5 app and if I try to do rake db:migrate, I get: Missing these required gems: authlogic ~> 2.1.3 will_paginate ~> 2.3.11 paperclip ~> 2.3.1.1 mimetype-fu ~> 0.1.2 nokogiri
You're running: ruby 1.8.7.302 at /usr/local/bin/ruby18 rubygems 1.8.3 at /home/p/patrick/.gem/ruby/1.8, /usr/local/lib/ruby/gem... | I ended up installing rvm on the server and all this nonsense went away.. yay for rvm! | ruby 1.8.7 gems are installed but-- they aren't? I have a rails 2.3.5 app and if I try to do rake db:migrate, I get: Missing these required gems: authlogic ~> 2.1.3 will_paginate ~> 2.3.11 paperclip ~> 2.3.1.1 mimetype-fu ~> 0.1.2 nokogiri
You're running: ruby 1.8.7.302 at /usr/local/bin/ruby18 rubygems 1.8.3 at /home... | TITLE:
ruby 1.8.7 gems are installed but-- they aren't?
QUESTION:
I have a rails 2.3.5 app and if I try to do rake db:migrate, I get: Missing these required gems: authlogic ~> 2.1.3 will_paginate ~> 2.3.11 paperclip ~> 2.3.1.1 mimetype-fu ~> 0.1.2 nokogiri
You're running: ruby 1.8.7.302 at /usr/local/bin/ruby18 rubyg... | [
"ruby-on-rails",
"ruby"
] | 1 | 1 | 699 | 2 | 0 | 2011-06-01T23:44:51.760000 | 2011-06-07T03:04:42.027000 |
6,208,990 | 6,209,053 | My C++ class is having trouble linking to a function in another .cpp file | I asked the same question yesterday and the answer was not applicable. https://stackoverflow.com/questions/6194578/breaking-up-class-functions-into-multiple-cpp-files If I go into the class header, right click on the function and click "Go to Definition" and it takes me right to my function in my other.CPP file. It see... | inline means that the function effectively has internal linkage (that is, it must exist inside the translation unit where it is used). Either move the definition of the function into the header, or remove inline. ( inline for modern compilers really means "use internal linkage" -- compilers will inline where it makes s... | My C++ class is having trouble linking to a function in another .cpp file I asked the same question yesterday and the answer was not applicable. https://stackoverflow.com/questions/6194578/breaking-up-class-functions-into-multiple-cpp-files If I go into the class header, right click on the function and click "Go to Def... | TITLE:
My C++ class is having trouble linking to a function in another .cpp file
QUESTION:
I asked the same question yesterday and the answer was not applicable. https://stackoverflow.com/questions/6194578/breaking-up-class-functions-into-multiple-cpp-files If I go into the class header, right click on the function an... | [
"c++",
"class",
"linker"
] | 1 | 7 | 1,041 | 2 | 0 | 2011-06-01T23:45:33.413000 | 2011-06-01T23:57:46.713000 |
6,208,998 | 6,211,932 | IExtensibleDataObject vs IExtensibleObject? | I am trying to figure out what is the difference between IExtensibleDataObject and IExtensibleObject. MSDN say that the first one ( IExtensibleDataObject ) is to let the deserialization of object that may have added attribute and the second one ( IExtensibleObject ) look very similar, it does let the object add attribu... | IExtensibleDataObject is about serialization, and it can be used outside of WCF's service stack. Its main purpose is round-tripping different versions of a data contract without losing information. For example, on the first version of your contract, you have this type: [DataContract(Name = "Person")] public class Perso... | IExtensibleDataObject vs IExtensibleObject? I am trying to figure out what is the difference between IExtensibleDataObject and IExtensibleObject. MSDN say that the first one ( IExtensibleDataObject ) is to let the deserialization of object that may have added attribute and the second one ( IExtensibleObject ) look very... | TITLE:
IExtensibleDataObject vs IExtensibleObject?
QUESTION:
I am trying to figure out what is the difference between IExtensibleDataObject and IExtensibleObject. MSDN say that the first one ( IExtensibleDataObject ) is to let the deserialization of object that may have added attribute and the second one ( IExtensible... | [
"c#",
"wcf",
".net-4.0"
] | 10 | 19 | 4,411 | 2 | 0 | 2011-06-01T23:47:55.890000 | 2011-06-02T07:59:16.447000 |
6,209,004 | 6,209,028 | SqlFunctions.IsNumeric question | I'vw just use SqlFunctions.IsNumeric. Here you can see that it returns int?. Why does SqlFunctions.IsNumeric returns int? and not bool? | To be on par with how ISNUMERIC behaves in MS-SQL - it also returns an INT. | SqlFunctions.IsNumeric question I'vw just use SqlFunctions.IsNumeric. Here you can see that it returns int?. Why does SqlFunctions.IsNumeric returns int? and not bool? | TITLE:
SqlFunctions.IsNumeric question
QUESTION:
I'vw just use SqlFunctions.IsNumeric. Here you can see that it returns int?. Why does SqlFunctions.IsNumeric returns int? and not bool?
ANSWER:
To be on par with how ISNUMERIC behaves in MS-SQL - it also returns an INT. | [
"linq",
"entity-framework"
] | 1 | 2 | 891 | 2 | 0 | 2011-06-01T23:48:59.960000 | 2011-06-01T23:54:04.583000 |
6,209,008 | 6,209,038 | Checking if float is equivalent to an integer value in python | In Python 3, I am checking whether a given value is triangular, that is, it can be represented as n * (n + 1) / 2 for some positive integer n. Can I just write: import math
def is_triangular1(x): num = (1 / 2) * (math.sqrt(8 * x + 1) - 1) return int(num) == num Or do I need to do check within a tolerance instead? epsi... | You'll want to do the latter. In Programming in Python 3 the following example is given as the most accurate way to compare def equal_float(a, b): #return abs(a - b) <= sys.float_info.epsilon return abs(a - b) <= chosen_value #see edit below for more info Also, since epsilon is the "smallest difference the machine can ... | Checking if float is equivalent to an integer value in python In Python 3, I am checking whether a given value is triangular, that is, it can be represented as n * (n + 1) / 2 for some positive integer n. Can I just write: import math
def is_triangular1(x): num = (1 / 2) * (math.sqrt(8 * x + 1) - 1) return int(num) ==... | TITLE:
Checking if float is equivalent to an integer value in python
QUESTION:
In Python 3, I am checking whether a given value is triangular, that is, it can be represented as n * (n + 1) / 2 for some positive integer n. Can I just write: import math
def is_triangular1(x): num = (1 / 2) * (math.sqrt(8 * x + 1) - 1) ... | [
"python",
"floating-point"
] | 27 | 11 | 30,682 | 12 | 0 | 2011-06-01T23:49:16.653000 | 2011-06-01T23:55:07.470000 |
6,209,018 | 6,209,081 | Best way to go about creating in-house analytics for my Rails 3 app? | I have a Rails 3 app that I'm looking to create in-house analytics for. The items I need to track are impressions (and unique impressions), clicks that come from those impressions, and conversions that come from those clicks. And these are all user-specific so each user can see how many impressions, clicks, and convers... | Before you start re-inventing the wheel, Google Analytics provide a developer API (via OAuth, among other choices) that may provide you with the ability to do what you need (provide each user with a view of their own data). http://code.google.com/apis/analytics/docs/gdata/home.html Building your own, while it may seem ... | Best way to go about creating in-house analytics for my Rails 3 app? I have a Rails 3 app that I'm looking to create in-house analytics for. The items I need to track are impressions (and unique impressions), clicks that come from those impressions, and conversions that come from those clicks. And these are all user-sp... | TITLE:
Best way to go about creating in-house analytics for my Rails 3 app?
QUESTION:
I have a Rails 3 app that I'm looking to create in-house analytics for. The items I need to track are impressions (and unique impressions), clicks that come from those impressions, and conversions that come from those clicks. And the... | [
"ruby-on-rails",
"ruby-on-rails-3",
"google-analytics",
"analytics"
] | 7 | 6 | 3,019 | 3 | 0 | 2011-06-01T23:51:15.827000 | 2011-06-02T00:02:09.070000 |
6,209,035 | 6,209,093 | timer in thread problem | I have my application in which in three datagridview independently in three thread load data from wcf service. I execute in each thread timer which every second load this data. My problem is that every time my thread go threw each thread but only like I show in method timerNowyYork_Elapsed Any idea why this happens? I ... | Your locks are completely useless. As you are locking on an object that you just created, each lock will have it's own identifier and does not affect each other at all. You need all locks that should exclude each other to use the same object as identifier. | timer in thread problem I have my application in which in three datagridview independently in three thread load data from wcf service. I execute in each thread timer which every second load this data. My problem is that every time my thread go threw each thread but only like I show in method timerNowyYork_Elapsed Any i... | TITLE:
timer in thread problem
QUESTION:
I have my application in which in three datagridview independently in three thread load data from wcf service. I execute in each thread timer which every second load this data. My problem is that every time my thread go threw each thread but only like I show in method timerNowy... | [
"c#",
"multithreading",
"datagridview",
"timer"
] | 2 | 2 | 1,701 | 4 | 0 | 2011-06-01T23:54:44.583000 | 2011-06-02T00:04:40.023000 |
6,209,043 | 6,215,134 | wpf use ellipse for progress | curious about using ellipse for showing progress, probably as the progress bar uses IsIndeterminate. I'll have ellipse where either color or opacity create an effect of moving from left to right, but instead of a sold bar, ellipse controls spread apart. I'm not looking for a working example, just hoping for some direct... | I'd probably start by creating a UserControl that contains an animated ellipse that "pulses" -- becomes brighter and then fades back, waits a second, and then brightens again, and so on. I'd put multiple instances of that control into a UniformGrid. To get the desired effect of left-to-right, you'd want to expose some ... | wpf use ellipse for progress curious about using ellipse for showing progress, probably as the progress bar uses IsIndeterminate. I'll have ellipse where either color or opacity create an effect of moving from left to right, but instead of a sold bar, ellipse controls spread apart. I'm not looking for a working example... | TITLE:
wpf use ellipse for progress
QUESTION:
curious about using ellipse for showing progress, probably as the progress bar uses IsIndeterminate. I'll have ellipse where either color or opacity create an effect of moving from left to right, but instead of a sold bar, ellipse controls spread apart. I'm not looking for... | [
"wpf",
"progress",
"ellipse"
] | 0 | 0 | 722 | 1 | 0 | 2011-06-01T23:55:36.097000 | 2011-06-02T13:25:20.043000 |
6,209,045 | 6,212,802 | How can I alternate "visible" rows in an html table using jQuery | I have this code that does alternating rows for a html in jQuery: function AlternateRowColors() {
$("table.altRow1 tr").filter(function() { return true; }).filter(':even').addClass('alt');
$("tr.alt td[rowspan]").each(function() { $(this).parent().nextAll().slice(0, this.rowSpan - 1).addClass('alt'); });
$('in... | i wound up using this which seemed to work: function UpdateTable() { $('table.altRow1 tr:visible').removeClass('odd').filter(':odd').addClass('odd'); with this css:.altRow1 tr { background-color: #FFFFFF; }.altRow1 tr.odd { background-color: #DEDEDE; } | How can I alternate "visible" rows in an html table using jQuery I have this code that does alternating rows for a html in jQuery: function AlternateRowColors() {
$("table.altRow1 tr").filter(function() { return true; }).filter(':even').addClass('alt');
$("tr.alt td[rowspan]").each(function() { $(this).parent()... | TITLE:
How can I alternate "visible" rows in an html table using jQuery
QUESTION:
I have this code that does alternating rows for a html in jQuery: function AlternateRowColors() {
$("table.altRow1 tr").filter(function() { return true; }).filter(':even').addClass('alt');
$("tr.alt td[rowspan]").each(function() ... | [
"jquery",
"html-table"
] | 5 | 8 | 3,077 | 4 | 0 | 2011-06-01T23:56:08.167000 | 2011-06-02T09:41:45.323000 |
6,209,046 | 6,214,807 | Flex 4: LineSeries AnimateColor not working | This is a fairly simple question I would think. here is the code (I cut it down for an easy read).... the chart shows the line but the animation doesn't work. My question is why isn't this working? Thanks in advance Nat | I don't think that the Chart redraws when the animation is played. Charts are a very strange beast. If I were you, I'd create an item renderer for the line which has the animation within it so that you'd only redraw the line. | Flex 4: LineSeries AnimateColor not working This is a fairly simple question I would think. here is the code (I cut it down for an easy read).... the chart shows the line but the animation doesn't work. My question is why isn't this working? Thanks in advance Nat | TITLE:
Flex 4: LineSeries AnimateColor not working
QUESTION:
This is a fairly simple question I would think. here is the code (I cut it down for an easy read).... the chart shows the line but the animation doesn't work. My question is why isn't this working? Thanks in advance Nat
ANSWER:
I don't think that the Chart ... | [
"apache-flex",
"animation",
"graph",
"colors"
] | 0 | 0 | 223 | 1 | 0 | 2011-06-01T23:56:32.410000 | 2011-06-02T12:58:16.927000 |
6,209,050 | 6,209,193 | Android Multiple Choice List SQLite | How can i save the info from a multiple choice listview into the database? I want to save the status of a item from a list. For instance, if i have 2 items checked i want to save this status in the database. Thanks | Sure fegol, I assume you already set up the multiple choice listview. (if not, please check online there are heaps of them http://www.androidpeople.com/android-listview-multiple-choice-example ). Here I'd like to give you some hint on data-saving problem. Basically, there are two common choices. The first is to use get... | Android Multiple Choice List SQLite How can i save the info from a multiple choice listview into the database? I want to save the status of a item from a list. For instance, if i have 2 items checked i want to save this status in the database. Thanks | TITLE:
Android Multiple Choice List SQLite
QUESTION:
How can i save the info from a multiple choice listview into the database? I want to save the status of a item from a list. For instance, if i have 2 items checked i want to save this status in the database. Thanks
ANSWER:
Sure fegol, I assume you already set up th... | [
"android",
"listview",
"android-listview"
] | 0 | 0 | 2,128 | 1 | 0 | 2011-06-01T23:57:19.543000 | 2011-06-02T00:22:57.297000 |
6,209,060 | 6,243,189 | how to delete a branch and branch relationship | I have deleted a branch folder for application, but I am unable to remove the relationship and change icon for the folder?? Why is that? | Select application-DEV branch in team explorer. Select File menu > source control > Branching and merging > convert to folder. | how to delete a branch and branch relationship I have deleted a branch folder for application, but I am unable to remove the relationship and change icon for the folder?? Why is that? | TITLE:
how to delete a branch and branch relationship
QUESTION:
I have deleted a branch folder for application, but I am unable to remove the relationship and change icon for the folder?? Why is that?
ANSWER:
Select application-DEV branch in team explorer. Select File menu > source control > Branching and merging > c... | [
"tfs"
] | 1 | 4 | 3,415 | 1 | 0 | 2011-06-01T23:58:53.403000 | 2011-06-05T13:24:11.700000 |
6,209,064 | 6,209,111 | SMTP Error: Could not connect to SMTP host | I have this code, and all works well in my local server. The email is sent without any problem. But now I pass the content to webserver, and I get this error... SMTP Error: Could not connect to SMTP host. SSL is enable in the server..correct? so, what is the problem? $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMT... | It sounds like your web host is blocking outbound connections to smtp.gmail.com:465. Suggestions: Verify: If you have shell/terminal access to your web hosting server, try a telnet test to verify that they are in fact blocking this. Run telnet smtp.gmail.com 465 Contact: Call or email your hosting provider and find out... | SMTP Error: Could not connect to SMTP host I have this code, and all works well in my local server. The email is sent without any problem. But now I pass the content to webserver, and I get this error... SMTP Error: Could not connect to SMTP host. SSL is enable in the server..correct? so, what is the problem? $mail = n... | TITLE:
SMTP Error: Could not connect to SMTP host
QUESTION:
I have this code, and all works well in my local server. The email is sent without any problem. But now I pass the content to webserver, and I get this error... SMTP Error: Could not connect to SMTP host. SSL is enable in the server..correct? so, what is the ... | [
"php",
"smtp",
"phpmailer"
] | 4 | 8 | 40,340 | 3 | 0 | 2011-06-01T23:59:32.923000 | 2011-06-02T00:07:03.767000 |
6,209,067 | 6,209,095 | Tuple templates in GCC | I first started C++ with Microsoft VC++ in VS2010. I recently found some work, but I've been using RHEL 5 with GCC. My code is mostly native C++, but I've noticed one thing... GCC doesn't appear to recognize the header file, or the tuple template. At first I thought maybe it's just a typo, until I looked at cplusplus.c... | As long as it's just a pair you can use typedef pair > Code; But I don't think tuple is standard C++ (turns out it is included in TR1 and consequently also standard C++0x). As usual Boost has you covered though. So including: #include "boost/tuple/tuple.hpp" will solve your problem across compilers. | Tuple templates in GCC I first started C++ with Microsoft VC++ in VS2010. I recently found some work, but I've been using RHEL 5 with GCC. My code is mostly native C++, but I've noticed one thing... GCC doesn't appear to recognize the header file, or the tuple template. At first I thought maybe it's just a typo, until ... | TITLE:
Tuple templates in GCC
QUESTION:
I first started C++ with Microsoft VC++ in VS2010. I recently found some work, but I've been using RHEL 5 with GCC. My code is mostly native C++, but I've noticed one thing... GCC doesn't appear to recognize the header file, or the tuple template. At first I thought maybe it's j... | [
"c++",
"visual-c++",
"gcc",
"compatibility",
"tuples"
] | 4 | 1 | 4,047 | 2 | 0 | 2011-06-01T23:59:50.323000 | 2011-06-02T00:04:51.933000 |
6,209,072 | 6,209,098 | Silverlight Accessing ASPX Static Object | I have a website that started with ASP.NET and over time has had some Silverlight elements added to it throughout miscellaneous pages. One of these elements needs to change a static object on the ASP.NET Master Page containing it. Is this in any way possible? I had it in my mind that I might be able to create an event ... | This is fundamentally impossible. Silverlight runs on the client, whereas ASP.Net runs on the server, and never the twain shall meet. Instead, you can use AJAX (see the WebClient class) | Silverlight Accessing ASPX Static Object I have a website that started with ASP.NET and over time has had some Silverlight elements added to it throughout miscellaneous pages. One of these elements needs to change a static object on the ASP.NET Master Page containing it. Is this in any way possible? I had it in my mind... | TITLE:
Silverlight Accessing ASPX Static Object
QUESTION:
I have a website that started with ASP.NET and over time has had some Silverlight elements added to it throughout miscellaneous pages. One of these elements needs to change a static object on the ASP.NET Master Page containing it. Is this in any way possible? I... | [
"c#",
"asp.net",
"silverlight"
] | 0 | 2 | 57 | 1 | 0 | 2011-06-02T00:00:41.553000 | 2011-06-02T00:05:16.043000 |
6,209,079 | 6,209,116 | Submitting a HTML form in and onload function | I want send a form as soon as the page is loaded. All variables in the form are written dynamically and there is no button for submitting. Does following JS script work in all browsers? I doubt window.onload will work in all without any problems. Thanks in advance... | If you're worried about compatibility in all browsers, how about using jQuery's ready function? | Submitting a HTML form in and onload function I want send a form as soon as the page is loaded. All variables in the form are written dynamically and there is no button for submitting. Does following JS script work in all browsers? I doubt window.onload will work in all without any problems. Thanks in advance... | TITLE:
Submitting a HTML form in and onload function
QUESTION:
I want send a form as soon as the page is loaded. All variables in the form are written dynamically and there is no button for submitting. Does following JS script work in all browsers? I doubt window.onload will work in all without any problems. Thanks in... | [
"javascript",
"html"
] | 2 | 14 | 43,677 | 3 | 0 | 2011-06-02T00:01:48.643000 | 2011-06-02T00:08:26.767000 |
6,209,090 | 6,209,106 | Can't get background thread to work unless I use static methods. What are the alternatives? | I'm using Eclipse to develop an Android app to plot Bluetooth data. The primary components are a Bluetooth Activity, a background thread created by the Bluetooth Activity, and a Plotting Activity. From Logcat I know for a fact that the background task continues to run and produce BluetoothData even after I switch the a... | You can't transfer data from one activity to another, as only one activity can ever be active at a time. The reason it's working with static members is because the class definitions exist, but the objects created that were referenced by the activity no longer exist; they were garbage collected when the new activity cam... | Can't get background thread to work unless I use static methods. What are the alternatives? I'm using Eclipse to develop an Android app to plot Bluetooth data. The primary components are a Bluetooth Activity, a background thread created by the Bluetooth Activity, and a Plotting Activity. From Logcat I know for a fact t... | TITLE:
Can't get background thread to work unless I use static methods. What are the alternatives?
QUESTION:
I'm using Eclipse to develop an Android app to plot Bluetooth data. The primary components are a Bluetooth Activity, a background thread created by the Bluetooth Activity, and a Plotting Activity. From Logcat I... | [
"android",
"multithreading",
"static",
"background",
"handler"
] | 0 | 2 | 257 | 1 | 0 | 2011-06-02T00:03:57.793000 | 2011-06-02T00:06:45.600000 |
6,209,094 | 6,209,146 | Converting ConfigParser values to python data types | ConfigParser requires all sections, keys and values to be strings; no surprise. It has methods to convert the values to datatypes with getfloat, getint, getboolean. If you don't know the datatype, you can wrap the get() with an eval() to get have the string evaluated such as: >>> from ConfigParser import SafeConfigPars... | If you are using Python 2.6 or above you can use ast.literal_eval: ast.literal_eval(node_or_string) Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, an... | Converting ConfigParser values to python data types ConfigParser requires all sections, keys and values to be strings; no surprise. It has methods to convert the values to datatypes with getfloat, getint, getboolean. If you don't know the datatype, you can wrap the get() with an eval() to get have the string evaluated ... | TITLE:
Converting ConfigParser values to python data types
QUESTION:
ConfigParser requires all sections, keys and values to be strings; no surprise. It has methods to convert the values to datatypes with getfloat, getint, getboolean. If you don't know the datatype, you can wrap the get() with an eval() to get have the... | [
"python",
"eval",
"configparser"
] | 17 | 16 | 12,020 | 6 | 0 | 2011-06-02T00:04:42.340000 | 2011-06-02T00:12:24.063000 |
6,209,112 | 6,213,950 | Converting Strings in Excel to Dates | We imported a bunch of data into cells. But when you click on the cell, their is an apostrophe before the data, so it thinks its a string. By removing the apostrophe, the data gets recognized as dates. How do I avoid doing this by hand? | Use a column beside the dates column. Add a formula like this one: =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)) it will vary depending on your date format, copy this formula for all rows. Then copy the results, and do a paste special where you paste values. You now have a column with dates. | Converting Strings in Excel to Dates We imported a bunch of data into cells. But when you click on the cell, their is an apostrophe before the data, so it thinks its a string. By removing the apostrophe, the data gets recognized as dates. How do I avoid doing this by hand? | TITLE:
Converting Strings in Excel to Dates
QUESTION:
We imported a bunch of data into cells. But when you click on the cell, their is an apostrophe before the data, so it thinks its a string. By removing the apostrophe, the data gets recognized as dates. How do I avoid doing this by hand?
ANSWER:
Use a column beside... | [
"string",
"excel",
"formatting",
"format",
"date"
] | 1 | 1 | 504 | 3 | 0 | 2011-06-02T00:07:06.420000 | 2011-06-02T11:31:30.053000 |
6,209,120 | 6,209,257 | Scala - ambiguous reference to overloaded definition -- with varargs | Possible Duplicate: How do I disambiguate in Scala between methods with vararg and without I am currently porting part of an application to scala and it uses the Oval library. The method is question is the Validator.validate method. It has two signatures: List validate(Object validatedObject) List validate(Object valid... | I think that this could be a duplicate of How do I disambiguate in Scala between methods with vararg and without Basically, it is a known java-scala-interop problem, and the only workarounds involve extra Java adapters to make accessible in Scala. | Scala - ambiguous reference to overloaded definition -- with varargs Possible Duplicate: How do I disambiguate in Scala between methods with vararg and without I am currently porting part of an application to scala and it uses the Oval library. The method is question is the Validator.validate method. It has two signatu... | TITLE:
Scala - ambiguous reference to overloaded definition -- with varargs
QUESTION:
Possible Duplicate: How do I disambiguate in Scala between methods with vararg and without I am currently porting part of an application to scala and it uses the Oval library. The method is question is the Validator.validate method. ... | [
"scala",
"scala-java-interop"
] | 17 | 12 | 11,859 | 2 | 0 | 2011-06-02T00:09:21.880000 | 2011-06-02T00:37:11.440000 |
6,209,121 | 6,243,118 | Set a column color on a TableLayout | I can set a row color on a tablelayout. What I need is to set a column to a specific color. My table cells are filled with textviews, I've tried setting the background on the textviews, but my textviews have padding and the padding seems to be transparent and not pickup the textview background color. So, if its possibl... | Coloring the Views in the column you want colored achieves the effect. | Set a column color on a TableLayout I can set a row color on a tablelayout. What I need is to set a column to a specific color. My table cells are filled with textviews, I've tried setting the background on the textviews, but my textviews have padding and the padding seems to be transparent and not pickup the textview ... | TITLE:
Set a column color on a TableLayout
QUESTION:
I can set a row color on a tablelayout. What I need is to set a column to a specific color. My table cells are filled with textviews, I've tried setting the background on the textviews, but my textviews have padding and the padding seems to be transparent and not pi... | [
"android",
"colors",
"background",
"tablelayout"
] | 0 | 1 | 1,339 | 1 | 0 | 2011-06-02T00:09:32.930000 | 2011-06-05T13:14:10.843000 |
6,209,125 | 6,221,653 | ASP.NET MVC3: Debug and Release app settings not working | My debug and release web.config app settings are not being read correctly. Web.config: Web.Debug.config Web.Release.config However, calling: WebConfigurationManager.AppSettings["ErrorEmailAddress"] is returning null (when debugging). I have tried adding xdt:Transform="Insert" e.g. Any ideas? | Ok I figured it out. Answered here: How can I use Web.debug.config in the built-in visual studio debugger server? So the config files are only combined when you publish, not when you are running against a local server. Pretty stupid IMO, when else would you ever use Web.Debug.config? I will do as is suggested here: Use... | ASP.NET MVC3: Debug and Release app settings not working My debug and release web.config app settings are not being read correctly. Web.config: Web.Debug.config Web.Release.config However, calling: WebConfigurationManager.AppSettings["ErrorEmailAddress"] is returning null (when debugging). I have tried adding xdt:Trans... | TITLE:
ASP.NET MVC3: Debug and Release app settings not working
QUESTION:
My debug and release web.config app settings are not being read correctly. Web.config: Web.Debug.config Web.Release.config However, calling: WebConfigurationManager.AppSettings["ErrorEmailAddress"] is returning null (when debugging). I have trie... | [
"asp.net-mvc",
"web-config"
] | 29 | 52 | 34,244 | 6 | 0 | 2011-06-02T00:10:00.337000 | 2011-06-02T23:52:04.590000 |
6,209,131 | 6,209,170 | Scaling Animation iPhone | Can anyone describe a way to create an animated scaling affect on the iPhone? I would like an image to start small, and then grow while fading. Motion tweening would also be helpful. Is quartz neccessary for this? I'd prefer to use something as simple as possible. Thanks SO! | You can use [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0];
myImageView.alpha = 0.0; myImageView.size = CGSizeMake(myImageView.size.width*2,myImageView.size.height*2);
[UIView commitAnimations]; This does require the CoreAnimations framework to be added to your project. | Scaling Animation iPhone Can anyone describe a way to create an animated scaling affect on the iPhone? I would like an image to start small, and then grow while fading. Motion tweening would also be helpful. Is quartz neccessary for this? I'd prefer to use something as simple as possible. Thanks SO! | TITLE:
Scaling Animation iPhone
QUESTION:
Can anyone describe a way to create an animated scaling affect on the iPhone? I would like an image to start small, and then grow while fading. Motion tweening would also be helpful. Is quartz neccessary for this? I'd prefer to use something as simple as possible. Thanks SO!
... | [
"iphone",
"objective-c"
] | 0 | 1 | 723 | 2 | 0 | 2011-06-02T00:10:44.313000 | 2011-06-02T00:17:48.607000 |
6,209,137 | 6,209,289 | Rails 3: Nested Attribute presence validation? | I have 3 Deeply nested attraibutes: Process has many categories, Categories has many Blocks How do i place validate_presence_of calls so when a user is creating a new process and attempts to create a category within it without a definition lets say, that he is redirected to the process edit form and told definition can... | Validations always go on to the model they are validating. Rails will handle the nesting. | Rails 3: Nested Attribute presence validation? I have 3 Deeply nested attraibutes: Process has many categories, Categories has many Blocks How do i place validate_presence_of calls so when a user is creating a new process and attempts to create a category within it without a definition lets say, that he is redirected t... | TITLE:
Rails 3: Nested Attribute presence validation?
QUESTION:
I have 3 Deeply nested attraibutes: Process has many categories, Categories has many Blocks How do i place validate_presence_of calls so when a user is creating a new process and attempts to create a category within it without a definition lets say, that ... | [
"ruby-on-rails"
] | 0 | 2 | 882 | 1 | 0 | 2011-06-02T00:11:17.347000 | 2011-06-02T00:41:35.927000 |
6,209,144 | 6,209,272 | Need help with file IO in C | I'm converting the following code from C# to C, and I don't think I'm doing this correctly. Entry3D and entry_3d are just structs that contain int lookup, length, extra in both cases. Here's the C# snippet (and it works perfectly fine): BinaryReader reader = new BinaryReader(File.Open("artidx.mul", FileMode.Open)); Bin... | I don't see much wrong here. The code will work correctly on a linux/windows box. Error handling could be improved. It will not fail gracefully when the artidx file is not a multiple of 12 bytes. I suppose this code could quite easily run out of memory on the Wii console. Try allocating the entry_3d array dynamically (... | Need help with file IO in C I'm converting the following code from C# to C, and I don't think I'm doing this correctly. Entry3D and entry_3d are just structs that contain int lookup, length, extra in both cases. Here's the C# snippet (and it works perfectly fine): BinaryReader reader = new BinaryReader(File.Open("artid... | TITLE:
Need help with file IO in C
QUESTION:
I'm converting the following code from C# to C, and I don't think I'm doing this correctly. Entry3D and entry_3d are just structs that contain int lookup, length, extra in both cases. Here's the C# snippet (and it works perfectly fine): BinaryReader reader = new BinaryReade... | [
"c#",
"c",
"file-io"
] | 1 | 3 | 162 | 2 | 0 | 2011-06-02T00:12:04.453000 | 2011-06-02T00:38:47.347000 |
6,209,155 | 6,209,258 | Using Oracle database links without unreadable dynamic SQL | How can I write a neat PL/SQL stored procedure that can execute against a given database link? It gets really messy, writing stuff like this: PROCEDURE my_proc(aDbLink IN VARCHAR2) IS BEGIN EXECUTE IMMEDIATE ' SELECT mycolumn, anothercolumn FROM MYTABLE@' || aDbLink || ' WHERE such-and-such...' END as the query gets bi... | The simplest way to avoid using dynamic SQL would be to create synonyms. CREATE OR REPLACE SYNONYM MyTableRemote FOR MyTable@database_link Your stored procedures would then simply refer to the synonym MyTableRemote. You could then have a separate method that took the database link name as a parameter and changed all th... | Using Oracle database links without unreadable dynamic SQL How can I write a neat PL/SQL stored procedure that can execute against a given database link? It gets really messy, writing stuff like this: PROCEDURE my_proc(aDbLink IN VARCHAR2) IS BEGIN EXECUTE IMMEDIATE ' SELECT mycolumn, anothercolumn FROM MYTABLE@' || aD... | TITLE:
Using Oracle database links without unreadable dynamic SQL
QUESTION:
How can I write a neat PL/SQL stored procedure that can execute against a given database link? It gets really messy, writing stuff like this: PROCEDURE my_proc(aDbLink IN VARCHAR2) IS BEGIN EXECUTE IMMEDIATE ' SELECT mycolumn, anothercolumn FR... | [
"oracle",
"stored-procedures",
"relational-database"
] | 4 | 6 | 4,339 | 2 | 0 | 2011-06-02T00:13:44.453000 | 2011-06-02T00:37:18.300000 |
6,209,157 | 6,209,158 | How to translate XML to JSON? | As part of my graduation I have to migrate XML files to CouchDB. To convert the structure of the file to JSON is no problem at all, but there's one part which I can't figure out how to actually convert: We beg to send us immediately [...] In the original, [...] by post one copy of A Book by Mrs. Misses Jane Smith. As s... | The following will work, though is a PITA to work with. Represent each tag s follows: { attr => {...}, tag => "...", content => [...] } And content as an array of text (outside of tags) or else tags. Ignoring whitespace and indentation your snippet would become something like: { tag => "p", content => [ "We beg to send... | How to translate XML to JSON? As part of my graduation I have to migrate XML files to CouchDB. To convert the structure of the file to JSON is no problem at all, but there's one part which I can't figure out how to actually convert: We beg to send us immediately [...] In the original, [...] by post one copy of A Book b... | TITLE:
How to translate XML to JSON?
QUESTION:
As part of my graduation I have to migrate XML files to CouchDB. To convert the structure of the file to JSON is no problem at all, but there's one part which I can't figure out how to actually convert: We beg to send us immediately [...] In the original, [...] by post on... | [
"xml",
"json",
"porting"
] | 1 | 2 | 1,123 | 2 | 0 | 2011-06-01T15:44:43.487000 | 2011-06-01T17:04:09.503000 |
6,209,161 | 6,310,120 | Extract the current DOM and print it as a string, with styles intact | I'd like to be able to take my DOM, as is, and convert it to a string. Let's say I open up the inspector and make a change to the margin-left property of a particular element. That change should be reflected in my string. The function should properly take all the styles currently applied to an element (excluding defaul... | I think this could be a solution (it took me nearly a whole day!). It returns a string representing the DOM of any element, with all external styles included in the "style" attributes except default values, and does not permanently modify that element. For example: console.log(document.body.serializeWithStyles()); You ... | Extract the current DOM and print it as a string, with styles intact I'd like to be able to take my DOM, as is, and convert it to a string. Let's say I open up the inspector and make a change to the margin-left property of a particular element. That change should be reflected in my string. The function should properly ... | TITLE:
Extract the current DOM and print it as a string, with styles intact
QUESTION:
I'd like to be able to take my DOM, as is, and convert it to a string. Let's say I open up the inspector and make a change to the margin-left property of a particular element. That change should be reflected in my string. The functio... | [
"javascript",
"css",
"html",
"webkit"
] | 56 | 87 | 59,965 | 8 | 0 | 2011-06-02T00:15:12.587000 | 2011-06-10T17:42:06.080000 |
6,209,165 | 6,209,184 | Python: getopt, batch files, and paths with spaces | I'm using getopt to parse options and arguments. I wrote a batch file to call a python script so I don't have to type the same command over and over. When I printed out the list of arguments, the path was split on spaces and each was parsed separately. The path is enclosed in double quotes, but I'm not sure what the pr... | We'll need to see code to be sure but make sure you quote the argument everywhere not just on the command line. Command line... $script.sh "/my/path with/spaces" Bash Script... #!/bin/bash python /path/to/script "$1" | Python: getopt, batch files, and paths with spaces I'm using getopt to parse options and arguments. I wrote a batch file to call a python script so I don't have to type the same command over and over. When I printed out the list of arguments, the path was split on spaces and each was parsed separately. The path is encl... | TITLE:
Python: getopt, batch files, and paths with spaces
QUESTION:
I'm using getopt to parse options and arguments. I wrote a batch file to call a python script so I don't have to type the same command over and over. When I printed out the list of arguments, the path was split on spaces and each was parsed separately... | [
"python",
"batch-file"
] | 0 | 2 | 1,133 | 1 | 0 | 2011-06-02T00:16:18.480000 | 2011-06-02T00:21:36.903000 |
6,209,171 | 6,209,247 | Select only 1 child from each parent | One Author can have many Book. Table Book have Author_Id on it. I Want a LINQ query that returns a IQueryable (So I can navigate with Book.Author.Name and stuff), but Only 1 Book per Author. How do I do that with a LINQ? | Pretty sure this is it: var books = from a in authors from b in a.Books.Take(1) select b); Edit: Less hacky way to do this: var books = authors.Select(author => author.Books.First()).Select(book => book); | Select only 1 child from each parent One Author can have many Book. Table Book have Author_Id on it. I Want a LINQ query that returns a IQueryable (So I can navigate with Book.Author.Name and stuff), but Only 1 Book per Author. How do I do that with a LINQ? | TITLE:
Select only 1 child from each parent
QUESTION:
One Author can have many Book. Table Book have Author_Id on it. I Want a LINQ query that returns a IQueryable (So I can navigate with Book.Author.Name and stuff), but Only 1 Book per Author. How do I do that with a LINQ?
ANSWER:
Pretty sure this is it: var books =... | [
"c#",
".net",
"linq",
"sql-server-2008",
"linq-to-sql"
] | 3 | 4 | 107 | 2 | 0 | 2011-06-02T00:17:54.550000 | 2011-06-02T00:34:39.840000 |
6,209,177 | 6,209,203 | How to disable entire unit test in TestNG? | This is what I can do in JUnit: import org.junit.*; @Ignore public class FooTest { // } and the entire class will be ignored. How can I do the same in TestNG? | I believe what you want is: @Test(enabled=false) public class FooTest { // } (You can apply the @Test annotation to the class, as well as to methods individually.) The TestNG documentation has a comprehensive list of the supported annotations, and also describes exclusion/inclusion of tests by group if that's of any in... | How to disable entire unit test in TestNG? This is what I can do in JUnit: import org.junit.*; @Ignore public class FooTest { // } and the entire class will be ignored. How can I do the same in TestNG? | TITLE:
How to disable entire unit test in TestNG?
QUESTION:
This is what I can do in JUnit: import org.junit.*; @Ignore public class FooTest { // } and the entire class will be ignored. How can I do the same in TestNG?
ANSWER:
I believe what you want is: @Test(enabled=false) public class FooTest { // } (You can apply... | [
"java",
"unit-testing",
"junit",
"testng"
] | 63 | 95 | 43,095 | 1 | 0 | 2011-06-02T00:19:51.973000 | 2011-06-02T00:25:28.777000 |
6,209,178 | 6,209,209 | Log4Net log showing up in console window | I have the opposite problem as most people do with Log4net. I have a basic rolling log appender, I use the INFO, WARN and ERROR levels in my code behind. I have debug turned off in the app.config. It STILL pushes the log data to the console window in addition to the rolling log appender. How do I stop this behavior? It... | Based on the additional information you provided, there are a couple things I can see. First, you are logging all messages (including DEBUG messages). You just aren't showing log4net debugging information. As for why you are writing to the console window, I would suggest looking at the wrapper for your logger messages.... | Log4Net log showing up in console window I have the opposite problem as most people do with Log4net. I have a basic rolling log appender, I use the INFO, WARN and ERROR levels in my code behind. I have debug turned off in the app.config. It STILL pushes the log data to the console window in addition to the rolling log ... | TITLE:
Log4Net log showing up in console window
QUESTION:
I have the opposite problem as most people do with Log4net. I have a basic rolling log appender, I use the INFO, WARN and ERROR levels in my code behind. I have debug turned off in the app.config. It STILL pushes the log data to the console window in addition t... | [
"c#",
"log4net",
"log4net-configuration"
] | 5 | 1 | 6,719 | 3 | 0 | 2011-06-02T00:19:55.077000 | 2011-06-02T00:27:05.223000 |
6,209,188 | 6,209,216 | How to consolidate / eliminate PHP includes for class files | I have multiple files that I keep including individually. I want to just put them all in one file to decrease file I/O and just have one include. Update Ended up using an auto-loader here is the php.net reference. Now I don't have to explicitly include each file and according to the reference the files are lazy loaded. | PHP will parse the file. PHP will probably register the classes, and will in any case parse and syntax check the file. But this might still be faster than loading separate files. More separate file I/O will be slower, though it will require less memory because only the needed files are loaded. I wouldn't worry about ei... | How to consolidate / eliminate PHP includes for class files I have multiple files that I keep including individually. I want to just put them all in one file to decrease file I/O and just have one include. Update Ended up using an auto-loader here is the php.net reference. Now I don't have to explicitly include each fi... | TITLE:
How to consolidate / eliminate PHP includes for class files
QUESTION:
I have multiple files that I keep including individually. I want to just put them all in one file to decrease file I/O and just have one include. Update Ended up using an auto-loader here is the php.net reference. Now I don't have to explicit... | [
"php",
"class",
"optimization",
"hierarchy"
] | 2 | 3 | 159 | 3 | 0 | 2011-06-02T00:22:25.857000 | 2011-06-02T00:29:08.983000 |
6,209,199 | 6,209,210 | jQuery: on Clicking any Menu Link, Play Animation and Only Then Go to the Link's URL | When any of the menu links is clicked, I want to play a quick animation on the current page, and only then go to the url of the clicked link. I would be grateful for the expertly help! | Prevent the default behaviour, play your animation and then point the browser to the original destination. $('#menu a').click(function(event) { event.preventDefault(); var href = this.href;
$('#whatever').animate({ top: '300px' }, 500, function() { window.location = href; }); }); | jQuery: on Clicking any Menu Link, Play Animation and Only Then Go to the Link's URL When any of the menu links is clicked, I want to play a quick animation on the current page, and only then go to the url of the clicked link. I would be grateful for the expertly help! | TITLE:
jQuery: on Clicking any Menu Link, Play Animation and Only Then Go to the Link's URL
QUESTION:
When any of the menu links is clicked, I want to play a quick animation on the current page, and only then go to the url of the clicked link. I would be grateful for the expertly help!
ANSWER:
Prevent the default beh... | [
"jquery",
"url",
"jquery-animate"
] | 1 | 8 | 4,366 | 2 | 0 | 2011-06-02T00:24:47.623000 | 2011-06-02T00:27:37.807000 |
6,209,204 | 6,209,286 | Identify GoogleTv from Android app | Is there a way for an Android app to tell in the Java code if it is running on GoogleTV vs tablets or phones? | The following link might help you: Google TV Android Developer's Guide To optimize your app for a Google TV, just add an additional layour for large screens. However, if you want to determine the device that is currently using the app at runtime, you could try the hasSystemFeature() method. With this you can test for c... | Identify GoogleTv from Android app Is there a way for an Android app to tell in the Java code if it is running on GoogleTV vs tablets or phones? | TITLE:
Identify GoogleTv from Android app
QUESTION:
Is there a way for an Android app to tell in the Java code if it is running on GoogleTV vs tablets or phones?
ANSWER:
The following link might help you: Google TV Android Developer's Guide To optimize your app for a Google TV, just add an additional layour for large... | [
"android",
"google-tv"
] | 10 | 5 | 4,360 | 4 | 0 | 2011-06-02T00:25:55.653000 | 2011-06-02T00:41:27.160000 |
6,209,215 | 6,209,251 | mySQL UPDATE table based on SELECT (count) of a different table | I have a table of classes, and a table of subjects. CLASS |class_id|class_name|subject_id|date_time| ------------------------------------------ (imagine some rows here)
SUBJECT |subject_id|subject_name|current_class_count| --------------------------------------------- (imagine some rows here) For indexing purposes I'd... | Edit: How about this: UPDATE SUBJECT LEFT JOIN ( SELECT count(*) AS num, subject_id FROM class GROUP BY subject_id where date_time > NOW()) AS t ON SUBJECT.subject_id = t.subject_id SET SUBJECT.current_class_count = coalesce( t.num, 0 ) As long as I've typed it right, basically you should be able to run this once an ho... | mySQL UPDATE table based on SELECT (count) of a different table I have a table of classes, and a table of subjects. CLASS |class_id|class_name|subject_id|date_time| ------------------------------------------ (imagine some rows here)
SUBJECT |subject_id|subject_name|current_class_count| --------------------------------... | TITLE:
mySQL UPDATE table based on SELECT (count) of a different table
QUESTION:
I have a table of classes, and a table of subjects. CLASS |class_id|class_name|subject_id|date_time| ------------------------------------------ (imagine some rows here)
SUBJECT |subject_id|subject_name|current_class_count| --------------... | [
"php",
"mysql"
] | 2 | 2 | 2,511 | 1 | 0 | 2011-06-02T00:28:18.560000 | 2011-06-02T00:35:16.297000 |
6,209,217 | 6,220,590 | ActionScript 3 Alpha Tweening | I am building a custom preloader which is different than the "traditional" sliding bar that is common in RIAs. The preloader uses 100 white laser lights which are in a straight line, and collectively they indicate the progress bar. Let me describe how this works before I ask my question:........................,,,,,,,,... | The thing I see is a embedded function. I would recode using the powerful TweenMax classes from Greensock. http://www.greensock.com/tweenmax/ | ActionScript 3 Alpha Tweening I am building a custom preloader which is different than the "traditional" sliding bar that is common in RIAs. The preloader uses 100 white laser lights which are in a straight line, and collectively they indicate the progress bar. Let me describe how this works before I ask my question:..... | TITLE:
ActionScript 3 Alpha Tweening
QUESTION:
I am building a custom preloader which is different than the "traditional" sliding bar that is common in RIAs. The preloader uses 100 white laser lights which are in a straight line, and collectively they indicate the progress bar. Let me describe how this works before I ... | [
"flash",
"actionscript-3",
"actionscript",
"preloader",
"tween"
] | 0 | 1 | 1,439 | 2 | 0 | 2011-06-02T00:29:20.490000 | 2011-06-02T21:26:51.427000 |
6,209,220 | 6,210,009 | IOS App Created Wholly with HTML 5 - Input lag... fixable? | Like many others, I have decided to build my app via HTML 5, with limited native code (some of the UI and whatnot). However, I have run into a critical problem related to the UX. It seems that input boxes and buttons created via HTML 5 always have a longer lag time in recognizing their click event then the native inter... | I believe this could be because MobileSafari has the double-tap gesture for zooming, which means that a single tap will have a slight delay while the system waits for a possible second tap. A possible solution using touchStart/touchMove/touchEnd events is detailed here | IOS App Created Wholly with HTML 5 - Input lag... fixable? Like many others, I have decided to build my app via HTML 5, with limited native code (some of the UI and whatnot). However, I have run into a critical problem related to the UX. It seems that input boxes and buttons created via HTML 5 always have a longer lag ... | TITLE:
IOS App Created Wholly with HTML 5 - Input lag... fixable?
QUESTION:
Like many others, I have decided to build my app via HTML 5, with limited native code (some of the UI and whatnot). However, I have run into a critical problem related to the UX. It seems that input boxes and buttons created via HTML 5 always ... | [
"iphone",
"ios",
"html",
"uiwebview"
] | 2 | 3 | 1,593 | 1 | 0 | 2011-06-02T00:29:35.573000 | 2011-06-02T03:19:15.237000 |
6,209,232 | 6,209,253 | Is it possible to read php code from other sites? | Just a curious question. I was wondering is it possible to read a sites php/server side codes? Is there any software/method that can be used to do so? Sometimes for educational purposes, i really want to see how people form the backend infrastructure of their sites. | It is only possible if the site's owner intentionally makes the code publicly available, or if the site has a very critical security hole. Usually, no, you cannot read other people's server-side code. After all, we'd have huge problems if you could just read any server-side code you wanted. If, say, a bank's website we... | Is it possible to read php code from other sites? Just a curious question. I was wondering is it possible to read a sites php/server side codes? Is there any software/method that can be used to do so? Sometimes for educational purposes, i really want to see how people form the backend infrastructure of their sites. | TITLE:
Is it possible to read php code from other sites?
QUESTION:
Just a curious question. I was wondering is it possible to read a sites php/server side codes? Is there any software/method that can be used to do so? Sometimes for educational purposes, i really want to see how people form the backend infrastructure o... | [
"php",
"backend"
] | 2 | 7 | 8,506 | 8 | 0 | 2011-06-02T00:31:42.007000 | 2011-06-02T00:35:42.190000 |
6,209,234 | 6,219,521 | Help with WIF proof-of-concept | I have been charged with the task of implementing a proof-of-concept for Windows Identity Foundation in my organization. The reason for the POC is that we do not have ADFS implemented but want to develop a unified authentication and authorization strategy for applications as we move forward. The solution I will be work... | Have a look at IdentityServer. This is a MVC based (with a sample MVC client) which allows authentication against a SQL Server roles based DB. This serves as your STS and you can add code to add specific claims. The only thing it won't address is point 3 as it uses DB authentication. It has recently been upgraded to su... | Help with WIF proof-of-concept I have been charged with the task of implementing a proof-of-concept for Windows Identity Foundation in my organization. The reason for the POC is that we do not have ADFS implemented but want to develop a unified authentication and authorization strategy for applications as we move forwa... | TITLE:
Help with WIF proof-of-concept
QUESTION:
I have been charged with the task of implementing a proof-of-concept for Windows Identity Foundation in my organization. The reason for the POC is that we do not have ADFS implemented but want to develop a unified authentication and authorization strategy for application... | [
"wif"
] | 0 | 1 | 525 | 2 | 0 | 2011-06-02T00:31:50.443000 | 2011-06-02T19:42:45.547000 |
6,209,236 | 6,209,267 | filtering out values in a multi-dimensional array in php | I have a situation where I have two arrays and I use one array(A) to determine which elements of the second array(B) I need to use. Since I will be combing B multiple times and each time I will not need the previously used elements I have written a function that I call sift_array. function sift_array(&$array, $key, $va... | There are plenty of ways to implement this, but I'll just comment on how you've done it: function sift_array(&$array, $key, $value){ foreach($array as $i => $element){ if($element[$key] == $value){ $temp[] = $element; unset($array[$i]); } } return $temp; } Here we are saving memory and time (well, maybe not time... ben... | filtering out values in a multi-dimensional array in php I have a situation where I have two arrays and I use one array(A) to determine which elements of the second array(B) I need to use. Since I will be combing B multiple times and each time I will not need the previously used elements I have written a function that ... | TITLE:
filtering out values in a multi-dimensional array in php
QUESTION:
I have a situation where I have two arrays and I use one array(A) to determine which elements of the second array(B) I need to use. Since I will be combing B multiple times and each time I will not need the previously used elements I have writte... | [
"php",
"sorting",
"multidimensional-array"
] | 1 | 3 | 1,853 | 3 | 0 | 2011-06-02T00:32:00.033000 | 2011-06-02T00:38:22.923000 |
6,209,240 | 6,210,229 | How to preconfigure a SharePoint WebPart? | What is the best way to preconfigure a custom SharePoint WebPart? Is it e.g. possible to add a textfile to the WSP package and simply read the file from the WebPart? I couldn't figure out a way to retrieve the path of the textfile after the deployment. Or can I somehow add key value pairs to the.webpart file and access... | The schema for.webpart files is here: http://msdn.microsoft.com/en-us/library/ms227561.aspx and allows for you to set default value properties for your WebPart. Also, since you are running in the context of an assembly, you could read a file of config data from inside that assembly. The first answer to this question sh... | How to preconfigure a SharePoint WebPart? What is the best way to preconfigure a custom SharePoint WebPart? Is it e.g. possible to add a textfile to the WSP package and simply read the file from the WebPart? I couldn't figure out a way to retrieve the path of the textfile after the deployment. Or can I somehow add key ... | TITLE:
How to preconfigure a SharePoint WebPart?
QUESTION:
What is the best way to preconfigure a custom SharePoint WebPart? Is it e.g. possible to add a textfile to the WSP package and simply read the file from the WebPart? I couldn't figure out a way to retrieve the path of the textfile after the deployment. Or can ... | [
".net",
"sharepoint",
"web-parts"
] | 0 | 2 | 190 | 1 | 0 | 2011-06-02T00:32:48.100000 | 2011-06-02T04:04:29.657000 |
6,209,277 | 6,215,317 | looking for Windows RAM-based shared memory solution in C++ | I'm facing a situation where I need to pass up to several hundreds of megabytes of memory from one process to another. Right now I'm doing it via files and it's too slow. I guess that to make it quicker, those files should be written directly to RAM and be accessible from another process. No fancy synchronization requi... | I think that here is a fundamental misunderstanding: you think that, if you create a file mapping backed by the paging file, it will be as slow as actually writing stuff on disk. This is definitely not the case: the meaning of "backed by the paging file" in the documentation means that the shared memory in general resi... | looking for Windows RAM-based shared memory solution in C++ I'm facing a situation where I need to pass up to several hundreds of megabytes of memory from one process to another. Right now I'm doing it via files and it's too slow. I guess that to make it quicker, those files should be written directly to RAM and be acc... | TITLE:
looking for Windows RAM-based shared memory solution in C++
QUESTION:
I'm facing a situation where I need to pass up to several hundreds of megabytes of memory from one process to another. Right now I'm doing it via files and it's too slow. I guess that to make it quicker, those files should be written directly... | [
"c++",
"windows",
"shared-memory"
] | 10 | 16 | 5,198 | 4 | 0 | 2011-06-02T00:39:45.957000 | 2011-06-02T13:40:58.043000 |
6,209,290 | 6,209,302 | Is it safe to load HTML and js via ajax? | I'm using the Jquery load function $('#result').load('test.php'); to load a page into another page by clicking a tab. The page I'm loading contains javascript, php, and contains a form. Using the firebug console I saw that there is a GET for all my script sources in the page I'm loading as well. Not sure if that should... | Loading content using AJAX does not introduce any additional security issues. An attacker can hijack the connection and inject his own Javascript (unless you're using HTTPS), but he can also do that to the page itself. An attacker can exploit an XSS hole in your backend to run his own Javascript, but he can also do tha... | Is it safe to load HTML and js via ajax? I'm using the Jquery load function $('#result').load('test.php'); to load a page into another page by clicking a tab. The page I'm loading contains javascript, php, and contains a form. Using the firebug console I saw that there is a GET for all my script sources in the page I'm... | TITLE:
Is it safe to load HTML and js via ajax?
QUESTION:
I'm using the Jquery load function $('#result').load('test.php'); to load a page into another page by clicking a tab. The page I'm loading contains javascript, php, and contains a form. Using the firebug console I saw that there is a GET for all my script sourc... | [
"javascript",
"ajax"
] | 5 | 7 | 433 | 3 | 0 | 2011-06-02T00:41:41.123000 | 2011-06-02T00:43:23.827000 |
6,209,304 | 6,209,316 | jQuery: binding a single event listener that can handle events of its children | I encountered a question to which I didn't know the solution for. Suppose I have this HTML markup (dynamically generated by the server or simply a static file): Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 1000 I want to bind a click event handler to the tag. Normally, I would write out $('.myList').find('a').click(f... | Check out delegate() — it's exactly what you're asking for. $('ul.mylist').delegate('a', 'click', function() { //... your code... }); You get all the benefits of a jQuery handler, without having to do the binding to all those elements. | jQuery: binding a single event listener that can handle events of its children I encountered a question to which I didn't know the solution for. Suppose I have this HTML markup (dynamically generated by the server or simply a static file): Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 1000 I want to bind a click event... | TITLE:
jQuery: binding a single event listener that can handle events of its children
QUESTION:
I encountered a question to which I didn't know the solution for. Suppose I have this HTML markup (dynamically generated by the server or simply a static file): Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 1000 I want to ... | [
"javascript",
"jquery",
"events",
"event-handling",
"event-bubbling"
] | 4 | 12 | 5,138 | 4 | 0 | 2011-06-02T00:44:54.230000 | 2011-06-02T00:47:03.187000 |
6,209,306 | 6,210,416 | Set HTTP Expires Header in DotNetNuke? | How can I set the the HTTP Expires header in DotNetNuke generated pages? | I have confirmed that this works on IIS 7 and DNN 5.6 Open IIS Manager Click on the DNN website Double Click HTTP Response Headers Click (upper right) Set Common Headers Check the Checkbox "Expire Web Content" Enter your desired TTL Press OK Verify with Firebug To verify that it is working: Open Firebug Net Tab Reload ... | Set HTTP Expires Header in DotNetNuke? How can I set the the HTTP Expires header in DotNetNuke generated pages? | TITLE:
Set HTTP Expires Header in DotNetNuke?
QUESTION:
How can I set the the HTTP Expires header in DotNetNuke generated pages?
ANSWER:
I have confirmed that this works on IIS 7 and DNN 5.6 Open IIS Manager Click on the DNN website Double Click HTTP Response Headers Click (upper right) Set Common Headers Check the C... | [
"caching",
"http-headers",
"dotnetnuke"
] | 3 | 4 | 2,317 | 1 | 0 | 2011-06-02T00:45:10.470000 | 2011-06-02T04:34:35.967000 |
6,209,318 | 6,224,248 | How do I include a custom JS (JQuery) file in a .tpl? | So I have an HTML page that I want to take apart and put into my website in a more developer friendly manner. I was using Iframes but now I decided to integrate it into my.tpl file. For the life of me I can't figure out how to include a custom js file in the.tpl The way other files are included is in a php file but thi... | So i managed to fix it, I used in the template file and in the php file I include the config and then under that $(document).ready(function(){}); | How do I include a custom JS (JQuery) file in a .tpl? So I have an HTML page that I want to take apart and put into my website in a more developer friendly manner. I was using Iframes but now I decided to integrate it into my.tpl file. For the life of me I can't figure out how to include a custom js file in the.tpl The... | TITLE:
How do I include a custom JS (JQuery) file in a .tpl?
QUESTION:
So I have an HTML page that I want to take apart and put into my website in a more developer friendly manner. I was using Iframes but now I decided to integrate it into my.tpl file. For the life of me I can't figure out how to include a custom js f... | [
"php",
"javascript",
"jquery",
"templates",
"task-parallel-library"
] | 1 | 1 | 3,670 | 3 | 0 | 2011-06-02T00:48:19.480000 | 2011-06-03T07:32:02.787000 |
6,209,327 | 6,209,354 | Installing Rails 3.1 | I'm trying to install Rails 3.1. It says to use 'gem install rails --pre' in the announcement blog post here: http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate When I try $ gem install rails --pre I get the error: ERROR: While executing gem... (NameError) uninitialized constant Syck::Syck What to do? | Regarding your specific problem: You may be seeing an error introduced by a faulty build of Rails 3.0.8.rc3 that got pushed as "rails --pre". See this issue in the Rails repository. Instead of gem install rails --pre for the newest version, use gem install rails -v ">=3.1.0rc" or for 3.1.0.rc1 specifically: gem install... | Installing Rails 3.1 I'm trying to install Rails 3.1. It says to use 'gem install rails --pre' in the announcement blog post here: http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate When I try $ gem install rails --pre I get the error: ERROR: While executing gem... (NameError) uninitialized constant Sy... | TITLE:
Installing Rails 3.1
QUESTION:
I'm trying to install Rails 3.1. It says to use 'gem install rails --pre' in the announcement blog post here: http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate When I try $ gem install rails --pre I get the error: ERROR: While executing gem... (NameError) uniniti... | [
"ruby-on-rails",
"ruby-on-rails-3",
"ruby-on-rails-3.1"
] | 5 | 10 | 4,050 | 3 | 0 | 2011-06-02T00:50:36.923000 | 2011-06-02T00:59:13.103000 |
6,209,329 | 6,209,342 | IETester Question | I have been using IETester for a little while now and although I have read that sometimes it can be buggy and not completely accurate (http://stackoverflow.com/questions/5612170/web-testing-for-ie-how-accurate-is-ietester) when I emulate IE6 it always seems to render the box model correctly (which IE6 obviously wouldn'... | I believe IE8 and IE9 don't even have an IE6 emulation mode (only IE7, I thought). But the best way to test for IE6, is to get a virtual machine up and running with IE6 installed. You could use IETester or one of the various stand-alone versions of IE6 to test it on your development PC (most things will work as expecte... | IETester Question I have been using IETester for a little while now and although I have read that sometimes it can be buggy and not completely accurate (http://stackoverflow.com/questions/5612170/web-testing-for-ie-how-accurate-is-ietester) when I emulate IE6 it always seems to render the box model correctly (which IE6... | TITLE:
IETester Question
QUESTION:
I have been using IETester for a little while now and although I have read that sometimes it can be buggy and not completely accurate (http://stackoverflow.com/questions/5612170/web-testing-for-ie-how-accurate-is-ietester) when I emulate IE6 it always seems to render the box model co... | [
"cross-browser",
"internet-explorer-6"
] | 0 | 1 | 490 | 1 | 0 | 2011-06-02T00:50:54.137000 | 2011-06-02T00:54:37.113000 |
6,209,334 | 6,209,355 | header file and standard library | I am new to programming. learning C as of now. I understand that header file only contains the declarations and function prototypes, not the functions themselves. Am I correct? I understand that Library is a single file that contains different object codes. Are these object codes necessarily written only in C language ... | I understand that header file only contains the declarations and function prototypes, not the functions themselves. Usually, yes (although you can theoretically put any code you want in a header file). Remember that a header file is usually just #include -d into a source file, and #include is basically equivalent to a ... | header file and standard library I am new to programming. learning C as of now. I understand that header file only contains the declarations and function prototypes, not the functions themselves. Am I correct? I understand that Library is a single file that contains different object codes. Are these object codes necess... | TITLE:
header file and standard library
QUESTION:
I am new to programming. learning C as of now. I understand that header file only contains the declarations and function prototypes, not the functions themselves. Am I correct? I understand that Library is a single file that contains different object codes. Are these o... | [
"c",
"header"
] | 4 | 9 | 563 | 3 | 0 | 2011-06-02T00:52:51.237000 | 2011-06-02T00:59:16.010000 |
6,209,344 | 6,215,207 | Local git repo creation | I have code base checked out from svn. ( code_base ). I want to create a local git repo from this code base and then use git branches to play with it. So, I am expecting a structure like follows: currently available code = c:/code_base git repo on same machine = c:/repo_head (Based on c:/code_base ) git clients from ne... | I've had surprising success initing and running a git repo right IN a svn working directory. So, I check out from SVN to a directory, cd into it, do git init, and very first thing put the string ".svn" into.gitignore. The way I'm working, git's master branch is in sync with SVN (via manual ups and cis). My teammates ar... | Local git repo creation I have code base checked out from svn. ( code_base ). I want to create a local git repo from this code base and then use git branches to play with it. So, I am expecting a structure like follows: currently available code = c:/code_base git repo on same machine = c:/repo_head (Based on c:/code_ba... | TITLE:
Local git repo creation
QUESTION:
I have code base checked out from svn. ( code_base ). I want to create a local git repo from this code base and then use git branches to play with it. So, I am expecting a structure like follows: currently available code = c:/code_base git repo on same machine = c:/repo_head (B... | [
"git",
"github",
"repository",
"git-svn"
] | 0 | 1 | 230 | 3 | 0 | 2011-06-02T00:55:06.793000 | 2011-06-02T13:31:29.293000 |
6,209,358 | 6,217,204 | websockets: do they shared the connection? | If I have requests for multiple resources, do they share the connection? So if I have these requests: ws://someserver.com/path/somedata1 ws://someserver.com/path/somedata2 ws://somsserver.com/anotherpath/someotherdata From what I've read so far, I would have to create 3 websockets to get the data from these urls. All t... | There is ongoing discussion in the working group about getting automatic muxing of websockets connections to the same server but there is no existing implementation with support for this so if you open three websockets connections you will get three TCP socket connections under the hood. However, if you control both th... | websockets: do they shared the connection? If I have requests for multiple resources, do they share the connection? So if I have these requests: ws://someserver.com/path/somedata1 ws://someserver.com/path/somedata2 ws://somsserver.com/anotherpath/someotherdata From what I've read so far, I would have to create 3 websoc... | TITLE:
websockets: do they shared the connection?
QUESTION:
If I have requests for multiple resources, do they share the connection? So if I have these requests: ws://someserver.com/path/somedata1 ws://someserver.com/path/somedata2 ws://somsserver.com/anotherpath/someotherdata From what I've read so far, I would have ... | [
"tcp",
"websocket"
] | 4 | 4 | 428 | 1 | 0 | 2011-06-02T00:59:35.293000 | 2011-06-02T16:15:01.120000 |
6,209,910 | 6,209,946 | Parse small string for name and email? | I have a string: John Smith I would like to get two variables: name (John Smith) and email (jsmith@gmail.com) How might I do that? Thanks for the help! | There are more forms of valid Internet Email address than you probably realize. I would suggest using somebody else's code to parse them, like email.utils.parseaddr. For example, the following is a valid address: "Rocky J. Squirrel" Here, the name is Rocky J. Squirrel, not "Rocky J. Squirrel". The following is also leg... | Parse small string for name and email? I have a string: John Smith I would like to get two variables: name (John Smith) and email (jsmith@gmail.com) How might I do that? Thanks for the help! | TITLE:
Parse small string for name and email?
QUESTION:
I have a string: John Smith I would like to get two variables: name (John Smith) and email (jsmith@gmail.com) How might I do that? Thanks for the help!
ANSWER:
There are more forms of valid Internet Email address than you probably realize. I would suggest using ... | [
"python",
"email"
] | 5 | 18 | 1,813 | 1 | 0 | 2011-06-02T02:53:00.150000 | 2011-06-02T03:02:10.433000 |
6,209,916 | 6,212,929 | Format Spring CommandObject variable on the front end | How do I format a value that is fetched from a command object on front end. Its an SSN value which comes from the DB without any "-" (Hyphens). How do I convert this? example: Convert 123456789 into 123-45-6789. Also the in the backing bean this field is an Int. | How about creating a custom property editor? Spring uses custom property editors to format special data, like SSN. An IntegerPropertyEditor looks like this: package com.pnt.common.propertyeditor;
import java.beans.PropertyEditorSupport; import com.pnt.util.number.NumUtils;
public class IntegerPropertyEditor extends P... | Format Spring CommandObject variable on the front end How do I format a value that is fetched from a command object on front end. Its an SSN value which comes from the DB without any "-" (Hyphens). How do I convert this? example: Convert 123456789 into 123-45-6789. Also the in the backing bean this field is an Int. | TITLE:
Format Spring CommandObject variable on the front end
QUESTION:
How do I format a value that is fetched from a command object on front end. Its an SSN value which comes from the DB without any "-" (Hyphens). How do I convert this? example: Convert 123456789 into 123-45-6789. Also the in the backing bean this fi... | [
"java",
"jsp",
"spring-mvc",
"jstl"
] | 0 | 0 | 309 | 2 | 0 | 2011-06-02T02:55:07.877000 | 2011-06-02T09:53:16.650000 |
6,209,918 | 6,209,969 | Artificial generation of cpu load in Java | Is there a simple way to generate a constant CPU load in Java? Like generate CPU load at 60%. | Have not tested this, but it might roughly work, to make your application work and sleep in the correct ratio. Something like (pseudocode): load = 60; do forever time = current_system_time_ms() + load while (current_system_time_ms() < time) // just consume some time for 60 ms end
SLEEP(100 - load); // sleep for 40 ms ... | Artificial generation of cpu load in Java Is there a simple way to generate a constant CPU load in Java? Like generate CPU load at 60%. | TITLE:
Artificial generation of cpu load in Java
QUESTION:
Is there a simple way to generate a constant CPU load in Java? Like generate CPU load at 60%.
ANSWER:
Have not tested this, but it might roughly work, to make your application work and sleep in the correct ratio. Something like (pseudocode): load = 60; do for... | [
"java",
"android",
"cpu-usage"
] | 3 | 2 | 3,184 | 3 | 0 | 2011-06-02T02:55:29.507000 | 2011-06-02T03:07:15.667000 |
6,209,929 | 6,209,956 | How to get permalinks on a non-Wordpress site | Hello guys I have some websites I'm currently building but I have a problem...I have pages such as blogPosts.php?postID=7 I would love something like blogPosts.com/post title Meaning I dont want people to see the variables I'm passing.. Same applies to a couple of other pages. I was told that permalinks is the key but ... | It sounds like you want to make "clean" URLs. You can do it using Apache configuration files and PHP. Here's an article which will tell you how. | How to get permalinks on a non-Wordpress site Hello guys I have some websites I'm currently building but I have a problem...I have pages such as blogPosts.php?postID=7 I would love something like blogPosts.com/post title Meaning I dont want people to see the variables I'm passing.. Same applies to a couple of other pag... | TITLE:
How to get permalinks on a non-Wordpress site
QUESTION:
Hello guys I have some websites I'm currently building but I have a problem...I have pages such as blogPosts.php?postID=7 I would love something like blogPosts.com/post title Meaning I dont want people to see the variables I'm passing.. Same applies to a c... | [
"php",
"apache",
"xampp",
"hyperlink",
"permalinks"
] | 3 | 2 | 268 | 2 | 0 | 2011-06-02T02:57:35.903000 | 2011-06-02T03:04:40.817000 |
6,209,934 | 6,210,858 | PL/SQL Oracle_home directory contents of listener.ora | I'm trying to write the contents of listener.ora to another file without hardcoding in the directory. Originally it worked when I specified the directory as: 'C:\app\OracleDB11g\product\11.2.0\dbhome_1\NETWORK\ADMIN' But I don't want to hard-code because this script will be used different machines/DBs. CREATE OR REPLAC... | CREATE OR REPLACE DIRECTORY LISTENERDIR AS '%ORACLE_HOME%/NETWORK/ADMIN/'; We cannot do this. We have to specify the absolute OS path when we create a directory object. That's why it worked when you used the full path. It's in the documentation. Find out more. If you really want to create the library dynamically you ca... | PL/SQL Oracle_home directory contents of listener.ora I'm trying to write the contents of listener.ora to another file without hardcoding in the directory. Originally it worked when I specified the directory as: 'C:\app\OracleDB11g\product\11.2.0\dbhome_1\NETWORK\ADMIN' But I don't want to hard-code because this script... | TITLE:
PL/SQL Oracle_home directory contents of listener.ora
QUESTION:
I'm trying to write the contents of listener.ora to another file without hardcoding in the directory. Originally it worked when I specified the directory as: 'C:\app\OracleDB11g\product\11.2.0\dbhome_1\NETWORK\ADMIN' But I don't want to hard-code b... | [
"oracle",
"file-io",
"plsql",
"oracle11g",
"home-directory"
] | 1 | 1 | 1,575 | 2 | 0 | 2011-06-02T02:59:56.767000 | 2011-06-02T05:38:12.690000 |
6,209,940 | 6,210,057 | C++ Cross Platform MP3 Decoder? | I have searched high and low, and cannot find any decent MP3 decoders =/ I need one that will compile under gcc/linux. The closest thing i could find was libmad, which has no documentation at all, and the only example I could find was the one on their home page, which is really complicated. Does anyone know where I can... | I have used MAD (MPEG Audio Decoder) in the past with great results, so I would not give up on it so quickly. MAD is specialy designed for good performance on CPUs without floating-point operations, which is desirable while developing applications for mobile devices for example. I would like to recommend you to take a ... | C++ Cross Platform MP3 Decoder? I have searched high and low, and cannot find any decent MP3 decoders =/ I need one that will compile under gcc/linux. The closest thing i could find was libmad, which has no documentation at all, and the only example I could find was the one on their home page, which is really complicat... | TITLE:
C++ Cross Platform MP3 Decoder?
QUESTION:
I have searched high and low, and cannot find any decent MP3 decoders =/ I need one that will compile under gcc/linux. The closest thing i could find was libmad, which has no documentation at all, and the only example I could find was the one on their home page, which i... | [
"c++",
"gcc",
"mp3",
"decoder"
] | 5 | 4 | 8,870 | 4 | 0 | 2011-06-02T03:01:40.930000 | 2011-06-02T03:28:17.090000 |
6,209,942 | 6,210,011 | Importing "0000" or "0030" into DataTable | I am importing values like 0000,0002,0023,0034 from a text file. However, the table shows them as 0, 2, 23, 34. Does anyone know why it is removing the leading zeros? Here is my code: private DataTable ImportTabFile() { string dataSourcePath = @"C:\Documents and Settings\agordon\Desktop"; string dataFileName = "ACTIVIT... | JET will infer types based on the first row. It is probably inferring your fields are INT because 0000 can be converted to a number. As mentioned above, leading zeroes are useless. You can use schema.ini to explicitly define the column types. As noted in the comments above, you need to specify each column as per the do... | Importing "0000" or "0030" into DataTable I am importing values like 0000,0002,0023,0034 from a text file. However, the table shows them as 0, 2, 23, 34. Does anyone know why it is removing the leading zeros? Here is my code: private DataTable ImportTabFile() { string dataSourcePath = @"C:\Documents and Settings\agordo... | TITLE:
Importing "0000" or "0030" into DataTable
QUESTION:
I am importing values like 0000,0002,0023,0034 from a text file. However, the table shows them as 0, 2, 23, 34. Does anyone know why it is removing the leading zeros? Here is my code: private DataTable ImportTabFile() { string dataSourcePath = @"C:\Documents a... | [
"c#",
".net"
] | 4 | 7 | 2,535 | 1 | 0 | 2011-06-02T03:01:52.237000 | 2011-06-02T03:19:53.607000 |
6,209,952 | 6,210,029 | jQuery Ajax Request without loading results | Hey all, i'm really new to ajax and all i want to do is call an ajax function that doesn't return anything. I've used $('#myDiv').load('/ajaxScript.asp'); and that loads the results to myDiv just fine. I just want to run the ajax without returning anything at all. Just run my code. How do i do this? Also, how do i dete... | Use the simple functions: jQuery.post("{url}", {parameters}, function(data, status){}, "text"); or jQuery.get("{url}", {parameters}, function(data, status){}, "text"); See http://api.jquery.com/jQuery.post/ or http://api.jquery.com/jQuery.get/. The function will get called when the request returns. | jQuery Ajax Request without loading results Hey all, i'm really new to ajax and all i want to do is call an ajax function that doesn't return anything. I've used $('#myDiv').load('/ajaxScript.asp'); and that loads the results to myDiv just fine. I just want to run the ajax without returning anything at all. Just run my... | TITLE:
jQuery Ajax Request without loading results
QUESTION:
Hey all, i'm really new to ajax and all i want to do is call an ajax function that doesn't return anything. I've used $('#myDiv').load('/ajaxScript.asp'); and that loads the results to myDiv just fine. I just want to run the ajax without returning anything a... | [
"jquery"
] | 1 | 2 | 2,802 | 2 | 0 | 2011-06-02T03:04:01.447000 | 2011-06-02T03:22:55.877000 |
6,209,972 | 6,210,010 | JQuery is not working because Mootools is already loaded in joomla | I tried to include the JQuery lib into joomla but it's not working. Many comps and modules use mootools inside my CMS. I think the problem is a conflict between the two frameworks. I have searched the internet and found some articles but the following code is still not working as expected. addScriptDeclaration($noConfl... | Reading your code, I see this: $noConflict="jQuery.noConflict();"; //$document->addScriptDeclaration($noConflict); $document->addScriptDeclaration("jQuery(document).ready(function($){jQuery('#example').dataTable();});"); JHTML::script('jquery.js',$base,true); $document->addScript($base,'jquery.js'); $document->addScrip... | JQuery is not working because Mootools is already loaded in joomla I tried to include the JQuery lib into joomla but it's not working. Many comps and modules use mootools inside my CMS. I think the problem is a conflict between the two frameworks. I have searched the internet and found some articles but the following c... | TITLE:
JQuery is not working because Mootools is already loaded in joomla
QUESTION:
I tried to include the JQuery lib into joomla but it's not working. Many comps and modules use mootools inside my CMS. I think the problem is a conflict between the two frameworks. I have searched the internet and found some articles b... | [
"javascript",
"jquery",
"mysql",
"frameworks",
"mootools"
] | 5 | 3 | 2,402 | 1 | 0 | 2011-06-02T03:08:37.510000 | 2011-06-02T03:19:45.047000 |
6,209,975 | 6,210,030 | How to save images in camera roll in iphone programmatically? | I am developing one application. In that I want to save my pictures in camera roll. So how to save my pictures in camera roll through code? | The most basic way (and the only way if you're targeting iOS before 4.0) is to use UIImageWriteToSavedPhotosAlbum. This lets you specify a selector to be called on a target object when the save is complete. In 4.0, you can use ALAssetsLibrary's writeImageToSavedPhotosAlbum:orientation:completionBlock: to write the imag... | How to save images in camera roll in iphone programmatically? I am developing one application. In that I want to save my pictures in camera roll. So how to save my pictures in camera roll through code? | TITLE:
How to save images in camera roll in iphone programmatically?
QUESTION:
I am developing one application. In that I want to save my pictures in camera roll. So how to save my pictures in camera roll through code?
ANSWER:
The most basic way (and the only way if you're targeting iOS before 4.0) is to use UIImageW... | [
"iphone",
"camera-roll"
] | 3 | 10 | 7,493 | 2 | 0 | 2011-06-02T03:09:04.403000 | 2011-06-02T03:23:33.760000 |
6,209,985 | 6,210,001 | iPhone4 - Call default browser with and redirect to a designated url | Like this question, I would like to write an app for iPhone4 to call default browser with and redirect to a designated url, could someone please suggest the code for this action? | Use the -[UIApplication openURL:] method, which is accessed through the sharedApplication method of UIApplication. [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.google.com"]]; | iPhone4 - Call default browser with and redirect to a designated url Like this question, I would like to write an app for iPhone4 to call default browser with and redirect to a designated url, could someone please suggest the code for this action? | TITLE:
iPhone4 - Call default browser with and redirect to a designated url
QUESTION:
Like this question, I would like to write an app for iPhone4 to call default browser with and redirect to a designated url, could someone please suggest the code for this action?
ANSWER:
Use the -[UIApplication openURL:] method, whi... | [
"iphone"
] | 0 | 0 | 191 | 1 | 0 | 2011-06-02T03:12:55.587000 | 2011-06-02T03:17:15.760000 |
6,209,987 | 6,210,021 | sharing private methods across controllers | Hey guys, I have two controllers, X and Y: In X, I have a:before_filter for a private method, foo. I also have the following statement at the top of controller X. helper_method:foo In controller Y, I have a:before_filter for a private method, bar. In bar, I call foo. But apparently this is not allowed as I get an undef... | If you need foo in multiple controllers then you should put it in your base application controller as a protected method. That will give you access to it where you need it while keeping it out of the public interface. Alternatively, you could put foo in a module and include it as needed. Which approach you take depends... | sharing private methods across controllers Hey guys, I have two controllers, X and Y: In X, I have a:before_filter for a private method, foo. I also have the following statement at the top of controller X. helper_method:foo In controller Y, I have a:before_filter for a private method, bar. In bar, I call foo. But appar... | TITLE:
sharing private methods across controllers
QUESTION:
Hey guys, I have two controllers, X and Y: In X, I have a:before_filter for a private method, foo. I also have the following statement at the top of controller X. helper_method:foo In controller Y, I have a:before_filter for a private method, bar. In bar, I c... | [
"ruby-on-rails",
"controller",
"helpermethods"
] | 1 | 2 | 712 | 1 | 0 | 2011-06-02T03:13:17.790000 | 2011-06-02T03:21:28.117000 |
6,209,990 | 6,210,002 | populating map globally | I have declared the following map globally and trying to populate globally. 1: typedef std::map > DeviceTypeList; 2: DeviceTypeList g_DeviceTypeList; 3: g_DeviceTypeList.insert( std::make_pair ((unsigned short)SINGLE_CELL_CAMERA, std::make_pair('B',"Single Cell Camera"))); it is showing error like error C2143: syntax e... | Compiler is probably getting confused by the >> on line 1 (because it looks like a shift operator). Try inserting a space in there: typedef std::map > DeviceTypeList; [update] See Vlad Lazarenko's comment for why this will not actually solve your problem. Easiest fix is to wrap this contraption in an object, initialize... | populating map globally I have declared the following map globally and trying to populate globally. 1: typedef std::map > DeviceTypeList; 2: DeviceTypeList g_DeviceTypeList; 3: g_DeviceTypeList.insert( std::make_pair ((unsigned short)SINGLE_CELL_CAMERA, std::make_pair('B',"Single Cell Camera"))); it is showing error li... | TITLE:
populating map globally
QUESTION:
I have declared the following map globally and trying to populate globally. 1: typedef std::map > DeviceTypeList; 2: DeviceTypeList g_DeviceTypeList; 3: g_DeviceTypeList.insert( std::make_pair ((unsigned short)SINGLE_CELL_CAMERA, std::make_pair('B',"Single Cell Camera"))); it i... | [
"c++",
"stl",
"initialization",
"global-variables",
"static-initializer"
] | 1 | 4 | 3,184 | 2 | 0 | 2011-06-02T03:13:53.873000 | 2011-06-02T03:17:27.403000 |
6,209,998 | 6,212,882 | Allow others to view repo w/o being added as collaborators | Is there a way to allow others to view a private repo on GitHub without adding them as collaborators? | You can do this through Organisations, this way it's in read only. Resources: Github - Read-only access to private repo | Allow others to view repo w/o being added as collaborators Is there a way to allow others to view a private repo on GitHub without adding them as collaborators? | TITLE:
Allow others to view repo w/o being added as collaborators
QUESTION:
Is there a way to allow others to view a private repo on GitHub without adding them as collaborators?
ANSWER:
You can do this through Organisations, this way it's in read only. Resources: Github - Read-only access to private repo | [
"git",
"github"
] | 1 | 2 | 83 | 2 | 0 | 2011-06-02T03:16:53.077000 | 2011-06-02T09:49:03.577000 |
6,210,013 | 6,210,104 | Unable to identify some C# syntax for translation to VB.NET | I'm translating some example code line by line from C# to VB.NET. The lines which confuse me looks like this: [Kernel(CustomFallbackMethod = "AddCpu")] I see in the code that these lines appear just before the method declaration: private static void What kind of line appears before a method declaration? Or is it a cont... | It's an Attribute. It's a way to mark up code that can be used at runtime or compile time. I would google VB.NET and Attributes. You can read some passages here on O'Reilly Your example would be converted to: Be sure to use _ if you decide to put it on the line before your method. | Unable to identify some C# syntax for translation to VB.NET I'm translating some example code line by line from C# to VB.NET. The lines which confuse me looks like this: [Kernel(CustomFallbackMethod = "AddCpu")] I see in the code that these lines appear just before the method declaration: private static void What kind ... | TITLE:
Unable to identify some C# syntax for translation to VB.NET
QUESTION:
I'm translating some example code line by line from C# to VB.NET. The lines which confuse me looks like this: [Kernel(CustomFallbackMethod = "AddCpu")] I see in the code that these lines appear just before the method declaration: private stat... | [
"c#",
"vb.net",
"porting",
"code-translation"
] | 3 | 4 | 295 | 1 | 0 | 2011-06-02T03:20:11.663000 | 2011-06-02T03:39:04.417000 |
6,210,017 | 6,210,440 | How do I bypass undefined JavaScript errors when doing a web scrape with a HttpWebRequest | I am trying to do a HttpWebRequest to scrape a login page's HTML and post data to that web page's username and password controls to 'auto logon' the client essentially. The problem I am running into, is the URI I am using when parsed has JavaScript within and a XML.config file that is not getting downloaded and only av... | It sounds like you have logged your webserver in to your client's account and are expecting to serve your client with html from that server. That probably won't work. Security, session tokens that the webserver has and not the user, relative urls in the scraped html (like your problem with the xml). You could serve up ... | How do I bypass undefined JavaScript errors when doing a web scrape with a HttpWebRequest I am trying to do a HttpWebRequest to scrape a login page's HTML and post data to that web page's username and password controls to 'auto logon' the client essentially. The problem I am running into, is the URI I am using when par... | TITLE:
How do I bypass undefined JavaScript errors when doing a web scrape with a HttpWebRequest
QUESTION:
I am trying to do a HttpWebRequest to scrape a login page's HTML and post data to that web page's username and password controls to 'auto logon' the client essentially. The problem I am running into, is the URI I... | [
"javascript",
".net",
"asp.net"
] | 0 | 1 | 421 | 2 | 0 | 2011-06-02T03:20:44.870000 | 2011-06-02T04:38:47.063000 |
6,210,023 | 6,210,370 | Where does Netbeans 7 store FTP passwords | I want to copy all my netbeans ftp details over to my friend's PC. I found th most of what i needed here: C:\Users\Jason Fonseca\.netbeans\7.0\config\Preferences\org\netbeans\modules\php\project\RemoteConnections But I can't seem to find any passwords associated with that file. Any ideas? Thanks. | Try: ~\.netbeans\7.0\config\Preferences\org\netbeans\modules\keyring\win32.properties It will most likely be encrypted though. Edit: Looking at http://bits.nbextras.org/netbeans/trunk/javadoc/org-netbeans-modules-keyring/org/netbeans/api/keyring/package-summary.html It seems that the encryption is tied to your user acc... | Where does Netbeans 7 store FTP passwords I want to copy all my netbeans ftp details over to my friend's PC. I found th most of what i needed here: C:\Users\Jason Fonseca\.netbeans\7.0\config\Preferences\org\netbeans\modules\php\project\RemoteConnections But I can't seem to find any passwords associated with that file.... | TITLE:
Where does Netbeans 7 store FTP passwords
QUESTION:
I want to copy all my netbeans ftp details over to my friend's PC. I found th most of what i needed here: C:\Users\Jason Fonseca\.netbeans\7.0\config\Preferences\org\netbeans\modules\php\project\RemoteConnections But I can't seem to find any passwords associat... | [
"php",
"netbeans"
] | 5 | 8 | 7,364 | 5 | 0 | 2011-06-02T03:21:32.973000 | 2011-06-02T04:28:26.567000 |
6,210,027 | 6,210,055 | Calling stored procedure with return value | I am trying to call a stored procedure from my C# windows application. The stored procedure is running on a local instance of SQL Server 2008. I am able to call the stored procedure but I am not able to retrieve the value back from the stored procedure. This stored procedure is supposed to return the next number in the... | You need to add a ReturnValue -direction parameter to the command: using (SqlConnection conn = new SqlConnection(getConnectionString())) using (SqlCommand cmd = conn.CreateCommand()) { cmd.CommandText = parameterStatement.getQuery(); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("SeqName", ... | Calling stored procedure with return value I am trying to call a stored procedure from my C# windows application. The stored procedure is running on a local instance of SQL Server 2008. I am able to call the stored procedure but I am not able to retrieve the value back from the stored procedure. This stored procedure i... | TITLE:
Calling stored procedure with return value
QUESTION:
I am trying to call a stored procedure from my C# windows application. The stored procedure is running on a local instance of SQL Server 2008. I am able to call the stored procedure but I am not able to retrieve the value back from the stored procedure. This ... | [
"c#",
"sql-server",
"stored-procedures",
"ado.net",
"return-value"
] | 97 | 197 | 324,259 | 9 | 0 | 2011-06-02T03:22:12.063000 | 2011-06-02T03:27:48.073000 |
6,210,028 | 6,210,034 | objective c leaking NSNumber being retained | My application uses GPS and assigns an NSNumber instance variable every time the GPS is updated and in my last bit of testing before release, I've discovered that it leaks a lot. I'm fairly certain I know which lines are contributing to the leak, but I can't figure how to solve it. latitude = [[NSNumber numberWithFloat... | Before setting it, you must release the previously retained value. Otherwise, when you assign the new pointer, the previous object which is released has nothing referencing it and it can never be released. To do this easily, I recommend setting it as a @property and using self.latitude = [NSNumber numberWithFloat:[[coo... | objective c leaking NSNumber being retained My application uses GPS and assigns an NSNumber instance variable every time the GPS is updated and in my last bit of testing before release, I've discovered that it leaks a lot. I'm fairly certain I know which lines are contributing to the leak, but I can't figure how to sol... | TITLE:
objective c leaking NSNumber being retained
QUESTION:
My application uses GPS and assigns an NSNumber instance variable every time the GPS is updated and in my last bit of testing before release, I've discovered that it leaks a lot. I'm fairly certain I know which lines are contributing to the leak, but I can't... | [
"objective-c",
"memory",
"memory-leaks",
"retain",
"nsnumber"
] | 0 | 3 | 261 | 2 | 0 | 2011-06-02T03:22:22.597000 | 2011-06-02T03:23:53.343000 |
6,210,032 | 6,210,150 | Why doesn't this work (wxpython/color dialog) | class iFrame(wx.Frame): def __init__(blah blah blah): wx.Frame.__init.__(blah blah blah)
self.panel = wx.Panel(self, -1) self.panel.SetBackgroundColour((I put a random RGB here for test purposes))
c_color = wx.Button(self.panel, -1, 'Press To Change Color') c_color.Bind(wx.EVT_BUTTON, self.OnCC)
def OnCC(self, evt):... | The line dlg = wx.ColourDialog().SetChooseFull(1) seems like a bug -- isn't SetChooseFull a method on wx.ColourData? I made a few changes to get it working and commented the code to illustrate: def OnCC(self, evt): data = wx.ColourData() data.SetChooseFull(True)
# set the first custom color (index 0) data.SetCustomCol... | Why doesn't this work (wxpython/color dialog) class iFrame(wx.Frame): def __init__(blah blah blah): wx.Frame.__init.__(blah blah blah)
self.panel = wx.Panel(self, -1) self.panel.SetBackgroundColour((I put a random RGB here for test purposes))
c_color = wx.Button(self.panel, -1, 'Press To Change Color') c_color.Bind(w... | TITLE:
Why doesn't this work (wxpython/color dialog)
QUESTION:
class iFrame(wx.Frame): def __init__(blah blah blah): wx.Frame.__init.__(blah blah blah)
self.panel = wx.Panel(self, -1) self.panel.SetBackgroundColour((I put a random RGB here for test purposes))
c_color = wx.Button(self.panel, -1, 'Press To Change Colo... | [
"python",
"wxpython",
"colordialog"
] | 2 | 3 | 1,672 | 1 | 0 | 2011-06-02T03:23:50.330000 | 2011-06-02T03:49:36.527000 |
6,210,042 | 6,237,508 | Problem with MouseMove event, launched when the content of control beneath is moved with arrow keys | My UserControl is a kind of a container that has a set of controls inside. One of the UI behaviours I designed is that the move over nested control makes it selected for some keyboard triggered actions. The other way of setting up the nested control that is targeted to receive keyboard input is with arrow keys that cha... | I did some debugging/experiments and it appears that though mouse stays still over controll the MouseMove is actually called frequently and not only when control move is caused by some UI behaviour (scrolling of parent controll called using keyboard). It also seems like it is called twice every single second (but proba... | Problem with MouseMove event, launched when the content of control beneath is moved with arrow keys My UserControl is a kind of a container that has a set of controls inside. One of the UI behaviours I designed is that the move over nested control makes it selected for some keyboard triggered actions. The other way of ... | TITLE:
Problem with MouseMove event, launched when the content of control beneath is moved with arrow keys
QUESTION:
My UserControl is a kind of a container that has a set of controls inside. One of the UI behaviours I designed is that the move over nested control makes it selected for some keyboard triggered actions.... | [
"c#",
".net",
"winforms",
"events",
"mouse"
] | 0 | 0 | 2,422 | 1 | 0 | 2011-06-02T03:25:30.227000 | 2011-06-04T15:10:40.547000 |
6,210,045 | 6,211,918 | Bullet-proof groovy script embedding | I'm working on a server app that may be extended by user-supplied Groovy scripts. It's evident that I want to make sure these scripts run in a very tight sandbox where they cannot disrupt the core application code or consume too much resources to overload the server. I have studied various possibilities and the final s... | An additional possibility is using Groovy 1.8 compilation customizers on the GroovyShell that runs the embedded scripts. You can pre-import classes and methods, restrict use of the Groovy AST, and pre-apply an AST transformation, such as @ThreadInterrupt, @TimedInterrupt, or @ConditionalInterrupt. Details at: http://ww... | Bullet-proof groovy script embedding I'm working on a server app that may be extended by user-supplied Groovy scripts. It's evident that I want to make sure these scripts run in a very tight sandbox where they cannot disrupt the core application code or consume too much resources to overload the server. I have studied ... | TITLE:
Bullet-proof groovy script embedding
QUESTION:
I'm working on a server app that may be extended by user-supplied Groovy scripts. It's evident that I want to make sure these scripts run in a very tight sandbox where they cannot disrupt the core application code or consume too much resources to overload the serve... | [
"java",
"security",
"groovy",
"embedding"
] | 13 | 10 | 3,439 | 3 | 0 | 2011-06-02T03:26:06.360000 | 2011-06-02T07:57:02.273000 |
6,210,054 | 6,210,128 | trying to create a div below a div css | I realize this is a a pretty basic question, and perhaps I'm taking advantage of you all while I should be sifting through some dense css books/materials. But I can't figure out why my code doesn't work. I'm trying to create two divs on a page, one below the other and it seems like I should be able to give the lower an... | Take out the ID s on the div s and/or add the class.same and then switch the #lasteventimg styles to.same. Remove the #2 styles. Fiddle: http://jsfiddle.net/7YueC/7/ | trying to create a div below a div css I realize this is a a pretty basic question, and perhaps I'm taking advantage of you all while I should be sifting through some dense css books/materials. But I can't figure out why my code doesn't work. I'm trying to create two divs on a page, one below the other and it seems lik... | TITLE:
trying to create a div below a div css
QUESTION:
I realize this is a a pretty basic question, and perhaps I'm taking advantage of you all while I should be sifting through some dense css books/materials. But I can't figure out why my code doesn't work. I'm trying to create two divs on a page, one below the othe... | [
"css",
"positioning"
] | 3 | 2 | 1,394 | 4 | 0 | 2011-06-02T03:27:44.107000 | 2011-06-02T03:43:27.307000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.