text
string
meta
dict
Q: Indenting comments to match code in vim I do all my coding in vim and am quite happy with it (so, please, no "use a different editor" responses), but have an ongoing annoyance in that the smartindent feature wants to not indent comments beginning with # at all. e.g., I want # Do something $x = $x + 1; if ($y)...
{ "language": "en", "url": "https://stackoverflow.com/questions/191201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: How to get list of running applications using PowerShell or VBScript I need to programmatically get a list of running applications as shown in the "Applications" tab inside the Windows Task Manager using PowerShell or VBScript. All I could find so far is how to list processes using VBScript and WMI. A: @Steven Mura...
{ "language": "en", "url": "https://stackoverflow.com/questions/191206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Is recursion good in SQL Server? I have a table in SQL server that has the normal tree structure of Item_ID, Item_ParentID. Suppose I want to iterate and get all CHILDREN of a particular Item_ID (at any level). Recursion seems an intuitive candidate for this problem and I can write an SQL Server function to do this....
{ "language": "en", "url": "https://stackoverflow.com/questions/191208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to say no to all "do you want to overwrite" prompts in a batch file copy? By default, copying from the command prompt will prompt you to overwrite files that already exist in the target location. You can add "/Y" to say "Yes to all" replacements. But how can you say "No to all" ? In other words, I want to copy e...
{ "language": "en", "url": "https://stackoverflow.com/questions/191209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: How to stop java process gracefully? How do I stop a Java process gracefully in Linux and Windows? When does Runtime.getRuntime().addShutdownHook get called, and when does it not? What about finalizers, do they help here? Can I send some sort of signal to a Java process from a shell? I am looking for preferably port...
{ "language": "en", "url": "https://stackoverflow.com/questions/191215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: OpenSource: Collaborative Design After delving into the world of opensource I have found implementation is emphasised over design. Version control allows for a project to branch off in many directions, which projects may do; this suggests lack of consensus or direction amongst the participants. What software or web...
{ "language": "en", "url": "https://stackoverflow.com/questions/191224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Error from Delphi ActiveX Control: Exception EOSError - A call to an OS function failed I use an activex component in my C# program that was created with Delphi. It works fine a lot of the time, but occasionally (sometimes frequently!) the component crashes with this exception: Exception EOSError (A call to an OS ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I abort a long operation in WinDbg? Often WinDbg will enter a state where it is *Busy* performing an operation. Often this is due to some mistake I made trying to dt some_variable_itll_never_find or setting a break point somewhere without symbols or the 1000's of other mistakes I make fumbling around this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Browsing SQL Server Are there any tools for just browsing SQL Server? I ask because sometimes SSMS is a little heavy weight when I just want to look through the database and find one record, and SQLCMD doesn't really seem like a good choice when browsing through a lot of different records or a lot of large records....
{ "language": "en", "url": "https://stackoverflow.com/questions/191242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Getting XAML of the current screen in silverlight 2 I am trying to send my dynamically created silverlight 2 page/image to a an ASP.net web service to render it as an bitmap image. I can see many examples how to get the XAML using javascript (see here) in version 1 of silverlight but I have a few differences. a) I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Latent Dirichlet Allocation, pitfalls, tips and programs I'm experimenting with Latent Dirichlet Allocation for topic disambiguation and assignment, and I'm looking for advice. * *Which program is the "best", where best is some combination of easiest to use, best prior estimation, fast *How do I incorporate my i...
{ "language": "en", "url": "https://stackoverflow.com/questions/191248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How to find the installation directory of a third-party application, such as Google Earth, using C#? I have the following code fragment that starts a Google Earth process using a hardcoded path: var process = new Process { StartInfo = { //TODO: Get location...
{ "language": "en", "url": "https://stackoverflow.com/questions/191250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to install WPF application to a PC without Framework 3.5 I have a question about how to deploy WPF application into a PC without Framework 3.5. If a PC just installs Windows XP and sp3, Is it possible to design a setup package that can install WPF Application directly on this PC? The situation is like this: I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/191251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are some convincing arguments to upgrade from Visual Studio 6? I have a client who is still using Visual Studio 6 for building production systems. They write multi-threaded systems that use STL and run on mutli-processor machines. Occasionally when they change the spec of or increase the load on one of their s...
{ "language": "en", "url": "https://stackoverflow.com/questions/191253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Using MSBuild to filter out unwanted extensions and folders Using MSBuild, how can I filter out unwanted extensions in my project (and folders potentially)? Extensions like .cs, .resx files etc. A: <ItemGroup> <MyGroup Include="Directory\**" Exclude="**\*.cs;**\*.resx" /> </ItemGroup> http://blogs.msdn.com/msbuild...
{ "language": "en", "url": "https://stackoverflow.com/questions/191259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.Net: Approaches to multilingual websites with Javascript and AJAX We've recently completed phase 1 of a ASP.Net website in English and French. We went with using resource files to store language specific strings, but because the site used ASP.Net AJAX and javascript heavily we rigged up a solution to pass the ri...
{ "language": "en", "url": "https://stackoverflow.com/questions/191260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Manually Trigger a TFS Team Build How would you manually trigger additional team builds from a team build? For example, when we were in CC.Net other builds would trigger if certain builds were successful. The second build could either be projects that use this component or additional, long running test libraries fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/191291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I set the current line of execution in the eclipse java debugger? I want to force the current execution line to a specific line in the same function, possibly skipping intermediate lines. All my old school debuggers had this feature, but I can't find it in eclipse. Is there a way to do it without changing co...
{ "language": "en", "url": "https://stackoverflow.com/questions/191306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How do I get to the menu in Emacs in console mode? If you launch Emacs using the -nw flag to force a console session (rather than an X session if you have X windows running), how do you get to the menu? There are some items held in the menus that are infrequently-enough used on my part that I don't recall the escape...
{ "language": "en", "url": "https://stackoverflow.com/questions/191312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Correct way to populate an Array with a Range in Ruby I am working through a book which gives examples of Ranges being converted to equivalent arrays using their "to_a" methods When i run the code in irb I get the following warning warning: default `to_a' will be obsolete What is the the correct alternative to usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/191329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "223" }
Q: Windows equivalent of /dev/random Is there a way to generate random number on Windows by reading from a file or pseudo file or character special file, the way that can be done on Linux by reading from /dev/random? Not asking about various crypto API, but whether there is in Windows something akin to the Linux way. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: How to set selected row of DataGridView to newly-added row when the grid is bound to sorted DataView? I have a DataGridView bound to a DataView. The grid can be sorted by the user on any column. I add a row to the grid by calling NewRow on the DataView's underlying DataTable, then adding it to the DataTable's Rows c...
{ "language": "en", "url": "https://stackoverflow.com/questions/191339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Random record from a database table (T-SQL) Is there a succinct way to retrieve a random record from a sql server table? I would like to randomize my unit test data, so am looking for a simple way to select a random id from a table. In English, the select would be "Select one id from the table where the id is a r...
{ "language": "en", "url": "https://stackoverflow.com/questions/191342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: Windows scripting FOR command to rename all files in a directory I am trying to rename all the files present in a Windows directory using FOR command as follows at the command prompt: for %1 in (*.*) do ren %1 test%1 E.g. This renames a file enc1.ctl to testenc1.ctl enc2.ctl to testenc2.ctl Thats not what i want...
{ "language": "en", "url": "https://stackoverflow.com/questions/191351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why doesn't WD Velociraptor speed up my VC++-compilation significantly? Several people round here recommended switching to the new WD Velociraptor 10000rpm harddisk. Also magazine articles praise the performance. I bought one and mirrored my old system to it. The resulting increase in compilation-speed is somewhat ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to convert a file to utf-8 in Python? I need to convert a bunch of files to utf-8 in Python, and I have trouble with the "converting the file" part. I'd like to do the equivalent of: iconv -t utf-8 $file > converted/$file # this is shell code Thanks! A: You can use the codecs module, like this: import codecs B...
{ "language": "en", "url": "https://stackoverflow.com/questions/191359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: Quick unix command to display specific lines in the middle of a file? Trying to debug an issue with a server and my only log file is a 20GB log file (with no timestamps even! Why do people use System.out.println() as logging? In production?!) Using grep, I've found an area of the file that I'd like to take a look at...
{ "language": "en", "url": "https://stackoverflow.com/questions/191364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "243" }
Q: How can I set and restore FPU CTRL registers? I can reset FPU's CTRL registers with this: http://support.microsoft.com/kb/326219 But how can I save current registers, and restore them later? It's from .net code.. What I'm doing, is from Delphi calling an .net dll as an COM module. Checking the Ctrl registers in delp...
{ "language": "en", "url": "https://stackoverflow.com/questions/191368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Polymorphism vs Inheritance (example problem case) I am still trying to wrap my head around design patterns and for the second time I'm coming up against the same problem that seems to be crying out for a pattern solution. I have an accounts system with multiple account types. We have restaurant, hotel, service_pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/191376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to do a regex replacement, adding characters in a date string? For PHP I have a date I want line wrapped. I have $date = '2008-09-28 9:19 pm'; I need the first space replaced with a br to become 2008-09-28<br>9:19 pm If it wasn't for that second space before PM, I would just str_replace() it. A: s/ /<br\/>...
{ "language": "en", "url": "https://stackoverflow.com/questions/191383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you version your projects and manage releases? Our situation is as follows, but I'm curious about this problem in any situation. We have a framework consisting of 4 projects: * *beans *util *framework *web We also have modules that need a version and depend on a version of beans and util. Finally we h...
{ "language": "en", "url": "https://stackoverflow.com/questions/191387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How does one weed out dependencies in a large project? I'm about to inherit a rather large Java enterprise project that has a large amount of third party dependencies. There is at least seventy JARs included and some of them would seem to be unused e.g. spring.jar which I know isn't used. It seems that over the year...
{ "language": "en", "url": "https://stackoverflow.com/questions/191390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Recommended placement of tempdb and log for SQL Server OLTP database(s) Suppose the following configuration: Drive D ... Data, Drive E .... TempDB, Drive F ... Log. and suppose all drives are on separate spindles with respective drive controllers. Concerning performance; is the above configuration optimal, decent, o...
{ "language": "en", "url": "https://stackoverflow.com/questions/191396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I change the Read-only file attribute for each file in a folder using c#? How do I change the Read-only file attribute for each file in a folder using c#? Thanks A: You can try this : iterate on each file and subdirectory : public void Recurse(DirectoryInfo directory) { foreach (FileInfo fi in directory....
{ "language": "en", "url": "https://stackoverflow.com/questions/191399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I protect all worksheet in an Excel workbook with a single click? I have around 25 worksheets in my workbook (Excel spreadsheet). Is there a way I can protect all the 25 worksheets in single click ? or this feature is not available and I will have to write a VBA code to accomplish this. I need very often to p...
{ "language": "en", "url": "https://stackoverflow.com/questions/191400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Single Inheritance in C# - object class? I have been asking myself this question for a long time now. Thought of posting it. C# doesn't support Multiple Inheritance(this is the fact). All classes created in C# derive out of 'Object' class(again a fact). So if C# does not support Multiple inheritance, then how are we...
{ "language": "en", "url": "https://stackoverflow.com/questions/191404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using a Windows Form with Ruby Is it possible to create a form on Windows using Ruby? I have a Ruby script and I would like to have an input form to ask for a user's password, then use this in the rest of my script. update: I have successfully done this with wxRuby, although it looks ugly. Shoes looks promising, I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why does my spinner GIF stop while jQuery ajax call is running? I'm just starting to wean myself from ASP.NET UpdatePanels. I'm using jQuery and jTemplates to bind the results of a web service to a grid, and everything works fine. Here's the thing: I'm trying to show a spinner GIF while the table is being refreshed...
{ "language": "en", "url": "https://stackoverflow.com/questions/191413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: How to create a unique index on a NULL column? I am using SQL Server 2005. I want to constrain the values in a column to be unique, while allowing NULLS. My current solution involves a unique index on a view like so: CREATE VIEW vw_unq WITH SCHEMABINDING AS SELECT Column1 FROM MyTable WHERE Column1 I...
{ "language": "en", "url": "https://stackoverflow.com/questions/191421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "110" }
Q: Change language of system and error messages in PostgreSQL Is it possible to change the language of system messages from PostgreSQL? In MSSQL for instance this is possible with the SQL statement SET LANGUAGE. A: In my case (on Windows Server 2019) I managed to change language by creating a system environment variab...
{ "language": "en", "url": "https://stackoverflow.com/questions/191428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: CSS: Two 50% fluid columns not respecting min width I'm trying to use this layout with two 50% column width instead. But it seems that when the right columns reaches its 'min-width', it goes under the left column. Is there any way to use the 'shim' technique to set a min-width to the wrapper so both columns stop res...
{ "language": "en", "url": "https://stackoverflow.com/questions/191429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How would you reference lookup/meta data? I've run into this issue quite a few times and never liked the solution chosen. Let's say you have a list of States (just as a simple example) in the database. In your code-behind, you want to be able to reference a State by ID and have the list of them available via Intel...
{ "language": "en", "url": "https://stackoverflow.com/questions/191443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I wrap a selection with an HTML tag in Visual Studio? This seems like the most basic question in the world, but damned if I can find an answer. Is there a keyboard shortcut, either native to Visual Studio or through Code Rush or other third-party plug-in, to wrap the current selection with an HTML tag? I'm ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/191463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "117" }
Q: Getting started with Entity Framework in VS.NET 2008 What exactly do I need to get started with Entity Framework in VS.net 2008? I am downloading SP1 for vs.net 2008 as I type this, anything else I am missing? From what I understand I will have to create some XML and then use a .exe tool to spit out the code? A: Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/191472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: JQuery Slider with interior Block Elements I'm trying to build a similar 'slider' as demoed here http://ui.jquery.com/repository/real-world/product-slider/ but I'm trying to use interior divs inside of the list items (<li>). it seems as if this demo breaks if you're not using an image or block element (<p>,<div>,et...
{ "language": "en", "url": "https://stackoverflow.com/questions/191482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do i submit an ajax request before the page is loaded I want to check the login status of a user through an ajax request. Depending wether the user is logged in I want to display either the username/password input or the username. Currently the request is sent on body.onload and a prgoress indicator is shown unt...
{ "language": "en", "url": "https://stackoverflow.com/questions/191483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Find beginning of sentence in String I want to display the results of a searchquery in a website with a title and a short description. The short description should be a small part of the page which holds the searchterm. What i want to do is: 1 strip tags in page 2 find first position of seachterm 3 from that positio...
{ "language": "en", "url": "https://stackoverflow.com/questions/191490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Avoiding Dialog Boilerplate in Delphi and /or C++ I often need to design a dialog in Delphi/C++Builder that allows various properties of an object to be modified, and the code to use it typically looks like this. Dialog.Edit1.Text := MyObject.Username; Dialog.Edit2.Text := MyObject.Password; // ... many more of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Maintiaining SQL Transactions over web service calls in .Net How do I perform a database transaction where I create a new record then make a call to a web service using the new record ID returned from the database which will also manipulate the same database? I could obviously update all tables directly from the sam...
{ "language": "en", "url": "https://stackoverflow.com/questions/191494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Clearing the default empty value in a Winform Combobox of type: DropDownList How do I go about making the default value of the combobox as the first item in the array. A: Put this code after you have populated the combo box: comboBox1.SelectedIndex = 0;
{ "language": "en", "url": "https://stackoverflow.com/questions/191496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: PHP readdir is not reading some files I'm using the following code to loop through a directory to print out the names of the files. However, not all of the files are displayed. I have tried using clearstatcache with no effect. $str = ''; $ignore = array('.', '..'); $dh = @opendir( $path ); if ($dh =...
{ "language": "en", "url": "https://stackoverflow.com/questions/191503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does PHP have a built in mechanism to failover from one database server to another? I found this: http://www.evolt.org/failover-database-connection-with-php-mysql and similar examples. But is there a better way? I am thinking along the lines of the Automatic Failover Client in the MS SQL Native Client. A: It's trad...
{ "language": "en", "url": "https://stackoverflow.com/questions/191528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you change your apparent country of origin to test a site? I want to be able to set my country of origin - does this involve testing through a proxy, or is there something that can be set else where? A: I would use TOR for this purpose. That way you are sure you are hitting the site from a different country....
{ "language": "en", "url": "https://stackoverflow.com/questions/191530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SVN and binaries After asking this question I was advised not to check in binaries into subversion. My question is then what do I do with 3rd party dlls that are required to be in the bin folder? I need to be able checkout a working copy and have that run as a website with all dlls, etc intact. A: The answers to yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/191533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Converting XML to JSON using Python? I've seen a fair share of ungainly XML->JSON code on the web, and having interacted with Stack's users for a bit, I'm convinced that this crowd can help more than the first few pages of Google results can. So, we're parsing a weather feed, and we need to populate weather widgets ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "218" }
Q: VS2005 C# Currency Manager Issue with Position Not Changing We have a custom collection of objects that we bind to a listbox control. When an item is added to the list the item appears in the listbox, however when one selects the item the currency manager position will not go to the position. Instead the currency ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/191549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Teach an M.B.A. the intricacies of Microsoft SQL Server (and how's it different from MySQL?) I haven't had to interact w/MSSQL much in my development career, though I've spent many an hour working with MySQL. An M.B.A. friend of mine is starting a job where she needs to gain functional knowledge of MSSQL Server, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/191565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby Meta Programming Question I was looking at the Ruby logging library Logging.logger method and have a question from the source at github relating to this piece of code: logger = ::Logging::Logger.new(name) logger.add_appenders appender logger.additive = false class << logger def close @appende...
{ "language": "en", "url": "https://stackoverflow.com/questions/191567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I get rid of the mouse cursor in full-screen exclusive mode? I'm working on a simple 2D game engine in Java, and having no trouble with FSEM, buffer strategies, and so on; my issue is with the mouse cursor. In windowed mode, I can hide the mouse cursor, no problem, by using setCursor() from my JFrame to set a...
{ "language": "en", "url": "https://stackoverflow.com/questions/191592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Db schema is complete, can Entity Framework generate Storage Schema? If I already have a database schema complete, can the entity framework somehow generate the storage schema for me? Or if I have the classes developed, can it generate the other xml's desribing the classes and their relationships? A: Most can yes.....
{ "language": "en", "url": "https://stackoverflow.com/questions/191597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where are the best locations to write an error log in Windows? Where would you write an error log file, say ErrorLog.txt, in Windows? Keep in mind the path would need to be open to basic users for file write permissions. I know the eventlog is a possible location for writing errors, but does it work for "user" leve...
{ "language": "en", "url": "https://stackoverflow.com/questions/191609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to detect code duplication during development? We have a fairly large code base, 400K LOC of C++, and code duplication is something of a problem. Are there any tools which can effectively detect duplicated blocks of code? Ideally this would be something that developers could use during development rather than ju...
{ "language": "en", "url": "https://stackoverflow.com/questions/191614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: C# - Java interoperation Can you give me some pointers on making C# code and Java code interoperate? Let's define the interoperation as something simple: allow (from Java code) the instantiantion and method calling of a class defined in C#, and, possibly, the other way around as well. Is this even possible natively...
{ "language": "en", "url": "https://stackoverflow.com/questions/191622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Determine Oracle null == null I wish to search a database table on a nullable column. Sometimes the value I'm search for is itself NULL. Since Null is equal to nothing, even NULL, saying where MYCOLUMN=SEARCHVALUE will fail. Right now I have to resort to where ((MYCOLUMN=SEARCHVALUE) OR (MYCOLUMN is NULL and SE...
{ "language": "en", "url": "https://stackoverflow.com/questions/191640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Report handler architecture question I am attempting to have a ReportHandler service to handle report creation. Reports can have multiple, differing number of parameters that could be set. In the system currently there are several different methods of creating reports (MS reporting services, html reports, etc) and...
{ "language": "en", "url": "https://stackoverflow.com/questions/191641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it a good idea to use normalised tables with denormalised indexed views? I'm architecting a new app at the moment, with a high read:write ratio. At my current employer we have lots of denormalised data on our tables for performance reasons. Is it better practice to have totally 3NF tables and then use indexed vie...
{ "language": "en", "url": "https://stackoverflow.com/questions/191642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you get output parameters from a stored procedure in Python? I've googled around a bit, but maybe I didn't put the correct magik incantation into the search box. Does anyone know how to get output parameters from a stored procedure in Python? I'm using pymssql to call a stored procedure, and I'm not sure of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Any Generic Utilities or Libraries for Converting Hex Dumps into Human-readable Form? I work a lot with serial communications with a variety of devices, and so I often have to analyze hex dumps in log files. Currently, I do this manually by looking at the dumps, looking at the protocol spec, and writing down the re...
{ "language": "en", "url": "https://stackoverflow.com/questions/191652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Which effects library should I integrate with GWT? I am curious if anyone has done a comparison between the different options out there. So far I am leaning towards using Moo.fx because loading prototype.js just to use scriptaculous seems a bit much. Does that make sense? Are there any other effects libraries worth ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio 2005 Setup project application folder default location on potentially non-existent volume I have a Visual Studio 2005 solution that includes a setup project. The setup project specifies "d:\somefolder" as the Application Folder DefaultLocation property. When installing on a machine without any partiti...
{ "language": "en", "url": "https://stackoverflow.com/questions/191669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How Can I Build wxWidgets With Eclipse On Windows I installed wxWidgets 2.8.9 on a Windows XP SP2 box and built the library according to the directions and now I'm trying to get the Hello World! tutorial app to build from within Eclipse and I'm just missing something apparently. Any idea how to get Cygwin, Eclipse ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strange LINQ Exception (Index out of bounds) I have a table, we'll call Users. This table has a single primary key defined in SQL Server - an autoincrement int ID. Sometimes, my LINQ queries against this table fail with an "Index was outside the range" error - even the most simplest of queries. The query itself does...
{ "language": "en", "url": "https://stackoverflow.com/questions/191690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Should C# have multiple inheritance? I have come across numerous arguments against the inclusion of multiple inheritance in C#, some of which include (philosophical arguments aside): * *Multiple inheritance is too complicated and often ambiguous *It is unnecessary because interfaces provide something similar *C...
{ "language": "en", "url": "https://stackoverflow.com/questions/191691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Code to get *.aspx in a website Is there a method to get all of the .aspx files in my website? Maybe iterate through the site's file structure and add to an array? A: Directory.GetFiles(HttpContext.Current.Server.MapPath(@"/"), "*.aspx", SearchOption.AllDirectories); A: using Directory.GetFiles("*.aspx"), you can...
{ "language": "en", "url": "https://stackoverflow.com/questions/191692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: DataTable + DataGrid Data Binding Performance Againsts Custom Data Source Object + Data Grid In our industrial automation application, we need to capture and display the data in the milliseconds. We have data binding between data grid control and a DataTable object. We have around three hundred records which needs t...
{ "language": "en", "url": "https://stackoverflow.com/questions/191697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Configuring python I am new to python and struggling to find how to control the amount of memory a python process can take? I am running python on a Cento OS machine with more than 2 GB of main memory size. Python is taking up only 128mb of this and I want to allocate it more. I tried to search all over the internet...
{ "language": "en", "url": "https://stackoverflow.com/questions/191700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using regular expressions how do I find a pattern surrounded by two other patterns without including the surrounding strings? I want to use regular expressions (Perl compatible) to be able to find a pattern surrounded by two other patterns, but not include the strings matching the surrounding patterns in the match. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Frustrated trying to read a path from an argument in C# I'm passing /file:c:\myfile.doc and I'm getting back "/file:c:\myfile.doc" instead of "C:\myfile.doc", could someone please advise where I am going wrong? if (entry.ToUpper().IndexOf("FILE") != -1) { //override default lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/191732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP based form validation I'm looking for an easy to use, reasonably complete form validation solution for php. I recall using one years ago that used a few tags on the HMTL side then captured the OB to replace them with some pretty serious code. This feels slightly like overkill me, yet I'm not REALLY wanting to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Give DROP PROCEDURE a parameter I'm using SqlServer for the first time, and in every single one of our create procedure scripts there is a block of code like below to remove the procedure if it already exists: IF EXISTS (SELECT * FROM information_schema.routines WHERE routine_name = 'SomeProced...
{ "language": "en", "url": "https://stackoverflow.com/questions/191740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I access the "displayed" text of a select box option from the DOM? Given the following HTML: <select name="my_dropdown" id="my_dropdown"> <option value="1">displayed text 1</option> </select> How do I grab the string "displayed text 1" using Javascript/the DOM? A: var mySelect = document.forms["my_form"].my...
{ "language": "en", "url": "https://stackoverflow.com/questions/191746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using arrays by reference Why is the following code "crashing" in PHP? $normal_array = array(); $array_of_arrayrefs = array( &$normal_array ); end( $array_of_arrayrefs )["one"] = 1; // choking on this one The expected result is that the final code line appends $normal_array with key one having value 1 but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/191748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to concatenate a std::string and an int I thought this would be really simple, but it's presenting some difficulties. If I have std::string name = "John"; int age = 21; How do I combine them to get a single string "John21"? A: If you have Boost, you can convert the integer to a string using boost::lexical_cast...
{ "language": "en", "url": "https://stackoverflow.com/questions/191757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "765" }
Q: Find which class in which jar has a given serialVersionUID When I get a java.io.InvalidClassException, it gives me the serialVersionUID that it wants, and the serialVersionUID that it got. Is there an easy way to tell which of my dozens of jars using the wrong serialVersionUID? Update: I should mention that our int...
{ "language": "en", "url": "https://stackoverflow.com/questions/191766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Renaming Tables SQL Server, cascading that change through PK and FK's I want to find a sql command or something that can do this where I have a table named tblFoo and I want to name it tblFooBar. However, I want the primary key to also be change, for example, currently it is: CONSTRAINT [PK_tblFoo] PRIMARY KEY CLUST...
{ "language": "en", "url": "https://stackoverflow.com/questions/191787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Two directional list Enumerator in .NET In my c# app, I've got a list that I navigate with an Enumerator. It works great for moving forward through the list, but the Enumerator class doesn't have a MoveBack method. Is there different class that has a MoveBack method, or do I need to write my own? A: Any enumerator...
{ "language": "en", "url": "https://stackoverflow.com/questions/191788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Enum Parameters I am hoping to find a way to do this in vb.net: Say you have function call getPaint(Color). You want the call to be limited to the parameter values of (red,green,yellow). When they enter that parameter, the user is provided the available options, like how a boolean parameter functions. Any ideas? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I make my mouse in a VMWare Server virtual machine work properly? My mouse, in my virtual server virtual machine is all jittery, and not working smoothly. Outside the virtual machine it is fine. My mouse is set to use the VMWare Pointing Device, which it says is working properly. I've tried the sample rate in...
{ "language": "en", "url": "https://stackoverflow.com/questions/191792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Designing for extranet from the beginning? I've been tasked to develop a web application to cover one of our business functions. It needs to have external access from outside our network. At the same time, it needs to be done fairly quickly. I don't have any experience in extranet applications so I'm not exactly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is Windows Vista worth considering when developing for Windows XP? Quite a few comments to answers in a different post, Where are the best locations to write an error log in Windows?, gave me the impression that a lot of things regarding standard folders (%APPDATA%; %TEMP%) in Windows Vista are different from Window...
{ "language": "en", "url": "https://stackoverflow.com/questions/191806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Batch file uploading with a flashplayer dialog I'm currently looking at ways to allow people to select multiple files at once to batch upload images. I'm evaluating these options for my ASP.NET web app: * *YUI Uploader *Flajaxian *SWFUpload *Dojo Toolkit Multi file uploader I'm leaning toward YUI because the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/191808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I create a custom Property for my assembly? How can I create a custom property for my .Net assembly which would then be visible under the Details tab in Windows explorer? Something to sit parallel with "File Description", "Type", "Product Version"... etc Update: To quote my comment to Lars ... "Whilst I woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/191812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can pipes be used across LAN computers? Can pipes be used across LAN computers? In particular I'm looking for Windows, but if you have more info on other platforms, that will also help others who find this thread later. A: Yes they can. Named pipes can be used to provide communication between processes on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CSS floated divs with form elements disappear in Safari 3 on a mac I'm roughing a layout together and doing some browser testing. Never came across this issue before, check out the contact form in the footer of this page http://staging.terrilynn.com/fundraising/ There is a div with a width of 298px floated to the ri...
{ "language": "en", "url": "https://stackoverflow.com/questions/191817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WCF - returning large images - your experience and tips on doing so We are using a WCF service layer to return images from a repository. Some of the images are color, multi-page, nearly all are TIFF format. We experience slowness - one of many issues. 1.) What experiences have you had with returning images via WCF...
{ "language": "en", "url": "https://stackoverflow.com/questions/191819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Web Service throwing exception using Axis2 Java I'm actually developing a Web Service in Java using Axis 2. I designed my service as a POJO (Plain Old Java Object) with public method throwing exceptions : public class MyService { public Object myMethod() throws MyException { [...] } } I then generated...
{ "language": "en", "url": "https://stackoverflow.com/questions/191826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What do I need to re-build my web server? I am getting ready to completely overhaul my web server. I use it for both development and to present product to clients. It also hosts my company website. I will be loading MS Server 2008 and MS SQL 2008. I want it to have the latest .NET Framework as well as the latest MV...
{ "language": "en", "url": "https://stackoverflow.com/questions/191831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get console output in C++ with a Windows program? If I have a native C++ windows program (i.e. the entry point is WinMain) how do I view output from console functions like std::cout? A: If you are sending the output of your program to a file or pipe, e.g. myprogram.exe > file.txt myprogram.exe | anotherpro...
{ "language": "en", "url": "https://stackoverflow.com/questions/191842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: What is the best way to access an array inside Velocity? I have a Java array such as: String[] arr = new String[] {"123","doc","projectReport.doc"}; In my opinion the natural way to access would be: #set($att_id = $arr[0]) #set($att_type = $arr[1]) #set($att_name = $arr[2]) But that it is not working. I have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to store images in your filesystem Currently, I've got images (max. 6MB) stored as BLOB in a InnoDB table. As the size of the data is growing, the nightly backup is growing slower and slower hindering normal performance. So, the binary data needs to go to the file system. (pointers to the files will be kept in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/191845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }