text
stringlengths
8
267k
meta
dict
Q: Javascript, jQuery pattern to create HTML document I'm not sure if I'm asking the right question or not. But my application heavily relies on Javascript and jQuery to create HTML document. So I have a lot of this "jQuery(") and then a lot of div.attr("id","123"). So, is there a better way to do this, or some design...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using CGImageProperties to get EXIF properties I want to be able to add a text comment to the metadata of a JPEG and be able to read it back from within an iphone app. I thought this would be fairly simple as ios4 contains support for EXIF info. So I added metadata using a Windows tool called used AnalogExif and rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Retrieving a Specific Value From A Serialized Array MySQL Database structure is as follows: id|metaKey|metaValue --+-------+----------------------------------- 55|product|a:8:{s:3:"sku";s:0:"";s:8:"products";a:3:{i:1;a:3:{s:6:"option";s:1:"1";s:5:"price";s:5:"14.95";s:9:"saleprice";s:0:"";}i:2;a:3:{s:6:"option";s:0:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why do I receive a "cannot find symbol" error when compiling this interface method? I'm using the interface Place: public interface Place { int distance(Place other); } But when I try to implement the interface and compile the following code, a "cannot find symbol - variable xcor" error returns. public class Po...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Handling Timeouts in a Socket Server I have an asynchronous socket server that contains a thread-safe collection of all connected clients. If there's no activity coming from a client for a set amount of time (i.e. timeout), the server application should disconnect the client. Can someone suggest the best way to ef...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: testing backbone.js view events with jasmine I'm trying to implement view tests for a Coffeescript implementation of the ubiquitous backbone.js 'todo' example (see github.com/rsim/backbone_coffeescript_demo.) My jasmine tests of the above demo work pretty well, except for view events. I expect I am stuck on one or b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: how to prevent misuse of bool's in Core Data (i.e. forgetting to put "boolValue" to convert from NSNumber) I still muck up with bool's in my core data config data. The NSManagedObject for say a core data "config" class one can quickly type in the following and you don't get an error: if (self.myCoreDataConfigObje...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I run Net::SSH and AMQP in the same EventMachine reactor? Some background: Gerrit exposes an event stream through SSH. It's a cute trick, but I need to convert those events into AMQP messages. I've tried to do this with ruby-amqp and Net::SSH but, well, it doesn't seem as if the AMQP sub-component is even bei...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: linq to sql query help - common values userkey keyboardkey keypressed ---------------------------------------- u1 kb1 A u1 kb1 B u1 kb2 C u2 kb1 A u2 kb1 B u3 kb1 A u3 kb1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: android view and textview confusion in inflating and returning package com.test1; import android.app.Activity; import android.app.ExpandableListActivity; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Access SVN server from machine on work subnet via an SSH tunnel I'm attempting to access my work SVN server via an SSH tunnel to a separate machine. Something like this: (Local_Machine) -- SSH_Tunnel --> (Workstation) -- LAN --> (SVN_Server) I can currently tunnel into my workstation via ssh, but cannot access the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET WebForms in an ASP.NET MVC 2 application Is it possible to call normal ASPX pages with their normal life-cycle in an ASP.NET MVC 2 application? What about web controls and ajax.net toolkit? Thank you! A: You don't need to do anything. Simply create your MVC application and add a new web forms page. Thats it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP on link click effects I have one question which is somewhat two-parted (though the parts go hand in hand). I've started picking up PHP, and I wanted to do two things when an image is clicked. I want the click to * *Increment a session variables, say $_SESSION['entry']. *Reload the current page (say index.php...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use includes with 3 models w ActiveRecord? Given the following model: Room (id, title, suggested) has_many :room_apps, :dependent => :destroy RoomApp (room_id, app_id, appable_id, appable_type) belongs_to :appable, :polymorphic => true has_many :colors, :as => :appable has_many :shirts, :as => :appab...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Absolute positioned div with overflow auto causing child absolute div to be cut off I have a absolute positioned div with overflow auto. Inside this div is another absolute positioned div. My problem is that this child div gets cut off due to the overflow. I want it to escape the container div as it would if overflo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How does reassigning a disposable object variable work? In C# when reassigning a disposable object variable with a new object, how does it work in the memory? Will the memory space occupied by the old object simply be overwritten by the new object? Or do I still have to call Dispose() to release the resources it use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Loading locals onto stack for method call in IL generation? I'm trying to generate IL to mimic the following method MyMethod: public void DoSomething(object a, object b, string c, string d){...}; public virtual void MyMethod(object a, object b) { DoSomething(a, b, "hello", this.SomeInstanceString); } This is w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Key Presses in Java Swing Problem I have made a calculator using Java Swing, and it's mostly done but I was wondering how you could make it work so that when you press a key from 0 - 9 on the keyboard, it will perform the same function as manually pressing the JButton on the calculator. I tried using but1.setMnemoni...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Programmatically translating recurring calendar events? Does anyone know of a solution or strategy for parsing and translating recurring events in any given language? I've got some code that sort of works, but I'm having trouble even wrapping my brain around a solid approach. A: By "parse" you mean free-form text i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I query how many likes a Facebook post has? I developed a custom app to upload videos that will be used in a contest, the video with the most likes wins. Is there a way to keep track of these likes without further user intervention? I mean, the user uploads the video now, with a "like counter" thing, and the day...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strange output in JSON that I make in my PHP after an AJAX call I am a bit new at this and totally messing something up. I have a PHP result set through which I iterate like this: $rows = array(); while($r = mysql_fetch_assoc($result)) { $rows[] = $r; } echo json_encode($rows); and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Binding C# WPF controls to a dictionary Hi :) I’m just learning C# and WPF and I need to write a tool that: * *Loads a data file (string Key, int Value) *Binds the data to a WPF UI for edits *Saves a new data file My thought was a dictionary would be best. The data is only loaded once from file, and changes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to resolve "String was not recognized as a valid DateTime"? I'm converting a text field into date time and inserting into db. However, when the text field is null, it throws an exception that String was not recognized as a valid DateTime This is what I did: nvpt4Entities db = new nvpt4Entities(); Cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get a DataVisualization.Charting Chart to show before points are added? How may I get a DataVisualization.Charting Chart to show its axes and gridlines before points are added? Currently the chart area is blank even if axes scale limits are set manually, and I can see no good reason for this. A: Set the Axis...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MongoDB Geospatial Haystack Indexing How do you create a Geospatial Haystack Index using the 10gen C# Driver for MongoDB JS Example: db.foo.ensureIndex({ pos : "geoHaystack", type : 1 }, { bucketSize : 1 }) C# Example that does not work: BsonDocument keys = new BsonDocument(); keys.Add("pos", "geoHaystack"); keys.A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: specify ouput file name flash builder 4 This should be easy, but I can't find it. I want my .html and .swf files to be named something differently than the project name. Project name is foo, I want the outputs to be bar.html and bar.swf. Thanks. A: Flextras was on the right track. You can't change the output fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Distributed Cache that supports incr I'm looking for a distributed key/value store that supports a balanced load of reads and writes. Necessary Features: * *Get, Set, Incr *Disk backed *Blazingly fast (i.e. eventual consistency is OK) *High availability (i.e. rebalancing load upon node failures) Nice to have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Codeigniter - Set a variable in in view Can I set a variable in view file? for exemple: I have a controller: welcome.php Its load: $this->load->view('header'); $this->load->view('main'); $this->load->view('footer'); I need set a variable on file main.php and get on footer.php Its possible? A: You can pass a varia...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help with XML response from PHP I am new to PHP, and I am using it to POST data from an iPhone. I have written a basic code to get data from the iPhone, post it to the php script on my server, and then using PHP, send that data to another webserver. However, the webserver is returning a response in XML, and since I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS table rounded corners and image modification I found a cool css "tooltip" script that works perfectly for my site, but it's been made to work when someone hovers over an href. I have very limited CSS skills, especially with positioning. So, this may help me out, depending on how I can explain what I need to do....
{ "language": "en", "url": "https://stackoverflow.com/questions/7590837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to find EOF in a string in java? I am working in school project. In that what they told is, I will be given a String which contains an actual program like.... import java.io.*\npublic class A{\n...........EOF And My job is to find particular regular expressions in that String(Program). Now My question is.. voi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: jQuery selector problem with IE but works in ff I don't get why this code would work in FF and not IE. Can someone shed some light on this? The $(".ui-tabs-nav li a") seems to be the problem. In IE this.text is undefined. http://jsfiddle.net/4Y2dU/25/ A: this by itself is not a jQuery object. $(this).text(); is pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: svcutil ignores out paramter of async WCF call I have a service WCF interface: [ServiceContract(Namespace = "net.pipe://QFX_DLL/TradingService")] public interface IGenericTradingInterface { [OperationContract] void GetServerInformation(out ServerAttributes attributes); } The host for this is up and runnin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java - KeyListener not working This has been making me want to tear out my hair all day. I'm trying to make it so when I press the right-arrow key, my speed will go to 10. I know that my methods that make my sprite move work, because if I set a value beforehand, it moves across the screen. It's the KeyListener that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting the AVAssetReader's Sample Data I'm trying to get the PCM data from an MP3. I'm using AVAssetReaderOutput and it seems to reading the data fine. while(true) { nextBuffer = [assetReaderOutput copyNextSampleBuffer]; if(nextBuffer) { countsample = CMSampleBufferGetNumSamples(nextBuffer); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I canot add Mobile SDK (Sun Wireless Toolkit) to IntelliJ IDEA I have IntelliJ IDEA 10.3 Community Edition installed along with JDK 1.6 which has been working fine for Android development. Now that I am trying to develop J2ME applications, I installed Sun WTK 3.0, but I am unable to add it to IDEA since there is no ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do images download fully before they are re sized by html or css code? Basically exactly what the question asks. Do images on a website download the full file before re sizing them. I have a bunch of pictures and I use html to resize the images down to thumbnails to easily display on the page. However, these images ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get max of two entries query Query: select machinename, StatusCode, size from machine where MachineID In( '33','22') and StatusCode = 166 ORDER BY size DESC Result: machinename StatusCode size ----------- ---------- ---- test1 166 50 test1 166 25 test2 166 75 test2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: AJAX returns unusual status codes So I've finally gotten around to trying AJAX again (rather than hidden iframes), and I now remember why I hated AJAX so much in the first place. It's a simple script that queries the server for the number of private messages the user has received. The server responds with a single n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Custom validation error messages in Kohana 3.0 I'm attempting to load custom error messages to use when validating my 'sign up' form. User model: https://github.com/ashleyconnor/Egotist/blob/master/classes/model/user.php Account Controller: https://github.com/ashleyconnor/Egotist/blob/master/classes/controller/user/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best way to query for items with the most "upvotes" I am working on adding up and down votes to some items in the database, and displaying them ordered by the highest upvotes. How would this query look like? How can I make something like this in SQL? SELECT col1 col2 FROM some_table WHERE "highest number of upvotes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do i create a form with input mask in javascript I want to create a html form with a text-field which checks if DD-MM-YYYY are correctly entered into the field and alerts the user if it's not the case. How can i approach this with javascript? A: Couldn't you just make 3 <input> fields - one for month, day, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby - Abbreviating a string containing a name to first name last initial Fairly simple question I need to take a string containing, for example, "Bob Smith" and return "Bob S." - or "Javier de Luca" and return "Javier de L.". In other words, abbreviate the last word in a string to just the first initial and add a p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Permission migration from publish_stream to publish_action I am wondering if you have a users permission to publish_stream and you want to publish_action from now on does publish_stream cover both or do we need to re-request the users permission? If so whats the easiest way of detecting wether they have this permiss...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Configuring and installing python2.6.7 and mod_wsgi3.3 on RHEL for production This is a long question detailing all that I did from the start. Hope it helps. I am working on a django application and need to deploy it on to the production server. The production server is a virtual server managed by IT, and I do not h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MVC validation for unique Hi I have an MVC app that I used to insert update invoices: public class Invoice : IEntity, IValidatableObject { public virtual int InvoiceId { get; set; } [Required(ErrorMessage = "Invoice Number is a required field.")] [Column(TypeName = "varchar")] [S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why is my WCF client timing out sometimes when trying to connect to the WCF Service on localhost? I have a WCF service hosted within a Windows service. The client that is connecting to it is on the same machine so I would expect it to take long to connect and definitely not timeout. For some reason when I start th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Table cells resizing when browser resizes I have this: table td { width: 300px; } <table> <tr> <td>Text</td> <td>Text</td> <td>Text</td> </tr> </table> Everything is fine if the browser is big enough. But if I resize my browser and make it too small, my cells resize. How can I m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Compile and run a coffeescript file on node.js on change I am currently using this node.js command to watch coffeescript files for changes and compile them to a folder: coffee -cwo ./js ./src I wonder if there is a way to watch a folder/files for changes and if there is a change, run a compiled js file. In this way...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to style MVC3/ASP.net DropDownList? How can I style a mvc3/asp.net DropDownList in css like I can with a text box: --Site.css - Style for text box-- input[type="text"], input[type="password"] { border: 1px solid #93A9C8; padding: 2px; font-size: 1em; color: #444; width: 200px; border-rad...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I initialize a struct in a Class constructor list? I want to initialize a struct within a default class initializer list. For example, if I have a class like like this: class Foo { private: int x; int y; int z; somestruct p; public: Foo(): x(1), y(2), z(3) { // other stuff ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Transparency on images inside opaque UIImageView I often export PNG images from Photoshop for use in an iPhone app, using the Save For Web and Devices feature. I always leave the transparency option selected, even if there are no transparent parts to the image. This is because I assumed that it would have no effect ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NSNumberFormatter bug? When I try to convert the NSString @"8.8" to a NSNumber by NSNumberFormatter NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; [formatter setNumberStyle:NSNumberFormatterDecimalStyle]; [formatter setMaximumFractionDigits:2]; [formatter setPositiveFormat:@"###0.##"]; NSNumber *r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: $.post followed by form.submit seems to cancel the $.post On a web application with multiple forms on it, if you click an option that moves to another page, we save any unsaved content by calling $.post(window.location.pathname, options, saveReturn, 'json'); and then go to the new page by setting some parameters and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get tuples with max value from each key from a list I have a list of tuples like this: [(1, 0), (2, 1), (3, 1), (6, 2), (3, 2), (2, 3)] I want to keep the tuples which have the max first value of every tuple with the same second value. For example (2, 1) and (3, 1) share the same second (key) value, so I just want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I extend WCF in the Callback direction? I can attach an IParameterInspector using behaviors to each operation in the ClientRuntime and also to each operation in the DispatchRuntime on the service side. But it seems this only works from client to service. I also want to be able to attach an IParameterInspecto...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are the String lliterals stored in the string pool unique? I understand that Strings may be interned, but it it an action that is performed religiously when a new string object is created? Jls section 3.10.5 string literals. A: All String literals go into the string pool. Otherwise, your application must call inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: FreeTDS connection problems I'm using FreeTDS 0.91 to connect to a remote MSSQL server but all attempts have borne no fruit thus far. Upon doing a tsql command on my Unix, I get the following error: locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" Error 20004 (severity 9) Rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Derive minimal regular expression from input I have a remote "agent" that returns "yes" or "no" when handed a string. Communicating with this agent is expensive, so I'm hoping to find a library that will allow me to iteratively build a regular expression given positive and negative feedback, while being intelligent ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: List of unique items in a list of tuples I have a list of tuples like this: mylist = [(1,2,3),(6,1,1),(7,8,1),(3,4,5)]. If I use the list comprehension slist = [item for sublist in mylist for item in sublist], I could get slist = [1,2,3,6,1,1,7,8,1,3,4,5]. How should I modify if I need only unique elements in slist ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Outputting Javascript from PHP, but Javascript doesn't get executed The PHP script doesn't seem to call dis(); function..Here it is: PHP: if (!$_SESSION['user']) { echo"<script type='text/javascript'>dis();</script>"; } JS: <script type="text/javascript"> function dis() { $(document).ready(function() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: GWT MVP UiBinder - passing arguments to the presenter I've started a GWT project, I've decided to give the UiBinder a try. I'm having a difficult time laying an MVP pattern on top of UiBinder. When I was using GWT-pure-java: I'd use Gin to inject my presenter with the corresponding view. It was pretty straight f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Writing own jQuery-PHP picture upload utility for site After looking around for weeks and being totally confounded by the tutorials that were already on the books, I have decided to write my own jQuery upload script. I thought I could get it to work but I am having issues. I will enumerate them: On the page that I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Problem with debug.exe I'm trying to use the debug tool in windows to for a simple program. I want to input a string of characters and then inspect the memory to see the characters saved. Here's the code I have: mov bx,200 mov byte [bx],33 ;; Set maximum string length (32 + Ent) mov ah, 0Ah int 21h Every time...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: CSS container mask with single line ul of varying width Trying to make something like this image. So, it's like a jQuery carousel, but not using jQuery, dont want any animation, just simple pagination to move the "visible" section around. Here's the code so far: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Native PyQt function returning selected QTreeWidgetItems in order of selection? I have a QTreeWidget which uses the QAbstractItemView.ExtendedSelection property, allowing users to shift click and control click items. I'd like to preform actions on these items based on the order in which they are selected-- I can thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Changing fixed bi-dimensional array to take size given at runtime I've been trying to wrap my head around this the whole day... The code that I have so far works as planed, the idea is that I'll have to change tCell * cells[3][5]; to take a size that's given at runtime. What changes do I need to make to retain the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: linqpad 4.31 ...try removing one of the duplicate references I can see my entities on the left panel, can see all related to them as columns and relations to other entities. when try to select then entity to take(50) I get this error An assembly with the same identity 'System, Version=4.0.0.0, Culture=neutral, Publi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Objective-C Cannot find interface declaration I have been scratching my head for awhile trying to figure this one out. I have the following .h files //ClassA.h #import "ClassB.h" @interface ClassA { } @property SomeEnum blah; @end //ClassB.h #import "ClassA.h" typedef enum SomeEnum { value1, value2 }S...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: User control (ascx) in asp.net and its bindable properties dont show up in the data container When I add a user control which has bindable properties to an asp.net page I do not see its bindable properties on the designer's dialog box when I click the edit Data bindings on the Repeater-Listview should I add any othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Bind an AppWidget to a Service I implemented a service and I bind my activities in the app to it.. How can I bind an AppWidget too? I need to call some service's method from AppWidget's buttons... Thanks in advance
{ "language": "en", "url": "https://stackoverflow.com/questions/7590981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to sort TabItems in the TabControl I have a collection of type Page with an Order property, I set ItemsSource property of a TabControl an ObservableCollection. What I need to whenever I changed the Order property of an Entity the related TabItem go in the correct location. WPF XAML : <TabControl Grid.Row="1" It...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why would declaring variables as volatile speed up code execution? Any ideas? I'm using the GCC cross-compiler for a PPC750. Doing a simple multiply operation of two floating-point numbers in a loop and timing it. I declared the variables to be volatile to make sure nothing important was optimized out, and the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Validate a date - asp.net mvc 2 I need to validate a date of birth field. I have [Required] [DataType(DataType.Date, ErrorMessage = "Invalid date")] [DisplayName("Date of Birth")] public DateTime DateOfBirth { get; set; } It does absolutely nothing on the client side (no error message is displayed for invalid date)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to iterate through a list in jquery? I need to get to an element in jquery or to use it as a value for a time picker min/max range, that is something like this dealershipInfo.OpenCloseTime.ElementAt(i); where i will be an integer value. & OpenCloseTime is a List<string>. I am working in MVC. The objective is to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Excel column data type exclusive of the header row Using spreadsheetgear, is there any way to get the "probable" data type for a column, exclusive of the header row (if one exists) and reasonably tolerant of sparse population without having to do a sample myself...is there already a way to do this? so for example i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Detecting the device upside down what are the correct values for detecting the device upside down? I have the following and it starts detecting when the user has titled the device on its back. I use the following values float xx = -[acceleration x]; float yy = [acceleration y]; float angle = atan2(yy, xx); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to remotely connect to another windows machine in the network and get the OS information from that machine? (other than Telnet) I have been assigned to write a Perl script wherein I will have to connect to another windows machine on the network and then get that machine's OS name and version. I have achieved th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7590998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: New Open Graph - important life moments Will I be able to display a user's Timeline highlights (important life moments) with my Open Graph App? Will this be possible with the new changes? I'm looking for some kind of API for the Timeline highlights. A: You won't be able to get the user's aggregations or timeline hi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dotted Line between h2 span I have been trying to get some dotted lines all over my site. I'm starting to understand the idea but I ran into another problem... I am making another dotted line, this time between text and an image. This one's a bit different. I am also getting problems where sometimes the image goes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python-twilio api error? im using twilio-python and im following this tutorial: http://readthedocs.org/docs/twilio-python/en/latest/usage/twiml.html?highlight=nest But when i try this: from twilio import twiml r = twiml.Response() r.say("hello") with r.gather(finishOnKey=4) as g: g.say("world") print str(r) Bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP to Smarty, displaying some nested Arrays I'm having some issues displaying some nested array results in smarty... here's what I have: $searchResults - an array, where each row is a result set. No problem here. $searchResults[$row][users][] - this is the nested array I created. If users exist for this row of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Not sure about my interpretation of function declaration in C++? It seems to be stupid question but I have never seen something like this! int operator() (const std::string& s1, const std::string& s2) const to me operator is a const member function that return an intger and no variable argument! but need two const ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add parameters to Django class based generic view decorators? I have written a decorator to display success message on object creation: from django.contrib import messages def success_message(klass): def form_valid(self, form): response = super(klass, self).form_valid(form) messages.succe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Selective URL rewriting from within a Firefox add-on? I'd like to create a Firefox add-on that rewrites certain URLs. For example, if the page attempts to load a file http://my.com/foo.js, I want to rewrite the URL so that it loads from http://my-other.org/bar.js. And I don't want it to look like a 302 redirect, bec...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: BES Vulnerability Management We try to follow security best practices by keeping software and device settings up to date and specifying whether or not applications can initiate specific types of connections, but I would like to be more proactive. I saw a blog from eEye regarding a free mobility scanning module (http...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a standard way to describe SSO token extraction from an HTTP request? I'm working on building a pluggable SSO architecture for web servers, where we could be using any SSO technology. This means I need to find the SSO token using headers, cookies, parameters, and/or resourceURI. So I need to teach my web s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Odd behaviour with Map in Groovy I was writing code and I noticed some odd behavior in Groovy when I am dealing with XML and Maps. I thought about it and can't figure out why is it happening and should it that way. I wrote sample code with 3 examples. Crucial difference between map1 & map3 is only on the following p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Getting timed out trying to check website availability I am using the following code to check the availability of websites : public boolean isSiteAvailable() { try { URL u = new URL("http://www.google.com"); HttpURLConnection huc = (HttpURLConnection) u.openConnection(); huc.setRequest...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Middleware class being create but process_template_response not executed I have defined a middleware class. and i have added it to the middleware_classes attribute in setting. When a request comes in, the middleware class gets created (the debugger catches the code when the breakpoint is on the class CommonFiilter()...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: List using Nodes we are learning about linked list using nodes and I'm not sure if i'm doing this right. We are suppose to just make a simple list but when I go to run the program, I'm getting nullpointerException pointing to showList() method but when I try to not use that method, then nothing prints out at all. Pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How do you iterate over all values produced by a function? I am new to go, and I have found myself writing a few for loops which look like this: for element, err := producer.Produce(); err == nil; element, err = producer.Produce() { process(element) } where producer.Produce() is a function like reader.ReadStrin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: rails 3.0.9 auto_link linking text infront of http:// So when I use the auto_link function on this text also saw this on yammer...http://techcrunch.com/2011/09/27/former-facebook-vp-chamath-palihapitiya-leads-17m-round-in-enterprise-social-networking-platform-yammer "yammer...http://techcrunch.com/2011/09/27/former...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Classes of referenced EJB project not found in (the referencing) Web project I'm learning J2EE and EJB and I've run into a strange problem. This is my project setup: I'm using Glassfish 3.1 and Eclipse 3.7. I have two projects in Eclipse: * *An EJB 3.0 compliant project, myEjbProject *A Dynamic Web Project, my...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Converting between LINQ expression types Does anyone know of a tool which converts between the 'types' of linq query expression? ie: a) var foo = from c in customers select... b) var foo = customer .Where(... I'm more familiar with a), but to use dynamic linq b) is required so it'd be nice to easily convert all my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java: Get group names using Pattern class? I am trying to use Pattern and Matcher class to extract matches out of a string. My string is as follows: $abc$12def$def$$11$ I want to get $abc$, $def$ and $11$ from this string. I thought of using the following regex: \$(.*)\$ (This works fine in normal pattern matching)....
{ "language": "en", "url": "https://stackoverflow.com/questions/7591063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do Java programs run without defining the main method? I was looking through some Java source and noticed that the main method wasn't defined. How does Java compile source code without knowing where to start? A: There is a difference between running and compiling. Java code can be compiled incrementally. You ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: I want to call 20 UIView files random and non-repeating in xcode I have a game where each click of the "next" button is supposed to call one of 20 subviews in at random order without repeating any of the UIViews. At count 20 the code should call a new UIView for scores. Can someone pls. help. LasloV in San Francisco...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create a thumbnail from only part of an image I'm creating a thumbnail right now like this: // create thumbnail and save var image = Image.FromFile(Server.MapPath(imageFilename)); var thumb = image.GetThumbnailImage(image.Width / 10, image.Height / 10, () => false, IntPtr.Zero); thumb.Save(Server.MapPath(Path.Change...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Amazon Web Services + ASP.NET MVC 3 + MySql I have an application built on ASP.NET MVC 3 that uses Entity Framework to connect to MySql for its data store. I am looking at hosting options, and Amazon looks like a very tempting place for me to host as the userbase will be shifting between both extremes (massive audi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7591074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }