text
stringlengths
8
267k
meta
dict
Q: Make Test.QuickCheck.Batch use a default type for testing list functions I am testing a function called extractions that operates over any list. extractions :: [a] -> [(a,[a])] extractions [] = [] extractions l = extract l [] where extract [] _ = [] extract (x:xs) prev = (x, prev++xs) : extract xs (x :...
{ "language": "en", "url": "https://stackoverflow.com/questions/64197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I call MySQL stored procedures from Perl? How do I call MySQL stored procedures from Perl? Stored procedure functionality is fairly new to MySQL and the MySQL modules for Perl don't seem to have caught up yet. A: MySQL stored procedures that produce datasets need you to use Perl DBD::mysql 4.001 or later. (h...
{ "language": "en", "url": "https://stackoverflow.com/questions/64200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to add a constant column when replicating a database? I am using SQL Server 2000 and I have two databases that both replicate (transactional push subscription) to a single database. I need to know which database the records came from. So I want to add a fixed column specified in the publication to my table so I...
{ "language": "en", "url": "https://stackoverflow.com/questions/64202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I filter the messages I receive from a message queue (MSMQ) by some property? (a.k.a. topic) I am creating a Windows Service in C# that processes messages from a queue. I want to give ops the flexibility of partitioning the service in production according to properties of the message. For example, they should be...
{ "language": "en", "url": "https://stackoverflow.com/questions/64204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to force nolock hint for sql server logins Does anyone know of a way to force a nolock hint on all transactions issued by a certain user? I'd like to provide a login for a support team to query the production system, but I want to protect it by forcing a nolock on everything they do. I'm using SQL Server 2005....
{ "language": "en", "url": "https://stackoverflow.com/questions/64208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Detect changes in random ordered input (hash function?) I'm reading lines of text that can come in any order. The problem is that the output can actually be indentical to the previous output. How can I detect this, without sorting the output first? Is there some kind of hash function that can take identical input, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/64209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the most useful multi-purpose open-source library for java? Are there any open-source libraries that all programmers should know about? I'm thinking something general, a sort of extension to the standard java.util that contains basic functions that are useful for all kinds of application. A: The Spring fram...
{ "language": "en", "url": "https://stackoverflow.com/questions/64213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Should rails models be concerned with other models for the sake of skinny controllers? I read everywhere that business logic belongs in the models and not in controller but where is the limit? I am toying with a personnal accounting application. Account Entry Operation When creating an operation it is only valid i...
{ "language": "en", "url": "https://stackoverflow.com/questions/64214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Fatal warnings on Windows While working between a Windows MySQL server and a Debian MySQL server, I noticed that warnings were fatal on Windows, but silently ignored on Debian. I'd like to make the warnings fatal on both servers while I'm doing development, but I wasn't able to find a setting that effected this beha...
{ "language": "en", "url": "https://stackoverflow.com/questions/64233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When to create a new app (with startapp) in Django? I've googled around for this, but I still have trouble relating to what Django defines as "apps". Should I create a new app for each piece of functionality in a site, even though it uses models from the main project? Do you guys have good rule of thumb of when to...
{ "language": "en", "url": "https://stackoverflow.com/questions/64237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "136" }
Q: Castle Windsor: How do you add a call to a factory facility not in xml? I know how to tell Castle Windsor to resolve a reference from a factory's method using XML, but can I do it programmatically via the Container.AddComponent() interface? If not is there any other way to do it from code? EDIT: There seems to be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Encrypt/Decrypt across machines is a no-no I'm using an identical call to "CryptUnprotectData" (exposed from Crypt32.dll) between XP and Vista. Works fine in XP. I get the following exception when I run in Vista: "Decryption failed. Key not valid for use in specified state." As expected, the versions of crypt32.dll...
{ "language": "en", "url": "https://stackoverflow.com/questions/64258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to eliminate flicker in Windows.Forms custom control when scrolling? I want to create a custom control in C#. But every time I have to fully redraw my control, it flickers, even if I use double buffering (drawing to an Image first, and blitting that). How do I eliminate flicker when I have to fully redraw? A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/64272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do you tell IIS 6 to set the .NET version to 2.0 (not 1.1) When New sites are created? We create new sites in IIS 6 (Windows Server 2003) using IIS Manager. When these sites are created in IIS 6, the ASP.NET version defaults to ASP.NET 1.1. We would like it to default to ASP.NET 2.0. The reason this is a prob...
{ "language": "en", "url": "https://stackoverflow.com/questions/64279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What's the best way to load highly re-used data in a .net web application Let's say I have a list of categories for navigation on a web app. Rather than selecting from the database for every user, should I add a function call in the application_onStart of the global.asax to fetch that data into an array or collecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/64284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can you cascade filter the attributes of more dimensions in a SSAS cube, viewed in Excel 2007 How can you cascade filter the attributes of more dimensions in a SSAS cube, viewed in Excel 2007. For example, if we have a cube Sales with the dimension Time and dimension Client, once the dimension Time is filtered t...
{ "language": "en", "url": "https://stackoverflow.com/questions/64288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: API for server-side 3D rendering I'm working on an application that needs to quickly render simple 3D scenes on the server, and then return them as a JPEG via HTTP. Basically, I want to be able to simply include a dynamic 3D scene in an HTML page, by doing something like: <img src="http://www.myserver.com/renderimag...
{ "language": "en", "url": "https://stackoverflow.com/questions/64291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Does emacs have something like vi's "set number"? Does emacs have something like vi's “set number”, so that each line starts with its line number? A: Take a look at this article. It explains various ways to add line numbers to emacs: http://www.emacswiki.org/cgi-bin/wiki/LineNumbers A: Try adding linum.el to your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Convert WAV to WMA using .NET What is the best solution for converting WAV files to WMA (and vice versa) in C#? I have actually implemented this once already using the Windows Media Encoder SDK, but having to distribute Windows Media Encoder with my application is cumbersome to say the least. The Windows Media Forma...
{ "language": "en", "url": "https://stackoverflow.com/questions/64303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you vertically center a custom image in a * element across browsers? The design for the website I am working on calls for a custom image on lists instead of a bullet. Using the image is fine, but I have been having difficulties ensuring that it is centered against the text of the list item across all browse...
{ "language": "en", "url": "https://stackoverflow.com/questions/64311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Copying databases to remote locations Our EPOS system copies data by compressing the database into a zip file, and manually copying to each till, using shared directories. Each branched is liked to the main location, using VPN which can be problematic, but is required for the file sharing to work correctly. Since o...
{ "language": "en", "url": "https://stackoverflow.com/questions/64314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Refactoring dissassembled code You write a function and, looking at the resulting assembly, you see it can be improved. You would like to keep the function you wrote, for readability, but you would like to substitute your own assembly for the compiler's. Is there any way to establish a relationship between your high...
{ "language": "en", "url": "https://stackoverflow.com/questions/64321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Disadvantages of Test Driven Development? What do I lose by adopting test driven design? List only negatives; do not list benefits written in a negative form. A: Well, and this stretching, you need to debug your tests. Also, there is a certain cost in time for writing the tests, though most people agree that it's a...
{ "language": "en", "url": "https://stackoverflow.com/questions/64333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "201" }
Q: using load() to load page that also uses jQuery I'm trying to load a page that is basically an edit form inside a dialog (ui.dialog). I can load this page fine from an external (I'm using asp.net) page. The problem is that inside of my "popup" form, I need to $(function() {my function here}); syntax to do some stuf...
{ "language": "en", "url": "https://stackoverflow.com/questions/64351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to copy text from Emacs to another application on Linux When I cut (kill) text in Emacs 22.1.1 (in its own window on X, in KDE, on Kubuntu), I can't paste (yank) it in any other application. A: I assume by emacs you are meaning Emacs under X (ie not inside a terminal window). There are two ways: * *(Applies ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: How can I access App Engine through a Corporate proxy? I have corporate proxy that supports https but not HTTP CONNECT (even after authentication). It just gives 403 Forbidden in response anything but HTTP or HTTPS URLS. It uses HTTP authenication, not NTLM. It is well documented the urllib2 does not work with https...
{ "language": "en", "url": "https://stackoverflow.com/questions/64362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Jabber Openfire server v3.6.0a+ - how do I use Hybrid authentication? I'm setting up a Jabber server for my website. I've already got some user accounts in place in the openfire database, and working IMs between them. I'm now looking to add (some) of the users from my main database (members table, with login, passw...
{ "language": "en", "url": "https://stackoverflow.com/questions/64364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using Apache mod_rewrite to remove sub-directories from URL I'm managing an instance of Wordpress where the URLs are in the following format: http://www.example.com/example-category/blog-post-permalink/ The blog author did an inconsistent job of adding categories to posts, so while some of them had legitimate cate...
{ "language": "en", "url": "https://stackoverflow.com/questions/64380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I perform an action n-many times in TextMate ( both Emacs and Vim can do it easily! )? Emacs: C-U (79) # » a pretty 79 character length divider VIM: 79-i-# » see above Textmate: ???? Or is it just assumed that we'll make a Ruby call or have a snippet somewhere? A: I would create a bundle command to do thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/64387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Visual Studio Extensibility: Adding existing folders to a project I'm trying to use Visual Studio 2008's extensibility to write an addin that will create a project folder with various messages in it after parsing an interface. I'm having trouble at the step of creating/adding the folder, however. I've tried using P...
{ "language": "en", "url": "https://stackoverflow.com/questions/64388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Game programming in Java? I am looking into game programming in Java to see if it is feasible. When googling for it I find several old references to Java2D, Project Darkstar (Sun's MMO-server) and some books on Java game programming. But alot of the information seems to be several years old. So the question I am ask...
{ "language": "en", "url": "https://stackoverflow.com/questions/64392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What is the best way to store big files in Plone 3? I want to serve a lot of big files in a Plone site. By big files I mean around 5MB (music) and a lot of them. I've already do it straight to the ZODB, not a good idea. I'm running Plone 3.1.1 and Zope 2.10.6. A: Zodb blob support is the best, most integrated way t...
{ "language": "en", "url": "https://stackoverflow.com/questions/64397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I get rid of "Cannot resolve property key" in fmt:message tags in JSPs in Intellij This one has been bugging me for a while now. Is there a way I can stop Intellj IDEA from reporting missing keys in tags? My messages are not stored in property files so the issue does not apply in my case. I'm using IntelliJ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I write an iPhone app entirely in JavaScript without making it just a web app? I don't want to take the time to learn Obj-C. I've spent 7+ years doing web application programming. Shouldn't there be a way to use the WebView and just write the whole app in javascript, pulling the files right from the resource...
{ "language": "en", "url": "https://stackoverflow.com/questions/64420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Best Python supported server/client protocol? I'm looking for a good server/client protocol supported in Python for making data requests/file transfers between one server and many clients. Security is also an issue - so secure login would be a plus. I've been looking into XML-RPC, but it looks to be a pretty old (...
{ "language": "en", "url": "https://stackoverflow.com/questions/64426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I programmatically sanitize ColdFusion cfquery parameters? I have inherited a large legacy ColdFusion app. There are hundreds of <cfquery>some sql here #variable#</cfquery> statements that need to be parameterized along the lines of: <cfquery> some sql here <cfqueryparam value="#variable#"/> </cfquery> How c...
{ "language": "en", "url": "https://stackoverflow.com/questions/64432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert Parallels VM to Virtual PC 2007 VM I'd like to convert a Parallels Virtual Machine image on my mac into an image usable by Virtual PC 2007. Does anyone know how to do that, or if it is possible? A: It looks like qemu-img from qemu can do this, at least looking at its commandline help on a Ubuntu 8.04 machi...
{ "language": "en", "url": "https://stackoverflow.com/questions/64434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Function Overloading and UDF in Excel VBA I'm using Excel VBA to a write a UDF. I would like to overload my own UDF with a couple of different versions so that different arguments will call different functions. As VBA doesn't seem to support this, could anyone suggest a good, non-messy way of achieving the same goa...
{ "language": "en", "url": "https://stackoverflow.com/questions/64436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: .Net NNTP implementation Is there a good .Net implementation of the NNTP protocol? A: Try libraries like http://sourceforge.net/projects/dougnewsnntp/ and http://www.codeplex.com/nntpclientlib A: There is a C# tutorial for reading posts using NNTP here. It should be enough to get you started but if you wish to st...
{ "language": "en", "url": "https://stackoverflow.com/questions/64445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you convert a physical machine into a virtual machine image for use in MS Virtual Server or Hyper-V? I'd like to use alternatives to System Center Virtual Machine Manager 2008 is possible, in other words, any FREE tools? A: Google "Pysical to virtual conversion" or P2V. There are several solutions available...
{ "language": "en", "url": "https://stackoverflow.com/questions/64451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to make a .net client consume service from a Java server? I have a user interface in .net which needs to receive data from a server, on a request/reply/update model. The only constraint is to use Java only on the server box. What is the best approach to achieve this ? Is it by creating a Webserv...
{ "language": "en", "url": "https://stackoverflow.com/questions/64454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: leaving a time delay in python is there any way to leave a time delay between the execution of two lines of code?
{ "language": "en", "url": "https://stackoverflow.com/questions/64468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: VB.NET on Vista, trying to get date (Today) causes security exception I have a VB6 program that someone recently helped me convert to VB.NET In the program, when saving files, I stamp them with the date which I was getting by calling the Today() function. When I try to run the new VB.NET code in Vista it throws a p...
{ "language": "en", "url": "https://stackoverflow.com/questions/64469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the most frequently used flow controls for handling protocol communication? I am rewriting code to handle some embedded communications and right now the protocol handling is implemented in a While loop with a large case/switch statement. This method seems a little unwieldy. What are the most commonly used ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ method expansion Can you specialize a template method within a template class without specializing the class template parameter? Please note that the specialization is on the value of the template parameter, not its type. This seems to compile under Visual Studio 2008 SP1 complier, but not GCC 4.2.4. #include <i...
{ "language": "en", "url": "https://stackoverflow.com/questions/64498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sending mail from Python using SMTP I'm using the following method to send mail from Python using SMTP. Is it the right method to use or are there gotchas I'm missing ? from smtplib import SMTP import datetime debuglevel = 0 smtp = SMTP() smtp.set_debuglevel(debuglevel) smtp.connect('YOUR.MAIL.SERVER', 26) smtp.lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/64505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "134" }
Q: Guile scheme - quoted period? What does the following Guile scheme code do? (eq? y '.) (cons x '.) The code is not valid in MzScheme, is there a portable equivalent across scheme implementations? I am trying to port this code written by someone else. Guile seems to respond to '. with #{.}#, but I'm not sure what it...
{ "language": "en", "url": "https://stackoverflow.com/questions/64508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the purpose of the GtkWidget.events property for (like) GtkTreeView widgets? I have a Glade GUI description file with a GtkTreeView in a GtkHBox in a window; and there's a handler for the row_activated signal. Now, Glade has automatically set the "events" property (inherited from GtkWidget) of that treeview t...
{ "language": "en", "url": "https://stackoverflow.com/questions/64518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create graphs in Perl on Windows? How do I use Perl to create graphs? I'm running scheduled job that creates text reports. I'd like to move this to the next step (for the management) and also create some graphs that go along with this. Is this possible / feasible? It'd be great if I could do this using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Does the exe you get out of obfuscation programs vary in speed? There are a number of obfuscation programs out there for .Net and I've tried one, my exe seems much slower when obfuscated. Do all obfuscation programs have the same effect or have I chosen a bad one? I'm hoping some are better than others, if you know ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Paths in master pages I've started to work a bit with master pages for an ASP.net mvc site and I've come across a question. When I link in a stylesheet on the master page it seems to update the path to the sheet correctly. That is in the code I have <link href="../../Content/Site.css" rel="stylesheet" type="text/c...
{ "language": "en", "url": "https://stackoverflow.com/questions/64559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Bluetooth parking How do I park a Bluetooth connection? I'm trying to communicate with dozens of Bluetooth devices, and the time to re-establish a connection is unacceptable. I've read that you can park connections, but not found anything that answers how to do this. A: I know that you can park a connection if it's...
{ "language": "en", "url": "https://stackoverflow.com/questions/64562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Explode string into array with no empty elements? PHP's explode function returns an array of strings split on some provided substring. It will return empty strings when there are leading, trailing, or consecutive delimiters, like this: var_dump(explode('/', '1/2//3/')); array(5) { [0]=> string(1) "1" [1]=> s...
{ "language": "en", "url": "https://stackoverflow.com/questions/64570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: .NET Web Application Portability to SilverLight The company where I work created this application which is core to our business and relies on the web browser to enforce certain "rules" that without them renders the application kinda useless to our customers. Sorry about having to be circumspect, An NDA along with a...
{ "language": "en", "url": "https://stackoverflow.com/questions/64575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Display ODBC connections dialog and get chosen ODBC back Any information on how to display the ODBC connections dialog and get the chosen ODBC back? A: // a_RootKey is Microsoft.Win32.RegistryKey // DSN is a class not provided in this code sample - you can see what properties are needed from the usage below. List...
{ "language": "en", "url": "https://stackoverflow.com/questions/64581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++/Java Performance for Neural Networks? I was discussing neural networks (NN) with a friend over lunch the other day and he claimed the the performance of a NN written in Java would be similar to one written in C++. I know that with 'just in time' compiler techniques Java can do very well, but somehow I just don'...
{ "language": "en", "url": "https://stackoverflow.com/questions/64582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .net: System.Web.Mail vs System.Net.Mail I am considering converting a project that I've inherited from .net 1.1 to .net 2.0. The main warning I'm concerned about is that it wants me to switch from System.Web.Mail to using System.Net.Mail. I'm not ready to re-write all the components using the obsolete System.Web.M...
{ "language": "en", "url": "https://stackoverflow.com/questions/64599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion? There are three assembly version attributes. What are differences? Is it ok if I use AssemblyVersion and ignore the rest? MSDN says: * *AssemblyVersion: Specifies the version of the assembly being attributed. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "928" }
Q: Can I Mix VBScript and JScript in a Single HTA? Is it possible to use both JScript and VBScript in the same HTA? Can I call VBScript functions from JScript and vice-versa? Are there any "gotchas," like the JScript running first and the VBScript running second (classic ASP pages have this issue). A: Yeah, just separ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Am I turning away customers by disabling SSL 2.0 and PCT 1.0 in IIS5? Do I risk losing sales by disabling SSL 2.0 and PCT 1.0 in IIS5? Clarification: Sales would be lost by client not being able to connect via SSL to complete ecommerce transaction because SSL 2.0 or PCT 1.0 is disabled on the web server. Microsoft ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What does a PHP developer need to know about https / secure socket layer connections? I know next to nothing when it comes to the how and why of https connections. Obviously, when I'm transmitting secure data like passwords or especially credit card information, https is a critical tool. What do I need to know abo...
{ "language": "en", "url": "https://stackoverflow.com/questions/64631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Convert from scientific notation string to float in C# What's the proper way to convert from a scientific notation string such as "1.234567E-06" to a floating point variable using C#? A: Double.Parse("1.234567E-06", System.Globalization.NumberStyles.Float); A: Also consider using Double.TryParse("1.234567E-06", S...
{ "language": "en", "url": "https://stackoverflow.com/questions/64639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Parsing exact dates in C# shouldn't force you to create an IFormatProvider Someone please correct me if I'm wrong, but parsing a yyyy/MM/dd (or other specific formats) dates in C# should be as easy as DateTime.ParseExact(theDate, "yyyy/MM/dd"); but no, C# forces you to create an IFormatProvider. Is there an app.co...
{ "language": "en", "url": "https://stackoverflow.com/questions/64640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Define an interface in C++ that needs to be implemented in C# and C++ I have an interface that I have defined in C++ which now needs to be implemented in C#. What is the best way to go about this? I don't want to use COM at all in my interface definition. The way I have solved this right now is to to have two interf...
{ "language": "en", "url": "https://stackoverflow.com/questions/64645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I get the find command to print out the file size with the file name? If I issue the find command as follows: find . -name *.ear It prints out: ./dir1/dir2/earFile1.ear ./dir1/dir2/earFile2.ear ./dir1/dir3/earFile1.ear I want to 'print' the name and the size to the command line: ./dir1/dir2/earFile1.ear 50...
{ "language": "en", "url": "https://stackoverflow.com/questions/64649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "159" }
Q: MySQL: "lock wait timeout exceeded" I am trying to delete several rows from a MySQL 5.0.45 database: delete from bundle_inclusions; The client works for a while and then returns the error: Lock wait timeout exceeded; try restarting transaction It's possible there is some uncommitted transaction out there that has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: jQuery: JFrame plugin fails in IE 7 I'm using the JFrame plugin with jquery 1.2.6. It works fine in FF3, however it won't display the requested pages in IE 7. The jQuery library and the JFrame plugin are called in the included header.cfm. Page code is here (note: ignore the ColdFusion calls, I don't think they're ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/64657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C pointers in C# Is this function declaration in C#: void foo(string mystring) the same as this one in C: void foo(char *) i.e. In C#, does the called function receive a pointer behind the scenes? A: There are pointers behind the scenes in C#, though they are more like C++'s smart pointers, so the raw pointers ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/64689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Simple haskell string manage Theres is a little problem I want to solve with Haskell: let substitute a function that change all of the wildcards in a string for one concrete parameter. The function has de signature of: subs :: String -> String -> String -> String -- example: -- subs 'x' "x^3 + x + sin(x)" "6.2" will...
{ "language": "en", "url": "https://stackoverflow.com/questions/64693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a good non-recursive algorithm for deciding whether a passed in amount can be built additively from a set of numbers? What is a non recursive algorithm for deciding whether a passed in amount can be built additively from a set of numbers. In my case I'm determining whether a certain currency amount (such as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: Moving to Android from J2ME Coming from J2ME programming are there any similarities that would make it easy to adapt to Android API. Or is Android API completely different from the J2ME way of programming mobile apps. A: A good start would be to watch the Android architecture videos and look at some of the documen...
{ "language": "en", "url": "https://stackoverflow.com/questions/64745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Disk Activity in Applescript How can I poll disk activity in Applescript? Check to see if disk X is being read, written, or idle every N seconds and do something. A: In general, polling is less efficient than being notified when something happens. Additionally, if you're checking whether something is reading from a...
{ "language": "en", "url": "https://stackoverflow.com/questions/64748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: '^M' character at end of lines When I run a particular SQL script in Unix environments, I see a '^M' character at the end of each line of the SQL script as it is echoed to the command line. I don't know on which OS the SQL script was initially created. What is causing this and how do I fix it? A: It's caused by the...
{ "language": "en", "url": "https://stackoverflow.com/questions/64749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "104" }
Q: Placing a PDF inside another PDF document with Zend_PDF I have a pdf file of a logo, about 1"x2" in dimension. Can anybody provide the code snippet to import that PDF logo into another PDF file using the Zend_PDF API's? Ideally, I'd like to be able to place it like the PNG, TIFF or JPG objects with the Zend_Pdf_I...
{ "language": "en", "url": "https://stackoverflow.com/questions/64759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should HTML co-exist with code? In a web application, is it acceptable to use HTML in your code (non-scripted languages, Java, .NET)? There are two major sub questions: * *Should you use code to print HTML, or otherwise directly create HTML that is displayed? *Should you mix code within your HTML pages? A: As ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there a terminal program that differentiates between input, output, and commands? Is there a terminal program that shows the difference between input, standard output, error output, the prompt, and user-entered commands? It should also show when standard input is needed vs. running a command. One way would be to...
{ "language": "en", "url": "https://stackoverflow.com/questions/64768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Batch insert using JPA/Toplink I have a web application that receives messages through an HTTP interface, e.g.: http://server/application?source=123&destination=234&text=hello This request contains the ID of the sender, the ID of the recipient and the text of the message. This message should be processed like: * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you append an int to a string in C++? int i = 4; string text = "Player "; cout << (text + i); I'd like it to print Player 4. The above is obviously wrong but it shows what I'm trying to do here. Is there an easy way to do this or do I have to start adding new includes? A: For the record, you can also use a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "204" }
Q: Error handling in Bash What is your favorite method to handle errors in Bash? The best example of handling errors I have found on the web was written by William Shotts, Jr at http://www.linuxcommand.org. He suggests using the following function for error handling in Bash: #!/bin/bash # A slicker error handling ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/64786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "287" }
Q: Why aren't Xcode breakpoints functioning? I have breakpoints set but Xcode appears to ignore them. A: See this post: Breakpoints not working in Xcode?. You might be pushing "Run" instead of "Debug" in which case your program is not running with the help of gdb, in which case you cannot expect breakpoints to work! ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "136" }
Q: How do I see the list of open files within Emacs? Or browse a directory within Emacs? Most text editors have a navigation pane that lets you see all the files you currently have open. Or a pane that lets you browse a file directory. How do I do this in Emacs? A: C-x C-b will open the *Buffer List* buffer. In that...
{ "language": "en", "url": "https://stackoverflow.com/questions/64808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Private Accessor class ignores generic constraint These days, i came across a problem with Team System Unit Testing. I found that the automatically created accessor class ignores generic constraints - at least in the following case: Assume you have the following class: namespace MyLibrary { public class MyClass { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/64813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: how to implement shortcut key combination of CTRL or SHIFT + through javascript? ASP.NET 2.0 web application, how to implement shortcut key combination of CTRL + Letter, preferably through JavaScript, to make web application ergonomically better? How to capture multiple-key keyboard events through JavaScript? A: Y...
{ "language": "en", "url": "https://stackoverflow.com/questions/64820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to substring in jsp? Is there a way to substring in JSP files, using struts2 technologies? I mean, struts2 has its own taglib and also uses ognl. How can I get a substring from a stacked value or bean value? A: http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html Look for fn:substring and its varia...
{ "language": "en", "url": "https://stackoverflow.com/questions/64825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rails, Restful Authentication & RSpec - How to test new models that require authentication I've created a learning application using Bort, which is a base app that includes Restful Authentication and RSpec. I've got it up and running and added a new object that requires users to be logged in before they can do anyt...
{ "language": "en", "url": "https://stackoverflow.com/questions/64827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Writing C# client to consume a Java web service that returns array of objects I am writing a C# client that calls a web service written in Java (by another person). I have added a web reference to my client and I'm able to call methods in the web service ok. The service was changed to return an array of objects, an...
{ "language": "en", "url": "https://stackoverflow.com/questions/64833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Visual Studio 2008: Is it worth the upgrade from 2005? As of the fall of 2008 I'm about to embark on a new development cycle for a major product that has a winforms and an asp.net interface. We use Telerik, DevExpress and Infragistics components in it and all are going to have a release within a month or so which w...
{ "language": "en", "url": "https://stackoverflow.com/questions/64839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What do I need to manage XML files? I believe I need a DTD to define the schema and an XSLT if I want to display it in a browser and have it look "pretty". But I'm not sure what else I would need to have a well-defined XML document that can be queried using XQuery and displayed in a web browser. A: Strictly speakin...
{ "language": "en", "url": "https://stackoverflow.com/questions/64841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Write a Servlet that Talks to JMS (ActiveMQ) and OnMessage Update the Site I am building a site that uses a simple AJAX Servlet to talk JMS (ActiveMQ) and when a message arrives from the topic to update the site. I have Javascript that creates an XMLHttpRequest for data. The Servlet processes the Get Request and sen...
{ "language": "en", "url": "https://stackoverflow.com/questions/64843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sample code for using IBM's PCOMM in C# o write an as400 screenscraper Has anybody used C# to write a sample screen scraper for IBM as400? A: When using interop.AutOIATypeLibrary and interop.AutPSTypeLibrary for building a class library. It throws error as below Unable to cast COM object of type 'AutPSTypeLibrary.A...
{ "language": "en", "url": "https://stackoverflow.com/questions/64848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Macro to test whether an integer type is signed or unsigned How would you write (in C/C++) a macro which tests if an integer type (given as a parameter) is signed or unsigned? #define is_this_type_signed (my_type) ... A: In C++, use std::numeric_limits<type>::is_signed. #include <limits> std::numeric_limi...
{ "language": "en", "url": "https://stackoverflow.com/questions/64851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Best way to convert text files between character sets? What is the fastest, easiest tool or method to convert text files between character sets? Specifically, I need to convert from UTF-8 to ISO-8859-15 and vice versa. Everything goes: one-liners in your favorite scripting language, command-line tools or other utili...
{ "language": "en", "url": "https://stackoverflow.com/questions/64860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "600" }
Q: Is there a good tutorial on Websphere 6.1 ND deployments? I need to deploy an application on the WAS ND 6.1 and do not know anything about it and cannot afford to go to training... A: There is the RedBook WebSphere Application Server V6.1: System Management and Configuration with Chapter 14 talking about applicatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/64873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: How to replace a character programmatically in Oracle 8.x series Due to repetitive errors with one of our Java applications: Engine engine_0: Error in application action. org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x13) was found in the element content of the document. I need to "fix" some Un...
{ "language": "en", "url": "https://stackoverflow.com/questions/64875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is my cocoa program getting EXC_BAD_ACCESS during startup? During the load of my cocoa application, my program crashes with the messsage EXC_BAD_ACCESS. The stack trace is not helpful. Any clues to how I can find the problem? A: I've seen times where this can happen when you are trying to access a object that...
{ "language": "en", "url": "https://stackoverflow.com/questions/64881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Select data from "show tables" MySQL query Is it possible to select from show tables in MySQL? SELECT * FROM (SHOW TABLES) AS `my_tables` Something along these lines, though the above does not work (on 5.0.51a, at least). A: You can't put SHOW statements inside a subquery like in your example. The only statement t...
{ "language": "en", "url": "https://stackoverflow.com/questions/64894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: parsings strings: extracting words and phrases [JavaScript] I need to support exact phrases (enclosed in quotes) in an otherwise space-separated list of terms. Thus splitting the respective string by the space-character is not sufficient anymore. Example: input : 'foo bar "lorem ipsum" baz' output: ['foo', 'bar', 'l...
{ "language": "en", "url": "https://stackoverflow.com/questions/64904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you create templates for SQL Server 2005 Reporting Services reports? I want to create templates for base new reports on to have common designs. How do you do it? A: The need to produce reports with a common starting design and format is key to any project involving clients and their reports. I have been wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/64905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best PHP thumbnailer/resizer class? What is the nest PHP thumbnailer/resizer class that preferably works on most shared hosts? Clarification: I'm looking for a PHP class/wrapper (eg. phpThumb(), Asido), so I don't have to run GD or ImageMagick functions directly. I'm specifically looking for resizing and framing fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/64907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: exposition on arrows in haskell What would be a good place to go to understand arrows? Ideally, I am just looking for some place with a concise definition with motivation from some good examples, something similar to Wadler's exposition on monads. A: http://en.wikibooks.org/wiki/Haskell/Understanding_arrows A: I f...
{ "language": "en", "url": "https://stackoverflow.com/questions/64933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }