text
stringlengths
8
267k
meta
dict
Q: Validate values for decimal and integers I need to validate that a TextBox contains only numbers, with allowances for commas and/or decimal points. Here are a few examples of valid entries: * *12.7 *19.245,7 *11,123.326.7 *16,7 *0.19 *0,5 And here are some examples of invalid entries: * *12.00 --> 12 *...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails 2.3.14: How to serialise an ActionController::Request object? I need to write some methods that Do Things based on the kind of request object received by a Rails 2.3.14 controller. However, I don't want to fire up the entire application, nor even a controller; I'd like to have just a marshalled copy of such a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Overloading I/O operator C++ I'm trying to overload the << operator. I'm expecting the output to be InitializingHello WorldOut but it is just outputting Hello World. I can't figure out what is wrong with my code. Thanks for your help. #include <iostream> using namespace std; ostream &operator << (ostream &ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Oracle: Similar to sysdate but returning only time and only date I understand that Oracle sysdate returns the current date AND time. That's great for timestamp or datetime columns. Now let's say I have a DATE only column. What keywords should I use on my insert query? insert into myTable1(myDateOnlyColumn) values(??...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: XML to string in velocity I have XML files that have nodes with formatted HTML. I am trying to print out the html contents to the page but velocity is stripping out the HTML tags. How do you I print html content stored in an XML file using velocity? XML File <?xml version="1.0" encoding="utf-8"?> <system-data-struc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Selecting arrays in nicely printed format in SQL I'm trying to select for a two dimensional array of integers, and directing the output to a file. Is there any way that I can write a postgresql statement that would make the output of the select statement nicely formatted. As in each array of integers that is an elem...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .htaccess image to web page redirect? Is there a .htaccess script I can use to redirect the url of an image to an actual web page? What can I do to make it so when someone accesses an image via their address bar by typing in: http://www.sitename.com/images/1.jpg It will instead redirect the user to the web page: htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hibernate calling INSERT on POST, but some data not there when I GET I am trying to use Hibernate to store two objects, Users (which have ID, name, and ImageURL) and Players (which have a User, Points, and FriendIDList). For some reason, hibernate is correctly storing Users, and saying it is performing an INSERT int...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Calculate time to decelerate using initial speed and decay I'm trying to calculate the time it will take a movieclip in Flash to decelerate to zero. The starting speed will vary, but for purpose of example lets say: Frames Per Second: 30 Speed: 50 Decay: .8 * current speed each frame onEnterFrame(event:Event):void {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do I need to initialize the values of a structure before I use them? I need to create a dynamic array of a struct wordStruct that holds a string and the number of times it occurs in a text file: typedef struct wordStruct{ char word[50]; int count = 0; }wordStruct; I will get the number I need from reading the n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: objected oriented and parsing csv i have to parse csv file which has customers and product they have ordered . customers can repeat for different product . i have to get all the unique customers and products they have ordered. Then print out each customer and there product . i have been asked to do in a object orien...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Scripted main in OCaml? How can I emulate this Python idiom in OCaml? if __name__=="__main__": main() See RosettaCode for examples in other programming languages. A: There is no notion of main module in Ocaml. All the modules in a program are equal. So you can't directly translate this Python idiom. The usual w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to rotate an element around a line other than X=0,Y=0 and Z=0 using CSS3? I created this page for better understanding the question. As you can see using CSS3 we can rotate an element around the X,Y or Z axis using transform: rotate[XYZ](M deg/rad). But I'm looking for a function to rotate the element on any giv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Gwt, CellTable, how can I know which column user clicks for sorting? Writing GWT application. I have CellTable and a code that i'v got from google-example code-site. I need to implement server-side sorting by clicking on table's columns. My code for that is: AsyncDataProvider<MYOBJECT> dataProvider = new AsyncDataP...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Django admin post-save method - how to do? I've got an admin form with a couple of inlines for displaying m2m fields, like so: class ArticleAdmin(admin.ModelAdmin): form = ArticleCustomAdminForm inlines = (SpecificGemInline, SuiteInline,) Base class looks something like that: class Article(models.Model): ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OSGi DS & deactivating a component manually Is it valid to deactivate a component in OSGi manually if I am using Declarative Services? For example, let's say I have a component, with the implementation: //component class Overseer(){ List<ServiceReference> serviceRefs = ...//populate private void doStu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Activity onResume: strange behaviour For demonstrating the activity life cycle, I have added TextToSpeech messages mTts.speak ("<some text>", TextToSpeech.QUEUE_ADD, null); to hear when I am going through onCreate, onResume, and onPause. Findings: In onCreate, you don't hear the text to be spoken (obviously because...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can't get JQuery working on my site? I can't get any JQuery code to work on my website, in particular, slidebox. By the JQuery is not working, I mean, in this case, that when I click on a link, a tag, nothing happens, when really a lightbox should be appearing. Please can you tell me where I am going wrong? <head> <...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CSS compatibility check for multiple browsers? Is there an online tool that would take a CSS file and tell me which parts are incompatible with which browser? Ex: property-a -> ff 3.0+, ie7+, etc property-b-> ff 2.0, ie5...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: http basic authentication from java webstart how do I use basic authentication from java webstart? if I simply require authentication on a directory, jws requires login for every jar included in the jar. A: There's probably nothing you can do about that in itself. If you desperately want to protect your code from s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Jersey has written my mysql timestamp as 2011-09-28T21:48:25Z how do I format it in Java? I have a mysql backend that has a timestamp field that is auto set as currenttimestamp like so (date_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP). After reading the value as Date, Jersey sends out an xml where the timesta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: GC in Workstation mode in ASP.NET app I'm looking at dumps and I see mscorwks!WKS::GCHeap::GarbageCollectGeneration+0x1a9. If I understand it is GC doing GarbageCollection in Workstation Mode? I see other threads are waiting on mscorwks!WKS::GCHeap::WaitUntilGCComplete+0x34. Does that mean I run with workstation...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Playing an MP3 through Ruby on Rails in chrome I'm writing a Ruby on Rails application which allows a user to upload an mp3 file, then play it back. I have it working to the point where a user can do those things, BUT there is an issue when seeking through the song. If a user seeks ahead (or lets it play) to a spo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Building an xml document from functions that return DOMNodes My question is a rather simple one for anyone familiar with the DOM* classes in PHP. Basically i have different classes that i want to return to me something that I can append in my xml document Following pseudo-code should demonstrate better Class ChildOb...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to get UISwitch in UITableViewCell with text both sides? How would one get UISwitch in UITableViewCell with text both sides? Background - I currently have a UITableViewController and when it creates the UITableViewCell I place the UISwitch => accessoryView, and the text (only on left) => textLabel. So what I wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: webmethod with optional C# arguments appear to be required when invoked as a RESTful URI - gives InvalidOperationException: Missing parameter I have a webmethod which works and I've added some optional parameters (because I don't want to burden all callers with providing these values; they are primarily for my devel...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to do perfect KVO for NSManagedObject? Perfect KVO here includes two parts: add observer correctly and remove observer correctly. The story: * *I use one UITableViewCell(cell) to display one NSManagedObject(object). *Each object has some dynamic properties that need observing by its cell. *Not all objects h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Asterisk AGI: How to get or set the value of a global variable? I'm using Asterisk 1.8 with PHP for AGI scripting. EDIT: I'm struggling with setting and obtaining the values of global variables from within an AGI PHP script. I can set channel variables but not global variables. Using PHPAGI lib. Tried: Set({$varname...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: CListCtrl: How to maintain scroll position? I have a CListCtrl (report style) where I clear the list and repopulate it at certain times. I'd like to maintain the vertical scroll position when doing this. I see there are a couple methods that look promising: EnsureVisible() GetScrollPos() SetScrollPos() GetScrollIn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: RAD (eclipse Based) shows a compiler error even after solving it I am working on a J2EE web application. The servlet I am modifying had a method in it that took two parameters. I added a third parameter to the method and adjusted the method calls accordingly. As each call was adjusted the red markings indicating an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I retain my private level variable in my ASP.NET control after an async postback? I am using C# and .NET 4.0. I have an ascx control which contains two drop down lists. ddList1 is parent to ddList2 (think Car Make - Car Model). I have a constructor that populates a private variable in this control with a refe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to select some urls with BeautifulSoup? I want to scrape the following information except the last row and "class="Region" row: ... <td>7</td> <td bgcolor="" align="left" style=" width:496px"><a class="xnternal" href="http://www.whitecase.com">White and Case</a></td> <td bgcolor="" align="left">New York</td> <...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: simple jQuery "toggler" plugin - works like a charm, except in Opera I've written this jQuery plugin, but it just won't work in Opera (I'm using 11.51). It works fine in all other browsers, even IE7, so this has really got me stumped. Any help much appreciated, thanks. (function($) { $.fn.toggleBox = function...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to expand UIWebView on click I'm working on an Ad SDK for iOS and I have a narrow banner-size UIWebView that displays a complex HTML that I receive from an ad server. I don't know anything about structure of that HTML (i.e. it may change). At some point user taps on that UIWebView, which causes the content of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to go about preferences I have a list view displaying data like: 2010 Singapore 2009 India 2011 Sweden 2010 Germany Now when I click menu button, I have two items in it which let me sort this list according to year or by country. The sorting is working fine. What I want to do now is, when I click any of two opti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery Validation plugin duplicating errors on submit when invalid Ive tried for hours to figure this problem out. Im using the jQuery validation plugin (v1.7) on my form. The validation appears to be working correctly except for one problem. If a form field is invalid, itll show its error upon clicking submit. And ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multiline shebang in OCaml? In short, I'd like to abstract this shebang so I can literally copy and paste it into other .ML files without having to specify the filename each time: #!/usr/bin/env ocamlscript -o hello print_endline "Hello World!" I realize I could just drop the -o hello bit, but I'd like all the bin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Running DOS command or batch file in tcl script in Windows 7 with ActiveTcl 8.5 The following is the tcl code. #!/bin/sh # \ exec tclsh "$0" ${1+"$@"} package require Expect package require log source [file join [info library] init.tcl] set exp::winnt_debug 1 log::lvChannel debug stdout log::log debug "debug msg...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Save NSView representation ignores transparency I am trying to change the icon of a file to a representation of an NSView. I am using the following code to do so. [mainDisplay lockFocus]; NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:[mainDisplay bounds]]; [mainDisplay unlockF...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript function not working based on the version of jquery being included. My code of my Script is given below. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript" src="scripts/prototype.lite.js"></script> <...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight DataContext Databinding behavior I'll start off with a stripped-down/sanitized version of my code: Model: class DataObj : INotifyPropertyChanged { // these actually call OnPropertyChanged, and have associated private variables public string Name { get; set; } public int Age { get; set; } } c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: org.hibernate.MappingException: Unknown entity: java.lang.Long I am trying to create a named-native-query that returns a Long. Here is my orm.xml file (simplified as much as possible) <?xml version="1.0" encoding="UTF-8"?> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Form Alignment input and drop downs How could I align my input boxes so that the first one is aligned with the label and the other two is aligned underneath the top input box. Why is my domain and dropdown menu not aligning? CSS: #newwebsiteForm{ padding:10px; margin:10px 0; width:480px; position: re...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: New google calendar, "pop-out" events, if they don't fit in the defined area Take a look at what the new google calendar does when there are too many events to fit in the defined square. You can click the +2 more link (or whatever it may say), and the square pops out a bit... and displays everything. Does anyone kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Trying to compare two text files, and create a third based on information I have two text files, master.txt and 926.txt. If there is a line in 926.txt that is not in master.txt, I want to write to a new file, notinbook.txt. I wrote the best thing I could think of, but given that I'm a terrible/newbie programmer it f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Calling click from keydown, but getting the correct checkbox checked property This isn't a jQuery only question as it has to do with events and order of operation. Consider the following code, which is based on jQuery multiSelect plugin (please post citation if you can find it): Fiddle with it here var debug = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MYSQL search database for similar results Essentially what I want to do is search a number of MYSQL databases and return results where a certain field is more than 50% similar to another record in the databases. What am I trying to achieve? I have a number of writers who add content to a network of websites that I o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: window.location.href and JQuery not working in FF 7 I have a login form from which the user enters user name and password. When they click on an image button to submit I do an ajax call to validate the user. The response returns a destination url. Now when I try to do a "window.location.href = url" the process do...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting Pantone colors to RGB? Is it possible to connvert Pantone colors to RGB? From what I can tell you would need a lookup table of some sort. With thousands and thousands of colors I would never want to maintain this myself so does anybody know of an api? We use Java so a Java api would work best. A: Pan...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: display loader gif whilst ajax request fetched We have some code we use, that as the user types it fetches via ajax, the search results. The issue I have is I don't want a submit button, we want the code to display a loader gif (ala FaceBook style pips) whilst the content is fetched. When there is success, hide the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Clip matrix for 3D Perspective Projection I am trying to create a simple 3D graphics engine and have found and used the equations I found here: http://en.wikipedia.org/wiki/3D_projection#cite_note-0. (I have calculations for Dx, Dy, Dz and Bx, By) I works, but when I rotate the camera enough lines start flying all o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is it possible to invite exactly one friend by Facebook API Without showing the multiuser invite popup. For example I know the uid and that he/she is not using the app. So I want to offer a button, to invite this person. A: You can set the to parameter of the request dialog to specify that it should go to a single ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Switch from dual pane to single pane on orientation change maintaining fragment stack Currently I have a dual pane layout for both landscape and portrait on a tablet. Similar to say settings I have a single activity which loads a fragment into the left selection pane and then choices made in whatever right fragment...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Rails validates_uniqueness_of is causing an exponential number of queries. How do you optimize? I have the following: class List < ActiveRecord::Base accepts_nested_attributes_for :list_options, :reject_if => lambda { |a| a[:title].blank? }, :allow_destroy => true validates_associated :list_options class List...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I support OpenGL ES GL10, GL11, and GL20 in Libgdx? I am writing a 3d game that is using GL10, but I'd like the application to support GL11 or GL20 if available. What is the best design for supporting all 3? Or is this a fool's errand and I should just focus on supporting one version? My current idea is to sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How did we get this real number in binary? from this article: the number 5.125 (binary 101.001) why? 101 is 5 , but how are decimal places converted? Also from that article - a bias is added to the actual exponent e. What is bias? What is the purpose of it? A: Why b101.001 = 5.125? That's just how digits after t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: passing by reference in Java doubts So I was reading this post and response no. 2. In that example, after calling that method, does the Dog value at address 42, name's changes to Max? Dog myDog; Dog myDog = new Dog("Rover"); foo(myDog); public void foo(Dog someDog) { someDog.setName("Max"); // AAA some...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Installing Scala 2.9.1/Lift 2.4-M4 using sbt 0.11.0 I am learning to do web development in Scala. currently trying to install the newest version of Scala/lift with sbt 0.11 in MAC OSX. I so far have already done the following: 1. Installed Scala 2.9.1 final 2. Downloaded latest sbt 0.11 from https://github.com/harra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Subset rows based on values of columns of unknown names and number of columns I am sure I have a very basic question but I am frustrated after searching for the idea on how to accomplish subsetting (getting row numbers) of some data frame/matrix which can have any number of columns and column names change all the ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can not work correctly with posting form with jQuery I am trying to get the return from the mail.php but it does not work. What am I missing here? this is my form <form name="myform" id="myform" action="" method="POST"> <input type="text" name="email" id="email" size="30" value=""/> <input type="submit" name="butt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MVC RESTFUL HTTPClient try catch oddity I'm a little puzzled why my try...catch exception does not seem to work properly. I set up the following code which works fine - to call a WCF restful service. I decided to test it by shutting off the WCF restful service in hopes that it will trap error messages or ignore a 20...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Accessing javascript variable values of a parent page from the lightbox I have a form inside the main page and I have to populate some of the data present in the form fields into the iframe which is displayed using a lightbox (pretty photo) .I guess I could do it using javascript though I am not exactly sure how . ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is using int + "" bad for converting Java int's to Strings? So our computer science teacher taught us how to convert ints to Strings by doing this: int i=0; String s = i+""; I guess he taught it to us this way since this was relatively basic computer science (high school class, mind you), but I was wondering if thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Check for [] operator How do I check whether an object supports [] operation in Python? I think of something like the following: if supports(obj, ?[]?): print("Supports") A: The internal name of the [] operator is __getitem__ (and __setitem__), so you can take a pretty good stab at this with: if hasattr(obj,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: function Wordpress to open image in lightbox implemented lightbox in Wordpress i have this code , but i need to modified to work , http://pastebin.com/hzkc2GwK The value on href= doesn't work , i need to open the image in lightbox mode , I use this option for upload a image http://imageshack.us/photo/my-images/217...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What ribbon controls are there for Delphi Win32? Is there any ribbon-like tool for 32-bit Delphi? I use D2007. A: TMS Software has one in their component pack. DevelopersExpress has one also in their ExpressBars package. I haven't used either of them, but I've used other components from both vendors, and they're ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Active Directory user federation with Rails? Is it possible to use existing AD users to authenticate them in a ruby on rails app? To be a bit more precise here's the current situation. A rails app is hosted on a linux box. Currently Brightbox is used as hosting provider. There's only built in user authentification i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AJAX Mouse Driven Signature Script (Sign and Save) I've found drawing program (point-based), I've found table-based version (with thousands of elements), and I've found a solution which uses canvas, which apparently IE doesn't support. There is a commercial script at realsignature.com which demonstrates what I'm lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Disable application functionality when missing assembly I'm building an application that uses the Oracle.DataAccess.dll to connect to a database to do some work. The database access isn't necessary to perform 90% of what the application does and the application loads fine without the dll thanks to JIT loading. Howe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get query string in PHP doesn't work I am a php newbie, and I'm trying to follow suggestions for how to get the query string. I want the words searched on in a readable format. Now, the strings come from a database, where they have been previously collected using the request object's referer property in Asp.Net. But...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does this Program run from Aptana IDE and not in python command? The following code results in a htmlbody,emailaddress = ConnEmailParser() TypeError: 'NoneType' object is not iterable Error but works fine in IDE. Emails are being sent and PDF files generated. But from command line just ConnEmailParser() is wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ticking checkboxes using mechanize I have the following html piece from this website: http://catalogue.bl.uk/F/NTBK6NCP3LK56BPNU2NJ4FF4MBLIRUNMFX66JLHKBDV1RNCAAB-02920?func=short-0&set_number=151530 <form name="XXX000001" method="GET"><input type="checkbox" name="ckbox" onclick="javascript:select_record(this.form...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to print object in an array? I am trying to print multiple Information entries that will be inserted in an array as an object, and I want to use the methods that are available to those objects and print the result. This is my code. I am getting an error in my last two sentences using System; using System.Collect...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: calling a buttons click Event method I have a form (AddNewCamper), which contains a textbox and a submit button. In a different form, I'm trying to write: if (submit button is clicked) do stuff In the window that the button is actually in, I have a click event created. So I guess I'm trying to call that click ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to bind this collection to my listbox How do i wrap a collection of wrapped class. I have a property in my View Model which is of type AsyncVirtualizingCollection<Item> ItemValues{get;set;} Where Wrapper is a generic type Wrapper<T> Of Item class. Basically I am trying to do a data Virtualization from this l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does a centered HTML DIV move depending on its content? I have a div with the following css class applied: div.centralcolumn { width: 90%; max-width: 720px; margin-left: auto; margin-right: auto; font-size: 80%; font-family: verdana, helvetica, arial, sans-serif; line-height: 1.6em; tex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Resharper, Javascript: "Use of implicitly declared global variable 'X'" I'm using Resharper 6 and ASP.NET Web Methods and have an irritating warning in my Javascript files: "Use of implicitly declared global variable 'X'" The reason is that the web method is created in Javascript as: new X.example().webMethod(arg1,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Multibinding ComboBox.Text I have a combobox for selecting screen resolution width x height . For example : 1024x768 (Standard) 800x699 (Standard) 1500x900 (Wide) I have a MutliValueConverter to convert the resolution string to a view model width and height member (in the ConvertBack method of the converter ) , but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: 'xmlParseEntityRef: no name' warnings while loading xml into a php file I am reading an xml in php using simplexml_load_file. However while trying to load the xml it displays a list of warnings Warning: simplexml_load_file() [function.simplexml-load-file]: <project orderno="6" campaign_name="International Relief & D...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: redirect based on url match I can't get a certain URL to redirect using mod rewrite. I am getting more basic rewriting happening so this is functioning as far as that goes so there is a problem with my URL. I tried the string here and it showed the patter works.. http://regexpal.com/ testing the following Rewrit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Upgrade to Flex SDK 4.5.1 from 4.1.0 causes namespace compile errors for certain mx components I have a Flash builder project that I am migrating from SDK 4.1.0 to 4.5.1. This has been a relatively easy change (we are using maven for our builds, and were able to get a successful build after updating to the 4.5.1 de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: get the value of simplexmlelement object php I try too many thing to read the value of the [label] from the code below : Array ( [0] => SimpleXMLElement Object ( [id] => x [published] => 2011 [category] => Array ( [0] => SimpleXMLElement Object ( [@attribu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Microsoft.Maintainability Error with List Extension Methods So I have tried to create some basic extension methods for List. Essentially I have a UniqueAdd and UniqueAddRange. It will check for the existence of a value before adding and if its already in the List it will not add it. Here is the code: public static c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What would be the best table structure? I'm developing an app that will store MLS (Multiple Listing Service) Property Listings from several different MLS's. The majority of my customers will only use one MLS, however, some will use mutliple MLS's. My question is: What is the best method to setup the table(s)? Let's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pairs of strings in reverse order in a list of more than million strings? Recently asked during some interview that "How to find reverse of all strings if exists in a list of more than million strings? For E.g. str[1] = "abc", I need to check for "cba" exactly, no anagrams. Method 1. Store all the strings in a ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to search in Redis? In MySQL I have a table called: cities which includes 2 columns: name and population and then I get the search results with this: SELECT * FROM cities WHERE name LIKE '%Bu%' ORDER by population DESC LIMIT 2 And I get the Results Bucharest, Budapest. How can I do this in Redis? I mean how ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Give access to an image for a limited time until an admin removes the access right? I want people to have access to images for a limited amount of time. Example they pay for x.jpg and they have access to it until I decide they no more have access to download it. note: The 'images' server that store x.jpg is independ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: android mediaplayer auto restart How can i make mediaplayer auto restart after the sound has finished this is my code: it plays the music then just stops after it finished i want it to replay after it stops MediaPlayer mediaPlayer = MediaPlayer.create(main.this, R.raw.ngmusic); mediaPlayer.start(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I setup Fmod to very basic functionality in a Win32 console application? I'm new to Visual Studio and would like to set up the very basic functionality of Fmod in a Win32 console application. What I think the main problem is, is that I don't understand quite good how headers, additional libraries and dll file...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Could not find rake-0.9.2 in any of the sources I have no idea why I am getting this? $ which rake /Users/kamilski81/.rvm/gems/ruby-1.9.2-p290@depot/bin/rake [~/Sites/work/depot, kamilski81@mac] $ /Users/kamilski81/.rvm/gems/ruby-1.9.2-p290\@depot/bin/rake test Could not find rake-0.9.2 in any of the sources Run `bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Passing js variables to django view I'm using jquery .submit() function to calculate two variables(f_amount and f_variables) but I don't know how to pass them to the next django view. <form method="POST" action="/app/view">{% csrf_token %} <select id="fd" name="fd"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to disable dragging with mouse click any images? I have an image <img src="fullscreen.jpg" /> for online driving exams, where the questions are asked using image text and with image embedded. When anyone click the image and drag the mouse it moves the image. But how can i stop this dragging? So that nobody is al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use javascript to center anchor object when page loads I want to jump to an anchor tag when my page loads AND have the anchor object centered in the window. I've used a simple function to go to the anchor when the page loads: <body onload="goToAnchor();"> <script type="text/javascript"> function goToAnchor() { win...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it common to store geocoded data? On my site, companies are able to enter in locations (addresses, etc) for each of their branches. Rather than geocoding through Google each an every time that I would like to display it on a (Google) map, it seems better to simply geocode each address upon entry, and store the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NLP algorithm to 'fill out' search terms I'm trying to write an algorithm (which I'm assuming will rely on natural language processing techniques) to 'fill out' a list of search terms. There is probably a name for this kind of thing which I'm unaware of. What is this kind of problem called, and what kind of algorith...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Android: How to send an image as email attachment from application? I'm currently trying to create an app that will take a picture and then attach that picture to an email that will be going to a pre determined email address. I have the email working and I have the camera working. I cant seem to get the picture tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: MySQL Query for Tagging System, Selecting Used Tags Only I have a tagging system implemented in PHP and MySQL, with the following tables: Table: blog_tags * *tag_id *tag_name Table: blog_tags_assoc * *tag_assoc_id *article_id *tag_id Table: blog_articles * *article_id *article_title *article_conten...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NSPopover: Class Unavailable (NSPopover on Mac OS X versions prior to 10.7) I want to update my App and switch to Lion only, since I'm using the new NSPopover class. I set my deployment target and the base SDK to 10.7 but I'm still getting the error message: NSPopover: Class Unavailable (NSPopover on Mac OS X versi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Out of memory Exception when converting video file I'm converting a Video file to string using Base64 encoding. try { encodedString =Base64.encodeBytes((getBytesFromFile(new File(Description.PATH))),Base64.GZIP); } catch (IOException e) { e.printStackTrace(); } When i'm converting 60 sec video, I'm getting...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Django: CSRF with AJAX I have a problem/bug found? in AJAX with CSRF. I don't use {% csrf_token %} at all. I use only AJAX forms so - there is no cookie set for csrf. In taht case - enter link description here is useless :( I can use get_token to generate it, but I have to put it in all my sites so it has no sense. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7604519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }