text
stringlengths
8
267k
meta
dict
Q: MarshalByRefObject and Serialization When I create a class, say ClassA, that inherits from MarshalByRefObject and then use the RemotingServices.Marshal method to create an ObjRef object does it serialize the all the private fields of ClassA? Thanks A: No. The idea of MarshalByRefObject is that it doesn't every ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/321301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: python logging into a forum I've written this to try and log onto a forum (phpBB3). import urllib2, re import urllib, re logindata = urllib.urlencode({'username': 'x', 'password': 'y'}) page = urllib.urlopen("http://www.woarl.com/board/ucp.php?mode=login"[logindata]) output = page.read() However when I run it it co...
{ "language": "en", "url": "https://stackoverflow.com/questions/321304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I get rid of the red rectangle when my wpf binding validation has failed and the containing panel is no longer visible? I have a situation where I am using wpf data binding and validation using the ExceptionValidationRule. Another part of the solution invovles collapsing some panels and showing others. If a v...
{ "language": "en", "url": "https://stackoverflow.com/questions/321327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: "Multiple inheritance" (generalisation relationship) in data models For some school groupwork, I'm making a Generic Pizza Delivery Everything Management System, and got stumped on a problem during data modelling that I can't figure out without using at least several layers of ugly. The restaurant keeps stock of ingr...
{ "language": "en", "url": "https://stackoverflow.com/questions/321329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: bash if -a vs -e option Both about -a and -e options in Bash documentation is said: -a file True if file exists. -e file True if file exists. Trying to get what the difference is I ran the following script: resin_dir=/Test/Resin_wheleph/Results if [ -e ${resin_dir} ] ; then echo "-e "; fi if [ ! -e $...
{ "language": "en", "url": "https://stackoverflow.com/questions/321348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: Initializing a union with a non-trivial constructor I have a structure which I create a custom constructor to initialize the members to 0's. I've seen in older compilers that when in release mode, without doing a memset to 0, the values are not initialized. I now want to use this structure in a union, but get error...
{ "language": "en", "url": "https://stackoverflow.com/questions/321351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Set Event Log settings via GPO How would I set the "overwrite as needed" setting on Event logs other than Application/Security/System? Specifically I'd like to apply this to the Powershell and Windows Powershell Logs, in addition to any other future logs that may be added. This needs to be applied to both server 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/321355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: USB Debugging I'm looking for a very specific USB device for debugging systems that may use USB but not with a regular computer (proprietary hardware). I want a device that has a USB host controller and two USB device connections. The device to be debugged is connected to the USB host controller and one of the devic...
{ "language": "en", "url": "https://stackoverflow.com/questions/321359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I convert a hex string to a byte array? Can we convert a hex string to a byte array using a built-in function in C# or do I have to make a custom method for this? A: The following code changes the hexadecimal string to a byte array by parsing the string byte-by-byte. public static byte[] ConvertHexStringToB...
{ "language": "en", "url": "https://stackoverflow.com/questions/321370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "332" }
Q: How does google return "searches" from other websites? Let's say I'm performing a google search for search term. Sometimes, one of the suggestions will be to a URL like this: www.someothersearch.com/search+term/ How does "someothersearch.com" do this? A: In general, a page will only be in Google if some other page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: RhinoMocks Event Subscription Being new to RhinoMocks and Unit Testing, I have come accross an issue that I cannot seem to find a resolution to (no matter how much documentation I read). The issue is this: I have created an Interface that exposes 5 Events (to be used for a view in ASP.NET and the MVP Supervisory C...
{ "language": "en", "url": "https://stackoverflow.com/questions/321373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL column with various types I seem to often find myself wanting to store data of more than one type (usually specifically integers and text) in the same column in a MySQL database. I know this is horrible, but the reason it happens is when I'm storing responses that people have made to questions in a questionnai...
{ "language": "en", "url": "https://stackoverflow.com/questions/321375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In C++, I want my interface, .h to say int GetSomeInt() const;.... but actually the method *DOES* update "this". I'm adding some lazy initialization logic to a const method, which makes the method in fact not const. Is there a way for me to do this without having to remove the "const" from the public interface? int...
{ "language": "en", "url": "https://stackoverflow.com/questions/321377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JQuery issue (major) with IE - all versions This only happens with IE (all versions), on line 1120 in jquery-1.2.6.js I get the following error: Line 1120: Invalid Property Value The line in the js file is the following: elem[name] = value; It is inside attr: function( elem, name, value ) Does anybody have a probl...
{ "language": "en", "url": "https://stackoverflow.com/questions/321378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IPhone and Cocos2d Sprites/Layers I am using cocos2d-iphone to place Sprites onto a Layer to setup a game playfield. At certain points in the game, certain Sprites need to be removed based upon game conditions. What I would like to do is setup an array of Sprite pointers, but I have two questions: What's the best ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Resharper is surrounding NUnit [SetUp] with regions upon Code Cleanup On Ctrl+E, C (Code Cleanup) ReSharper is surrounding the [SetUp] method with a region. Anybody know how I can make that stop? I don't like regions and I don't want them in any of my code. It's slowing me down deleting them all the time. I'm not...
{ "language": "en", "url": "https://stackoverflow.com/questions/321384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I make an ASP.NET 2.0 Web App compile like a 1.1 App? When compiling an ASP.NET 2.0 App names MySite for deployment I get a series of assemblies that resemble something like "bin/APP_xyz123.dll", "bin/APP_xyz456.dll" and so on. Everything works fine but if I make a small code change I have to update the enti...
{ "language": "en", "url": "https://stackoverflow.com/questions/321396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Redmine - Add "Spent Time" Field to Issues Display How would I go about adding the "Spent Time" as a column to be displayed in the issues list? A: You can also do this by adding the column at runtime. This will add the spent hours column without modifying the Redmine core. Just drop the following code into a file...
{ "language": "en", "url": "https://stackoverflow.com/questions/321403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Reading email from a mail file I have a huge number of mail archives that I want to de-duplicate and sort out. The archives are either in mbox format or contain a single mail message. To add a bit of complication, some of the files have windows EOL sequences, and some have the unix EOL. Using C#. how do I read an ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/321411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IE's getBoundingClientRect gives different answer in browser than in windows.forms.webbrowser - why? Take the following html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>Basic Layout</title> <style type="text/css"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LPCSTR, LPCTSTR and LPTSTR What the difference between LPCSTR, LPCTSTR and LPTSTR? Why do we need to do this to convert a string into a LV / _ITEM structure variable pszText: LV_DISPINFO dispinfo; dispinfo.item.pszText = LPTSTR((LPCTSTR)string); A: Quick and dirty: LP == Long Pointer. Just think pointer or ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/321413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "133" }
Q: Silverlight DataGrid Exception Reordering Column Headers I'm trying to set the initial display order of the column headers in a silverlight datagrid by changing the column header DisplayIndex values. If I try to set the column order at page load time, I get an out of range exception. If I set the column order (same ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where to close java PreparedStatements and ResultSets? Consider the code: PreparedStatement ps = null; ResultSet rs = null; try { ps = conn.createStatement(myQueryString); rs = ps.executeQuery(); // process the results... } catch (java.sql.SQLException e) { log.error("an error!", e); throw new MyAppExcepti...
{ "language": "en", "url": "https://stackoverflow.com/questions/321418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Parsing Binary Data in C? Are there any libraries or guides for how to read and parse binary data in C? I am looking at some functionality that will receive TCP packets on a network socket and then parse that binary data according to a specification, turning the information into a more useable form by the code. Are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Can I use INotifyPropertyChanged in WCF? In my WPF app, I call a WCF service to retrieve my business object. I take that business object and bind it to a grid. I want to now apply the INotifyPropertyChanged attribute, but am unsure if it would work from WCF. My ultimate goal is to be able to edit items in a grid,...
{ "language": "en", "url": "https://stackoverflow.com/questions/321429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET MVC Beta 1 - URI Routing Syntax I have scoured the web for a decent explanation of the routing syntax in ASP.NET MVC Beta 1 but I still can't get it to work. Please could someone explain what I need to put in my Global.asax.cs file to have two supported URIs for my site: www.mysite.com/map.aspx (i.e the sit...
{ "language": "en", "url": "https://stackoverflow.com/questions/321439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need ideas on outputting table data to a CSV using PL/SQL in a dynamic fashion The task is to take a list of tables which is changeable. Write a piece of PL/SQL that when executed outputs every tables rows into individual csv files. So if 5 tables. You will get 5 CSV files with the relevant table data in it. The CSV...
{ "language": "en", "url": "https://stackoverflow.com/questions/321455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When should database indexes be rebuilt? I was reading about refactoring a large slow SQL Query over here, and the current highest response is from Mitch Wheat, who wants to make sure the query uses indexes for the major selects, and mentions: First thing I would do is check to make sure there is an active index ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/321461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Animated insertBefore in javascript So I have this app that checks for updates on the server getting a JSON response, each new update is put at the top of my list on a new div that is added via insertBefore using javascript. All works just fine, but i'd like to add an animation effect when the div is added, i.e. "sl...
{ "language": "en", "url": "https://stackoverflow.com/questions/321465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best Practices for 3 Tier Development Does anyone know of any documentation by MS or someone else that lays out the best practices for developing a 3 tier architecture in ASP.NET. I am in the process of trying to convince my boss that the current architecture needs rethought and reworked to provide a flexible and r...
{ "language": "en", "url": "https://stackoverflow.com/questions/321467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "select * from table" vs "select colA, colB, etc. from table" interesting behaviour in SQL Server 2005 Apology for a lengthy post, but I needed to post some code to illustrate the problem. Inspired by the question *What is the reason not to use select ?, I decided to point out some observations of the select * behav...
{ "language": "en", "url": "https://stackoverflow.com/questions/321468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Drag and Dropping an Object Reference VB.Net I am trying to 'swap' two cells' contents, and their mappings. To do this, I need to drag and drop a reference to the cell as opposed to the string value itself. I can then use this reference to update a Dictionary as well as get the value. It allows allows me to do the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/321471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Need help displaying children lists without spacing the parent lists I am printing out a list of college majors we offer, then within each major, we have concentrations for each major. Our Science Major has the following concentrations: Environmental Science & Forestry, Chiropractic, Chemistry, Biology Here is a scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/321477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the difference between these two methods of linking a html page to a css file? I've been reading through a few tutorials about css, and I saw two different ways to state which css file should be used to style the page: <style type="text/css">@import url("style.css");</style> and <link rel="stylesheet" type="...
{ "language": "en", "url": "https://stackoverflow.com/questions/321478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: web service and nunit testing I have created a console application that calls a method on a webservice. I have accessed the webservice and get the response back from the console application that I expect. When I create a separate test assembly and create some nunit tests which call the same method in the same way i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you 'spec' a web server to support a given application? I am having real trouble trying to get decent answers to my questions from VPS and dedicated hosting provider's sales people. I have a fairly simple set of requirements - how do I select a server spec / package and be confident that I have got it about r...
{ "language": "en", "url": "https://stackoverflow.com/questions/321486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Calculate when a cron job will be executed then next time I have a cron "time definition" 1 * * * * (every hour at xx:01) 2 5 * * * (every day at 05:02) 0 4 3 * * (every third day of the month at 04:00) * 2 * * 5 (every minute between 02:00 and 02:59 on fridays) And I have an unix timestamp. Is there an obvious way...
{ "language": "en", "url": "https://stackoverflow.com/questions/321494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Configure SQL Server 2000 to use more than 2Gb of memory on a 64bit server Is there any way to configure SQL Server 2000 Standard Edition (32 bit) to use more than 2Gb of memory on a server running Windows 2003 (64 bit)? Thanks for any help. A: 32 bit versions of SQL Server with Advanced Windowing Extensions (AWE) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What tools/languages do you use for PHP web application deployment? For my web application running on LAMP, I need to be able to deploy database migrations and code changes on multiple servers and be able to test deployment afterwards, all of this automatically done by scripts. Currently I'm torn between using direc...
{ "language": "en", "url": "https://stackoverflow.com/questions/321502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Restrict exclusive key-value pairs in XSD In the XSD, there are two elements, A and B. They are siblings. A can have a value of either "1" or "2". B can have a value of either "one" or "two". I want to restrict this, however, so that only "1-one" and "2-two" are valid combinations, not "1-two" or "2-one". Is there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/321518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Broken cell with an odd strikethrough? I'm having a weird issue with a particular UITableView in my iPhone devel experience here. If you look at the following screenshot: alt text http://dl-client.getdropbox.com/u/57676/brokencell.png you'll notice a strike through going through the middle of the 'Jane Aba' cell. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UITableView scrolling under the navigation bar I have a table view setup which currently, when being flickered up, has its sections flush up against right underneath the status bar, instead of flushing against the the navigation bar. I'm not sure if this is the proper behavior, but most applications have the Section...
{ "language": "en", "url": "https://stackoverflow.com/questions/321526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to open a network connection from windows mobile with c#? I am trying to convert a windows forms application to a windows mobile application (windows mobile 6 professional). It needs to get an XML document from a web server. It works fine if the device already has an open network connection, say if you open IE...
{ "language": "en", "url": "https://stackoverflow.com/questions/321531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting started with Constraint Programming Looking for tips, tutorials, books and other resources to get started with Constraint Programming. A: Constraint Handling Rules (CHR) is a language to develop own (problem specific) constraint solvers. Check this: * *CHR Homepage There you find links to * *WebCHR On...
{ "language": "en", "url": "https://stackoverflow.com/questions/321535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: intranet portal for the project I would like to setup a portal for my development team to share the ideas, reports, documents, images, etc. Something similar to MS SharePoint but free/open source. Can you please share what do you guys use for the same? A: Check out DotNetNuke A: Trac and MediaWiki would be my top ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Write stored procedures in Linq/Lambda (Unit-testable but performant stored procs). Possible? I am creating a data source for reporting model (SQL Server Reporting Services). The reports requires a lot of joins and calculations (let's say, calculating financial parameters like money spent on this, that, amount A vs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: db4o development tools and resources? Since the 7.x versions of db4o ObjectManager are only available as a commercial product (very expensive!) are there any alternative tools that are available to inspect/explore db4o 7.x databases? Also, what other tools would you recommend to a beginning db4o developer? A: It s...
{ "language": "en", "url": "https://stackoverflow.com/questions/321545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to convert a double to long without casting? What is the best way to convert a double to a long without casting? For example: double d = 394.000; long l = (new Double(d)).longValue(); System.out.println("double=" + d + ", long=" + l); A: If you have a strong suspicion that the DOUBLE is actually a LONG, and yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/321549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "204" }
Q: Unit Testing: Creating a 'mock' request to simulate a MVC page request How do I go about creating a mock request for my asp.net-mvc application for unit-testing? What options do I have? I am using FormsCollection in my Actions so I can simulate form input data also. A: You just have to create a new instance of Form...
{ "language": "en", "url": "https://stackoverflow.com/questions/321550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Preventing a file overwrite with Git my company started recently to use Git for source version control, and due to the incompetence of the coders - that's me and my boss :-P - we have a really nice spaghetti of files being overwritten here and there. Is there a way to mark certain files as 'untouchable' so if when u...
{ "language": "en", "url": "https://stackoverflow.com/questions/321561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Linq query ("not in ") on datatable I would like to return all rows from TableA table that does not exists in another table. e.g. select bench_id from TableA where bench_id not in (select bench_id from TableB ) can you please help me write equivalent LINQ query. Here TableA is from Excel and TableB is from a Dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/321566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VS2008 debugging with firefox as default browser - how to make the debugger stop/close on exit? I have Firefox as my default browser on my dev machine and when I start debugging from visual studio Firefox launches as I would expect and all the attributes of the experience are the same as IE except for one thing - wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/321568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Do we still need to check for different browser types in JavaScript? This is probably a simple question, and I'm slightly embarrassed to ask it, but I've been working with this chunk of JavaScript ad code for a while and it's bothered me that it's never really made sense to me and is probably out dated now with mode...
{ "language": "en", "url": "https://stackoverflow.com/questions/321571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generate lambda with Reflection Info I have Enitity Type, Name of Primary Key and Guid of Primary Id. I want to get element of such Id in LinqToSql. model.GetTable<T>().Where(t => here equality ); I think I need to generate that Expression myself, but I dont know how :( A: http://blog.dynback.com/index.php/2008/1...
{ "language": "en", "url": "https://stackoverflow.com/questions/321572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: urllib2 data sending I've recently written this with help from SO. Now could someone please tell me how to make it actually log onto the board. It brings up everything just in a non logged in format. import urllib2, re import urllib, re logindata = urllib.urlencode({'username': 'x', 'password': 'y'}) page = urllib2...
{ "language": "en", "url": "https://stackoverflow.com/questions/321582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET Dynamic Page Controls: Is it possible to bind events AFTER Page.Load? I have a site that I am currently working on in ASP.NET 2.0 using the usual WebForm stuff and ASP.NET AJAX 1.0. Is it possible to bind an event to a dynamically created control after the Page.Load event? I have a table <td> element that I...
{ "language": "en", "url": "https://stackoverflow.com/questions/321585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Debugging an ASP.NET page with QueryString values I am trying to debug an asp.net web form that requires a value from the querystring. I just want to debug that page without having to go through the entire process to create the querystring value and sending the request. Any suggestions on how to attach a querystrin...
{ "language": "en", "url": "https://stackoverflow.com/questions/321588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DOS : how do you run a batch without having to login on a share? I'm running an xcopy command in a batch script which copies a file to a shared drive on another workstation; however the workstation requires a login before connecting to the share. Is there a way to script the login/connect into the batch file? than...
{ "language": "en", "url": "https://stackoverflow.com/questions/321614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: xls to text converter Anyone know of a free xls to text converter that can be run from the unix command line? A: There is also the package catdoc (Ubuntu link) that includes a xls2csv utility. A: A quick search of apt-cache turned up the Ubuntu package python-excelerator for excelerator, which includes py_xls2html...
{ "language": "en", "url": "https://stackoverflow.com/questions/321617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C++ Serialization Performance I'm building a distributed C++ application that needs to do lots of serialization and deserialization of simple data structures that's being passed between different processes and computers. I'm not interested in serializing complex class hierarchies, but more of sending structures with...
{ "language": "en", "url": "https://stackoverflow.com/questions/321619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Loading data files in iPhone project How does one read a data file in an iPhone project? For example, lets say I have a static file called "level.dat" that is structured as follows: obstacles: 10 time: 100 obstacle1: 10,20 ... I would like to read the contents of the file into a NSString then do the parsing. How d...
{ "language": "en", "url": "https://stackoverflow.com/questions/321622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best way to get the errors from a production site in PHP? For most production sites, you want to know when there has been an error as soon as possible. My question is how best to get this information. Usually, it's probably best to get the errors in an email as I'm not going to sit every day and watch er...
{ "language": "en", "url": "https://stackoverflow.com/questions/321629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I set a field value in an C# Expression tree? Given: FieldInfo field = <some valid string field on type T>; ParameterExpression targetExp = Expression.Parameter(typeof(T), "target"); ParameterExpression valueExp = Expression.Parameter(typeof(string), "value"); How do I compile a lambda expression to set the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: What is included in each error level in PHP I'm basically wondering what is included in each error level, as found here in PHP. Example, where does an unset variable or key fall? Or where does a parse fall? I can't seem to find any documentation on the PHP website or general internet regarding this. Edit: I'm lookin...
{ "language": "en", "url": "https://stackoverflow.com/questions/321652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get a notification/event/signal when a Qt widget gets focus In Qt, when a widget receives focus, how can get a notification about it, so I can execute some custom code? Is there a signal or an event for that? A: The simplest way is to connect a slot to the QApplication::focusChanged signal. A: You can add en event...
{ "language": "en", "url": "https://stackoverflow.com/questions/321656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Application configuration incorrect with Python Imaging Library I'm trying to install the Python Imaging Library 1.1.6 for Python 2.6. After downloading the installation executable (Win XP), I receive the following error message: "Application failed to start because the application configuration is incorrect. Reins...
{ "language": "en", "url": "https://stackoverflow.com/questions/321668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I make a DetailsView CheckBoxField visible in edit mode in IE6? <%-- In IE6, in edit mode, the checkbox isn't visible --%> <asp:DetailsView ID="MyDetailsView" runat="server" Height="50px" Width="100%" AutoGenerateRows="False" SkinID="detailsViewSkin" DataKeyNames="SerialNumber" DataSourceID="D...
{ "language": "en", "url": "https://stackoverflow.com/questions/321674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Building a database driven menu with ASP.NET, JQuery and Suckerfish I'm attempting at creating a menu from a table using the Suckerfish css menu and Jquery. I'm using this as my reference: Suckerfish menu with ASP.NET and JQuery and I have it working with manually supplied links (much like in the article). Where I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/321680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hibernate group by time interval I have a table with a timestamp field of type datetime. I need to aggregate the data between a defined start and end time into x groups representing time intervals of equal length, where x is supplied as function parameter. What would be the best way to do this with Hibernate? EDIT: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: WPF Style Trigger I change the FontSize of Text in a Style trigger, this causes the Control containing the text to resize as well. How can I change the Fontsize without affecting the parent's size? A: A nice trick to isolate an element from its parent layout wise is to place the element in a Canvas In the markup b...
{ "language": "en", "url": "https://stackoverflow.com/questions/321701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Working with the "onclick" of a server side dynamically created TableRow I am dynamically creating a table which I want to have clickable rows. When the user clicks on one of the rows I want to redirect to a page specific to the item of that row. My question is how on the server side can I wire the "onclick" event...
{ "language": "en", "url": "https://stackoverflow.com/questions/321714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Forcing a tab to the next control in an extended .net control Say I'm extending a TextBox called CustomTextBox in .net. In certain situations I would like to force a tab to the next TabIndex on the form. Is there a way to do this beyond getting all the controls contained in CustomTextBox's parent, sorting them by th...
{ "language": "en", "url": "https://stackoverflow.com/questions/321719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best practices for version control comments There is a lot of conversation about commenting code, but how about commenting on check-ins? I found this blog post: http://redbitbluebit.com/subversion-check-in-comment-great-practices/ As the guy who is putting together the release notes, I am looking for ways to make th...
{ "language": "en", "url": "https://stackoverflow.com/questions/321720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to set DPI information in an image? I have an application that I want to export high-resolution (or rather, high pixel density?) images for printing - for example, I want images that print at 250 dots per inch (DPI), instead of the default, which I understand to be 72 DPI. I'm using a BufferedImage with a Graphi...
{ "language": "en", "url": "https://stackoverflow.com/questions/321736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: threadlocal variables in a servlet Are the threadlocals variables global to all the requests made to the servlet that owns the variables? I am using resin for the server. Thanks for awnser. I think I can make my self more clear. The specific Case: I want to: * *initialize a static variable when the request start...
{ "language": "en", "url": "https://stackoverflow.com/questions/321757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: WCF and Custom Soap Authentication I am developing a server application using WCF to expose WebService endpoints for clients. I want to implement authentication through a simple custom provider that will use the username and password passed through the SOAP headers. I know how to set the user name and password to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/321764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JBoss Monitoring / Profiling I have a legacy JBoss 4.0.4/EJB 2.1/PostgreSQL system with zillions of "transaction scripted" procedures as server EJB methods, and many of them have very slow and clumsy execution times due to bad programming practices (like creating temporary tables everytime, etc). Is there something ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows Safari cannot access sever by NetBIOS/WINS name Whenever I try to access a NTLM authenticated intranet site, Safari takes forever to process and then comes back with "The sever is unavailable" or if allowed by the site, loads with out authenticating. I can access these same sites with no problems in both Fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/321774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: To CurrentThread.Abort or not to CurrentThread.Abort I've seen a number of examples that have a thread procedure that looks like this. private void ThreadProc() { while (serviceStarted) { // do some work Thread.Sleep(new TimeSpan(0, 0, 5)); } Thread.C...
{ "language": "en", "url": "https://stackoverflow.com/questions/321779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: CSS Trick to show border on table and cells when cells are not empty and show no border otherwise Is there any way to make sure that a table and cells it contains have a border only when the cells are not empty? If all the cells of the table are empty, then no border should be visible. A: See the empty-cells CSS pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/321786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using java to encrypt integers I'm trying to encrypt some integers in java using java.security and javax.crypto. The problem seems to be that the Cipher class only encrypts byte arrays. I can't directly convert an integer to a byte string (or can I?). What is the best way to do this? Should I convert the integer...
{ "language": "en", "url": "https://stackoverflow.com/questions/321787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Binding a new SoapClient to a specific IP address before sending outgoing request Let's say a machine where the application sits on has SoapClient (to be specific, I'm using Microsoft.Web.Service3.Messaging.SoapClient). It communicates toward a remote location with no problem by sending outgoing requests and getting...
{ "language": "en", "url": "https://stackoverflow.com/questions/321788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Date/time conversion: string representation to time_t How do I convert a date string, formatted as "MM-DD-YY HH:MM:SS", to a time_t value in either C or C++? A: In the absence of strptime you could use sscanf to parse the data into a struct tm and then call mktime. Not the most elegant solution but it would work....
{ "language": "en", "url": "https://stackoverflow.com/questions/321793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Comparing XML in a unit test in Python I have an object that can build itself from an XML string, and write itself out to an XML string. I'd like to write a unit test to test round tripping through XML, but I'm having trouble comparing the two XML versions. Whitespace and attribute order seem to be the issues. Any s...
{ "language": "en", "url": "https://stackoverflow.com/questions/321795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Enum C++ Get by Index I was wondering in C++ if I have an enum can I access the value at the second index? For example I have enum Test{hi, bye}; if I want 'hi', can I do something like Test[0], thanks. A: Yes and no. If your Enum does not have explicit values then it is possible. Without an explicit values, en...
{ "language": "en", "url": "https://stackoverflow.com/questions/321801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How can you identify multiple elements with the same name in XPath? What if I had a document that had multiple elements with the same name -- how would I retrieve, for instance, the second element? <doc> ... <element name="same">foo</element> ... <element name="same">bar</element> ... <element name="same">baz</el...
{ "language": "en", "url": "https://stackoverflow.com/questions/321805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Telnet lib and language choice for cross OS telnet client? I'm looking to start a MUD client application, which connects to a MUD hosted on a telnet server. The only thing important to me is that it runs painlessly and efficiently across any OS. Aside from that requirement, I'm not really sold on any language. So ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting edit value from ListView I'm missing something here, but I've stared at it too long to see it. I've got a simple ListView, with the typical Edit/Update/Cancel buttons. I've got the following set up in my EditITemTemplate when the row goes into edit mode: <EditItemTemplate> <asp:Label ID="AccountIdLabel" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: convert an expression to a string representation? Consider the following Haskell code: module Expr where -- Variables are named by strings, assumed to be identifiers: type Variable = String -- Representation of expressions: data Expr = Const Integer | Var Variable | Plus Expr ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Serializing anonymous delegates in C# I am trying to determine what issues could be caused by using the following serialization surrogate to enable serialization of anonymous functions/delegate/lambdas. // see http://msdn.microsoft.com/msdnmag/issues/02/09/net/#S3 class NonSerializableSurrogate : ISerializationSurr...
{ "language": "en", "url": "https://stackoverflow.com/questions/321827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How can I replace link children to create a podcast-friendly feed? I have an RSS source: http://feedity.com/rss.aspx/mr1-kossuth-hu/VVdXUlY <item> <title>2008. november 23.</title> <link>http://www.mr1-kossuth.hu/m3u/0039c36f_3003051.m3u</link> <description>........</description> <pubDate>We...
{ "language": "en", "url": "https://stackoverflow.com/questions/321834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: strptime() equivalent on Windows? Is there a good equivalent implementation of strptime() available for Windows? Unfortunately, this POSIX function does not appear to be available. Open Group description of strptime - summary: it converts a text string such as "MM-DD-YYYY HH:MM:SS" into a tm struct, the opposite of...
{ "language": "en", "url": "https://stackoverflow.com/questions/321849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Get the BIOS time in LINGO Can someone tell me how to get the BIOS time in Lingo? A: _system.time() will give you the system time. You can also use the good old Lingo syntaxed "the systemDate" wich is an object with properties such as ".seconds" for example. To access the BIOS probably need a custom built xtra. You...
{ "language": "en", "url": "https://stackoverflow.com/questions/321858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to remove elements from xml using xslt with stylesheet and xsltproc? I have a lot of XML files which have something of the form: <Element fruit="apple" animal="cat" /> Which I want to be removed from the file. Using an XSLT stylesheet and the Linux command-line utility xsltproc, how could I do this? By this poi...
{ "language": "en", "url": "https://stackoverflow.com/questions/321860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Apply margins to all but iframe I have a ‘page a’ using ‘css a’. This page has margins set in css. I also have a ‘page b’ using ‘css b’. This page also has margins set in css, of the same size as in ‘css a’ (10px). Is there any way I can make it so that when I am viewing ‘page a’ on its own it has margins, but when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java dynamic binding and method overriding Yesterday I had a two-hour technical phone interview (which I passed, woohoo!), but I completely muffed up the following question regarding dynamic binding in Java. And it's doubly puzzling because I used to teach this concept to undergraduates when I was a TA a few years ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: how to clear or replace a cached image I know there are many ways to prevent image caching (such as via META tags), as well as a few nice tricks to ensure that the current version of an image is shown with every page load (such as image.jpg?x=timestamp), but is there any way to actually clear or replace an image in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Visual Studio 2008 Installer Project - Custom Actions not firing I can't seem to get a custom action working. I might be doing this wrong. Here's what I'm trying to do: I'd like to run a custom action in my application install (Visual Studio Installer project) that runs an executable. The executable simply does s...
{ "language": "en", "url": "https://stackoverflow.com/questions/321867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to move "Solution Explorer" tab in Visual Studio Does anyone know how to move the "Solution Explorer" tab in Visual Studio 2005? It's on the left, and I can't move it to the right. Thanks, Alan A: Click on the title bar, and drag it to the right portion of the screen. Eventually you'll see a compas like struc...
{ "language": "en", "url": "https://stackoverflow.com/questions/321873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Killing an interop Application process I have the following in a program (written in VB.NET): Imports Microsoft.Office.Interop.Excel Public Class Form1 Dim eApp As New Excel.Application Dim w As Excel.Workbook w = eApp.Workbooks.Open( "path.xls", ReadOnly:=True) .. Processing Code .. //Attempts ...
{ "language": "en", "url": "https://stackoverflow.com/questions/321881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }