text
stringlengths
8
267k
meta
dict
Q: How can I replace empty elements in an array with "OTHER"? My list (@degree) is built from a SQL command. The NVL command in the SQL isn't working, neither are tests such as: if (@degree[$i] == "") if (@degree[$i] == " ") if (@degree[$i] == '') if (@degree[$i] == -1) if (@degree[$i] == 0) if (@degree[$i] == ()) if (...
{ "language": "en", "url": "https://stackoverflow.com/questions/331992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inserting and deleting UITableViewCell at the same time not working I'm having quite a bit of pain inserting and deleting UITableViewCells from the same UITableView! I don't normally post code, but I thought this was the best way of showing where I'm having the problem: - (NSInteger)numberOfSectionsInTableView:(UIT...
{ "language": "en", "url": "https://stackoverflow.com/questions/331996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I get a directory listing of DLLs with ProductName and ProductVersion? When I look at a directory in Windows Explorer, I can see a ProductName and ProductVersion property for the DLL's in that directory. I need to export this DLL list with ProductName and ProductVersion into a text file. If I do c:\>dir *.dl...
{ "language": "en", "url": "https://stackoverflow.com/questions/332005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When should static_cast, dynamic_cast, const_cast, and reinterpret_cast be used? What are the proper uses of: * *static_cast *dynamic_cast *const_cast *reinterpret_cast *(type)value (C-style cast) *type(value) (function-style cast) How does one decide which to use in which specific cases? A: To understand, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3013" }
Q: how can I add a swf over a swf on a html page I've been trying to add a swf over a swf on a html page, it's working fine in Firefox, but in IE, the one that's added first is always on top of the other one. I used z-index but it's not working, does anyone know how to solve this? Thanks. I already added wmode:transpar...
{ "language": "en", "url": "https://stackoverflow.com/questions/332048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: HTTP header "Via:1.1 nc1 (NetCache NetApp/6.0.5P1)" stops IIS6 gzip compression The request I sent is accept gzip but the response is not compressed, instead, I received some header Via:1.1 nc1 (NetCache NetApp/6.0.5P1) I guess this is to do with my ISP since it works perfectly on my home computer. Any idea how to...
{ "language": "en", "url": "https://stackoverflow.com/questions/332049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does it make sense to use a toolbar for quick naviation? I have a winforms application that doesn't have a shared set of tools that I can provide on a toolbar. But I want to have a toolbar, so I was planning on using that space to provide quick links to the most popular portions of the product. I will eventually a...
{ "language": "en", "url": "https://stackoverflow.com/questions/332051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: java remote desktop Im trying to create an app to control a pc remotely using java , i want to use red5 to let the admin control desktops using a flash movie so i need to find java classes to : * *capture desktop as live video *-control mouse and keyboard A: TightVNC has a Java viewer so you can easily manag...
{ "language": "en", "url": "https://stackoverflow.com/questions/332055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I Unit Test Actions without Mocking that use UpdateModel? I have been working my way through Scott Guthrie's excellent post on ASP.NET MVC Beta 1. In it he shows the improvements made to the UpdateModel method and how they improve unit testing. I have recreated a similar project however anytime I run a Unit...
{ "language": "en", "url": "https://stackoverflow.com/questions/332060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Remapping urls with jetty My application's context root is /foobar and I am running an exploded deployment with maven-jetty-plugin. I need to dynamically remap requets for /images/* to /foobar/images/*, and I cannot remap my application's context root to /. For weblogic I have a halfwit solution where I deploy an ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/332067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is the documentation of Merb as poor as it seems? I've read only good things about Merb, but the documentation on the website is basically the api reference, and right now there is no books already published. Any resources about Merb? I guess that I'll start to read the code, but it'd be nice to have another source...
{ "language": "en", "url": "https://stackoverflow.com/questions/332073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In Java, how do I convert a byte array to a string of hex digits while keeping leading zeros? I'm working with some example java code for making md5 hashes. One part converts the results from bytes to a string of hex digits: byte messageDigest[] = algorithm.digest(); StringBuffer hexString = new StringBuffer();...
{ "language": "en", "url": "https://stackoverflow.com/questions/332079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "171" }
Q: What is the best way to catch and show an error if user enters only whitespace in a form field in Django? In Django 1.0, what is the best way to catch and show an error if user enters only whitespace (" ") in a form field? class Item(models.Model): description = models.CharField(max_length=100) class ItemForm(M...
{ "language": "en", "url": "https://stackoverflow.com/questions/332102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Div background doesn't position with the Div I have a couple of Divs which I style using a class and an ID, he div's themselves are emtpy since they are only placeholders for their background. Example Div: <div id='ranImg1' class='ranImg'></div> Then I style them using this css: .ranImg { position:fixed; z-inde...
{ "language": "en", "url": "https://stackoverflow.com/questions/332104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Arithmetic operation resulted in an overflow. DotNetNuke 4.5.1 Repository I received this error "Arithmetic operation resulted in an overflow." when trying to upload any file in the Repository module of DotNetNuke. I'm using dotnetnuke version 4.5.1. A: What is the size of the file? What version of the repository...
{ "language": "en", "url": "https://stackoverflow.com/questions/332108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: URL Rewrite blanket redirect with directory exceptions I have a website that employs a generic mod_rewrite rule to push all requests to the index.php page, with the exception of certain file extensions: RewriteRule !\.(js|ico|gif|jpg|JPG|png|css|php|phtml|pdf|txt|xml)$ index.php What I need to be able to do is also...
{ "language": "en", "url": "https://stackoverflow.com/questions/332109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I convert a double into a string in C++? I need to store a double as a string. I know I can use printf if I wanted to display it, but I just want to store it in a string variable so that I can store it in a map later (as the value, not the key). A: The problem with lexical_cast is the inability to define p...
{ "language": "en", "url": "https://stackoverflow.com/questions/332111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "199" }
Q: Embedding Video in a WinForms app I need to be able to embed and control the playback of an AVI file in a WinForms app, using C#. The video needs to be embedded in the form, not launched in a separate media player window. What's the best approach to do this? I found the System.Media namespace, which sounded promis...
{ "language": "en", "url": "https://stackoverflow.com/questions/332117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: iPhone video buffer I'm trying to build a video recorder without jailbreaking my iPhone (i've a Developer license). I began using PhotoLibrary private framework, but i can only reach 2ftp (too slow). Cycoder app have a fps of 15, i think it uses a different approach. I tried to create a bitmap from the previewView o...
{ "language": "en", "url": "https://stackoverflow.com/questions/332120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Delaying or repeating a prerequisite in GNU make I'm trying to embed my Subversion revision number in a C++ project and am having problems setting up GNU make to do so. My makefile currently looks something like this: check-svnversion: ../shared/update-svnversion-h.pl ../shared/svnversion.h: check-svnversion sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/332122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does one install .net dlls without .NET SDK or Visual Studio? I need to deploy a few .net dlls. They need to be put in the GAC and the required entries need to be in the registry. On my machine I have both the SDK and Visual Studio running, so currently I am utilizing .net sdk tools like gacutil and regasm. Howe...
{ "language": "en", "url": "https://stackoverflow.com/questions/332125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: YAML media type? What is the most appropriate media type (formally MIME type) to use when sending data structured with YAML over HTTP and why? There is no registered application type or text type that I can see. Example: > GET /example.yaml < Content-Type: ???? < < --- # Favorite movies < - Casablanca < - North by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: What is the best way to store text files remotely? I am building a "document storage" system for storing text files on my server. I was wondering if anybody has any recommendations or best practices on the best way to store text files remotely. The system will be user-based, each user can upload multiple text files...
{ "language": "en", "url": "https://stackoverflow.com/questions/332134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Datagridview - check if the last column is fully displayed I was wondering if there was a way to determine if the last column is fully displayed. I know there is a Displayed property on a column, but that property is true if the column is either partially or fully displayed. I only want it if the column is fully dis...
{ "language": "en", "url": "https://stackoverflow.com/questions/332138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Apache Commons HTTPClient 3.x leaving connections open I'm using HttpClient to execute a PostMethod against a remote servlet and for some reason a lot of my connections are hanging open and hogging up all of my server's connections. Here's more info about the architecture GWT client calls into a GWT Service GWT serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/332143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: IIS, XP, SSL vs. KeepAlives I'm stuck between a rock and a hard place. I'm developing on XP using Studio 2005/IIS. Thus far, this has been problem free for me, until today. I needed to add an SSL cert so I could finish development for a part of the site that runs in SSL using sessions that are only allowed in secure...
{ "language": "en", "url": "https://stackoverflow.com/questions/332145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do you have any opinions of SEI's Team Software Process? Someone within my organization has started pushing for us to pilot the CMU SEI's TSP process (see website here). I have an instinctual aversion to any attempts to cure software development illnesses with alphabet soup, but I would like to know if anyone has ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/332161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best pretty-printing library for Java? What is the single best pretty-printing library for Java? I mean a library for printing formatted output with indentation, break hints, etc., not a library for beautifying/re-formatting Java code itself. Ideally, the library would "play nice" with System.out.println and friends...
{ "language": "en", "url": "https://stackoverflow.com/questions/332166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Rename a sql server instance Is it possible to change a sql server instance name? Or is it something that can only be set during installation? A: To the best of my knowledge, they can only be changed at install time. You might be able to change the name with the installer package while keeping the current info. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Does anyone know how a System.Windows.Forms.Timer affects the host application and the system in general? Does anyone know how a System.Windows.Forms.Timer affects the host application and the system in general? A threaded background loop on one hand has a very high CPU usage %, whilst a Timer with a very high tick ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to suppress php errors on production servers What is the best method of hiding php errors from being displayed on the browser? Would it be to use the following: ini_set("display_errors", 1); Any best practice tips would be appreciated as well! I am logging the errors, I just want to make sure that setting ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How do I search a CVS repository for a particular file? Is there any way to do it? I only have client access and no access to the server. Is there a command I've missed or some software that I can install locally that can connect and find a file by filename? A: You could grep the output of cvs rlog -Nh . (note the...
{ "language": "en", "url": "https://stackoverflow.com/questions/332193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Loading new texture into already defined texture name I have an OpenGl program in which I am displaying an image using textures. I want to be able to load a new image to be displayed. In my Init function I call: Gl.glGenTextures(1, mTextures); Since only one image will be displayed at time, I am using the same tex...
{ "language": "en", "url": "https://stackoverflow.com/questions/332207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .NET C# - Form versus Designer code files for Event Wiring I was just curious how others work with this kind of WinForm code in C#. Lets say I have a Form lets call it Form1. And I have a DataGridView called dgvMain. Where do you put the code: this.dgvMain.CellEndEdit += new DataGridViewCellEventHandler(dgvMain_Ce...
{ "language": "en", "url": "https://stackoverflow.com/questions/332224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I return 'null' or an empty array? Suppose you have a method that should create and return an array of some sort. What if the array doesn't get populated. Do you return an empty array or null/nothing? A: In .NET it's better to return an empty array than null because it saves the caller having to write a null...
{ "language": "en", "url": "https://stackoverflow.com/questions/332229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Is there a service which will let me create a snippet of a webpage I am looking for a way to get the essence or the most important aspect of a webpage? If I provide a URL, is there any external service which can accomplish this? I am not looking for snap.com like service as it provides a snapshot. I might be willing...
{ "language": "en", "url": "https://stackoverflow.com/questions/332230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Excel - calculating durations of time data spread across multiple rows I have a spreadsheet with a dataset of a number of transactions, each of which is composed of substeps, each of which has the time that it occurred. There can be a variable number and order of steps. I'd like to find the duration of each transac...
{ "language": "en", "url": "https://stackoverflow.com/questions/332254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Difference between class foo and class foo(object) in Python I know class foo(object) is an old school way of defining a class. But I would like to understand in more detail the difference between these two. A: Subclassing object yields a new-style class. Two well known advantages of new-style classes are: * *Me...
{ "language": "en", "url": "https://stackoverflow.com/questions/332255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: no such file or directory but the directory is in the path Hello I am compiling a program with make but I get the error of No such file or directory but the file is in a directory of the path. I have this #include "genetic.h", that file is in a directory called /home/myuser/toolbox/lib/genalg and in the PATH I have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Entity Framework Guid I'm trying to setup the Entity Framework with SQL Server 2008. I'm using Guids for the keys on my tables. Is there a way to set it up so the keys are automatically generated by the database? I tried setting "RowGuid" to true and also set the column's default value to be "(newid())". Either ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Managing multiple asynchronous NSURLConnection connections I have a ton of repeating code in my class that looks like the following: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; The problem with asynchron...
{ "language": "en", "url": "https://stackoverflow.com/questions/332276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: Removing Javascript from HREFs We want to allow "normal" href links to other webpages, but we don't want to allow anyone to sneak in client-side scripting. Is searching for "javascript:" within the HREF and onclick/onmouseover/etc. events good enough? Or are there other things to check? A: It sounds like you're al...
{ "language": "en", "url": "https://stackoverflow.com/questions/332284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Large apps in GWT: one module, or several? In order to provide nice URLs between parts of our app we split everything up into several modules which are compiled independently. For example, there is a "manager" portion and an "editor" portion. The editor launches in a new window. By doing this we can link to the edit...
{ "language": "en", "url": "https://stackoverflow.com/questions/332285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I change the size of figures drawn with Matplotlib? How do I change the size of figure drawn with Matplotlib? A: The first link in Google for 'matplotlib figure size' is AdjustingImageSize (Google cache of the page). Here's a test script from the above page. It creates test[1-3].png files of different sizes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3102" }
Q: Loopback jQuery AJAX Request What is the best way to build a loopback URL for an AJAX call? Say I have a page at http://www.mydomain.com/some/subdir/file.php that I want to load with an AJAX call. In Firefox, using jQuery this works fine: $.post('/some/subdir/file.php', ...); Safari/WebKit tries to interpret this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the most efficient way to manage a large set of lines in OpenGL? I am working on a simple CAD program which uses OpenGL to handle on-screen rendering. Every shape drawn on the screen is constructed entirely out of simple line segments, so even a simple drawing ends up processing thousands of individual lines...
{ "language": "en", "url": "https://stackoverflow.com/questions/332295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .NET Windows Forms 2.0: How to have a shared imagelist? I want have to have a single imageList used by multiple forms in a project. That is to say, multiple controls use the same image list. Note: Ideally multiple projects in a single solution will use the same image list - but I don't want to ask too much of Micros...
{ "language": "en", "url": "https://stackoverflow.com/questions/332297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I programmatically change the Page Header height in a RDLC report? Does anyone know of a way to change the height of a Page Header in a RDLC report? I have a textbox that has line breaks and would like the height of the Page Header to expand if there are more than one line. Does anyone know how to do this?...
{ "language": "en", "url": "https://stackoverflow.com/questions/332299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a REAL performance difference between INT and VARCHAR primary keys? Is there a measurable performance difference between using INT vs. VARCHAR as a primary key in MySQL? I'd like to use VARCHAR as the primary key for reference lists (think US States, Country Codes) and a coworker won't budge on the INT AUTO...
{ "language": "en", "url": "https://stackoverflow.com/questions/332300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: MySQL - Views Alternative I've developed an application at working using MySQL 5, that uses Views to access the major pieces of data. It turns out that our production server uses MySQL 4, which does not have Views included. Does anybody have a quick and dirty way to deal with this that doesn't involve rewriting all...
{ "language": "en", "url": "https://stackoverflow.com/questions/332309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are singleton classes thread-safe in IIS? I have an ASP.NET webpage running under IIS that uses a common assembly that contains a singleton class. Should I implement a locking mechanism on the singleton to make it thread-safe? Or, will any connection to the webserver use the same instance of the singleton? Hopeful...
{ "language": "en", "url": "https://stackoverflow.com/questions/332318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Session management in GWT without using Java on the server? I am using GWT for my client side application. I am not using GWT/Java for the server. However, I am not sure how I can handle session management. The GWT application resides on one page, all server calls are done via AJAX. If a session expires on the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/332337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to determine bottlenecks in NHibernate? This is in reference to a question I asked earlier. Aside from viewing the SQL generated by NHibernate on calls to the database, what is the best way to find bottlenecks between NHibernate and the DB? In particular, I have queries that return very quickly when run dir...
{ "language": "en", "url": "https://stackoverflow.com/questions/332344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NSURLConnection and handling response code and response data I have an odd edge case right now in that a response code from an NSURLConnection delegate method: - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; Is triggered before the subsequent delegate method: - (void)c...
{ "language": "en", "url": "https://stackoverflow.com/questions/332351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MySQL permissions issue - should be non-issue This is making me kind of crazy: I did a mysqldump of a partitioned table on one server, moved the resulting SQL dump to another server, and attempted to run the insert. It fails, but I'm having difficulty figuring out why. Google and the MySQL forums and docs have no...
{ "language": "en", "url": "https://stackoverflow.com/questions/332353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Hosting Windows Shell Explorer in my WPF App Is it possible to embed the Windows Explorer file/folder browser view in a WPF or a WinForms window? I basically want to host the file/folder browser as part of my app window. I don't want to re-implement what the shell provides, especially the shell extensions such as T...
{ "language": "en", "url": "https://stackoverflow.com/questions/332364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How does the SQL injection from the "Bobby Tables" XKCD comic work? Just looking at: (Source: https://xkcd.com/327/) What does this SQL do: Robert'); DROP TABLE STUDENTS; -- I know both ' and -- are for comments, but doesn't the word DROP get commented as well since it is part of the same line? A: This is how it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1213" }
Q: How do you organize C# code in to files? In C#, the questions of what types to create, what members they should have, and what namespaces should hold them, are questions of OO design. They are not the questions I'm interested in here. Instead, I want to ask how you store these in disk artifacts. Here are some exam...
{ "language": "en", "url": "https://stackoverflow.com/questions/332370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: jQuery Accordion: links don't work I'm working on a page using jQuery's accordion UI element. I modeled my HTML on that example, except that inside the <li> elements, I have some unordered lists of links. Like this: $(document).ready(function() { $(".ui-accordion-container").accordion( {active: "a.def...
{ "language": "en", "url": "https://stackoverflow.com/questions/332384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it possible to Serialize a LINQ object? I'd like to serialize some LINQ generated objects and store them in a table as a binary field (Never you mind why). I'd like to be able to write some code that looks something like this: SerialTestDataContext db = new SerialTestDataContext(); relation_table row = db.relati...
{ "language": "en", "url": "https://stackoverflow.com/questions/332390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What is the best way to check for reparse point in .net (c#)? My function is pretty much a standard search function... I've included it below. In the function I have 1 line of code responsible for weeding out Repart NTFS points. if (attributes.ToString().IndexOf("ReparsePoint") == -1) The problem is now I am getti...
{ "language": "en", "url": "https://stackoverflow.com/questions/332397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why does making simple edits then uploading crash my site? Whenever I alter (or even just resave without altering) a Perl file, it completely takes down our backend. I have no idea what the problem could be. Permissions are correct. Encoding is correct. Encoding is UTF-8. Transfer mode was ASCII. I might not deal wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/332398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sharepoint Custom Filter Web Part I want to create a custom web part that has more than 1 filter web part and that can be connected to Report Viewer Web Part (Integrated Mode) at runtime/design time. I searched a lot for this, but could not find a way to have single web part that is a provider to more than 1 filters...
{ "language": "en", "url": "https://stackoverflow.com/questions/332405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Get the name of an object's type Is there a JavaScript equivalent of Java's class.getName()? A: Use constructor.name when you can, and regex function when I can't. Function.prototype.getName = function(){ if (typeof this.name != 'undefined') return this.name; else return /function (.+)\(/.exec(this.toSt...
{ "language": "en", "url": "https://stackoverflow.com/questions/332422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1312" }
Q: How do you handle attaching JavaScript to UserControls in ASP.NET and keep multiple instance isolated? Lets say you need to attach some JavaScript functionality to an ASP.NET User Control of which there might be multiple instances on any given page. Because JavaScript has shared global state, what techniques can yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/332431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQLite .dump command from SQLiteConnection object Using SQLite from .net, Is there a way to access the .dump command or something equivalent from the SQLiteConnection class? A: The .dump command is part of the sqlite command line program (shell.c), not part of the sqlite library. So, it is unlikely to be provided b...
{ "language": "en", "url": "https://stackoverflow.com/questions/332440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: An interesting C linked list idiom I was at an interview for a C position in which they presented me with an idiom that I haven't previously encountered. This is a trick that simplifies implementation of various algorithms involving linked lists and I'm wondering if anybody else has encountered this. Say we have a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/332441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: jQuery Accordion: IE animation issues Update I am making this a community wiki, for three reasons: * *I don't feel like I got a definitive answer, but *I have long since stopped needing an answer, because I rolled my own accordion function *this question gets tons of views, so clearly lots of people are still i...
{ "language": "en", "url": "https://stackoverflow.com/questions/332448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: node-set in xpath I am writing a xslt style sheet to transform a xml to another xml. Here is the simplified version of original xml: <eml> <datatable> <physical> <distribution id="100"/> </physical> </datatable> <software...
{ "language": "en", "url": "https://stackoverflow.com/questions/332449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Displaying simple javascript enabled webpage within a Flex app? I'm working on a Flex app that needs to display ads from third party vendors that come in the form of HTML docs containing javascript. Are there any components available that can display such things? It seems like we need a mini-browser that runs insi...
{ "language": "en", "url": "https://stackoverflow.com/questions/332451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: F# string building I want to do this C# code in F# string[] a = new string[5]; string b = string.Empty; a[0] = "Line 1"; a[2] = "Line 2"; foreach (string c in a) { b = c + Environment.NewLine; } A: The '^' operator concatenates two strings. Also, '+' is overloaded so it can work...
{ "language": "en", "url": "https://stackoverflow.com/questions/332454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: non-member non-friend function syntax Is their a way to use a non-member non-friend function on an object using the same "dot" notation as member functions? Can I pull a (any) member out of a class, and have users use it in the same way they always have? Longer Explanation: Scott Meyers, Herb Sutter, et all, argue t...
{ "language": "en", "url": "https://stackoverflow.com/questions/332460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Preferred way to map code with user created database entries I am trying to work out the best database model for the current setup: An administrator can create "customer products". This means services/products which customer can attach/subscribe to. The simple cases where the product simply costs a price, or the pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/332466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I do TDD efficiently with NHibernate? It seems to me that most people write their tests against in-memory, in-process databases like SQLite when working with NHibernate. I have this up and running but my first test (that uses NHibernate) always takes between 3-4 seconds to execute. The next test runs much fas...
{ "language": "en", "url": "https://stackoverflow.com/questions/332468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: msvcr90.dll dependency in VS 2005 C++ project I've created a DLL project in VS 2005 for native Win32/unmanaged C++, call it myProj.dll. It depends on a 3rd-party commercial DLL that in turn depends on msvcr90.dll (I assume it was built from a VS 2008 project). I'll call it thirdParty.dll. My DLL project builds jus...
{ "language": "en", "url": "https://stackoverflow.com/questions/332473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Revoking authentication and redirect to login page after FormsAuthentication have authenticated the user I need to revoke an authentication cookie if the user no longer exists (or some other condition), after the forms authentication mechanism already have received the authentication cookie from the browser and have...
{ "language": "en", "url": "https://stackoverflow.com/questions/332477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why do I get the "method has no supported translation to SQL" error? i get this error {"Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL."} when i try to execute this linq to sql var query = from p in db.Posts let categories = GetCa...
{ "language": "en", "url": "https://stackoverflow.com/questions/332479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to set the default browser home page (IE) with C#? How can I programmatically change my browser's default home page with C#? A: Set it in this registry setting: HKCU\Software\Microsoft\Internet Explorer\Main\Start Page A: See this, which is not in C#, but you should be able to work out the registry stuff in C...
{ "language": "en", "url": "https://stackoverflow.com/questions/332486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Oracle Floats vs Number I'm seeing conflicting references in Oracles documentation. Is there any difference between how decimals are stored in a FLOAT and a NUMBER types in the database? As I recall from C, et al, a float has accuracy limitations that an int doesn't have. R.g., For 'float's, 0.1(Base 10) is approxim...
{ "language": "en", "url": "https://stackoverflow.com/questions/332492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: In Eclipse, how can I get my plugin to load when another plugin is loaded? I want to register to get notified of all Java changes in Eclipse. I can do this by calling JavaCore.addElementChangedListener(). However, I don't want my plugin to be loaded until org.eclipse.jdt.core is loaded. My hack attempt to do this wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/332504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the more advanced rules needed for your code to become CLS-complaint? Here is a specific example which is not CLS-complaint according to VS.NET 2005. Public Interface IDbId Function GetNativeObject() As Object Function Equals(ByVal compObj As IDbId) As Boolean Function CompareTo(ByVal compObj A...
{ "language": "en", "url": "https://stackoverflow.com/questions/332515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Good OleDB/ODBC provider for PostgreSQL I'm in need of a functional OleDB data provider for PostgreSQL. It should be similar to the ODBC provider for MySQL. See http://dev.mysql.com/downloads/connector/odbc/5.1.html A: The postgres software catalog has some providers on there. A: dotConnect for PostgreSQL (from De...
{ "language": "en", "url": "https://stackoverflow.com/questions/332518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java Manifest.mf classpath issues I've been trying to run a jar file - let's call it test.jar - that uses the Sybase jconn3.jar on a Unix system. I have created a MANIFEST.MF file that has the following: Class-Path: $SYBASE/jConnect-6_0/classes/jconn3.jar commons-net-1.3.0.jar This gives a ClassNotFoundError. $SYBA...
{ "language": "en", "url": "https://stackoverflow.com/questions/332522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to exclude specific commits when doing a git merge? Let's say that I want to merge from a release branch to the master branch and there are some commits in the release branch that I don't want to include in the master branch. Is there a way to do the merge so that one or more of those commits will no...
{ "language": "en", "url": "https://stackoverflow.com/questions/332528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: Which XML structure is best suited for an all round API? Please advise if you can. I am building an SMS web service API that will allow people to send SMS to their desired cellphone numbers. A request will be sent to the interface, we then process that request based on the account details provided and credits availa...
{ "language": "en", "url": "https://stackoverflow.com/questions/332534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best way to use SQL Server Analysis Services data in a line of business application? We'd like to see if we can get some improved performance for analysis and reporting by moving some of our key data into Analysis Services cubes. However, I haven't been able to find much in the way of good client front e...
{ "language": "en", "url": "https://stackoverflow.com/questions/332535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Provider com.bea.xml.stream.MXParserFactory not found Anyone come across this error when trying to import a WSDL in Flex builder 3? Seems it only occurs when trying to import a WCF based service which has 'virtual' endpoints... Some digging around makes me think Flex has trouble parsing the wsdl (however standard we...
{ "language": "en", "url": "https://stackoverflow.com/questions/332537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Msg 64, Level 20, State 0, Line 0 SQL Server Error I am running a sproc on an SQL Server 2005 server which is resulting in the following error: Msg 64, Level 20, State 0, Line 0 A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified net...
{ "language": "en", "url": "https://stackoverflow.com/questions/332540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: asmx wsdl string length I have a VB class in an .asmx file in Visual Studio 2008: public class foo public bla as String end class It generates the wsdl value: <s:complexType name="foo"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="bla" type="s:string" /> </s:sequence> </s:complexType> But wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/332551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Includes with the Linux GCC Linker I don't understand how GCC works under Linux. In a source file, when I do a: #include <math.h> Does the compiler extract the appropriate binary code and insert it into the compiled executable OR does the compiler insert a reference to an external binary file (a-la Windows DLL?) I...
{ "language": "en", "url": "https://stackoverflow.com/questions/332554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Version Control Algorithm I have a database where I store objects. I have the following (simplified) schema CREATE TABLE MyObjects ( UniqueIdentifier Id; BigInt GenerationId; BigInt Value; Bit DeleteAction; ) Each object has a unique identifier ("Id"), and a (set of) propert...
{ "language": "en", "url": "https://stackoverflow.com/questions/332558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Does any tool exist to help Sync a directory with TFS? When using TFS with a tool outside of Visual Studio (Specifially ORMS), modifications to the project file to include a new file will not cause the file to be added to source control. Does anything exist that could potentially say "Warning: You are about to check...
{ "language": "en", "url": "https://stackoverflow.com/questions/332567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I see where the tab stops are in the SQL Server Management Studio editor? I dictate SQL using speech recognition, and lining things up is a pain. If I could see where the tab stops are it would save me a lot of time. A: Management Studio supports an undocumented feature that Visual Studio has as well. It ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/332574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Generating large sets of random data vb6/vb net Is there an easy way in either language to generate a large set of random data quickly so far all the functions I've tried haven't worked too well when I need to generate a group of say 500,000 characters :( Any ideas? A: Use UUIDGen. Don't. GUIDs aren't really ran...
{ "language": "en", "url": "https://stackoverflow.com/questions/332580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Creating new Soap Web Service with .NET 3.5 I haven't really looked into the new .NET stuff since 2.0, but I'm wondering what the preffered way is for creating Web Services is now (SOAP, not RESTful). I remember in the old days, you created a ASP.NET Web Service. Now, I've been looking at WCF, but it seems like th...
{ "language": "en", "url": "https://stackoverflow.com/questions/332581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: 2d Platformer physics It was a long holiday weekend, so I got the coding bug again and started playing around: Mario http://gfilter.net/junk/tileengine.jpg I wrote a basic tile engine, but having never attempted this before, I am really struggling with handling sprite collision detection and implementing realistic p...
{ "language": "en", "url": "https://stackoverflow.com/questions/332585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Performance difference between annotating fields or getter methods in Hibernate / JPA I was curious if anyone had any hard numbers around the performance difference between annotating Entities using private fields instead of public getter methods. I've heard people say that fields are slower because they're called ...
{ "language": "en", "url": "https://stackoverflow.com/questions/332591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Making slideToggle() elements collapsed by default in jQuery I have a set of divs that I want to make collapsible/expandable using jQuery's slideToggle() method. How do I make all of these divs collapsed by default? I'd like to avoid explicitly calling slideToggle() on each element during/after page rendering. A: Y...
{ "language": "en", "url": "https://stackoverflow.com/questions/332592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Turn off calling tabPage_Enter method in C# When I switch tabs with the following code tabControl1.SelectTab("MyNextTab"); It calls the tabPage_Enter for the tab it is switching from and the tab it is switching to. I want it to be called for the tab it is switching to, but not the tab it is switching from. How woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/332601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Maintaining subclass integrity in a relational database Let's say I have a table that represents a super class, students. And then I have N tables that represent subclasses of that object (athletes, musicians, etc). How can I express a constraint such that a student must be modeled in one (not more, not less) subcla...
{ "language": "en", "url": "https://stackoverflow.com/questions/332602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }