text
stringlengths
8
267k
meta
dict
Q: Get value from listbox item I'm trying to get just the value from all items in a listbox using c# (winforms). I have a combobox with multiple items, this are filled from datasource and whem I commit a selection in the combo I want this values to be stored in the listbox. IQueryable clientes = getcompanies(); combo1....
{ "language": "en", "url": "https://stackoverflow.com/questions/7590369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: boost property tree, iterators to an element for inserting? I've searched a lot through the boost manual, and the internet, as I believe it is quite a standard feature? Well I'm looking into "merging" property trees. - I noticed the function insert, and I hope I can merge trees with this? Below is the line which I a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get the latest 5 objects from 2 level deep I have 3 models class Category(models.Model): name = models.CharField(unique=True, max_length=150) ... class Group(models.Model): name = models.CharField(unique=True, max_length=150) category = models.ForeignKey(Category) ... class Item(models.Model): ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to prevent multiboxing in flash game? I have multiplayer flash game (AS3) and I would like to prevent multiboxing, e.g. prevent user running two (or more) instances of my game at one computer. Is there simple and reliable way how to do that? I don't want to filter them based on IP address. I tried to use LocalCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get error while I'm creating a library on Codeigniter I created this library: class Header { function __construct() { $this->user(); } function user() { $my_user = $this->session->userdata('my_user'); // True or False if($my_user) { echo 'user!'; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Error deleting from Azure Cloud Table - ResourceNotFound I'm having an intermittent problem deleting objects from an azure table. It only affects about 1% of my attempts, and if the same call is made again later then it works fine, but I'd love to find out the reason behind it! I've googled my fingers off and I've f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to cache some read only xml files in java I have some xml files that will be read-only that I need to access on a random basis. They are xml files that contain user data I need to merge with rtf documents. There will probably be less than 10 files, but more than 5. As I loop through a list of documents I wil...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: copy subset of rows from one table to another, filtering on two columns I have the following MySql table containing my raw event data (about 1.5 million rows) userId | pathId | other stuff.... I have an index on userId, pathId (approx 50,000 unique combinations) During my processing, I identify 30,000 userId, pat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: HTML: How to make mid-row text line up the same as other rows like "tabs" I am trying to build an HTML signature file and want the phone numbers and such to line up. Phone: (234) 567-8910 Cell:     (234) 567-8910 Fax:     (234) 567-8910 Email:  mike@example.com I can do different sized margins or number of  ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Adding to strip menu at run time OK I have a list of strings (file names in fact), that i want to create a file menu dynamical form. So taking my list of file names, first code strips of the directory string and file sufix (for bonus question how can I wrap the two remove lines up in to one ?) List<string> test_ =...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PreLoading in asp.net i really want to how preloading works in asp.net? for example when click on a button , an animated gif appears and after some seconds a panel or div appears! (like in many places in facebook) how can i do that in asp.net? (is jquery necessary for doing this job? if yes, which plugins?) A: Fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CakePHP combining Recursive and Group I have recursive set to Two on my find query, this is great and returns all the results i want, but i need to group by Day on the results that are Teo levels deep in the recursive query. This is what i have: Project->Track->Lapse. But i need to group by Day on the Track results,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get image URL from avatar I need to get an image url from the following page: http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/428510f3-ce59-4c97-9981-75fdc3291d97 Image source is base64 string (bytes of images) Is it possible to get it from code like this: <img src="data:image/jpg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to mimic UINavigation animation behavior when transitioning between two UITableViews I have a UIViewController that houses two UITableViews and swaps between the two. I'm wondering how can I implement the exact same animation behavior that a UINavigationController does when transitioning between these two UITabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Selecting a single row for each distinct combination in Oracle Please consider this table: firstName | lastName | hobby ----------------------------- Mike | Stone | music Sarah | James | cooking Mike | Stone | jogging Greg | Jones | reading Sarah | James | music Mike ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SVN Batch Rename Whitespace Issue I'm trying to batch rename some files in svn. I have an issue where some files have a space in them. when I try to run I get this error: svn: Cannot copy path '00009.png' into its own child '00009.png' my code is: import subprocess.call call("svn rename " + "test 00009.png" + " ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Realtime Streaming per User via some Comet Server I need to design a Streaming API where each connected user might have different data per category. Lets say two users are interested in sport(category) rss feeds from the streaming api but each user has its own filtering mechanism on the server which results in diffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Orbeon Form Builder - Referring to a control within a Section Template I have a number of forms that all reference a 'Header' Section Template. I would like to reference a control in this section template from another control in the form. (Using the method shown here: Write constraint to validate a field based on th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: BarCode reader component for Silverlight/.net, resources, recommendations, animal crossing? oh my I'm looking for a barcode reader component. Hoping to use it in a Silverlight Out of browser Application. Eventually be ported for usage in windows 8. Hoping to supliment physical bar code readers. Possibly reading o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: QCheckBox Indicator, SVG Image Is it possible to prevent a QCheckBox indicator within a QGraphicsView from becoming pixelated when scaling the graphics view? I have tried using a SVG image by setting the CheckBox's style sheet but that hasn't resolved the issue. A: I'm assuming you're using a QGraphicsWidget. I b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: time data with irregular intervals in HighChart I have a time data with irregular intervals like the following : data: [ [Date.UTC(1970, 10, 27), 12 ], [Date.UTC(1970, 10, 29), 8 ] ] in this example the time different is shown as complete to the flow, what i really want is to have the dif...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: StateMachine in WF4 First a disclaimer - I am new to WF and I've beel playing with WF4 only for 3 days - so apologies on any benign or lame questions I may have... I am trying to implement WF4 State Machine in my project. Here is some background info: * *I have WinForm UI as a main app that can generate different...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Temporarily saving textarea value I am trying to create a comment form like a page I know has. You fill in a comment, select a network to log into, you go to the login page, and when it redirects you back, your textarea value is still filled in what you had. Everything is done, except for storing the value, because ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Set File Permissions in C# I wanna set the permissions on a file to "can not be deleted" in C#, only readable. But I don't know how to do this. Can you help me ? A: Take a look at File.SetAttributes(). There are lots of examples online about how to use it. Taken from that MSDN page: FileAttributes attributes = Fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: accepts_nested_attributes_for undefined method error I'm trying to use accepts_nested_attributes to create a complex form. Based on the Nested Attributes documentation, examples, etc., I've set up the models like so: User model: require 'digest' class User < ActiveRecord::Base attr_accessor :password attr_access...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Working on dotted line span and I can't figure out how to make it same line dl { width: 480px; } dt { float: left; clear: right; width: 100%; background: url(http://galeon.sourceforge.net/twiki/pub/TWiki/TWikiDocGraphics/dot_lr.gif) repeat-x 0 180%; } dt span { backg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: AppWidget in Accounts & Sync not getting updated I've successfully gotten an AppWidget working on the home screen, which properly updates in response to pushes from a running background service. I'm thinking this proves my overall logic and creation of AppWidgets. I also have my sync adapter working correctly and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Relationship between view and model in Backbone.js In Backbone.js, how does a view know what model it represents? Is it necessary for the view to be named Model_NameView? Because I can't find any other View property or function for setting the model (like collection has the model property, to define what models this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I Encrypt/Decrypt using GnuPG/GPG4Win from a website? I am attempting to encrypt/decrypt user names to pass between two different websites using gpg4win 2.1.0. I can get my code to work on my development machine, but not in production. I'm developing the application with VS 2008. I have run the GPG4Win instal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PostgreSQL regexp with case-insensitive parts Using PostgreSQL v.8.2.14, I'm trying to build a regexp with several branches, some of which are case-insensitive, the others not. Consider the following perl one-liner: % echo 'foo Foo bar Bar' | perl -pe 's/(foo|(?i:bar))/_\1/g' _foo Foo _bar _Bar I thought I would ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Confused about salting (Cryptography)? I'm a newb at this so this question is prob really easy. I just don't quite understand salting. Without salting and with sha1 you can hash a password to be sha1('password') and to verify a user you just compare sha1_stored ==? sha1(user_input). With salting and sha1 you hash t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Having a dependency on a specific nuget package We have a bunch of internal packages that we create for other teams to consume, and many of these have dependencies on open sources packages. I would like to add a dependency to a specific version of a nuget package to my nuspec, such that when the end user installs my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why does increasing timer resolution via timeBeginPeriod impact power consumption? I am currently writing an application in C# where I need to fire a timer approx. every 5 milliseconds. From some research it appears the best way to do this involves p/invoking timeBeginPeriod(...) to change the resolution of the sys...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: ASP.NET Authentication Issues on IIS7 - User.Identity.Name is empty for Windows authentication We have an ASP.NET application on ASP.NET 4.0 using MVC 3 which uses Windows authentication. When run from Visual Studio 2010 everything works as expected but when rolled out to IIS7 the Windows logged in user never gets p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: how to load specific attributes from two table to another? I am trying to load attributes from two tables to one table. I have a Location table: Id City State Country =============================== 1 New York New York USA 2 Portland Oregon USA 3 Tokyo Honshu Japan And a User table:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Issue with Warble JAR not running correctly on Tomcat 6, runs fine on Webrick I am somewhat new to Jruby - up to this point I have had no problem using warble and building a war for my Jruby. Now when I try to deploy the created war I see this error in the logs and I am not sure 100% how to fix. Please help. Error...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Dividing selected elements of array on Matlab I have the following array a = [ 1 10 3 4 68 2 34 8 10 ] And I need to divide each number (/2) if this number is higher than 9. This means that 1 has not to be divided, and 10 has to be divided (/2) The resulting array should be: a = [ 1 5 3 4 34 2 17 8 5 ] I have to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java arrays and foreach iteration implementation Is there some interface that will allow for iteraction of arrays and java.util.Lists? Seeing as how the for-each loop can iterate both it seems to me there must be some sort of base 'iterable' that is being traversed in both cases. So, can i setup a method parameter t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Method to dump classes on the classpath from inside JVM? My code is failing with a ClassNotFoundException. I can see that the jar file containing the class is definitely on the classpath from the command prompt execution. Is there a way to dump the list of classes on the classpath from the JVM? (Ideally some Java ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why is the Facebook API returning an empty array for albums? I'm fairly new to the Facebook API, but I've tried to do my due diligence to figure this out, but I can't seem to. I'm simply trying to get a list of the logged-in user's albums, using various techniques, to no avail. I'm using the JavaScript SDK, and I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make contributions to JUNIT open source How can one make contributions to JUnit or any other open source java framework in general? I am a entry level programmer and any suggestions are welcome. A: JUnit is hosted at github, like many other projects. So you can clone the source, make a change, commit it, pus...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to force particular registers in inline assembly code? I have the following assembly code: __asm__ __volatile__ ( "1: subi %0, 1" "\n\t" "brne 1b" : "=d" (__count) : "M" (__count)); which results in the following compiler ouptut ce: 81 50 subi r24, 0x01 ; 1 d0: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Grails controller, Command Object explotion In Grails controller actions, for validations, We use command objects. The problem is the number of CommandObject classes have exploded. def publish = { PublishCommand command -> if (command.hasErrors()) { return redirect(action: 'errors',params:param...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: value in form dependent on URL schema.yml: Shop: title: { type: string(50) } number: { type: integer(2) } i can set default value for number in ShopForm.class or method save. but how can i make it with address URL? http://www.myaddress.com/shop/new in action.class.php (Shop.class.php) public function executeNew...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to use facebook connect in local host Each developer is running IIS on his own machine. We all sit in separate physical location. One developer develops the code using: http://localhost:8054/connectToFacebook.aspx another developer develops the code using: http://localhost:80/virtualDirectory/connectToFacebook....
{ "language": "en", "url": "https://stackoverflow.com/questions/7590509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Find all subfolders of the Inbox folder using EWS I have the following Inbox folder structure: Inbox --ABC ----ABC 2 ----ABC 3 --XYZ ----XYZ 2 --123 ----123 A ----123 B ----123 C I am using Exchange Web Services and the following code to find the child folders of the Inbox folder: ExchangeService service = new Exch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PHP Fatal error: Using $this when not in object context for script I've got problem: I have a script that I'm working with and just upgraded to PHP 5.3. In my kit_parser.php I'm getting the following fatal error: Fatal error: Using $this when not in object context in /home/sitename/public_html/secure/includes/hooks/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Tools for automatic deployment of JavaScript, CSS and HTML? I am looking for a solution to automate my project workflow a bit. Let's say I have the following folder structure: project ---- less -------- project.less ---- css -------- project.min.css ---- js -------- project.js -------- project.min.js ---- index.html...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Xpath/XSLT : check if following sibling is a particular node I have seen questions where following-sibling has been applied based on a node's value but my issue is related to the actual node itself. This is the type of XML I have have: <Employee> <Summary> <A> <B> </Summary> <Elections> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: PHP Pipe into a background process I'm trying to use popen to run a php script in the background. However, I need to pass a (fairly large) serialized object. $cmd = "php background_test.php >log/output.log &"; $fh = popen($cmd, 'w'); fwrite($fh, $data); fclose($fh); //pclose($fh); Without the ampersand this code e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: one complex business XML to Object deserialize in Silverlight to rule them all I have been now searching for some time tutorials and posts how to deserialize a complex XML Document to objects and use it in an silverlight application. I have seen a lot of tutorials and posts from 2008, 2009 and many which clearly do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IE ignores styles for dynamically loaded content I've seen a couple similar questions here with no real answers. Hopefully someone notices this... IE 8 and below are refusing to apply styles from the css stylesheet defined in the header when they are loaded in a document.ready jquery call. Paranoid client wants NOBO...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Rookie mysql join question I have: * *a coupons table with a column called owner_id and id *and an owners table with a column called id and website_url. I'd like to get owners.website_url using only coupons.id (which is provided in a php variable $coupon_id. Here's my best shot: SELECT owners.website_url FRO...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to deploy flex app using different web service urls? Is there some sort of configuration settings in FlashBuilder 4.5 where you can easily switch between webservice urls? Right now I have to delete and recreate the web service every time I switch from local to production and vice versa. A: The need/requirement ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: removing space from cell in an html table I have an html table as <table width="600" cellspacing="0" cellpadding="0"> <tr> <td><img src="image.jpg" width="600" height="170" style="padding:0; margin:0;"></td> </tr> <tr> <td> <p style="padding:0; margin:0;">Text</p> </td> </tr> </table> Inspite of specifying th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Magic: The Gathering database design I would like to create a database for MTG cards I own. What would the design be? I would like to store the following information about each card: 1. Name of card. 2. Set the card belongs to. 3. Condition of card. 4. Price it sold for. 5. Price I bought it for. Here is a little ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Android : AsyncTask, how can update ProgressDialog increment I want to parse a webpage and visual a progressdialog style horizontal and increment it byte to byte, it's possibile ? A: Try something like this, Create a ProgressDialog. ProgressDialog mProgressDialog = new ProgressDialog(Your_Activity.this); mProgressD...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Simple, hassle-free, zero-boilerplate serialization in Scala/Java similar to Python's Pickle? Is there a simple, hassle-free approach to serialization in Scala/Java that's similar to Python's pickle? Pickle is a dead-simple solution that's reasonably efficient in space and time (i.e. not abysmal) but doesn't care a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Is it possible to call an undefined variable without getting an "undefined variable" message? I'm trying to make a simple little templating system where I don't want to define every variable that's available in the template. For example. Every page would have <?php displayHTML($variable); ?> but only some pages w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: handling a callback with ctypes I'm attempting to map libpcap using ctypes to python3.2 and I'm having a problem using callbacks with pcap_loop... here is the code .. class c_int_hack: def from_param(self, *args): return ctypes.c_void_p #void got_packet(u_char *args, const struct pcap_pkthdr *header, # co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: authorisation with Spring Security Grails plugin Background I'm using the Spring Security Grails plugin. Because my User and Role classes are not GORM objects, I I've replaced the UserDetailsService provided by the plugin with my own implementation: class CustomUserDetailsService implements UserDetailsService { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CMFCPropertyGridCtrl last item not drawn? I have a CMFCPropertyGridCtrl that I'm using in an options dialog box. I have a method in my options dialog class called InitPropertyGrid(). This method clears any properties and populates the CMFCPropertyGrid objects (using a custom Settings object for the property values...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Check that a string exists within another string with regular expression I've got a regular expression that I am using to strip an extension from another string The extensions in this example are BK|BZ|113 If the string does not contain any of the extensions, then I need it to leave the string as is. The regular...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MVC 3 custom DataAnnotation: associate error message with particular property I've defined a custom DataAnnotation attribute similar to this one that goes on the class but ensures that at least one property is populated. It works correctly and adds an error message to the model's ValidationSummary. However, I want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP Group By Day Given this array: array(1) { [0]=> array(2) { ["Project"]=> array(5) { ["id"]=> string(1) "2" ["user_id"]=> string(2) "21" ["customer_id"]=> string(1) "4" ["name"]=> string(15) "WordPress Theme" ["created"]=> string(19) "201...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use a relative image source in WPF using IronPython I'm creating a WPF project using Python Tools for Visual Studio (in VS 2010). I add an Image control to the form. I click the "..." in the Image's Source property, and find an image. This adds an "Images" folder to the project (both in the filesystem and i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Suggestions for lazy loading images plugin for jQuery I'm in search of most popular and working lazy loading images plugin for jQuery which would normally sustain large amounts of images per page. I have tried following plugins: - http://www.appelsiini.net/projects/lazyload - http://code.google.com/p/jquery-appear...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: iPhone client not registering for push? I "think" my app is not registering for push notifications. It should be as simple as adding the code to didFinishLaunchingWithOptions and then the when tested the app alert for push notifications should (but does not in my case) pop up. my code: - (BOOL)application:(UIApplica...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ajax and linked resources There must be something I don't understand about ajax. I want to display part of page (page B) on another page (Page A) using ajax. But linked page (page B) depends on some linked resources (page C) and these resources don't display on the original page (Page A). Is there anyway around this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to determine candidate keys from record schema and functional dependencies? If I have a schema say R={A,B,C,D} and functional dependencies say {B->C, D->A} will my set of candidate keys be {B,D} or {BD}? A: If B were a candidate key, you'd have to be able to derive these functional dependencies from the ones gi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Create directory by mkdir I want to create a folder named by the user name in /tmp/vnc/, I can create that folder in command line with perl -e 'mkdir("$ENV{USER}")', but for the following code cannot work. chdir ("/tmp/vnc") or die -1; mkdir ("$ENV{USER}", 0777) or die -1; If I use mkdir -p /tmp/vnc/$ENV{USER} in c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: prevent command line from opening on _popen I'm opening a process in C++ like so FILE* pipe = _popen(ss.str().c_str(), "r"); This create a cmd window which goes to the forefront of the desktop. I want to prevent the cmd window from opening, and if I can't, a way to keep it minimized. Tried solutions: HWND hWnd = G...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding New Admins to Active Admin I am using devise for my users. I recently installed the rails Active Admin gem, everything is working beautifully. However I can't figure out how to add a new admin users. I can see that active admin created an admin_user table in the db with a user admin@example.com, which I use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Very basic question about argument with signature void *data This is very likely an extremely basic question - sorry about that. I have written an interface in C++ which is powered by a C engine. One of the C-engine functions has the following signature: static int f(double t, double *y, double *ydot, void *data) T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Send UIPanGesture translation to all views in array I'm trying to move all views in my array at the same time. But it doesn't work. Only the first view I touch is moveable then. I don't want the other views to move to the same exact spot, I just want all views in the array to move the same amount of distance and spe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to rewrite this php more efficiently I need to display manual/automatic transmission vehicle information, and the best I can come up with is the following code. I think its wrong and inefficient, but I can't quite put my finger on it. <?php if ($obj->AutoTrans == 'S'): echo "Automatic"; if ($obj->ManualTrans...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Should I Use the jQuery-UI-Map Plugin? I'm thinking about using jquery-ui-map, which is a google map plugin. Are there any disadvantages to using this plugin? Will I have access to all of the methods, events, etc. that are in the regular Google Maps API? Any reasons not to use it? A: All of the methods are accessi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Formatting ScrollView to occupy the parent container I am trying to format the scroll view to completely occupy the parent container, but it looks like I'm missing something. Any suggestions would be great. XAML: <Border Grid.Row="0" BorderBrush="#1B5468" BorderThickness="3,3,3,3" CornerRadius="7,7,7,7" Margin="5,0,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Executing JS for iframe Possible Duplicate: Invoking javascript in iframe from parent page what Im trying to do is - load a html page with iframe'd website, and then remove an element of that website, lets call it '#test' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JavaCV: cvLoadImage returns null no matter what I pass it I'm on OS X 10.7.1. I've downloaded the latest JavaCV binaries, and built OpenCV from a current subversion checkout. The cvLoadImage() function returns null, no matter what I pass it. I have verified that I am passing it a valid path to a valid jpg image. O...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ACTION_HEADSET_PLUG not documented extra strange "state"? I'm doing some test with Intent.ACTION_HEADSET_PLUG. Giving the fact that the following code should be the one who give the responses (From com.android.server.HeadsetObserver class 2.2.1 r1): private final void sendIntent(int headset, int headsetState, int pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OpenGL object creation Right now, I'm modelling some sort of little OpenGL library to fool around with graphic programming etc. Therefore, I'm using classes to wrap around specific OpenGL function calls like texture creation, shader creation and so on, so far, so good. My Problem: All OpenGL calls must be done by th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Centering a .jpg image in PDF using Imagemagick? I'm using convert version ImageMagick 6.6.2-6 2011-03-16, and I'd like to use it to generate an A4 pdf from an image, where the image will be non-scaled and centered. I'm running the following (as a modification of Overlaying Images with ImageMagick): # generate a 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Adding To A Map I'm trying to add the file size to this map. It looks like I'm making a mess of things. Any help is appreciated. Thank you. int GetFileList(const wchar_t *searchkey, std::map<std::wstring, std::wstring> &map) { WIN32_FIND_DATA fd; HANDLE h = FindFirstFile(searchkey,&fd); if(h == INVALID_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can you have a win32 program that consists solely of a tray (notification) icon? I have a program that literally consists of a tray icon. No GUI is needed. However, when writing the win32 code, is it necessary to still initialize a hWnd object to be associated with the tray icon? For instance, it is normal to have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Walk array recursively and print the path of the walk Can someone help me with some code or instructions on how to walk recursively an array and when reaching the last element print the full path to it? A simple echo will work because I will adapt the code to some other function I'm developing. The function doesn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to design libraries written in ANSI C? I want to develop a library with ANSI C. I have a string struct: struct libme_string { char* buffer; int length; }; I want to write a function, libme_create_string(), that creates and initializes a string (like constructors in C++). Which of these methods is better for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: php socket daemon, 2nd window tab not being processed until broadcast is sent out So I have written a daemon in php and it worked great until I opened two tabs in the same browser and then this error started happening. The 2 tabs were treated as the same socket because when a message is sent the first tab gets the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to properly dereference multidimensional arrays without []-operator So, I've figured out how to dereference a multidimensional array like this: #include <tchar.h> #include <iostream> wchar_t g_pppwcSymbol[2][3][4]; int main(int argc, TCHAR **argv) { (* (*( (*(g_pppwcSymbol+1) )+2 )+3 ) ) = L'K'; st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Access self from decorator In setUp() method of unittest I've setup some self variables, which are later referenced in actual tests. I've also created a decorator to do some logging. Is there a way in which I can access those self variables from decorator? For the sake of simplicity, I'm posting this code: def decor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: Installing Ruby w/RBENV: I get "ruby-build command not found" I put 'rbenv install 1.9.2-p290' in the terminal and I get back 'rbenv-install: line 31: ruby-build: command not found' I have ruby-build as well. Did I not install ruby-build correctly? I see this on the github site: "You can install to a different prefi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django: get unique object list from QuerySet I have the following (simplified) models in my Django app: class Color(models.Model): name = models.CharField(max_length=10) class Item(models.Model): name = models.CharField(max_length=200) color = models.ForeignKey(Color, blank=True, null=True) class Favor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: C# log in app with SQL Hi I'm trying to get data from a local sql service database to take the input from a user register form. but when i push the button its not recorded onto the serviceable database. do i need to use execute non query? how would i fix this code up? thanks using System.Data.Sql; using System.Data....
{ "language": "en", "url": "https://stackoverflow.com/questions/7590694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Help with ScalaCheck I'd like to use ScalaTest's Checkers trait to use ScalaCheck from ScalaTest cases. A simple case I'm playing with is: test("can create local date UTC from millis") { check(localDate.toTimestampUTC.toLocalDateUTC == localDate) } I need to create a arbitrary LocalDate, so I tried this: obj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Device orientation at launch I've read ALL of the posts on this topic, but still can't figure this one out. I add a VC to the window in applicationDidFinishLaunching. The VC contains a UIImageView. I want to set the image of the UIImageView based on the device orientation, but statusBarOrientation, deviceOrientation...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Windows Phone 7 map control: panning the map while keeping the pushpin constant I'm working on a WP7 (mango) app which has a Bing Maps control with one pushpins on the screen. I need to be able to drag/pan the map so that the map view changes while the pushpin remains in a constant position relative on the screen. H...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding a clickable button or text to rich:suggestionbox suggestions I'd like to add a button to the suggestions presented in a rich:suggestionbox (an 'x' so suggestions can be removed). Is there a way to keep from being selected? What I've tried so far: <rich:suggestionbox id="suggestionBox" for="inputText" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Error when using URL conenction with thread in MapActivity in android I am using a URL connection to connect Google maps web service and get the result in KML format and parse it and display it on MapView. I put this operations in a thread, but I get this error that I don't know what does it mean ?! please help me i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Only add child to current frame Is it possible to add a child to the current frame only? I know you can just remove/hide them, and generate/show them again. But isn't there an easier way? A: Old school way: If you have a timeline you can add a MovieClip as a holder only on that frame. The holder clip only exists on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: toggleClass not working I have a series of links that change content of a span element. I'm trying to toggle the classes on them so that users know which section of a profile they are on. It does not seem to be changing the class though. <div class="profilemenu" style="background: #e2ecfd; width: 100%"> <a style=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }