text
string
meta
dict
Q: How does TDD make refactoring easier? I've heard that projects developed using TDD are easier to refactor because the practice yields a comprehensive set of unit tests, which will (hopefully) fail if any change has broken the code. All of the examples I've seen of this, however, deal with refactoring implementation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: PHP Echo Line Breaks What's the difference between \n and \r (I know it has something to do with OS), and what's the best way to echo a line break that will work cross platform? EDIT: In response to Jarod, I'll be using ths to echo a line break in a .txt log file, though I'm sure I'll be using it in the future for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/255511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Underline a Hyperlink On Hover using jQuery I used the method $("#dvTheatres a").hover(function (){ $(this).css("text-decoration", "underline"); },function(){ $(this).css("text-decoration", "none"); } ); Is there a more elegant method?(single line) A: Why not just use CSS? #dvTheatres a { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: MySQL offset infinite rows I would like to construct a query that displays all the results in a table, but is offset by 5 from the start of the table. As far as I can tell, MySQL's LIMIT requires a limit as well as an offset. Is there any way to do this? A: Another approach would be to select an autoimcremented col...
{ "language": "en", "url": "https://stackoverflow.com/questions/255517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: indispensible JSP tag libraries I'm interested to know what are the "must have" JSP tag libraries apart from JSTL. All I've found so far are * *ccc - for accessing static constants in JSP (without scriptlet) *displaytag - for generating sophisticated HTML tables that includes data paging, grouping, sorting, expo...
{ "language": "en", "url": "https://stackoverflow.com/questions/255518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: multiplication chains that result in a constant modulo a power of 2 Is there a practical algorithm that gives "multiplication chains" To clarify, the goal is to produce a multiplication change of an arbitrary and exact length Multiplication chains of length 1 are trivial. A "multiplication chain" would be defined a...
{ "language": "en", "url": "https://stackoverflow.com/questions/255527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Remove the default browser header and footer when printing HTML I got an HTML with the <body onload="window.print()">. The question I'm trying to ask is: * *Is there any way to remove the strings that the web browsers add to the printed page? *Such as: * *Web site from where the page was printed *Page count...
{ "language": "en", "url": "https://stackoverflow.com/questions/255534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to use pkglib_LTLIBRARIES = test.la to only build *.so I'm using autotools to build a shared object. Using pkglib_LTLIBRARIES in my Makefile.am causes a libtest.la AND libtest.so to be built. I only want it to build/install libtest.so. Is this possible? A: The details of generating libraries varies widely fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/255551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to implement mixins in C#? I've heard that it's possible with extension methods, but I can't quite figure it out myself. I'd like to see a specific example if possible. Thanks! A: LinFu and Castle's DynamicProxy implement mixins. COP (Composite Oriented Programming) could be considered as making a wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/255553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Is 1-to-n multicast on the open internet reliable? I'm a newbie at networking. I understand the concept of multicast, but was wondering if it's reliable on the open/public internet? It seems like sort of an edge case that different backbones or ISPs might intentionally break to reduce router load or generally segme...
{ "language": "en", "url": "https://stackoverflow.com/questions/255557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Lines of Code in a MS-Access Database Is there a way to find the number of lines of code used in an MS-Access database? A: Once again, I should refer to MZ-tools az a very interesting tool for VBA/Access. It will give you number of lines (code versus comment) per proc/module. It also allows you to number automatica...
{ "language": "en", "url": "https://stackoverflow.com/questions/255566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sql Data Type for Primary Key - SQL Server? Which sql data type should we use for number bases primary key: * *int *bigint *numeric *float A: Generally, int. bigint if you think you'll have more rows than there are atoms in the universe. uniqueidentifier is useful if you need globally unique keys (keys that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Image Manipulation in CodeIgniter I am having some trouble manipulating images using CodeIgniter 1.7. With the following code, the image is uploaded correctly. Alas, instead of a new image being made, and then modified; the existing image is modified. Any help? //Upload image first $config['upload_path'] = './uploa...
{ "language": "en", "url": "https://stackoverflow.com/questions/255571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are PHP sessions hard to scale across a distributed system? At work we do almost everything in Java and perl, but I wanted to build out a feature using PHP and sessions. Some peeps thought that it was a bad idea to try to do PHP sessions on our system, cause it's distributed to many servers. What would the specific...
{ "language": "en", "url": "https://stackoverflow.com/questions/255573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I find the time since an event happened? The event returns a standardized timestamp in the format of "Sat Oct 25 21:55:29 +0000 2008" How can I compare this with the current time in PHP so that it gives me the result in a form like "It has been 15 minutes!" or "It has been three days!" Also, how can I get th...
{ "language": "en", "url": "https://stackoverflow.com/questions/255584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: BiCubic Shaper PHP Image Resize Photoshop has that great: BiCube Shaper option for resizing. However I cannot find an equivalent. I've seen various code using GD that used imagecopyresampled and custom unsharp mask, but no where near the quality I am expecting. Any help? A: If all you've tried is GD, you might want...
{ "language": "en", "url": "https://stackoverflow.com/questions/255585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Store large number of data points? What is the best way to store a large number of data points? For example temperature values which are measured every minute over lots of locations? SQL databases with one row per data points doesn't seem very efficient. A: I would like to know why you reckon it to be "not efficien...
{ "language": "en", "url": "https://stackoverflow.com/questions/255601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Approach to extract inner-schema XML values for mapping to orchestration's inbound schema There are several application systems that pass messages to each other as part of their work process. Due to technical constraints revolving transactional integrity, the application data and message delivery are all committed i...
{ "language": "en", "url": "https://stackoverflow.com/questions/255605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Which performs better: Crystal Reports or SQL Server Reporting Services? Which performs better: Crystal Reports or SQL Server Reporting Services? A: SSRS does a good job of making reporting quick and easy. Like most of Microsoft's tools that do this if you stay within what they have decided you should do it isn't a...
{ "language": "en", "url": "https://stackoverflow.com/questions/255607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Do TortoiseCVS and TortoiseSVN conflict when simultaneously installed? I am interested if it's safe to install both TortoiseCVS and TortoiseSVN on the same computer? All our corporate projects are controlled by CVS, but I want to use SVN for my personal documents (and TortoiseSVN as client). Is it possible? Thanks! ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Dynamically allocating an array of objects I have a class that contains a dynamically allocated array, say class A { int* myArray; A() { myArray = 0; } A(int size) { myArray = new int[size]; } ~A() { // Note that as per MikeB's helpful style critique, no ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/255612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: Error in getting a custom object inherited from a base class using web method ASP.NET I have created a base class A and a class B is a derived class inherited from class A. Both classes are marked as Serialized. When I try to return an object of type B through a web method i am getting following error: System.Web.Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/255615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should I use a single or multiple database setup for a multi-client application? I am working on a PHP application that intends to ease company workflow and project management, let's say something like Basecamp and GoPlan. I am not sure on what the best approach is, database-wise. Should I use a single database and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How can I set up a timed interval in javascript? The following javascript should setup an interval so a new item from the list of json objects will be added to the top of the list slowly, but instead they are all added at the same time. <script type="text/javascript"> var json; var count = 0; $(document)...
{ "language": "en", "url": "https://stackoverflow.com/questions/255617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Scripting common tasks in Vim While using Vim (at home and at work), I often find myself doing similar things repeatedly. For example, I may turn a bunch of CSV text into a series of SQL inserts. I've been using Vim for years, but only recently have I tried to seriously think about how I could improve my productivit...
{ "language": "en", "url": "https://stackoverflow.com/questions/255624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: best practice for retrieving data which meet selected conditions I have a database table named call with columns call_time, location, emergency_type and there are three types of emergency: paramedics, police and firefighters. In the windows form I created CheckBoxes 'paramedics', 'police', 'firefighters' and I want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# Interface Implementation relationship is just "Can-Do" Relationship? Today somebody told me that interface implementation in C# is just "Can-Do" relationship, not "Is-A" relationship. This conflicts with my long-time believing in LSP(Liskov Substitution Principle). I always think that all inheritance should means...
{ "language": "en", "url": "https://stackoverflow.com/questions/255644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I count operations in C++? How can I count operations in C++? I'd like to analyze code in a better way than just timing it since the time is often rounded to 0 millisec. A: If you are timing code, it's worth running it a lot of times in a loop to avoid the effect of the timer resolution. So you might run th...
{ "language": "en", "url": "https://stackoverflow.com/questions/255645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to enable assembly bind failure logging (Fusion) in .NET How do I enable assembly bind failure logging (Fusion) in .NET? A: Add the following values to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion Add: DWORD ForceLog set value to 1 DWORD LogFailures set value to 1 DWORD LogResourceBinds set value to 1 DWORD En...
{ "language": "en", "url": "https://stackoverflow.com/questions/255669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "911" }
Q: Static ARP entry disappears on restart in Windows Server 2003 I used the command line "arp -s IP MAC" command to set a static ARP entry on Windows Server 2003. When I ran "arp -a" it was there as a "static" entry. When I restart, it is gone. Is there some file somewhere like lmhosts where I can make this absolutely ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: App crash when trying to access a subclass method after the object was initialized ( init ) using the parent initializer I have a class that subclasses NSMutableArray. I init it using: MyClass class = [MyClass arrayWithContentsOfFile:path]; When i try to access any of my subclass methods the app crashes with this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Configuring SQL Server 2005 with both server replication and client replication I need to set up this scenario: A SQL Server 2005 database will create a transactional replication subscription from another database to populate a set of lookup tables. These lookup tables will then be published as a merge replication...
{ "language": "en", "url": "https://stackoverflow.com/questions/255680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there an R package for learning a Dirichlet prior from counts data I'm looking for a an R package which can be used to train a Dirichlet prior from counts data. I'm asking for a colleague who's using R, and don't use it myself, so I'm not too sure how to look for packages. It's a bit hard to search for, because...
{ "language": "en", "url": "https://stackoverflow.com/questions/255697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to implement Google Suggest in your own web application (e.g. using Python) In my website, users have the possibility to store links. During typing the internet address into the designated field I would like to display a suggest/autocomplete box similar to Google Suggest or the Chrome Omnibar. Example: User is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/255700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: JPA / Hibernate Select Column Subset on Join In SQL it is easy to do a join and only return the columns you want from the joined table. What is the best way to map this in JPA / Hibernate? For example, there is a Folder entity mapped to the EMAIL_FOLDER and an Email entity mapped to the EMAIL table. There is a one-t...
{ "language": "en", "url": "https://stackoverflow.com/questions/255703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Syntax for putting a block on a single line So I've got a Ruby method like this: def something(variable, &block) .... end And I want to call it like this: something 'hello' { do_it } Except that isn't working for me, I'm getting a syntax error. If I do this instead, it works: something 'hello' do do_it end Ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/255714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What's the Best Mailing List Package? (Linux) We need a mailing list package similar to Python Mailman. I'd use Mailman except for one thing: we want to link the subscriber list to a table in our MySQL database. We want people to be able to opt in/out and control delivery options directly from our site in addition t...
{ "language": "en", "url": "https://stackoverflow.com/questions/255715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: XSS Torture Test - does it exist? I'm looking to write a html sanitiser, and obviously to test/prove that it works properly, I need a set of XSS examples to pitch against it to see how it performs. Here's a nice example from Coding Horror <img src=""http://www.a.com/a.jpg<script type=text/javascript src="http://1.2...
{ "language": "en", "url": "https://stackoverflow.com/questions/255723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Keeping data in session vs. populate on postback What is preferable, keeping a dataset in session or filling the dataset on each postback? A: That would depend on many factors. It is usually best not to keep too many items in session memory if your session is inproc or on a state server because it is less scalable....
{ "language": "en", "url": "https://stackoverflow.com/questions/255728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can you call Ada functions from C++? I'm a complete Ada newbie, though I've used Pascal for 2-3 years during HS. IIRC, it is possible to call Pascal compiled functions from C/C++. Is it possible to call procedures & functions written in Ada from C++? A: According to this old tutorial, it should be possible. However...
{ "language": "en", "url": "https://stackoverflow.com/questions/255741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Good source of information about VxWorks? I'm new to the VxWorks Environment are there any good sources of information out there? A: 2 Books helped me: * *Real-Time Concepts for Embedded Systems ISBN-10: 1578201241 ISBN-13: 978-1578201242 (Basic RT concepts, Common Patterns) *Tornado and VxWorks: What's not in...
{ "language": "en", "url": "https://stackoverflow.com/questions/255764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to pass data between a MainFrame (or Main Dialog) and a Modal Dialog? I need a modal dialog to gather some user input. I then need the same data to be consumed by the application MainFrame. Usually my Modal Dialog would have a pointer to some DataType able to store what I need, and I'd be passi...
{ "language": "en", "url": "https://stackoverflow.com/questions/255771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What C/C++ compilers are available for VxWorks? I'm new to the VxWorks environment, I'm wondering what C and C++ compilers are available for use with VxWorks? A: Greenhills development tools also supported the VXWorks environment in the past. A: There are two: gcc and diab. They will be provided with your WindRi...
{ "language": "en", "url": "https://stackoverflow.com/questions/255773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does a tool exist for dynamically altering running javascript in a browser? Does a tool exist for dynamically altering running javascript in a browser? For example, to change the values of javascript variables during runtime. A: So, Firebug really is one of the best options - or, if you are a developer that owns Vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/255785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Queues against Tables in messaging systems I've been experiencing the good and the bad sides of messaging systems in real production environments, and I must admit that a well organized table or schema of tables simply beats every time any other form of messaging queue, because: * *Data are permanently stored on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: uses for state machines In what areas of programming would I use state machines ? Why ? How could I implement one ? EDIT: please provide a practical example , if it's not too much to ask . A: In what areas of programming would I use a state machine? Use a state machine to represent a (real or logical) object that c...
{ "language": "en", "url": "https://stackoverflow.com/questions/255797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Data structure used for directory structure? I'm making a program which the user build directories (not in windows, in my app) and in these folders there are subfolders and so on; every folder must contain either folders or documents. What is the best data structure to use? Notice that the user may select a subfolde...
{ "language": "en", "url": "https://stackoverflow.com/questions/255800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to implement wiki-style edits in your web-application? In a web application I am developing, I wish to implement wiki-style edits (where each and every edit is saved, can be compared, and users can rollback edits easily). What is a good way of implementing this without re-inventing the wheel too much? Thank you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I fix my regex to not match too much with a greedy quantifier? I have the following line: "14:48 say;0ed673079715c343281355c2a1fde843;2;laka;hello ;)" I parse this by using a simple regexp: if($line =~ /(\d+:\d+)\ssay;(.*);(.*);(.*);(.*)/) { my($ts, $hash, $pid, $handle, $quote) = ($1, $2, $3, $4, $5); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Javascript Drag and drop I'm looking for someone to explain how to drag and drop in javascript, I want a horizontal line with some customizable images in it. I've had a look at the online tutorials for these but find them very hard to use. A: I would recommend that you look into one of the Javascript Frameworks out...
{ "language": "en", "url": "https://stackoverflow.com/questions/255830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: When do you stop encapsulating? I have some event handler on a boundary class that manages a persistence mechanism for a given generic transaction: void MyBoundaryClass::MyEventHandler(...) { //retrieve stuff from the UI //... //declare and initialize trasaction to persist SimpleTransaction myTransaction(......
{ "language": "en", "url": "https://stackoverflow.com/questions/255845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Dealing with objects returned from cocoa convenience methods I'm having a lot of issues with NSDate objects being prematurely deallocated. I suspect that the issues may be related to the way that I deal with the objects returned from NSDate convenience methods. I think that my showDate property declaration in the JK...
{ "language": "en", "url": "https://stackoverflow.com/questions/255846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Parallel Programming and C++ I've been writing a lot recently about Parallel computing and programming and I do notice that there are a lot of patterns that come up when it comes to parallel computing. Noting that Microsoft already has released a library along with the Microsoft Visual C++ 2010 Community Technical P...
{ "language": "en", "url": "https://stackoverflow.com/questions/255852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is it true, visual studio can't handle fonts installed after it was? I was trying to solve my XNA Font problem, when I found this here: Visual Studio doesn’t recognize any fonts you add after it is up and running. Is there a way to use fonts installed after Visual Studio? After finding out that is was the Font...
{ "language": "en", "url": "https://stackoverflow.com/questions/255855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Word Automation using WIN32OLE I am trying to insert an image (jpg) in to a word document and the Selection.InlineShapes.AddPicture does not seem to be supported by win32old or I am doing something wrong. Has anyone had any luck inserting images. A: You can do this by calling the Document.InlineShapes.AddPicture...
{ "language": "en", "url": "https://stackoverflow.com/questions/255857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Word Wrap in Net Beans Netbeans is great but there's no way to wrap text in it (or hopefully I haven't found it yet). Is there any way to do this, and if not, is there any similarly good IDE for Java with this functionality (hopefully free as well). A: You can use word wrap in Netbeans. Add the following to netbean...
{ "language": "en", "url": "https://stackoverflow.com/questions/255862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: ASP.NET MVC Routes with "File Extensions" I want to make an MVC route for a list of news, which can be served in several formats. * *news -> (X)HTML *news.rss -> RSS *news.atom -> ATOM Is it possible to do this (the more general "optional extension" situation crops up in several places in my planned design) w...
{ "language": "en", "url": "https://stackoverflow.com/questions/255876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Equivalent WPF binding syntax I need some help with WPF binding syntax: public class ApplicationPresenter { public ObservableCollection<Quotes> PriceList {get;} } public class WebSitePricesView { private IApplicationPresenter presenter { get { return (ApplicationPresenter)DataContext; } } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to iterate over arguments in a Bash script I have a complex command that I'd like to make a shell/bash script of. I can write it in terms of $1 easily: foo $1 args -o $1.ext I want to be able to pass multiple input names to the script. What's the right way to do it? And, of course, I want to handle filenames...
{ "language": "en", "url": "https://stackoverflow.com/questions/255898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1131" }
Q: How do you manage PHP Project Development Lifecycle? I've worked on several PHP projects and always I have problems with organizing my work. Where do you develop your application - on localhost, remote server or maybe production one(!) ? When I work on my localhost after making some major path I send new files by f...
{ "language": "en", "url": "https://stackoverflow.com/questions/255902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Creating or Updating Custom Entites in MS CRM 4.0 For a requirement i was asked to export information into a custom entity that was created in MS CRM 4.0. I am trying to do this programmatically and I have not found a single code that actually accomplishes this. I wrote code to check if a certain value for a field e...
{ "language": "en", "url": "https://stackoverflow.com/questions/255904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to synchronize development and production database Do you know any applications to synchronize two databases - during development sometimes it's required to add one or two table rows or new table or column. Usually I write every sql statement in some file and during uploading path I evecute those lines on my pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/255905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: How to put unicode characters on a System.Windows.Forms.Button in C#? In Visual Studio 2008 in a C# WinForms project, there is a button on a form. In the properties view, the property "Font" is set to "Arial Unicode MS". What do I need to put into the property "Text", so I get the unicode character \u0D15 displayed ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: BIRT: pdf emitter, load/use fonts from relative path or from jar files I use BIRT since early days and still have riddles regarding PDF emitter. Short story: Can I configure fontsConfig.xml to load fonts from relative path or from jars? Long story: We are using both FOP and BIRT for generating PDF in our web applic...
{ "language": "en", "url": "https://stackoverflow.com/questions/255916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Advice on which modal popup to use: ASP.NET AjaxControlToolkit vs jQuery plugin vs Greybox vs? This is all being done in an ASP.NET web forms application: I need a modal popup that will show the user a preview of images that match a search criteria (e.g. they search for "dog" and the popup shows them all dog-related...
{ "language": "en", "url": "https://stackoverflow.com/questions/255926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: -didSelectRowAtIndexPath: not being called I'm writing an iOS app with a table view inside a tab view. In my UITableViewController, I implemented -tableView:didSelectRowAtIndexPath:, but when I select a row at runtime, the method isn't being called. The table view is being populated though, so I know that other tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/255927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "307" }
Q: How to get the installation directory? The MSI stores the installation directory for the future uninstall tasks. Using the INSTALLPROPERTY_INSTALLLOCATION property (that is "InstallLocation") works only the installer has set the ARPINSTALLLOCATION property during the installation. But this property is optional and a...
{ "language": "en", "url": "https://stackoverflow.com/questions/255928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Tools to visually analyze memory usage of a PHP app Is there anything out there freeware or commercial that can facilitate analysis of memory usage by a PHP application? I know xdebug can produce trace files that shows memory usage by function call but without a graphical tool the data is hard to interpret. Ideall...
{ "language": "en", "url": "https://stackoverflow.com/questions/255941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Can I flush my NHibernate session and get a new session without committing the transaction? I'm using Castle ActiveRecord for persistence, and I'm trying to write a base class for my persistence tests which will do the following: * *Open a transaction for each test case and roll it back at the end of the test cas...
{ "language": "en", "url": "https://stackoverflow.com/questions/255942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Re-implementing an interface that another interface already inherits I see stuff like this a lot: interface A { ... } interface B : A { ... } class C : B, A { ...} Why would you specify that C implements interface A, when B already inherits A? Does it make any semantic difference or is it just a matter of style? (O...
{ "language": "en", "url": "https://stackoverflow.com/questions/255951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I make a Windows Forms control readonly? Returning to WinForms in VS2008 after a long time.. Tinkering with a OOD problem in VS2008 Express Edition. I need some controls to be "display only" widgets. The user should not be able to change the value of these controls... the widgets are updated by a periodic upd...
{ "language": "en", "url": "https://stackoverflow.com/questions/255955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Where can I find a good documentation about the core concept of REST? I found a good description on wikipedia with a few reference links, but there may be better ones, please help me to find these! To be clear, I am not looking for implementation for any language specific implementation guides, just the pure concept...
{ "language": "en", "url": "https://stackoverflow.com/questions/255960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In Ruby's Test::Unit::TestCase, how do I override the initialize method? I'm struggling with Test::Unit. When I think of unit tests, I think of one simple test per file. But in Ruby's framework, I must instead write: class MyTest < Test::Unit::TestCase def setup end def test_1 end def test_1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/255969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: What's a good way to teach my son to program Java OK, so I've read through various posts about teaching beginner's to program, and there were some helpful things I will look at more closely. But what I want to know is whether there are any effective tools out there to teach a kid Java specifically? I want to teac...
{ "language": "en", "url": "https://stackoverflow.com/questions/255976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: What is the best 3-D technology for the "Online Room Planner" site? The main user-case is: * *Create the 2D floor plan *See the 3D view of the room in colors and in dynamic lighting (switching on and off the lamps) *Select the furniture from the large library of predefined samples. *Change the color and textur...
{ "language": "en", "url": "https://stackoverflow.com/questions/255979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using the file system to augment ram I should preface this by saying I'm working on a pocket PC app and the data files live on sd cards. I have an app that has to create an array of size x. malloc is failing every time. I've got a 1 gig file on a 4 gig card. I've got 64 megs of onboard memory (ram/data/applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/256009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I Use Python to Make a Delete Button in a 'web page' I have written a script that goes through a bunch of files and snips out a portion of the files for further processing. The script creates a new directory and creates new files for each snip that is taken out. I have to now evaluate each of the files that wer...
{ "language": "en", "url": "https://stackoverflow.com/questions/256021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Inheritance question - retrieving data from Access database file and SQL Express I am developing an application which will be connected to Access database at the beginning and the plan is to switch to MS SQL or SQL Express in the near future. The datatables structures are same for both types of databases and I am tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/256027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is std::string size() a O(1) operation? Is std::string size() a O(1) operation? The implementation of STL I'm using is the one built into VC++ A: Yes, std::string::size() is O(1). A: Here's an easy way to answer that question for msvc++. Write some code in a project: string happy; happy.size(); Hilight the .size ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How can I increase the performance in a map lookup with key type std::string? I'm using a std::map (VC++ implementation) and it's a little slow for lookups via the map's find method. The key type is std::string. Can I increase the performance of this std::map lookup via a custom key compare override for the map? Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/256038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Functions in MySQL or PHP Is it generally better to run functions on the webserver, or in the database? Example: INSERT INTO example (hash) VALUE (MD5('hello')) or INSERT INTO example (hash) VALUE ('5d41402abc4b2a76b9719d911017c592') Ok so that's a really trivial example, but for scalability when a site grows to m...
{ "language": "en", "url": "https://stackoverflow.com/questions/256046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Debugging is a bad smell - how to persuade them? I've been working on a project that can't be described as 'small' anymore (40+ months), with a team that can't be defined as 'small' anymore (~30 people). We've been using Agile/Scrum (1) practices all along, and a healthy dose of TDD. I'm not sure if I picked this up...
{ "language": "en", "url": "https://stackoverflow.com/questions/256047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Testing with random inputs best practices NOTE: I mention the next couple of paragraphs as background. If you just want a TL;DR, feel free to skip down to the numbered questions as they are only indirectly related to this info. I'm currently writing a python script that does some stuff with POSIX dates (among othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/256065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: C# error: Use of unassigned local variable I'm not sure why I'm getting this error, but shouldn't this code compile, since I'm already checking to see if queue is getting initialized? public static void Main(String[] args) { Byte maxSize; Queue queue; if(args.Length != 0) { if(Byte.TryParse...
{ "language": "en", "url": "https://stackoverflow.com/questions/256073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Static Finalizer What is the right way to perform some static finallization? There is no static destructor. The AppDomain.DomainUnload event is not raised in the default domain. The AppDomain.ProcessExit event shares the total time of the three seconds (default settings) between all event handlers, so it's not real...
{ "language": "en", "url": "https://stackoverflow.com/questions/256077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: MySql cluster "split brain" solution? Before few days I was at some IT conference here in Belgrade. On Agenda was a topic about MySql, and clustering in MySql, and the guys from MySql said that they have the best solution for cluster split brain problem, does anyone know something about this, is this true or just a...
{ "language": "en", "url": "https://stackoverflow.com/questions/256084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing the color of a selected link that is embedded in a table I'm trying to use class names to change the color of a link after it has been selected, so that It will remain the new color, but only until another link is selected, and then it will change back. I'm using this code that was posted by Martin Kool in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to install boost to the VS 2008? I've almost completely installed Boost, but I have a problem with how to set my path to Boost in Tools->options->projects->VC++ Directories. I've written the path to include files and libraries (my folder contains two subfolders, lib and include), but when I try to use Boost with...
{ "language": "en", "url": "https://stackoverflow.com/questions/256109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best tutorial for application multicasting? I've recently become aware that there's a distinction between IP multicasting (which apparently doesn't work that well on the public internet) and application multicasting (which is apparently used in IRC and PSYC, per http://en.wikipedia.org/wiki/Multicast). Is there a go...
{ "language": "en", "url": "https://stackoverflow.com/questions/256125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Cygwin + git permission problems when trying to create a commit message When I try to commit the first revision to my git repository (git commit) from Cygwin, I'm getting an error in gvim which says "Unable to open swap file for "foo\.git\COMMIT_EDITMSG" [New Directory]. I think it might be some sort of permission p...
{ "language": "en", "url": "https://stackoverflow.com/questions/256142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can someone explain Anonymous methods to me? Delphi 2009, among some cool stuff, has also just got Anonymous methods. I've seen the examples, and the blog posts regarding anonymous methods, but I don't get them yet. Can someone explain why I should be excited? A: People have already provided the code, so I'll just ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Passing pointers/references to structs into functions This is going to sound like a silly question, but I'm still learning C, so please bear with me. :) I'm working on chapter 6 of K&R (structs), and thus far through the book have seen great success. I decided to work with structs pretty heavily, and therefore did a...
{ "language": "en", "url": "https://stackoverflow.com/questions/256148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Language Wizards considered harmful? Wizards can kick-start features. They can also obfuscate your code, and are anti-YAGNI. On balance, do you think Wizards are more useful or more harmful? A: They are more useful than harmful if and only if you understand the code they generate. Only after you mastered the proble...
{ "language": "en", "url": "https://stackoverflow.com/questions/256154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best OS for java development? What is the best OS for Java development? People from Sun are pushing the Solaris, yes Solaris have some extra features included in itself such as (dTrace, possibility for Performance tuning the JVM, etc.. ). Some friends of mine, had port their application on solaris, and they said to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What is the most secure method for uploading a file? The company I work for has recently been hit with many header injection and file upload exploits on the sites we host and while we have fixed the problem with respect to header injection attacks, we have yet to get the upload exploits under control. I'm trying to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How to read text from a textbox and make some of them a link? I will show the problem with a example. There is some text in the textbox such here: Hi! this is a example [lnk]text[/lnk] When i push the submit button and publish this text, the word in the [lnk] and [/lnk] tags must be a link like this www.mysite.com?l...
{ "language": "en", "url": "https://stackoverflow.com/questions/256183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How much memory does a thread consume when first created? I understand that creating too many threads in an application isn't being what you might call a "good neighbour" to other running processes, since cpu and memory resources are consumed even if these threads are in an efficient sleeping state. What I'm interes...
{ "language": "en", "url": "https://stackoverflow.com/questions/256188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: jQuery $(document).ready and UpdatePanels? I'm using jQuery to wire up some mouseover effects on elements that are inside an UpdatePanel. The events are bound in $(document).ready . For example: $(function() { $('div._Foo').bind("mouseover", function(e) { // Do something exciting }); }); Of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "484" }
Q: Close file without quitting VIM application? I use the :e and :w commands to edit and to write a file. I am not sure if there is "close" command to close the current file without leaving Vim? I know that the :q command can be used to close a file, but if it is the last file, Vim is closed as well; Actually on Mac OS...
{ "language": "en", "url": "https://stackoverflow.com/questions/256204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "282" }
Q: Browser app in high latency/low bandwidth environments We have a typical business application with an Outlook-looking Winforms client talking to asmx webservices. We’d like to make a portion of the features available over our intranet, but the new users we need to reach - all of them - are in developing countries w...
{ "language": "en", "url": "https://stackoverflow.com/questions/256215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }