text
stringlengths
8
267k
meta
dict
Q: MRU list in Visual studio is missing A couple of months ago, the MRU list in Visual Studio stopped working. Neither the File menu or the start page shows any recently opened projects or solutions. I honestly have no clue what I did to cause this, but perhaps someone who knows more about the murky depths of VS might...
{ "language": "en", "url": "https://stackoverflow.com/questions/327881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Reasoning behind ASP.NET MVC ActionResult being an abstract class? In ASP.NET MVC, the ActionResult class, which is the base for all results returned by action methods from a controller, is defined as an abstract class with the single method (© Microsoft): public abstract void ExecuteResult(ControllerContext context...
{ "language": "en", "url": "https://stackoverflow.com/questions/327885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to write a compare function for qsort from stdlib? I have a structure: struct pkt_ { double x; double y; double alfa; double r_kw; }; typedef struct pkt_ pkt; A table of these structures: pkt *tab_pkt; tab_pkt = malloc(ilosc_pkt * sizeof(pkt)); What I want to do is to sort tab_pkt by tab_pkt.alfa and...
{ "language": "en", "url": "https://stackoverflow.com/questions/327893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Upgrade a Windows Service without Uninstalling Currently I have to uninstall the old version of my service before I install the new version. I am pretty sure this has something to do with it not being smart enough to update or remove the old service entries before adding the new ones. Is there a way to have the inst...
{ "language": "en", "url": "https://stackoverflow.com/questions/327895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: how to draw lines on a picture background in pygame I would like to draw lines (of arbitrary position and length) onto a surface in pygame, which itself is an image loaded from a file on disk. Can anyone point me to some example code that does this? A: This should do what you're asking for: # load the image image =...
{ "language": "en", "url": "https://stackoverflow.com/questions/327896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What perfromance improvement will I get by moving to lighttpd from Apache? I currently have a cluster of 4 Apache web servers which are used to serve up static files of up to 30Mb in size. Generally, I can expect up to 5000 concurrent connections to these servers. What performance improvement would I expect to get...
{ "language": "en", "url": "https://stackoverflow.com/questions/327899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help me find this Use Case story I remember reading a how-to book several years ago, about Use Cases. (This was probably before user stories supplanted this part of the terminology.) The task at hand was something like adding new customers. There was roughly a 1-page offset section that described a couple developers...
{ "language": "en", "url": "https://stackoverflow.com/questions/327902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using double, return string In the application I'm writing, one of the methods allows for the numbers the user entered to be turned into letters. For example, the user will be entering grades (as doubles) and the program will decide (when the criteria is met) to return the letter associated with the number. Initiall...
{ "language": "en", "url": "https://stackoverflow.com/questions/327904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: FormsAuthentication after login Ok, i have simple scenario: have two pages: login and welcome pages. im using FormsAuthentication with my own table that has four columns: ID, UserName, Password, FullName When pressed login im setting my username like: FormsAuthentication.SetAuthCookie(userName, rememberMe ?? false);...
{ "language": "en", "url": "https://stackoverflow.com/questions/327913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Redim Preserve in C#? I was shocked to find out today that C# does not support dynamic sized arrays. How then does a VB.NET developer used to using ReDim Preserve deal with this in C#? At the beginning of the function I am not sure of the upper bound of the array. This depends on the rows returned from the database....
{ "language": "en", "url": "https://stackoverflow.com/questions/327916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: In CSS, is anchor the only element that supports pseudo style properties? I was thinking of using these styles for easier cell rollover effects in a datagrid, but I can't seem to get these styles working on anything other than the most basic of tag. Is the <a> anchor tag the only element in HTML to support styles li...
{ "language": "en", "url": "https://stackoverflow.com/questions/327933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way to forward all requests on a certain port to another machine on the network? I have two dedicated servers and no hardware firewall. I'd like to forward all requests that come into the primary server on port 1008 to be fulfilled by another dedicated server on the same network. I know I need to se...
{ "language": "en", "url": "https://stackoverflow.com/questions/327952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does functional programming replace GoF design patterns? Since I started learning F# and OCaml last year, I've read a huge number of articles which insist that design patterns (especially in Java) are workarounds for the missing features in imperative languages. One article I found makes a fairly strong claim: Most...
{ "language": "en", "url": "https://stackoverflow.com/questions/327955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1136" }
Q: How to handle stacked controls in .NET Winforms? I have a form that will multiple Panel controls stacked on top of each other, each one being shown/hidden based on other selected options on the form. This has been a real pain to manage in the form designer as the panels don't behave like a full TabControl. However, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/327968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's in your PHP toolset? Every PHP programmer likely uses at least some form of a template engine and a database abstraction layer, but apart from those what extras do you consider essential or would recommend your fellow programmers try out? A: * *A good framework. PHP has many to choose from: Zend's, Solar, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/327977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Connect SQL Server Compact 3.5 Database to MS Access 2003 using ADO? Is it possible to write connect and open a SQL Compact 3.5 database from within MS Access 2003? I want to be able to use MS Access 2003 to manipulate data in a SQL Compact 3.5 database. If it is possible, then what statements would be used to ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/327982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can my javascript determine if it was called by WScript or a browser? I am trying to write a javascript program that can be called from either WScript or a browser (embedded in html). Many javascript functions are independent of the type of caller, but not the debugging functions, such as "window.write" or "WSc...
{ "language": "en", "url": "https://stackoverflow.com/questions/327983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF databinding to interface and not actual object - casting possible? Say I have an interface like this: public interface ISomeInterface { ... } I also have a couple of classes implementing this interface; public class SomeClass : ISomeInterface { ... } Now I have a WPF ListBox listing items of ISomeInterface, us...
{ "language": "en", "url": "https://stackoverflow.com/questions/327984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: How do I modify the last line of a file? The last line of my file is: 29-dez,40, How can I modify that line so that it reads: 29-Dez,40,90,100,50 Note: I don't want to write a new line. I want to take the same line and put new values after 29-Dez,40, I'm new at python. I'm having a lot of trouble manipulating fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/327985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What software do I use to put floppies as images on a hard disk? I still have a large number of floppies. On some of them there probably is source code I don't want to lose. I also don't want to take look at each one individually, as that's going to take a lot of time. What software would be best for copying all dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/327986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: HTTP POST XML to REST Singleton Service throws NotSupportedException I have the following REST Host in a silverlight application. I'm getting a NotSupportedException on the EndGetResponse() call of the Save Method. In this sample I'm using the default config for a REST Singleton Service from the WCF REST Starter K...
{ "language": "en", "url": "https://stackoverflow.com/questions/327996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: wxpython: Updating a dict or other appropriate data type from wx.lib.sheet.CSheet object If I have a notebook with three spreadsheet widgets, what is the best way to have changes to the spreadsheet update a dictionary (or maybe an sqlite file?). Do all wx grid objects come with a built in dictionary related to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# - closing Sql objects best practice If you have a C# function with Sqlaccess, is it mandatory to close all objects/handles, or is everything cleaned up automatically once you exit the function For example: void DoSqlStuff() { SqlConnection sqlConn = new SqlConnection(...); SqlCommand cmd = new SqlCommand(...
{ "language": "en", "url": "https://stackoverflow.com/questions/328005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Path to MSBuild How can I programatically get the path to MSBuild from a machine where my .exe is running? I can get the .NET version from the Environment but is there a way of getting the correct folder for a .NET version? A: This works for Visual Studio 2015 and 2017: function Get-MSBuild-Path { $vs14key = "...
{ "language": "en", "url": "https://stackoverflow.com/questions/328017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "211" }
Q: How to load bmp into GLubyte array? All, I am trying to load up a bmp file into a GLubyte array (without using aux). It is unbelievable how what I thought would have been a trivial task is sucking up hours of my time. Can't seem to find anything on Google! This is what I hacked together but it's not quite working: /...
{ "language": "en", "url": "https://stackoverflow.com/questions/328019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would you read input file in Scheme? I am trying to input data from a .txt file into a scheme structure. Each element is separated by a tab in the data file and each structure set is on a new line. I want to be able to read in the data from one line into a structure and make a list of each structure set in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/328020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Flex Icon on Button sizing [Design] I would like to size the width of my button according to its icon image. I tried to force padding to 0 with no success. In a tile <mx:Button id="m1" icon="@Embed('m1.png')"/> See the result http://img513.imageshack.us/my.php?image=iconkg3.png How could i change this gap ? icon h...
{ "language": "en", "url": "https://stackoverflow.com/questions/328022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I prevent passwords from being saved? I've noticed on bank websites, etc, my user IDs aren't saved (they don't appear in a dropdown like other commonly entered stuff does) and there's no prompt for it to remember your password. How is this done? How do the sites notify the browser that they are in 'special' o...
{ "language": "en", "url": "https://stackoverflow.com/questions/328023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Check if an enum has a field that equals a string I have an enum public enum FileExtentions { mp3, mpeg } And I have a FileInfo of which I want to check if the extension is in the previous enum. I was hoping I could do a FileExtensions.Any(e=>e.ToString().Equals(file.Extension)); But that would have been...
{ "language": "en", "url": "https://stackoverflow.com/questions/328025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Scripting language choice for initial performance I have a small lightweight application that is used as part of a larger solution. Currently it is written in C but I am looking to rewrite it using a cross-platform scripting language. The solution needs to run on Windows, Linux, Solaris, AIX and HP-UX. The existing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Data structure question I have a database table with a large number of rows and one numeric column, and I want to represent this data in memory. I could just use one big integer array and this would be very fast, but the number of rows could be too large for this. Most of the rows (more than 99%) have a value of ze...
{ "language": "en", "url": "https://stackoverflow.com/questions/328044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Create a List that contain each Line of a File I'm trying to open a file and create a list with each line read from the file. i=0 List=[""] for Line in inFile: List[i]=Line.split(",") i+=1 print List But this sample code gives me an error because of the i+=1 saying that index is out of range...
{ "language": "en", "url": "https://stackoverflow.com/questions/328059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How to make a surface with a transparent background in pygame Can someone give me some example code that creates a surface with a transparent background in pygame? A: This should do it: image = pygame.Surface([640,480], pygame.SRCALPHA, 32) image = image.convert_alpha() Make sure that the color depth (32) stays ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/328061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: .NET OpenId Library - both Provider and Consumer I would like to add OpenId support to an app. It runs on ASP.NET MVC, and I would like to have it support OpenId authentication for users, and also allow users to use the app as an OpenId Provider. So basically I am looking for a good library that can be used as a pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/328079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can you determine a point is between two other points on a line segment? Let's say you have a two dimensional plane with 2 points (called a and b) on it represented by an x integer and a y integer for each point. How can you determine if another point c is on the line segment defined by a and b? I use python mos...
{ "language": "en", "url": "https://stackoverflow.com/questions/328107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "119" }
Q: Best relationships between one table and some other tables, each of them depending on n datasets of the first table? I have one table that saves comments for a varied set of content types. These are saved in other tables (news, articles, users). I wonder what's the best way to connect these tables? In previous proj...
{ "language": "en", "url": "https://stackoverflow.com/questions/328123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I move a wpf window into a negative top value? If I use dragMove the wpf window will not move to a location where the y value is negative. I can however set the windows top value to a negative value. Is there a simple way to enable dragMove to allow the top of the window to be moved above the displays 0 pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/328127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Creating custom transparent control I am trying to create a custom control that displays a bitmap with per-pixel alphablend (as some of you already know for other questions). Right now I am using a custom control in the resource editor and I attach it to a class derived from CWnd. When I register my custom class I s...
{ "language": "en", "url": "https://stackoverflow.com/questions/328135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Document Management for an Application We are designing an application which would also have a need to manage a large number of files (docs, spreadsheets, scanned files, pdfs, etc.). We will need to associate files with other data in the system. This will be a web-based application.(asp.net) While there are many way...
{ "language": "en", "url": "https://stackoverflow.com/questions/328151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Controlling a Flash Player using JavaScript I would like to be able to control a flash movie stream using JavaScript in the same pages as the flash component including: * *Play and Pause stream *Change Stream I can already load the player and set the flash args, but I don't know how to interact with the player...
{ "language": "en", "url": "https://stackoverflow.com/questions/328194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to free up a key combination in visual studio? I want to assign a hotkey to a function, but the keys are already used in some other functions' combination. How can I easely remove this hotkey from all these entries so I free it up and am able to asign it to the function I want? A: I am using Visual Studio C# Ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/328199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I override the GenerationType strategy using Hibernate/JPA annotations? I'm considering using Annotations to define my Hibernate mappings but have run into a problem: I want to use a base entity class to define common fields (including the ID field) but I want different tables to have different ID generation...
{ "language": "en", "url": "https://stackoverflow.com/questions/328202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Subclassing a UIViewController, when and when not to I'm in a hypothetical situation in which I need to list students in a school. I have one table view controller that has several sections, representing a school. Each school has subsequent students. Now, I have the requirement to give the user the capability to vie...
{ "language": "en", "url": "https://stackoverflow.com/questions/328206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a C compiler that fails to compile this? I was hanging out in my profiler for a while trying to figure out how to speed up a common log parser which was bottlenecked around the date parsing, and I tried various algorithms to speed things up. The thing I tried that was fastest for me was also by far the most...
{ "language": "en", "url": "https://stackoverflow.com/questions/328215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: DictionaryBase to generics . if i have a .net 1.1 class that inherits from DictionaryBase and i am moving this to 2.0.. what is the generics equivalent to change this to? A: You're looking for KeyedCollection
{ "language": "en", "url": "https://stackoverflow.com/questions/328235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to concatenate characters in java? How do you concatenate characters in java? Concatenating strings would only require a + between the strings, but concatenating chars using + will change the value of the char into ascii and hence giving a numerical output. I want to do System.out.println(char1+char2+char3... an...
{ "language": "en", "url": "https://stackoverflow.com/questions/328249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Script is re-reading arguments When I supply the script with the argument: hi[123].txt it will do exactly what I want. But if I specify the wildcard character ( hi*.txt ) it will be re-reading some files. I was wondering how to modify this script to fix that silly problem: #!/bin/sh count="0" total="0" FILE="$1" #...
{ "language": "en", "url": "https://stackoverflow.com/questions/328264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NSTableView -setDataSource not working when triggered by FSEvents So here's what I've got: * *An NSTableView with an NSMutableArray data source *FSEvents monitoring a folder that contains the file that contains the data for the table view (Using SCEvents for Objective-C abstraction goodness) *The FSEvents trig...
{ "language": "en", "url": "https://stackoverflow.com/questions/328277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why "Content-Length: 0" in POST requests? A customer sometimes sends POST requests with Content-Length: 0 when submitting a form (10 to over 40 fields). We tested it with different browsers and from different locations but couldn't reproduce the error. The customer is using Internet Explorer 7 and a proxy. We asked ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Post processing of reverse proxied HTTP requests? (like Akamai's ESI) We run a relatively high volume content site. Like most content sites, the majority of each page is relatively static. The articles rarely change, making them good candidates for some form of static/edge caching. There are two big problems, tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/328309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are some use cases for various DispatcherServlet.detectAllXxx flags? In Spring Web MVC, the DispatcherServlet has a bunch of flags, such as detectAllHandlerMappings detectAllHandlerAdapters detectAllHandlerExceptionResolvers detectAllViewResolvers that allow you to choose between finding all type-matched beans ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Good resources concerning linking process in compilation I've been coding for some time, and I always thought the linking phase of compilation was pretty straight forward, but recently I had to add a plugin system to an app, and I ran into quite a few compilation and runtime problems, due to my complete lack of know...
{ "language": "en", "url": "https://stackoverflow.com/questions/328336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using SharpZipLib to unzip specific files? I'm trying to use SharpZipLib to pull specified files from a zip archive. All of the examples I've seen always expect that you want to unzip the entire zip, and do something along the lines of: FileStream fileStreamIn = new FileStream (sourcePath, FileMode.Open, File...
{ "language": "en", "url": "https://stackoverflow.com/questions/328343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Add image to a navigationItem's title I'd like to add a logo to the left of my title on my navigation bar. The title property seems to only take an NSString. What's the best way to add an image to the navigation bar? A: You can replace the title view with an image like this: navigationItem.titleView = [[UIImageVie...
{ "language": "en", "url": "https://stackoverflow.com/questions/328352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: In Firefox, can I figure out which random word in a div full of words the mouse is hovering? For example, if I have: <div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur urna felis, convallis quis, placerat in, elementum quis, libero. Nam quis lacus. Vivamus rhoncus quam et metus. Praesent et vel...
{ "language": "en", "url": "https://stackoverflow.com/questions/328355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Extracting text from HTML file using Python I'd like to extract the text from an HTML file using Python. I want essentially the same output I would get if I copied the text from a browser and pasted it into notepad. I'd like something more robust than using regular expressions that may fail on poorly formed HTML....
{ "language": "en", "url": "https://stackoverflow.com/questions/328356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "307" }
Q: Single Remote Desktop session in Server 2003 I have a headless server running Windows Server 2003, and administer it via VNC. It is set to auto login to a specific user account. I want to change to using Remote Desktop/Terminal Services. However, when I log in remotely a new user session is created (in addition to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/328368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: GSM modem library I'm looking for SMS library that is written in c#, anyone the best library for it and it's free ? I can find more than 1 in Linux, but I'm can't found anything that is written in c# and free A: Most GSM modem will come with a library of it's own. You don't really need the library to be written in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: htmlentities equivalent in JSP? I'm a php guy, but I have to do some small project in JSP. I'm wondering if there's an equivalent to htmlentities function (of php) in JSP. A: public static String stringToHTMLString(String string) {... The same thing does utility from commons-lang library: org.apache.commons.lang....
{ "language": "en", "url": "https://stackoverflow.com/questions/328381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to do JavaScript object introspection? What to do when after all probing, a reportedly valid object return 'undefined' for any attribute probed? I use jQuery, $('selector').mouseover(function() { }); Everything returns 'undefined' for $(this) inside the function scope. The selector is a 'area' for a map tag and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to store and reset a PHP array pointer? I have an associative array, ie $primes = array( 2=>2, 3=>3, 5=>5, 7=>7, 11=>11, 13=>13, 17=>17, // ...etc ); then I do // seek to first prime greater than 10000 reset($primes); while(next($primes) < 10000) {} prev($primes); // iterate until target found ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Regex to replace all \n in a String, but no those inside [code] [/code] tag I need help to replace all \n (new line) caracters for in a String, but not those \n inside [code][/code] tags. My brain is burning, I can't solve this by my own :( Example: test test test test test test test test [code]some test code [/co...
{ "language": "en", "url": "https://stackoverflow.com/questions/328387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Last indexed cell in UITableView is taking on wrong font I have the following code which is trivial at first sight. I simply set want to set the font type to Georgia with a size of 14 if the cell is from the result of a search or if there is a count of zero in my students array. However, with this particular code c...
{ "language": "en", "url": "https://stackoverflow.com/questions/328391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can D-Bus be used over streams which aren’t Unix domain sockets? I am using DBus in a project. I understand from DBus specification that for low level communication, it uses Unix domain sockets. I don't want to use Unix domain sockets for low level communication because I have a modified connect() call. Is there any...
{ "language": "en", "url": "https://stackoverflow.com/questions/328393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Quick Ramp-up for ASP.NET I am an experienced .NET applications developer. All of my development experience has been with desktop apps with WinForms/WPF. The last time I worked with ASP was back in 1998. A lot has changed with ASP.NET, and I realize this. I am wondering what is the best resource for ramping up ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Pros and Cons of Adobe Flex as a Web 2.0 Framework I came across the Adobe Flex framework one day. After watching http://www.adobe.com/products/flex/media/flexapp/'> the demo of Flex, it looks to me it is a bundle of different Ajax controls. I have no working knowledge of Flex at all and know very little about Fl...
{ "language": "en", "url": "https://stackoverflow.com/questions/328397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best way to get my avi files into flv format? I need to embed videos on a client's website and they have given the following guidelines: * *must be viewable as flash (FLV format) *if hosted by outside company (e.g. Youtube) the video can not link back to the outside company's website *if hosted by o...
{ "language": "en", "url": "https://stackoverflow.com/questions/328406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery Autocomplete: Determining if entered text is not a match I've got jQuery Autocomplete (UI 1.6rc2) up and running fine and when the user picks an item, it updates a hidden form value with the associated ID. How do I set the hidden form value to '0' when the text entered does not match a result from the autocom...
{ "language": "en", "url": "https://stackoverflow.com/questions/328430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Coupling in iPhone API I've always been baffled about the strange coupling in the iPhone API -- in particular, with the UIViewController, which has hard-coded references to a UITabBarItem, UITabBarController, etc. So, you end up adding a UIViewController to a UITabBarController, which in turn queries the UIViewContr...
{ "language": "en", "url": "https://stackoverflow.com/questions/328438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: dpkg cannot install phpMyAdmin and MySQL (Ubuntu) I'm attempting to install phpMyAdmin, but I constantly get errors. When I type this in the terminal: sudo dpkg --configure -a The following message appears: Setting up mysql-server-5.0 (5.0.45-1ubuntu3) ... * Stopping MySQL database server mysqld ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to decide which is right, WebForms or MVC when doing ASP.NET So I'm about to start of a small project for my sporting club for member registrations and I'm trying to decide between WebForms or MVC. Allit will be is a user login and data capture forms (or and data retrieval), so I was initally thinking WebForms w...
{ "language": "en", "url": "https://stackoverflow.com/questions/328465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Having issues with GD thumbnail generator I'm using PHP to generate thumbnails. The problem is that I have a set width and height the thumbnails need to be and often times the images are stretched. What I'd like is the image to remain at the same proportions and just have black filler (or any color) either on the le...
{ "language": "en", "url": "https://stackoverflow.com/questions/328468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: trouble sending mail with free smtp I am trying to send mail from a local iis app using localhost as my smtp server after installing free smtp but I am getting the following error: Mailbox unavailable. The server response was: Invalid recipient: 'validAddress'@hotmail.com Any idea what the problem could be? A: it...
{ "language": "en", "url": "https://stackoverflow.com/questions/328472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do i pass a complex object to another View in ASP.NET MVC? I'm trying to pass a complex object (that can be serialized, if that helps) to another view. Currently this is the code i have, in some controller method :- User user = New User { Name = "Fred, Email = "xxxx" }; return RedirectToAction("Foo", user); now...
{ "language": "en", "url": "https://stackoverflow.com/questions/328474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Should we compare floating point numbers for equality against a *relative* error? So far I've seen many posts dealing with equality of floating point numbers. The standard answer to a question like "how should we decide if x and y are equal?" is abs(x - y) < epsilon where epsilon is a fixed, small constant. This is...
{ "language": "en", "url": "https://stackoverflow.com/questions/328475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Where is Juval Lowy's ServiceModelEx library for WCF? WCF is Microsoft's replacement for .Net Remoting and Web services. It's critical to understand if you are a .NET component developer. The best reference for WCF appears to be (by word of mouth, blogs and Amazon) Juval Lowy's "Programming WCF Services," publish...
{ "language": "en", "url": "https://stackoverflow.com/questions/328485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Monitoring a displays state in python? How can I tell when Windows is changing a monitors power state? A: It seems that, when Windows wants to start the screen saver or turn the monitor off, it will send a WM_SYSCOMMAND to the topmost window with a wParam of SC_SCREENSAVE (to start the screen saver) or a wParam of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting monitor power state in python? How can I send a monitor into/out-of a different power state (like sleep)? A: After looking at this article: http://vbnet.mvps.org/index.html?code/screen/scmonitorpower.htm It appears you need to send a SendMessage call similar to: SendMessage(Me.hWnd, WM_SYSCOMMAND, SC_MONITO...
{ "language": "en", "url": "https://stackoverflow.com/questions/328492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When would you use the Builder Pattern? What are some common, real world examples of using the Builder Pattern? What does it buy you? Why not just use a Factory Pattern? A: Building on the previous answers (pun intended), an excellent real-world example is Groovy's built in support for Builders. * *Creating XM...
{ "language": "en", "url": "https://stackoverflow.com/questions/328496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "597" }
Q: Proper way to scale an SDL Surface without clipping? what is the proper way to scale an SDL Surface? I found one explanation online but it required redrawing the Surface pixel by pixel. It seems like there should be some way of doing this natively through SDL rather than redrawing the image like that. I haven't been...
{ "language": "en", "url": "https://stackoverflow.com/questions/328500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Does a function exist that searches the unix $PATH variable and returns true if a certain file exists? The execvp() function executes the program that is given as an argument. It checks the $PATH variable to find the program. I'm writing something in which I would like to check to see if several programs exist befor...
{ "language": "en", "url": "https://stackoverflow.com/questions/328521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rails: How can I set default values in ActiveRecord? How can I set default value in ActiveRecord? I see a post from Pratik that describes an ugly, complicated chunk of code: http://m.onkey.org/2007/7/24/how-to-set-default-values-in-your-model class Item < ActiveRecord::Base def initialize_with_defaults(attrs = n...
{ "language": "en", "url": "https://stackoverflow.com/questions/328525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "445" }
Q: Azure and Microsoft ASP.NET MVC I just got my azure invitation code...yay! Are there any official samples for windows azure + MS asp.net MVC? I still don't get the storage providers and services that come with Azure, it's a bit confusing. I don't think MS have done a very good of explaining it. A: Just found this t...
{ "language": "en", "url": "https://stackoverflow.com/questions/328532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How can I make this Perl one-liner to toggle character in line in a file? I am attempting to write a one-line Perl script that will toggle a line in a configuration file from "commented" to not and back. I have the following so far: perl -pi -e 's/^(#?)(\tDefaultServerLayout)/ ... /e' xorg.conf I am trying to figur...
{ "language": "en", "url": "https://stackoverflow.com/questions/328547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Refresh the page after uploading image I have an ASPX page where I am uploading an image to server for on a serverside button click event. In my page, it will show the available image if it exists. When I upload an image, it will replace the old one with the new one. Now after uploading also the same image ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OSS Twitter Clone written in .NET Does anyone know of a twitter clone written in .NET (or ideally C#)? I wanna experiment with a private twitter network between some friends and work colleagues. A: http://www.yonkly.com/. Done with Asp.net mvc A: Have you taken a look at Witty? It is a a Twitter client that matc...
{ "language": "en", "url": "https://stackoverflow.com/questions/328551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Starting ASP.NET Development Web Server (Cassini) as part of unit test setup? I'm using WatiN, NUnit and ReSharper to run my ASP.NET unit tests inside Visual Studio. I'd like (if it's not already running) to start Cassini to run my tests against. Is this possible? How would I do it? A: I just released the CassiniDe...
{ "language": "en", "url": "https://stackoverflow.com/questions/328566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Deploying a python application with shared package I'm thinking how to arrange a deployed python application which will have a * *Executable script located in /usr/bin/ which will provide a CLI to functionality implemented in *A library installed to wherever the current site-packages directory is. Now, curren...
{ "language": "en", "url": "https://stackoverflow.com/questions/328568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python for C++ Developers I'm a long time C++/Java developer trying to get into Python and am looking for the stereotypical "Python for C++ Developers" article, but coming up blank. I've seen these sort of things for C#, Java, etc, and they're incredibly useful for getting up to speed on language features and notew...
{ "language": "en", "url": "https://stackoverflow.com/questions/328577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: Plesk Rebranding Web Hosting I recently bought the new Plesk software and im unsure on how to re-brand the site to our company logos and themes. Does anyone know the steps to changes these settings or a manual that would answer my questions? Regards, Oliver James A: Well, it really depends on how much wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/328588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: decode a quoted printable message in php I have the string which that encoded in quoted-printable. How do I decode this in php? Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum felis = pede, vestibulum et, ullamcorper in, ultrices eget, metus. Suspendisse in n= ulla. Sed justo. Donec dapibus auc...
{ "language": "en", "url": "https://stackoverflow.com/questions/328590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you do a SQL style 'IN' statement in LINQ to Entities (Entity Framework) if Contains isn't supported? I'm using LINQ to Entities (not LINQ to SQL) and I'm having trouble creating an 'IN' style query. Here is my query at the moment: var items = db.InventoryItem .Include("Kind") ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How deterministic is floating point inaccuracy? I understand that floating point calculations have accuracy issues and there are plenty of questions explaining why. My question is if I run the same calculation twice, can I always rely on it to produce the same result? What factors might affect this? * *Time bet...
{ "language": "en", "url": "https://stackoverflow.com/questions/328622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Need a regex to add css class to first and last list item UPDATE: Thank you all for your input. Some additional information. It's really just a small chunk of markup (20 lines) I'm working with and had aimed to to leverage a regex to do the work. I also do have the ability to hack up the script (an ecommerce one) t...
{ "language": "en", "url": "https://stackoverflow.com/questions/328623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which SQL statement is faster? (HAVING vs. WHERE...) SELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU FROM PRACOWNICY GROUP BY NR_DZIALU HAVING NR_DZIALU = 30 or SELECT NR_DZIALU, COUNT (NR_DZIALU) AS LICZ_PRAC_DZIALU FROM PRACOWNICY WHERE NR_DZIALU = 30 GROUP BY NR_DZIALU A: The t...
{ "language": "en", "url": "https://stackoverflow.com/questions/328636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Accessing local mailbox using PHP on a shared hosting Linux account (GoDaddy) I guess it should be a common technique, However, I tried the following two options: 1) Using my existing POP3 PHP client to access my local mail account. I am getting a "could not connect". Same code works if I run it with my localhost co...
{ "language": "en", "url": "https://stackoverflow.com/questions/328653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I commit the restful_authentication plugin to my git repo? How do I add a the http://github.com/technoweenie/restful-authentication/tree/master plugin to my Rails project and the commit it to the git repo ? I need it to be committed with the project. I have tried a few times but it's ignored by git. Thanks. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/328655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Explicit vs implicit call of toString I used to use the implicit call of toString when wanting some debug info about an object, because in case of the object is null it does not throw an Exception. For instance: System.out.println("obj: "+obj); instead of: System.out.println("obj: "+obj.toString()); Is there any...
{ "language": "en", "url": "https://stackoverflow.com/questions/328661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: How can I find the newest created file in a directory? Is there an elegant way in Perl to find the newest file in a directory (newest by modification date)? What I have so far is searching for the files I need, and for each one get it's modification time, push into an array containing the filename, modification time...
{ "language": "en", "url": "https://stackoverflow.com/questions/328673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How can I update data with RRDtool? I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is: ERROR: Cannot update /opt/d...
{ "language": "en", "url": "https://stackoverflow.com/questions/328682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }