text
stringlengths
8
267k
meta
dict
Q: PHP's create_function() versus just using eval() In PHP you have the create_function() function which creates a unique named lambda function like this: $myFunction = create_function('$foo', 'return $foo;'); $myFunction('bar'); //Returns bar Is this actually any better (apart from being more easy) then just doing: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best platform-neutral font for résumés? Which font is the best to make a résumé look equally good on all operating systems? A: The Microsoft Core Fonts like Arial, Verdana, Tahoma and Times New Roman are usually available on most platforms, but there's no guarantee that any font is available on any plat...
{ "language": "en", "url": "https://stackoverflow.com/questions/418679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Subdirectories within an iOS application Is there a way to have directories within an .app? At the moment if I add a file into Xcode, regardless of what Group hierarchy it is in, the file always lands in a flat filesystem within my application bundle. A: If you just want to copy existing files into your application...
{ "language": "en", "url": "https://stackoverflow.com/questions/418680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Best resource to learn application programming? (.Net/Cocoa/etc) I'm an embedded programmer - primarily very small systems where I deal with data as bits, not objects. I'd like to learn how to program for Mac and PC using their native libraries (Cocoa and .Net). I've hacked a few things together in Xcode and Visual ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: TDD, What are your techniques for finding good tests? I am writing a simple web app using Linq to Sql as my datalayer as I like Linq2Sql very much. I have been reading a bit about DDD and TDD lately and wanted to give it a shot. First and foremost it strikes me that Linq2Sql and DDD don't go along too great. My oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/418707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: All .cpp files depend on two .h files? In a makefile, I have the following line: helper.cpp: dtds.h Which ensures that helper.cpp is rebuilt whenever dtds.h is changed. However, I want ALL files in the project to be rebuilt if either of two other header files change, kind like this: *.cpp: h1.h h2.h Obviously that...
{ "language": "en", "url": "https://stackoverflow.com/questions/418740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET / IIS Remote Debugging - DEBUG verb I'm looking for details on the DEBUG HTTP verb. It's clear to me that this is used for remote debugging - though I'm not even sure if it's for IIS or ASP.NET... If I want to access this interface directly - i.e. not through Visual Studio, but sending these commands manua...
{ "language": "en", "url": "https://stackoverflow.com/questions/418741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it reasonable to call CloseHandle() on a thread before it terminates? I'd like to just create a thread, then call CloseHandle immediately and let the thread die on its own so that I don't have to do extra clean-up work in the 'original' thread (not that cleanup is hard in itself, but it means a fair amount of ext...
{ "language": "en", "url": "https://stackoverflow.com/questions/418742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Capture string until first caret sign hit in regex? I am working with legacy systems at the moment, and a lot of work involves breaking up delimited strings and testing against certain rules. With this string, how could I return "Active" in a back reference and search terms, stopping when it hits the first caret (^)...
{ "language": "en", "url": "https://stackoverflow.com/questions/418743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the cost of indexing multiple db columns? I'm writing an app with a MySQL table that indexes 3 columns. I'm concerned that after the table reaches a significant amount of records, the time to save a new record will be slow. Please inform how best to approach the indexing of columns. UPDATE I am indexing a...
{ "language": "en", "url": "https://stackoverflow.com/questions/418744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: ASM print over allready printed values I have an ASM script that displays date(day, month, year) and time(hours, minutes, seconds). This prints the current datetime on the DOS-box. Thing is, it's static. What I want to do is make it dynamic, meaning I have to write the new value in the exact place where the current ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is "tip-of-the-day" good? Many programs (often large ones, like MS Office, The GIMP, Maxthon) have a feature called "tip-of-the-day". It explains a small part of the program, like this one in Maxthon: "You can hide/show the main menu bar by pressing Ctrl+F11" You can usually browse through them by clicking next. And...
{ "language": "en", "url": "https://stackoverflow.com/questions/418751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Generic constraints and interface implementation/inheritance Not entirely sure how to phrase the question, because it's a "why doesn't this work?" type of query. I've reduced my particular issue down to this code: public interface IFoo { } public class Foo : IFoo { } public class Bar<T> where T : IFoo { public...
{ "language": "en", "url": "https://stackoverflow.com/questions/418764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Fit Flex datagrid to data I have rows of text data that can vary between 0 and 100, and all need to be visible on the screen at one time. The default behavior is fine for the grid until the rows * rowHeight > gridHeight. Basically I need a hook into the item height, or row height to calculate it based on the height...
{ "language": "en", "url": "https://stackoverflow.com/questions/418765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: TDD Spider Solitaire Another question about TDD from me. I have read some articles and book chapters about TDD and I understand why you should TDD and I understand the simple examples but it seems when I am trying this out in the real world I get stuck very easy. Could you give me some simple TDD examples if you wer...
{ "language": "en", "url": "https://stackoverflow.com/questions/418778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is a good openid selector control? Now that idselector has been upgraded to RPXNow and you can't "just use" the selector code, what is a good replacement? I want to implement OpenId on a new website that I am using, but the users are going to be just dumb when it comes to logging in unless I provide an easy way...
{ "language": "en", "url": "https://stackoverflow.com/questions/418790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Drawing on desktop in Mac OS X I want to create analog of program conky. What is the best way to draw information on a OS X desktop? A: Have you tried GeekTool? Maybe you don't even have to write the app. ☺ A: You need to take a look at using NSWindowLevel with a transparent window. A: NSWindow has a method, setL...
{ "language": "en", "url": "https://stackoverflow.com/questions/418791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: "No such file to load" error when running Rspec Mac OS 10.4 rspec (1.1.11, 1.1.4, 1.1.3, 0.5.15) rspec-rails (1.1.11) rspec_generator (0.5.15) rails 2.2.2 ruby 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0] Created a new project... $ rails myproject Installed rspec into the project... $ script/generate rspe...
{ "language": "en", "url": "https://stackoverflow.com/questions/418792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to find your way in an existing Flash presentation I've done quite a bit of Flash and Flex programming in AS2 and AS3 (well, Flex only in AS3 :). <self-definition>I've gotten these platforms to do exactly what I want. I've built Flash components and created an MVC framework in Flex, etc.</self-definition> If you...
{ "language": "en", "url": "https://stackoverflow.com/questions/418797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What does ':' (colon) do in JavaScript? I'm learning JavaScript and while browsing through the jQuery library I see : (colon) being used a lot. What is this used for in JavaScript? // Return an array of filtered elements (r) // and the modified expression string (t) return { r: r, t: t }; A: You guys are forge...
{ "language": "en", "url": "https://stackoverflow.com/questions/418799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "196" }
Q: How to develop a Windows scheduled task? I need to have a process that compiles daily data into an PDF that will be attached into an email. I have already used MSSQL to send emails in the application being developed and would like to continue to use MSSQL as the email processor. In my research, I have found that thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/418809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How good is the linux kernel in the new Quad Core processors running multithreading application Is there anyone here with experience in the linux thread scheduler running multithreading applications in the new Quad core processors?. If there is someone like that can you please write here your experience about how is...
{ "language": "en", "url": "https://stackoverflow.com/questions/418815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Pros and cons of RNGCryptoServiceProvider What are the pros and cons of using System.Security.Cryptography.RNGCryptoServiceProvider vs System.Random. I know that RNGCryptoServiceProvider is 'more random', i.e. less predictable for hackers. Any other pros or cons? UPDATE: According to the responses, here are the pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/418817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: ASP.NET - Negative numbers in Parenthesis My application is currently displaying negative numbers as -1. The users have changed the requirements (just for a change!) and now we will have to display the numbers as (1). Can I enable that for the whole application say changing the web.config or even the app's CultureIn...
{ "language": "en", "url": "https://stackoverflow.com/questions/418822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are there any graph/plotting/anything-like-that libraries for Python 3.0? As per the title. I am trying to create a simple scater plot, but haven't found any Python 3.0 libraries that can do it. Note, this isn't for a website, so the web ones are a bit useless. A: Maybe you can use Python Imaging Library (PIL). Als...
{ "language": "en", "url": "https://stackoverflow.com/questions/418835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Design Question - Storing Images as Objects Ok, so my site is centric to a lot of dynamic user entered images for different user defined objects throughout. So I have many objects, and those objects have images. Is it good practice to treat images like an object since the "Image Name" and "Image Bytes" columns are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unit testing aspx views Is there a proper way yet to unit test views with the aspx view engine? I've been playing with various ways that will let me get a parseable string as a result like : view.RenderView(viewContext); But I'm not having any luck so far. Most of what I've read strays into integration test territo...
{ "language": "en", "url": "https://stackoverflow.com/questions/418842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C#: Thread safe richtextbox event logging method? I have a method that is meant to display output on a RichTextBox in a form. public void LogTextEvent(RichTextBox TextEventLog, Color TextColor, string EventText) { string nDateTime = DateTime.Now.ToString("hh:mm:ss tt") + " - "; // color text...
{ "language": "en", "url": "https://stackoverflow.com/questions/418845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I edit Kerberos 5 configuration files with Perl? Has anyone come across a Perl module that will parse (and write) kerberos configuration files (ie /etc/krb5.conf)? I have looked at quite a few parsing modules like Config::General, Config::Auto, etc., but none seem to be able to handle nested structures like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: View underlying SOAP message using vb.net I have a VB.NET web service that calls a third party web service. How can I view the SOAP message generated by .NET before it is sent to the third party web service and how can I see the SOAP response before it is serialized by .NET. When creating a standalone EXE, I see ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Command Line Compiling Settings.settings using VBC To an earlier question of mine, invovling VBC and NAnt with WinForms, I have since come up with a better way of stating this. Within vbproj file, you have the following: <ItemGroup> <None Include="My Project\Settings.settings"> <Generator>SettingsSingleFileGen...
{ "language": "en", "url": "https://stackoverflow.com/questions/418878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Issues when dllimport is not used by a client of an exported class? Apart from method calls not being optimized, are there any other issues? A difference I have noticed is that default compiler generated methods (e.g. operator=) in the class appear either in the exporting dll (if dllimport is used by the client) or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Array over written with last value assigned? I have a pointer to pointer array. I am assigning each row in the while loop below and the printf inside the while loop shows each is assigned my id number 1-20. After, out side of the while loop I iterate through the array and every element is written with id 20? Any hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/418887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Finding and using memory offsets in an existing program? Most game botting applications use a series of memory offsets they have found for that particular version of a game client to facilitate botting. They might have a memory offset for health, x/y position, etc. Every time the game releases an update the offset...
{ "language": "en", "url": "https://stackoverflow.com/questions/418893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I complete K&R Exercise 2-4? I'm learning how to write programs in C using the k&r book (The C Programming Language) and I have a problem with one of the exercises. It's asking me to detect and remove a character in string s1, which matches any characters in the string s2. So, say s1 = "A"; And s2 = "AABAACAA...
{ "language": "en", "url": "https://stackoverflow.com/questions/418894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to redirect output to a file and stdout In bash, calling foo would display any output from that command on the stdout. Calling foo > output would redirect any output from that command to the file specified (in this case 'output'). Is there a way to redirect output to a file and have it display on stdout? A: Usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/418896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1461" }
Q: SQLite - UPSERT *not* INSERT or REPLACE http://en.wikipedia.org/wiki/Upsert Insert Update stored proc on SQL Server Is there some clever way to do this in SQLite that I have not thought of? Basically I want to update three out of four columns if the record exists, If it does not exists I want to INSERT the record wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/418898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "616" }
Q: cloning ExtJS components using JQuery I'm trying to clone form components using JQuery's .clone() (actually, I'm cloning a collection of fields by cloning the container element). Everything worked out well except that the datefield, comboboxes are not working, even the validation for minLength, etc. is also not work...
{ "language": "en", "url": "https://stackoverflow.com/questions/418910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Platform SDK Deployment in C# I was reading the Platform SDK samples, and the examples are in VB.NET. I use C# so I was wondering, how can I replicate this line in C#? Set Installer = CreateObject("WindowsInstaller.Installer") Thank you. A: using System.Runtime.InteropServices; Type InstallerType; objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/418913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is C so fast, and why aren't other languages as fast or faster? In listening to the Stack Overflow podcast, the jab keeps coming up that "real programmers" write in C, and that C is so much faster because it's "close to the machine." Leaving the former assertion for another post, what is special about C that all...
{ "language": "en", "url": "https://stackoverflow.com/questions/418914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "229" }
Q: Pythonic equivalent of unshift or redo? I'm learning Python, and I have a situation where I want to consume items from an iterator. The tricky part is that under certain conditions, I want to "un-iterate." That is, put an item back onto the front of the iterator before I loop. For example, suppose I'm picking appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/418915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Delete certain lines in a txt file via a batch file I have a generated txt file. This file has certain lines that are superfluous, and need to be removed. Each line that requires removal has one of two string in the line; "ERROR" or "REFERENCE". These tokens may appear anywhere in the line. I would like to delet...
{ "language": "en", "url": "https://stackoverflow.com/questions/418916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: Trashed Postgres template1 I was screwing around in psql and renamed the template0 and template1 before realizing their usage. Now, I am getting a "permission denied to copy database 'template1'" from inside psql and form command-line when I try to recreate template1. To save time, is there anything else I need to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET CheckBox control that supports Value property I am aware that the default .NET CheckBox control doesn't support the Value property. This seems weird to me because the input control does support value as part of the html spec. So my question is whether or not anyone here knows of a custom user control out there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Managing and debugging SQL queries in MS Access MS Access has limited capabilities to manage raw SQL queries: the editor is quite bad, no syntax highlighting, it reformats your raw SQL into a long string and you can't insert comments. Debugging complex SQL queries is a pain as well: either you have to split it into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What is the best font to apply to a print stylesheet? When developing a print stylesheet for a web page, what fonts are recommended for use? I was using Times New Roman, but it looks kinda bland. What have you used before? IIRC they say serif fonts are easier to read on paper. A: It depends on the purpose, length,...
{ "language": "en", "url": "https://stackoverflow.com/questions/418963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Winforms Combobox and Databinding I am databinding a combobox to a DataSet, however I want to insert a single item at the top for "None". Doing: combobox.Items.Insert(0,"None"); Doesn't work, as the combobox is now expecting a DataRowView, however DataRowView doesn't have a public constructor, so I can't fake it t...
{ "language": "en", "url": "https://stackoverflow.com/questions/418972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What tools should I have as my core set for developing javascript? I have been developing ASP.Net applications for quite a few years, and I have always avoided learning JavaScript. Now I have been diving in and trying to learn as much as possible. As a .Net developer I rely on Visual Studio heavily. What I am wonde...
{ "language": "en", "url": "https://stackoverflow.com/questions/418973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why doesn't CakePHP support a foreign key with multiple columns? I searched in google for this without a good result. The only topic I found in the CakePHP trac, was closed without a "real" explanation. Since CakePHP is like one of the rails ports for php and rails does support this, I would like to know why it does...
{ "language": "en", "url": "https://stackoverflow.com/questions/418980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Design pattern for aggregating lazy lists I'm writing a program as follows: * *Find all files with the correct extension in a given directory *Foreach, find all occurrences of a given string in those files *Print each line I'd like to write this in a functional way, as a series of generator functions (things ...
{ "language": "en", "url": "https://stackoverflow.com/questions/418983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I hotcopy a SVN Repository to an existing location? I am trying to automatically backup my SVN Repository. This is in a batch file I wrote: svnadmin hotcopy C:/myRepository G:/myRepositoryBackup --clean-logs It works great the first time. However, each time after that, I get this error: svnadmin: 'G:/myRep...
{ "language": "en", "url": "https://stackoverflow.com/questions/418984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: XHTML/CSS: Why does Firefox mess up my horizontal tab menu? Problem page Stylesheet Any idea how to make this work in Firefox? (It appears as if the right tab image is being pushed below the link, as if there weren't enough room for it within the anchor element. Also, the reason that I'm using two tags is that I p...
{ "language": "en", "url": "https://stackoverflow.com/questions/418998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Difficulty in managing URL Paths Managing url paths can be a real pain in ASP.NET. AbsolutePath vs RelativePath vs etc. drives me crazy. I find that many solutions require the user to edit web.config element to include the correct subfolder path; ex. Website Root: http://www.domain.com Web.config setting: / Websit...
{ "language": "en", "url": "https://stackoverflow.com/questions/419004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to raise an exception on the version number of a module How can you raise an exception when you import a module that is less or greater than a given value for its __version__? There are a lot of different ways you could do it, but I feel like there must be some really simple way that eludes me at the moment. In ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Split List into Sublists with LINQ Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the item index as the delimiter of each split? Let me exemplify: I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "451" }
Q: How does Java's PreparedStatement work? I am planning to replace repeatedly executed Statement objects with PreparedStatement objects to improve performance. I am using arguments like the MySQL function now(), and string variables. Most of the PreparedStatement queries I have seen contained constant values (like 10...
{ "language": "en", "url": "https://stackoverflow.com/questions/419021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: char x[256] vs. char* = malloc(256*sizeof(char)); Someone here recently pointed out to me in a piece of code of mine I am using char* name = malloc(256*sizeof(char)); // more code free(name); I was under the impression that this way of setting up an array was identical to using char name[256]; and that both ways...
{ "language": "en", "url": "https://stackoverflow.com/questions/419022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Integer.TryParse - a better way? I find myself often needing to use Integer.TryParse to test if a value is an integer. However, when you use TryParse, you have to pass a reference variable to the function, so I find myself always needing to create a blank integer to pass in. Usually it looks something like: Dim te...
{ "language": "en", "url": "https://stackoverflow.com/questions/419027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: C# checkbox I have 3 check boxes in each row of 8 total rows. I want to have the third checkbox in each row to get checked only when the first two checkboxes are unchecked. I do not want to write a checkRow() method for each row. What is the best way to go about it? private void checkRow() { for (int i = 0; i < ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to add padding bytes to a bitmap? Lets say I have some raster data I want to write to a file.. Now I want to write it as a bmp file.. This data happens to be not DWORD aligned, which, if I understand correctly, needs to be padded with enough bytes to reach the next DWORD.. However, when I try to pad it with this...
{ "language": "en", "url": "https://stackoverflow.com/questions/419045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does one calculate 2 ^ -18 using GMP? I've just discovered, to my embarrassment, that feeding negative exponents to mpz_pow_ui doesn't work very well. ("The manual does say unsigned long, you know.") For the other mpz_pow functions, the manual uses concepts I don't understand. For example "base^exp mod mod" in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/419071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: comparing statically typed code with dynamically typed code - costs and benefits Whatever its merits, Adobe's Actionscript 3 presents what may be a unique opportunity to explore the consequences of typed versus untyped languages, because it is pretty much a strict superset of javascript, with all the syntactic benef...
{ "language": "en", "url": "https://stackoverflow.com/questions/419072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Detecting encoding conversion problems The majority of content on my company's website starts life as a Word document (Windows-1252 encoded) and is eventually copied-and-pasted into our UTF-8-encoded content management system. The conversion usually chokes on a few characters (special break characters, smart quotes,...
{ "language": "en", "url": "https://stackoverflow.com/questions/419082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to fix eclipse spinning CPU while debugging on tomcat server I know stackoverflow is meant for programming problems, but this is exactly the kind of thing you search for on google and other people ask the same question with no answer, which is exactly the kind of thing I read stackoverflow was for. I run ganymed...
{ "language": "en", "url": "https://stackoverflow.com/questions/419085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Packed/minified javascript failing in IE6 - how to debug? I have a number of files which I combine and pack to produce a single, minified JS file. The problem is that when I minify the file (using packer), IE6 gives one of its characteristic helpful error messages. Line: 12 // of course, line 12 is an empty lin...
{ "language": "en", "url": "https://stackoverflow.com/questions/419094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: gridview in asp.net VS2008 Have a gridview control and i want to display checkboxes for each row. The checkboxes should only appear if Session["DisplayBox"] == true. <asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" EnableSortingAndPagingCallbacks="True" AllowPaging="True" DataSourceID="JObj...
{ "language": "en", "url": "https://stackoverflow.com/questions/419095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best open source example of a lightweight Windows Application? I would like to learn how a program can be written and installed without the use of the .net framework. I'm looking for a project that is known to be lightweight and robust. Something like the uTorrent client. A: Try Anki, a spaced learnin...
{ "language": "en", "url": "https://stackoverflow.com/questions/419096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to use "takeStringValueFrom" with Button onclick Event? I have a button that correctly wired such that when it is clicked, the "login" IBAction is hit. - (IBAction) login: (id)sender { NSLog(@"OK"); } Now, I wired the button to the username/password text fields using "takeStringValueFrom" but I don't unders...
{ "language": "en", "url": "https://stackoverflow.com/questions/419104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Issue setting QMAKESPEC environment variable Refer to this post compile a Xcode project in command line Building Qt Xcode Projects From the Command Line the QMAKESPEC variable was unable to set to macx-g++. I was doing like this in terminal QMAKESPEC=macx-g++ but this still not able to generate a make file of my Xc...
{ "language": "en", "url": "https://stackoverflow.com/questions/419117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Launch an app from within another (iPhone) Is it possible to launch any arbitrary iPhone application from within another app?, For example in my application if I want the user to push a button and launch right into the Phone app (close the current app, open the Phone app). would this be possible? I know this can be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "181" }
Q: logging user logins for the purpose of reporting that the client is exceeding number of licenses I am the lead developer on a commercial Windows app (c#). A new requirement is to track customers who abuse the license. For example: Let's say a customer purchases a 10 user license agreement, i.e. 10 simultaneous user...
{ "language": "en", "url": "https://stackoverflow.com/questions/419122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to best implement custom search on a Membership provider Out of the box, System.Web.Security.Membership implements a couple of search methods: * *FindUsersByEmail *FindUsersByName I'm using the WSAT project from CodePlex to administer my Membership database. The tool implements extra profile properties in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Exposing an ImageSource property in a UserControl for use in Blend I have a user control that exposes a property of type ImageSource. I want to expose this property in Blend so that I can edit it in Blend, rather than specifying the image in code. Based on what I've Googled, I've added a dependency property, and sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/419128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Code freeze in SVN - Build management Is there a better way to implement code freeze in SVN than asking all developers to not check in any new code? We have CruiseControl running, which automatically deploys the latest build to environment. So if new code comes in, the build that was made available earlier changes t...
{ "language": "en", "url": "https://stackoverflow.com/questions/419133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JavaScript: parameters for unnamed functions In the following jQuery JavaScript code, what value does the parameter "e" take on within the function? I'm having difficulty understanding this because this function cannot be passed an argument elsewhere in the code so how would having a parameter work? And how would I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Python Threads - Critical Section What is the "critical section" of a thread (in Python)? A thread enters the critical section by calling the acquire() method, which can either be blocking or non-blocking. A thread exits the critical section, by calling the release() method. - Understanding Threading in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Is there a simple way to remove a TimeSeries from a displayed JFreeChart Chart? I have a Swing application which uses JFreeChart to display one of a series of queries. Some of these queries have a composite TimeSeries key. Each component of this key can contain a few values, but when rendered makes a very noisy grap...
{ "language": "en", "url": "https://stackoverflow.com/questions/419157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does if __name__ == "__main__": do? What does this do, and why should one include the if statement? if __name__ == "__main__": print("Hello, World!") If you are trying to close a question where someone should be using this idiom and isn't, consider closing as a duplicate of Why is Python running my module...
{ "language": "en", "url": "https://stackoverflow.com/questions/419163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7940" }
Q: MISSING SERIES Im creating a stored procedure/function in MS SQL which should return the missing series. Example: the table "orders" contain field name "ordNo". ordNo 000001 000003 000005 the functions should return these values: 000002 000004 any idea? thank you very much. A: What about something simple like: SEL...
{ "language": "en", "url": "https://stackoverflow.com/questions/419175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Build management/ Continuous Integration best practices How does your team handle Builds? We use Cruise Control, but (due to lack of knowledge) we are facing some problems - Code freeze in SVN - Build management Specifically, how do you make available a particular release when code is constantly being checked in? Ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/419181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to delete an SMS from the inbox in Android programmatically? On Android phones SMS messages registered to applications also get sent to the device's inbox. However to prevent clutter, it'd be nice to be able to remove application specific SMS messages from the inbox to reduce the potential overflow of those mes...
{ "language": "en", "url": "https://stackoverflow.com/questions/419184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: How do you query the set of Users in Google App Domain within your Google App Engine project? If you have a Google App Engine project you can authenticate based on either a) anyone with a google account or b) a particular google app domain. Since you can connect these two entities I would assume there is some way to...
{ "language": "en", "url": "https://stackoverflow.com/questions/419197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is a good api for mapping gps coordinates in c#? I have a project that has a list of gps coordinates. I would like to find a way to make a simple map of those coordinates (possibly just one at a time). The map should have basic street info. This part of our project is pretty simple so I don't think it needs to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WPF ComboBox Font Binding FileFormatException I have a WPF Combobox that is binding to Me.fontComboFast.ItemsSource = Fonts.SystemFontFamilies <ComboBox x:Name="fontComboFast"> <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> </ComboBo...
{ "language": "en", "url": "https://stackoverflow.com/questions/419216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery Hover Menu - When hovering over child - menu disappears So I created a simple little hover, that uses a class from a link to show a div underneath. The show/hide works fine, but I can't figure out how to set it so that if the mouse is over the div, it wont hide. I tried using (this) and .hover, with no succes...
{ "language": "en", "url": "https://stackoverflow.com/questions/419218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get -[NSString sizeWithFont:forWidth:lineBreakMode:] to work? I updated my question "Sizing a UILabel (in the iPhone SDK) to fit?" with a description of my problem with a suggested solution, but didn't get an answer. Perhaps I'll have better results by asking a new question... I set a breakpoint after the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Binning in matlab I have been unable to find a function in matlab or octave to do what I want. I have a matrix m of two columns (x and y values). I know that I can extract the column by doing m(:,1) or m(:,2). I want to split it into smaller matricies of [potentially] equal size and and plot the mean of these matr...
{ "language": "en", "url": "https://stackoverflow.com/questions/419223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Differentiating IOWAIT in Linux I'm working on a monitoring agent that works with systems using the Linux kernel. By opening /proc/stat , you can easily tell how much time one one or all CPUs (aggregate) is burning waiting for I/O requests to complete. I'm trying to find a way to break that number down so that I can...
{ "language": "en", "url": "https://stackoverflow.com/questions/419231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Anyone know of a good Python based web crawler that I could use? I'm half-tempted to write my own, but I don't really have enough time right now. I've seen the Wikipedia list of open source crawlers but I'd prefer something written in Python. I realize that I could probably just use one of the tools on the Wikiped...
{ "language": "en", "url": "https://stackoverflow.com/questions/419235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: MVC Beta 1 Routing - what number of routes will start to cause performance issues? I am considering pre-loading routes to static content pages, allowing for n-depth nesting of content. I have a solution spiked that provides a bit of comfort in terms of the number of potential routes registered, but I'm wondering if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get JavaScript function data into a PHP variable I am using PHP and JavaScript. My JavaScript code contains a function, get_data(): function get_Data(){ var name; var job; ..... return buffer; } Now I have PHP code with the following. <?php $i=0; $buffer_data; /* Here I need to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I merge PDF files with Perl? Using Perl, how can I combine or merge the sample PDF files into a single PDF file? A: Why do you need to do it from Perl? Chris has already mentioned CAM::PDF. If you just need to merge them, pdftk (PDF ToolKit) works just fine. It's a simple command line: pdftk file1.pdf file2...
{ "language": "en", "url": "https://stackoverflow.com/questions/419244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Grabbing text from a webpage I would like to write a program that will find bus stop times and update my personal webpage accordingly. If I were to do this manually I would * *Visit www.calgarytransit.com *Enter a stop number. ie) 9510 *Click the button "next bus" The results may look like the following: 10...
{ "language": "en", "url": "https://stackoverflow.com/questions/419260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Make submit work by pressing enter on PHP and Javascript login page I'm pretty new to Javascript and I'm sure this is an easy fix, but I can't figure it out. I'm using a slightly modified version of the code from this page and I want to make the form work by entering the information and pressing enter rather than h...
{ "language": "en", "url": "https://stackoverflow.com/questions/419279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What aspects of a Web Browser should be configurable via plugins? I'm looking at this from the perspective of the plugin developer not the user of the browser, so I'm interested in what developers think is the ideal interface for plugins to a browser. For example: Plugins can reorder, create and destroy Tabs, Plug...
{ "language": "en", "url": "https://stackoverflow.com/questions/419288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Historical reason behind different line ending at different platforms Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix? And now that Mac OS X is Unix (-like), did Apple switch to \n from \r? A: It's interesting to note th...
{ "language": "en", "url": "https://stackoverflow.com/questions/419291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: matching items from two lists (or arrays) I'm having a problem with my work that hopefully reduces to the following: I have two List<int>s, and I want to see if any of the ints in ListA are equal to any int in ListB. (They can be arrays if that makes life easier, but I think List<> has some built-in magic that migh...
{ "language": "en", "url": "https://stackoverflow.com/questions/419295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How a Windows Developer can most easily get his software to work well under Wine Many of my users have been telling me that they'd like to run my software on their Linux machines under Wine. But I'm a Windows Developer who has practically no experience with Linux. Now I could spend a month or two installing Linux, l...
{ "language": "en", "url": "https://stackoverflow.com/questions/419312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: invalid header file while using jar for archiving When i use this cmd line : jar cmf arshad.mf ars.jar *.class i get this error : invalid header field name:Manifest-version This is my manifest file : Manifest-Version: 1.0 Main-Class:t i made the manifest file with notepad in UTF-8 encoding - is there any problem ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's the best practice for handling system-specific information under version control? I'm new to version control, so I apologize if there is a well-known solution to this. For this problem in particular, I'm using git, but I'm curious about how to deal with this for all version control systems. I'm developing a w...
{ "language": "en", "url": "https://stackoverflow.com/questions/419322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }