text
stringlengths
8
267k
meta
dict
Q: How to declare an array inline in VB.NET I am looking for the VB.NET equivalent of var strings = new string[] {"abc", "def", "ghi"}; A: Dim strings() As String = {"abc", "def", "ghi"} A: Dim strings As String() = New String() {"abc", "def", "ghi"} A: Not a VB guy. But maybe something like this? Dim strings = N...
{ "language": "en", "url": "https://stackoverflow.com/questions/291413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: .NET performance tips for enterprise web applications For enterprise web apps, every little bit counts. What performance tips can you share to help programmers program more efficiently? To start it off: * *Use StringBuilders over strings since strings are Mutable (they get re-created every time you modify them). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Canonical way to parse the command line into arguments in plain C Windows API In a Windows program, what is the canonical way to parse the command line obtained from GetCommandLine into multiple arguments, similar to the argv array in Unix? It seems that CommandLineToArgvW does this for a Unicode command line, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Date Comparison in Dynamic Where Clause in Linq Gives Overload Exception I'm trying to inject a dynamic where clause in my Linq to SQL query and I get an overload exception. The same expression work when added in the query proper? qry.Where(Function(c) c.CallDate < Date.Now.AddDays(-1)) Any thoughts on how to thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/291444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: F# Beginner: retrieving an array of data from a server I'm trying to grab data from a MySQL database. Approach 2 - apply/map style I'm using the MySQL ADO Reference to try to build this system. In particular, the example found at 21.2.3.1.7. (using a pseudo code) let table = build_sequence(query.read) Where query.r...
{ "language": "en", "url": "https://stackoverflow.com/questions/291445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is it possible for a running python program to overwrite itself? Is it possible for a python script to open its own source file and overwrite it? The idea was to have a very simple and very dirty way for a python script to download an update of itself so that the next time it is run it would be an updated version. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: XML - Data At Root Level is Invalid I have an XSD file that is encoded in UTF-8, and any text editor I run it through doesn't show any character at the beginning of the file, but when I pull it up in Visual Studio's debugger, I clearly see an empty box in front of the file. I also get the error: Data at the root...
{ "language": "en", "url": "https://stackoverflow.com/questions/291455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: ActionController::MethodNotAllowed after reloading routes? I have an application where I'm dynamically loading routes by a model, and calling ActionController::Routing::Routes.reload! after creating/updating that model. The problem is that after doing this, I'm receiving the following error when I try to hit that ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/291459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I evaluate the response type of an $.ajax() call in success callback? I am using jQuery to make an AJAX request to a remote endpoint. That endpoint will return a JSON object if there is a failure and that object will describe the failure. If the request is successful it will return HTML or XML. I see how to de...
{ "language": "en", "url": "https://stackoverflow.com/questions/291466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Search directory in SVN for files with specific file extension and copy to another folder? I would like my python script to search through a directory in SVN, locate the files ending with a particular extension (eg. *.exe), and copy these files to a directory that has been created in my C drive. How can I do this? I...
{ "language": "en", "url": "https://stackoverflow.com/questions/291467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DatagridView Not Displaying the error icon or error text? I have a win form (c#) with a datagridview. I set the grid's datasource to a datatable. The user wants to check if some data in the datatable exists in another source, so we loop through the table comparing rows to the other source and set the rowerror on th...
{ "language": "en", "url": "https://stackoverflow.com/questions/291475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Does VMWare Fusion 2 have the "linked clones" feature ala VMWare Workstation? The title pretty much says it all, but for those of you who are familiar with both the latest VMWare Fusion and the "linked clone" feature found in VMWare workstation, can you confirm whether this feature is currently present or absent in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Which library/program can be used to generate Java-bytecode? I know about BCEL, but this project seems to be dead, as it had no releases for two years. And the Java-world moves on. For example JDK 1.6 has a new class-file-format. So what library can be used to create bytecode for the JVM. If no library, a program is...
{ "language": "en", "url": "https://stackoverflow.com/questions/291492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Oracle Check Constraint I've been struggling with this check constraint for a few hours and was hoping someone would be kind enough to explain why this check constraint isn't doing what I think it should be doing. ALTER TABLE CLIENTS add CONSTRAINT CHK_DISABILITY_INCOME_TYPE_ID CHECK ((IS_DISABLED IS NULL AND DISABI...
{ "language": "en", "url": "https://stackoverflow.com/questions/291493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Python exception backtrace tells me where line ends, where does it begin? When A Python exception is thrown by code that spans multiple lines, e.g.: myfoos = [foo("bar", "baz", "quux", i) for i in range(10)] Python will report the line number of the last line, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/291508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: INotifyPropertyChanged vs. DependencyProperty in ViewModel When implementing the ViewModel in a Model-View-ViewModel architecture WPF application there seem to be two major choices how to make it databindable. I have seen implementations that use DependencyProperty for properties the View is going to bind against an...
{ "language": "en", "url": "https://stackoverflow.com/questions/291518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "375" }
Q: How does CurrentControlSet differ from ControlSet001 and ControlSet002? In the Windows registry, how does CurrentControlSet differ from ControlSet001 and ControlSet002? Which should be set when installing for all users? We are trying to add an environment variable for all users. Is this correct? HKLM\SYSTEM\CurrentC...
{ "language": "en", "url": "https://stackoverflow.com/questions/291519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Silent/No User Interaction modes for MySQL installation and Configuration Wizard? I am implementing an installer for one of our products that requires MySQL as a prerequisite. I would like to have a bootstrap program that queries the user for any information needed for any prerequisite products and our product. On...
{ "language": "en", "url": "https://stackoverflow.com/questions/291521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WPF: How can you add a new menuitem to a menu at runtime? I have a simple WPF application with a menu. I need to add menu items dynamically at runtime. When I simply create a new menu item, and add it onto its parent MenuItem, it does not display in the menu, regardless of if UpdateLayout is called. What must happ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Safari Frames Invisible Scrollbar I'm working on a website that uses not just frames, but frames within frames (ew, I know, but I don't get to choose). It actually works OK most of the time, but I'm running into a problem with some of the frames within frames in Safari (only). Some of the two-deep frames render in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: To YUI or not to YUI? I'm currently using the Yahoo YUI javascript library in a couple of my projects. However, I'm a little concerned about three things. First, they laid off 10% of their employees. Second, their stock price keeps falling: especially after ignoring the MS takeover earlier this year. Third, wha...
{ "language": "en", "url": "https://stackoverflow.com/questions/291534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How can I get a div to fill a table cell vertically? As a followup to this question on absolute positioning within a table cell, I'm trying to get something working in Firefox. Once again, I'm about 95% there, and there's just 1 little thing that's keeping me from declaring victory. Using the follow sample markup:...
{ "language": "en", "url": "https://stackoverflow.com/questions/291537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Solution Folders in VS2008 are Not Alphabetized I moved a bunch of projects to Solution Folders to chop up our list of projects into manageable folders, now each of the folders projects are not in alphabetical order. This only occurs on machines other than my own. Any ideas how to alleviate this? A: I actually did ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a way in javascript to detect if the unload event is caused via a refresh, the back button, or closing the browser? I am currently looking at the "unload" event of a window to try to determine how the "unload" event was triggered, but am having little success. Is there a way to determine how the javascript ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Why would VS2005 be looking for a file it's supposed to be generating? I'm working on a PocketPC app in Visual Studio 2005. The solution was building fine, then suddenly broke. The first error is this (assume the project is FooPDA): "Unable to find source file 'C:\FooPDA\obj\Release\FooPDA.exe' for file 'FooPDA.ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/291558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using mixed DLLs from /clr:pure projects I'm building a project along with a Dll. The Dll must support native code so I declared it as a /clr. My project was initialy also a /clr project and everything was fine. However I'd like to include some NUnit testing so I had to switch my main project from /clr to /clr:pure....
{ "language": "en", "url": "https://stackoverflow.com/questions/291559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to select a theme programmatically in Vista A software package I'm working on installs its own Windows theme and as part of the install tries to make it the current theme. We managed to get this working on Windows XP with a great many registry edits during the install (a reboot applies the changes) but Vista se...
{ "language": "en", "url": "https://stackoverflow.com/questions/291562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Drupal - Automate a Content Form Submission I would like to programatically (using php) fill out an existing drupal form to create a content type that is included in a contributed module. Details: The module is SimpleFeed and the content type is Feed. I would like to call the module's functions to accomplish this. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/291572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Query to list SQL Server stored procedures along with lines of code for each procedure I want a query that returns a list of all the (user) stored procedures in a database by name, with the number of lines of code for each one. i.e. sp_name lines_of_code -------- ------------- DoStuff1 120 DoStuff2 50 D...
{ "language": "en", "url": "https://stackoverflow.com/questions/291574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Is there any standard way of storing vector information in a database? I want to store a very large amount of vector data on a server and only poll the parts I need at a given point... This shouldn't be a problem. Is there any way to take a vector file like an svg file and import it into a database? I could always w...
{ "language": "en", "url": "https://stackoverflow.com/questions/291575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MySQL inserting data only if table doesn't exist Using strictly SQL (no PHP or anything else), is it possible to create a table and insert default data into that table only if that table doesn't exist? A: Use the CREATE TABLE ... SELECT format: create table if not exists tablename as select * from defaultdata; A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Prevent C preprocessor to do a specific macro subsitution How can I tell the preprocessor not to replace a specific macro? The specific problem is the following: Windows header files define the GetMessage macro. My C++ header files with my API have a GetMessage method. I do not want to rename my method. But when usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/291603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Multicast feed: use localhost? I am being sent an xml feed via multicast, but I don't know the multicast group address. Can I just use localhost instead? Socket socket = new Socket(AddressFamily.InterNetwork,SocketType.Dgram,ProtocolType.Udp); IPEndPoint ip = new IPEndPoint(IPAddress.Any,8888); socket.Bind(ip)...
{ "language": "en", "url": "https://stackoverflow.com/questions/291605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: reading a com port I'm trying to interface with a cdc card reader which outputs to a virtual com port. How does one go about opening a stream to read from a com port? A: You can use the SerialPort from System.IO.Ports.SerialPort It is available as a Form component in the Toolbox under Toolbox->Components->SerialP...
{ "language": "en", "url": "https://stackoverflow.com/questions/291607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Identifying different mobile handsets and redirecting to different websites Possible Duplicate: Standard way to detect mobile browsers in a web application based on the http request I have 3 mobile versions of a website and would like to present each to different handset models according to what they support. One...
{ "language": "en", "url": "https://stackoverflow.com/questions/291609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Project Explorer ,Mini buf expl Use in VIM Any tricks for using project explorer in VIM? How can I search from all files in project? I tried \g \G but they dont work . How to toggle on off Project explorer window? I am using Project explorer and taglist and when I open both then there are two windows on left side ,...
{ "language": "en", "url": "https://stackoverflow.com/questions/291611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to assign Date parameters to Hibernate query for current timezone? When you assign a date to a named SQL parameter Hibernate automatically converts it to GMT time. How do you make it use the current server timezone for all dates? Lets say you have a query: Query q = session.createQuery("from Table where date_fie...
{ "language": "en", "url": "https://stackoverflow.com/questions/291620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Database Schema design I am trying to design a location lookup in which the user can specify a location to any desired level of accuracy. eg. one of Country, State, City, Borough etc, I have a used a common location table, which will then be used in a lookup with the table name selected dynamically, but was wonderin...
{ "language": "en", "url": "https://stackoverflow.com/questions/291623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to parse an .msstyles file? I need to extract some bitmaps from an .msstyles file (the Windows XP visual style files) and I'm not sure where to start. I can't seem to find any documentation on how to do it, and the file format seems to be binary and not easily parsed. I have been able to extract the bitmap by it...
{ "language": "en", "url": "https://stackoverflow.com/questions/291624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Profiler and Memory Analysis Tools for Delphi I recently upgraded from Delphi 4 to Delphi 2009. With Delphi 4 I had been using GpProfile by Primoz Gabrijelcic as a profiler and Memory Sleuth by Turbo Power for memory analysis and leak debugging. Both worked well for me. But I now need new tools that will work with D...
{ "language": "en", "url": "https://stackoverflow.com/questions/291631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: How to use javascript to swap swf in html? I embedded a swf in my html page, but I would like it to swap to another swf when I clicked on a button in html. I used swfobject.js to embed the swf, and I use prototype to write the javascript. I thought I can just do this $('movie').value = 'swf/bhts.swf'; alert($('movie...
{ "language": "en", "url": "https://stackoverflow.com/questions/291647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I use gcc to compile x86 assembly code on an x64 computer For a school assignment I have to write x86 assembly code, except I can't use gcc to compile it since my computer is an x64 machine, and gcc is only excpecting x86 code. Is there a command that'll make gcc accept it x86 assembly code? Thanks P.S. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/291655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Retrieving AlternateView's of email I can't seem to retrieve the AlternateView from System.Net.Mail.AlternateView. I have an application that is pulling email via POP3. I understand how to create an alternate view for sending, but how does one select the alternate view when looking at the email. I've have the rece...
{ "language": "en", "url": "https://stackoverflow.com/questions/291661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible to hide/close an iframe from within itself or on server side? Suppose I have a page that I am writing a javascript plugin for on the domain first.com. The javascript plugin injects an iframe pointing to a login page (of domain second.com) into the first.com page and displays it as a popup so that the...
{ "language": "en", "url": "https://stackoverflow.com/questions/291665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can I run an HTTP GET directly in SQL under MySQL? I'd love to do this: UPDATE table SET blobCol = HTTPGET(urlCol) WHERE whatever LIMIT n; Is there code available to do this? I known this should be possible as the MySQL Docs include an example of adding a function that does a DNS lookup. MySQL / windows / Preferabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/291673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What can I do to optimize my .NET Web sites and applications for 64-bit? How can I take full advantage of 64-bit architecture in my .NET 2.0 Web Applications and Console/Forms Applications? A: I think there is not too much you can optimize in your managed .NET code regarding 32bit vs. 64bit architectures. This is b...
{ "language": "en", "url": "https://stackoverflow.com/questions/291675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JasperReports exported to Excel ignoring background color? Have you ever had alternating background colors in a Jasper report and then exported it to Excel? The Excel export seems to ignore the alternating color. I've got a Jasper report where the rows alternating background color using the procedure referenced HER...
{ "language": "en", "url": "https://stackoverflow.com/questions/291696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Detect from browser if specific application is installed We have an advanced webpage (ASP.NET, C#), and a application which needs to be installed on the client computer in order to utilize the webpage to its fullest. The application is a tray app, and has primarily two tasks. Detect when certain events happen on the...
{ "language": "en", "url": "https://stackoverflow.com/questions/291704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: vb6 How would I edit this to make the extension only count to 3 characters(string parsing) Someone posted a great little function here the other day that separated the full path of a file into several parts that looked like this: Function BreakDown(Full As String, FName As String, PName As String, Ext As String) As ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Open Source Address Scrubber? I have set of names and addresses that have been entered into and excel spreadsheet, but the problem is that the many people that entered the addresses entered them in many different non-standard formats. I want to scrub the addresses before transferring all of of them to my database. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I split a huge text file in python I have a huge text file (~1GB) and sadly the text editor I use won't read such a large file. However, if I can just split it into two or three parts I'll be fine, so, as an exercise I wanted to write a program in python to do it. What I think I want the program to do is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/291740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Configuring security for a windows forms control hosted in Internet Explorer I've created a windows forms control, which is hosted in a web page viewable with Internet Explorer. My control reads from a com port and it writes to the event log. Both of these operations by default fail when the framework requests prop...
{ "language": "en", "url": "https://stackoverflow.com/questions/291744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Interview question about debugging, multithreading I had telephone interview question yesterday. The interviewer asked me if I had faced any challenging debugging issue? I told him I once faced a problem debugging someone else's code and it took me 3-4 days to solve that. I used Windbg, symbols and a crash dump to s...
{ "language": "en", "url": "https://stackoverflow.com/questions/291745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MVC and jQuery validation, where to 'weave' the javascript and how to embed into master page? If my header/footer are in the master page, and my .js files are referenced in the master page, how can I add jQuery validation on my login page? If there is an error detected, how will I modify the .js file to display the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I would like to find something like gkrellm for the Mac I have a linux dev server I watch, and lately its chugging at some points so I'd like to keep a better eye on it. I used to use Gkrellm, but its been a pain to try get Gkrellm to build on my Mac. Besides servering X remotely (which would not be optimal), I gue...
{ "language": "en", "url": "https://stackoverflow.com/questions/291757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Converting a fairly simple C# Class library into a COM object? Here's my problem: I have to call a web service with a secure header from a classic ASP page that returns a complex data type. For various reasons concerning a 3rd party tool it has to be classic ASP. We decided that I should create an external dll to...
{ "language": "en", "url": "https://stackoverflow.com/questions/291761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Do you test on high-res screens and with non-standard/high contrast colour schemes? I use a non-default Windows colour scheme on most of my machines, and have a laptop with a 124 DPI screen, which Windows is set to. A lot of programs I tested or even use daily seem to have problems with that, showing for example non...
{ "language": "en", "url": "https://stackoverflow.com/questions/291764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: regex for alphanumeric word, must be 6 characters long What is the regex for a alpha numeric word, at least 6 characters long (but at most 50). A: \b\w{6,50}\b \w is any 'word' character - depending on regex flavour it might be just [a-z0-9_] or it might include others (e.g. accented chars/etc). {6,50} means betw...
{ "language": "en", "url": "https://stackoverflow.com/questions/291774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: New to functional programming Hey, I'm really new to Haskell and have been using more classic programming languages my whole life. I have no idea what is going on here. I'm trying to make a very simple Viterbi algorithm implementation, but for only two states (honest and dishonest casino) I have a problem where I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you export settings from the Database Publishing Wizard? I'm using the Database Publishing Wizard in VS2008 to push changes to my hosting provider. It doesn't look like those settings go with the project (which seems a little silly to me), but rather they go with the machine. On each new machine that I'd l...
{ "language": "en", "url": "https://stackoverflow.com/questions/291789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: win32 select all on edit ctrl (textbox) I am creating my textbox with these options. I can Copy / Cut / Paste / Undo, but when I hit Select All it doesn't select all. I can right click and click Select All but CTRL + A doesn't do anything. Why? wnd = CreateWindow("EDIT", 0, WS_CHILD | WS_VISIBLE | ES_MULTILINE |...
{ "language": "en", "url": "https://stackoverflow.com/questions/291792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Recursively adding files to a Subversion repository Is there a way to recursively add all "non added" files to SVN? I want to do something like svn add trunk/ to add all new files, without getting: svn: warning: 'trunk' is already under version control If this is not possible, is there a way to get a list of all f...
{ "language": "en", "url": "https://stackoverflow.com/questions/291793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Split a Pascal-case string into logical set of words I would like to take a pascal-cased string like "CountOfWidgets" and convert it into something more user-friendly like "Count of Widgets" in C#. Multiple adjacent uppercase characters should be left intact. What is the most efficient way to do this? NOTE: Duplicat...
{ "language": "en", "url": "https://stackoverflow.com/questions/291804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Recommended way to embed PDF in HTML? What is the recommended way to embed PDF in HTML? * *iFrame? *Object? *Embed? What does Adobe say itself about it? In my case, the PDF is generated on the fly, so it can't be uploaded to a third-party solution prior to flushing it. A: Using both <object> and <embed> wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/291813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1338" }
Q: Java Alert Framework Are there any "Alert" (or Notification) frameworks in Java out there. In my web application I would like our users to be able to configure which (of the available alerts) they would like to receive and in which (e.g via email) form. As a simple example, a user chooses to be alerted only via emai...
{ "language": "en", "url": "https://stackoverflow.com/questions/291817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best way to return an error from a function when I'm already returning a value? I wrote a function in C that converts a string to an integer and returns the integer. When I call the function I also want it to let me know if the string is not a valid number. In the past I returned -1 when this error occur...
{ "language": "en", "url": "https://stackoverflow.com/questions/291828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Vb6: Separating Tab Delimited Text I have a file with several thousand rows and several columns separated with tabs What I'd like to do is loop through each individually, Drop the columns into an array so that I can place them in another application individually, then move onto the next line. Unfortunately I got ab...
{ "language": "en", "url": "https://stackoverflow.com/questions/291829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What data is sent to Google Analytics? Has anyone found any documentation or research about what data is transfered to Google Analytics when it's added to a site. The main thing I'm wondering about is post data, but the details of exactly what is sent would be useful. I'm considering implementing it on a sites that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Does jQuery do any kind of caching of "selectors"? For example, will the first piece of code perform a full search twice, or is it smart enough to cache results if no DOM changes have occurred? if ($("#navbar .heading").text() > "") { $("#navbar .heading").hide(); } and var $heading = $("#navbar .heading"); if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: c# performance: type comparison vs. string comparison Which is faster? This: bool isEqual = (MyObject1 is MyObject2) Or this: bool isEqual = ("blah" == "blah1") It would be helpful to figure out which one is faster. Obviously, if you apply .ToUpper() to each side of the string comparison like programmers often do,...
{ "language": "en", "url": "https://stackoverflow.com/questions/291844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Simply consuming a web service in Java I have a very simple SOAP web service that I need to consume from a Java client. What is the easiest way to accomplish this without using any third party libraries? A requirement is that the host and port is read from the web.xml before every call to the ws. A: If you can re...
{ "language": "en", "url": "https://stackoverflow.com/questions/291847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Process Affinity Is it possible to programmatically either via the win32API (python) or via a command line option set the processor affinity for a process? A: Given a process handle, you can call the SetProcessAffinityMask Win32 API function to set the processor affinity for another process. Note that all the usual...
{ "language": "en", "url": "https://stackoverflow.com/questions/291848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get list of all filenames in a directory using VB6? What is the simplest way in VB6 to loop through all the files in a specified folder directory and get their names? A: DJ's solution is simple and effective, just throwing out another one in case you need a little more functionality that the FileSystemObje...
{ "language": "en", "url": "https://stackoverflow.com/questions/291849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why is ORM considered good but "select *" considered bad? Doesn't an ORM usually involve doing something like a select *? If I have a table, MyThing, with column A, B, C, D, etc, then there typically would be an object, MyThing with properties A, B, C, D. It would be evil if that object were incompletely instanti...
{ "language": "en", "url": "https://stackoverflow.com/questions/291853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: page not loading in javascript I have got a button with an onclick javascript event that does some form validation. If the validation fails, false is returned. Otherwise nothing is returned, and the form should be submitted. But what's happening is the url loads in the address bar but the page never loads. No heade...
{ "language": "en", "url": "https://stackoverflow.com/questions/291855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET auto-executing page I've long toyed with the idea of some kind of auto-cleanup page that performs routine maintenence tasks and is called out of scope of the current page execution by means of calling a 1x1 pixel gif with the asp.net page as the src parameter. One thing I've never really decided on, however,...
{ "language": "en", "url": "https://stackoverflow.com/questions/291866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a method to generate a standard 128bit GUID (UUID) on the Mac? Is there a built in function equivalent to .NET's Guid.NewGuid(); in Cocoa? My desire is to produce a string along the lines of 550e8400-e29b-41d4-a716-446655440000 which represents a unique identifier. A: At least on MacOSX 10.5.x you might u...
{ "language": "en", "url": "https://stackoverflow.com/questions/291868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How to set a timeout on blocking sockets in boost asio? Is there a way to cancel a pending operation (without disconnect) or set a timeout for the boost library functions? I.e. I want to set a timeout on blocking socket in boost asio? socket.read_some(boost::asio::buffer(pData, maxSize), error_); Example: I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Best Practices for Building a SSO System I am looking to build a Single-signon system for a couple web apps that used form based authentication. They way that I envision it is that my sso system would handle authentication against active directory pass the verification through to the desired web app when ever the u...
{ "language": "en", "url": "https://stackoverflow.com/questions/291874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to cancel an ajax query (from jquery) on the server side? Sounds like a weird question, but say I have something like this: $.post( "/myajax.php", { "param1": value1, "param2": value2 }, function( data, status ) { if( status == "success" ) { $("#someid").html( data ); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET Login to a Website with Forms Authentication vs None I've got a stock standard ASP.NET website. Anyone can read/view any page (except the admin section) but when someone wants to contribute, they need to be logged in. Just like most contribution sites out there. So, if i have my OWN login control or username...
{ "language": "en", "url": "https://stackoverflow.com/questions/291888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to cancel a file upload using dojo.io.iframe.send? I am using the dojo.io.iframe.send method to send a file to my server. I want to provide a way that the user can cancel the send once it is in progress, in case it is taking too long or the user realizes she sent the wrong file. I can't figure a way to do this. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you implement paging in ASP.NET MVC? Currently, I'm using a strategy found on many blog posts. Basically, the URL contains the page number (e.g. /Users/List/5 will give you the users on page 5 of your paged list of users). However, I'm not running into a situation where one page must list two separate paged...
{ "language": "en", "url": "https://stackoverflow.com/questions/291893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: SQLite non-exclusive RESERVED lock? I've been looking into improving SQLite performance for my site, especially with regard to transactions. In essence what I'm looking for is a way to defer database writes in a process so that they can all be done at once. However, while I'm accumulating update queries, I would lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/291897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Web.SiteMap with Dynamic URLS (URL Routing) I would like to match "approximate" matches in Web.SiteMap The Web.Sitemap static sitemap provider works well, except for one thing. IT'S STATIC! So, if I would have to have a sitemapnode for each of the 10,000 articles on my page like so : * *site.com/articles/1/...
{ "language": "en", "url": "https://stackoverflow.com/questions/291908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Groovy in Ant build.xml (with Java classes) I have to include Groovy classes into existing Java apps, and include Groovy into Ant's build.xml file. What is the best way to configure Ant's build.xml for it? Update: Are there more specifics in combining Java and Groovy compilations? Sequence of tasks? A: @VonC is co...
{ "language": "en", "url": "https://stackoverflow.com/questions/291920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: jquery animation with nested effects loop I have a nested function to show/hide paragraphs news-ticker-style. The problem is that when the loop starts over (line 4), the opacity effects stop working correctly so the paragraphs appear abruptly. Any jquery masters know about this? Am I making this too hard? $('#speci...
{ "language": "en", "url": "https://stackoverflow.com/questions/291922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Correct way in Flex to make a transparent panel respond to rollOver() events I have a Canvas in a Flex application which has items inside it that cover only about 50% of the area of the main canvas. i want the canvas to respond to rollOver events for the full area, and not just the area that is covered by the items ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I create a bar between navigation bar and table header? In NYTimes iPhone application, one bar exist in between table header and navigation bar on the top news screen. what bar is that? or it's just a label in between navigation bar and table header? Thanks in advance. A: Yes, that's probably just a pair of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: why is this legal, c++ typedef func i did this in msvc 2005. typedef void (*cleanup_t)(); void func(cleanup_t clean) { cleanup_t(); } Why does this compile? and not give me a warning? ok, it gave me a unreferenced formal parameter warning but originally i did this when clean was in a class no there was no unre...
{ "language": "en", "url": "https://stackoverflow.com/questions/291938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there side effects to using string concatenation or jQuery inside jquery selectors? while exploring jQuery I came up with the following weird script. I don't see myself doing this really however concatenating strings to achieve a variable name is not unusual in JavaScript. Any feedback welcome. ... <script ...
{ "language": "en", "url": "https://stackoverflow.com/questions/291939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you configure IIS for local development and testing? There are a few questions about configuring Apache for local development, such as this one, but I didn't see anything about IIS. Suggestions for locking down IIS without crippling it's functionality? In response to a comment, I'm looking to do ASP.NET devel...
{ "language": "en", "url": "https://stackoverflow.com/questions/291941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are some of the not-so-common issues with getting remote access to a SQL 2k8 instance? Howdy... here on my local LAN, I have a Windows Server 2k8 box with SQL Server 2k8 installed. I can connect to the database engine using the SSMS tool on the server, but attempting to connect to the database engine from a re...
{ "language": "en", "url": "https://stackoverflow.com/questions/291943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I filter ForeignKey choices in a Django ModelForm? Say I have the following in my models.py: class Company(models.Model): name = ... class Rate(models.Model): company = models.ForeignKey(Company) name = ... class Client(models.Model): name = ... company = models.ForeignKey(Company) base_ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/291945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "265" }
Q: How to use the TabContainer control inside a templated FormView? Is it possible to use a TabContainer inside a templated FormView like so: <ItemTemplate> <cc1:TabContainer ID="TabContainer1" runat="server"> <cc1:TabPanel ID="Tab1" runat="server"> <Hea...
{ "language": "en", "url": "https://stackoverflow.com/questions/291946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Relative path to absolute path in Elisp Having a relative path, how do I turn it into an absolute one from the location where the elisp file that I'm loading is. That is, I have an elisp file that I'm loading, it has an relative path and I need an absolute one. A: 'file-truename From the documentation: Return the...
{ "language": "en", "url": "https://stackoverflow.com/questions/291976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Short description of the scoping rules? What exactly are the Python scoping rules? If I have some code: code1 class Foo: code2 def spam..... code3 for code4..: code5 x() Where is x found? Some possible choices include the list below: * *In the enclosing source file *In the class...
{ "language": "en", "url": "https://stackoverflow.com/questions/291978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "516" }
Q: How do I access internal objects from hosted IronPython? I'm hosting IronPython 2.0 in a C#/Winforms application. I would like Python to be able to access various global, static objects in the host application. As an example, the host application has an internal static class 'Global', which contains a number of sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/291996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is the jQuery intellisense plugin available for Visual Studio now? Is the jQuery intellisense plugin available for Visual Studio now? A: Yes, it is. Rich Intellisense for JQuery. A: Yes. This blog taught me how to do it.
{ "language": "en", "url": "https://stackoverflow.com/questions/292003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Remote desktop forced logoff I use remote desktop quite a bit and I've noticed that on one of my machines when another user is already logged in it prompts them to allow me to log in, even for users with less privileges; however, with another computer, there is no prompt, it just proceeds with the remote logoff even...
{ "language": "en", "url": "https://stackoverflow.com/questions/292012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }