text
string
meta
dict
Q: How do craigslist mashups get data? I'm doing some research work into content aggregators, and I'm curious how some of the current craigslist aggregators get data into their mashups. For example, www.housingmaps.com and the now closed www.chicagocrime.org If there is a URL that can be used for reference, that would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Why does Python code use len() function instead of a length method? I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object? A: Python is a pragmatic programming language, and the reasons for len() being a function and no...
{ "language": "en", "url": "https://stackoverflow.com/questions/237128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "234" }
Q: How do I create a custom JPanel extension and use it from the NetBeans palette? I have a JPanel extension that I've written and would like to be able to use it in the NetBeans designer. The component is simply adds some custom painting and continues to function as a container to be customised on each use. I have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: abstract methods in skeletal implementations of interfaces I was re-reading Effective Java (2nd edition) item 18, prefer interfaces to abstract classes. In that item Josh Bloch provides an example of a skeletal implementation of the Map.Entry<K,V> interface: // Skeletal Implementation public abstract class Abstract...
{ "language": "en", "url": "https://stackoverflow.com/questions/237140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to determine if radioButton.Checked is set programatically or via a mouse click? I have a radio button on my Windows Form. How can I determine if the CheckChanged event occurred due to a user clicking or selecting the radio button vs programatically setting the event with this.radioButtonAdd.Checked = true; I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I want to know more about LinkedList I'm learning c# , and I reached the LinkedList<T> type and I still need to know more, like when should I use it, how do I create one, how do I to use it. I just want information. If any one knows a good article about this subject, or if you can show me some examples with explanat...
{ "language": "en", "url": "https://stackoverflow.com/questions/237151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows scripting to email using TLS I'm trying to make an SVN post-commit script that makes backups to a Gmail drive. Blat doesn't seem to support TLS. Are there any good scripting programs on windows that can send an email via TLS? A: I don't know about other mail senders, but stunnel is able to accept a plain ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Multiple mouse pointers? Is there a way to accept input from more than one mouse separately? I'm interested in making a multi-user application and I thought it would be great if I could have 2 or more users holding wireless mice each interacting with the app individually with a separate mouse arrow. Is this somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/237155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to assign a Gmail drive to a drive letter? I would like to assign a drive letter to a GMail drive so that I could script some output to it. Are they any hacks to get this to work? A: GMail Drive no longer works (well) -- Google put rate limits into Gmail to prevent this kind of (ab)use of Gmail. It's like bei...
{ "language": "en", "url": "https://stackoverflow.com/questions/237157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: What's the best way to check if a String represents an integer in Java? I normally use the following idiom to check if a String can be converted to an integer. public boolean isInteger( String input ) { try { Integer.parseInt( input ); return true; } catch( Exception e ) { return ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "247" }
Q: Receive HTTP Headers via NSURLRequest/NSURLConnection in Cocoa I've been working on figuring out how to receive HTTP Headers via a request made with NSURLConnection. Typically a request is made with something as simple as the following: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:r...
{ "language": "en", "url": "https://stackoverflow.com/questions/237164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Generate Linq DataContext Does anyone know if an API exists for Linq's DataContext generator? I reflected SqlMetal.exe, but every class was marked internal. I would like to generate a datacontext .cs like sqlmetal, but from my own assembly. Thanks! James A: All the classes in SqlMetal are internal because they ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I remove the UINavigationBar from a UIViewController? I'm experimenting with the NavBar sample project for iPhone. When I tap on one of the rows in the table in the default view a new view slides in (so far so good). I want to remove the UINavigationBar bar at the top of the new view that slides in. How ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/237196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Showing a view controller from an OpenGL view I have created an iPhone application based on an OpenGL view. Now I would like to show a "settings" form. Since my code runs in UIView, I have no pushViewController. How do I show a view controller on screen? Thanks! A: You can do this in one of two ways: * *You ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/237198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Querying DataColumnCollection with LINQ I'm trying to perform a simple LINQ query on the Columns property of a DataTable: from c in myDataTable.Columns.AsQueryable() select c.ColumnName However, what I get is this: Could not find an implementation of the query pattern for source type 'System.Linq.IQueryable'. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: Accessing AddressBook without picker or UI I have read somewhere that Aurora Feint managed to access the Address Book without using the picker. Is it possible to iterate through all records? Aurora Feint is available on AppStore, so I assume they are using SDK with no private frameworks. Thanks! A: It is possible t...
{ "language": "en", "url": "https://stackoverflow.com/questions/237203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Any python libs for parsing apache config files? Any python libs for parsing apache config files or if not python anyone aware of such thing in other languages (perl, php, java, c#)? As i'll be able to rewrite them in python. A: Red Hat's Emerging Technologies group has Augeas (written in C, but with Python binding...
{ "language": "en", "url": "https://stackoverflow.com/questions/237209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you programmatically reorder children of an ATFolder subclass? I have Plone product that uses a custom folder type for containing a set of custom content objects. The folder type was created by subclassing BaseFolder and it has a schema with a couple of text fields. Currently, when custom objects are added ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Silverlight 2 and large canvases? I am working on an application that uses several large canvas controls (several thousand pixels across), layered on top of each other. The canvas controls themselves are completely invisible, but each contains a number of controls, mainly images. My question is, is there a recommen...
{ "language": "en", "url": "https://stackoverflow.com/questions/237218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tickmark algorithm for a graph axis I'm looking for an algorithm that places tick marks on an axis, given a range to display, a width to display it in, and a function to measure a string width for a tick mark. For example, given that I need to display between 1e-6 and 5e-6 and a width to display in pixels, the algor...
{ "language": "en", "url": "https://stackoverflow.com/questions/237220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Calling a WSE web-service though a proxy I'm using Web Services Enhancements 3.0 to call a web-service from an ASP.NET application written in C# with Visual Studio 2005. I can call the web-service in Internet Explorer if I change the network connection settings to use a specific SOCKS5 proxy but from the .ASPX page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DRYing up object instantiation in C# This code: public class WidgetPlatform { public Widget LeftmostWidget { get; set; } public Widget RightmostWidget { get; set; } public String GetWidgetNames() { return LeftmostWidget.Name + " " + RightmostWidget.Name; } } doesn't contain any repetiti...
{ "language": "en", "url": "https://stackoverflow.com/questions/237222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL - Table Design - DateCreated and DateUpdated columns For my application there are several entity classes, User, Customer, Post, and so on I'm about to design the database and I want to store the date when the entities were created and updated. This is where it gets tricky. Sure one option is to add created_times...
{ "language": "en", "url": "https://stackoverflow.com/questions/237225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to disable HTML encoding when using Context in django In my django application I am using a template to construct email body, one of the parameters is url, note there are two parametes separated by ampersand in the url. t = loader.get_template("sometemplate") c = Context({ 'foo': 'bar', 'url': 'http://127....
{ "language": "en", "url": "https://stackoverflow.com/questions/237235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: ASP.NET MVC Account Controller usage guidelines? I'm looking at the MVC account controller, and it seems to be from ASP.NET webforms. Is there any good background information on how to use it? Can you map it to a user database table or is it better to roll your own user management? How do you make use of it in MVC t...
{ "language": "en", "url": "https://stackoverflow.com/questions/237249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you handle oncut, oncopy, and onpaste in jQuery? The jQuery documentation says the library has built-in support for the following events: blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, key...
{ "language": "en", "url": "https://stackoverflow.com/questions/237254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How do I make Internet Explorer Open Invisibly in VB6? Doing like so: Shell ("C:\Program Files\Internet Explorer\iexplore.exe -embedding http://www.websiteurl.com") Doesn't work how I need it as I essentially need it to be able to redirect and prompt a user to download a file. Any ideas? A: Internet Explorer expos...
{ "language": "en", "url": "https://stackoverflow.com/questions/237268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are the custom targets you all run when using ant to build project? I am thinking of running this custom targets to find out more about my project build status - jalopy - jdepend - cvs tagdiff report - custom task for NoUnit - generate UML diagram. ESS-Model What are your views? A: I think that it's a great id...
{ "language": "en", "url": "https://stackoverflow.com/questions/237269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I find all the public fields of an object in C#? I'm constructing a method to take in an ArrayList(presumably full of objects) and then list all the fields(and their values) for each object in the ArrayList. Currently my code is as follows: public static void ListArrayListMembers(ArrayList list) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Where are Outlook's mail accounts settings stored and how to read them? If Outlook is installed on a PC, I need to read mail account settings using .NET but without using the Outlook object model. A: This thread includes notes on Outlook registry keys that may be useful.
{ "language": "en", "url": "https://stackoverflow.com/questions/237277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the optimal algorithm design for a water-saving urinal? At work, we have one of those nasty communal urinals. There is no flush handle. Rather, it has a motion sensor that sometimes triggers when you stand in front of it and sometimes doesn't. When it triggers, a tank fills, which when full is used to flush ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Where do you find templates useful? At my workplace, we tend to use iostream, string, vector, map, and the odd algorithm or two. We haven't actually found many situations where template techniques were a best solution to a problem. What I am looking for here are ideas, and optionally sample code that shows how you...
{ "language": "en", "url": "https://stackoverflow.com/questions/237285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Vim Configure Line Number Coloring I'm looking for a way to configure the color used for line numbering (as in: :set nu) in Vim. The default on most platforms seems to be yellow (which is also used for some highlighted tokens). I would like to color the line numbers a dim gray; somewhere in the vicinity of #555. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: Are there any emacs or vim editors with code completion plugins for C#? It would be nice if it did both a list of methods to choose from and the list of potential input parameters. This was done for powershell and I was curious if there was any similar functionality implemented for emacs or vim? Clarification: A fe...
{ "language": "en", "url": "https://stackoverflow.com/questions/237291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .NET Microframework SDK with VS 2008 I am trying to get started developing using the .NET Micro Framework but appear to have hit a road block. I am using Visual Studio 2008 and it will not let me install the SDK because I do not have Visual Studio 2005. I downloaded the SDK from this link. I know this is not truly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to count unique records and get number of these uniques in table using SQL? Imagine I have table like this: id:Product:shop_id 1:Basketball:41 2:Football:41 3:Rocket:45 4:Car:86 5:Plane:86 Now, this is an example of large internet mall, where there are shops which sell to one customer, so customer can choose mor...
{ "language": "en", "url": "https://stackoverflow.com/questions/237302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: prototypes versus classes Steve Yegge recently posted an interesting blog post on what he calls the universal design pattern. In there he details using prototypes as a modelling tool, instead of classes. I like the way this introduces less coupling compared to inheritance. But that is something one can get with clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/237307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Java: How does the VM handle a 64bit `long` on a 32bit processor How does the JVM handle a primitive "long", which is 64bits, on a 32bit processor? Can it utilise mulitple cores in parallel when on a Multi-Core 32bit machine? How much slower are 64bit operations on a 32bit machine? A: From TalkingTree, and the Jav...
{ "language": "en", "url": "https://stackoverflow.com/questions/237309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I change the animation style of a modal UIViewController? I'm currently displaying a UIViewController like this: [[self navigationController] presentModalViewController:modalViewController animated:YES]; and hiding it like this: [self.navigationController dismissModalViewControllerAnimated:YES]; The animat...
{ "language": "en", "url": "https://stackoverflow.com/questions/237310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: .net/exchange: add email addresses dynamically? I'm building a .NET application where I want to dynamically add an email address for users when they create an account, so that they can email themselves things to their account and see it in the app. The email address would be something like [account_name]@[site.com]....
{ "language": "en", "url": "https://stackoverflow.com/questions/237311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I change the background color of a resizable handle of a JQuery UI Dialog? You'd think it would be easy, but keep reading. I can change many of the styles associated with a resizable JQuery Dialog, but not the handles. The code below isolates the problem. Why does the handle disappear entirely? There mus...
{ "language": "en", "url": "https://stackoverflow.com/questions/237322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is metaprogramming possible in C#? In particular, would it be possible to have code similar to this c++ code executed at compile time in c#? template <int N> struct Factorial { enum { value = N * Factorial<N - 1>::value }; }; template <> struct Factorial<0> { enum { value = 1 }; }; // Factorial<4>::value...
{ "language": "en", "url": "https://stackoverflow.com/questions/237326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Oracle: how to UPSERT (update or insert into a table?) The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuff... where mykey=X else insert into t mystuff... Since Oracle...
{ "language": "en", "url": "https://stackoverflow.com/questions/237327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "323" }
Q: What knowledge do you need to create a patch for your game or application? I've always been mystified how software vendors can ship their application or game, and then later provide a different set of executables that change the behaviors of the previous build. How is this done? Do the original application and the p...
{ "language": "en", "url": "https://stackoverflow.com/questions/237331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Does partial page caching exist outside of asp.net? I use partial page caching with ASP.NET. I find it to be particularly helpful with large volume sites, where I need only certain sections of a page to cache. Do other web application platforms have this type of technology? A: It's usually called "fragment caching...
{ "language": "en", "url": "https://stackoverflow.com/questions/237338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Netbeans 6.1 (!5.5.1) - Turn off - wavy red underlines - How? How can I turn off the wavy red underlines in Netbeans? I don't want to be interrupted while I'm typing, and told that a half finished line of code is wrong. A: The answer here Netbeans - Turn off - wavy red underlines - How? seems to be more accurate… (...
{ "language": "en", "url": "https://stackoverflow.com/questions/237342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to solve Var out of scope within setTimeout call I am trying to call a setTimeout from within a setInterval callback: function callback() { //assign myVar var myVar = document.getElementById("givenID"); //... //now wait 2 secs then call some code that uses myVAr setTimeout("myVar.innerHTML = 'TEST...
{ "language": "en", "url": "https://stackoverflow.com/questions/237350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Does WPF have an easy way to display a navigable series of images? I'm making my first WPF application, and its purpose is to generate 6 images from some data. Ideally I'd like to display them in the window, with little "forward" and "back" buttons, and a text indicator for where we are in the image-stack. Kind of l...
{ "language": "en", "url": "https://stackoverflow.com/questions/237364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is PHP PDO DSN a different format for MySQL versus PostgreSQL? When I connect to a MySQL database using PDO, the way I need to connect is: $pdoConnection = new PDO("mysql:host=hostname;dbname=databasename",user,password); But, for PostgreSQL, the DSN is more standard (IMO): $pdoConnection = new PDO("pgsql:host=...
{ "language": "en", "url": "https://stackoverflow.com/questions/237367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Does "std::size_t" make sense in C++? In some code I've inherited, I see frequent use of size_t with the std namespace qualifier. For example: std::size_t n = sizeof( long ); It compiles and runs fine, of course. But it seems like bad practice to me (perhaps carried over from C?). Isn't it true that size_t is bui...
{ "language": "en", "url": "https://stackoverflow.com/questions/237370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How is the photoshop cutout filter implemented? Photoshop has a lot of cool artistic filters, and I'd love to understand the underlying algorithms. One algorithm that's particularly interesting is the Cutout filter (number 2 at the link above). It has three tunable parameters, Number of Levels, Edge Simplicity, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to best visualize a "permission Matrix" in an UML class diagram? For the sake of simplicity: There is a permission based system in place with different kinds of user levels and actions (think: UNIX file system permissions) What would be the best approach to visualize this in UML? A: I typically have classes tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/237373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting a collection of index values using a LINQ query Is there a better way to do this? string[] s = {"zero", "one", "two", "three", "four", "five"}; var x = s .Select((a,i) => new {Value = a, Index = i}) .Where(b => b.Value.StartsWith("t")) .Select(c => c.Index); i.e. I'm looking for a more efficient or more e...
{ "language": "en", "url": "https://stackoverflow.com/questions/237377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to reset svn-properties according to new SVN config? Recently I made a bunch of changes to my local svn config file. Mainly I corrected svn:mime-type properties of about 15 different file types. Now I need reset all previously checked in files according to this new configuration. SVN seems to trigger auto-prop o...
{ "language": "en", "url": "https://stackoverflow.com/questions/237382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I insert a linebreak where the cursor is without entering into insert mode in Vim? Is possible to insert a line break where the cursor is in Vim without entering into insert mode? Here's an example ([x] means cursor is on x): if (some_condition) {[ ]return; } Occasionally, I might want to enter some more cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/237383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: How to interpret the memory usage figures? Can someone explain this in a practical way? Sample represents usage for one, low-traffic Rails site using Nginx and 3 Mongrel clusters. I ask because I am aiming to learn about page caching, wondering if these figures have significant meaning to that process. Thank you....
{ "language": "en", "url": "https://stackoverflow.com/questions/237405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Pushing an existing Git repository to Github only sends about half the commits? I have a local Git repository I've been developing under for a few days: it has eighteen commits so far. Tonight, I created a private Github repository I was hoping to push it to; however, when I did so, it only ended up pushing eight of...
{ "language": "en", "url": "https://stackoverflow.com/questions/237408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Why do some installers need to restart the computer before you run the program? I'm fairly new to deploying desktop applications, so this is the first time I'm building an installer for my software. Currently, the first time I run my software after installing it, it crashes. After that, it runs fine. I'm still in...
{ "language": "en", "url": "https://stackoverflow.com/questions/237414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: LINQ to SQL - I'm attempting to use LINQ to insert a record into a child table and I'm receiving a "Specified cast is not valid" error that has something to do w/ the keys involved. The stack trace is: Message: Specified cast is not valid. Type: System.InvalidCastException Source: System.Data.Linq TargetSite: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Where can I find JQuery UI themes besides "flora"? Is there a repository for JQuery UI themes? A: Ah, there's http://ui.jquery.com/themeroller
{ "language": "en", "url": "https://stackoverflow.com/questions/237418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rails generator m.directory returns can't convert nil into String I have written this generator code but it returns 'can't convert nil into String' when I call m.directory inside the manifest. Anyone know what had happened? class AuthGenerator < Rails::Generator::NamedBase attr_reader :user_class_name def initia...
{ "language": "en", "url": "https://stackoverflow.com/questions/237423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the coolest examples of metaprogramming that you've seen in C++? What are the coolest examples of metaprogramming that you've seen in C++? What are some practical uses of metaprogramming that you've seen in C++? A: Coolest metaprogramming example: tricking the compiler into computing a list of prime number...
{ "language": "en", "url": "https://stackoverflow.com/questions/237425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: python properties and inheritance I have a base class with a property which (the get method) I want to overwrite in the subclass. My first thought was something like: class Foo(object): def _get_age(self): return 11 age = property(_get_age) class Bar(Foo): def _get_age(self): return 44...
{ "language": "en", "url": "https://stackoverflow.com/questions/237432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Redirect to controller (but with a different master) using a catchall wildcard I have a problem whereby I want to display a view differently (a different master page), depending on where it came from, but don't know where to start... I have several routes which catch various different types of urls that contain diff...
{ "language": "en", "url": "https://stackoverflow.com/questions/237440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the easiest way to do 'is' in Java? Many languages have a facility to check to see if an Object is of a certain type (including parent subclasses), implemented with 'is' and used like this: if(obj is MyType) Or slightly more tediously you can in other languages check by using the 'as' keyword to do a soft t...
{ "language": "en", "url": "https://stackoverflow.com/questions/237464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Basic example of serial communication with Windows XP/win32 I am working with a peripheral device that needs to be communicated through serial. I can send it commands using HyperTerminal, but now I need to write programs that will let me do it without HyperTerminal. Can somebody point me to a website and/or show m...
{ "language": "en", "url": "https://stackoverflow.com/questions/237487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do you handle bandwidth billing on shared servers in apache? What solutions do you have in place for handling bandwidth billing for your vhosts on a shared environment in apache? If you are using log parsing, does your solution scale well when the logs become very very large? Anyone using any sort of module ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/237502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WPF databinding/validation for URIs? My current setup binds the Text property of my TextBox to a certain Uri object. I'd love to use WPF's inbuilt validation to detect invalid URIs, and proceed from there. But this doesn't seem to be working? I would imagine that it would throw an exception if I entered, e.g., "aaaa...
{ "language": "en", "url": "https://stackoverflow.com/questions/237539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting base name of the source file at compile time I'm using GCC; __FILE__ returns the current source file's entire path and name: /path/to/file.cpp. Is there a way to get just the file's name file.cpp (without its path) at compile time? Is it possible to do this in a portable way? Can template meta programming be...
{ "language": "en", "url": "https://stackoverflow.com/questions/237542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Google Chrome and Streaming HTTP connections? Google chrome doesn't behave the same as other browsers when encountering this nugget: <?php while (true) { echo "<script type='text/javascript'>\n"; echo "alert('hello');\n"; echo "</script>"; flush(); sleep(5); } ?> It seems that it's waiting for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java Vector Field (private member) accumulator doesn't store my Cows! Edit: This code is fine. I found a logic bug somewhere that doesn't exist in my pseudo code. I was blaming it on my lack of Java experience. In the pseudo code below, I'm trying to parse the XML shown. A silly example maybe but my code was too ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: java.lang.Exception vs. rolling your own exception At what point would you create your own exception class vs. using java.lang.Exception? (All the time? Only if it will be used outside the package? Only if it must contain advanced logic? etc...) A: I believe that: catch (Exception e) { ... } ... is an antipatte...
{ "language": "en", "url": "https://stackoverflow.com/questions/237585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: SQL Server 2005: Wrapping Tables by Views - Pros and Cons Background I am working on a legacy small-business automation system (inventory, sales, procurement, etc.) that has a single database hosted by SQL Server 2005 and a bunch of client applications. The main client (used by all users) is an MS Access 2003 applic...
{ "language": "en", "url": "https://stackoverflow.com/questions/237601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Obj-C -> Incrementing a number (and showing steps on a Cocoa label) I'm new with Objective-C, so there probably is a simple solution to this. I want a number to increment, but each iteration to be show on a label. (for example, it shows 1, 2, 3, 4, 5... displayed apart by an amount of time). I tried: #import "testNu...
{ "language": "en", "url": "https://stackoverflow.com/questions/237621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I link files in PHP? I have two PHP files that I need to link. How can I link the files together using PHP? The effect I want is to have the user click a button, some information is proccessed on the page, and then the result is displayed in a different page, depending on the button the user clicked.Thanks A...
{ "language": "en", "url": "https://stackoverflow.com/questions/237631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Retrieve Selected Text from a Web Browser Control in a Here's what I am trying to do: Select text from a webpage I pulled up using my web browser control.After clicking a button while this text is still selected I would like a message box to pop-up displaying the text that was highlighted by the user. How do I get t...
{ "language": "en", "url": "https://stackoverflow.com/questions/237675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET MVC Beta Ajax upgrade problem I been waiting for sometime now to bring my Asp.net Preview 4 project up to snuff, totally skipping Preview 5 just because I knew I would have some issues. Anyhow, here is the question and dilemma. I have a few areas on the site which I have an ajax update type panel that render...
{ "language": "en", "url": "https://stackoverflow.com/questions/237691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I parse a listing of files to get just the filenames in Python? So lets say I'm using Python's ftplib to retrieve a list of log files from an FTP server. How would I parse that list of files to get just the file names (the last column) inside a list? See the link above for example output. A: Using retrlines(...
{ "language": "en", "url": "https://stackoverflow.com/questions/237699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: system() copy fails, while cmd copy works In cmd.exe, I can execute the command "copy c:\hello.txt c:\hello2.txt" and it worked fine. But in my C program, I ran this piece of code and got the following error: #include <iostream> using namespace std; int main() { system("copy c:\hello.txt c:\hello2.txt"); s...
{ "language": "en", "url": "https://stackoverflow.com/questions/237703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can web server settings override .htaccess file? I have build a website. in that website there is section to download file using php script. our company has two ISP connections. one ISP allows to dowload file but other blocks it. i thought this is browser problem but after hit and try methods, i come to conclusion t...
{ "language": "en", "url": "https://stackoverflow.com/questions/237707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Delphi to .NET + C# I've been a Delphi (D7) developer for many sometime already, I've always been wondering about the .NET + C# stuffs. What I mean are about not the "Delphi for .NET" or "Oxygene" tech/plugin, but clean .NET/C#. How much different is it from Delphi? And some other questions... * *Is Mono/SharpDev...
{ "language": "en", "url": "https://stackoverflow.com/questions/237715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to write a function like next_permutation but that only permutes r values, instead of n? std::next_permutation (and std::prev_permutation) permute all values in the range [first, last) given for a total of n! permutations (assuming that all elements are unique). is it possible to write a function like...
{ "language": "en", "url": "https://stackoverflow.com/questions/237716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to begin with Ruby on Rails using Windows I've tried downloading the Rails package and installing it on Windows, but have no idea to make it work. I have had some experience with this commbination: * *PHP 4.x + 5.x (Windows) *LIGHTTPD (Windows) *Connecting to a Firebird Database (Windows) Can anybody enli...
{ "language": "en", "url": "https://stackoverflow.com/questions/237725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Daylight savings time change affecting the outcome of saving and loading an icalendar file? I have some unit tests that started failing today after a switch in daylight savings time. We're using the iCalendar python module to load and save ics files. The following script is a simplified version of our test. The scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/237731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do programmers practice code reuse I've been a bad programmer because I am doing a copy and paste. An example is that everytime i connect to a database and retrieve a recordset, I will copy the previous code and edit, copy the code that sets the datagridview and edit. I am aware of the phrase code reuse, but I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/237733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Java Comparator Does any one know of some kind of Comparator factory in Java, with a public Comparator getComparatorForClass(Class clazz) {} It would return Comparators for stuff like String, Double, Integer but would have a public void addComparatorForClass(Class clazz, Comparator comparator) {} For arbitrary ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/237745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Customizing the Places Bar in Visual Studio 2008 Has anybody succeeded in customizing the Places Bar for VS 2008? My customizations from VS 2005 did not transfer to 2008 (obviously), and no matter what I do with the registry, I cannot make my custom places appear on the Open dialogs. I have read and applied the rele...
{ "language": "en", "url": "https://stackoverflow.com/questions/237748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: php executing an executable (that writes to the serial port) and freezes I have a php script that is executing an executable that writes to a serial port. However, everytime it runs system("c:\Untitled1.exe") it just opens up a cmd window and freezes. Anybody know how to fix this? Or if there is an easier way to ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/237757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How in .Net do I Import Values from a CSV in the format I want using OleDB? I have a CSV file that has a column that contains strings that look like integers. That is they should be dealt with as strings, but since they are numbers they appear to be imported as integers (dropping off the leading zeroes). Example Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/237763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a better way to change a DOMElement->tagName property in php? I just ran into this building a Textbox control for my MVC framework, where just before finalizing the whole document I call PreRender on everything that inherits from ServerTag (which in turn inherits from DOMElement). The only way i have found ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Which portals do you recommend for the latest programming technology For my area, I get the updates from * *ww.asp.net *code.google.com *www.webmasterworld.com What others do you highly recommend? A: For anything .NET you cant go past Scott Gu's blog. A: DZone is pretty good if you want to know what's happ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WCF Bindings - so many! How do I choose one? We have an R Server (R is a programming language used in statistical analysis) that basically takes a script and a csv file, processes some data and returns results as text. I need to write a service on the R server so that .net clients (could be .Net Windows Forms, or A...
{ "language": "en", "url": "https://stackoverflow.com/questions/237794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What new capabilities do user-defined literals add to C++? C++11 introduces user-defined literals which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation. Examples: // imaginary numbers std::complex<long...
{ "language": "en", "url": "https://stackoverflow.com/questions/237804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "146" }
Q: .NET SslStream doesn't close TLS connection properly .NET's SslStream class does not send the close_notify alert before closing the connection. How can I send the close_notify alert manually? A: Thanks for this question. It pointed me into the right direction, that there is a bug in .Net, which I do not very often ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: MySQL encrypted columns Say each row in a table has data pertaining to one particular user. The user has a password to access the system. How do I encrypt a column of data using InnoDB so that no one other than the user who's data it is can read the data ? I was thinking of something like using one of the MySQL encr...
{ "language": "en", "url": "https://stackoverflow.com/questions/237816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to embed AsciiMathML in Google Sites? We would need to embed mathematical formulas through AsciiMathML into Google Sites pages (internal wiki for a research team). I am stuck with the limitation of Google Sites. Any idea how to do that? (ps: I have finally found a poorly practical work-around, but better ideas w...
{ "language": "en", "url": "https://stackoverflow.com/questions/237822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I override a class in J2ME Polish binaries? I am using a UI component from J2ME Polish. I found a simple bug in the code, and want to quickly fix it but cannot find any build scripts in the download package, although source-code is included. The problem cannot be solved by extending the class as it involves...
{ "language": "en", "url": "https://stackoverflow.com/questions/237828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flex cannot deserialize webservice element that contains only attributes I'm seeing a very strange issue with a .NET webservice being consumed by Flex. I have a very simple class with nothing other than properties with [XmlAttribute('xxx')] attributes. public class OrderAddress { public OrderAddress() {} [X...
{ "language": "en", "url": "https://stackoverflow.com/questions/237832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Communication between server and client for WinForms I have 50+ kiosk style computers that I want to be able to get a status update, from a single computer, on demand as opposed to an interval. These computers are on a LAN in respect to the computer requesting the status. I researched WCF however it looks like I'll ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to host multiple webapps using only 2 Virtual Directories my shared hosting only allows me to create 2 virtual directories. and i want to host multiple webapps... say an asp.net mvc blog, a forum, a personal site etc... isnt there any other way of doing this? cant i simply just ftp the blog folder to one of my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }