text
stringlengths
8
267k
meta
dict
Q: IMG SRC tags and JavaScript Is it possible to call a JavaScript function from the IMG SRC tag to get an image url? Like this: <IMG SRC="GetImage()" /> <script language="javascript"> function GetImage() {return "imageName/imagePath.jpg"} </script> This is using .NET 2.0. A: Is it possible to call a JavaScript ...
{ "language": "en", "url": "https://stackoverflow.com/questions/116967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: In SQL Server 2005, can I do a cascade delete without setting the property on my tables? I have a database full of customer data. It's so big that it's really cumbersome to operate on, and I'd rather just slim it down to 10% of the customers, which is plenty for development. I have an awful lot of tables and I don...
{ "language": "en", "url": "https://stackoverflow.com/questions/116968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Can anyone recommend a simple Java web-app framework? I'm trying to get started on what I'm hoping will be a relatively quick web application in Java, yet most of the frameworks I've tried (Apache Wicket, Liftweb) require so much set-up, configuration, and trying to wrap my head around Maven while getting the whole ...
{ "language": "en", "url": "https://stackoverflow.com/questions/116978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Do C# Generics Have a Performance Benefit? I have a number of data classes representing various entities. Which is better: writing a generic class (say, to print or output XML) using generics and interfaces, or writing a separate class to deal with each data class? Is there a performance benefit or any other benefi...
{ "language": "en", "url": "https://stackoverflow.com/questions/116988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Is there an equivalent to the XNA framework for consoles other than XBox360? It's gotta be free. It's hobby, after all, not a business!. Creating for-profit software isn't an issue, but anything that requires a hardware mod is out. A: Nope, I don't think so. The only other .NET environment for consoles I know cos...
{ "language": "en", "url": "https://stackoverflow.com/questions/116992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Prevent people from pushing a git commit with a different author name? In git, it is up to each user to specify the correct author in their local git config file. When they push to a centralized bare repository, the commit messages on the repository will have the author names that they used when committing to their...
{ "language": "en", "url": "https://stackoverflow.com/questions/117006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How best to test the validity of XML from a method? I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against. I'd like to create som...
{ "language": "en", "url": "https://stackoverflow.com/questions/117007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to Retrieve name of current Windows User (AD or local) using Python? How can I retrieve the name of the currently logged in user, using a python script? The function should work regardless of whether it is a domain/ad user or a local user. A: as in https://stackoverflow.com/a/842096/611007 by Konstantin Tenzin ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do I get Firefox to launch Visio when I click on a linked .vsd file? On our intranet site, we have various MS Office documents linked. When I click on a Word, Excel or PowerPoint file, Firefox gives me the option to Open, Save or Cancel. When I click on Open, the appropriate app is launched and the file is loade...
{ "language": "en", "url": "https://stackoverflow.com/questions/117041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best way for a Java program to monitor system health? I would like to be able to monitor my major system health indicators from inside our Java-based system. Major points of interest include CPU temperature, motherboard temperature, fan speed, etc. Is there a package available that: * *Makes this s...
{ "language": "en", "url": "https://stackoverflow.com/questions/117043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Licensing and using the Linux kernel I would like to write my own OS, and would like to temporarily jump over the complicated task of writing the kernel and come back to it later by using the Linux kernel in the mean time. However, I would like to provide the OS as closed source for now. What license is the Linux ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ASP.NET Master Page in separate assembly I have some ASP.NET Master Pages located in one assembly. I need to use these Master Pages with my WebForm pages located in other assemblies that have a reference to the first assembly. I cannot seem to figure out a way to do this. Is there a nice way that I can do this? If n...
{ "language": "en", "url": "https://stackoverflow.com/questions/117059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Error Message Text - Best Practices We are changing some of the text for our old, badly written error messages. What are some resources for best practices on writing good error messages (specifically for Windows XP/Vista). A: In terms of wording your error messages, I recommend referring to the following style gui...
{ "language": "en", "url": "https://stackoverflow.com/questions/117083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What is the Best Way to Dynamically Create an MSMQ Listener? I was using Spring.NET to create a message listener at application startup. I now need the ability to create 0-n listeners, some of which could be listening to different queues. I will need to be able to create/destroy them at run-time. What would be th...
{ "language": "en", "url": "https://stackoverflow.com/questions/117094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best way to generate and print invoices in a .NET application? I'm working on a billing system for a utility company, and we have the following requirements: * *Batch-generate and print approximately 1,500 bills per day that we then mail to customers *Save the bill in a format that can emailed to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/117101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to improve performance writing to the database? We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table (not on the primary key) but there are about 350,000 rows...
{ "language": "en", "url": "https://stackoverflow.com/questions/117108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When have we any practical use for hierarchical namespaces in c++? I can understand the use for one level of namespaces. But 3 levels of namespaces. Looks insane. Is there any practical use for that? Or is it just a misconception? A: Hierarchical namespaces do have a use in that they allow progressively more refine...
{ "language": "en", "url": "https://stackoverflow.com/questions/117110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the scope for imported classes in python? Please excuse the vague title. If anyone has a suggestion, please let me know! Also please retag with more appropriate tags! The Problem I want to have an instance of an imported class be able to view things in the scope (globals, locals) of the importer. Since I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/117127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MS SSRS Report Builder: Semantic query execution failed.? I have created an end user model and deployed it. Any report that I create and run gives me an error: Report execution error The report might not be valid or the server could not process the data. Semantic query execution failed. Invalid column name 'rowguid...
{ "language": "en", "url": "https://stackoverflow.com/questions/117128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are best practices to implement security when using NHibernate? Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) framework such as NHibernate. To counter that argument what are some approaches that can be used with NHibernate to ensure that p...
{ "language": "en", "url": "https://stackoverflow.com/questions/117129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Avoid Deletions of Files using TortoiseSVN I am setting up Apache server with TortoiseSVN for a local source code repository. I have observed that if someone deletes a file using TortoiseSVN it will get deleted from everyone's view and the only log will be their in log history. I feel it is dangerous that any user ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Resources that have to be manually cleaned up in C#? What resources have to be manually cleaned up in C# and what are the consequences of not doing so? For example, say I have the following code: myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); // Use Brush If I don't clean up the brush using th...
{ "language": "en", "url": "https://stackoverflow.com/questions/117135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Ruby and WS-Security I'm having troubles finding good Ruby libraries that implement WS-Security. I've seen wss4r but have yet to use it (and the documentation is a bit light on it). What libraries do you use for this task, or is there a better alternative? A: I don't work with soap much myself, but this ruby extens...
{ "language": "en", "url": "https://stackoverflow.com/questions/117141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I (re)map Ex commands in vim? I love vim and the speed it gives me. But sometimes, my fingers are too speedy and I find myself typing :WQ instead of :wq. (On a German keyboard, you have to press Shift to get the colon :.) Vim will then complain that WQ is Not an editor command. Is there some way to make W and Q ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Python and POST data In PHP I simply write: $bob = $_POST['bob']; How do I do the same in Python? And yes, I do normally check that it exists etc, I'm just stripping it down specifically to the functionality I am after. Edit: I am not using a framework A: The simplest method is the 'cgi' module: import cgi data =...
{ "language": "en", "url": "https://stackoverflow.com/questions/117167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Design by contract using assertions or exceptions? When programming by contract a function or method first checks whether its preconditions are fulfilled, before starting to work on its responsibilities, right? The two most prominent ways to do these checks are by assert and by exception. * *assert fails only in...
{ "language": "en", "url": "https://stackoverflow.com/questions/117171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "130" }
Q: Try-catch every line of code without individual try-catch blocks I do not currently have this issue, but you never know, and thought experiments are always fun. Ignoring the obvious problems that you would have to have with your architecture to even be attempting this, let's assume that you had some horribly-written...
{ "language": "en", "url": "https://stackoverflow.com/questions/117173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Seam/JSF form submit firing button onclick event I have a search form with a query builder. The builder is activated by a button. Something like this <h:form id="search_form"> <h:outputLabel for="expression" value="Expression"/> <h:inputText id="expression" required="true" value="#{searcher.expression}"/> <but...
{ "language": "en", "url": "https://stackoverflow.com/questions/117189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to update a Tix.ComboBox's text? I have a Tix.ComboBox with an editable text field. How do I force the variable holding the value for the text to update? Let me give a more concrete explanation. I have a combo box and a button. When I click the button, it pops up a message box with the value of the combo box. Le...
{ "language": "en", "url": "https://stackoverflow.com/questions/117211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to check if a php script is still running I have a PHP script that listens on a queue. Theoretically, it's never supposed to die. Is there something to check if it's still running? Something like Ruby's God ( http://god.rubyforge.org/ ) for PHP? God is language agnostic but it would be nice to have a solution th...
{ "language": "en", "url": "https://stackoverflow.com/questions/117226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is it possible to delete subdomain cookies? If there is a cookie set for a subdomain, metric.foo.com, is there a way for me to delete the metric.foo.com cookie on a request to www.foo.com? The browser (at least Firefox) seems to ignore a Set-Cookie with a domain of metric.foo.com. A: I had the same problem with sub...
{ "language": "en", "url": "https://stackoverflow.com/questions/117240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What's the best way to use SVN to version control a PHP site? I've always just FTPed files down from sites, edited them and put them back up when creating sites, but feel it's worth learning to do things properly. I've just commited everything to a SVN repo, and have tried sshing into the server and checking out a t...
{ "language": "en", "url": "https://stackoverflow.com/questions/117245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Manually inserting data in a table(s) with primary key populated with sequence I have a number of tables that use the trigger/sequence column to simulate auto_increment on their primary keys which has worked great for some time. In order to speed the time necessary to perform regression testing against software that...
{ "language": "en", "url": "https://stackoverflow.com/questions/117248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get a decimal value when using the division operator in Python? For example, the standard division symbol '/' rounds to zero: >>> 4 / 100 0 However, I want it to return 0.04. What do I use? A: Make one or both of the terms a floating point number, like so: 4.0/100.0 Alternatively, turn on the feature tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/117250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: What is PostgreSQL explain telling me exactly? MySQL's explain output is pretty straightforward. PostgreSQL's is a little more complicated. I haven't been able to find a good resource that explains it either. Can you describe what exactly explain is saying or at least point me in the direction of a good resource? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/117262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "138" }
Q: Use of 'const' for function parameters How far do you go with const? Do you just make functions const when necessary or do you go the whole hog and use it everywhere? For example, imagine a simple mutator that takes a single boolean parameter: void SetValue(const bool b) { my_val_ = b; } Is that const actually us...
{ "language": "en", "url": "https://stackoverflow.com/questions/117293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "515" }
Q: How does including a SQL index hint affect query performance? Say I have a table in a SQL 2005 database with 2,000,000+ records and a few indexes. What advantage is there to using index hints in my queries? Are there ever disadvantages to using index hints in queries? A: First, try using SQL Profiler to generate ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: sharepoint 2007 - custom content type - filtered lookup column I had defined a custom content type, and I am trying to define a filtered lookup column. I can select the list from where to pick up the column I need, but I can't find any example of the needed format of query string. I can filter the list manually by a...
{ "language": "en", "url": "https://stackoverflow.com/questions/117303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Specman macro to do set subtraction with int_range_list objects I work with a bunch of sets in order to generate constrained random traffic, but I want to be able to call a Specman macro that computes the complement of a set with syntax like: COMPLEMENT begin domain=[0..10,24..30], complementing_set=[2..3,27....
{ "language": "en", "url": "https://stackoverflow.com/questions/117312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Finding common blocks I have two files (f1 and f2) containing some text (or binary data). How can I quickly find common blocks? e.g. f1: ABC DEF f2: XXABC XEF output: common blocks: length 4: "ABC " in f1@0 and f2@2 length 2: "EF" in f1@5 and f2@8 A: This is a great tool for such purposes.: http://sourceforge.net/p...
{ "language": "en", "url": "https://stackoverflow.com/questions/117317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ASP.NET and Timers Consider this code... using System.Threading; //... Timer someWork = new Timer( delegate(object state) { //Do some work here... }, null, 0, 60000); HttpContext.Current.Application["SomeWorkItem"] = someWork; Could this be dangerous? Caching a timer in the Application to perfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/117318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I unshelve to a different branch in tfs 2008? Let's assume that some developer in my team shelved his changes that he did in branch A. And I am working on branch B. Can I unshelve his changes into branch B? (By GUI or command prompt) A: Alternative solution to tfpt that avoids having to merge each file manua...
{ "language": "en", "url": "https://stackoverflow.com/questions/117337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: C++ timing, milliseconds since last whole second I'm working on a C++ application that needs detailed timing information, down to the millisecond level. We intend to gather the time to second accuracy using the standard time() function in <ctime>. We would like to additionally gather the milliseconds elapsed sinc...
{ "language": "en", "url": "https://stackoverflow.com/questions/117346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What's the difference between SQL Server Management Studio and the Express edition? I'm using Express currently. What extra features do I get with the full edition? A: Assuming you are talking about differences in the client tools and not the database engine, the only differences that I have found so far are the la...
{ "language": "en", "url": "https://stackoverflow.com/questions/117347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Can you force the serialization of an enum value into an integer? Possible Duplicate: How do I serialize an enum value as an int? Hi, all! I'm wondering if there's a way to force the serialization of an enum value into its integer value, instead of its string representation. To put you into context: We're using, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Optimize y = x*x in Galois field arithmetic I have this C-code to do multiplications over GF(8): int32_t GaloisMultiply (int32_t a, int32_t b) { int32_t i; int32_t mask = 0x100; int32_t y = 0; for(i=0;i<8;i++) { if(b & mask) { y ^= a; } mask >>= 1; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is a solid, elegant, reusable piece of code for determining if an IEnumerable is empty, in .NET? I'm trying to find the most reusable, yet elegant, piece of code possible for determining if an IEnumerable. In the ideal, this should be a function I can call absolutely any time I need to tell if an IEnumerable i...
{ "language": "en", "url": "https://stackoverflow.com/questions/117355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to correctly add a to a page with jquery and let the change event work? I've currently got multiple select's on a page that are added dynamically with ajax calls using jquery. The problem I've had is I could not get the change event to work on the added select unless I use the onchange inside the tag e.g. <sel...
{ "language": "en", "url": "https://stackoverflow.com/questions/117356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I bind an event handler to an instance in jQuery? I am trying to bind an event to a "method" of a particular instance of a Javascript "class" using jQuery. The requirement is that I in the event handler should be able to use the "this" keyword to refer to the instance I originally bound the event to. In more...
{ "language": "en", "url": "https://stackoverflow.com/questions/117361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't download file in IE7 but there isn't any issue in Firefox, Chrome, etc..? I have an script that receives an encrypted url and from that generates a download, the most critic par of the script is this: $MimeType = new MimeType(); $mimetype = $MimeType->getType($filename); $basename = basename($filename); header...
{ "language": "en", "url": "https://stackoverflow.com/questions/117372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Grafting a Git history onto an SVN branch The situation I have a Git repo and an SVN repo that both hold the same source code but different commit histories. The Git repo has a lot of small well commented submits... while the SVN repo has a few huge commits with comments like "Lots of stuff". Both series of commits ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ADSI will not connect to IIS from XP Workstation I'm successfully using VBScript within WScript to remotely read and write IIS configurations from the server. When I attempt to run these same scripts from my desk box they fail, though. Example: Dim vdir Set vdir = GetObject("IIS://servername/w3svc/226/root") Error ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I checkout files under Perforce from within Emacs? I use Perforce for source control at work and I want to 'open for edit' files that under source control from within Emacs. How can that be done? What do I need to setup in Emacs? Is there a plug in? I also want to perform other p4 operations such as submitti...
{ "language": "en", "url": "https://stackoverflow.com/questions/117394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it possible to embed Cockburn style textual UML Use Case content in the code base to improve code readability? experimenting with Cockburn use cases in code I was writing some complicated UI code. I decided to employ Cockburn use cases with fish,kite,and sea levels (discussed by Martin Fowler in his book 'UML D...
{ "language": "en", "url": "https://stackoverflow.com/questions/117401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Which configuration method do you prefer in .net? Why? * *You can use App.config; but it only supports key/value pairs. *You can use .Net configuration, configuration sections; but it can be really complex. *You can use Xml Serialization/Deserialization by yourself; your classes-your way. *You can use some othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/117407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do I branch an individual file in SVN? The subversion concept of branching appears to be focused on creating an [un]stable fork of the entire repository on which to do development. Is there a mechanism for creating branches of individual files? For a use case, think of a common header (*.h) file that has multipl...
{ "language": "en", "url": "https://stackoverflow.com/questions/117415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I resolve the drifting clock for my Virtual Machine? My Virtual Machine's clock drifts pretty significantly. There's documentation out there about dealing with this, but nothing seems to be working very well. Anyone have any suggestions, things that worked well for them, ... Supposedly updating regularly vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/117422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Adding version control to an existing project I am working on a project that has grown to a decent size, and I am the only developer. We currently don't use any version control, but I definitely need to start. I want to use Subversion. What would be the best way to transfer an existing project to it? I have a test ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Handling large numbers in C++? What is the best way to handle large numeric inputs in C++ (for example 10^100)? For algorithms I usually switch over to ruby and I sometimes use strings. Any other good methods? A: If you wish to make your own code for the purpose try using strings to store big numbers... you can th...
{ "language": "en", "url": "https://stackoverflow.com/questions/117429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Getting started using Linq, what do I need? Basically what the title says. (Forgive me because I am a .NET newb) In my department, we have a server running .net 3.5 and ever since I got into this section I have been using LINQ. However, I am starting a personal project on a different server (obviously), so 2 questi...
{ "language": "en", "url": "https://stackoverflow.com/questions/117438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Can I use Terracotta to scale a RAM-intensive application? I'm evaluating Terracotta to help me scale up an application which is currently RAM-bounded. It is a collaborative filter and stores about 2 kilobytes of data per-user. I want to use Amazon's EC2, which means I'm limited to 14GB of RAM, which gives me an eff...
{ "language": "en", "url": "https://stackoverflow.com/questions/117455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Can I prevent a integer overflow in C# using an unsigned right shift? I want alwaysPositive to be assigned a positive number with all possible values for lareValue1 and largeValue2 (these are at least 1). The following statement causes a buffer overflow: int alwaysPositive = (largeValue1 + largeValue2) / 2; I know ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you turn a dynamic site into a static site that can be demo'd from a CD? I need to find a way to crawl one of our company's web applications and create a static site from it that can be burned to a cd and used by traveling sales people to demo the web site. The back end data store is spread across many, many ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: BAML Decompiler / Viewer Could anyone recommend a good BAML Decompiler / Viewer besides BAML Viewer plugin for Reflector, which doesn't handle path geometry/data? A: You can try this one by Cristian Ricciolo Civera. I did not want to use its ClickOnce installer, but the CodePlex site provides a zip file for downloa...
{ "language": "en", "url": "https://stackoverflow.com/questions/117469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Filtering out duplicate values at runtime in a sql database - set based I have a database issue that i currently cannot wrap my head around with an easy solution. In my db I have a table that stores event values.. 0's and 1's with a timestamp. Issue being that it is possible for there to be the same event to occur t...
{ "language": "en", "url": "https://stackoverflow.com/questions/117471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to sniff a USB port under Windows? From time to time, I need to dump USB traffic under Windows, mostly to support hardware under Linux, so my primary goal is to produce dump files for protocol analysis. For USB traffic, it seems that SniffUsb is the clear winner... It works under Windows XP (but not later) and h...
{ "language": "en", "url": "https://stackoverflow.com/questions/117474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: What's the Name of the Python Module that Formats arbitrary Text to nicely looking HTML? A while ago I came across a Python library that formats regular text to HTML similar to Markdown, reStructuredText and Textile, just that it had no syntax at all. It detected indentatations, quotes, links and newlines/paragraph...
{ "language": "en", "url": "https://stackoverflow.com/questions/117477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I update Perl on Windows without losing modules? At work I'm using Perl 5.8.0 on Windows. When I first put Perl on, I went to CPAN, downloaded all the sources, made a few changes (in the .MAK file(?) to support threads, or things like that), and did nmake / nmake test / nmake install. Then, bit by bit, I've ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: SVN Versioning: How to have for each project its own revision scheme? Just a small SVN "problem" here. I setup my own SVN server Setting up Subversion on Windows Now I made a rep in which all my projects will go. Now, I checked the rep out in a folder called "Projects". Now If I make a project and check it in, that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I best create a SharePoint list view that shows only root folder contents? I have a custom SharePoint list definition that is based on the Document content type. My library instance that I create from this contains many HTML documents, and each of those documents has some images saved into a subfolder insid...
{ "language": "en", "url": "https://stackoverflow.com/questions/117487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does anyone have a good article or good advice for class naming for n-tier web applications? I'm used to the layout that LLBLGen gives when it generates objects based on a database structure, which might generate the following class files for a given "User" table in the database: /EntityClasses/UserEntity.vb /Collec...
{ "language": "en", "url": "https://stackoverflow.com/questions/117492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why am I losing data when using a vxWorks pipe? I am using pipes to transfer information between two vxWorks tasks. Here is a code sample: Init() { fd = open("/pipe/mydev", O_RDWR, 0777); ... } taskRx() { ... len = read(fd, rxbuf, MAX_RX_LEN); ... } taskTx() { ... len = write(fd, txbuf, txLen); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Good alternative to GenuineChannels for .net remoting We have been using GenuineChannels in our product for the last 4 years. GenuineChannels now appears to have become unsupported and the main developer guy Dmitri has I think joined Microsoft. I have the source as part of the product but not the networking / .net k...
{ "language": "en", "url": "https://stackoverflow.com/questions/117505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Create custom code snippet in Visual Studio 2008 Like the title says, how do you create custom code snippets in Visual Studio 2008? A: The MSDN links are nice, but sometimes I prefer simple tutorials. A: Tools->Code Snippets Manager To get your list of directories. Select (or Add) My Code Snippets. The snippets th...
{ "language": "en", "url": "https://stackoverflow.com/questions/117508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Joining other tables in oracle tree queries Given a simple (id, description) table t1, such as id description -- ----------- 1 Alice 2 Bob 3 Carol 4 David 5 Erica 6 Fred And a parent-child relationship table t2, such as parent child ------ ----- 1 2 1 3 4 5 5 6 Oracle offers...
{ "language": "en", "url": "https://stackoverflow.com/questions/117512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I use timezones with a datetime object in python? How do I properly represent a different timezone in my timezone? The below example only works because I know that EDT is one hour ahead of me, so I can uncomment the subtraction of myTimeZone() import datetime, re from datetime import tzinfo class myTimeZone(...
{ "language": "en", "url": "https://stackoverflow.com/questions/117514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: How do I clear the cache of Ruby Phusion Passenger in Ubuntu? I've tried restarting apache and the cached pages still appear, so there must be a folder someplace. I don't have a 'public/cache', so what other places should I look? Is there a URL flag that could trigger this effect as well? A: You need to touch a fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/117536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Scriptaculous Droppables onDrop callback, How to reference each element? Documentation can be found here It says in the example: onDrop: Called whenever a Draggable is released over the Droppable and the Droppable is accepts it. The callback gets three parameters: the Draggable element, the Droppable element and the...
{ "language": "en", "url": "https://stackoverflow.com/questions/117547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: javascript: cancel all kinds of requests My website makes a lot of requests. I often need to cancel all current requests, so that the browser is not blocking relevant new requests. I have 3 kinds of requests: * *Ajax *inserted script-tags (which do JSONP-Communication) *inserted image-tags (which cause the brow...
{ "language": "en", "url": "https://stackoverflow.com/questions/117551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Inner join across multiple access db's I am re-designing an application for a ASP.NET CMS that I really don't like. I have made som improvements in performance only to discover that not only does this CMS use MS SQL but some users "simply" use MS Access database. The problem is that I have some tables which I inner ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best approach for sortable table with a lot of data On our web application, the search results are displayed in sortable tables. The user can click on any column and sort the result. The problem is some times, the user does a broad search and gets a lot of data returned. To make the sortable part work, you probab...
{ "language": "en", "url": "https://stackoverflow.com/questions/117570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to authenticate in a Facebook Flash application? I do not understand how I can authenticate a user in a Facebook Flash application. I have read from the documentation that Facebook platform gives arguments, such as user id and session secret, to the Flash application, but how can I inside the Flash application m...
{ "language": "en", "url": "https://stackoverflow.com/questions/117579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IIS CSS Caching When we are developing new sites or testing changes in new ones that involve css after the new code is committed and someone goes to check the changes they always see a cached version of the old css. This is causing a lot of problems in testing because people never are sure if they have the latest cs...
{ "language": "en", "url": "https://stackoverflow.com/questions/117589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What can Services do under Windows? Does anyone have a good guide to capabilities of Windows Services under XP? In particular, I am trying to find out what happens when a program being run as a service tries to open windows, but hasn't been given permission to interact with the desktop. Basically, I have a program t...
{ "language": "en", "url": "https://stackoverflow.com/questions/117590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can Mercurial be integrated into Visual Studio 2008? Is there a tool to integrate Mercurial into Visual Studio? I am just curious. Mercurial is pretty nice, even with 'just' TortoiseHG, but integration with Visual Studio would be better. A: VisualHG Way to go, me. (Found the answer myself afterwards. Oh well, som...
{ "language": "en", "url": "https://stackoverflow.com/questions/117598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Delegates as parameters in VB.NET Backstory: I'm using log4net to handle all logging for a project I'm working on. One particular method can be called under several different circumstances -- some that warrant the log messages to be errors and others that warrant the log messages to be warnings. So, as an example, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Install tool to create virtual directory on IIS What install tool can I use to create Virtual Directory on IIS? OpenSource, free or to do in C#. A: WiX can create IIS virtual directories. A: You can create IIS virtual directorys using NAnt and the MKIISdir task in the NAntContrib project A: You can use the VS.NE...
{ "language": "en", "url": "https://stackoverflow.com/questions/117632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to remove duplicate elements from an xml file? I have an XML file like <ns0:Employees xmlns:ns0="http://TestIndexMap.Employees"> <Employee FirstName="FirstName_0" LastName="LastName_1" dept="dept_2" empNumber="1"> <Schedules> <Schedule Date_join="2008-01-20" Date_end="2008-01-30" /> </Schedules> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I create my custom Shell Context Handlers for Windows? Problem Language: C# 2.0 or later I would like to register context handlers to create menues when the user right clicks certain files (in my case *.eic). What is the procedure to register, unregister (clean up) and handle events (clicks) from these menu...
{ "language": "en", "url": "https://stackoverflow.com/questions/117651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: jquery: fastest DOM insertion? I got this bad feeling about how I insert larger amounts of HTML. Lets assume we got: var html="<table>..<a-lot-of-other-tags />..</table>" and I want to put this into $("#mydiv") previously I did something like var html_obj = $(html); $("#mydiv").append(html_obj); Is it correct that j...
{ "language": "en", "url": "https://stackoverflow.com/questions/117665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Hyperlinking an image using CSS I know this is probably the dumbest question ever, however I am a total beginner when it comes to CSS; how do you hyperlink an image on a webpage using an image which is sourced from CSS? I am trying to set the title image on my website linkable to the frontpage. Thanks! Edit: Just to...
{ "language": "en", "url": "https://stackoverflow.com/questions/117667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Wait until any of Future is done I have few asynchronous tasks running and I need to wait until at least one of them is finished (in the future probably I'll need to wait util M out of N tasks are finished). Currently they are presented as Future, so I need something like /** * Blocks current thread until one of sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/117690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: How would you display an array of integers as a set of ranges? (algorithm) Given an array of integers, what is the simplest way to iterate over it and figure out all the ranges it covers? for example, for an array such as: $numbers = array(1,3,4,5,6,8,11,12,14,15,16); The ranges would be: 1,3-6,8,11-12,14-16 A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to initialize Pango under Win32? Having downloaded Pango and GLib from the GTK+ Project's Win32 downloads page and having created and configured a Win32 project under Visual Studio 2005 so it points to the proper lib and include directories, how do you initialize Pango for rendering to a Win32 window? Should the...
{ "language": "en", "url": "https://stackoverflow.com/questions/117693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Any way to use Help.ShowHelp in Windows CE Core license build? I am developing a Compact Framework 3.5 application for Windows CE 6.0. Help.ShowHelp() throws a NotSupportedException. At windowsembedded.com I found this statement: "Help is not included in the Core run-time because it requires a browser." Is this th...
{ "language": "en", "url": "https://stackoverflow.com/questions/117698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: nonvirtual interface idiom for more than two levels of inheritance? The non-virtual interface idiom describes how the virtual methods are nonpublic customisation points, and public methods are nonvirtual to allow the base class to control at all times how the customisation points are called. This is an elegant idio...
{ "language": "en", "url": "https://stackoverflow.com/questions/117708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can you do LINQ-like queries in a language like Python or Boo? Take this simple C# LINQ query, and imagine that db.Numbers is an SQL table with one column Number: var result = from n in db.Numbers where n.Number < 5 select n.Number; This will run very efficiently in C#, because it generates an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Spring JTA TransactionManager config: Supporting both Tomcat and JBoss I have a web application using JPA and JTA with Spring. I would like to support both JBoss and Tomcat. When running on JBoss, I'd like to use JBoss' own TransactionManager, and when running on Tomcat, I'd like to use JOTM. I have both scenarios w...
{ "language": "en", "url": "https://stackoverflow.com/questions/117751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Can you recommend a Windows based Network emulator? I'm looking for a Windows network emulator that can emulate the packet-loss & latency characteristics of a 3G wireless network. I used to use a tool from GIPs that has been end-of-life'd. I've also tried Shunra Virtual Enterprise but found it a bit too basic A: d...
{ "language": "en", "url": "https://stackoverflow.com/questions/117754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Getting a char* from a _variant_t in optimal time Here's the code I want to speed up. It's getting a value from an ADO recordset and converting it to a char*. But this is slow. Can I skip the creation of the _bstr_t? _variant_t var = pRs->Fields->GetItem(i)->GetValue(); if (V_...
{ "language": "en", "url": "https://stackoverflow.com/questions/117755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }