text
stringlengths
8
267k
meta
dict
Q: Separating an SQL Server database I'm using SQL Server 2008. My database is almost 2GB in size. 90% of it is one table (as per sp_spaceused), that I need don't for most of my work. I was wondering if it was possible to take this table, and have it backed up in a separate file, allowing me to transfer the important ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Setting methods through prototype object or in constructor, difference? Could you explain the difference between setting methods in the constructor and through prototype object? The following code shows these two ways of setting the methods - say_hello and say_bye both work fine: function MessageClass() { this.say...
{ "language": "en", "url": "https://stackoverflow.com/questions/422476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Missing Dictionary.KeyCollection Extension Methods .NET 3.5 (C#) Perhaps I'm missing something with the concept of Extension Methods, but I cannot gain access to the Extension Methods within the KeyCollection Class as defined here: http://msdn.microsoft.com/en-us/library/dk7e2d8e.aspx. Using the following code excer...
{ "language": "en", "url": "https://stackoverflow.com/questions/422486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can't get the object from a cell in jqGrid (jQuery) This is the issue, when I define the ddl (drop down list or select box) I don't know the selected value. When a user edits a row, the user can select an item from the list. But the selected item isn't set. I want to set the selected item when the user clicks a but...
{ "language": "en", "url": "https://stackoverflow.com/questions/422504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get info about a workflow item using Documentum API calls What is the API call to get information about the packages in a workflow based on the package_id of the workflow? A: what info are you specifically trying to retrieve. The workflow info is stored across many different objects and can be hard to track down. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VB.Net / Blackberry I have a vb.net application written for PDA's. Is it possible to write a VB.net application for a Blackberry? A: No. The Blackberry uses Java, either to standard J2ME or to RIM's own APIs. See their getting started pages. The very old Mobitex pagers used C++, but again, no VB.net support. A: A...
{ "language": "en", "url": "https://stackoverflow.com/questions/422514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tools to generate SQL DDL and Content from an existing database Does anyone know of a reasonably priced tool that will create DDL statements to create a SQL Server database and appropriate Insert statements to recreate the data? I use the Red Gate tools to do database compares (including content compares) and this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Cookie not being sent by IE7 I have two copies of IE7, same exact security settings and same exact builds. Two different machines, both running WinXP. In my application, my cookie headers are being properly sent to the server on one version of IE. No other cookies are being sent in another version. What are some poi...
{ "language": "en", "url": "https://stackoverflow.com/questions/422526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: write to fifo/pipe from shell, with timeout I have a pair of shell programs that talk over a named pipe. The reader creates the pipe when it starts, and removes it when it exits. Sometimes, the writer will attempt to write to the pipe between the time that the reader stops reading and the time that it removes the pi...
{ "language": "en", "url": "https://stackoverflow.com/questions/422530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ruby: can a block affect local variables in a method? I'm just learning ruby and trying to understand the scope of code executed in blocks. For example, I want to be able to create a block that affects the method that it is attached to, like so: def test(&block) block.call() if block_given? puts "in test, foo is...
{ "language": "en", "url": "https://stackoverflow.com/questions/422536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How can I automatically enable content approval on a SharePoint list? I'm trying to create a feature that both creates a list template and an instance of that list (using the <ListTemplate> and <ListInstance> elements. I would like for content approval to be turned on by default. According to the docs on ListTemplat...
{ "language": "en", "url": "https://stackoverflow.com/questions/422542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Determining when a sound has finished playing in C# Here is the situation: User looks something up. * *Alert sound is played because there is a notice on the item he looked up *User closes the notice - the application continues to retrieve information *User is sent a 'ding' telling them the information has fini...
{ "language": "en", "url": "https://stackoverflow.com/questions/422543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I create an instance of a class in an ASP.NET application How do you go about creating an instance of an object when given the class name as a string in an ASP.NET v2 application? For example, I've got a class called SystemLog defined in the app_code section of the application. The class is defined within the...
{ "language": "en", "url": "https://stackoverflow.com/questions/422553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ASP.NET broken rendering of Validation client side code in Firefox This one has been a stumper for me. Its very easy to duplicate though a rather obscure issue. It came about as I was doing some javascript work on a web page yet also make use of the validation controls that ASP.NET provides. Some specifics up front...
{ "language": "en", "url": "https://stackoverflow.com/questions/422554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Drawing with Webdings in PIL I've got a Python program using PIL to render text, and it works great with all kinds of fonts. But it only draws "missing glyph" rectangles with wingdings or webdings. Here's a sample that tries to draw every unicode character: # Run this with .ttf file path as an argument, and also an...
{ "language": "en", "url": "https://stackoverflow.com/questions/422555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: wmi .net to set serial port? I have a usb serial adapter that plug and plays at COM9 or higher on many systems. A third party package I am using in my software can only connect up to COM8. Is there some way to set a COM9 down to a lower port using WMI or something? I know I can do this in the port settings dialog in...
{ "language": "en", "url": "https://stackoverflow.com/questions/422576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Server: What to learn if you going to for a dedicated solution Today we're using a shared SQL Server database and that is perfect as I don't know anything about SQL Server maintenance. But for economic reasons we're need to upgrade to a dedicated server. Given that I don't have time to read the entire documentat...
{ "language": "en", "url": "https://stackoverflow.com/questions/422585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get Table2 data from a relation to Table1 in C# Code I have two tables in a DataSet where the ID field on each is the same. I have a Relation between the two tables. How do I, in C# code, pull the info from Table2 that relates to the info on Table1? I have tried using a new DataRow and assigning it by using GetChild...
{ "language": "en", "url": "https://stackoverflow.com/questions/422586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I access SQL server using ADO through a proxy? I have a Delphi application that uses ADO to connect to a SQL server hosted on the Internet. The user running this application wants to access the SQL server through a proxy internally. How can this be done? A: There is nothing special that needs to be done in...
{ "language": "en", "url": "https://stackoverflow.com/questions/422588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Derivatives in C/C++? I have some expressions such as x^2+y^2 that I'd like to use for some math calculations. One of the things I'd like to do is to take partial derivatives of the expressions. So if f(x,y) = x^2 + y^2 then the partial of f with respect to x would be 2x, the partial with respect to y would be 2y. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/422594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Hide (or fold) columns of text in (g)Vim (horizontally) is there a way to hide columns of a buffer (text file, you know what I mean) while editing it in Vim? e.g. text visible in the buffer before hiding column 2&3: abbcccccc accdddddd And after hiding them: acccccc adddddd (Not to mention I'm working with really...
{ "language": "en", "url": "https://stackoverflow.com/questions/422597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Canonical operator overloading? Is there a canonical or recommended pattern for implementing arithmetic operator overloading in C++ number-like classes? From the C++ FAQ, we have an exception-safe assignment operator that avoids most problems: class NumberImpl; class Number { NumberImpl *Impl; ... }; Number...
{ "language": "en", "url": "https://stackoverflow.com/questions/422600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I set the font size in an iPhone text field? I have a UITextField in a view (on an iPhone) but the input text appears very small. I don't see an option in Interface Builder to set the size. Is there a way to set it declaratively or do I have to resort to code? A: Press Cmd-T for the Fonts panel. A: You can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the practical advantages of learning Assembly? Most people suggest that learning assembly is essential, its important to know the underlying workings of the computer, and so forth. But what I'm looking for are some practical suggestions that will make the effort of learning Assembly to be worth it. What are...
{ "language": "en", "url": "https://stackoverflow.com/questions/422613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is it possible to save a window layout in Windows XP? When I am working with files on my project I normally have four windows open viewing four different folders in the four quadrants of the screen. My morning ritual involves having to manually open these four folders, takes only a few moments but I was hoping to fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/422616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When should I create a new controller class in ASP.NET MVC? I'm learning MVC and am having trouble deciding when I should create a new controller versus just adding an action and view associated with an existing controller. On the one hand, Single Responsibility would seem to say a controller should be limited to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/422622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Overloaded method calling overloaded method I have a method that I'm writing that is calling another overloaded method inside it. I'd like to only write one outer method, since the parameter to the outer method is being passed to the inner one. Is there a way to do this? I tried using generics, but I don't know en...
{ "language": "en", "url": "https://stackoverflow.com/questions/422625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to monitor microphone for noise sound? I’m trying to find an algorithm to detect when the user blows into the microphone (like Ninentdo DS or iPhone) on a WM6 device with C#. I was thinking to use Waveform to read from the mic in real time into a small buffer, but I'm a bit lost on how to recognize the blowing s...
{ "language": "en", "url": "https://stackoverflow.com/questions/422628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I deploy an ASP.net custom MembershipProvider? I've written a custom MembershipProvider that uses a custom database schema for storing the members, but I am having trouble figuring out how to deploy the provider. My target server is running IIS7, and I am able to navigate to a dialog for a adding a .NET User...
{ "language": "en", "url": "https://stackoverflow.com/questions/422631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rule of thumb on when to use WITH RECOMPILE option I understand that the WITH RECOMPILE option forces the optimizer to rebuild the query plan for stored procs but when would you want that to happen? What are some rules of thumb on when to use the WITH RECOMPILE option and when not to? What's the effective overhead a...
{ "language": "en", "url": "https://stackoverflow.com/questions/422632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Windows programming: where to start? I'm a long time Mac user, with a fair bit of programming experience and I wanted to try programming for windows. The thing is I don't know where to start, what should I learn first ? .Net, Win32 ? [Clarification]: My ultimate goal would be to create a more or less complex applica...
{ "language": "en", "url": "https://stackoverflow.com/questions/422645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Completed user stories - discard? archive? We are starting to use a Scrum process for development. We have a nice stack of user stories now . I'm wondering though, once a user story is complete, tested and deployed do you do anything else with it? We're using little index cards right now, I'd think it would be fine ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Ruby on Rails Ajax rubberband I want my users to be able to do a rubberband selection in a image for a Ruby on Rails application. Has anyone seen any good plugins that do this or make it easy for me to implement it? A: I played around with an image cropper that has that feature, and it uses Prototype, so it should ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Auto increment stopped in MySQL? I'm working on a script that sadly I inherited - with no commenting or anything. Argh! For testing purposes I duplicated one of the tables in the database which had an auto-incrementing ID. When the data is saved to the database, though, the ID number just reads "0" -- which is the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get the "python setup.py" submit information on freshmeat? This can submit information about your software on pypi: python setup.py register But there is not a similar command for submitting information to freshmeat. How could I write a distutils.Command that would let me do the following? python setup.py fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/422717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you debug app crash with no stack trace referencing source code? http://support.microsoft.com/kb/953102 We spent about 50 hours during Christmas holiday to identify this problem, causing our business critical production app to crash randomly. The problem was that there was no stack trace to the source code, o...
{ "language": "en", "url": "https://stackoverflow.com/questions/422720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Iphone SDK - Can I start a file (song) in the ipod feature of the iphone via the SDK? I would like to have a feature in my iphone application that would start playing a file in my ipod section of the iphone. Does the SDK allow calls to this? Is there a simple way to start a song from my application other than usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/422724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Visual Studio _CrtDumpMemoryLeaks always skipping object dump I'm trying to use the CRT memory leak detection but I keep getting the following message in Microsoft Visual Studio: "Detected memory leaks - skipping object dump." I can never get the it to actually do and object dump. I followed the directions in the Mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/422738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Time Clock - Table Design What is the best design for a punch in/out table? Would you store the punch in/out in the same table or separate tables? Why? Edit - Hourly employees punch in at the beginning of their shift and punch out at the end of their shift. Hourly - Exempt employees must punch out/in for lunch in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: is it possible to optimize that code? I'm interested in speed, not good looking code, that is why I'm using array and not list(of integer). I have an array looking like: 0,1,0,1,1,0,1,0,1,1,1,0,0,1 I'm interesting in the position of each number so I can later pick one randomly. so what I do is looping through the ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/422747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DB table refactoring Hi I'm using ms2005 for a simple calendaring system. We have three 'legacy' tables: Groups, Units and Staff. I need to give each record in the tables a unique identifier (carrying across all 3 tables). What would be best way to approach this? I am using NHibernate and was was wondering whether t...
{ "language": "en", "url": "https://stackoverflow.com/questions/422751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Will .net 2.0 and 3.5 run side by side? We're a development shop that still does most of our development in .net 2.0. We're starting to think about using some of the new things in 3.5 (LINQ, etc) and there are some other software packages we're looking at that need WPF and so on. We'd like to get 3.5 up and running...
{ "language": "en", "url": "https://stackoverflow.com/questions/422767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Attaching to a child process automatically in Visual Studio during Debugging When writing plugins for media center your plugin is hosted in ehexthost.exe this exe gets launched from ehshell.exe and you have no way of launching it directly, instead you pass a special param to ehshell.exe which will launch the plugin ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: C++ How can I get a return a reference and save the refence as a local variable in a function? I have a function inside a class that returns a reference to a member variable. std::vector<uint8> & getBuffer() const { return m_myBuffer; } Now say in another class I call this method: int someFunction() { std::ve...
{ "language": "en", "url": "https://stackoverflow.com/questions/422774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Accessing Row Data In Telerik RadGrid (Server Side) Ive no problems using Javascript to read the rows of a telerik radgrid component im using however I can seem to find anyway to access the row data server side when a postback occurs. Ive spent ages looking for solution but no luck. Any pointers would be greatly app...
{ "language": "en", "url": "https://stackoverflow.com/questions/422783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to fix closure problem in ActionScript 3 (AS3) In the code below I'm trying to load some images and put them in the stage as soon as they get individually loaded. But it is bugged since only the last image is displayed. I suspect it's a closure problem. How can I fix it? Isn't the behaviour of closures in AS3 th...
{ "language": "en", "url": "https://stackoverflow.com/questions/422784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Generating the App.Config file for a Managed Windows Service using WCF My next project is going to be using Windows Communication Foundation to host Managed Windows Services, so I have been trying to follow a HOWTO on msdn - How to: Host a WCF Service in a Managed Windows Service. Sounds like a perfect match. All w...
{ "language": "en", "url": "https://stackoverflow.com/questions/422787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Passing focus of child element in a UserControl to parent in WPF I have a complex WPF UserControl made of other ContentControl templates which contain sets of buttons, textfields, and other elements. The parent UC is focusable so I have a style with a property trigger to update (gratuitous OuterGlowBitmapEffect) whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/422798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Can't connect to a local apache installation under XAMPP on Win XP 64-bit. Help! I'm using XAMPP v1.7 on an Win XP-64 bit machine, my Symantec AV is turned off as is my Windows Firewall, and I can't connect to localhost from a browser. I originally had these errors: [Wed Jan 07 16:24:55 2009] [error] (OS 10038)An ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# socket abnormal latency I am working on a little online multiplayer pong game with C# and XNA. I use sockets to transfer data between two computers on my personnal LAN. It works fine. The issue is with speed : the transfer is slow. When I ping the second computer, it shows a latency of 2 ms. I set up a little tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/422809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Configure IIS 6 website SSL port programmatically? I am trying to configure the website SSL port with the certificate for a website within IIS 6.0 programmatically. IIS 7.0 provides the API, ServerManager, to do so, but I am not sure if there is something similar for IIS 6.0 or command line utilities. Thanks in adv...
{ "language": "en", "url": "https://stackoverflow.com/questions/422812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible in MySQL to update only the nth occurence? My table has data like so products_parent_id | products_quantity 2 5 2 7 2 9 2 4 My SQL statement looks like so (so far): UPDATE ' . TABLE_PRODUCTS . ' SET products_q...
{ "language": "en", "url": "https://stackoverflow.com/questions/422828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Structure of a C++ Object in Memory Vs a Struct If I have a class as follows class Example_Class { private: int x; int y; public: Example_Class() { x = 8; y = 9; } ~Example_Class() { } }; And a struct...
{ "language": "en", "url": "https://stackoverflow.com/questions/422830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Is there an andand for Perl? I'd rather do this: say $shop->ShopperDueDate->andand->day_name(); vs. this: say $shop->ShopperDueDate->day_name() if $shop->ShopperDueDate; Any ideas? (This idea is inspired by the Ruby andand extension.) (Actually it is inspired by the Groovy language, but most people don't know that...
{ "language": "en", "url": "https://stackoverflow.com/questions/422837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# MouseEventArgs "e.Delta" not working Hi I have an MDI application where a child window handles a number of mouse events. Everything has worked no problem (e.Button, e.Location, etc) until I tried to get the value from e.Delta (number of mouse detents). e.Delta always returns 0. My events are trigger no problem, j...
{ "language": "en", "url": "https://stackoverflow.com/questions/422839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to convert string to binary integer file using command line under linux What i want is to take an integer represented as a string, for example "1234", and convert it to a file called int, containing a 32-bit big endian integer, with the value 1234. The only way I have figured out to do this is something like ech...
{ "language": "en", "url": "https://stackoverflow.com/questions/422840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there any free tools to generate 'INSERT INTO' scripts in MS SQL Server? The only thing I don't have an automated tool for when working with SQL Server is a program that can create INSERT INTO scripts. I don't desperately need it so I'm not going to spend money on it. I'm just wondering if there is anything out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: ANT: How to modify java.library.path in a buildfile The java.library.path property appears to be read-only. For example when you run ant on the following buildfile <project name="MyProject" default="showprops" basedir="."> <property name="java.library.path" value="test"/> <property name="some.other.property"...
{ "language": "en", "url": "https://stackoverflow.com/questions/422848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Impersonation and Delegation I am using impersonation is used to access file on UNC share as below. var ctx = ((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate(); string level = WindowsIdentity.GetCurrent().ImpersonationLevel); On two Windows 2003 servers using IIS6, I am getting different impers...
{ "language": "en", "url": "https://stackoverflow.com/questions/422858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to show critical instructions to a user in a web app? I'm also interested in more general thoughts, but here is my specific problem. In an ASP.NET web app, I am connecting to a 3rd-party via API. The 3rd-party requires that the user login and answer a few configuration questions to set this up. All of the q...
{ "language": "en", "url": "https://stackoverflow.com/questions/422861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I make DataGridView.EndEdit trigger the CellValidating event? I'm using a DataGridView in my WinForms application. My main objective is to make the Enter key not move to the next row in the grid. I still want the enter key to validate and end edit mode. I found this FAQ entry and subclassed DataGridView to overr...
{ "language": "en", "url": "https://stackoverflow.com/questions/422865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I uninstall the Intel C++ Compiler (ICC) 11 on Vista x64? I installed the combined package of ICC 11.0.066 for x86 & x64 targets, with all options (IPP, TBB, MKL). Attempting to run the uninstaller from Control Panel > Programs and Features immediately errors out with the dialog: Another instance of uninsta...
{ "language": "en", "url": "https://stackoverflow.com/questions/422888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's a good way to view dojo's javascript source files in Eclipse with Aptana? I have Aptana installed within Eclipse. I'm working on a project with the dojo 1.2 JavaScript library installed. When I open one of dojo's dijit .js files, the code is formatted in a rather difficult to read way. The Eclipse "Outline" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Image compression for webcomics As probably many people around here I read a few webcomics. Drowtales is my favorite, but that's besides the point. For a long time a thought has been nagging me at the back of my head: webcomics are drawn pictures. They are not photographs. There should be a lot of redundancy (less c...
{ "language": "en", "url": "https://stackoverflow.com/questions/422902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the most pythonic way of access C libraries - for example, OpenSSL? I need to access the crypto functions of OpenSSL to encode Blowfish data in a CBC streams. I've googled and found some Blowfish libraries (hand written) and some OpenSSL wrappers (none of the seem complete.) In the end, I need to access the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/422903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: autogenerate HTTP screen scraping Java code I need to screen scrape some data from a website, because it isn't available via their web service. When I've needed to do this previously, I've written the Java code myself using Apache's HTTP client library to make the relevant HTTP calls to download the data. I figured ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How is it possible to resolve unresolved symbols (LNK2001) for _RTC_InitData and _RTC_Shutdown I am building an x64 lib in Visual Studio 2008, and separately linking it into an x64 DLL (specifically using the WDK Build.exe toolchain in this case). Most general C runtime symbols link fine, indicating that the library...
{ "language": "en", "url": "https://stackoverflow.com/questions/422918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I bypass the HTML encoding when using Html.ActionLink in Mvc? Whenever I use Html.ActionLink it always Html encodes my display string. For instance I want my link to look like this: <a href="/posts/422/My-Post-Title-Here">More&hellip;</a> it outputs like this: More&hellip; &hellip is "..." incase you were wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/422929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How can I check for DBNull while executing my command only once? When I retrieve any Scalar value from the database, I usually write code like this for nullable fields. cmd.ExecuteScalar() == DBNull.Value ? 0 : (int)cmd.ExecuteScalar() But I don't like it because it executes the Executescalar statement twice. It's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: print_int and other F# print functions I am trying to do simple tutorial in Visual Studio let someNumber = (2 + 2) print_int someNumber but it says print_int is undefined. printfn works. Could the book I'm using be outdated? A: print_int is a part of the F# power pack. Adding a reference to the PowerPack (c:\pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/422940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Deleting files using a service application I am using a FileSystemWatcher in VS2005 to monitor directories and thought to change the application to a service. Eveverything woks fine until the service tries to delete a file. Sending the exception to the eventviewer, I get a System.UnauthorizedAccessException. The fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/422948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: keeping a log table in sqlite database? I'm looking for a way to set up (via SQL) a log table containing everything that had been done to my sqlite database (preferably in terms of the insert, create table etc. statements as issued to the database). I'm sure there are way to do it via setting trigger on each table, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How C# Compiler choose SelectMany when translating LINQ expression? There are 4 overloaded signatures for Enumerable.SelectMany. To make it simple, we ignore the two signatures with int argument. So we have 2 signatures for SelectMany: public static IEnumerable<TResult> SelectMany<TSource, TResult>( this IEnumer...
{ "language": "en", "url": "https://stackoverflow.com/questions/422958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Removing directories with spaces with bash I'm using the following command to remove every ".dummy" directories in a folder named "Test Folder": rm -rf `find "Test Folder" -type d -name .dummy` However, this doesn't work since it expands to, say: rm -rf Test Folder/.dummy Since the whitespace is not escaped, this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to recognize bots with php? I am building stats for my users and dont wish the visits from bots to be counted. Now I have a basic php with mysql increasing 1 each time the page is called. But bots are also added to the count. Does anyone can think of a way? Mainly is just the major ones that mess things up. Goog...
{ "language": "en", "url": "https://stackoverflow.com/questions/422969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Get source of website in java I would like to use java to get the source of a website (secure) and then parse that website for links that are in it. I have found how to connect to that url, but then how can i easily get just the source, preferraby as the DOM Document oso that I could easily get the info I want. Or i...
{ "language": "en", "url": "https://stackoverflow.com/questions/422970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Accept credit card/echeck payments I bill customers monthly for a service and would like them to be able to go to my website and pay by credit card or echeck. I can do an integration with Authorize.net/ach direct/paypal/etc, but if there is something open source or some sample code to start with, it would be much e...
{ "language": "en", "url": "https://stackoverflow.com/questions/422976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Exposing a null Object Instance as a Property Today I was looking at some code atually from Nikhil Kothari's Facebook.NET API. I just wanted to check out how he was doing some things in there for ideas. One of the things I came across was a Property that just seemed really weird to me. check this out: FacebookReque...
{ "language": "en", "url": "https://stackoverflow.com/questions/422984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would you refactor page members out of ASPX code? I have inherited a project that uses the following pattern for passing parameters from the code behind to the aspx page. I know this is wrong, but I am on the fence on the best way to refactor it. Code Behind: using System; using System.Web; namespace BadPassing...
{ "language": "en", "url": "https://stackoverflow.com/questions/422989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: std::list with std::map properties? Basically, I want to have a std::list but with std::map properties such as find(), do I really need to loop through every single list entry to find what I need? A: If you want a container where: 1) Insertion order is not important (this is a list) 2) Searching speed is. Then use...
{ "language": "en", "url": "https://stackoverflow.com/questions/422991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# Dynamically apply evaluation rule on a collection I have a fixed-length data file need to persistence into database. I use a XML file to define the length for the fields and use a list of FieldItem class to store the data. class FieldItem { public string ObjectName {get; set;} public string ...
{ "language": "en", "url": "https://stackoverflow.com/questions/422999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: OpenOffice .xls export to PDF causes check boxes to overlap OpenOffice Excel file export to PDF is being done programmatically and I wish to know if there is a way to resolve this issue by maybe passing some kind of flag or something during the conversion process which will make the cell background transparent in th...
{ "language": "en", "url": "https://stackoverflow.com/questions/423004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I generate points that match a histogram? I am working on a simulation system. I will soon have experimental data (histograms) for the real-world distribution of values for several simulation inputs. When the simulation runs, I would like to be able to produce random values that match the measured distrib...
{ "language": "en", "url": "https://stackoverflow.com/questions/423006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Asp.Net Mvc Utilities and Helpers I'm really new to ASP.Net Mvc, but not new to Asp.Net. I was aware of all of the HtmlHelper class, but I was having problems with ecoding issues using Html.ActionLink. I asked a question here and got an answer right away about using the UrlHelper class, which I had no idea even exis...
{ "language": "en", "url": "https://stackoverflow.com/questions/423007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: GWT -- Hosted mode fonts look larger than compiled version When I create an application on my laptop it compiles and renders just fine. If I compile the page and put it on a server to host it, it still renders just fine on multiple computers. However, if I transfer the code to my desktop and run it on my desktop th...
{ "language": "en", "url": "https://stackoverflow.com/questions/423013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: selecting xml from sql server 2005 (row shows up as null) I have a ridiculously long xml row, it has > 800000 characters. The 'client' is also the 'server'. The OS is windows 2k8 x64. The database has plenty of memory as does the client. The problem is that once i hit some magic number of characters - exactly 4367...
{ "language": "en", "url": "https://stackoverflow.com/questions/423023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Interfaces in Java: cannot make implemented methods protected or private I know that an interface must be public. However, I don't want that. I want my implemented methods to only be accessible from their own package, so I want my implemented methods to be protected. The problem is I can't make the interface or the...
{ "language": "en", "url": "https://stackoverflow.com/questions/423032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How can I permanently bypass Windows XP startup? I have an application for Windows XP. This application is deployed with the hardware. The application is the only application that ever runs on these machines. These machines are never connected to the internet. I'm interested in instant-on (or quick-on) options t...
{ "language": "en", "url": "https://stackoverflow.com/questions/423035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ruby Object Member Access: How's that Done? Having looked at this question: How do I dump an object's fields to the console? I have a related issue. I'm relatively new to Ruby, so this is hopefully blindingly obvious. I have what I believe to be a Ruby object, generated from the MIME::Types library. I'm looking to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/423055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to programatically launch Microphone Volume control panel in Windows Vista? I want to let the user adjust the Mic volume. Rather than reinventing the wheel, we (in XP) would just launch the Volume control panel (by running sndvol32.exe). You can bring up the Speaker Volume control in Win Vista by shelling out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/423062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: google maps flex API: handle both double and single clicks? how do you tell a single mouse click from a double click? my single click listener seems to be trapping all the double clicks as well: tz locator it's a known issue for the flash/flex API but the js workaround doesn't seem to handle both either: code.google...
{ "language": "en", "url": "https://stackoverflow.com/questions/423065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flex 3 - Must I add components before setting their attributes when using AS3? Let us say that I have a Flex 3 mxml component, call it A. A has a get/set attribute called 'b'. Within A I have another internal component C, which is specified using mxml. When "instantiating" component A within mxml, I can specify the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/423070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Weird ASP.NET AJAX Bug / 32-bit to 64-bit I'm getting a weird error from my sites ever since upgrading to Windows 2008 64-bit. I have most of my app pools running in 64-bit mode (all but one, used for a legacy ASP.NET 1.1 application). On the sites that are running on 64-bit, I've been getting errors from ASP.NET AJ...
{ "language": "en", "url": "https://stackoverflow.com/questions/423071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WPF - Refer to app icon in code i have added an icon to a WPF app in the project properties. How do I refer to that icon so I can add it to a NotifyIcon that I am creating for system tray. In code that is?? System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon(); ni.Icon = new System.Drawing.I...
{ "language": "en", "url": "https://stackoverflow.com/questions/423081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Programmatic iPod Backup on Linux Are there any publicly available libraries or APIs out there on Ubuntu that allow me to programmatically archive the contents of my iPod? If no library or API exists, what alternative options do I have for saving the contents of my iPod? A: Looks like gtkpod can do it. Looking ove...
{ "language": "en", "url": "https://stackoverflow.com/questions/423085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Use RegExp to match a parenthetical number then increment it I've been trying to find a way to match a number in a Javascript string that is surrounded by parenthesis at the end of the string, then increment it. Say I have a string: var name = "Item Name (4)"; I need a RegExp to match the (4) part, and then I need ...
{ "language": "en", "url": "https://stackoverflow.com/questions/423107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Ignoring try block in C# command line program I have a command line program in C# that I've wrapped with a try-catch block to keep it from crashing the console. However, while I am debugging it, if an exception is thrown somewhere in the DoStuff() method, Visual Studio will break on the "catch" statement. I want V...
{ "language": "en", "url": "https://stackoverflow.com/questions/423110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the best way of implementing a messaging queue table in mysql It's probably the tenth time I'm implementing something like this, and I've never been 100% happy about solutions I came up with. The reason using mysql table instead of a "proper" messaging system is attractive is primarily because most applicatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/423111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: How do I store program variables in an iPhone application that will survive a program exit? I need to keep program variable values in an iPhone application when the application is exited. Does the SDK give the programmer any non volitile memory to use? How much is available? Will it be kept thru a power cycle? Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/423114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Beginner Rhino Mock problem So I'm new to rhino mocks and I'm trying to get it going in a MVP patterned project I'm on. So I've got an interface representing my View and a class for my Presenter like so: public interface IView { string SomeData { get; set; } } public class Presenter { public IView View { get; s...
{ "language": "en", "url": "https://stackoverflow.com/questions/423127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }