text
stringlengths
8
267k
meta
dict
Q: Good way to sanitize input in classic asp I have to update old projects at work. I do not have any experience with classic asp, although i'm familiar with php scripting. * *Are there any functions I should use? *Can you provide me with a good function for some basic protection? *Is there something like a parame...
{ "language": "en", "url": "https://stackoverflow.com/questions/444181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to prevent deadlocks in the following C# code? The following C# class is used in a multithreaded enviroment. I removed very much of the actual code. The problem occurs when calling MethodA and MethodB almost simultaneously. The order of the lock in the IsDepleted property doesn't solves the problem. Removing loc...
{ "language": "en", "url": "https://stackoverflow.com/questions/444191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IStreamBufferMediaSeeking setPosition doesn't seem to render I have created two DirectShow graphs. One captures from a Hauppauge HD-PVR and stores it in a StreamBufferSink. The second one uses a StreamBufferSource, sends the output to an MPEG-2 Demultiplexer, sending the video to the ArcSoft Video Decoder and on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/444192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: O/R mapping tools ASP Are there O/R mapping tools for ASP (not ASP.NET) and are these useful in ASP? Lieven Cardoen A: A quick scan a google search and i don't see anything that states classic ASP. Given the somewhat dated platform that ASP is, i doubt any major players would appear in that space. A: I wrote my ow...
{ "language": "en", "url": "https://stackoverflow.com/questions/444198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Prevent a user from closing a browser window using "X"? Can I tell, using javascript, whether a user has clicked on the "X" icon on a browser dialog, or the "OK"/"Cancel" buttons? I have code I need to run when the window closes, but it will only run when OK or Cancel are clicked. I currently capture the onunload ev...
{ "language": "en", "url": "https://stackoverflow.com/questions/444204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I set the Output directory for a C++ project built by msbuild? I have a MSBuild .proj file that is compiling a mixture of C# and C++ projects. The C# projects compile output (.exe/.dlls) to the OutputPath I specify, but when I specify OutputPath for the C++ projects (which calls vcbuild.exe), the OutputPath i...
{ "language": "en", "url": "https://stackoverflow.com/questions/444207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I rotate log files monthly using Perl? In Unix, I need to be able to archive log files into monthly folders, labelled accordingly. How do I do this in Perl? A: Does it have to be Perl? Have you tried logrotate? As far as a Perl solution: mkdir will create the directories, and if you use POSIX 'strftime';, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/444208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I send emails outside my domain with Exchange 2007 and c# I am able to send emails using the typical C# SMTP code across Exchange 2007 as long as both the from and to addresses are within my domain. As soon as I try to send emails outside the domain I get: Exception Details: System.Net.Mail.SmtpFailedRecipien...
{ "language": "en", "url": "https://stackoverflow.com/questions/444210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In firefox, how to change color of text in a treecell using javascript BACKGROUND: I have the following XUL fragment <tree id="treeToChange" flex="1"> <treecols> <treecol label = "First Column" id="c1" flex="1"/> <treecol label = "Second Column" id="c2" flex="1"/> </treecols> <treechildren> <treeit...
{ "language": "en", "url": "https://stackoverflow.com/questions/444213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make console program to disappear and work in background? How can I make console program disappear and work in the background? I mean, I don't want to see the program, but I want to see it running in the task manager. Thanks. A: Assuming Windows and .NET: You could set its output type to "Windows Application...
{ "language": "en", "url": "https://stackoverflow.com/questions/444223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Problem with an Access 2007 Project connecting to Sql Server 2005 So I've created an Access Project for one of my users so he can connect to a reporting database. The .adp project connects to the DB and he can query data to his heart's content. The problem is, no queries can be saved. Whenever he opens the projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/444225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Communication between modules I have an application that consists from the following three modules: * *Search (to search for objects) *List (to display the search results) *Painter (to allow me to edit objects) - this module isn't always loaded (Each object is a figure that I can edit in the painter). When I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can you use the asp.net membership provider in a windows application? The Asp.Net membership provider has some clear uses in a web app. I am thinking about trying to leverage some of the features in a windows application (more specifically WPF). Does anyone know if it is possible to use the core features in a wind...
{ "language": "en", "url": "https://stackoverflow.com/questions/444230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is the best way to embed HTML in an RSS feed? I am using Django's RSS capabilities to build an RSS feed. The <description> of the RSS feed items contains HTML markup. Currently, I am just injecting the HTML markup into the feed using the following template: {{ obj.post }} Django, of course, translates special ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Revision control locking: Is the jury still out? When I'm online it seems that everyone has agreed that using the exclusive locking workflow in source control is a Bad Thing. All the new revision control systems I see appear to be built for edit and merge workflows, and many don't even support exclusive locks at all...
{ "language": "en", "url": "https://stackoverflow.com/questions/444235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Are there any .NET data providers for Oracle that do not require the Oracle Client to be installed? I am developing a rich client application that will use the Entity Framework (with DevArt's DotConnect for Oracle) to connect to a central Oracle database. However, I have found that this scenario requires every clie...
{ "language": "en", "url": "https://stackoverflow.com/questions/444243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How will I know when to create an interface? I'm at a point in my development learning where I feel like I must learn more about interfaces. I frequently read about them but it just seems like I cannot grasp them. I've read examples like: Animal base class, with IAnimal interface for things like 'Walk', 'Run', 'GetL...
{ "language": "en", "url": "https://stackoverflow.com/questions/444245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: How to prevent Sql-Injection on User-Generated Sql Queries I have a project (private, ASP.net website, password protected with https) where one of the requirements is that the user be able to enter Sql queries that will directly query the database. I need to be able to allow these queries, while preventing them from...
{ "language": "en", "url": "https://stackoverflow.com/questions/444248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to store a list in a db column I would like to store an object FOO in a database. Lets say FOO contains three integers and a list of "Fruits". The list can have any length, the only thing I know is that the all the fruits allowed are stored in another table. Can I store the fruit list in a column? A: If you're...
{ "language": "en", "url": "https://stackoverflow.com/questions/444251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Is there an advantage to upgrade Binutils from 2.16.1 to 2.19? Why? In the PSPSDK (Homebrew) we are using the Binutils 2.16.1 to assemble and link the code for the PlayStation Portable, however that release is getting quite outdated (3 versions have superseded it). The community and me have been updating the GCC and...
{ "language": "en", "url": "https://stackoverflow.com/questions/444260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I count checked checkboxes across all pages of a gridview using jquery? I want to instantly update a status line indicating the number of checked checkboxes across all pages of an asp.net gridview. Right now I am only ably to count the number of checkboxes that are checked on the current gridview page. Here ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Connecting http request/response model with asynchronous queue What's a good way to connect the synchronous http request/response model with an asynchronous queue based model? When the user's HTTP request comes it generates a work request that goes onto a queue (beanstalkd in this case). One of the workers picks up ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: passing functions as arguments in ruby I'm trying to wrap my head around functional programming in ruby and there doesn't seem to be much good documentation out there. Essentially, I'm trying to write a combine function that would have a Haskell type signature of: [a] -> [a] -> (a -> a -> a) -> [a] So combine([1,2...
{ "language": "en", "url": "https://stackoverflow.com/questions/444285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Making an application run in multiple zones I am currently revising for exam 70-536. Is there a sample of how to configure an application to run in multiple environments? E.g. intranet and internet. I can't find a good code sample for this. Anyone have one? A: I think these exam questions are about CAS. Make sure y...
{ "language": "en", "url": "https://stackoverflow.com/questions/444286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting a WCF service to map POST'd parameters to arguments I have a legacy service I'm looking to update to WCF and one of it's behaviours is to allow clients to POST a request that has something like: MyService.asmx/ProcessDocument With Post data looking like: request=<big block of xml> Now in the ASMX days this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Assign Errors to projects in Logger for MSBuild2008 with /m:x (x > 1) We build using MSBuild2005 with a self-written Logger class that keeps track of which projects are currently building and assigns the incoming errors/warnings to the projects. This was a kind of tricky because MSBuild also calls ProjectStarted/Fin...
{ "language": "en", "url": "https://stackoverflow.com/questions/444292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to efficiently build a tree from a flat structure? I have a bunch of objects in a flat structure. These objects have an ID and a ParentID property so they can be arranged in trees. They are in no particular order. Each ParentID property does not necessarily matches with an ID in the structure. Therefore their co...
{ "language": "en", "url": "https://stackoverflow.com/questions/444296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "192" }
Q: VMWare - Virtual operating system static IP address What is the best way to have a virtual operating system have a static IP address in VMWware. I would like to keep the IP address static since it is a virtual server. A: If you want the VM slice / VM machine (guest) to have a static IP, assign it to the VM slice. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What would be the fastest way to concatenate three files in C#? I need to concatenate 3 files using C#. A header file, content, and a footer file, but I want to do this as cool as it can be done. Cool = really small code or really fast (non-assembly code). A: If your files are text and not large, there's something ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: c# hosting a usercontrol in IE Our web page is only available internally in our company and we am very intrested in being able to offer interactive .net usercontrols on our departments website in the .Net 2.0 enviorment. I have been successful with embeding the object as so: <object id="Object1" classid="http:Embed...
{ "language": "en", "url": "https://stackoverflow.com/questions/444319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a windows utility similar to HTML Tidy for Javascript? I want to cleanup some javascript files and reformat them with nice indents, etc, Are there recommendations for utilities to do this under Windows? A: Beautify Javascript is a good, simple option. (Oops. Thought I grabbed the link for the app, not the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C++ Question about default constructor What does it mean to call a class like this: class Example { public: Example(void); ~Example(void); } int main(void) { Example ex(); // <<<<<< what is it called to call it like this? return(0); } Like it appears that it isn't calling the default constructor in that c...
{ "language": "en", "url": "https://stackoverflow.com/questions/444322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WPF BitmapSource ImageSource I am binding an Image.Source property to the result of the property shown below. public BitmapSource MyImageSource { get { BitmapSource source = null; PngBitmapDecoder decoder; using (var stream = new FileStream(@"C:\Temp\logo.png", FileMode.Open, FileAc...
{ "language": "en", "url": "https://stackoverflow.com/questions/444331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: sql statistics io scan count explanation Simple question, but I haven't found a good explanation on google. When using Set Statistics IO ON, the logical reads and scan count is provided in the message window of management studio. If I have: tblExample, scan count 5, logical reads 20 What does scan count signify? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/444344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How to backup a Web.config before Installing with VS MSI Installer I am using a regular Visual Studio Setup Project to deploy my ASP.NET application. I need to handle the case of an existing web.config existing in the target directory. When one is found, it needs to be renamed before the install takes place. If this...
{ "language": "en", "url": "https://stackoverflow.com/questions/444354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Forcing symbol export with MSVC I have a application and several plugins in DLL files. The plugins use symbols from the application via a export library. The application links in several static libraries and this is where most of the symbols come from. This works fine as long as the application uses a symbol. If the...
{ "language": "en", "url": "https://stackoverflow.com/questions/444356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Testing a PHP script on a local computer New to PHP and web development in general. I am trying to get information from an HTML form to appear in a table on another web page after clicking submit. So I installed Apache and then PHP on my local PC and expected to be able to test a PHP script locally however it does n...
{ "language": "en", "url": "https://stackoverflow.com/questions/444372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I find out the path of the currently executing script? Duplicate of: In Python, how do I get the path and name of the file that is currently executing? I would like to find out the path to the currently executing script. I have tried os.getcwd() but that only returns the directory I ran the script from not th...
{ "language": "en", "url": "https://stackoverflow.com/questions/444376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a streaming API for JSON? Is DOM the only way to parse JSON? A: If you want to use pure javascript and a library that runs both in node.js and in the browser you can try clarinet: https://github.com/dscape/clarinet The parser is event-based, and since it’s streaming it makes dealing with huge files possibl...
{ "language": "en", "url": "https://stackoverflow.com/questions/444380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Visual Studio: How can I see the same file in two separate tab groups? I want to be able to edit one method while looking at another method in the same file, as reference. Can this be done? A: Be on the tab you want to duplicate,then click in the menu bar at the top onWindow > New Window Finally drag & drop the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/444382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "224" }
Q: Gotchas while bulk loading CouchDB I've got ~15k rows in MSSQL 2005 that I want to migrate into CouchDB, where one row is one document. I have a CLR-UDF that writes n rows to an schema-bound XML file. I have an XSL transform that converts the schema-bound XML to JSON. With these existing tools I'm thinking I can g...
{ "language": "en", "url": "https://stackoverflow.com/questions/444386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I pass command-line arguments via file association in Vista 64? How can one pass command line arguments via file association in Vista 64? I recently built a PC running Vista Ultimate 64-bit. I noticed several of the Perl scripts I transferred failed due to command-line arguments not being passed. As a simp...
{ "language": "en", "url": "https://stackoverflow.com/questions/444388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: 'NT AUTHORITY\NETWORK SERVICE' not inheritting local group permissions? We are deleting images that have been uploaded to our server using an ASP.NET web page. The site is running under 'NT AUTHORITY\NETWORK SERVICE' in IIS. On the IIS server we have created a local group 'Full_Access' that we have added the 'NT AUT...
{ "language": "en", "url": "https://stackoverflow.com/questions/444395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Display problem with Update Panel in ASP.NET I'll try to explain my problem the best I can, here goes: I have an update panel on an ASP.NET page and a Panel server control inside it. I have an rounded corners extender attached to the Panel server control and the extender has a solid background with a solid border....
{ "language": "en", "url": "https://stackoverflow.com/questions/444397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does my loop use 100% CPU and never end? I have this method: private delegate void watcherReader(StreamReader sr); private void watchProc(StreamReader sr) { while (true) { string line = sr.ReadLine(); while (line != null) { if (stop) { r...
{ "language": "en", "url": "https://stackoverflow.com/questions/444401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Server Profiler? I am looking for SQL Server Profiler in SQL Server 2008 express edition.I have an instance of SQL Server 2008 running in my machine but I want the profiler too.Does it come with the installation or do I have to install it separately? A: you need to install the dev version for profiler or get th...
{ "language": "en", "url": "https://stackoverflow.com/questions/444402", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL: Get value at index in binary value Is there a SQL command that could be used in a query, stored procedure, function, that would work against a Binary Type similar to the following C# code? if (someBinaryArray[index] == 0) { ... I'm wanting to check if an index of a position in the binary is a certain value in...
{ "language": "en", "url": "https://stackoverflow.com/questions/444405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using parameters in a Restlet Client Request I have: Request request = new Request(Method.GET, "https://www.awebsite.com/login"); Client client = new Client(Protocol.HTTPS); Response response = client.handle(request); ... response.getEntity().write(System.out); But I don't know how to set the login parameters... I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are lots of inheritied single-plugin profiles in Maven a good idea? In our infrastructure, we have lots of little Java projects built by Maven2. Each project has its own pom.xml that ultimately inherits from our one company "master" parent pom. We've recently started adding small profiles to our parent pom, disabled...
{ "language": "en", "url": "https://stackoverflow.com/questions/444426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I focus a foreign window? I have an application which may only have one instance of itself open at a time. To enforce this, I use this code: System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses(); System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess(); for...
{ "language": "en", "url": "https://stackoverflow.com/questions/444430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Develop Blackberry apps using native API or J2ME? We're about to build a Blackberry application but would love some input on whether to implement using J2ME (MIDlet based) or Blackberry native (UIApplication). I understand some of the tradeoffs. J2ME will be more flexible if we want to port the app to other devices...
{ "language": "en", "url": "https://stackoverflow.com/questions/444431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Where can I find a comprehensive list of new features for C# 4.0? I've heard bits and pieces here and there, but I have yet find a comprehensive list of new features for C# 4.0? Does anyone know what they are or where I can find them? Duplicate of: New Cool Features of C# 4.0 and/or: C# 4.0 Specification Beta? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: asp.net web application compile and deployed on x64 vs x86 My web application crashes almost once a week due to not enought memory error. Although server has 8gb of memory and it's server 2003 x64. And almost 5gb is always free. I compile my application with Any CPU option in studio 2008. My laptop that i use to bui...
{ "language": "en", "url": "https://stackoverflow.com/questions/444437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamically add multiple instances of the same user control type when button is clicked Is it possible to add instances of the same user control when an "add" button is clicked and maintain ViewState? The user interface here is similar to the Gmail file-attachment process, where the user can click "attach another fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/444440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can specific Delphi hints be disabled? In Delphi, you can use compiler directives to disable specific warnings, such as {$WARN USE_BEFORE_DEF OFF} But when I tried to do that with a specific hint, whose underscore_style_name I got out of the helpfile, the compiler said it doesn't know what {$HINT} is. So is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: FindControl in Infragistics webDataGrid I have ig:TemplateDataField that contains label. In InitializeRow event handler I try to find that label with e.Row.FindControl but I get null. I was not able to find another way to find my label. How to look for controls in WebDataGrid rows during InitializeRow event? A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/444455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MSI for multiple websites WITHOUT custom actions I would like to create an installer that installs 6 websites, all of which rely on a data access library. So the solution contains 6 web applications, and 1 class library. Question is: how can I accomplish this without using custom actions? So far, the only thing I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/444464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why doesn't this SQL statement work? SELECT * FROM table1, table2 WHERE table1.user_id = table2.id AND table1.content = news AND table1.content_id = 1 that wont work. cant u have two "AND" in a sql statement?? //Tomek A: news is what? Some sort of parameter? Value of the field? A word which should occur in the fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/444467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Page_Load called in Firefox, but not IE I've been thrown into an ASP.NET project and I've got a page which contains a control that is fetched via AJAX. The Page_Load function of the control does a little bit of logic necessary to get the correct values from the Query string. The problem is that the Page_Load functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/444468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I get all rows with keys provided in a list using SQLalchemy? I have sequence of IDs I want to retrieve. It's simple: session.query(Record).filter(Record.id.in_(seq)).all() Is there a better way to do it? A: The code as is is completely fine. However, someone is asking me for some system of hedging betwee...
{ "language": "en", "url": "https://stackoverflow.com/questions/444475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: What is a fractal? Duplicate of How to program a fractal What are fractals? Is this is one of the concepts that is brought over from Mathematics to programming to simplify or solve a particular set of problems? I am closing this question and have posted a related question A: If you want to know about fractals ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: using java and usb: Which api? jsr-80, jusb, ...? I would like two java programs to communicate directly over the USB without going through a device or cable. Don't ask me why, I don't know the details or reasoning behind this decision. I have found jusb and jsr-80 to be two java/usb APIs to do this. They work on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Data Breakpoints by Variable Name Is there a simple way to define a breakpoint, in Visual C++ 2005, that will pause the program whenever a certain value changes? I found Data Breakpoints, but those require a memory address, and provide no simple way to tie that to a variable. A: "In the Address box, type a memory a...
{ "language": "en", "url": "https://stackoverflow.com/questions/444502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How are debug consoles implemented in Python? I've seen a couple of Python IDE's (e.g. PyDev Extensions, WingIDE) that provide a debug console - an interactive terminal that runs in the context of the method where the breakpoint is. This lets you print members, call other methods and see the results, and redefine me...
{ "language": "en", "url": "https://stackoverflow.com/questions/444509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Custom dynamically created Menus producing some strange errors The background is I have a custom control that is a asp:Menu that is linked to an xmldatasource. The xmldatasource is created dynamically depending on the user privies. Here is the load event for the custom control: protected void Page_Load(object se...
{ "language": "en", "url": "https://stackoverflow.com/questions/444510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VB.NET and Crystal Reports - datasets and more I'm not sure if this is even possible but here goes: Currently I have a crystal report with a few header fields and detail lines ( of course) I pass a dataset containing a header datatable and a detail datatable. Everything works as expected... as long as I have only 1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: User32's ShowWindow doesn't act as expected I am using the ShowWindow method from User32 to hide a window (cmd.exe) from the user (mainly to prevent them from closing it). When the user opens the form, the process is started, and hid, then when the form is closing the process is killed. However, when the form is ope...
{ "language": "en", "url": "https://stackoverflow.com/questions/444517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Import and Export Excel - What is the best library? In one of our ASP.NET applications in C#, we take a certain data collection (SubSonic collection) and export it to Excel. We also want to import Excel files in a specific format. I'm looking for a library I can use for this purpose. Requirements: * *Excel 2007 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "184" }
Q: SQL Server 2000 - Query a Table’s Foreign Key relationships Nearly identical to Query a Table's Foreign Key relationships, but for SQL Server 2000 For a given table 'foo', I need a query to generate a set of tables that have foreign keys that point to foo. A: SELECT o2.name FROM sysobjects o INNER JOIN sysforeignke...
{ "language": "en", "url": "https://stackoverflow.com/questions/444523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How Would I know my Azure Table Storage AccountName? I'm trying to move some table storage in Azure from local storage to the cloud. I had been using the "devstoreaccount1" for local access, but I'm not sure what I need to put there for moving to the cloud. It's not the user account I used to sign up for my Azure a...
{ "language": "en", "url": "https://stackoverflow.com/questions/444528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: MySQL date/time calculation I have a date and time column in my mysql table called start_date and start_time respectively. I want my users the ability to set reminders for themselves to be sent X hours before start_time, min. 1 hour and max 24 hours. I'll be running a CRON script to send these reminders. Right now I...
{ "language": "en", "url": "https://stackoverflow.com/questions/444544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RESTful Multiple Updates (Example: Clear a Shopping Cart)? Let's say I have I have an online store with a "shopping cart" feature and I want to implement an "empty cart" link in a RESTful way. For simplicity, let's say my resources are a Cart that contains CartItems, each of which has a Product. My URIs might be: #...
{ "language": "en", "url": "https://stackoverflow.com/questions/444545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to design a database for unkown amount of 'meta'-data I want to store certain items in the database with variable amount of properties. For example: An item can have 'url' and 'pdf' property both others do not en instead have 'image' and 'location' properties. So the problem is an some items can have some proper...
{ "language": "en", "url": "https://stackoverflow.com/questions/444554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Objective-C Delegation Explained to a Java Programmer I am fairly new to Objective-C, but experienced in Java. Is there the equivalent concept of Objective-C "delegation" in Java, so that I may understand this notion better? Would there be a way to emulate the delegation concept in Java? A: Delegation is just a way...
{ "language": "en", "url": "https://stackoverflow.com/questions/444558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I tell if a file or folder is busy, e.g. the Finder is busy copying to it? I have tried: * *Checking the FSCatalogInfo nodeFlags to see if kFSNodeForkOpenBit is set (using kFSNodeForkOpenMask). *Checking whether the creator code is between kFirstMagicBusyFiletype and kLastMagicBusyFiletype. *Checking t...
{ "language": "en", "url": "https://stackoverflow.com/questions/444561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I add an icon to an OCX made with Delphi so that it is visible in VB? I made an OCX with Delphi 2007. Now my customer claims that there is no icon in his VB when he installs this OCX. How can I add such an icon to my OCX? A: According to this old page the constructor of TActiveXControlFactory in the initial...
{ "language": "en", "url": "https://stackoverflow.com/questions/444562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to convert a string of bytes into an int? How can I convert a string of bytes into an int in python? Say like this: 'y\xcc\xa6\xbb' I came up with a clever/stupid way of doing it: sum(ord(c) << (i * 8) for i, c in enumerate('y\xcc\xa6\xbb'[::-1])) I know there has to be something builtin or in the standard lib...
{ "language": "en", "url": "https://stackoverflow.com/questions/444591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "168" }
Q: mod_rewrite rules and content negotiation I am relatively new to mod_rewrite, but have a site which I would like to have "pretty urls." Similarly to SO :). I am attempting to have things like: "http://www.whatever.com/search/test" get rewritten to "http://www.whatever.com/search.php?q=test" and have had some limited...
{ "language": "en", "url": "https://stackoverflow.com/questions/444592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPhone SDK: Play a single WAV from a button I am currently trying out this code: NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; theAudio.delegate = self; [theAudio pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/444595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Release build not available WPF I am writing a fairly simple WPF desktop application and under build\configuration manager, release is not an option. The only available options are Debug, New, and Edit. Anyone have an idea on why this is? Related: the control library in the same solution does have release as a build...
{ "language": "en", "url": "https://stackoverflow.com/questions/444596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why would Apache be URL decoding my query string? My Web host has refused to help me with this, so I'm coming to the wise folks here for some help "black-box debugging". Here's an edited version of what I sent to them: I have two (among other) domains at dreamhost: 1) thefigtrees.net 2) shouldivoteformccain.com I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Regex to block all < in a String I'm trying to create a Regex to block all < and > in a String except when used with <select>. Can anyone suggest a Regex for that? I'll be using it with javax.util.Pattern. I'm trying to write a solution to block the injection attack and XSS attempts through request and URL. For tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/444602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Convincing a large company to use free software? I'm currently a developer at my first job right out of college. I work for a large company, and the trend I notice with them is that they tend to go with more expensive, closed source software about 99% of the time, while there are perfectly good open source alternat...
{ "language": "en", "url": "https://stackoverflow.com/questions/444606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Where can I find the source for a small, well-designed C# application (for learning purposes)? Can anyone direct me to a smallish C# application that would be symbolic of the "right way" to design a program? I'm looking for a relatively simple (potentially trivial) program from which to analyze and learn. The applic...
{ "language": "en", "url": "https://stackoverflow.com/questions/444615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I force a spring container not to return a singleton instance of a bean? When I call getBean(name) on a BeanFactory, I get back an instance of the bean defined in the application context. However, when I call getBean(name) again (with the same name,) I get the same instance of the bean back. I understand ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/444623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: C# thread pool limiting threads Alright...I've given the site a fair search and have read over many posts about this topic. I found this question: Code for a simple thread pool in C# especially helpful. However, as it always seems, what I need varies slightly. I have looked over the MSDN example and adapted it to my...
{ "language": "en", "url": "https://stackoverflow.com/questions/444627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Programming Fractals Would learning to program fractals help think clearly about certain set of programming problems? A: Fractal programming would introduce you to recursion, iteration, graphics programming concepts, image processing, and user interface design. From a mathematics point of view, you would learn abou...
{ "language": "en", "url": "https://stackoverflow.com/questions/444628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to disable field list at runtime in performancepoint? I have a dashboard that I am displaying, and whenever my users click on a pivotchart or pivottable the field list automatically pops up. How can I prevent this from occurring? A: If you wish to use ad hoc analysis tools such as pivottables and charts in a da...
{ "language": "en", "url": "https://stackoverflow.com/questions/444632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: strange HashMap.put() behaviour I am attempting to troubleshoot an intermittent failure that appears to be related to removing an object from a HashMap and then putting that same object back using a new key. My HashMap is created as follows: transactions = new HashMap<Short, TransactionBase>(); The code that does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/444638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Exceptions vs return codes : do we lose something (while gaining something else)? My question is pretty vague :o) - But here is an example : When I was writing C code, I was able to log counter's value when something failed : <...> for ( int i = 0 ; i < n ; i++ ) if ( SUCCESS != myCall()) Log( "...
{ "language": "en", "url": "https://stackoverflow.com/questions/444654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I reference a dll in the GAC from Visual Studio? This assembly is in the GAC: Microsoft.SqlServer.Management.RegisteredServers.dll How can I add a reference to this assembly in Visual Studio? I can view the file in c:\windows\assembly\ A: In VS2010, from the Add Rerences window you can click 'Browse' and na...
{ "language": "en", "url": "https://stackoverflow.com/questions/444655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: How do I set a column value to NULL in SQL Server Management Studio? How do I clear the value from a cell and make it NULL? A: Ctrl+0 or empty the value and hit enter. A: If you are using the table interface you can type in NULL (all caps) otherwise you can run an update statement where you could: Update table set...
{ "language": "en", "url": "https://stackoverflow.com/questions/444657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "300" }
Q: Strange parameter sequence using Reflection.Emit I have been looking at Reflection.Emit recently. I wrote a simple program that generates a DynamicMethod which simple calls another method with the same parameters class Program { static void Main(string[] args) { Program p = new Program(); p.T...
{ "language": "en", "url": "https://stackoverflow.com/questions/444662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What would cause Perl to dump core? What are the most common reasons that I would be getting this error from running a Perl script: Memory fault(coredump) I am running two SQL commands beforehand that only store ~1500 rows each with 6 fields. The SQL works fine out of the script, so I don't think I'm getting the er...
{ "language": "en", "url": "https://stackoverflow.com/questions/444663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can't Attach ASPNETDB.MDF on Vista I can't connect to the ASPNETDB.MDF file in the App_Data that is created by the ASP.NET MVC Beta project from Visual Studio 2008 or SQL Management Studio 2008 Express on Vista. The project is in C:\Users\Matthew\Documents\Visual Studio 2008\Projects\MVCTest so the MDF file is in C:...
{ "language": "en", "url": "https://stackoverflow.com/questions/444667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where can I learn more about "ant colony" optimizations? I've been reading things here and there for a while now about using an "ant colony" model as a heuristic approach to optimizing various types of algorithms. However, I have yet to find an article or book that discusses ant colony optimizations in an introduct...
{ "language": "en", "url": "https://stackoverflow.com/questions/444671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: SQL - Use results of a query as basis for two other queries in one statement I'm doing a probability calculation. I have a query to calculate the total number of times an event occurs. From these events, I want to get the number of times a sub-event occurs. The query to get the total events is 25 lines long and I do...
{ "language": "en", "url": "https://stackoverflow.com/questions/444673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Parsing XML into a SQL table WITHOUT predefining structure. Possible? So using the code below... can I parse @xml_data into a table structure without predefining the structure? DECLARE @receiveTable TABLE(xml_data XML) DECLARE @xml_data XML DECLARE @strSQL NVARCHAR(2000) SET @strSQL = 'SELECT * INTO #tmp1 FROM sysob...
{ "language": "en", "url": "https://stackoverflow.com/questions/444678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MVC: Repositories and Services I am confused as to the limitations of what gets defined in the Repositories and what to leave to the Services. Should the repository only create simple entities matching tables from the database or can it create complex custom object with combinations of those entities? in other word...
{ "language": "en", "url": "https://stackoverflow.com/questions/444694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can cookies be copied between machines to impersonate a user? We have an application that among other things, checks the existence of a cookie and reads and decrypts the contents of the cookie. Though the data stored inside the cookie is not sensitive, it has been encrypted via TripleDes encryption. A question was r...
{ "language": "en", "url": "https://stackoverflow.com/questions/444698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }