text
stringlengths
8
267k
meta
dict
Q: Building .Net User Controls I am currently building a .Net userform using C# and I am populating it with custom user controls. The controls each have an accessor that gets and sets the object that contains the data that the control will be populated with. At runtime, everything works great, but at design time I wil...
{ "language": "en", "url": "https://stackoverflow.com/questions/318998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How many function parameters is too many? Possible Duplicate: How many parameters are too many? I was just writing a function that took in several values and it got me thinking. When is the number number of arguments to a function / method too many? When (if) does it signal a flawed design? Do you design / ref...
{ "language": "en", "url": "https://stackoverflow.com/questions/318999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Mocking attributes - C# I use custom Attributes in a project and I would like to integrate them in my unit-tests. Now I use Rhino Mocks to create my mocks but I don't see a way to add my attributes (and there parameters) to them. Did I miss something, or is it not possible? Other mocking framework? Or do I have to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/319002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET - Basic checklist for putting a site into production I'm building a static ASP.NET site (using Masterpages and a few forms) and I'm about to release it onto my production server. I know about changing <compilation debug="true"> to false, but I'm wondering what other things I can do to obtain the highest spee...
{ "language": "en", "url": "https://stackoverflow.com/questions/319009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Problem with relative path in Python I know this is a simple, beginner-ish Python question, but I'm having trouble opening a file using a relative path. This behavior seems odd to me (coming from a non-Python background): import os, sys titles_path = os.path.normpath("../downloads/movie_titles.txt") print "Current...
{ "language": "en", "url": "https://stackoverflow.com/questions/319037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I set a picture as the background in ASP.NET? I've added a jpg file to the App_localResources folder and in the document properites specified the photo in the Background propery. In the designer it shows up as the background but when i run the page i still get the white page background. A: There's no distin...
{ "language": "en", "url": "https://stackoverflow.com/questions/319038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ranking of Full Text Search (SQL Server) For the last couple hours I have been messing with all sorts of different variations of SQL Server full text search. However I am still unable to figure out how the ranking works. I have come across a couple examples that really confuse me as to how they rank higher then othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/319044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to center a element in IE6 trying to implement a dialog-box style behaviour using a separate div section with all the stuff inside it. When the "dialog box" needs to be shown, it has to display at the center of the WINDOW, not in the center of the page, that is, REGARDLESS of the scroling position. Furthermore,...
{ "language": "en", "url": "https://stackoverflow.com/questions/319057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Serious problem with the speed of full screen textField animation I can't find any proper way to make a long textField move fluently horizontally across the screen in full screen mode. I tried many ways but it always gets stuck from time to time for a few milliseconds and ruins the whole experience. Please, if someo...
{ "language": "en", "url": "https://stackoverflow.com/questions/319063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cross domain Ajax request from within js file Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a js file www.foo.com like this... <script type="text/javascript" src="http://www.foo.com/jsfile.js" /> 3.) "jsfile.js" uses Prototype to make an Ajax request back to www.foo.co...
{ "language": "en", "url": "https://stackoverflow.com/questions/319065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Powerbuilder Date Math How do I subtract 30 days from a date in PowerBuilder? I have the following code that returns today's date in a parameter, but I need today - 30 days: dw_1.setitem(1, "begin_datetime", datetime(today(), Now())) A: you're probably looking for the RelativeDate function. Unfortunately, it...
{ "language": "en", "url": "https://stackoverflow.com/questions/319073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I determine the character set of a string? I have several files that are in several different languages. I thought they were all encoded UTF-8, but now I'm not so sure. Some characters look fine, some do not. Is there a way that I can break out the strings and try to identify the character sets? Perhaps s...
{ "language": "en", "url": "https://stackoverflow.com/questions/319095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Building hierarchy objects from flat list of parent/child I have a list of items in a hierarchy, and I'm attempting to parse this list out into an actual hierarchy of objects. I'm using modified pre-order tree traversal to store/iterate through this list, and so what I have is a subset of the tree, including all chi...
{ "language": "en", "url": "https://stackoverflow.com/questions/319108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How to create an element without hardcoding the name I tried this but it does not seem to be valid syntax. <xsl:element name="$myElementName"></xsl:element> A: You may need to surround it with {} to ensure the value is evaluated rather than used as a verbatim string, e.g. <xsl:element name="{$myElementName}"></xsl...
{ "language": "en", "url": "https://stackoverflow.com/questions/319110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trouble encoding a u umlaut with in a .Net http handler I have a JavaScript request going to a ASP.Net (2.0) HTTP handler which passes the request to a java web service. In this system special characters, such as those with an accent do not get passed on correctly. E.G. * *Human input: Düsseldorf *becomes a Java...
{ "language": "en", "url": "https://stackoverflow.com/questions/319113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to access the layer of a view? I would like to apply a transformation (rotation) to a UIImageView. I could just set the transform property of the view, but wouldn't setting the layer's transform make it faster? If so, how can I achieve this? Assuming I have a UIImageView initialized with an image, can anyone hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/319120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to disable the minimize button in C#? In my application I need to temporarily gray out the minimize button of the main form. Any ideas how this can be achieved? I don't mind doing p/invokes to Win32 dlls. Edit: Graying out the minimize button would be the preferred solution, but is there any other way of prevent...
{ "language": "en", "url": "https://stackoverflow.com/questions/319124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Asynchronous file writing possible in python? Is there an easy way write to a file asynchronously in Python? I know the file io that comes with Python is blocking; which is fine in most cases. For this particular case, I need writes not to block the application at all, or at least as minimally as possible. A: Twis...
{ "language": "en", "url": "https://stackoverflow.com/questions/319132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: boost::any_cast - throw only when an implicit conversion isn't available? I want boost::any_cast<T> to only throw an exception when the type of the any doesn't have an implicit conversion to T. The normal behaviour seems to be to throw an exception if the type of the any is not T, regardless of implicit conversions....
{ "language": "en", "url": "https://stackoverflow.com/questions/319154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Script.aculo.us Sortable onUpdate problem in IE I'm working on a project where I am using a script.aculo.us Sortable object. It works nice and fast in Firefox and Chrome, but in IE it is incredibly slow whenever I drop an element. I've done a little checking, and it turns out that in IE, the "onUpdate" callback func...
{ "language": "en", "url": "https://stackoverflow.com/questions/319155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generating SQL using XML and XSLT I have an XML definition that contains an element with child elements. For example: <a> <b> <c>C</c> <d>D</d> </b> </a> I have an XSLT with an output of text. For example: <xsl...> <xsl:output method="text" indent="yes"/> <xsl:template match="/"> <xsl:copy-of select="...
{ "language": "en", "url": "https://stackoverflow.com/questions/319159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ctags best practicies I'm working on +1M LOC C/C++ project on Solaris (remote, via VNC or SSH). I have a daily updated copy of source code on my local machine too (Windows, just for browsing code). I use VIM and ctags combo (on both Solaris and Windows) but I'm not happy with results / speed. What settings for ctags...
{ "language": "en", "url": "https://stackoverflow.com/questions/319168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What Arguments are you supposed to give to the Windows API call VerQueryValue I understand the first argument must be the result of GetFileVersionInfo(). The third and forth are target buffer and size What is the second argument, lpSubBlock? Thanks In Advance A: When you view the version info through the resource e...
{ "language": "en", "url": "https://stackoverflow.com/questions/319171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NHibernate mapping of lookup collection (if that makes any sense) I'm not sure how to ask the question, for I don't know what I don't know, and therefore I don't know the proper terminology for what I'm trying to get the answer to. I will explain my scenario, in hopes that it will help: I've got three tables, a Boo...
{ "language": "en", "url": "https://stackoverflow.com/questions/319178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a way to change the sql reporting chart type and sub type at runtime? Is there a way to change SQL Reporting "chart type" and "sub type" at runtime? I'm working with a .rdlc report and can't seem to figure out the way to change this at runtime. I don't have the "Expression" ability in either of these field...
{ "language": "en", "url": "https://stackoverflow.com/questions/319185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: A good server spec for image resizing in PHP I have a site that enables users to upload images which are then re-sized into 4 different sizes. I'm moving to a new host and I wondered what makes a good spec for handling this task - or should any server spec be able to handle this task. Should I look at more RAM or a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are spaces allowed in the name attribute of a Struts logic:equal tag? I came across the following markup in a JSP file in a legacy app I maintain: <logic:equal name="welcome memberInfoView" property="hasFoo" value="false"> That name attribute looks very wrong to me. Based on what I've read in the Struts docs, that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should Quaternion based 3D Cameras accumulate Quaternions or Euler angles? So I have written a Quaternion based 3D Camera oriented toward new programmers so it is ultra easy for them to integrate and begin using. While I was developing it, at first I would take user input as Euler angles, then generate a Quaternion ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Make virtual earth infobox appear on click instead of hover? Is it possible to make Virtual Earth pushpin infobox display respond from onclick instead of mouseover? Currently I'm using something like this: ... var pin = new VEShape( VEShapeType.Pushpin, [location] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why is Java able to store 0xff000000 as an int? An integer's max value in Java is 2147483647, since Java integers are signed, right? 0xff000000 has a numeric value of 4278190080. Yet I see Java code like this: int ALPHA_MASK = 0xff000000; Can anyone enlighten me please? A: Something probably worth pointing out - t...
{ "language": "en", "url": "https://stackoverflow.com/questions/319199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Building a Query From a List of Strings How would you take an arbitrary list of strings (of the form "%[text]%") and a database column, and turn them into a SQL query that does a LIKE comparison for each string in the list? An example: I have three strings in my list, "%bc%", "%def%" and "%ab%". This builds the quer...
{ "language": "en", "url": "https://stackoverflow.com/questions/319204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you use LINQ with Sqlite Would someone explain how to get LINQ working with Sqlite. A: The link provided by CMS doesn't work anymore. I have used this one as it now seems to be baked into their SQL lite ADO .NET provider. Unfortunately they still don't support the designer mode of VS for creating classes :( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Good URL strategy for sitemap and SEO I run a site where users have their own profile pages. They are also able to post products for sale (that they have made) and write/import blog posts. I am going to be implementing a sitemap and I need to make a final decision with the URL strategy. Here's what I currently have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Cascading to a auto completing text box I have a web page where the user will enter their address. They will select their country and region in cascading drop down lists. I would like to provide an auto completing textbox for their city, but I want to be context sensitive to the country and region selections. I woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/319230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to call python2.5 function from x86asm/x64asm? I'll have couple of python functions I must interface with from the assembly code. The solution doesn't need to be a complete solution because I'm not going to interface with python code for too long. Anyway, I chewed it a bit: * *What does a python object look l...
{ "language": "en", "url": "https://stackoverflow.com/questions/319232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Session cookie lost with IE7 I have an ASP.NET 2.0 application. The login page redirects twice when the login is successful. This works OK on all test environment and production servers except one. We can see with Fiddler that the login redirects to the second page and it redirects to the third. When getting to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is eclipse visual editor dead? The Eclipse Visual Editor project seems to be dead, no commits, no updates. Any one know what is happening? A: Update 2: The project has been archived (i.e. dead) since June 2011 again. Update: The project has been revived and is now under active development again. Its pretty much dea...
{ "language": "en", "url": "https://stackoverflow.com/questions/319242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Downloadable/browsable version of the .NET Framework source code? Now that the source code to the .NET Framework has been made available, is there any way to actually view it that doesn't involve using Visual Studio to step into a framework class? Several times now, I've been curious just how something works and wis...
{ "language": "en", "url": "https://stackoverflow.com/questions/319249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Can you recommend a good source for Teradata Best Practices? Looks like my data warehouse project is moving to Teradata next year (from SQL Server 2005). I'm looking for resources about best practices on Teradata - from limitations of its SQL dialect to idioms and conventions for getting queries to perform well - pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/319251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can SQL calculate aggregate functions across multiple tables? Let's say I have two existing tables, "dogs" and "cats": dog_name | owner ---------+------ Sparky | Bob Rover | Bob Snoopy | Chuck Odie | Jon cat_name | owner ---------+------ Garfield | Jon Muffy | Sam Stupid | Bob How do I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/319262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: jQuery Plugin: Handling Events I'm currently working on a jQuery plugin and I'm wondering if it would be possible to have the plugin listen for events rather than being triggered by events. So instead of this: $('#element_id').mouseover(function() { $(this).plugin(); }); $('#element_id').mouseout(function() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: tutorial for HTML canvas's arc function I can not figure out what all the parameters to the arc() function are (by experimentation) and I have not found any tutorial that seems to explain them. Where would a good explanation of the arc() function be? A: I was having the same problem and made a little interactive pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/319267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to validate IP address in Python? What's the best way to validate that an IP entered by the user is valid? It comes in as a string. A: import socket def is_valid_ipv4_address(address): try: socket.inet_pton(socket.AF_INET, address) except AttributeError: # no inet_pton here, sorry try...
{ "language": "en", "url": "https://stackoverflow.com/questions/319279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "183" }
Q: Postgresql Concurrency In a project that I'm working, there's a table with a "on update" trigger, that monitors if a boolean column has changed (ex.: false -> true = do some action). But this action can only be done once for a row. There will be multiple clients accessing the database, so I can suppose that eventual...
{ "language": "en", "url": "https://stackoverflow.com/questions/319280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Changing the reserve memory of C++ vector I have a vector with 1000 "nodes" if(count + 1 > m_listItems.capacity()) m_listItems.reserve(count + 100); The problem is I also clear it out when I'm about to refill it. m_listItems.clear(); The capacity doesn't change. I've used the resize(1); but that doesn't se...
{ "language": "en", "url": "https://stackoverflow.com/questions/319292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is checking if not nil before sending a release message good practice? when releasing an instance that could exist or not, I usually write this: if (object != nil) [object release]; but since sending a message to nil is not a problem, is that conditional necessary? I suppose the question comes down to this: which us...
{ "language": "en", "url": "https://stackoverflow.com/questions/319294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Resources for developing a C++ MySQL application for Linux I'm going to be developing a C++ application that uses a MySQL database. I've written similar apps in Java using JDBC, as well as the Spring Framework. Are there equivalent libraries for C++? What have you had the most success with? A: I would use the My...
{ "language": "en", "url": "https://stackoverflow.com/questions/319297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# - How to call an exe added into project solution So I added an EXE to my project's solution. The EXE does some stuff and outputs data via stdout. I want to capture the output, but more importantly how do I execute that EXE within my program? A: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.St...
{ "language": "en", "url": "https://stackoverflow.com/questions/319304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why is the Windows cmd.exe limited to 80 characters wide? I love stretching my terminal on unix. What is the history or reason behind windows lame command line? A: I don't know the history behind it, but this wishlist item from the author of PuTTy is an interesting post that explains the technical hurdles involved ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: How many dimensions in an array with no value I'm a little lost (still working with Ron Jeffries's book). Here's a simple class: public class Model{ private String[] lines; public void myMethod(){ String[] newLines = new String[lines.length + 2]; for (i = 0, i <= lines.length, i++) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a programatic way to access iTunesConnect sales reports? I've got an app on the iTunes store, and Apple provides daily (and weekly) sales reports. I'd like to download these in an automated fashion (say, via script attached to a cron job), but I'm not sure how to get around all their https-forms, Web-objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/319322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to write a while loop with the C preprocessor? I am asking this question from an educational/hacking point of view, (I wouldn't really want to code like this). Is it possible to implement a while loop only using C preprocessor directives. I understand that macros cannot be expanded recursively, so how would this...
{ "language": "en", "url": "https://stackoverflow.com/questions/319328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Save information from MS crash reporter? On Windows XP when a process crashes, we get a dialog box with a link: "To view technical information about the error report, click here." The "click here" link brings up a whole lot of information in a window, but no obvious way to save it to a file. Is there a way? It would...
{ "language": "en", "url": "https://stackoverflow.com/questions/319334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do you have your own 'utils' dll and what do you keep there? I can start with my own .NET dll. I have a dll I use in all my web projects (around 10) and I have util classes for FTP, zip, imageresizing, extensionmethods and a generic singleton class. I think it is a common practice and I just thought it would be inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/319339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you ever have too many "protected virtual" methods? Here's a question for those of you with experience in larger projects and API/framework design. I am working on a framework that will be used by many other projects in the future, so I want to make it nice and extensible, but at the same time it needs to be sim...
{ "language": "en", "url": "https://stackoverflow.com/questions/319343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What is the equivalent of 'describe table' in SQL Server? I have a SQL Server database and I want to know what columns and types it has. I'd prefer to do this through a query rather than using a GUI like Enterprise Manager. Is there a way to do this? A: The SQL Server equivalent to Oracle's describe command is the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "401" }
Q: how to convert server time to local time I have a problem with time My server is in the USA and I'm in Denmark (Europa) and I would like to have my site show the time in my local time. How can I do that? I try this Datetime localtime = DateTimeOffset.Now.ToOffset(new TimeSpan(1,0,0)).DateTime; and it works, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Page Not Found Error on SharePoint Sites in TFS I'm in big trouble here, today i was asked to add a new user to TFS, the first thing I do is adding it to SharePoint, but now every time I tried to enter the project portal (Team Explorer -> right click on project -> Show project portal) I got an page not found error, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Database consistency with SQL Order By and nulls I have a column in my database (a flag) with type varchar(1) that is populated either Y or NULL (this is how it is, not in my control). In SQL Server, doing an ascending order by query, NULL is ordered at the top. Should this behaviour be consistent for Oracle and DB2...
{ "language": "en", "url": "https://stackoverflow.com/questions/319384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Windows Server 2003 sp2 kills ASP.NET 1.1 web apps We recently upgraded our intranet dev server (Windows Server 2003) to the latest and greatest patches, including 2k3 sp2 and the latest for each version of .NET. We have a variety of technologies that we use, including COM+, ASP, ASP.NET 1.1, ASP.NET 2.0, and ColdFu...
{ "language": "en", "url": "https://stackoverflow.com/questions/319389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Static control with WS_EX_TRANSPARENT style not repainted I am trying to create a control that implements the per-pixel alpha blend while painting a 32-bit bitmap. I extended a CWnd and use static control in the resource editor. I managed to paint the alpha channel correctly but still the static control keep paintin...
{ "language": "en", "url": "https://stackoverflow.com/questions/319393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pointer Pointer Methods C++ I have two questions: 1) How can I make an array which points to objects of integers? int* myName[5]; // is this correct? 2) If I want to return a pointer to an array, which points to objects (like (1)) how can I do this in a method? ie) I want to impliment the method: int **getStuff() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Possible to modify the C# that Linq To SQL generates? It would be really handy to be able to somehow say that certain properties in the generated entity classes should, for example, be decorated by (say) validation attributes (as well as Linq To SQL column attributes). Is it a T4 template someplace? Or are there ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/319401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Ruthlessly compressing large images for the web I have a very large background image (about 940x940 pixels) and I'm wondering if anyone has tips for compressing a file this large further than Photoshop can handle? The best compression without serious loss of quality from Photoshop is PNG 8 (250 KB); does anyone kno...
{ "language": "en", "url": "https://stackoverflow.com/questions/319403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Extract a Byte[] from an XElement with Linq to Xml I am saving some small images to Xml as a Byte[] via the following XElement construct.. XElement xe = new XElement("Images", from c in qry select new XElement("Image", new XAttribute("Date", c.Date), new XElement("Data", c.Bytes...
{ "language": "en", "url": "https://stackoverflow.com/questions/319407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I do in ASP.Net for a search form? I have a search form in an app I'm currently developing, and I would like for it to be the equivalent of method="GET". Thus, when clicking the search button, the user goes to search.aspx?q=the+query+he+entered The reason I want this is simply bookmarkable URLs, plus it fee...
{ "language": "en", "url": "https://stackoverflow.com/questions/319413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: ASP.NET - controls generated by xslt transformation i'm generating controls dynamically on my asp.net page by xslt transformation from an xml file. i will need to reference these controls from code behind later. i would like to add these references to the list/hashtable/whatever during creation (in xslt file i suppo...
{ "language": "en", "url": "https://stackoverflow.com/questions/319422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mysqli->error: Is it for the last query only, or for the last error from the query group? I am new to mysqli, and trying to confirm that if I so something like the below, the errno will be set to the last error, if any, and not the error of the last query. Is this a decent practice or should I be checking for the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/319423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I do a case-insensitive string comparison? How can I compare strings in a case insensitive way in Python? I would like to encapsulate comparison of a regular strings to a repository string, using simple and Pythonic code. I also would like to have ability to look up values in a dict hashed by strings using re...
{ "language": "en", "url": "https://stackoverflow.com/questions/319426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "753" }
Q: Simultaneous updates across two display contexts in openGL I have a C# .NET application with which I've created a custom image display control. Each image display represents its own display context and draws the image using glDrawPixels (Yes I know it would be better to use textures, I plan to in the futures but thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/319429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Basic Excel currency format with Apache POI I'm able to get cells to format as Dates, but I've been unable to get cells to format as currency... Anyone have an example of how to create a style to get this to work? My code below show the styles I'm creating... the styleDateFormat works like a champ while styleCurren...
{ "language": "en", "url": "https://stackoverflow.com/questions/319438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Referencing code in VB.NET I'm not at all familiar with VB.NET or ASP. I need to create a simple page which makes a call to a remote web service. I used the wsdl utility which comes with the DotNet SDK to generate a service proxy and write it to a VB file. Unfortunately I have no idea how to reference this code in e...
{ "language": "en", "url": "https://stackoverflow.com/questions/319443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I make POST or GET requests from an iphone application? Is there a way using the iPhone SDK to get the same results as an HTTP POST or GET methods? A: If you're using Objective C, you'll need to use the NSURL, NSURLRequest, and NURLConnection classes. Apple's NSURLRequest doc. HttpRequest is for JavaScript. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/319463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Generate formatted diff output in Java Are there any libraries out there for Java that will accept two strings, and return a string with formatted output as per the *nix diff command? e.g. feed in test 1,2,3,4 test 5,6,7,8 test 9,10,11,12 test 13,14,15,16 and test 1,2,3,4 test 5,6,7,8 test 9,10,11,12,13 test 13,1...
{ "language": "en", "url": "https://stackoverflow.com/questions/319479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do I release sql express database? I have a simple app that uses an SQL Express 2005 database. When the user closes the app, I want to give the option to back up the database by making a copy in another directory. However, when I try to do it, I get "The process cannot access the file '...\Pricing.MDF' because...
{ "language": "en", "url": "https://stackoverflow.com/questions/319482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Put one thread to sleep until a condition is resolved in another thread Here are two chunks of code that accomplish (what I think is) the same thing. I basically am trying to learn how to use Java 1.5's concurrency to get away from Thread.sleep(long). The first example uses ReentrantLock, and the second example use...
{ "language": "en", "url": "https://stackoverflow.com/questions/319485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Updating from Java VM 5 to 6 gave a really big increase of memory consumption I've be working with a Java application run through the command-line. It deals with XML files, specially the dblp.xml database which has more than 400MB. I was using JVM 5 and my app needed sort of 600-700MB of memory to processe the dblp...
{ "language": "en", "url": "https://stackoverflow.com/questions/319506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: To protect software by accessing harddisk serial no I want to get the VB.NET or VB code to access the hard disk serial no when starting the program. It's to help me to protect my own software from people who try to pirate copies. A: In c#, but you get the idea. You'll want to use System.Management for this: string...
{ "language": "en", "url": "https://stackoverflow.com/questions/319508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET Custom Server Control (GridView), DataBinding, and Control Lifecycle conflict I have created a Custom Server Control (Inherited from GridView). On the page, the GridView is DataBound to a DataSet, so I do not know at design time what columns will be present in my GridView. Now, what I want to do is, to add a...
{ "language": "en", "url": "https://stackoverflow.com/questions/319512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When not / to write tests before implementation? I'm not sure how "tests first" works and I'd like to hear arguments about when and why one would take this approach. I hear that it's often recommended to write tests and mock things before writing a single line of implementation. However, I can't help but think that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Difference between winsock and linux sockets I'm developing an FTP-like program to download a large number of small files onto an Xbox 360 devkit (which uses Winsock), and porting it to Playstation3 (also a devkit, and uses linux AFAIK). The program uses BSD-style sockets (TCP). Both of the programs communicate wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/319516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I determine whether or not a stored procedure is recompiling every time? I've got the a SQL Server stored procedure with the following T-SQL code contained within: insert into #results ([ID], [Action], [Success], [StartTime], [EndTime], [Process]) select 'ID' = aa.[ActionID], 'Action' = cast(aa.[Acti...
{ "language": "en", "url": "https://stackoverflow.com/questions/319518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm for generating a random number I'm looking to generate a random number and issue it to a table in a database for a particular user_id. The catch is, the same number can't be used twice. There's a million ways to do this, but I'm hoping someone very keen on algorithms has a clever way of solving the problem...
{ "language": "en", "url": "https://stackoverflow.com/questions/319524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Ruby on Rails: Why do I get timezones munged when I write a time to the DB, then read it back? I have config.time_zone in environment.rb set to "UTC", and my mySQL server returns the current time in my local time zone when I issue "select now();" and in utc when I ask for "select utc_timestamp;" I'm running rails 2....
{ "language": "en", "url": "https://stackoverflow.com/questions/319527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RESTful Authentication What does RESTful Authentication mean and how does it work? I can't find a good overview on Google. My only understanding is that you pass the session key (remeberal) in the URL, but this could be horribly wrong. A: That's the way to do that: Using OAuth 2.0 for Login. You may use other aut...
{ "language": "en", "url": "https://stackoverflow.com/questions/319530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "793" }
Q: Is it possible to "symlink" a function in PHP easily - or alias the name to something else? For example, I hate typing things like: $x = mysql_escape_string(stripslashes($_GET['x'])); Is there a way to alias those two functions in init.php or something without writing a separate function that takes one argument and...
{ "language": "en", "url": "https://stackoverflow.com/questions/319531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Replacing header text with an image I am working on setting up a Drupal based website and wanted to replace the site title in the header with an image file. I came across this article: "Revised Image Replacement" summarizing several techniques for doing just that. I was wondering what the current best practice is, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problems receiving data over a TCP client socket I'm trying to make a TCP Client program in C where the client will start up, connect to a server. Then it will send a little information and then just listen to what it receives and react accordingly. The part that I'm having trouble with is the continuous listening. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to programmatically select popup menu item in Windows? I have an app that I'm writing a little wizard for. It automated a small part of the app by moving the mouse to appropriate buttons, menus and clicking them so the user can watch. So far it moves the mouse to a tree item and sends a right-click. That pops ...
{ "language": "en", "url": "https://stackoverflow.com/questions/319578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: use SUM() or caching I don't have much experience with databases, so I don't know which is better for long-term performance, better practice, etc. Here is my (hypothetical) case: imagine you have a database of customer information and history of purchase orders for each. You want to keep track of how much each custo...
{ "language": "en", "url": "https://stackoverflow.com/questions/319579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Should .NET 'Any CPU' projects bind to Framework or Framework64 DLLs? I have a C# Visual Studio project (.csproj) that has a reference to the Framework64 version of System.Data. When I try to build using MSBuild/Team Foundation Server (TFS) on another machine, it fails as the 64-bit DLL doesn't exist. Should I bi...
{ "language": "en", "url": "https://stackoverflow.com/questions/319585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Html.ActionLink doesn't render # properly When using Html.ActionLink passing a string containing the # char renders it like it is but if you UrlEncode it renders as %2523. I believe it's a bug. MVC Beta Release. Is it really a bug? http://example.com/test# is rendered as http://example.com/test%2523 instead of htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/319587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reading non-standard elements in a SyndicationItem with SyndicationFeed With .net 3.5, there is a SyndicationFeed that will load in a RSS feed and allow you to run LINQ on it. Here is an example of the RSS that I am loading: <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Titl...
{ "language": "en", "url": "https://stackoverflow.com/questions/319591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Calculate a color fade Given two colors and n steps, how can one calculate n colors including the two given colors that create a fade effect? If possible pseudo-code is preferred but this will probably be implemented in Java. Thanks! A: If you want a blend that looks anything like most color picker GUI widgets, yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/319594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Declaring Dynamic Memory Statements C++ Hi if I am creating something on the stack using new I declare it like: object *myObject = new object(contr, params); Is there a way to declare this such as: object *myObject; myObject = new object(constr, params); Is this correct? A: As others have said, new will create *m...
{ "language": "en", "url": "https://stackoverflow.com/questions/319595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: subversion upgrade question - 1.5.3 to 1.5.4 i have a windows client and i want to upgrade subversion from 1.5.3 to 1.5.4. are there installation steps. . do i just copy the zip and extract and override the existing directoies .. i can't find any clear upgrade instructions . . A: Which windows client are you usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/319615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++ Parameter Reference void (int a[]) { a[5] = 3; // this is wrong? } Can I do this so that the array that is passed in is modified? Sorry for deleting, a bit new here... I have another question which might answer my question: If I have void Test(int a) { } void Best(int &a) { } are these two statements e...
{ "language": "en", "url": "https://stackoverflow.com/questions/319623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LINQ grouping/subquery to fill a hierarchy data strcuture I have a DataTable that queries out something like below usergroupid...userid......username 1.............1...........John 1.............2...........Lisa 2.............3...........Nathan 3.............4...........Tim What I'm trying to do is write a LINQ sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/319626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DocProject vs Sandcastle Help File Builder GUI I have several C# projects along with some internal library components that I'm trying to document together. Sandcastle seems to be the place to go to generate documentation from C#. I would like to know which of the two, DocProject or Sandcastle Help File Builder GUI...
{ "language": "en", "url": "https://stackoverflow.com/questions/319632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Can you figure out why this program is triggering a IllegalStateException? all files in ~/Cipher/nsdl/crypto can be found here java files compiled with gcj, see compile.sh nmint@nqmk-mint ~/Cipher/nsdl/crypto $ echo test | ./cryptTest encrypt deadbeefdeadbeefdeadbeefdeadbeef deadbeef Blowfish CBC > test null Excepti...
{ "language": "en", "url": "https://stackoverflow.com/questions/319634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }