text
stringlengths
8
267k
meta
dict
Q: How do I access a database in C# Basically, I would like a brief explanation of how I can access a SQL database in C# code. I gather that a connection and a command is required, but what's going on? I guess what I'm asking is for someone to de-mystify the process a bit. Thanks. For clarity, in my case I'm doing web ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Should I mysql_real_escape_string all the cookies I get from the user to avoid mysql injection in php? When a user goes to my site, my script checks for 2 cookies which store the user id + part of the password, to automatically log them in. It's possible to edit the contents of cookies via a cookie editor, so I gue...
{ "language": "en", "url": "https://stackoverflow.com/questions/90517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is your session management strategy for NHibernate in desktop applications? I find it much more difficult to manage your session in a desktop application, because you cannot take advantage of such a clear bondary like HttpContext. So how do you manage your session lifetime to take advantage of lazy loading but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Inheriting Event Handlers in C# I've kind of backed myself into a corner here. I have a series of UserControls that inherit from a parent, which contains a couple of methods and events to simplify things so I don't have to write lines and lines of near-identical code. As you do. The parent contains no other controls...
{ "language": "en", "url": "https://stackoverflow.com/questions/90553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Good asp.net (C#) apps? Any suggestions for good open source asp.net (C#) apps out there which meet as many of the following:? * *Designed well and multi tiered *Clean & commented code *Good use of several design patterns *Web pages display properly in all common browsers *Produces valid html and has good use...
{ "language": "en", "url": "https://stackoverflow.com/questions/90560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Lightweight alternatives to NHibernate NHibernate is not really a good fit for our environment due to all the dependencies. (Castle, log4net etc.) Is there a good lightweight alternative? Support for simple file based databases such as Access/SQLite/VistaDB is essential. Ideally, something contained in a single asse...
{ "language": "en", "url": "https://stackoverflow.com/questions/90565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to get AD User Groups for user in Asp.Net? I need to be able to get a list of the groups a user is in, but I need to have one/some/all of the following properties visible: * *distinguishedname *name *cn *samaccountname What I have right now returns some sort of name, but not any of the ones above (the na...
{ "language": "en", "url": "https://stackoverflow.com/questions/90572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best way to really grok Java-ME for a C# guy I've recently started developing applications for the Blackberry. Consequently, I've had to jump to Java-ME and learn that and its associated tools. The syntax is easy, but I keep having issues with various gotchas and the environment. For instance, something that sur...
{ "language": "en", "url": "https://stackoverflow.com/questions/90578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How to center text over an image in a table using javascript, css, and/or html? How to center text over an image in a table cell using javascript, css, and/or html? I have an HTML table containing images - all the same size - and I want to center a text label over each image. The text in the labels may vary in size....
{ "language": "en", "url": "https://stackoverflow.com/questions/90579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Word frequency algorithm for natural language processing Without getting a degree in information retrieval, I'd like to know if there exists any algorithms for counting the frequency that words occur in a given body of text. The goal is to get a "general feel" of what people are saying over a set of textual comment...
{ "language": "en", "url": "https://stackoverflow.com/questions/90580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Lightweight Search Indexing API/Lbrary I'm looking for an open source search indexing library. It will be used for embedded web application so it should have a small code size. Preferably, written in C, C++ or PHP and does not require any database to be installed for storing indexes. Indexes should be stored on a fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/90584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create Web Client Solution dialog closes on click or tab out of default field without messages I installed Web Client Software Factory February 2008 release on Visual Studio Team System 2008 Development Edition (without SP1). When I first installed that, I tried out the software factory as I've never used one before...
{ "language": "en", "url": "https://stackoverflow.com/questions/90586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to implement a web page that scales when the browser window is resized? How to implement a web page that scales when the browser window is resized? I can lay out the elements of the page using either a table or CSS float sections, but i want the display to rescale when the browser window is resized i have a work...
{ "language": "en", "url": "https://stackoverflow.com/questions/90595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can I get more than 1000 records from a DirectorySearcher? I just noticed that the return list for results is limited to 1000. I have more than 1000 groups in my domain (HUGE domain). How can I get more than 1000 records? Can I start at a later record? Can I cut it up into multiple searches? Here is my query: Direct...
{ "language": "en", "url": "https://stackoverflow.com/questions/90652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Mocking method results I'm trying to find a way to fake the result of a method called from within another method. I have a "LoadData" method which calls a separate helper to get some data and then it will transform it (I'm interested in testing the transformed result). So I have code like this: public class MyClass(...
{ "language": "en", "url": "https://stackoverflow.com/questions/90657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Compiling on multiple hosts Say that you're developing code which needs to compile and run on multiple hosts (say Linux and Windows), how would you go about doing that in the most efficient manner given that: * *You have full access to hardware for each host you're compiling for (in my case a Linux host and a Win...
{ "language": "en", "url": "https://stackoverflow.com/questions/90658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to prevent the ObjectDisposedException in C# when drawing and application exits I'm a CompSci student, and fairly new at C#, and I was doing a "Josephus Problem" program for a class, and I created an Exit button that calls Application.Exit() to exit at anytime, but if C# is still working on painting and the butt...
{ "language": "en", "url": "https://stackoverflow.com/questions/90662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does a program ask for administrator privileges? I am developing an application using vb.net. For performing some tasks the application needs administrator privileges in the machine. How to ask for the privileges during the execution of the program? What is the general method of switching user accounts for execu...
{ "language": "en", "url": "https://stackoverflow.com/questions/90674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ADODB interop issue We have project PrjDb.dll in vb 6.0 that has a reference to ado 2.5. The project is built on Machine A. Now when we generate an interop for PrjDb.dll on another machine B, we end up with a new ADODB.dll with ver 2.5 in version field instead of linking it with the Primary Interop Assembly adodb.dl...
{ "language": "en", "url": "https://stackoverflow.com/questions/90681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create a thread dump of a Java Web Start application Is it possible to get a thread dump of a Java Web Start application? And if so, how? It would be nice if there were a simple solution, which would enable a non-developer (customer) to create a thread dump. Alternatively, is it possible to create a thread ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Problem with TVN_SELCHANGED on CTreeCtrl object I have tree control object created using CTreeCtrl MFC class. The tree control needs to support rename. When I left click on any of item in Tree the TVN_SELCHANGED event is called from which I can get the selected item of the tree as below : HTREEITEM h = m_moveListT...
{ "language": "en", "url": "https://stackoverflow.com/questions/90693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to create and use resources in .NET How do I create a resource that I can reference and use in various parts of my program easily? My specific problem is that I have a NotifyIcon that I want to change the icon of depending on the state of the program. A common problem, but one I've been struggling with for a lon...
{ "language": "en", "url": "https://stackoverflow.com/questions/90697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "219" }
Q: How does a program ask for administrator privileges? I am working on a small application in VB.NET. The program needs administrator privilege for doing some tasks. Is there a way to ask for administrator privileges during the execution if the program? What is the general way of changing the user account under which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Keyboard scancodes? GNU/Linux text console, X11 not involved, indeed not even installed. Keyboard is US layout, keymap US default. Kernel version 2.20.x or later. An application written in C is getting keyboard input in translation mode, i.e. XLATE or UNICODE. When a key is pressed, the application receives the corr...
{ "language": "en", "url": "https://stackoverflow.com/questions/90704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: re-rendering of combox store in Gwt-Ext i've created a Form Panel, and i'm rendering couple of Combo Boxes in the panel with a store which is populated via an response handler. the problem if i want to render the panel again it renders the combo boxes without the store, though i'm re-constructing the panel. i tried ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Float/double precision in debug/release modes Do C#/.NET floating point operations differ in precision between debug mode and release mode? A: They can indeed be different. According to the CLR ECMA specification: Storage locations for floating-point numbers (statics, array elements, and fields of classes) are...
{ "language": "en", "url": "https://stackoverflow.com/questions/90751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN? How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN? I'd like to get NetBIOS name, IP and MAC addresses for every host on the LAN, preferably not having to walk to every single PC and ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/90755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Fastest way to determine image resolution and file type in PHP or Unix command line? I'm currently using ImageMagick to determine the size of images uploaded to the website. By calling ImageMagick's "identify" on the command line it takes about 0.42 seconds to determine a 1MB JPEG's dimensions along with the fact th...
{ "language": "en", "url": "https://stackoverflow.com/questions/90758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SharePoint Event when Permissions of ListItems have been changed? i need to fire an event (or start a workflow) when the permissions of a List-Element (ListItem) have been changed. "ItemUpdating" / "ItemUpdated" won't fire (since the ListItem itself is not updated, i suppose), so how can it be done? A: I'm afraid t...
{ "language": "en", "url": "https://stackoverflow.com/questions/90764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you load an embedded icon from an exe file with PyWin32? I have an exe file generated with py2exe. In the setup.py I specify an icon to be embedded in the exe: windows=[{'script': 'my_script.py','icon_resources': [(0, 'my_icon.ico')], ... I tried loading the icon using: hinst = win32api.GetModuleHandle(None)...
{ "language": "en", "url": "https://stackoverflow.com/questions/90775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you place EXIF tags into a JPG, having the raw jpeg buffer in C++? I am having a bit of a problem. I get a RAW char* buffer from a camera and I need to add this tags before I can save it to disk. Writing the file to disk and reading it back again is not an option, as this will happen thousands of times. The b...
{ "language": "en", "url": "https://stackoverflow.com/questions/90798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Simple, free PHP blog engine easy to redesign? I am looking for a PHP blog engine which needs to be easy to redesign (CSS, HTML). It also needs to be free and have simple user interface so that the client doesn't struggle to add posts. Any suggestions? A: I kinda like b2evo we used it on our site and modded it to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/90802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Convert C# 2.0 System.Data.SqlTypes.SqlXml object into a System.Xml.XmlNode I seem to always have problems with converting data to and from XML in C#. It always wants you to create a full XMLDocument object even when you think you shouldn't have to. In this case I have a SQLXML column in a MS SQL 2005 server that I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Querying Active Directory with "SQL"? I just wonder if anyone knows or made a wrapper around Active Directory to be able to easily query it in .net? Kind of like "LINQ-to-ActiveDirectory" or some SQL Dialect, i.e. to be able to do "SELECT DISTINCT(DEPARTMENT) FROM /Users/SomeOU/AnotherOU" or "SELECT user FROM domain...
{ "language": "en", "url": "https://stackoverflow.com/questions/90812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best Practices & Principles for GUI design What is your best practical user-friendly user-interface design or principle? Please submit those practices that you find actually makes things really useful - no matter what - if it works for your users, share it! Summary/Collation Principles * *KISS. *Be clear and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: How to check PDF-A 1b compliance with open source tools? How can i check (and additionally create) PDF-A 1b compliant PDF documents using open source tools? Does anybody know an open source tool? Thanks in advance... A: Try with http://www.lowagie.com/iText/. It can recognize the version of the loaded PDF and can c...
{ "language": "en", "url": "https://stackoverflow.com/questions/90829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I detect the encoding/codepage of a text file? In our application, we receive text files (.txt, .csv, etc.) from diverse sources. When reading, these files sometimes contain garbage, because the files where created in a different/unknown codepage. Is there a way to (automatically) detect the codepage of a te...
{ "language": "en", "url": "https://stackoverflow.com/questions/90838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "308" }
Q: How can I tell whether I am on x64 or x86 using .NET? I'd like to offer my users correct links to an upgraded version of my program based on what platform they're running on, so I need to know whether I'm currently running on an x86 OS or an x64 OS. The best I've found is using Environment.GetEnvironmentVariable("PR...
{ "language": "en", "url": "https://stackoverflow.com/questions/90855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Convert Excel 4 macros to VBA I have an old Excel 4 macro that I use to run monthly invoices. It is about 3000 lines and has many Excel 5 Dialog Box sheets (for dialog boxes). I would like to know what the easiest way would be to change it into VBA and if it is worth it. Also, if once I have converted it to VBA, how...
{ "language": "en", "url": "https://stackoverflow.com/questions/90858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Debug vs. release in .NET Continuing from my previous question, is there a comprehensive document that lists all available differences between debug and release modes in a C# application, and particularly in a web application? What differences are there? A: One major performanance area if you are using any of the A...
{ "language": "en", "url": "https://stackoverflow.com/questions/90871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: How to dynamically generate combination of ASP.NET user controls? I have several user controls, let's say A, B, C and D. Based on some random input, I need to generate a combination of these. For e.g. if input is 2a3d1a2c I need to show two of the A's, 3 D's after that, an A again, etc. I will also need to stabilize...
{ "language": "en", "url": "https://stackoverflow.com/questions/90878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Compound keys in JPA I want to make an entity that has an autogenerated primary key, but also a unique compound key made up of two other fields. How do I do this in JPA? I want to do this because the primary key should be used as foreign key in another table and making it compound would not be good. In the following...
{ "language": "en", "url": "https://stackoverflow.com/questions/90885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: WCF REST Caching - Client Side & Server Side I have wirtten a RESTful WCF Service. Incorporating E-Tags, expires headers. The caching works great when using it from a browser. However how does the caching work when calling it from a WCF Channel Factory or .NET Web Request Objects? So in the scenario where I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/90889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Control Fujitsu Softune debugger Is there a way to control the Fujitsu Softune debugger with an other application(e.g. Eclipse)? I think about sending the command mentioned in the documentation of Softune and parse the output, but also other approaches are welcome. A: There is pluging for eclipse; file name is "Fuj...
{ "language": "en", "url": "https://stackoverflow.com/questions/90891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .NET: Get all Outlook calendar items How can I get all items from a specific calendar (for a specific date). Lets say for instance that I have a calendar with a recurring item every Monday evening. When I request all items like this: CalendarItems = CalendarFolder.Items; CalendarItems.IncludeRecurrences = true; I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Unit testing a Java Servlet I would like to know what would be the best way to do unit testing of a servlet. Testing internal methods is not a problem as long as they don't refer to the servlet context, but what about testing the doGet/doPost methods as well as the internal method that refer to the context or make ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Reliable and performant cheap (ish) hosting for ASP.NET 3.5 and mysql I'm looking for someone reasonably cheap but better than the majority of budget hosts out there. I'm currently with brinkster.net and I've become increasingly annoyed at the their immense unreliability and low available resources. Fasthosts busine...
{ "language": "en", "url": "https://stackoverflow.com/questions/90913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Advantages of VS 2008 over VS 2005 Could somebody please name a few. I could given time, but this is for somebody else, and I'd also like some community input. A: Personally I would say one of the biggest advantages I have found is the product responds quicker i.e. opens faster, compiles and runs projects faster. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Benefits of SQL Server 2005 over 2000 Could somebody please name a few. I could given time, but this is for somebody else, and I'd also like some community input. A: Some differences: * *CLR (.NET) stored procedures *SSIS instead of DTS *Management Studio instead of Enterprise Manager, with more functions (20...
{ "language": "en", "url": "https://stackoverflow.com/questions/90920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I find out how much of address space the application is consuming and report this to user? I'm writing the memory manager for an application, as part of a team of twenty-odd coders. We're running out of memory quota and we need to be able to see what's going on, since we only appear to be using about 700Mb....
{ "language": "en", "url": "https://stackoverflow.com/questions/90940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use the TranslateBehavior in CakePHP? There is no documentation on cakephp.org and I am unable to find one on google. Please link me some documentation or supply one! A: The translate behavior is another of CakePHP's very useful but poorly documented features. I've implemented it a couple of times with rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/90949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I use INotifyPropertyChanged to update an array binding? Let's say I have a class: class Foo { public string Bar { get { ... } } public string this[int index] { get { ... } } } I can bind to these two properties using "{Binding Path=Bar}" and "{Binding Path=[x]}". Fine. Now let's say I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/90971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Can you register an existing instance of a type in the Windsor Container? In the Windsor IOC container is it possible to register a type that I've already got an instance for, instead of having the container create it? A: There is a AddComponentInstance method on the Container's Kernel property. From the Unit Tests...
{ "language": "en", "url": "https://stackoverflow.com/questions/90976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: replace-char in Emacs Lisp ? Emacs Lisp has replace-string but has no replace-char. I want to replace "typographic" curly quotes (Emacs code for this character is hexadecimal 53979) with regular ASCII quotes, and I can do so with: (replace-string (make-string 1 ?\x53979) "'") I think it would be better with replace...
{ "language": "en", "url": "https://stackoverflow.com/questions/90977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Multiple Inheritance in PHP I'm looking for a good, clean way to go around the fact that PHP5 still doesn't support multiple inheritance. Here's the class hierarchy: Message -- TextMessage -------- InvitationTextMessage -- EmailMessage -------- InvitationEmailMessage The two types of Invitation* classe...
{ "language": "en", "url": "https://stackoverflow.com/questions/90982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: Eclipse 3.3.2/MyEclipse doesn't recognize xml as ant files Using eclipse 3.3.2 with MyEclipse installed. For some reason if a file isn't called build.xml then it isnt' recognised as an ant file. The file association for *.xml includes ant and says "locked by 'Ant Buildfile' content type. The run-as menu is broken. E...
{ "language": "en", "url": "https://stackoverflow.com/questions/90988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I iterate a .Net IList collection in the reverse order? I have an IList that contains items ( parent first ), they need to be added to a Diagram Document in the reverse order so that the parent is added last, drawn on top so that it is the first thing to be selected by the user. What's the best way to do it? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to create a path to a temporary file on Windows XP/Vista What is the best way of doing this? tmpnam() returns a path to a file in the root of the drive, which requires administrator privileges on Windows Vista, so this is not an option. A: GetTempPath and GetTempFileName should work. A: The environment variabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/91007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to rewrite an URL on a JBoss server? I would like to redirect/rewrite this two kinds of URLs: * *mydomain.com -> newdomain.com *mydomain.com/specificPage -> newdomain.com/newSpecificPage *mydomain.com/anyOtherPage -> mydomain.com/anyOtherPage (no redirect here) So I just want to redirect the root domain t...
{ "language": "en", "url": "https://stackoverflow.com/questions/91038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Java EE App Server Hello World I am fairly comfortable with standalone Java app development, but will soon be working on a project using a Java EE application server. Does anyone know of a straightforward how-to tutorial to getting a hello-world type application working in an application server? I'm (perhaps naievly...
{ "language": "en", "url": "https://stackoverflow.com/questions/91061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Emacs, switch to previous window In Emacs, C-x o takes me to the next window. What keyboard macro takes me to the previous window in Emacs? A: That'd be C-- C-x o In other words, C-x o with an argument of -1. You can specify how many windows to move by inserting a numeric argument between C-u and the command, as in...
{ "language": "en", "url": "https://stackoverflow.com/questions/91071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: Why easyphp stop all apache processes on severals PC? on some Windows PC, when I have both easyPHP and a standalone apache service configured on another network port and with a specific service name, I have a problem : when I stop easyphp, the other apache is stopped too. The problem do not occur on all PC I have, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/91086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I get my C# program to sleep for 50 milliseconds? How do I get my C# program to sleep (pause execution) for 50 milliseconds? A: For readability: using System.Threading; Thread.Sleep(TimeSpan.FromMilliseconds(50)); A: You can't specify an exact sleep time in Windows. You need a real-time OS for that. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "323" }
Q: How to match a single quote in sed How to match a single quote in sed if the expression is enclosed in single quotes: sed -e '...' For example need to match this text: 'foo' A: You can either use: "texta'textb" (APOSTROPHE inside QUOTATION MARKs) or 'texta'\''textb' (APOSTROPHE text APOSTROPHE, then REVERSE SOLI...
{ "language": "en", "url": "https://stackoverflow.com/questions/91110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: SQL query to calculate coordinate proximity I'm using this formula to calculate the distance between entries in my (My)SQL database which have latitude and longitude fields in decimal format: 6371 * ACOS(SIN(RADIANS( %lat1% )) * SIN(RADIANS( %lat2% )) + COS(RADIANS( %lat1% )) * COS(RADIANS( %lat2% )) * COS(RADIANS(...
{ "language": "en", "url": "https://stackoverflow.com/questions/91116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Infrastructure for a software project I'd be leading a new project soon. And I've been pondering over what are the basic infrastructure for a software project. These are the stuff that I think every project should have: -Coding style conventions -Naming conventions -Standard project directory structure(eg maven stan...
{ "language": "en", "url": "https://stackoverflow.com/questions/91122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I best convert a string representation into a DbType? Suppose I have a string 'nvarchar(50)', which is for example the T-SQL string segment used in creating a table of that type. How do I best convert that to an enum representation of System.Data.DbType? Could it handle the many different possible ways of wri...
{ "language": "en", "url": "https://stackoverflow.com/questions/91124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to validate drag/drop operations for a TreeView in C# I want to verify a drag & drop operation is allowed. A valid item can come from another one of our "controls", or internally from within the custom treeview. Currently I have this: bool CanDrop(DragEventArgs e) { bool allow = false; Point point =...
{ "language": "en", "url": "https://stackoverflow.com/questions/91127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OO Design, open/closed principle question I've been thinking about this object oriented design question for a while now and have unable to come up with a satisfactory solution, so thought I'd throw it open to the crowds here for some opinions. I have a Game class that represents a turn based board game, we can assum...
{ "language": "en", "url": "https://stackoverflow.com/questions/91137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Hosting a WCF endpoint with programatic settings in IIS I need to host a WCF service in IIS that exposes a wsHttpBinding. That part is working nicely using the settings of system.serviceModel in my web.config. What i need now is to setup the configuration (like maxReceivedMessageSize and other options) through a con...
{ "language": "en", "url": "https://stackoverflow.com/questions/91143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Optional Parameters in Mysql stored procedures How do I create an optional parameter in a mysql stored procedure? A: Optional parameters are not supported in mySQL stored procedures, nor are there any current plans to add this functionality at this time. I'd recommend passing null for optional parameters. A: Accor...
{ "language": "en", "url": "https://stackoverflow.com/questions/91150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: XMLSockets in Flash Lite? Are XMLSockets available in Flash Lite, and if yes in which versions, and are there differences between the regular and the lite objects? A: I don't know enough to tell you the exact difference(s) between XML sockets in Flash and Flash Lite, but they are definitely supported in Flash Lite ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I best convert a DbType to System.Type? How do I best convert a System.Data.DbType enumeration value to the corresponding (or at least one of the possible corresponding) System.Type values? For example: DbType.StringFixedLength -> System.String DbType.String -> System.String DbType.Int32 -> System.Int32 I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/91160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What process is listening on a certain port on Solaris? So I log into a Solaris box, try to start Apache, and find that there is already a process listening on port 80, and it's not Apache. Our boxes don't have lsof installed, so I can't query with that. I guess I could do: pfiles `ls /proc` | less and look for "po...
{ "language": "en", "url": "https://stackoverflow.com/questions/91169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Make Web Application Accessible What things have to be done before I can honestly tell myself my web application is accessible by anyone? Or even better, convince Joe Clark. I don't have any video or audio to worry about, so I know I won't need transcripts. What else do I have to check? A: You should also check out...
{ "language": "en", "url": "https://stackoverflow.com/questions/91170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Excel report framework Is there any Excel report framework available? We need to export some of the reports into Excel format. Our application is java application hence anything supporting java would be great. I have tried Apache POI API, however that is not good enough. Any framework based on Windows API would be b...
{ "language": "en", "url": "https://stackoverflow.com/questions/91178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Automated tests for Java Swing GUIs What options are there for building automated tests for GUIs written in Java Swing? I'd like to test some GUIs which have been written using the NetBeans Swing GUI Builder, so something that works without requiring special tampering of the code under test would be ideal. A: We ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/91179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Cruise Control and Obfuscation, How? this is my first question to stackoverflow so here it goes... I use cruise control for my continuous integration scheme, i want to use obfuscation in order to add another protection layer to my assemblies. The thing is that i don't know how to go about it since i couldn't find ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/91181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I need to write code in python for comparing text of two documents using fingerprint techniques I need to write code in python language for comparing the text of document using fingerprint techniques. I do not know to take fingerprint of a document or to generate fingerprint of a document. I'm asking if anyone knows...
{ "language": "en", "url": "https://stackoverflow.com/questions/91183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Delete DataGridView line How can I delete a line form a bound DataGridView when pressing the Delete key? A: If you're on framework 3.5, it looks like there's a method on the DataGridView to process the delete key. http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.processdeletekey.aspx Otherw...
{ "language": "en", "url": "https://stackoverflow.com/questions/91196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can you tell programmatically if a Flex App is running in debug mode? Is it possible to write code in a Flex application that will only be run in a debug build, or when running through the debugger? Does Flex provide a way to actually remove code entirely from release builds, like C-style #defines? The app is no...
{ "language": "en", "url": "https://stackoverflow.com/questions/91198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to write an emacs mode for a new language? I would like to write an Emacs major mode for a 4GL. Can someone show me a tutorial? As far as I googled I was able to find only this broken: link http://two-wugs.net/emacs/mode-tutorial.html A: If you're lazy, one easy way is to extend generic-mode to know about your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/91201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Is there an efficient\easy way to draw a concave polygon in Direct3d I'm trying to draw a polygon using c# and directx All I get is an ordered list of points from a file and I need to draw the flat polygon in a 3d world. I can load the points and draw a convex shape using a trianglefan and drawuserprimitives. This o...
{ "language": "en", "url": "https://stackoverflow.com/questions/91202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Will everything in the standard library treat strings as unicode in Python 3.0? I'm a little confused about how the standard library will behave now that Python (from 3.0) is unicode-based. Will modules such as CGI and urllib use unicode strings or will they use the new 'bytes' type and just provide encoded data? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/91205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Beginning Web Development on Plan 9 I've been wanting to program for the Plan 9 operating system for a while. I'd really like to play around with a web app there. Of course, the only language I know for Plan 9 is C, and that doesn't seem ideal for web development. I also understand that it doesn't run apache or mysq...
{ "language": "en", "url": "https://stackoverflow.com/questions/91211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Serialize Java objects into Java code Does somebody know a Java library which serializes a Java object hierarchy into Java code which generates this object hierarchy? Like Object/XML serialization, only that the output format is not binary/XML but Java code. A: Serialised data represents the internal data of object...
{ "language": "en", "url": "https://stackoverflow.com/questions/91214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is the difference between mysql_real_escape_string and addslashes? mysql_real_escape_string and addslashes are both used to escape data before the database query, so what's the difference? (This question is not about parametrized queries/PDO/mysqli) A: mysql_real_escape_string() has the added benefit of escapi...
{ "language": "en", "url": "https://stackoverflow.com/questions/91216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Checking if another web server is listening from asp I'm using Microsoft.XMLHTTP to get some information from another server from an old ASP/VBScript site. But that other server is restarted fairly often, so I want to check that it's up and running before trying to pull information from it (or avoid my page from giv...
{ "language": "en", "url": "https://stackoverflow.com/questions/91223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: List the names of all the classes within a VS2008 project Is there a quick & dirty way of obtaining a list of all the classes within a Visual Studio 2008 (c#) project? There are quite a lot of them and Im just lazy enough not to want to do it manually. A: If you open the "Class View" dialogue (View -> Class View or...
{ "language": "en", "url": "https://stackoverflow.com/questions/91232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multiple keyboards and low-level hooks I have a system where I have multiple keyboards and really need to know which keyboard the key stroke is coming from. To explain the set up: * *I have a normal PC and USB keyboard *I have an external VGA screen with some hard-keys *The hard keys are mapped as a standard U...
{ "language": "en", "url": "https://stackoverflow.com/questions/91234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: VS: Attribute for ignoring missing XML comments when building I have a VS2008 solution using xml documentation, and we have warnings as errors turned on for release mode (a nice feature IMHO); this results, however, in long lists of 'missing xml comment' errors for such things as every element of a (self describing)...
{ "language": "en", "url": "https://stackoverflow.com/questions/91246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Scrum Burndown issues We have been using Scrum for around 9 months and it has largely been successful. However our burndown charts rarely look like the 'model' charts, instead resembling more of a terrifying rollercoaster ride with some vomit inducing climbs and drops. To try and combat this we are spending more tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/91257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Pause GNU Make in a Windows console if an error occurs Part of the install for an app I am responsible for, compiles some C code libraries. This is done in a console using GNU Make. So, as part of the install, a console window pops open, you see the make file output wiz by as it compiles and links, when finished the...
{ "language": "en", "url": "https://stackoverflow.com/questions/91263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Any free alternative to Robohelp? Any free alternative to Robohelp? Prefer open source Need some sort of online help authoring tool for an open source project. A: Check out this list of free help authoring tools, bound to be something useful there. A: Just remembered: depending on what you want to do, you can use...
{ "language": "en", "url": "https://stackoverflow.com/questions/91269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Statistically removing erroneous values We have a application where users enter prices all day. These prices are recorded in a table with a timestamp and then used for producing charts of how the price has moved... Every now and then the user enters a price wrongly (eg. puts in a zero to many or to few) which somewh...
{ "language": "en", "url": "https://stackoverflow.com/questions/91270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is WebRequest The Right C# Tool For Interacting With Websites? I'm writing a small tool in C# which will need to send and receive data to/from a website using POST and json formatting. I've never done anything like this before in C# (or any language really) so I'm struggling to find some useful information to get m...
{ "language": "en", "url": "https://stackoverflow.com/questions/91275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Best solution for using EJBs from Excel We would like to give access to some of our EJBs from Excel. The goal is to give an API usable from VBA. Our EJBs are mostly Stateless Session Beans that do simple CRUD operations with POJOs. Some possible solutions: * *Exposing the EJBs as WebServices and create a VB/C# d...
{ "language": "en", "url": "https://stackoverflow.com/questions/91280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Programmatically Build a TemplateColumn How does one go about programatically building a TemplateColumn object and adding it to a DataGrid. I know how to add it, but not how to build the contents of the TemplateColumn. There are no useful looking methods on the ITemplate the column class exposes. A: You ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/91282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ruby on Rails Migration - Create New Database Schema I have a migration that runs an SQL script to create a new Postgres schema. When creating a new database in Postgres by default it creates a schema called 'public', which is the main schema we use. The migration to create the new database schema seems to be workin...
{ "language": "en", "url": "https://stackoverflow.com/questions/91289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .NET's SslStream is always negotiating to the least secure cipher I have. How can I change this? SslStream is supposed to negotiate the cipher type, key length, hash algorithm, etc. with its peer SSL stack. When using it in my code, I find that the negotiation always defaults to RC4 & MD5. I would like to use 3DES o...
{ "language": "en", "url": "https://stackoverflow.com/questions/91304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }