text
string
meta
dict
Q: 404 SysVol entries in webserver's logfiles Our 404 error logs show a lot of /SysVol http requests on our Windows Web Server 2008 for our website. It only has a webserver role and I believe that SysVol requests are meant for Domain Controllers? What's causing this and what would be the best solution to deal with thes...
{ "language": "en", "url": "https://stackoverflow.com/questions/217849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I save a very large MATLAB sparse matrix to a text file? I have a 30000x14000 sparse matrix in MATLAB (version 7), which I need to use in another program. Calling save won't write this as ASCII (not supported). Calling full() on this monster results in an Out of Memory error. How do I export it? A: Save th...
{ "language": "en", "url": "https://stackoverflow.com/questions/217852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What's the best format to represent one day? How to represent the start and end times for one day? Using October 23, 2008 as an example, is it start 2008-10-23 12:00:00 AM and end 2008-10-23 11:59:59 PM? A: Surely, if you just want to represent 1 day, you don't need to include the time at all - especially as this r...
{ "language": "en", "url": "https://stackoverflow.com/questions/217853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Flex DRAG_DROP Event - Is it possible to access the Image Being Dragged? When you start a Flex drag action, you pass in a proxy image to be displayed when you drag across the screen. When the drop occurs, I want to be able to grab this proxy but I can't find a way to from the DragEvent object. Is it possible? What I...
{ "language": "en", "url": "https://stackoverflow.com/questions/217859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you display Taskbar notifications? How would one go about displaying taskbar notifications? I want to write an app that periodically displays a flash card esque notification, the intention is to see if a 5 second or so distraction every hour can help with language learning. A: In .NET you can use the Notific...
{ "language": "en", "url": "https://stackoverflow.com/questions/217871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: String Simple Substitution What's the easiest way of me converting the simpler regex format that most users are used to into the correct re python regex string? As an example, I need to convert this: string = "*abc+de?" to this: string = ".*abc.+de.?" Of course I could loop through the string and build up another ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using C# to display powerpoint Is there any good way to use a windows application written in C# to display/control a powerpoint slideshow? Ultimately I would like to show thumbnails in a form and clicking these thumbnails would advance the slides shown on a second monitor (similar to using Powerpoint itself to show ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is a safe equivalent of non-void STL erase? Suppose I have a hash_map and a code like // i is an iterator i = hash_map.erase(i) But GCC's STL doesn't return iterator in erase, but a void. Now is a code like hash_map.erase(i++) safe (i.e. does not invalidate the iterator or does any other unexpected or unpleas...
{ "language": "en", "url": "https://stackoverflow.com/questions/217892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: how to generate unit test code for methods i want to write code for unit test to test my application code. I have different methods and now want to test these methods one by one in python script. but i do not how to i write. can any one give me example of small code for unit testing in python. i am thankful A: Rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/217900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: c++ template function overloading Below are lines from "the c++ programming language" template<class T > T sqrt(T ); template<class T > complex<T> sqrt(complex<T>); double sqrt(double); void f(complex<double> z ) { s q r t (2 ); // sqrt<int>(int) sqrt(2.0) ; // sqrt(double) sqrt(z) ; // sqrt<double>(complex<double>)...
{ "language": "en", "url": "https://stackoverflow.com/questions/217901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Reading/writing an INI file Is there any class in the .NET framework that can read/write standard .ini files: [Section] <keyname>=<value> ... Delphi has the TIniFile component and I want to know if there is anything similar for C#? A: This article on CodeProject "An INI file handling class using C#" should help. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "295" }
Q: How to toggle between one maven profile and another? If I have a maven profile activated by the presence of a property, how can I define another profile that is only activated when the other profile is not activated? e.g. <profile> <activation> <property> <name>myproperty</nam...
{ "language": "en", "url": "https://stackoverflow.com/questions/217908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why don't C++ compilers define operator== and operator!=? I am a big fan of letting the compiler do as much work for you as possible. When writing a simple class the compiler can give you the following for 'free': * *A default (empty) constructor *A copy constructor *A destructor *An assignment operator (oper...
{ "language": "en", "url": "https://stackoverflow.com/questions/217911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "352" }
Q: Data-bound TextBox: can't exit I've got a text box bound to an object's property (in fact several text boxes) on a form. This for is an editor for an object. When i'm editing some objects and modify values in the one of the text boxes i can't exit from the text box (neither by tab nor clicking on another text box). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Read a picture from Access DB into PictureBox I have been trying to read a picture saved in Access DB as a OLE object in a PictureBox in a C# windows Application. The code that does this is presented below: string connString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Rajesh\SampleDB_2003.mdb;"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Problem with Commons Logging / Log4j setup in spring webapp with tomcat 6 I have a problem wih a logging setup in a apring webapp deployed under tomcat 6. The webapp uses the commons-logging api, on runtime log4j should be used. The log file is created but remains empty - no log entries occur. the setup is the follo...
{ "language": "en", "url": "https://stackoverflow.com/questions/217929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What's the difference in these ways of creating the static instance for a singleton? I have had a bug recently that only manifested itself when the library was built as a release build rather than a debug build. The library is a .NET dll with a COM wrapper and I am using CoCreateInstance to create a class from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Returning a 301 Redirect from a Controller Action On ASP.net MVC, what is the "correct" way to have a controller return a 301 Redirect to an external site? The various RedirectTo-Function seem to only return either relative links or routes that i have mapped manually, but there is no way to say "Perform a 301 Redire...
{ "language": "en", "url": "https://stackoverflow.com/questions/217935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is it possible to loop through a textbox's contents? If not, what's the best strategy to read line-by-line? I am designing a crawler which will get certain content from a webpage (using either string manipulation or regex). I'm able to get the contents of the webpage as a response stream (using the whole httpwebrequ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WCF Unknown Message Received Event Does anywone know when a UnknownMessageReceived event on a WCF ServiceHost will be fired? I have some code where I capture the Faulted en UnknownMessageReceived event but even when I post a wrong message to a particular service I never get the event. Jochen A: I ran into this even...
{ "language": "en", "url": "https://stackoverflow.com/questions/217940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET Accordion So I'm amending someone else's code, and they've used a data-bound Accordion control. I need to disable the Accordion functionality so that the top item is expanded and the rest are just minimized and kept that way. Also is there any way to put a class on the final item? Thanks a lot in advance. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/217941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I have multiple primary keys in a single table? Can I have multiple primary keys in a single table? A: A Table can have a Composite Primary Key which is a primary key made from two or more columns. For example: CREATE TABLE userdata ( userid INT, userdataid INT, info char(200), primary key (userid, user...
{ "language": "en", "url": "https://stackoverflow.com/questions/217945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "458" }
Q: Get the current working directory for cmd.exe How can I retrieve the current working directory of cmd.exe? This seems possible. For example using ProcessExplorer, select CMD.exe, right click, properties, Image tab, "Current Directory" relects the directory set using the CD or CHDIR commands. I've looked at the .N...
{ "language": "en", "url": "https://stackoverflow.com/questions/217951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to do a HTTP HEAD request from the windows command line? What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it? A: On Linux, I often use curl with the --head parameter. It is available for several operating sy...
{ "language": "en", "url": "https://stackoverflow.com/questions/217955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I print debug messages in the Google Chrome JavaScript Console? How do I print debug messages in the Google Chrome JavaScript Console? Please note that the JavaScript Console is not the same as the JavaScript Debugger; they have different syntaxes AFAIK, so the print command in JavaScript Debugger will not wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/217957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "477" }
Q: How can I create a friendly URL in ASP.NET MVC? How do I generate friendly URLs within the ASP.NET MVC Framework? For example, we've got a URL that looks like this: http://site/catalogue/BrowseByStyleLevel/1 The 1 is Id of the study level (Higher in this case) to browse, but I'l like to reformat the URL in the same ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Serializing and Deserializing Expression Trees in C# Is there a way to Deserialize Expressions in C#, I would like to store Expressions in a Database and load them at run time. A: I continued work on the library that was mentioned by Serializing and Deserializing Expression Trees in C# It looks like the project was...
{ "language": "en", "url": "https://stackoverflow.com/questions/217961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: Can SSMA for migrating Access databases to SQL Server 2005 be automated? I need to migrate Access databases to SQL Server 2005. Since this needs to be done from within a setup so that a customers' installation is transparently migrated to SQL Server 2005, I wonder if it is possible to automate the SSMA toolkit from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get all the supported Cultures from a satellite assembly I am using a satellite assembly to hold all the localization resources in a C# application. What I need to do is create a menu in the GUI with all the available languages that exists for the application. Is there any way to get information dynamically? A: Thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/217968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I display Word documents in a textarea using PHP? I was trying to test code using com class to display Word files but I cannot seem to get the answer and still searching. I get errors and sometimes, programs do not display anything at all. Please give me some ideas. I'm working with PHP 4. A: If the site is...
{ "language": "en", "url": "https://stackoverflow.com/questions/217969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I get the contents of an XML element using a XmlSerializer? I have an XML reader on this XML string: <?xml version="1.0" encoding="UTF-8" ?> <story id="1224488641nL21535800" date="20 Oct 2008" time="07:44"> <title>PRESS DIGEST - PORTUGAL - Oct 20</title> <text> <p> LISBON, Oct 20 (Reuters) - Following are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/217977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# little endian or big endian? In the documentation of hardware that allows us to control it via UDP/IP, I found the following fragment: In this communication protocol, DWORD is a 4 bytes data, WORD is a 2 bytes data, BYTE is a single byte data. The storage format is little endian, namely 4 bytes (32bits) data i...
{ "language": "en", "url": "https://stackoverflow.com/questions/217980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: .NET 2.0 and MySql in medium trust mode how do i access Mysql from an ASP.NET 2 site in medium trust mode? My ISP wont allow my site to run under full trust and i've tried many(if not all) mysql apis to connect to the db. All result in either SocketPermission or FileIOPermission errors. i have even tried overriding...
{ "language": "en", "url": "https://stackoverflow.com/questions/217989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Searching CStrings in C++ I was wondering if there is a native C++ (or STL/Boost) function which will search a CString for a specified string? e.g. CString strIn = "Test number 1"; CString strQuery = "num"; bool fRet = SomeFn(strIn, StrQuery); if( fRet == true ) { // Ok strQuery was found in strIn ... I have f...
{ "language": "en", "url": "https://stackoverflow.com/questions/218003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rolling back in Git I have committed, and pushed, several patches: A1-->A2-->A3-->A4 (HEAD) Everyone's pulled these changesets into their local copy. Now we want to "roll back" to A2, and continue developing from there - essentially throwing away A3 and A4. What's the best way to do this? A: Throwing away those com...
{ "language": "en", "url": "https://stackoverflow.com/questions/218023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Fluent interfaces in C# I have a question with fluent interfaces. We have some objects that are used as parameter objects for a SQL interface, here's an example: using (DatabaseCommand cmd = conn.CreateCommand( "SELECT A, B, C FROM tablename WHERE ID = :ID", SqlParameter.Int32(":ID", 1234))) { ... } For...
{ "language": "en", "url": "https://stackoverflow.com/questions/218024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the difference between currying and partial application? I quite often see on the Internet various complaints that other peoples examples of currying are not currying, but are actually just partial application. I've not found a decent explanation of what partial application is, or how it differs from curryin...
{ "language": "en", "url": "https://stackoverflow.com/questions/218025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "489" }
Q: A keyboard shortcut in VS2005/8 for "Exit Current Method" When debugging, a trick I do whenever I want to exit the current method without running of its any statements, I move the current execution pointer to the end of the method, then click F10/11. Is there a keyboard shortcut (or can I program one) to accomplish ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a performance difference between Javac debug on and off? If I switch on the generating of debug info with Javac then the class files are 20-25% larger. Has this any performance effects on running the Java program? If yes on which conditions and how many. I expect a little impact on loading the classes becau...
{ "language": "en", "url": "https://stackoverflow.com/questions/218033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: MFC: Changing the colour of CEdit Guys, can someone give me a brief run through of how to change the background colour of a CEdit control at runtime? I want to be able to change the background to red if the field is zero length and the normal white otherwise. A: You cannot do it with a plain CEdit, you need to over...
{ "language": "en", "url": "https://stackoverflow.com/questions/218035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: When using click-once deployment, is there a 'Publish Date' property available I want to show the publish date in the About dialog. A: As far as I know there is no direct way in Click-Once to do that. Here is a workaround: You'd have to load the file in question (DLL or EXE) into a FileInfo object and get the modif...
{ "language": "en", "url": "https://stackoverflow.com/questions/218042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Issue with IE Selection and Range I'm trying to get the start element and the end element of a selection and the offset of the selection in each, i do this in firefox as follows: var delselection = window.getSelection(); var startOffset = delselection.anchorOffset; var endOffset = delselection.focusOffset; var st...
{ "language": "en", "url": "https://stackoverflow.com/questions/218043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Open Source login systems, what is good? I am starting a a new web development project and I am tired of coding login systems. This is the kind of thing that must have been done dozens of times before. I really want to use someone else's code, because it is easier than rolling my own, and it will likely be better. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/218051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Tools for SVN Merging SVN merging is very time consuming (especially on large code bases) and error prone. Eclipse and Netbeans plugins don't serve me very well. At the moment I'm using a combination of manual "svn merge" and the graphical diff Meld. Are there better alternatives (non-win32)? A: I figured out how t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Visual Studio debugger tips & tricks (for C/C++ projects) I'm interested in tips and tricks regarding debugging a C/C++ project in Visual Studio's debugger. I recently found out that if you have a pointer to a certain data type, let's say char* ptr, then you can see it as an array in the watch window using a syntax ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: HttpContext.Current.Session is null when routing requests Without routing, HttpContext.Current.Session is there so I know that the StateServer is working. When I route my requests, HttpContext.Current.Session is null in the routed page. I am using .NET 3.5 sp1 on IIS 7.0, without the MVC previews. It appears that Ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/218057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Random Gaussian Variables Is there a class in the standard library of .NET that gives me the functionality to create random variables that follow Gaussian distribution? A: Here is another quick and dirty solution for generating random variables that are normal distributed. It draws some random point (x,y) and chec...
{ "language": "en", "url": "https://stackoverflow.com/questions/218060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "142" }
Q: Get the application's path I've recently searched how I could get the application's directory in Java. I've finally found the answer but I've needed surprisingly long because searching for such a generic term isn't easy. I think it would be a good idea to compile a list of how to achieve this in multiple languages. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: Overflow to left instead of right I have a div with overflow:hidden, inside which I show a phone number as the user types it. The text inside the div is aligned to right and incoming characters are added to right as the text grows to left. But once the text is big enough not to fit in the div, last characters of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/218065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: JAXB - XJC - influencing generated typesafe enum class and members When compiling the following simpleType with the XJC compile (from the JAXB package)... <xs:simpleType name="test"> <xs:annotation> <xs:appinfo> <jaxb:typesafeEnumClass/> </xs:appinfo> </xs:annotation> <xs:rest...
{ "language": "en", "url": "https://stackoverflow.com/questions/218067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best Database With ColdFusion on OS X ColdFusion 8 Standard Edition on OS X Leopard. Developing a new website. What is the best database to use in conjunction with ColdFusion? Will be storing simple Credit Card operations, registration information, CRM info for an indie software company A: I would look into MySQL a...
{ "language": "en", "url": "https://stackoverflow.com/questions/218070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simple C++ MIME parser I want to digest a multipart response in C++ sent back from a PHP script. Anyone know of a very lightweight MIME parser which can do this for me? A: Not to toot my own horn here, but GMime is a very complete MIME parser written in C which can handle the Content-Length header. It also handles ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to avoid File Blocking We are monitoring the progress of a customized app (whose source is not under our control) which writes to a XML Manifest. At times , the application is stuck due to unable to write into the Manifest file. Although we are covering our traces by explicitly closing the file handle using File...
{ "language": "en", "url": "https://stackoverflow.com/questions/218096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ORM support for compound primary keys I've read that compound primary keys will confuse the hell out of typical ORM code generators. Which ORMs work best with compound PKs and which to avoid? (I've a particular interest in .NET) A: I'm using NHibernate successfully with compound keys. <class name="UserProfileField"...
{ "language": "en", "url": "https://stackoverflow.com/questions/218100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# and VB.NET operator precedence Looking at the C# and VB.NET language specs I think it says that the logical Xor/Or/And operations have different precendence in the two languages. Am I reading that right? I was expecting them to have the same precendence. For example in C# 100 | 200 ^ 300 & 400 is the same as... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Logging PreparedStatements in Java One thing that always been a pain is to log SQL (JDBC) errors when you have a PreparedStatement instead of the query itself. You always end up with messages like: 2008-10-20 09:19:48,114 ERROR LoggingQueueConsumer-52 [Logger.error:168] Error executing SQL: [INSERT INTO private_roo...
{ "language": "en", "url": "https://stackoverflow.com/questions/218113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How cache memory works? Today when I was in computer organization class, teacher talked about something interesting to me. When it comes to talk about Why cache memory works, he said that: for (i=0; i<M; i++) for(j=0; j<N; j++) X[i][j] = X[i][j] + K; //X is double(8 bytes) it is not good to change the firs...
{ "language": "en", "url": "https://stackoverflow.com/questions/218117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Xaml not WPF I am interested in using Xaml with expression blend for creating user interfaces in an application. However, because of the limitations of the target architecture, I cannot use WPF or C#. So, what I am interested in is in any examples / existing projects or advice from anyone who has experiance of this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Dynamically assigning master pages using MVC When using webforms the appropriate place to assign master pages to a page dynamically seems to be the pages PreInit event: this.Master.MasterPageFile = "~/leaf.Master" If nessasary, master pages in a hierarchy of nested master pages may be set here too: this.Master.Mas...
{ "language": "en", "url": "https://stackoverflow.com/questions/218122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What was the strangest coding standard rule that you were forced to follow? When I asked this question I got almost always a definite yes you should have coding standards. What was the strangest coding standard rule that you were ever forced to follow? And by strangest I mean funniest, or worst, or just plain odd. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "173" }
Q: C# BinaryFormatter - How can I find out the class of the binary data? I want to deserialize an object but don't know the class up front. So, consider the following code... IFormatter formatter = new BinaryFormatter(); Stream stream = new FileStream("MyFile.bin", FileMode.Open, FileAccess.Read, FileShare.Read); MyOb...
{ "language": "en", "url": "https://stackoverflow.com/questions/218133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Wicket + Javascript I'm wrapping up a Javascript widget in a Wicket component. I want to let the JS side talk to the component. What I've got so far: Component in question goes like talker = new GridAjaxBehavior(); this.add(talker); in constructor and then, later on, puts something like "var MyGridTalker = ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/218144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Which built-in .NET exceptions can I throw from my application? If I need to throw an exception from within my application which of the built-in .NET exception classes can I use? Are they all fair game? When should I derive my own? A: On the subject of System.Exception and System.ApplicationException: The latter wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/218150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: How do I change JPanel inside a JFrame on the fly? To put it simple, there's a simple java swing app that consists of JFrame with some components in it. One of the components is a JPanel that is meant to be replaced by another JPanel on user action. So, what's the correct way of doing such a thing? I've tried panel ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: bash regex with quotes? The following code number=1 if [[ $number =~ [0-9] ]] then echo matched fi works. If I try to use quotes in the regex, however, it stops: number=1 if [[ $number =~ "[0-9]" ]] then echo matched fi I tried "\[0-9\]", too. What am I missing? Funnily enough, bash advanced scripting guide su...
{ "language": "en", "url": "https://stackoverflow.com/questions/218156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: Styling horizontal rules Is there a nicer way of styling a <hr /> tag using CSS, that is cross-browser consistent and doesn't involve wrapping a div around it? I'm struggling to find one. The best way I have found, is as follows: CSS .hr { height:20px; background: #fff url(nice-image.gif) no-repeat scrol...
{ "language": "en", "url": "https://stackoverflow.com/questions/218158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How Would You Recommend a Novice Get Started Using CSS? As web based designer who has designed web sites using tables but never with css, how can a novice get started with css? Related SO posts SO - Css Book & website for CSS SO - Css blog A: Definitely get the Firebug plugin for Firefox. Go to a site you like and...
{ "language": "en", "url": "https://stackoverflow.com/questions/218161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Embedding extra styles with noscript I have an XHTML strict page that has an invisible div that is controlled by Javascript. The div is set to transparent and visible by the script and a mouseover event to make the div opaque on hover. When someone using a browser (or firefox with noscript) without javascript the di...
{ "language": "en", "url": "https://stackoverflow.com/questions/218162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Combining php arrays I have the following arrays in PHP (okay they are a bit bigger but the idea is what counts). $array1 = array(1 => 'a', 2 => 'b'); $array2 = array(3 => 'c', 4 => 'd'); Essentially I want to combine the two arrays as if it were something like this $array3 = array(1 => 'a', 2 => 'b', 3 => 'c', 4 =...
{ "language": "en", "url": "https://stackoverflow.com/questions/218174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can Rhino Mocks Write My Expect Statements For Me? I have a set of Visual Studio Team System unit (integration really) tests that talk to a remote database. The tests are getting too slow and unwieldy. I'd like to replace the entire set of tests with mocked out versions. The problem is it's painful to write all t...
{ "language": "en", "url": "https://stackoverflow.com/questions/218180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I URL encode a string in Excel VBA? Is there a built-in way to URL encode a string in Excel VBA or do I need to hand roll this functionality? A: One more solution via htmlfile ActiveX: Function EncodeUriComponent(strText) Static objHtmlfile As Object If objHtmlfile Is No...
{ "language": "en", "url": "https://stackoverflow.com/questions/218181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: How to ignore CVS keyword tags in eclipse diff As much as i like the eclipse diff/merge perspective, when dealing with large projects and multiple branches that need to be merged occasionally there's one feature missing: Is there any way to set the eclipse diff to ignore the CVS tags like $Author:$, $Revision:$ and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is Functional to Relational mapping easier than Object to Relational? Object-relational mapping has been well discussed, including on here. I have experience with a few approaches and the pitfalls and compromises. True resolution seems like it requires changes to the OO or relational models themselves. If using a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: IIS 7 - IIS 6 Problem I'm trying to run this script to assign Application Pool to web site running under IIS 6 Set oWebAdmin = GetObject("winmgmts:root\WebAdministration") Set oSite = oWebAdmin.Get("Site.Name='Site'") oSite.ApplicationDefaults.ApplicationPool = "NewAppPool" oSite.Put_ This script can't run under II...
{ "language": "en", "url": "https://stackoverflow.com/questions/218193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting Quiet Make to echo command lines on error I have a Makefile building many C files with long long command lines and we've cleaned up the output by having rules such as: .c${MT}.doj: @echo "Compiling $<";\ $(COMPILER) $(COPTS) -c -o $@ $< Now this is great as the @ suppresses the compilation...
{ "language": "en", "url": "https://stackoverflow.com/questions/218208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Asp.net tree view I have placed the TreeView in the update panel and HoverNodeStyle-Font-Underline="true" when ever mouse hover underline will be shown.But after post back there is no underline when mouse over A: It can be a bit tricky to get the standard TreeView control to co-operate with ASP.NET Ajax - have a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/218216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change characters typed in Firefox I need to change in a text input the character '.' to ',' while typing. In IE I change the keyCode event property in the keypress event, like this document.getElementById('mytext').onkeypress = function (evt) { var e = evt || window.event; if (e.keyCode && e.keyCode==4...
{ "language": "en", "url": "https://stackoverflow.com/questions/218219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Visual C++ 2008 'Release' build contains debug information I've noticed that when generating a new C++ project using MS Visual Studio 2008, the Release build contains debugging symbols - specifically the following settings are enabled: * *The C++/General/Debug Information Format is set to Program Database. *The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Sun Java System Portal Server 7.1 I guess I can extend the base providers to manipulate the base layout etc.Is there any place where I can get the java source code for default providers? Where are the classes for these default providers copied to ?What are list of things that I can manipulate by extending base conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/218235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does Ruby support verbatim strings? Is there support in Ruby for (for lack of a better word) non-escaped (verbatim) strings? Like in C#: @"c:\Program Files\" ...or in Tcl: {c:\Program Files\} A: Yes, you need to prefix your string with % and then a single character delineating its type. The one you want is %q{c:\...
{ "language": "en", "url": "https://stackoverflow.com/questions/218245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a way to place a pin into the google maps iphone app using openURL? I would like to create an iPhone app that can open the google maps app and place a pin on the map. I have the exact location of the pin, specified by its longitude and latitude. I also have a name for the pin e.g. 'location 1' that should b...
{ "language": "en", "url": "https://stackoverflow.com/questions/218252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What "Pastie" alternatives are there? (installable) I want to install a "pastie" in our local intranet. What are the alternatives to RaPaste and pastie.org? (the latter can't even be installed locally b/c it doesn't seem to be open source?) Edit: Doesn't have to be Ruby btw. Edit: What I mean with pastie is an app w...
{ "language": "en", "url": "https://stackoverflow.com/questions/218254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Keeping shell configurations in sync across multiple machines I'm a pretty active command line user and I have shell accounts all over the place. MacBooks, Linux desktop machines, Linux servers, Cygwin on XP, you name it. How can I keep my shell configuration (.bashrc, .vimrc etc.) in sync across all these machines ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Strongly typed actionlink with asp.net mvc beta? I used to be able to do the following in Preview 3 <%=Html.BuildUrlFromExpression<AController>(c => c.AnAction(par1, par2)%> How am I supposed to create urls in a strongly typed way with the MVC Beta? The only thing so far I have found is <%= Html.ActionLink("aName"...
{ "language": "en", "url": "https://stackoverflow.com/questions/218256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Where can I find a good template for a software application user guide? Looking for links to resources that will help me write a user guide for a software application. I'm after something that will help me to structure my guide, give it an appropriate writing style, and ensure that it has an excellent look and feel ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I detect and survive being "Slashdotted"? What's a good way to survive abnormally high traffic spikes? My thought is that at some trigger, my website should temporarily switch into a "low bandwidth" mode: switch to basic HTML pages, minimal graphics, disable widgets that might put unnecessary load on the dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/218264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: FogBugz, WebSVN & Cygwin - Diffs Not Being Generated I can appreciate what I'm about to ask is a bit specific and a small niche but if you could provide some help you might actually let me keep some of my hair! I originally posted the query over on the FogBugz technical support page, but haven't had much joy. Basica...
{ "language": "en", "url": "https://stackoverflow.com/questions/218266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Read MAC Address from network adapter in .NET I'd like to be able to read the mac address from the first active network adapter using VB.net or C# (using .NET 3.5 SP1) for a winform application A: from http://www.dotnetjunkies.com/WebLog/jkirwan/archive/2004/02/10/6943.aspx Dim mc As System.Management.ManagementC...
{ "language": "en", "url": "https://stackoverflow.com/questions/218284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Which is the simplest and least dependent AOP framework in Java? I want to use an AOP framework, but I have two constraints. Any framework that I choose * *Must be fairly independent. I plan to use this in a legacy code base, and hence cannot upgrade prospective dependencies like commons-logging-XXX.jar to commo...
{ "language": "en", "url": "https://stackoverflow.com/questions/218285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SSRS Sharepoint Integrated Mode: Where's my recursive parameter? Could someone tell me why the SSRS web service ReportService2005.asmx has a recursive parameter on ListChildren while the Sharepoint integrated mode version ReportService2006.asmx does not? ReportService2005: public CatalogItem[] ListChildren ( str...
{ "language": "en", "url": "https://stackoverflow.com/questions/218309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# custom event handlers If I have a property: public list<String> names { get; set; } How can I generate and handle a custom Event for arguments sake called 'onNamesChanged' whenever a name gets added to the list? A: A BindingList is likely your best option as it has builtin change tracking and a variety of exist...
{ "language": "en", "url": "https://stackoverflow.com/questions/218322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Getting String Sets into Presentation Layer We're working on an hospital information system that is being written on C# and using NHibernate to map objects to database. MVC pattern is being used to separate business logic from UI. Here is the problem, How do you get variable sized different set of strings to UI? For...
{ "language": "en", "url": "https://stackoverflow.com/questions/218325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Differences in prepared vs. direct statements using Oracle ODBC I'm using an Oracle database with a collation different to my OS language. I'm accessing the database using the ODBC driver. When I prepare a statement (e.g. a "select * from x where=?"), that involves special non-ASCII characters supported by the DB's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is is possible to write MS SQL Server add-in? Is is possible to write MS SQL Server add-in? I'm thinking of some application integrated with database server available form SQL Server Enterprise Manager. A: Have you looked into using extended stored procedures to provide add-in like functionality? The only hang up w...
{ "language": "en", "url": "https://stackoverflow.com/questions/218335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mapping multiple Values to a Value Object in NHibernate i'm fairly new to NHibernate and although I'm finding tons of infos on NHibernate mapping on the web, I am too silly to find this piece of information. So the problem is, i've got the following Model: this is how I'd like it to look. One clean person that has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/218337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Quick/Easy generation of CRUD pages & Data Access Layer in CMS I have a database that I would like class files generated from, and also a .aspx page generated which contains a listview to interface with the classfile for create/read/update/delete. I have started to use Subsonic but am not sure how flexible the scaf...
{ "language": "en", "url": "https://stackoverflow.com/questions/218343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does Java Connection.close rollback? Does Java Connection.close rollback into a finally block?. I know .Net SqlConnection.close does it. With this I could make try/finally blocks without catch... Example: try { conn.setAutoCommit(false); ResultSet rs = executeQuery(conn, ...); .... executeNonQuery(co...
{ "language": "en", "url": "https://stackoverflow.com/questions/218350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to get a Compare items in a Generic List I have a custom class that implements that IComparable. This class is stored in a Generic List. I now need to compare to lists to see which objects are in list A but not in list B. I thought the most simple way of doing this would be to iterate through list B and do A...
{ "language": "en", "url": "https://stackoverflow.com/questions/218359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a NullPointerException, and how do I fix it? What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? A: NullPointerExceptions are exceptions...
{ "language": "en", "url": "https://stackoverflow.com/questions/218384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "209" }
Q: stitch picture in iphone I want to stitch 2 pieces of png side by side. In Cocoa, I would use [NSImage initWithSize], and then just drawInRect. But UIImage don't have initWithSize class, how would I do this now? A: Use UIGraphicsBeginImageContext(), draw in it, then use UIGraphicsGetImageFromCurrentImageContext()....
{ "language": "en", "url": "https://stackoverflow.com/questions/218388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }