text
string
meta
dict
Q: OCaml: Match expression inside another one? I'm currently working on a small project with OCaml; a simple mathematical expression simplifier. I'm supposed to find certain patterns inside an expression, and simplify them so the number of parenthesis inside the expression decreases. So far I've been able to implement ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Which browsers/plugins block HttpReferer from being sent? I am trying to interpret HttpReferer strings in our server logs. It seems like there is quite a high number of empty values. I am wondering how many of these empty values are due to direct hits from people entering our URL directly into a browser and how many...
{ "language": "en", "url": "https://stackoverflow.com/questions/257609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does sudo change the PATH? This is the PATH variable without sudo: $ echo 'echo $PATH' | sh /opt/local/ruby/bin:/usr/bin:/bin This is the PATH variable with sudo: $ echo 'echo $PATH' | sudo sh /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin As far as I can tell, sudo is supposed to...
{ "language": "en", "url": "https://stackoverflow.com/questions/257616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "294" }
Q: Website version 2, keep in PHP or move to .Net? I have a website built in PHP 4 with a framework made by hand by me. The code is 3 years old and I am limited (well it requires a lot of effort to make changes). I decided to do new version of this website. My knowledge has since increased, and now I know that a lot of...
{ "language": "en", "url": "https://stackoverflow.com/questions/257643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Getting Random Durations within a range in C# For a random event generator I'm writing I need a simple algorithm to generate random ranges. So, for example: I may say I want 10 random intervals, between 1/1 and 1/7, with no overlap, in the states (1,2,3) where state 1 events add up to 1 day, state 2 events add up t...
{ "language": "en", "url": "https://stackoverflow.com/questions/257645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Returning a value of type Microsoft.XLANGs.BaseTypes.XLANGMessage Having a problem trying to create a function, as part of a BizTalk helper class that returns a value of type (Microsoft.XLANGs.BaseTypes.XLANGMessage). The function code is as follows: public XLANGMessage UpdateXML (XLANGMessage inputFile) { XmlDoc...
{ "language": "en", "url": "https://stackoverflow.com/questions/257653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: 'Snippit' based django semi-CMS I remember reading somewhere on the internets about a half-assed tiny django CMS app, which was basically built on 'snippets' of text. The idea was, that in the admin, you make a snippet (say a description of a product), give it a name (such as 'google_desc') and call it in a template...
{ "language": "en", "url": "https://stackoverflow.com/questions/257655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I make a fake "active session" for gconf? I've automated my Ubuntu installation - I've got Python code that runs automatically (after a clean install, but before the first user login - it's in a temporary /etc/init.d/ script) that sets up everything from Apache & its configuration to my personal Gnome prefer...
{ "language": "en", "url": "https://stackoverflow.com/questions/257658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to get a command line process to use less processing power I am wondering how to get a process run at the command line to use less processing power. The problem I'm having is the the process is basically taking over the CPU and taking MySQL and the rest of the server with it. Everything is becoming very slow. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: nag screens / nagware acceptable? What are your opinions (as users as well as developers) on begware that e.g. at the start screen or intermittently shows a modal dialog for x seconds? What about other methods of getting the user to pay (or send you a postcard or any other kind of appreciation) instead of using the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Master Pages - Design question Would you guys think that a master page should be part of the company's framework or it should be part of each application? Or perhaps the company's framework should only have a interface to provide the least functionality to all master pages ? Currenlty we face two problems: Firstly, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SharePoint Visual Studio document upload Web Test fails with Connot close stream until all bytes are written I have created a Visual Studio 2008 sp1 test suite web test that uploads a document to a document library in SharePoint. The test is a lot like the one described here. All is fine until the test is converted ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are windows file creation timestamps reliable? I have a program that uses save files. It needs to load the newest save file, but fall back on the next newest if that one is unavailable or corrupted. Can I use the windows file creation timestamp to tell the order of when they were created, or is this unreliable? I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/257685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Recommendations for a good vi reference? As I don't use vi all that much and certainly not for my primary editor, I can't remember any of the vi commands. Does anyone have a recommendation for a quick start guide or command summary? A: Learning the vi editor by Arnold Robbins and Linda Lamb A little companion for...
{ "language": "en", "url": "https://stackoverflow.com/questions/257699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Delphi: Why does "use debug DCUs" become ineffective if I'm using packages in my project? I'm building a project that uses the JVCL plugin system, which relies on runtime Delphi packages, and ever since I added it to my project, debugging has become a nightmare because I'm no longer able to step-trace into the sourc...
{ "language": "en", "url": "https://stackoverflow.com/questions/257711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python vs Groovy vs Ruby? (based on criteria listed in question) Considering the criteria listed below, which of Python, Groovy or Ruby would you use? * *Criteria (Importance out of 10, 10 being most important) *Richness of API/libraries available (eg. maths, plotting, networking) (9) *Ability to embed in deskt...
{ "language": "en", "url": "https://stackoverflow.com/questions/257730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Creating Visual Studio Templates I'm looking to create a Visual Studio 2008 template that will create a basic project and based on remove certain files/folders based on options the user enters. Right now, I have followed some tutorials online which have let me create the form to query the user and pass the data into...
{ "language": "en", "url": "https://stackoverflow.com/questions/257735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Subclipse: Is there a way to make Team>Create Patch use relative paths? I recently got involved in a Java project at work: we're using MyEclipse for the IDE, and Subclipse for source control integration. Since I am new to the project, I am currently submitting any changes I make as patches, to make it easier for the...
{ "language": "en", "url": "https://stackoverflow.com/questions/257739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you access an attached property of a Silverlight object in C#? Basically I'm trying to change the Canvas.Left property of an Ellipse Silverlight control in C#. Here is how I'm accessing the control: Ellipse c1 = this.FindName("Circle1") as Ellipse; How would I then set the Canvas.Left property? Thanks, Jeff...
{ "language": "en", "url": "https://stackoverflow.com/questions/257740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change Visual Studio whitespace settings? I have whitespace characters showing in the Visual Studio code editor, and I'd like to remove them. A: If it is VS2008 then you can use Ctrl+E, S combination to toggle. A: Ajryan is correct but depending on your profile this menu item may be obscured. The keyboard ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Best (or any) way to programmatically screen grab a Google Street View panorama As the question implies, I'm looking for a way to programmatically screen grab a given panorama, I.E set a longitude and latitude and POV (pitch, yaw and zoom) and save the grab to the server. So far the most promise has been shown by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I split a Mercurial repository? I have a largish Mercurial repository that I've decided would be better as several smaller repositories. Is there a way that I can split the repository and have each piece retain its revision history? A: The best way to do this is using the 'convert' extension. You'll use mercu...
{ "language": "en", "url": "https://stackoverflow.com/questions/257767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Writing a Virtual Printer in .NET I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application. It would we really nice to be able to write it all in C#, but I have a feeling that this will require a print...
{ "language": "en", "url": "https://stackoverflow.com/questions/257768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: StructureMap error when invalid controller I am using Structure map like the MVC storefront by Rob Conery does and I have an AdminController and so to get to it I just type: website/Admin/action however if I miss spell the controller name I get the error below: Exception Details: System.ArgumentNullException: Value...
{ "language": "en", "url": "https://stackoverflow.com/questions/257772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: DateTime format on hosting server I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Header files in dev-C++ I'm trying to add an header file to dev-C++ but when I compile it it doesn't work. Here are my exact steps (for my example, I'm trying to get mysql.h to work): * *copy "mysql.h" into c:\dev-c++\includes *check that in dev-C++ tools > compiler options > directories > c includes and c++ inc...
{ "language": "en", "url": "https://stackoverflow.com/questions/257795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to use sgi hash_table in VS2005? I wrote a C++ project in VS2005, and used lots of STL container with its plus-in STL. However, I found STL in VS2005 does not have a hash_map in it, I want to use SGI hash_map. How can I change my project to use SGI STL? Thanks for Brian's method, it works! And it's simple. A: V...
{ "language": "en", "url": "https://stackoverflow.com/questions/257797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to use Thickbox with dynamic content? Here's the scenario: I have a textbox and a button on a web page. When the button is clicked, I want a popup window to open (using Thickbox) that will show all items that match the value entered in the textbox. I am currently using the IFrame implementation of T...
{ "language": "en", "url": "https://stackoverflow.com/questions/257801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Git - Switching branches (windows) & uncommitted changes I'm having a hard time understanding some git/DCVS concepts. Here's what happened: * *I created a git project, and imported it from an SVN repo *I made some commits *I wanted to experiment something, so I created a branch called constants-update *I switc...
{ "language": "en", "url": "https://stackoverflow.com/questions/257805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Display active session in SQL Server 2005 Possible Duplicate: How to determine total number of open/active connections in ms sql server 2005 In Oracle, there's a view called V$SESSION that lists all active sessions in database. Is there any similar view in SQL Server 2005? A: Plain old sp_who. A: select * from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using IN or a text search I want to search a table to find all rows where one particular field is one of two values. I know exactly what the values would be, but I'm wondering which is the most efficient way to search for them: for the sake of example, the two values are "xpoints" and "ypoints". I know for certain t...
{ "language": "en", "url": "https://stackoverflow.com/questions/257809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why does Delphi's memory manager report false memory leaks at shutdown? I'm getting the memory leak message upon shutdown, saying that I'm leaking 3 of a certain object. Two problems with that, though. * *It only happens intermittently. I can run my program, go through the exact same series of steps, (open a da...
{ "language": "en", "url": "https://stackoverflow.com/questions/257821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are there alternatives for creating large container files that are cross platform? Previously, I asked the question. The problem is the demands of our file structure are very high. For instance, we're trying to create a container with up to 4500 files and 500mb data. The file structure of this container consists of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I abandon an InProc ASP.NET session from a session different than one making the request? We have an application that does single sign-on using a centralized authentication server (CAS). We'd like to do single sign-out, such that if the user logs out of one application (say a front-end portal), the user is auto...
{ "language": "en", "url": "https://stackoverflow.com/questions/257843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Quickly create a large file on a Linux system How can I quickly create a large file on a Linux (Red Hat Linux) system? dd will do the job, but reading from /dev/zero and writing to the drive can take a long time when you need a file several hundreds of GBs in size for testing... If you need to do that repeatedly, th...
{ "language": "en", "url": "https://stackoverflow.com/questions/257844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "563" }
Q: Help me ! how to create auto update in adobe flex 3 air I am creating an air application. How to create auto update in adobe Flex 3 air? A: You need to use the following swc file 'applicationupdater_ui.swc' Check out this from Adobe on the subject http://livedocs.adobe.com/flex/3/langref/index.html?air/update/Appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/257848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Label Text Alignment in fieldset with CSS In my fieldset I have labels next (side) to my textboxes, but for some reason, they are towards the top and not middle. Here is my CSS for the fieldset: fieldset { clear: both; font-size: 100%; border-color: #000000; border-width: 1px 0 0 0; border-style: solid non...
{ "language": "en", "url": "https://stackoverflow.com/questions/257855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .htaccess require SSL for a particular URL I want to force Apache to use HTTPS for a particular URL in the following form: https://www.example.com/signup/* so if someone goes to any of the following example URLs directly, Apache will forward the URL over to the HTTPS equivalent site. e.g. http://www.example.com/sig...
{ "language": "en", "url": "https://stackoverflow.com/questions/257872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to design and build a procedural (imperative) based application successfully? Can you provide examples of applications today that are procedural and maintain a high level of integrity and efficiency? Are there any books, tutorials or links that provide examples of how to successfully build and maintai...
{ "language": "en", "url": "https://stackoverflow.com/questions/257873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using XPath: find last text node of each paragraph under the root node I want to trim trailing whitespace at the end of all XHTML paragraphs. I am using Ruby with the REXML library. Say I have the following in a valid XHTML file: <p>hello <span>world</span> a </p> <p>Hi there </p> <p>The End </p> I want to end up w...
{ "language": "en", "url": "https://stackoverflow.com/questions/257877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: using FindWindow with multiple root windows So I'm building an app that uses win32's SendMessage as IPC. I'm using FindWindow to get the hWnd based on className and windowName. This has all being going fine and dandy until I want to talk to a root (as in child of the desktop) Window that has the same name / class na...
{ "language": "en", "url": "https://stackoverflow.com/questions/257879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to perform arbitrary data analysis in Erlang? I want to answer questions about data in Erlang: count things, correlate messages, provide arbitrary statistics. I had thought about resorting to Hadoop for this but is it possible to build a solution in raw Erlang to do rather arbitrary data analysis no...
{ "language": "en", "url": "https://stackoverflow.com/questions/257900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to display file names from a folder I'm using this script to display all the images in a folder, but I can't figure out how to get each image's file name to display underneath it. Any suggestions? <?php $dirname = "images"; $images = scandir($dirname); $ignore = Array(".", "..", "otherfiletoignore"); foreach($...
{ "language": "en", "url": "https://stackoverflow.com/questions/257901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to build work queues in Erlang? I have seen lots of chat examples in Erlang but what about lists, like a work queue? If I want to build a work queue system, like a project management system, is it possible to re-order messages in a process mailbox or do I have to use message priorities? Are there ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/257902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How Can I Log and Find the Most Expensive Queries? The activity monitor in sql2k8 allows us to see the most expensive queries. Ok, that's cool, but is there a way I can log this info or get this info via query analyser? I don't really want to have the Sql Management console open and me looking at the activity monito...
{ "language": "en", "url": "https://stackoverflow.com/questions/257906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: Tortoise SVN Author in Log File Missing For some reason, no matter how I go about it, I cannot get TortoiseSVN to add an Author to Log Messages. Currently we connect to a PC running svnserve, so it's not a file:// Address. We have tried using svn://Username@svnAddress, svn://svnAddress Even setting svn:keywords $Aut...
{ "language": "en", "url": "https://stackoverflow.com/questions/257907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to blend CMMI and Scrum? I work in a shop that is certified at CMMI level 5. This certification is important because it gives us access to certain customers and contracts. I'm looking at how to blend Scrum with CMMI. I've found some info on mixing Scrum with CMMI-3, but quite a bit of it is "hand wavy" and wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/257926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do I have multiple components respond to a single event in JSF? Here's the sit: * *I have a JSF component which is basically a list of 'documents' *I have any number of document viewer components on the same page. *None of these components "know" about each other. In other words, they cannot be configured a...
{ "language": "en", "url": "https://stackoverflow.com/questions/257933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What browser screenwidth should I design for to support Mac OS? Most statistics out there for browser stats show you the resolution of the screen. Thats fine for Windows where browsers typically open full screen and most people leave it as that. So if the browser stats say 1024x768 you just need to subtract a little...
{ "language": "en", "url": "https://stackoverflow.com/questions/257934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .htaccess or .htpasswd equivalent on IIS? Does anyone know if there is an equivalent to .htaccess and .htpassword for IIS ? I am being asked to migrate an app to IIS that uses .htaccess to control access to sets of files in various URLs based on the contents of .htaccess files. I did a google search and didn't turn...
{ "language": "en", "url": "https://stackoverflow.com/questions/257936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Codepages and encodings Before anyone recommends that I do a google search on this, I have. I just need a bit more clarity around what codepages and encodings. If I use UTF8 encoding, and use an italian code page and then a french code page, does this mean ill get different characters even though the bytes havent ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/257938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JSF Header with Login Component? I'm pretty new to JSF and the many many related technologies out there. I'm trying to make a website that has a header which includes a logo, navigation links, and a login box, such that this header can easily be included in all of the site's pages unless the user logs in, in which c...
{ "language": "en", "url": "https://stackoverflow.com/questions/257941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In Ruby how can I abort a connection with a RESET? In any socket API the close() method closes a connection with a FIN. If I want to abort a connection with a RST how can I do it? A: With a normal Ruby TCPSocket, you can turn on SO_LINGER by doing something like this: linger = [1,0].pack('ii') socket.setsockopt(Soc...
{ "language": "en", "url": "https://stackoverflow.com/questions/257942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the point of a cache on the swap space? Isn't the point of caching things in main memory to avoid the expensive disk i/o? If you're caching things in the swap space of a hard drive, how does that avoid disk i/o? A: Generally the memory used by the cache wouldn't get swapped out. It would be marked as in-u...
{ "language": "en", "url": "https://stackoverflow.com/questions/257951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows disk partition gap Windows XP Disk Defragmenter report shows a constant gap in disk usage on a number of disk partitions on my system. I'm not referring to the little transitory gaps that occur. In disk D below, the gap in question is the one under the word "defragmentation". In disk P below, the gap is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/257955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java equivalent to pyftpdlib? Is there a good Java alternative to pyftpdlib? I am looking for an easy to setup and run embedded ftp server. A: Check out Apache's FTPServer. They have an example of how to embed it in a Java application.
{ "language": "en", "url": "https://stackoverflow.com/questions/257956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I detect Gnome Terminal? I am writing a console application which makes use of the F1 key (for help). Unfortunately, while Konsole (of KDE) doesn't use this key, Gnome Terminal does, so the F1 key becomes inaccessible to my application. I don't think there's a way to detect whether the F1 key is already ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/257992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: XOR Drawing in C# I am a trying to learn C# .Net. I had written small (hobby) Analog Clock application in VB sometime ago(edit: VB6, to be precise), and I thought I will rewrite in C#.NET, as part of my learning process. In the VB application, I drew the hands of the clock in XOR Drawmode, so that I have to move the...
{ "language": "en", "url": "https://stackoverflow.com/questions/257993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Changing timezone in PHP Alright, quick question. A server is running in Eastern Time. PHP program needs to make date calculations using Central time. At the moment, I am putting this line at the very top of my script: putenv("TZ=US/Central"); Is that the best way to go about that or is there some PHP trick I'm not...
{ "language": "en", "url": "https://stackoverflow.com/questions/257994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using internal in package gives error I'm trying to place a class into a package where another public class is placed. The documentation says that only one external visible declaration can be put in a package. So i declare the second class internal. But then it gives the following error: 5006: An ActionScript file ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Classes: Public vars or public functions to change local vars? Exactly what the topic title says, In which cases would you prefer using public functions to change local variables over just defining that variable as public and modifying it directly? A: Don't expose the data members directly: using opaque accessors ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Trying to play sound through iPhone Simulator I'm trying to play a sound file from an iPhone program. Here's the code: NSString *path = [[NSBundle mainBundle] pathForResource:@"play" ofType:@"caf"]; NSFileHandle *bodyf = [NSFileHandle fileHandleForReadingAtPath:path]; NSData *body = [bodyf availableData]; NSLog( @"l...
{ "language": "en", "url": "https://stackoverflow.com/questions/258006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Setting command button visibility in VC++ 6.0? How can I make the command button in my VC++ 6.0 dialog visible or invisible on load? A: From the resource editor once you select the button, you can see its properties in the properties window. Here you can set the visible property to true / false. (assuming this func...
{ "language": "en", "url": "https://stackoverflow.com/questions/258007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Looks like you forgot to register the http module with Windsor Castle with IIS7 I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008. But when i tried to run the project creating an application in IIS7 then I recieved the following error message...
{ "language": "en", "url": "https://stackoverflow.com/questions/258011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: "Functionoids"? I've read the description of "functionoids" here. They look like a poor-man's version of Boost::function and Boost::bind. Am I missing something? Is there a good reason to use them if you're already using Boost? A: My vote goes to tr1::function. Functors or functionoids represent the base from whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/258020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Creating a transparent panel I need to create a panel which should be invisible but the components inside it (for example, JTextArea, JButton, etc.) should be visible. When I click on the invisible panel, it should become visible. I can only use JRE 1.4 and nothing more than that. :( Any idea how to create such a tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/258023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Whats the best way to update an ASPX page when its child ASCX controls need to trigger a change? When I have a child .ASCX control that needs to affect something in the parent page I'm not completely sure how I am supposed to handle the event flow in the case where I need to update something in the parent page. What...
{ "language": "en", "url": "https://stackoverflow.com/questions/258024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Script Debugging Not Working (VS 2008) I recently installed VS 6.0 after installing VS 2008 and overwrite JIT settings .. when i started VS 2008 option dialog .. it said another debugger has taken over VS 2008 debugger and I asked me to reset .. so I did .. Now everything works fine except javascript debugging. I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/258028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: GraphicsUnit.Point, isn't converting well to PDF... GraphicsUnit.World is, but how can I convert it to Point? I have some code in .Net to draw some text content using GDI+. I used GraphicsUnit.Point to size the text. It's working wonderfully on-screen, and even if Print it. I've been asked to make a system that gene...
{ "language": "en", "url": "https://stackoverflow.com/questions/258035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using system.windows.forms with XNA I am making a game that uses XNA. I would like to add things to the game such as buttons, textboxes, labels, tooltip texts, and other stuff that comes with system.windows.forms. How do I merge system.windows.forms with XNA? Are there any API's or DLL's that I could implement to ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/258048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you convert CString and std::string std::wstring to each other? CString is quite handy, while std::string is more compatible with STL container. I am using hash_map. However, hash_map does not support CStrings as keys, so I want to convert the CString into a std::string. Writing a CString hash function seems ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: How to make a reference to a cell of another sheet, when the sheet name is the value of a cell? In excel 2007, I have a formula in a cell like the following: =COUNTIFS('2008-10-31'!$C:$C;">="&'$A7) Now I want to make the name of the sheet ('2008-10-31') be dependent on the value of some cell (say A1). Something lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/258053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Best way to do TDD in express versions of visual studio(eg VB Express) I have been looking in to doing some test driven development for one of the applications that I'm currently writing(OLE wrapper for an OLE object). The only problem is that I am using the express versions of Visual Studio(for now), at the moment...
{ "language": "en", "url": "https://stackoverflow.com/questions/258055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Fetch the data of a particular in a table I need to get the data of an particular <td>, but I don't have any id or name for that particular <td>. How do you get the contents of that <td>? For example: <table> <tr><td>name</td><td>praveen</td></tr> <tr><td>designation</td><td>software engineer</td></tr> </table>...
{ "language": "en", "url": "https://stackoverflow.com/questions/258056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unable to change font in java.awt.MenuBar I'm trying to change the font in an AWT menu bar using MenuBar.setFont(). The call works for the menu bar's child menus, but the menu bar itself doesn't change font (I'm trying to make the font larger). Does anyone know whether this is possible to do? I'm using JRE 1.6 on Wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/258057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regex - is there something I've done wrong? This is javascript, but a virtually identical regex is failing in PHP too, so I don't think it's language specific var r = new RegExp( "^(:19|20)?[0-9][0-9]" // optional 19/20 start followed by 2 numbers + "-" // a hyphen ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Accessing TemplatePart without changing ControlTemplate? i wonder if there is a way to access a control's templatepart from within c# for modifying the part (e.g. hiding, etc..). is it possible to get a reference to the part with pure c#? i don't want to touch the controls template. thanks j. A: It is possible, but...
{ "language": "en", "url": "https://stackoverflow.com/questions/258074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why do I lose my Session Variable in 5 minutes? I have a web page where the user select a Company and with that I keep the Company name in memory though a Session but when I go to the next page the Session only last like 5 minutes? Any reason why and how I can fix this, I did extend the Session state in the Web.conf...
{ "language": "en", "url": "https://stackoverflow.com/questions/258077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When should I use mmap for file access? POSIX environments provide at least two ways of accessing files. There's the standard system calls open(), read(), write(), and friends, but there's also the option of using mmap() to map the file into virtual memory. When is it preferable to use one over the other? What're ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "333" }
Q: How to close a Java Swing application from the code What is the proper way to terminate a Swing application from the code, and what are the pitfalls? I'd tried to close my application automatically after a timer fires. But just calling dispose() on the JFrame didn't do the trick - the window vanished but the applica...
{ "language": "en", "url": "https://stackoverflow.com/questions/258099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: Python: wrapping method invocations with pre and post methods I am instantiating a class A (which I am importing from somebody else, so I can't modify it) into my class X. Is there a way I can intercept or wrap calls to methods in A? I.e., in the code below can I call x.a.p1() and get the output X.pre A.p1 X.post ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is the memory consumption of an object in Java? Is the memory space consumed by one object with 100 attributes the same as that of 100 objects, with one attribute each? How much memory is allocated for an object? How much additional space is used when adding an attribute? A: The total used / free memory of a p...
{ "language": "en", "url": "https://stackoverflow.com/questions/258120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "240" }
Q: Activerecode HABTM primary key problem I have to tables that have a many to many relationship. I have created the correct table codesecure_project_tst_definition and it works. I can join rows together by calling the codesecure_projects << method on a TstDefinition object. The problem is that for some reason activ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Extracting a bit-field from a signed number I have signed numbers (2s complement) stored in 32-bit integers, and I want to extract 16-bit fields from them. Is it true that if I extract the low 16 bits from a 32-bit signed number, the result will be correct as long as the original (32-bit) number fits into 16 bits ? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Validating a Postscript without trying to print it? Saving data to Postscript in my app results in a Postscript file which I can view without issues in GhostView, but when I try to print it, the printer isn't able to print it because it seems to be invalid. Is there a way to validate / find errors in Postscript file...
{ "language": "en", "url": "https://stackoverflow.com/questions/258132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .net manifest query string How can I parse the query string (GET / POST parameters) sent to an application's manifest in .NET ? From one application, I am calling MyApp.application which needs to install my .NET application (if not installed) and in any case it should call the application which should parse the GET ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: relational terminology: foreign key source, destination? I'm doing some FK analysis of our tables by making a directed graph representing FK dependencies and then traversing the graph. In my code, I name everything using directed graph terminology, but I'd like to have something a bit more "user friendly" in the re...
{ "language": "en", "url": "https://stackoverflow.com/questions/258134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Investigating which Windows service is listening to which IP and port I am investigating a production system where there are several Windows services communicating with each other through TCP/IP sockets. I'm trying to figure out which executable is listening to which IP address and which port on a given machine. Oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/258136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: SQL Server 2000 Personal Edition: SQL Query Analyzer is not appearing I installed SQL server 2000 personal edition in my pc. I am now accessing it using windows authentication account. I can use the enterprise manager but when I try to access the sql query analyzer, there aint no window appearing for the query analy...
{ "language": "en", "url": "https://stackoverflow.com/questions/258138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Advice on removing multiple sub-queries (which contains a join) by optimizing Linq To SQL query I'm working on adding globalization to my product cataloge and I have made it work. However, I feel that the underlaying SQL query isn't performing as well as it could and I could need some advice on how to change my Linq...
{ "language": "en", "url": "https://stackoverflow.com/questions/258166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to log a bug on Internet Explorer? I found a clear squared bug on IE7/8, which appears via automation (still looking for a workaround, btw). So, I tried with no luck to find a way to log this bug. Tried the forum way, but it seems this site is somehow not so active these days. I even tried to mail Chris Wilson,...
{ "language": "en", "url": "https://stackoverflow.com/questions/258168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's a good tool to monitor network activity I'm operating a neighbourhood WIFI network in a rural environment. Now I'm looking fo a monitoring tool to run on a server (Windows or Linux) which would track bandwidth, uptime (clients as well as internet connection), etc... Most of this information is exposed via SN...
{ "language": "en", "url": "https://stackoverflow.com/questions/258172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Viewing selected columns I'm doing .NET 3.5 programming in VB for a class. I have a .mdb database with 3 related tables, and a table adapter with some queries on it that look like this: SELECT PropertyID, Street, Unit, City, Zip, Type, Bedrooms, Bathrooms, Area, MonthlyRent FROM tblProperties Then in a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I suspend drawing to perform multiple successive updates in Flex? I've written a simple calendar control to allow for selecting single days, weeks, months and so on. The simplicity comes from the fact that I don't really do any drawing myself, opting instead to create a bunch of boxes and labels to act as date ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to add Silverlight controls in Visual Studio 2005 I have downloaded the silver light from this http://www.microsoft.com/silverlight// I need to use this as custom toolbox in my Visual studio please let me know how to add this and use the controls A: This post may help you. This actually takes you to a post whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/258189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to get extended error information from 7z commandLine process inside my C# app I runs a 7z process to extract an archive into it's directory the archive is located in a random-named directory on the %TEMP% directory for example C:\Documents and Settings\User\Local Settings\Temp\vtugoyrc.fd2 (fullPathFilename...
{ "language": "en", "url": "https://stackoverflow.com/questions/258198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I undo check out in TFS for former employees On our TFS source control server, a lot of source files are checked out by people, which are not employed any more. Is there a central way where I can undo check out on all files in TFS? I'm not even sure that they exists in Active Directory anymore. A: There are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: When I iterate through a Dictionary (.NET generic data structure) will it be in the same order that I added them? I have a dictionary that I normally access with a key, so I need fast random access reads. However for one function I need to process every item in the dictionary where the order is important. It seems t...
{ "language": "en", "url": "https://stackoverflow.com/questions/258204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to properly handle wildcard expansion in a bash shell script? #!/bin/bash hello() { SRC=$1 DEST=$2 for IP in `cat /opt/ankit/configs/machine.configs` ; do echo $SRC | grep '*' > /dev/null if test `echo $?` -eq 0 ; then for STAR in $SRC ; do echo -en "$IP"...
{ "language": "en", "url": "https://stackoverflow.com/questions/258211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: handling lots of temporary small files I have a web server which saves cache files and keeps them for 7 days. The file names are md5 hashes, i.e. exactly 32 hex characters long, and are being kept in a tree structure that looks like this: 00/ 00/ 00000ae9355e59a3d8a314a5470753d8 . . 00/ 01/ You get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/258212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }