text
stringlengths
8
267k
meta
dict
Q: mmc could not create the snap in error when launching internet information services I am getting this error when trying to run internet information services on a Virtual Machine running windows XP. Anyone have any idea? A: I was able to get the solution from somewhere else and here it is: regsvr32 %windir%\system32...
{ "language": "en", "url": "https://stackoverflow.com/questions/75428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I prevent URLDownloadToFile from retrieving from the cache? I am using URLDownloadToFile to retrieve a file from a website. Subsequent calls return the original file rather than an updated version. I assume it is retrieving a cached version. A: Yes, it is pulling a cached version of the file by default. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/75432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I get the string with name of a class? What method do I call to get the name of a class? A: In [1]: class Test: ...: pass ...: In [2]: Test.__name__ Out[2]: 'Test' A: It's not a method, it's a field. The field is called __name__. class.__name__ will give the name of the class as a string. ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/75440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Nant and changing file properties (read-only to writable) As part of the Nant copy task, I would like to change the properties of the files in the target location. For instance make the files "read-write" from "read-only". How would I do this? A: Also, for a list of files, the command is: <attrib readonly="false"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Value vs Entity objects (Domain Driven Design) I have just started reading DDD. I am unable to completely grasp the concept of Entity vs Value objects.. Can someone please explain the problems (maintainability, performance.. etc) a system could face when a Value object is designed as a Entity object? Example would b...
{ "language": "en", "url": "https://stackoverflow.com/questions/75446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "121" }
Q: Hierarchical Group Permissions Theory/Resources? Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some res...
{ "language": "en", "url": "https://stackoverflow.com/questions/75463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Eclipse RCP app fails to start I have an Eclipse RCP app running on Java 6. When I try to run the product configuration from within Eclipse, it silently terminates almost immediately. No error is reported in the console. I've tried setting breakpoints in the IApplication and in the Activator, and neither are reac...
{ "language": "en", "url": "https://stackoverflow.com/questions/75479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I pre-compress files with mod_deflate in Apache 2.x? I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/75482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: What are the major new 'core' features of MS SQL Server 2008? I'm looking mainly at things like new SQL syntax, new kinds of locking, new capabilities etc. Not so much in the surrounding services like data warehousing and reports... A: There's a great article on the new T-SQL features here (by SQL guru Itzik Ben-Ga...
{ "language": "en", "url": "https://stackoverflow.com/questions/75487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Formatting a long timestamp into a Date with JSTL I am pulling a long timestamp from a database, but want to present it as a Date using Tags only, no embedded java in the JSP. I've created my own tag to do this because I was unable to get the parseDate and formatDate tags to work, but that's not to say they don't wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/75489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: WPF UserControl Design Time Size When creating a UserControl in WPF, I find it convenient to give it some arbitrary Height and Width values so that I can view my changes in the Visual Studio designer. When I run the control, however, I want the Height and Width to be undefined, so that the control will expand to fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/75495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Best way to convert pdf files to tiff files I have around 1000 pdf filesand I need to convert them to 300 dpi tiff files. What is the best way to do this? If there is an SDK or something or a tool that can be scripted that would be ideal. A: 1) Install GhostScript 2) Install ImageMagick 3) Create "Convert-to-TIFF....
{ "language": "en", "url": "https://stackoverflow.com/questions/75500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: Trying to convert bunch of jpegs into a movie I have 28,000 images I need to convert into a movie. I tried mencoder mf://*.jpg -mf w=640:h=480:fps=30:type=jpg -ovc lavc -lavcopts vcodec=msmpeg4v2 -nosound -o ../output-msmpeg4v2.avi But it seems to crap out at 7500 frames. The files are named webcam_2007-04-16_0708...
{ "language": "en", "url": "https://stackoverflow.com/questions/75508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are the key components of web accessibility? I understand that some countries have laws regarding website accessibility. In general, what are the minimum requirements that a website must meet to be accessible, regardless of country? Or, in lieu of minimum requirements, what are some specific things that website...
{ "language": "en", "url": "https://stackoverflow.com/questions/75526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Better terminal in Mac OS X -- reversing the control and command key-mappings I'm trying to have the same KDE Konsole experience within Mac OS X. Here's my (overly complicated?) setup: * *I have Control and Command swapped at the System Preferences level. (Can't live without this) *Parallels lets you, at the Pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/75533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Hidden Features of C++? No C++ love when it comes to the "hidden features of" line of questions? Figured I would throw it out there. What are some of the hidden features of C++? A: I found this blog to be an amazing resource about the arcanes of C++ : C++ Truths. A: A dangerous secret is Fred* f = new(ram) Fred(...
{ "language": "en", "url": "https://stackoverflow.com/questions/75538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "114" }
Q: Initializing user.config or app.exe.config during install I am developing a .NET WinForms application which relies on user.config to store various useful settings such as intranet web service URLs. We would like to make it possible to import custom initial settings as part of the installation. The use case for thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/75546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Databinding ApplicationSettings to Custom Components I have a custom component where I have implemented INotifyPropertyChanged and IBindableComponent. However, when I try to databind a property, the designer adds this line: this.component11.TestString = global::WindowsFormsApplication2.Properties.Settings.Default.Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/75577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Serializing SQL CE data to XML I'm working on a product feature that will allow the user to export data from a SQL CE database on one copy of my application and re-import it into SQL CE on the other end. This data is not whole tables, but the result of queries. I had hoped to take advantage of .net's built-in XML-ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/75608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Lock pages in memory without being Administrator on Windows Vista and 2008 Server The following question answers how to get large memory pages on Windows : "how do i run my app with large pages in windows". The problem I'm trying to solve is how do I configure it on Vista and 2008 Server. Normally you just all...
{ "language": "en", "url": "https://stackoverflow.com/questions/75614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use form values from an unbound form I have a web report that uses a Django form (new forms) for fields that control the query used to generate the report (start date, end date, ...). The issue I'm having is that the page should work using the form's initial values (unbound), but I can't access the cleaned_da...
{ "language": "en", "url": "https://stackoverflow.com/questions/75621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I pass an object to a JSP tag? I have a JSP page that contains a scriplet where I instantiate an object. I would like to pass that object to the JSP tag without using any cache. For example I would like to accomplish this: <%@ taglib prefix="wf" uri="JspCustomTag" %> <% Object myObject = new Object();...
{ "language": "en", "url": "https://stackoverflow.com/questions/75626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Best way to do Visual Studio post build deployment in a team environment? I'm working in a team environment where each developer works from their local desktop and deploys to a virtual machine that they own on the network. What I'm trying to do is set up the Visual Studio solution so that when they build the soluti...
{ "language": "en", "url": "https://stackoverflow.com/questions/75650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a Firefox add-on to use vim to edit textboxes? or "How do I answer questions on SO in Firefox using gVim inside the textboxes?" A: Tridactyl is probably what you're looking for nowadays. It's the spiritual successor to the likes of Pentadactyl and Vimperator, which are not available for the current version...
{ "language": "en", "url": "https://stackoverflow.com/questions/75652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: How do I dump the data of some SQLite3 tables? How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? The dump should be in SQL format, as it should be easily re-entered into the database later and should be done from the command line. Something like sql...
{ "language": "en", "url": "https://stackoverflow.com/questions/75675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: Converting a Uniform Distribution to a Normal Distribution How can I convert a uniform distribution (as most random number generators produce, e.g. between 0.0 and 1.0) into a normal distribution? What if I want a mean and standard deviation of my choosing? A: Where R1, R2 are random uniform numbers: NORMAL DISTRIB...
{ "language": "en", "url": "https://stackoverflow.com/questions/75677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "127" }
Q: how do i take picture from a digital camera attached to my computer throught USB cable using vb.net or asp.net or C#? I am writing picture editing windows forms application using vb.net/c#. i have a client requirement to capture the photo from digital still camera attached to computer. how can i capture a photo fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/75691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is it possible to offline a disk in a raidz zfs pool? When i try to offline a disk in a zfs raidz pool (the raidz pool is not mirrored), zfs says that the disk cannot be taken offline because it has no valid mirror. Isn't one of the properties of raidz that it has a redundant disk (or even 2 disks in raidz2)...? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/75693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PostgreSQL 8.3 privileges not updated - wrong usage? I'm having trouble granting privileges to another user in PostgreSQL 8.3. While the GRANT command gives me no error, the privileges do not show up. Do I need to "flush" them? sirprize=# CREATE DATABASE testdb; CREATE DATABASE sirprize=# GRANT ALL PRIVILEGES ON DAT...
{ "language": "en", "url": "https://stackoverflow.com/questions/75696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: JPA Multiple Transaction Managers I have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. I want to use annotation based transactions (@Transactional), to n...
{ "language": "en", "url": "https://stackoverflow.com/questions/75700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What happens to global variables declared in a DLL? Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor. Will the destructor be called when the DLL is unloaded? A: This page from Microsoft goes into the details of DLL initialization and destruction of globals: http:...
{ "language": "en", "url": "https://stackoverflow.com/questions/75701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: How do I check to see if a value is an integer in MySQL? I see that within MySQL there are Cast() and Convert() functions to create integers from values, but is there any way to check to see if a value is an integer? Something like is_int() in PHP is what I am looking for. A: Here is the simple solution for it ass...
{ "language": "en", "url": "https://stackoverflow.com/questions/75704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "140" }
Q: How to read/write dBase III files using C#/.NET ODBC or OLE? I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction? Thanks for your time. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Grabbing Users with a specific value in their profile I'm using membership and roles for authentication in my vb .net application. We have about 5 roles in the application with certain roles filling out a specific profile value. Example is the role is store and the profile value is store number. Obviously if you wor...
{ "language": "en", "url": "https://stackoverflow.com/questions/75712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF Can't Databind to an Interface? I'm trying to bind controls in a WPF form to an interface and I get a runtime error that it can't find the interface's properties. Here's the class I'm using as a datasource: public interface IPerson { string UserId { get; set; } string UserName { get; set; } string Em...
{ "language": "en", "url": "https://stackoverflow.com/questions/75713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PropertyGrid, DefaultValueAttribute, dynamic object, and enumerations Note: I am using .Net 1.1, although I am not completely against answer that use higher versions. I am displaying some dynamically generated objects in a PropertyGrid. These objects have numeric, text, and enumeration properties. Currently I am hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/75714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a better deterministic disposal pattern than nested "using"s? In C#, if I want to deterministically clean up non-managed resources, I can use the "using" keyword. But for multiple dependent objects, this ends up nesting further and further: using (FileStream fs = new FileStream("c:\file.txt", FileMode.Open...
{ "language": "en", "url": "https://stackoverflow.com/questions/75722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Not using widths & padding/margins on the same element? I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that? A: Because some browsers treat the width as the total width of the element including the padding and the margins, and others trea...
{ "language": "en", "url": "https://stackoverflow.com/questions/75732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Conditional operator assignment with Nullable types? EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text) ? null : Convert.ToInt32(employeeNumberTextBox.Text), I often find myself wanting to do things like this (EmployeeNumber is a Nullable<int> as it's a property on a LINQ-to-SQL dbml object w...
{ "language": "en", "url": "https://stackoverflow.com/questions/75746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI? I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.) I'm aware of the "DataFormWebPart" but...
{ "language": "en", "url": "https://stackoverflow.com/questions/75747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)? I'm building a quick csv from a mysql table with a query like: select DATE(date),count(date) from table group by DATE(date) order by date asc; and just dumping them to a file in perl over a: while(my($date,$sum) = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How to implement Enums in Ruby? What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums. A: Perhaps the best lightweight approach would be module MyConstants ABC = Class.new DEF = Class.new GHI = Class.new end This way values have ass...
{ "language": "en", "url": "https://stackoverflow.com/questions/75759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "359" }
Q: How can I debug a process (1.exe) running under another process (2.exe)? 1.exe doesn't give enough time for me to launch the IDE and attach 1.exe to the debugger to break into. A: I would suggest taking the same approach as with NT services in this case. They will also start and usually not give you enough time to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the .NET Control.Margin property for? I assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values I enter. Then I read on the SDK: Setting the Margin property on a docked control has no effect ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you do AppBar docking (to screen edge, like WinAmp) in WPF? Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentize...
{ "language": "en", "url": "https://stackoverflow.com/questions/75785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5? (Eclipse 3.4, Ganymede) I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down. It's a month or 2 down the line, a...
{ "language": "en", "url": "https://stackoverflow.com/questions/75786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Django -vs- Grails -vs-? I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monst...
{ "language": "en", "url": "https://stackoverflow.com/questions/75798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: ASP.NET Custom Controls - Alternatives to PostBack? On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development. I understand that controls have no "lifetime" in ASP.NET, and therefore must be re-initializ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Partial Commits with Subversion Given the case I made two independent changes in one file: eg. added a new method and changed another method. I often don't want to commit both changes as one commit, but as two independent commits. On a git repository I would use the Interactive Mode of git-add(1) to split the hunk i...
{ "language": "en", "url": "https://stackoverflow.com/questions/75809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: SQL Query - Use Like only if no exact match exists? I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41 != '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%')) However I'm discovering that I need it to only use that if there is no exact match first....
{ "language": "en", "url": "https://stackoverflow.com/questions/75819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to access table instances when using SQLAlchemy's declarative syntax All the docs for SQLAlchemy give INSERT and UPDATE examples using the local table instance (e.g. tablename.update()... ) Doing this seems difficult with the declarative syntax, I need to reference Base.metadata.tables["tablename"] to get t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Using Spry inside Java Server Faces framework I'm trying to insert a Spry accordion into an already existing JSF page using Dreamweaver. Is this possible? I've already tried several things, and only the labels show up. A: I'm not a Dreamweaver expert, but all Spry Accordian requires is the correct HTML structure....
{ "language": "en", "url": "https://stackoverflow.com/questions/75848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can MyISAM tables be used more safely? I like InnoDB's safety, consistency, and self-checking. But I need MyISAM's speed and light weight. How can I make MyISAM less prone to corruption due to crashes, bad data, etc.? It takes forever to go through a check (either CHECK TABLE or myisamchk). I'm not asking for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: mount rootfs on loopback I have a rootfs boot image that I want to test by mounting on my local file system. How can I do this ? EDIT: The file was a rootfs.img but it turned out I did not have the correct filesystem support in my custom kernel. pjz's answer works once the fs support is there. A: Need more info - w...
{ "language": "en", "url": "https://stackoverflow.com/questions/75862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# driver development? Before I jump headlong into C#... I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a .NET machine. But .NET seems to be the way MS is heading for applications development, and so I'm now wondering: * *Are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Algorithm for finding similar images I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images. .. I have looked at hausdorff based matching bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/75891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: How to transform a XAML/WPF file to a video (AVI, WMV, etc.) I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast. What I think I need: C# cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/75906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to stop CAS security demands from a FullTrust assembly I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust? I do not wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/75909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Which type of external drives are good for SQL backup files? As a part of database maintenance we are thinking of taking daily backups onto an external/firewire drives. Are there any specific recommended drives for the frequent read/write operations from sql server 2000 to take backups? A: Whatever you do, just don...
{ "language": "en", "url": "https://stackoverflow.com/questions/75919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Text on a ProgressBar in WPF This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about what is in progress, or even just add numbers to the rep...
{ "language": "en", "url": "https://stackoverflow.com/questions/75924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Using xsd to generate XML in .net I'm working in a .net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know w...
{ "language": "en", "url": "https://stackoverflow.com/questions/75935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to import homepath into c program using gcc I am using gcc for windows. The OS is windows XP. How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to: fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w"); A: Use getenv() t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you execute a dynamically loaded JavaScript block? I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like: <div> <!-- some html --> <script type="text/javascript"> /** some javascript */ </script> </div> I'm inserting the whole thing into the DOM, but the JavaScr...
{ "language": "en", "url": "https://stackoverflow.com/questions/75943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How can I make Internet Explorer not change the colors in my PNG images When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen here. In this image, the dark background and background image should be bot...
{ "language": "en", "url": "https://stackoverflow.com/questions/75947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to Implement Database Independence with Entity Framework I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the screen. I have an...
{ "language": "en", "url": "https://stackoverflow.com/questions/75959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How and when to abandon the use of arrays in C#? I've always been told that adding an element to an array happens like this: An empty copy of the array+1element is created and then the data from the original array is copied into it then the new data for the new element is then loaded If this is true, then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Accessing App.config in a location different from the binary In a .NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config? A: It appears that you can use the App...
{ "language": "en", "url": "https://stackoverflow.com/questions/75978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: When are you supposed to use escape instead of encodeURI / encodeURIComponent? When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent(): Use escape: escape("% +&="); OR use encodeURI() / encodeURIComponent() encodeURI("http://www.goog...
{ "language": "en", "url": "https://stackoverflow.com/questions/75980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1491" }
Q: Git pack file entry format My understanding of the Git pack file format is something like: Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive by...
{ "language": "en", "url": "https://stackoverflow.com/questions/76002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you measure downstream bandwidth per user? In a Linux-based system (specifically, Ubuntu Server 8.04), how can you measure downstream bandwidth on a per-user basis? Optimally, I would like a method that provides data directly instead of having to run another process and parse its output. I have a technique ...
{ "language": "en", "url": "https://stackoverflow.com/questions/76029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java 1.6 JDK tool, VisualVM Has anyone used the new Java 1.6 JDK tool, VisualVM, to profile a production application and how does the application perform while being profiled? The documentation say that it is designed for both Production and Development use, but based on previous profiling experience, with other pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/76042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a way to productively do Silverlight development without buying VS2008? It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in the express edit...
{ "language": "en", "url": "https://stackoverflow.com/questions/76044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I pass a variable to a mysql script? I know that with mysql you can write SQL statements into a .sql file and run the file from the mysql command line like this: mysql> source script.sql How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employees in a depar...
{ "language": "en", "url": "https://stackoverflow.com/questions/76065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to play WMV in a WindowMediaPlayer activeX controlled by a flash component? How to play WMV in a WindowMediaPlayer activeX controlled by a flash component? I've seen it done here: http://sport5.co.il/ Does anyone know how? A: The only way I see the two interacting would be to place both a WMP and a Flash compon...
{ "language": "en", "url": "https://stackoverflow.com/questions/76069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I delete a service in Windows? I have a couple old services that I want to completely uninstall. How can I do this? A: Use the SC command, like this (you need to be on a command prompt to execute the commands in this post): SC STOP shortservicename SC DELETE shortservicename Note: You need to run the comm...
{ "language": "en", "url": "https://stackoverflow.com/questions/76074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "520" }
Q: Computationally efficient three dimensional arrays in C I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points. To write an efficient code I need...
{ "language": "en", "url": "https://stackoverflow.com/questions/76076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: how to put an .net application in system tray when minimized? can anyone please suggest a good code example of vb.net/c# code to put the application in system tray when minized. A: You can leverage a built in control called NotifyIcon. This creates a tray icon when shown. @Phillip has a code example that is somewha...
{ "language": "en", "url": "https://stackoverflow.com/questions/76079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you reliably get the Quick Launch folder in XP and Vista? We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question. For reference, here is code to get the Application Data folder ...
{ "language": "en", "url": "https://stackoverflow.com/questions/76080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Undo with GTK TextView I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextVi...
{ "language": "en", "url": "https://stackoverflow.com/questions/76096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I reverse-project 2D points into 3D? I have 4 2D points in screen-space, and I need to reverse-project them back into 3D space. I know that each of the 4 points is a corner of a 3D-rotated rigid rectangle, and I know the size of the rectangle. How can I get 3D coordinates from this? I am not using any particu...
{ "language": "en", "url": "https://stackoverflow.com/questions/76134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: How to determine if the user's browser can view PDF files What's the best way for determining whether the user's browser can view PDF files? Ideally, it shouldn't matter on the browser or the operating system. Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript? A: A quick google...
{ "language": "en", "url": "https://stackoverflow.com/questions/76179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Should protected attributes always be banned? I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes. Do you use protected attributes ? what do you use them for ? A: C#: I use protected for abstract or virtual methods that I wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/76194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I get an attribute value when using XSLT with unknown namespace? I am receiving a 3rd party feed of which I cannot be certain of the namespace so I am currently having to use the local-name() function in my XSLT to get the element values. However I need to get an attribute from one such element and I don't kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/76204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Quick C# prototype program with simple DB Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem. Let's say I've been given a task to prot...
{ "language": "en", "url": "https://stackoverflow.com/questions/76206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Good way to time SQL queries when using Linq to SQL Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas? A: As two people already said, SQL Profiler is the out-of-the-box tool to use for that. I don...
{ "language": "en", "url": "https://stackoverflow.com/questions/76208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Production, Test, Developer Environments vs Security What are current practices for enabling developers to build systems that contain private data? Can anyone point to a "best practices" guide for that sort of thing? We have a Catch-22 here in that developers need to write applications that go against systems that h...
{ "language": "en", "url": "https://stackoverflow.com/questions/76210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Windows Mobile 6 J2SE-scale JVM implementation Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we currently have for the platform. A: Yes, I...
{ "language": "en", "url": "https://stackoverflow.com/questions/76214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What (good) Java RADIUS server libraries are out there? I've only been able to find two thus far, namely TinyRadius, which itself discourages production use and AXL, which is pay-only. JRadius seems tied to FreeRADIUS, which isn't a library and will need a lot of cajoling to function like one. A: List from http://f...
{ "language": "en", "url": "https://stackoverflow.com/questions/76217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Get Last Friday of Month in Java I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/76223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: What are some games with fairly simple heuristics to evaluate positions? I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin with we're going to implement a tic-tac-toe game that searches the entire game tree and as such plays perfectly. Once we fini...
{ "language": "en", "url": "https://stackoverflow.com/questions/76227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Access to auto increment identity field after SQL insert in Java Any advice on how to read auto-incrementing identity field assigned to newly created record from call through java.sql.Statement.executeUpdate? I know how to do this in SQL for several DB platforms, but would like to know what database independent inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/76254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: IIS Authentication across servers My production environment involves a pair of IIS 6 web servers, one running legacy .NET 1.1 applications and the other running .NET 2.0 applications. We cannot install .NET 2.0 alongside 1.1 on the same machine because it is a tightly-regulated 'Validated System' and would present ...
{ "language": "en", "url": "https://stackoverflow.com/questions/76258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you handle unsolicited responses (like incoming calls/texts) when handling SMS with a GSM modem? I've tried to develop a GSM modem library for handling SMS built around system.io.ports.serialport. It does'nt handle unsolicited responses very well, in particular incoming calls. I have resorted to sending AT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/76268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to indirectly load a value type on the stack In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to check whether it has a value then we could emit the followi...
{ "language": "en", "url": "https://stackoverflow.com/questions/76274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I kill a process, using VBScript, started by a particular user I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2. I want to use VBScript. A: You could use this to find out who the process ow...
{ "language": "en", "url": "https://stackoverflow.com/questions/76275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Find minimal necessary java classpath Is there a tool to detect unneeded jar-files? For instance say that I have myapp.jar, which I can launch with a classpath containing hibernate.jar, junit.jar and easymock.jar. But actually it will work fine using only hibernate.jar, since the code that calls junit.jar is not rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/76291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's the best way to return variables from a syncExec? In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is: final ArrayList<Integer> result = new ArrayList<Integer>(); GUI.display().syncExec(new Runnable(){ public void run() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/76300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I open Java .class files in a human-readable way? I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook. Is there any way to wrangle it back into a somewhat-readable format so I can try to figure out what it...
{ "language": "en", "url": "https://stackoverflow.com/questions/76314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "139" }
Q: Easy expanation of setting up Openssl on Windows I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading. I cant get openssl running and recieve th...
{ "language": "en", "url": "https://stackoverflow.com/questions/76324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Move Active Directory Group to Another OU using Powershell How do I move an active directory group to another organizational unit using Powershell? ie. I would like to move the group "IT Department" from: (CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca) to: (CN=IT Department, OU=Tem...
{ "language": "en", "url": "https://stackoverflow.com/questions/76325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }