text
string
meta
dict
Q: Slicing up a UIImage on iPhone Objective: take a UIImage, crop out a square in the middle, change size of square to 320x320 pixels, slice up the image into 16 80x80 images, save the 16 images in an array. Here's my code: CGImageRef originalImage, resizedImage, finalImage, tmp; float imgWidth, imgHeight, diff; UIImag...
{ "language": "en", "url": "https://stackoverflow.com/questions/248667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is there a simple way to do bulk file text substitution in place? I've been trying to code a Perl script to substitute some text on all source files of my project. I'm in need of something like: perl -p -i.bak -e "s/thisgoesout/thisgoesin/gi" *.{cs,aspx,ascx} But that parses all the files of a directory recursively...
{ "language": "en", "url": "https://stackoverflow.com/questions/248668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Create (LLBLGen) Linq query dynamicly with strings We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is available in our framework which is 100% separated from any data projects. For data we use LLBLGen generated data access code. Normally by using invokes...
{ "language": "en", "url": "https://stackoverflow.com/questions/248682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I do boolean logic on two columns in MySQL? I want to do a select in MySql that combines several columns... something like this pseudocode: SELECT payment1_paid AND payment2_paid AS paid_in_full FROM denormalized_payments WHERE payment1_type = 'check'; Edit: payment1_paid and payment2_paid are booleans. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/248683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Favourite AJAX library for classic ASP? Just wondering if there are any good server-side libraries for AJAX (prefer JSON rather then XML but anything is good) for classic ASP (VBScript)... Rather not reinvent the wheel if it's already working and debugged. Cheers, Gaspard EDIT: Server-side ASP VBScript... I have alr...
{ "language": "en", "url": "https://stackoverflow.com/questions/248688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Functional test software/framework that covers Asp.Net Web Apps? I recently began to use the NexusLight, a functional test automation framework. Are there more frameworks that does a similar job? Related question: End-to-End application testing from a users standpoint A: I haven't really looked into NexusLight but...
{ "language": "en", "url": "https://stackoverflow.com/questions/248692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Double Negation in C++ I just came onto a project with a pretty huge code base. I'm mostly dealing with C++ and a lot of the code they write uses double negation for their boolean logic. if (!!variable && (!!api.lookup("some-string"))) { do_some_stuff(); } I know these ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "142" }
Q: Error after changing the primary key to from PKID to UserID I have a ASP.NET/VB that had a GridView to display a list of users from the Users table. I changed the primary key column name in the database from PKID to UserID and updated all the old references to PKID in the declarations and code behind. I also deleted...
{ "language": "en", "url": "https://stackoverflow.com/questions/248696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Class Constructor never executed in release mode Exactly what the title says. I'm using MSVC++ 2008 express, and my class constructor is never executed when compiled in release mode. It DOES work in debug mode. I am doing something like: ClassTest test; test.DoIt(); Breakpoints on DoIt(); trigger, but breakpoints ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to manage and deal with a group of developers with different knowledge levels? We are a group of students doing our Master degree in field of computer science. This semester we should do a Software engineering project according to the following bottom explanation. we should exactly act and report as a real Softw...
{ "language": "en", "url": "https://stackoverflow.com/questions/248719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I build a single instance application using Click Once? I need to have a single instance application (as per this answer), but it needs to be deployed via click once. The problem is that I require that click once doesn't automatically detect an update an attempt to load a newer version while the application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Is there something between a normal user account and root? I'm developing an application that manages network interfaces on behalf of the user and it calls out to several external programs (such as ifconfig) that requires root to make changes. (Specifically, changing the IP address of a local interface, etc.) During...
{ "language": "en", "url": "https://stackoverflow.com/questions/248730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the best way to link to an external style sheet in SharePoint I have some user controls that I'm loading in SharePoint and I would prefer to have all those styles contained in an external style sheet. What's the best way to link to an external stylesheet in CSS? Thanks. A: Can you not add a <link rel...> to...
{ "language": "en", "url": "https://stackoverflow.com/questions/248738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: File Structure / Architecture for AJAX Site? I'm building a site using ajax and am trying to decide where to put the files that supply the data for the ajax requests. For example, I am going to have a .js file that can be included in a page that will create country/state select boxes. I will have the .js file under...
{ "language": "en", "url": "https://stackoverflow.com/questions/248748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I do boolean logic on two columns in MySql, one of which is a Varchar? This is the sequel to this question. I would like to combine three columns into one on a MySql select. The first two columns are boolean and the third is a string, which is sometimes null. This causes strange results: Select *, (payment1_p...
{ "language": "en", "url": "https://stackoverflow.com/questions/248753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Browser add-on to find a download's origin Back in the earlier days of the internet I remember that in certain browsers, every time you downloaded an image or a file, the URL of where that file was downloaded from would be written into that file's properties (I guess the summary tab?). I think Netscape v2 did this i...
{ "language": "en", "url": "https://stackoverflow.com/questions/248754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VB6 Editor changing case of variable names I'm not much of a Visual Basic person, but I am tasked with maintaining an old VB6 app. Whenever I check out a file, the editor will replace a bunch of the uppercase variable names with lowercase automatically. How can I make this stop!? I don't want to have to change th...
{ "language": "en", "url": "https://stackoverflow.com/questions/248760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: SQL Query Help - task ordering, grouping and status + date conditions problem Hopefully I can do the problem justice, because it was too difficult to summarise it in the title! (suggestions are welcome in the comments) Right, so here's my table: Tasks task_id (number) job_id (number) to_do_by_d...
{ "language": "en", "url": "https://stackoverflow.com/questions/248761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a .NET equivalent of Java Web Start? Is there a .NET equivalent of Java Web Start? I want a one-click, from the web, lightweight install for a group of .NET assemblies and resources. Hopefully, the link would continue to keep the user updated with the latest version, similar to what Java Web Start does. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/248767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I walk through tree of Pdf Objects in PDFSharp? I am trying to to walk though the tree of PdfItem objects in an existing PDF document using PDFSharp in c#. I want to create a hierarchy of all the objects as I go along -- similar to what the "PDF Explorer" example does -- but I want it to be a tree instead of...
{ "language": "en", "url": "https://stackoverflow.com/questions/248768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: PHP IDE--Want to sync local storage with FTP I currently use Notepad++ for most of my development. I have been checking out other, more full-featured options and would like to switch (I'm in particular a fan of Aptana so far) but there is one thing about Notepad++ that I really like and I haven't been able to get s...
{ "language": "en", "url": "https://stackoverflow.com/questions/248769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JSONP and Cross-Domain queries - How to Update/Manipulate instead of just read So I'm reading The Art & Science of Javascript, which is a good book, and it has a good section on JSONP. I've been reading all I can about it today, and even looking through every question here on StackOverflow. JSONP is a great idea, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/248789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to enforce function inlining in c#? As far as I know there's no way to hint the c# compiler to inline a particular function and I guess it's like that by design. I also think that not letting the programmer to specify what to inline and what not is generally a good idea, as it would imply that you thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/248799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I enable set the timeout on file uploads in SWF to greater than 3 min? I'm using SWFUpload to handle file uploads and have run into a problem where any file upload >= 3 min will time out. As far as I can tell, Apache and PHP are configured properly to handle large files. Are there any settings with Flash tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/248820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Undoing a commit in TortoiseSVN I committed a bunch of files (dozens of files in different folders) by accident. What is the easiest, cleanest (and safest!) way to 'undo' that commit without having to delete the files from my working directory? A: You can revert your working copy to the revision prior to the commit...
{ "language": "en", "url": "https://stackoverflow.com/questions/248821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: Running as admin sometimes I have a program that needs to run as a normal user most of the time, but once in a while I need to stop and start a service. How do I go about making a program that runs as a normal user most of the time but elevates into administrator mode for some function? A: You can't elevate a proce...
{ "language": "en", "url": "https://stackoverflow.com/questions/248824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Compiling FFMPEG on Windows using Wascana Has anyone ever tried, or had any success at getting Wascana (Eclipse CDT + MinGW for Windows) to compile FFMPEG under Windows. Apparently it is possible, there is even a tutorial at Craig Shaw's website but I have not been able to make it work. I run ./configure on the FFMP...
{ "language": "en", "url": "https://stackoverflow.com/questions/248828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python: using a recursive algorithm as a generator Recently I wrote a function to generate certain sequences with nontrivial constraints. The problem came with a natural recursive solution. Now it happens that, even for relatively small input, the sequences are several thousands, thus I would prefer to use my algori...
{ "language": "en", "url": "https://stackoverflow.com/questions/248830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: can you write extension methods on type arrays? I need to write an extension method on a byte[]. Is that possible? A: yes, just do : public static class Extensions { public static void Method(this byte[] current) { } } A: Sure, just make the first parameter of type byte[].
{ "language": "en", "url": "https://stackoverflow.com/questions/248838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Exclusive File access to logfile with VBScript and FileSystemObject I have a VBS script that currently writes to a logfile. This script can be kicked off my multiple simultaneous processes so now I'm worried about concurrency. I'm currently using FileSystemObject to open and write to this file. Does FSO support excl...
{ "language": "en", "url": "https://stackoverflow.com/questions/248859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I create an ordered list of the most common substrings inside of my MySQL varchar column? I have a MySQL database table with a couple thousand rows. The table is setup like so: id | text The id column is an auto-incrementing integer, and the text column is a 200-character varchar. Say I have the following ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/248864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to verify that mod_rewrite is working I am having a lot of trouble with mod_rewrite, and for a while I had it going, but for some reason everything has stopped working. Is there any sort of basic test that I can do to make sure that it is not something fundamental broken. It does show up in phpinfo(); A: A secr...
{ "language": "en", "url": "https://stackoverflow.com/questions/248883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Classic ASP: Page text translated from SQL table, a faster way? Using classic ASP VBScript, coupled to MS SQL Server, we have a function that takes 3 integers, page_id, heading_id, language_id it looks up the page heading in a translation table... This table contains roughly 10,000 rows... The heading column is nvar...
{ "language": "en", "url": "https://stackoverflow.com/questions/248889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Shortcut for commenting CSS in VS 2008 When I press the standard Ctrl + E, C (an other variants) in VS2008 whilst editing a CSS file, it says that command is not available. How do I setup a shortcut to apply a plain old /* */ comment to selected text in VS? Thanks A: Within Visual Studio, hit Alt-F11 to open the Ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/248900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: If object is Generic List Is there any way to determine if an object is a generic list? I'm not going to know the type of the list, I just know it's a list. How can I determine that? A: The following method will return the item type of a generic collection type. If the type does not implement ICollection<> then nul...
{ "language": "en", "url": "https://stackoverflow.com/questions/248903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I synchronize two processes? I have a single HW interface I want to use from two applications (processes) on the same workstation. The HW requires a single initialization call then either app uses the same function (in the same library) to do many transactions with the HW. So each app should act like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Windows Workflow - Web Service - App_Data Directory - Database Solution -- WorkflowProject   -- Workflow1   -- Workflow2 -- WebProject (WAP)   -- App_Data     -- MyDatabase.vdb3   -- MyWebService.asmx   -- Web.Config Ok, so.. that's the basic "outline" of the project. The database, is stored in the website, and is a...
{ "language": "en", "url": "https://stackoverflow.com/questions/248923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Alternative to deprecated javax.servlet.http.HttpUtils.parseQueryString? I am looking to parse a URL to obtain a collection of the querystring parameters in Java. To be clear, I need to parse a given URL(or string value of a URL object), not the URL from a servlet request. It looks as if the javax.servlet.http.Http...
{ "language": "en", "url": "https://stackoverflow.com/questions/248938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I re-install Visual Studio.net's trial edition? I'm working on getting the full license for VS 2008 (or my boss is) but my trial has expired, and I need to do some work. How can I re-install? Or, if I install on a different machine (or virtual machine) - how can I get another key without going through the w...
{ "language": "en", "url": "https://stackoverflow.com/questions/248945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the best interactive Analysis and Plotting Tool for software testing? My realtime app generates a data log: 100 words of data @10Khz. I need to analyze it and produce some plots of the results. There are intermediate calculations involved - I need to take some differences, averages, etc. Excel would work...
{ "language": "en", "url": "https://stackoverflow.com/questions/248946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: LCD 8-bit mode to 4-bit mode We have a character LCD (www.cloverlcd.com/pdf/S6A0069.pdf) that we got to work in 8 bit mode. However, now we are trying to get it to work in 4 bit mode but it doesn't seem to be displaying anything. I think the function set instruction isn't been written. Can somebody please check i...
{ "language": "en", "url": "https://stackoverflow.com/questions/248949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Binary Search or Btree index update issue Imagine that you are handed a new book everyday from an author. The book is a work in progress. He does not tell you what he has changed or added. Your job is to identify the changes and additions, and pass ONLY these along to the publisher (who does not have time to read th...
{ "language": "en", "url": "https://stackoverflow.com/questions/248952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I integrate the Picasa API into my iPhone application? I have tried to integrate the Picasa API on iphone, compiles fine, but I am seeing the following error in launch. dyld: Library not loaded: @loader_path/../Frameworks/GData.framework/Versions/A/GData Referenced from: /Users/jacksu/Library/Application S...
{ "language": "en", "url": "https://stackoverflow.com/questions/248956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# using statement catch error I am just looking at the using statement, I have always known what it does but until now not tried using it, I have come up with the below code: using (SqlCommand cmd = new SqlCommand(reportDataSource, new SqlConnection(Settings.Default.qlsdat_extensionsConnectionStrin...
{ "language": "en", "url": "https://stackoverflow.com/questions/248961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How to compile a C# file outside of App_Code? I'd like to stick a class down in my folder hierarchy. The scenario is too trivial to warrant it's own project or separate website. However, I hate to clutter my top-level App_Code with something that's used by a tiny corner of the site. Is there a way in web.config to...
{ "language": "en", "url": "https://stackoverflow.com/questions/248973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Setting iPhone wallpaper (locked screen background) programmatically? I have an app which could benefit from the user being able to choose to set an image as the wallpaper (the background image on the "slide to unlock" screen). Is there a way for non-jailbreak third-party apps to do this? A search for "wallpaper" i...
{ "language": "en", "url": "https://stackoverflow.com/questions/248982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Removing databound item from listbox causes refresh problems I have databound a listbox to a simple custom object collection. Next, I added a button to remove the selected item from the object collection. The problem is that when certain items are removed and the listbox is showing the vertical scroll bar, the scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/248983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: -[NSOperationQueue operations] returns an empty array when it shouldn't? I'm writing an application that does async loading of images onto the screen. I have it set up to be NOT concurrent (that is, it spawns a thread and executes them one at a time), so I've only overridden the [NSOperation main] function in my NSO...
{ "language": "en", "url": "https://stackoverflow.com/questions/248985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Unit testing that events are raised in C# (in order) I have some code that raises PropertyChanged events and I would like to be able to unit test that the events are being raised correctly. The code that is raising the events is like public class MyClass : INotifyPropertyChanged { public event PropertyChangedEven...
{ "language": "en", "url": "https://stackoverflow.com/questions/248989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "168" }
Q: Summarize aggregated data I have a table like as follows: SoftwareName Count Country Project 15 Canada Visio 12 Canada Project 10 USA Visio 5 USA How do I query it to give me a summary like... SoftwareName Canada USA Total Project ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Strange treatment of "plus" character (+) by Internet Explorer 7 This is really weird... When I open the following simple HTML document in Internet Explorer 7.0.5730.11 (on Windows Server 2003 Web Edition SP2) <html> <body> <p>+</p> </body> </html> it shows me a totally blank page. FWIW, this is just a triv...
{ "language": "en", "url": "https://stackoverflow.com/questions/248998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: LINQ2SQL Database providers I have heard that LINQ2SQL has been written to support multiple database vendor providers however for internal political reasons at MS, only SQL Server has been supported. Is this a fair summary of the situation, and if so has a timetable been released as to when other databases will be s...
{ "language": "en", "url": "https://stackoverflow.com/questions/249006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you use curly braces for additional scoping? I mean other than using it when required for functions, classes, if, while, switch, try-catch. I didn't know that it could be done like this until I saw this SO question. In the above link, Eli mentioned that "They use it to fold up their code in logical sections that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: How do I make UITableViewCellAccessoryDisclosureIndicator visible in black background? cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; in this method - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; but I can only see it when I select that cel...
{ "language": "en", "url": "https://stackoverflow.com/questions/249010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What application domains are CPU bound and will tend to benefit from multi-core technologies? I hear a lot of people talking about the revolution that is coming in programming due to multi-core processors and parallelism, but I can't shake the feeling that for most of us, CPU cycles aren't the bottleneck. Pretty mu...
{ "language": "en", "url": "https://stackoverflow.com/questions/249011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to modify a method body at run-time in .NET? I know that it is possible (in theory) to create a new type at run-time, but is it possible to modify a method body of an existing type at run-time? My plan (if I can get this to work) is to tag up methods with a custom attribute, and then at run-time searc...
{ "language": "en", "url": "https://stackoverflow.com/questions/249021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: NSThread with _NSAutoreleaseNoPool error I have an method which save files to the internet, it works but just slow. Then I'd like to make the user interface more smooth, so I create an NSThread to handle the slow task. I am seeing a list of errors like: _NSAutoreleaseNoPool(): Object 0x18a140 of class NSCFString au...
{ "language": "en", "url": "https://stackoverflow.com/questions/249022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Java IPC: GUI and Command Line I would like to implement a command line interface for a Java application. This wouldn't be too difficult to do, except I would like the command line program to affect the state of another Java GUI program. So for example, I could type: java CliMain arg1 arg2 And another running GUI i...
{ "language": "en", "url": "https://stackoverflow.com/questions/249027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SMTP and IMAP server library for .NET Does anyone know a good SMTP/IMAP server library for C#? I only found some long abandoned projects. Only SERVER SIDE libraries, please no more posts about client libs. Thanks, Fionn A: I am working on a project where I need to receive a mail via SMTP on the local network (a le...
{ "language": "en", "url": "https://stackoverflow.com/questions/249047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Easy to use SNMP client library for c++? What's an easy to use SNMP client library for c++? A: I have found that Net-SNMP does not support multi-threading with v3 type queries. So if you are writing an SNMP monitoring tool that will be polling multiple hosts then you will need to take this into consideration. A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: I need a really good reason to use Python I have been trying to make a case for using Python at my work. We use C# and ASP.NET for basically all of our development. 80% or more of our projects are web applications. It seems natural that we would look at some of the nice dynamic web languages (Ruby, Python, etc), and...
{ "language": "en", "url": "https://stackoverflow.com/questions/249064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to avoid HttpRequestValidationException in ASP.NET MVC rendering the same view which caused the exception I just want to know how to validate (or clean) user input in ASP.NET MVC so that an HttpRequestValidationException will not be thrown regardless of the values submitted. For example, with a text input, if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to change onClick handler dynamically? I'm sure there are a million posts about this out there, but surprisingly I'm having trouble finding something. I have a simple script where I want to set the onClick handler for an <A> link on initialization of the page. When I run this I immediately get a 'foo' alert box...
{ "language": "en", "url": "https://stackoverflow.com/questions/249074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Shared components throughout all projects, is there a better alternative than svn:externals? My situation: I have several components, which sometimes have changes to them, and are shared across a lot of different projects. Each project puts these in a subfolder called /depends. The depends holds a bunch of svn ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/249085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I remove diacritics (accents) from a string in .NET? I'm trying to convert some strings that are in French Canadian and basically, I'd like to be able to take out the French accent marks in the letters while keeping the letter. (E.g. convert é to e, so crème brûlée would become creme brulee) What is the best ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "533" }
Q: IE7 and the CSS table-cell property So I just love it when my application is working great in Firefox, but then I open it in IE and... Nope, please try again. The issue I'm having is that I'm setting a CSS display property to either none or table-cell with JavaScript. I was initially using display: block, but Firefo...
{ "language": "en", "url": "https://stackoverflow.com/questions/249103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Django: Arbitrary number of unnamed urls.py parameters I have a Django model with a large number of fields and 20000+ table rows. To facilitate human readable URLs and the ability to break down the large list into arbitrary sublists, I would like to have a URL that looks like this: /browse/<name1>/<value1>/<name2>/...
{ "language": "en", "url": "https://stackoverflow.com/questions/249110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Java memory consumption, "top" and HP-Ux We ship Java applications that are run on Linux, AIX and HP-Ux (PA-RISC). We seem to struggle to get acceptable levels of performance on HP-Ux from applications that work just fine in the other two environments. This is true of both execution time and memory consumption. Alth...
{ "language": "en", "url": "https://stackoverflow.com/questions/249132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: System.Security.SecurityException thrown by ASP.NET application Trying to get an ASP application deployed; it worked for a while but then started coming up with errors whenever the page is accessed: Server Error in '/AppNameHere' Application. Security Exception Description: The application attempted to perform an...
{ "language": "en", "url": "https://stackoverflow.com/questions/249134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Guidelines for formatting XML Namespace I have not developed web services applications that publicly faced the Internet. As I begin to consider the issues of exposing schema definitions to a wide audience, I believe a certain amount of consideration should be spent on properly formatting the schema namespaces. Has a...
{ "language": "en", "url": "https://stackoverflow.com/questions/249142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you break up addresses into street / city / state / zip? My current app needs to store address information for a user. I'm currently debating whether to use the customary street address / city / state / zip textboxes and dropdowns or to go with Google's method of simply having everything on one line. Any though...
{ "language": "en", "url": "https://stackoverflow.com/questions/249156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I mirror an SVN repo dir structure in my working dir without a full root checkout? First, a couple operating parameters: * *.NET development using Visual Studio 2005/2008 *TortoiseSVN client I've only primarily worked with Visual Source Safe and SourceGear Vault source control systems. In each, I map t...
{ "language": "en", "url": "https://stackoverflow.com/questions/249158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setup App.Config As Custom Action in Setup Project I have a custom application with a simple app.config specifying SQL Server name and Database, I want to prompt the user on application install for application configuration items and then update the app.config file. I admit I'm totally new to setup projects and am l...
{ "language": "en", "url": "https://stackoverflow.com/questions/249159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Formatting Resharper backing fields for properties in C# Is there a way to control where Resharper puts its backing fields? currently it tries to put them at the top of the class. Id like them to go right above the property. A: No, not yet.
{ "language": "en", "url": "https://stackoverflow.com/questions/249163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is a good design pattern in C# for classes that need to reference other classes? I am working on a business problem in C#.NET. I have two classes, named C and W that will be instantiated independently at different times. An object of class C needs to contain references to 0 ... n objects of class W, i.e. a C o...
{ "language": "en", "url": "https://stackoverflow.com/questions/249171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Can I control which nodes are selectable in a WPF TreeView? I have a two-level hierarchy displayed in a WPF TreeView, but I only want the child nodes to be selectable - basically the top level nodes are for categorisation but shouldn't be selectable by themselves. Can I achieve this? Thanks... A: Define styles for...
{ "language": "en", "url": "https://stackoverflow.com/questions/249185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Implementing an editable DropDownList in ASP.NET What's the most elegant way of implementing a DropDownList in ASP.NET that is editable without using 3rd party components. As a last resort I will probably try using a TextBox with an AutoCompleteExtender with an image to 'drop down' the list; or a TextBox overlapping...
{ "language": "en", "url": "https://stackoverflow.com/questions/249188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can you programmatically tell an HTML SELECT to drop down (for example, due to mouseover)? How can you programmatically tell an HTML select to drop down (for example, due to mouseover)? A: I think this is no longer possible in Chrome. It seems version 53 of chrome disables this functionality as stated by Asim K...
{ "language": "en", "url": "https://stackoverflow.com/questions/249192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "142" }
Q: What is the fastest webserver solution with the lowest memory footprint? I need a webserver to serve up very simple POST/GET requests as JSON. I don't need MVC, Rails, Django. I need something that takes up very little memory, preferrably around 5K per reqeust. The webserver will talk to backend services like Scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/249200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Find all radio groups which haven't been selected I have a basic quiz/survey type application I'm working on, and I'd like to give the user a prompt before they submit if they haven't answered all the questions. All the questions are multiple choice using radio buttons: <div class="question"> Q1: What is the sec...
{ "language": "en", "url": "https://stackoverflow.com/questions/249214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best .NET Micro Framework dev board, for under US$300? I'm looking for a relativity cheap .NET Micro Framework development board for use on a personal robotics project. I'd don't need much for I/O, but I want at least one serial port and one Ethernet port. I would prefer not to have to spend more than U...
{ "language": "en", "url": "https://stackoverflow.com/questions/249220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Can I add extension methods to an existing static class? I'm a fan of extension methods in C#, but haven't had any success adding an extension method to a static class, such as Console. For example, if I want to add an extension to Console, called 'WriteBlueLine', so that I can go: Console.WriteBlueLine("This text i...
{ "language": "en", "url": "https://stackoverflow.com/questions/249222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "622" }
Q: Sometimes Accelerometer delegate method is not called I have an application that uses the accelerometer. Sometimes, the application will launch without the accelerometer data updating. Relaunching the app, sometimes the problem persist, sometimes it doesn't. And even weirder, sometimes I can try 10 times and everyth...
{ "language": "en", "url": "https://stackoverflow.com/questions/249241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Scalable google maps overlay Is it possible to add an image overlay to a google map that scales as the user zooms? My current code works like this: var map = new GMap2(document.getElementById("gMap")); var customIcon = new GIcon(); customIcon.iconSize = new GSize(100, 100); customIcon.image = "/images/image.png"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What fonts do iPhone applications support? I found a list of iPhone supported font here http://daringfireball.net/misc/2007/07/iphone-osx-fonts But I just wanted to confirm that, can we use all this fonts in application, or we are restricted to some class of fonts. A: You should be able to use any of those fonts, p...
{ "language": "en", "url": "https://stackoverflow.com/questions/249251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Select from different tables via SQL depending on flag I have a script to extract certain data from a much bigger table, with one field in particular changing regularly, e.g. SELECT CASE @Flag WHEN 1 THEN t.field1 WHEN 2 THEN t.field2 WHEN 3 THEN t.field3 END as field, ...[A bunch of other fields] FRO...
{ "language": "en", "url": "https://stackoverflow.com/questions/249253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is new in Visual Studio 2008 vs 2005 or C# 3.0 vs C# 2.0? I was browsing the Hidden Features of C# question and thought I would try out one of the features I was unfamiliar with. Unfortunately I use Visual Studio 2005 and the feature in question was introduced later. Is there a good list for new features in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Jython 2.2.1, howto move a file? shutils.move is non-existant! '''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move a file with Jython? and while we at it, how does one delete a file with Jython? A: os.rename() to move, and os.unlink() to delete -- just like Python pre-shu...
{ "language": "en", "url": "https://stackoverflow.com/questions/249262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: split xml document into chunks I have a large xml document that needs to be processed 100 records at a time It is being done within a Windows Service written in c#. The structure is as follows : <docket xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="docket.xsd"> <order> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Embedding html code in stored procedures We seem to have a few developers here who think creating stored procedures that spit out HTML or Javascript code is a legitimate thing to do. In my mind this is the ultimate abuse of the separation of concerns model. Is doing something like this people have often seen people ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Virtualenv on Ubuntu with no site-packages I've been using virtualenv lately while developing in python. I like the idea of a segregated development environment using the --no-site-packages option, but doing this while developing a PyGTK app can be a bit tricky. The PyGTK modules are installed on Ubuntu by default, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/249283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to control toolbar location in IE addon (BHO) I'm trying to develop an Internet Explorer 7 addon using "Browser Helper Objects" (BHO). The goal is to have a standard IE toolbar with some buttons and one custom control. I would like to develop it in .NET I started from the baseline sample here. This works fine bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/249293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Return type polymorphism in C-like languages Why don't we see C-like languages that allow for callables with polymorphism in the return type? I could see how the additional type inference would be a hurdle, but we have plenty of languages with full-fledged type inference systems (that work for varying levels of "wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/249296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Custom collections - still worth the extra work? Excuse me if I'm off on my terminology, I only have around 2.4 years of programming experience, mostly in .NET. Currently I'm one of two .NET developers in a mainframe shop, the other developer set the standards and is a great coder with a lot more experience plus a C...
{ "language": "en", "url": "https://stackoverflow.com/questions/249297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Simple Random Samples from a MySQL Sql database How do I take an efficient simple random sample in SQL? The database in question is running MySQL; my table is at least 200,000 rows, and I want a simple random sample of about 10,000. The "obvious" answer is to: SELECT * FROM table ORDER BY RAND() LIMIT 10000 For lar...
{ "language": "en", "url": "https://stackoverflow.com/questions/249301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: ASP.NET AJAX Page Methods from UserControl I would like to utilize the ASP.NET AJAX Page Methods functionality with a user control. Is there a way to be able to specify my static [WebMethod] inside the UserControl's code behind instead of the Page's code behind? A: I've been searching around quite a bit to find so...
{ "language": "en", "url": "https://stackoverflow.com/questions/249304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PHP operator <> What does the following code do? A link to something in the PHP manual would also be nice. if ($_SERVER['SERVER_PORT'] <> 443) { doSomething(); } A: It's another way of saying "not equal to" (the != operator). I think of it as the "less than or greater than" operator which really just means "no...
{ "language": "en", "url": "https://stackoverflow.com/questions/249312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: What do you think of multiline lambdas in VB 10 I was just watching a video on MSDN Channel 9 which can be found here, about some of the new features in Visual Basic 10. Now I like most of the new features, some of which have been long awaited(auto properties and Collection Initializers), one that caught my eye was...
{ "language": "en", "url": "https://stackoverflow.com/questions/249314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is it relatively easy to hack Network Time Protocol(NTP)? I read somewhere that NTP is based on UDP and there's no security built with NTP communication so it is easy to spoof NTP responses. Is it true? Wouldn't that be a major security issue since most of the servers out there depend on NTP to sync their clock? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/249318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Modify the behaviour of a NotifyIcon with via a 3rd party application I've always been curious to see if I can show, hide or change a NotifyIcon created by another application via a C# application. Could someone please post an example on how to do this? :) A: To modify icons in the systray, you can use Shell_Notify...
{ "language": "en", "url": "https://stackoverflow.com/questions/249319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }