text
string
meta
dict
Q: How to provide a Session/Host object for use in both a windows and web application? I have a web application that makes heavy use of the Session state to store information about the current user, their personal settings, record their session history and so on. I have found myself retrieving this session information...
{ "language": "en", "url": "https://stackoverflow.com/questions/236362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you override the Icon for iphone apps? I remember reading somewhere that you can provide your own icons without having them pass them through the automatic gloss effect when compiling an iphone app, but I can't remember how to do it, and not sure where it was in the docs. Anyone here remembers? thanks! A: Ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/236376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Integrating POP3 client functionality into a C# application? I have a web application that requires a server based component to periodically access POP3 email boxes and retrieve emails. The service then needs to process the emails which will involve: * *Validating the email against some business rules (does it co...
{ "language": "en", "url": "https://stackoverflow.com/questions/236381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: What's the best way to have stringTokenizer split up a line of text into predefined variables I'm not sure if the title is very clear, but basically what I have to do is read a line of text from a file and split it up into 8 different string variables. Each line will have the same 8 chunks in the same order (title, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What advantages does C++ have over other languages for Qt development? As well-known, C++ has steeper learning curve than most of the mainstream languages, which results in better performance . But, does using C++ over other languages[like Java,Ruby,Python] for Qt development have still (major) advantages,let's say ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Any Smalltalk on .NET? Are there any usable implementations of Smalltalk for the .NET runtime? A: There's a project to build Smalltalk on top of the DLR. Unsurprisingly, it's called IronSmaltalk. A: There is LSW Vision-Smalltalk, which seems to be a private Smalltalk environment, they claim to support .NET: "LSWVS...
{ "language": "en", "url": "https://stackoverflow.com/questions/236400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to read XML sent using XMLHTTP in codebehind file? I have a javascript code where i am creating an XML Dom and sending (using XMLHTTP ) it to a codebehind page (server.aspx.cs).How can i read the XML there ? A: One way to achieve this is to simply load the InputStream from the Request object into an XmlDocument...
{ "language": "en", "url": "https://stackoverflow.com/questions/236403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a difference between is_int() and ctype_digit()? Is one more preferred, or performs better over the other? A: The last thing you should be worrying about is how fast one of these is. There is no way that checking a string for being an integer is going to be a bottleneck in your code. A: ctype not always ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: How can I use Python for large scale development? I would be interested to learn about large scale development in Python and especially in how do you maintain a large code base? * *When you make incompatibility changes to the signature of a method, how do you find all the places where that method is being called....
{ "language": "en", "url": "https://stackoverflow.com/questions/236407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Connection string hell in .NET / LINQ-SQL / ASP.NET I have a web application that comprises the following: * *A web project (with a web.config file containing a connection string - but no data access code in the web project) *A data access project that uses LINQ-SQL classes to provide entities to the web project...
{ "language": "en", "url": "https://stackoverflow.com/questions/236412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: What is the best compression algorithm that allows random reads/writes in a file? What is the best compression algorithm that allows random reads/writes in a file? I know that any adaptive compression algorithms would be out of the question. And I know huffman encoding would be out of the question. Does anyone have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What's a good way to train employees on how to use the software you've just created? I'm working in a small company and weeks away from deploying a web-app that will be used a lot. Everyone at one location will have to learn to use it, and although I think it's pretty easy and intuitive I may be biased. I've writte...
{ "language": "en", "url": "https://stackoverflow.com/questions/236416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: error-handling-when-taking-user-input part2 I made previously a question: error handling when taking user input and I made the suggested changes: char displayMainMenu() { char mainMenuChoice; cout << "\nQuadratic equation: a*X^2 + b*X + c = 0 main menu: "; cout << "\n <r> Give new coefficients"; cout << "\n <c> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it correct to compare two rounded floating point numbers using the == operator? Or is there a chance that the operation will fail? Thanks. I chose the wrong term and what I really meant was rounding to 0, not truncation. The point is, I need to compare the integer part of two doubles and I'm just casting them to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the current state of text-only compression algorithms? In honor of the Hutter Prize, what are the top algorithms (and a quick description of each) for text compression? Note: The intent of this question is to get a description of compression algorithms, not of compression programs. A: There's always lzip. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Fontifying variable references within string literals in Emacs font-lock-mode When I type the following code in Emacs ruby-mode, the "#{foo}" is fontified in a different color than the enclosing string. How do I do this in my own Emacs mode? I tried to decipher the ruby-mode source code but couldn't understand it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: rhino-mocks - good sample apps I know that there has been a couple questions about tutorials on rhino-mocks. But I am wondering if there are any sample apps out there that use rhino-mocks in the context of an n-tier business application using ado.net. I find the tutes good, but they don't seem to bring everything a...
{ "language": "en", "url": "https://stackoverflow.com/questions/236466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I send a control character down a socket in PHP? In a PHP script I am writing, I need to send a control+z character down a network socket I have previously created. I understand the ctrl+z character to be chr(26), so at the end of the string I am sending I have added a new line (\r\n) and then the chr(26) as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to handle a reentrant validation event when showing dialog I'm wondering how people handle a situation like this, when you have a validation event, and you need to show the user a dialog box asking him whether to continue or cancel. The problem is that when showing that dialog box, it causes another validation e...
{ "language": "en", "url": "https://stackoverflow.com/questions/236476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where I can download sample database which can be used as data warehouse? Where I can download sample database which can be used for data warehouse creation? It should't be sample from Microsoft (Northwind etc.). EDIT: Sorry for not clarifying my question. At my university we have class where we must create some dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/236478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What are the arguments IN FAVOR of PHP closing tags for PHP only files? The Zend Framework coding standard mentions the following: For files that contain only PHP code, the closing tag ("?>") is never permitted. It is not required by PHP, and omitting it prevents the accidental injection of trailing whitespace into...
{ "language": "en", "url": "https://stackoverflow.com/questions/236493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Compression XML metrics . I have a client server application that sends XML over TCP/IP from client to server and then broadcast out to other clients. How do i know at what the minimun size of the XML that would warrant a performance improvement by compression the XML rather than sending over the regular stream. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/236496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I make Visual Studio wrap lines at 80 characters? Is there any way to make Visual Studio word-wrap at 80 characters? I'm using VS2008. This post is loosely related. A: To do this with Visual Assist (another non-free tool): VAssistX >> Visual Assist X Options >> Advanced >> Display * *Check "Display indi...
{ "language": "en", "url": "https://stackoverflow.com/questions/236517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "137" }
Q: Using the typical get set properties in C#... with parameters I'd like to do the same in C#. Is there anyway of using properties in C# with parameters in the same way I've done with the parameter 'Key' in this VB.NET example? Private Shared m_Dictionary As IDictionary(Of String, Object) = New Dictionary(Of String, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you automate copying file with path too deep issues in Windows? I want to be able to selectively copy a list of files and preserve their directory structure. The problem is that there are quite a few files that their path exceeds 256 character. How is this problem usually handled? Edit: I should make it cle...
{ "language": "en", "url": "https://stackoverflow.com/questions/236533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Rake and current directory How do I get the directory where the rakefile.rb is located? I want to use this as my root directory to locate everything off. A: Why not just use Dir.pwd ? A: As of Ruby 2 you can use __dir__ instead of File.dirname(__FILE__) to get the directory that contains the current script. A: us...
{ "language": "en", "url": "https://stackoverflow.com/questions/236538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Compare datatables I built an application which displays the records from database in the window and checks the the database for new records every couple of seconds. The problem is that the window blinks each time I check for new records and I want to fix it. I have tried to compare the old datatable with the new on...
{ "language": "en", "url": "https://stackoverflow.com/questions/236555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Linq to Sql - Hierarchical Query to Find Ancestors Given an EmployeeId, how can I construct a Linq to Sql query to find all of the ancestors of the employee? Each EmployeeId has an associated SupervisorId (see below). For example, a query of the ancestors for EmployeeId 6 (Frank Black) should return Jane Doe, Bob S...
{ "language": "en", "url": "https://stackoverflow.com/questions/236575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SVN Update of multiple files How to do svn update of multiple files located across different directories ? For committing multiple files from different directories, we can put them all up in a text file and give that file as an argument to svn commit and it will happily commit all those files. But update ? EDIT: Mr...
{ "language": "en", "url": "https://stackoverflow.com/questions/236593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to unit test if my object is really serializable? I am using C# 2.0 with Nunit Test. I have some object that needs to be serialized. These objects are quite complex (inheritance at different levels and contains a lot of objects, events and delegates). How can I create a Unit Test to be sure that my object is saf...
{ "language": "en", "url": "https://stackoverflow.com/questions/236599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Are there some statistics on the most frequently used Java API functions? Given a large API (an in particular, the Java or J2EE standard libraries), is there a tool or search engine or other resource that can tells me which methods, classes, or even packages people in general tend to use the most? I am annotating (s...
{ "language": "en", "url": "https://stackoverflow.com/questions/236609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to access HTML element without ID? For instance in the snippet below - how do I access the h1 element knowing the ID of parent element (header-inner div)? <div id='header-inner'> <div class='titlewrapper'> <h1 class='title'> Some text I want to change </h1> </div> </div> Thanks! A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/236624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Vector graphics clipboard format for Qt I want my Qt application to be able to save simple vector graphics to clipboard in a compatible way. On windows I want to be able to paste the graphics into Microsoft Word or Powerpoint. On Linux I want to be compatible with the Open Office. Which format would you recommend? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What other languages have features and/or libraries similar to Perl's format? I may be in the minority here, but I very much enjoy Perl's formats. I especially like being able to wrap a long piece of text within a column ("~~ ^<<<<<<<<<<<<<<<<" type stuff). Are there any other programming languages that have simi...
{ "language": "en", "url": "https://stackoverflow.com/questions/236629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Printing Scrolled Divs I have a web page that displays a long line graph inside a div with overflow-x: scroll. This works well as a web page allowing the use to scroll back and forward through the graph. However, when printing the page the scroll position is reset to zero. Is there a way to overcome this? A: I thin...
{ "language": "en", "url": "https://stackoverflow.com/questions/236630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Most succinct LINQ To SQL for taking COUNT(*) of either side of many-to-many? Please help me with a sanity check. Assuming a many-to-many relationship: Post, PostTagAssoc, Tag http://www.codingthewheel.com/pics/many_to_many.gif What's the most succinct way (using LINQ to SQL) to get a result set showing, for each ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/236632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Connection Strings modification after the deployment I created the setup project for the application and I can see that the later modifications of the configuration file (Application.exe.config) don't affect the application execution. I am developing an application with the database file included and I want to enabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/236644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: timerfd_create with debian linux testing on amd64 I am trying to use timerfd_create and timerfd_settime under Debian Linux lenny. The manpage says to include <sys/timerfd.h>. This file cannot be located on my System. According to the Debian Package Search the only packages with a timerfd.h are the linux-headers-* pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/236652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Good sophisticated linq to sql sample? I am looking for a more sophisticated way of using Linq to SQL. I am leaning L2Q but I am only seeing simple examples of business objects and simple CRUD operations in them. Any sample application that includes these: 1- Business objects which get their data from more than 1 ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/236665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Foreign keys in MySQL? I have been slowly learning SQL the last few weeks. I've picked up all of the relational algebra and the basics of how relational databases work. What I'm trying to do now is learn how it's implemented. A stumbling block I've come across in this, is foreign keys in MySQL. I can't seem to find ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What's an easy way to obtain the current svn revision in a c++ visual studio application Is there any easy way to access the SVN repository revision number and store it in a c++ string in a c++ visual studio application? Thanks for your help in advance! A: If you have tortoise SVN you can use SubWCRev.exe Create a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: eliminate the enter key after pressing it in the keyup event of a textbox How to cancel a keypress event in a textbox after pressing the return key. A: Set the Handled property of KeyPressEventArgs handler parameter to true. Example from msdn: private void keypressed(Object o, KeyPressEventArgs e) { if (e.KeyCh...
{ "language": "en", "url": "https://stackoverflow.com/questions/236675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can this be refactored into nicey nice LINQ? I have an IList of type Breadcrumb which is just a lightweight class that has NavigationTitle, NavigationUrl and IsCurrent properties. It is cached on the webserver. I have a method that builds out the current breadcrumb trail up until the first Breadcrumb that has IsCurr...
{ "language": "en", "url": "https://stackoverflow.com/questions/236676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I convert any image to a 4-color paletted image using the Python Imaging Library? I have a device that supports 4-color graphics (much like CGA in the old days). I wanted to use PIL to read the image and convert it using my 4-color palette (of red, green, yellow, black), but I can't figure out if it's even po...
{ "language": "en", "url": "https://stackoverflow.com/questions/236692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Unable to cat Ruby blocks to files Please help, I am stuck here --- irb> a = "line of text\n line two\n line three" irb> system("cat > test_file << #{a}") cat: of: No such file or directory cat: text: No such file or directory => false A: Write a to a file called "testfile": File.open("testfile", "w") do |io| io...
{ "language": "en", "url": "https://stackoverflow.com/questions/236713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I submit a form in RoR whenever an input textfield changes? I am using Ruby on Rails. I want to create a filter field on a page such that whenever the input field's value changes I filter a list shown below via ajax. (Exaclty like the Users search works in Stackoverflow) For now, I made it run with a form_re...
{ "language": "en", "url": "https://stackoverflow.com/questions/236715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you create a linked server from SQL Server (any version) to a SQL Server CE (3.5) database? We've purchased a tool from Redgate called SQL Data Compare. I use it mainly for testing purposes to prove that my application is making the modifications to the database that I think it is, and not making any other chan...
{ "language": "en", "url": "https://stackoverflow.com/questions/236719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does Google's In Quotes work? I find Google's In Quotes a really nifty application, and as a CS guy, I have to understand how it works. How do you think it turns news articles into a list of quotes attributed to specific persons? Sure, there are some mistakes, but their algorithm seems to be smarter than just a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Netbeans - Turn off - wavy red underlines - How? How can I turn off the wavy red underlines in Netbeans? I don't want to be interrupted while I'm typing, and told that a half finished line of code is wrong. A: This has actually already been addressed and illustrated in Arnold's answer to NetBeans. Disable error che...
{ "language": "en", "url": "https://stackoverflow.com/questions/236733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Making a system call that returns the stdout output as a string Perl and PHP do this with backticks. For example, $output = `ls`; Returns a directory listing. A similar function, system("foo"), returns the operating system return code for the given command foo. I'm talking about a variant that returns whatever foo ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Agile in small bites: most bang for the buck What single aspect of agile development should we implement first to improve our development process, and why? I'm in a situation that's requiring me to "tweak" my process, rather than re-engineer it, and "agile" seems to be the mantra of the day. If we can make only o...
{ "language": "en", "url": "https://stackoverflow.com/questions/236744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to concatenate web pages in ASP.NET I have a bunch of ASP.NET web pages (that have a standard layout) that are product documentation. I want to create some sort of combination page that will pull all of the other page content in and concatenate them into one long page. IFrames won't work because I don't know th...
{ "language": "en", "url": "https://stackoverflow.com/questions/236749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Help write a query: Confusion over order of operations of GROUP BY and ORDER BY I have a table named Info of this schema: int objectId; int time; int x, y; There is a lot of redundant data in the system - that is, objectId is not UNIQUE. For each objectId there can be multiple entries of time, x, y. I want to retri...
{ "language": "en", "url": "https://stackoverflow.com/questions/236778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: designing business msgs parser / rewriting from scratch I take care of critical app in my project. It does stuff related to parsing business msgs (legacy standard), processing them and then storing some results in a DB (another apps picks that up). After more then a year of my work (I've other apps to look after as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to group gwt-rpc calls? With DWR it is possible to group together several service calls into one single HTTP request : dwr batch feature This feature is very useful to reduce the latency of an ajax application. Is there a way to do something similar with GWT / GWT-RPC ? Thanks for your help A: Google's Ray Rya...
{ "language": "en", "url": "https://stackoverflow.com/questions/236793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: PHP: destructor vs register_shutdown_function I have a PHP class that creates a PNG image on the fly and sends it to browser. PHP manual says that I need to make sure that imagedestroy function is called at end to release the memory. Now, if I weren't using a class, I would have some code like this: function shutdow...
{ "language": "en", "url": "https://stackoverflow.com/questions/236795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Should operator<< be implemented as a friend or as a member function? That's basically the question, is there a "right" way to implement operator<< ? Reading this I can see that something like: friend bool operator<<(obj const& lhs, obj const& rhs); is preferred to something like ostream& operator<<(obj const& rhs...
{ "language": "en", "url": "https://stackoverflow.com/questions/236801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "162" }
Q: How do I get a zipped file's content using the rubyzip library? I'm trying to extract an uploaded zip file and store its contents in the database, one entry per file. The rubyzip library has nearly no useful documentation. There is an assets table that has key :string (file name) and data :binary (file contents). I...
{ "language": "en", "url": "https://stackoverflow.com/questions/236810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How .NET 3.5 (lambdas, Linq) evolved I remember reading a post about a year or so ago by Scott Hanselman (maybe by scott guthrie) about how Linq evolved. It remember it showing that anyonymous types led to lambda expressions which then led to Linq in some way. I can't seem to find it on google. Does anyone else r...
{ "language": "en", "url": "https://stackoverflow.com/questions/236818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What to do with a stupid client request? I won the bid on a project and now the client (who is itself from IT Department) wants me to architect/implement the solution in a very particular way. I am sure the application will fail that way for performance problems. And it will not be easily scalable. This particular c...
{ "language": "en", "url": "https://stackoverflow.com/questions/236835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are good Linux/Unix books for an advancing user? Are there any good books for a relatively new but not totally new *nix user to get a bit more in depth knowledge (so no "Linux for dummies")? For the most part, I'm not looking for something to read through from start to finish. Rather, I'd rather have somethi...
{ "language": "en", "url": "https://stackoverflow.com/questions/236838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Error Tracking in live/production web applications I currently work at a company that has a lot of custom applications that are made internally. There are not currently standards for a lot of things. I would like to implement a way to record/track errors that happen in this programs (most are asp.net). I am curren...
{ "language": "en", "url": "https://stackoverflow.com/questions/236851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Any python libs for parsing Bind zone files? Any python libs for parsing Bind zone files? Basically something that will aid in adding/removing zones and records. This needs to work even if someone modifies the zone file by hand so overwriting the zone files every time is not a solution. A: easyzone is a nice lay...
{ "language": "en", "url": "https://stackoverflow.com/questions/236859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do you determine the ideal buffer size when using FileInputStream? I have a method that creates a MessageDigest (a hash) from a file, and I need to do this to a lot of files (>= 100,000). How big should I make the buffer used to read from the files to maximize performance? Most everyone is familiar with the basi...
{ "language": "en", "url": "https://stackoverflow.com/questions/236861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "174" }
Q: What to use: var or object name type? this is a question that when programming I always wonder: What to use when we are writing code: var myFiles = Directory.GetFiles(fullPath); or string[] myFiles = Directory.GetFiles(fullPath); var is new and is a Implicitly Typed Local Variables, so we can only use locally and...
{ "language": "en", "url": "https://stackoverflow.com/questions/236878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Is there identicon library for PHP I'm looking for a PHP library/function/class which can create Identicons. A: how about this it's how Scott did the identicons for Wordpress, you can download the code and see for yourself. Hope it helps. A: Sourceforge has a PHP identicon implementation A: i use this: class Grav...
{ "language": "en", "url": "https://stackoverflow.com/questions/236879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Friendship relations tracking algorithm I'm thinking of an application that would try to prove the "Six degrees of separation" theory with a set of users that are part of a social network. I would have those elements: * *A couple of users for which I'd like to prove the six degrees theory *For each user, I know ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does a print version of the Java 1.5 API exist? Does a print version of the Java >= 1.5 API exist? Where can I buy it online? Preferably in Canada, but just a title is great. A: Java in a Nutshell by O'Reilly A: you can download the entire api documentation as a static website from here. I use it a lot when im aw...
{ "language": "en", "url": "https://stackoverflow.com/questions/236892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: php: open_basedir and /dev/urandom Calling the Pear Mail class in some instances automatically attempts to read /dev/urandom, however access is restricted due to an open_basedir setting. Is it safe to add /dev to open_basedir? Or is there a better way around this? A: Do you trust everyone who will be writing PHP ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I create a custom DVD player for XBox? I would like to create an application that runs on XBox 360 (downloaded using XBox Live) that will play the DVD movie in the tray. I know the XBox already has this ability, but I want my custom DVD player to allow users to save bookmarks for parts of the movie they real...
{ "language": "en", "url": "https://stackoverflow.com/questions/236923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I programatically interface an Excel spreadsheet? I have a request for some contract work from an organization that uses Excel as a database and wants to do some work on the Excel data via a real database. (Yeah, I know, never mind...) The client has an Excel sheet that they use internally to keep track of so...
{ "language": "en", "url": "https://stackoverflow.com/questions/236926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to pick color palette for a pie-chart? I have some code that generates image of a pie chart. It's a general purpose class, so any number of slices can be given as input. Now I have problem picking good colors for the slices. Is there some algorithm that is good at that? Colors need to follow some rules: * *the...
{ "language": "en", "url": "https://stackoverflow.com/questions/236936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: PHP's sleep function and client connections How does PHP handle client connection while doing sleeps? Or put another way ... what happens if the client closes the connection to the server while a page is being processed? Does it just kill the process, or does it continue to process the page until the end? Since I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/236941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using VirtualPathProvider to load ASP.NET MVC views from DLLs Based on this question here and using code found here I'm trying to load views that are embedded resources in a separate DLL project, and the original question's author says he has had success doing this - but I can't get it to work as it seems the MVC vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/236972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Parsing CSS by regex I'm creating a CSS editor and am trying to create a regular expression that can get data from a CSS document. This regex works if I have one property but I can't get it to work for all properties. I'm using preg/perl syntax in PHP. Regex (?<selector>[A-Za-z]+[\s]*)[\s]*{[\s]*((?<properties>[A-Za...
{ "language": "en", "url": "https://stackoverflow.com/questions/236979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Embedding Opera in Cocoa So, I'm writing a Cocoa application that needs to be able to display web content using Opera's rendering engine. This is for a feature, not because I'm an Opera fanboi (I'm not). All I've been able to find on the subject is this press release about Adobe's use of the Opera engine. Has anyone...
{ "language": "en", "url": "https://stackoverflow.com/questions/236990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there hard evidence of the ROI of unit testing? Unit testing sounds great to me, but I'm not sure I should spend any time really learning it unless I can convince others that is has significant value. I have to convince the other programmers and, more importantly, the bean-counters in management, that all the ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/237000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: Forgot SQL Server Password I installed SQL Server 2005 sometime ago and forgot the administrator password I set during setup. How can I connect to SQL server now? EDIT: I think I only allowed Sql Server Authentication. Login with integrated security also does not work. A: You don't need to pay for any reset tools t...
{ "language": "en", "url": "https://stackoverflow.com/questions/237006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Is there a central repository for time zone information I know that systems are using their own time zone databases at different levels. Is there a central place where all timezeone and DST information lives, that makes it easy for programmers to write updates to their time zone data sources? For example, do people ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Inheritance in C++ Here's my problem: I have a virtual method defined in a .h file that I want to call in a class that inherits from the base class. Sadly though, the method in the derived class doesn't get called. Is there a better way to implement what I'm trying to do? #ifndef ofxBASE_SND_OBJ #define ofxBASE_SND_...
{ "language": "en", "url": "https://stackoverflow.com/questions/237027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Confirmed features of .NET 4.0? Does anyone know what will be in .NET 4.0? I found tuples on codeplex: .... // NOTE : this is a TEMPORARY and a very minimalistic implementation of Tuple'2, // as defined in http://devdiv/sites/docs/NetFX4/CLR/Specs/Base Class Libraries/Tuple Spec.docx // We will remove this after we...
{ "language": "en", "url": "https://stackoverflow.com/questions/237041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does Silverlight determine an assembly is "Silverlight"? I'm trying to compile code from F# to use in Silverlight. I compile with: --noframework --cliroot "C:\program Files\Microsoft Silverlight\2.0.31005.0" --standalone This generates a standalone assembly that references the SL framework. But when I try to ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/237044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What methods get called when you resize a JFrame? I'm using a JFrame in which the CENTER portion of the BorderLayout is occupied by a JScrollPane that wraps around a JPanel. What I'm finding is that when I initiate the action that actually causes the JPanel to be displayed, the display doesn't change. But when I r...
{ "language": "en", "url": "https://stackoverflow.com/questions/237050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I redistribute Windows Imaging Component with .NET Framework 2.0? I have a .NET Framework 2.0 app and would like to use the Windows Imaging Component. Since my application is a WinForms app and will be redistributed to users via an MSI installer I'm trying to figure out the best way to do this. I see a couple...
{ "language": "en", "url": "https://stackoverflow.com/questions/237052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java: Easiest way to replace strings with random strings A string will be made up of certain symbols (ax,bx,dx,c,acc for example) and numbers. ex: ax 5 5 dx 3 acc c ax bx I want to replace one or all of the symbols (randomly) with another symbol of the same set. ie, replace one of {ax,bx,dx,c,acc} with one of {ax,bx...
{ "language": "en", "url": "https://stackoverflow.com/questions/237058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Regular Expressions to Extract a Value in Java I have several strings in the rough form: [some text] [some number] [some more text] I want to extract the text in [some number] using the Java Regex classes. I know roughly what regular expression I want to use (though all suggestions are welcome). What I'm real...
{ "language": "en", "url": "https://stackoverflow.com/questions/237061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "209" }
Q: How to add a SqlMetal build step in VS2008? I've created a one-line batch file to run SqlMetal to regenerate a LINQ to SQL DataContext for my database; this works great. Refresh_DataContext.bat: "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\sqlmetal.exe" /server:.\sqlexpress /database:MyDatabaseName ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++ Nested classes driving me crazy i am trying to compile this very simple piece of code class myList { public: std::vector<std::string> vec; class Items { public: void Add(std::string str) { myList::vec.push_back(str); }; }items; }; int main() { myList n...
{ "language": "en", "url": "https://stackoverflow.com/questions/237064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Simple, manual-start user instructions in case Windows CD fails to autostart Our CD autostarts, but occasionally customers have that disabled (by a CD burner, etc.). As a backup, we include instructions on the back of our CD (below). I'm trying to find better instructions, for Windows XP and above. (Ideally for Win...
{ "language": "en", "url": "https://stackoverflow.com/questions/237066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does a SSRS report time out when the Stored Procedure it is based on returns results within a few seconds? I have a report that renders data returned from a stored procedure. Using profiler I can catch the call to the stored procedure from the reporting services. The report fails stating the report timed out ye...
{ "language": "en", "url": "https://stackoverflow.com/questions/237069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get file creation and modification date/times? What's the best cross-platform way to get file creation and modification dates/times, that works on both Linux and Windows? A: Getting some sort of modification date in a cross-platform way is easy - just call os.path.getmtime(path) and you'll get the Unix tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/237079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1250" }
Q: How to validate Markdown? It's possible to write Markdown content with invalid syntax. Invalid means that the BlueCloth library fails to parse the content and throws an exception. The markdown helper in Rails doesn't catch any BlueCloth exceptions and because of that the complete page fails to render (500 Server Err...
{ "language": "en", "url": "https://stackoverflow.com/questions/237085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to get BIDS for Visual Studio 2008 SP1? I currently use Visual Studio 2008 SP1 and have been migrating older projects into VS2008 but existing SSIS and SSRS (2005) projects have not been compatible with VS2008. It has been a pain to maintain those BIDS projects as a separate solution. I have been considering up...
{ "language": "en", "url": "https://stackoverflow.com/questions/237091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Send administrative commands to my C# Windows Service using own PowerShell CmdLets I have a C# Windows application which runs a service. I would like to leverage PowerShell in order to offer a command line management interface for administering my running service. From my point of view, I am trying to offer the same...
{ "language": "en", "url": "https://stackoverflow.com/questions/237096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I check if an array includes a value in JavaScript? What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) { for (var i = 0; i < a.length; i++) { if (a[i] === obj) { return true; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4793" }
Q: Get string return value from C DLL in Delphi I have a legacy DLL written in C that contains a function that returns a string, and I need to access this function from Delphi. The only info I have about the DLL is the VB declare for accessing the function: Public Declare Function DecryptStr Lib "strlib" (Str As String...
{ "language": "en", "url": "https://stackoverflow.com/questions/237106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Simplest way to send mail with Ruby on Rails What is the simplest way to send mail using Ruby on Rails? Is there a way to send mail directly via ruby and skip all the rails models and complexity, just like php's mail() function? Thanks for your help. A: There's also TMail. A: Another excellent solution is a gem ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/237107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the best way to execute sequential methods? Working on a project where a sequential set of methods must be run every x seconds. Right now I have the methods contained within another "parent method", and just sequentially call them right after another. class DoTheseThings() { DoThis(); NowDoThat(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/237112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Could "attach source" be made easier for popular Java libraries? I run into this obstacle when my debugger steps into some classfile without corresponding source. Finding it is often difficult: * *You have to search for the site hosting the respective project, and find its ``download source'' page (for instance,...
{ "language": "en", "url": "https://stackoverflow.com/questions/237118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Accessing members of the other half of a partial class I'm just learning to work with partial classes in VB.NET and VS2008. Specifically, I'm trying to extend a LINQ to SQL class that was automatically created by SqlMetal. The automatically generated class looks like this: Partial Public Class DataContext Inher...
{ "language": "en", "url": "https://stackoverflow.com/questions/237123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }