text
string
meta
dict
Q: How do you handle BLOB and numerical data efficiently in database communication? SQL databases seem to be the cornerstone of most software. However, it seems optimized for textual data. In fact when doing any queries involving numerical data, integers specifically, it seems inefficient that the numbers are getting c...
{ "language": "en", "url": "https://stackoverflow.com/questions/219719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VCL alternative to IStorage To preface I am using Borland C++ and the VCL. I need some sort of structured storage object which can be saved to disk as a single file and can contain multiple named blobs of binary data which I can programatically enumerate, access and manipulate. The IStorage interface seems to be clo...
{ "language": "en", "url": "https://stackoverflow.com/questions/219726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to protect image on Excel sheet I have an Excel worksheet with an image (logo). If I right-click on the picture and select Format Picture / Protection, the Locked checkbox is checked. I then protect the worksheet with a password. Despite all of the above, the end user can still select and delete the image. Is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/219756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Dealing with C++ "initialized but not referenced" warning for destruction of scope helpers? In Visual Studio, I often use objects only for RAII purposes. For example: ScopeGuard close_guard = MakeGuard( &close_file, file ); The whole purpose of close_guard is to make sure that the file will be close on function ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/219770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: convert Request.QueryString toDatetime and then fetch using datacontext in linq in c# asp.net I wanna get the Timedate value from another page using request.querystring and then use it an query to compare and pull up the matching datas. The function for the query in linq is: protected void User_Querytime() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RequiredFieldValidator - how to get rid of the default red font color I can't seems to change the default color of the required field validator. In the source it is: <span class="required">*</span> <asp:RequiredFieldValidator ID="valReq_txtTracks" runat="server" ControlToValidate="txtTracks" Display="Dynami...
{ "language": "en", "url": "https://stackoverflow.com/questions/219783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Loading Flex resources relative to server root as opposed to .swf location I have a large (700kb) Flex .swf file representing the main file of a site. For performance testing I wanted to try and move it off to Amazon S3 hosting (which i have already done with certain videos and large files). I went ahead and did t...
{ "language": "en", "url": "https://stackoverflow.com/questions/219788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Database Localization - Lookup lists - smarter way I'm looking to add some lookup lists in the database, but I want them to be easy localizable (SQL 2005, ADO.NET) This would include: * *Easy Management of multiple languages at the same time *Easy Retrieval of values from the database *Fallback language (in cas...
{ "language": "en", "url": "https://stackoverflow.com/questions/219798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert memory address range in running Linux process to symbols in object file? Here is a snippet of the file /proc/self/smaps: 00af8000-00b14000 r-xp 00000000 fd:00 16417 /lib/ld-2.8.so Size: 112 kB Rss: 88 kB Pss: 1 kB Shared_Clean: 88 kB Shared_Dirty...
{ "language": "en", "url": "https://stackoverflow.com/questions/219800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: New Facebook app - FBML or iFrame? We're starting a new facebook app (incidentally in Rails), and are faced with the decision to use FBML or to use IFrames. It seems like in the past the consensus generally was that FBML was the better way to go, as it made things more inherently Facebook looking, however it seems n...
{ "language": "en", "url": "https://stackoverflow.com/questions/219804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Can I use LINQ to convert a List into a DataSet? I am completely new to LINQ in C#/.NET. I understand that I could use it to convert a DataSet into an Array/List, am I able to go in the opposite direction? I'm using NPlot to generate a graph of captured prices, which are stored in a List, where PriceInformation is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: If events are implemented as delegates in .NET, what is the point of the .event IL section? I've seen some very good questions on Stack Overflow concerning delegates, events, and the .NET implementation of these two features. One question in particular, "How do C# Events work behind the scenes?", produced a great a...
{ "language": "en", "url": "https://stackoverflow.com/questions/219815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Curious pop-up behavior when using WebBrowser class My C# application includes an embedded web browser, which is made possible by the System.Windows.Forms.WebBrowser class. Users are able to navigate to websites using the app, however, when they encounter a page that includes a pop-up window, the pop-up window is o...
{ "language": "en", "url": "https://stackoverflow.com/questions/219817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to do page initialization functions in ASP.NET AJAX? There seem to be a number of weird things one could do if one wanted, for hooking up page-load type events. Here are some specific questions: * *I know about the auto-hooked-up pageLoad function. Are there any others like it? *Where do I hook up events like...
{ "language": "en", "url": "https://stackoverflow.com/questions/219819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating a new pdf document using AcroEXch in VBScript I am looking to automate the conversion of an excel sheet into a pdf document (I do not want to manually print the report generated in excel as a pdf document every morning). For now, I would like to create a button in excel that will run the macro to automatic...
{ "language": "en", "url": "https://stackoverflow.com/questions/219822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Multipart forms from C# client I am trying to fill a form in a php application from a C# client (Outlook addin). I used Fiddler to see the original request from within the php application and the form is transmitted as a multipart/form. Unfortunately .Net does not come with native support for this type of forms (Web...
{ "language": "en", "url": "https://stackoverflow.com/questions/219827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Where are seed_value and increment_value for IDENTITY columns? I'm collecting metadata using the sys.* views, and according to the documentation, the sys.identity_columns view will return the seed and increment values like so. CREATE TABLE ident_test ( test_id int IDENTITY(1000,10), other int ) SELECT name, see...
{ "language": "en", "url": "https://stackoverflow.com/questions/219833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What does "The DBMS returned an unspecified error. The command code was 193." mean? Anyone have an idea of what this means for MS SQL Server? I'm also calling this from ColdFusion, although I'm guessing that doesn't make any difference. A: Google implies that error 193 is a problem with the service. Does this hap...
{ "language": "en", "url": "https://stackoverflow.com/questions/219844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to outline a UIElement in Partial-Trust? I asked a similar question about this previously, but I did not specify that this needs to work in Partial-Trust mode. Unfortunately both correct answers (using UIElement.BitmapEffect or UIElement.Effect) are not allowed in Partial-Trust, because it requires UIPermission...
{ "language": "en", "url": "https://stackoverflow.com/questions/219846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Class model to use in DataMapper When implementing the DataMapper pattern, should the class model that I implement in the DataMapper package more closely resemble the domain model or the data model? A: The whole point of a datamapper is to make the mapping transparent. So you class should be constructed on the term...
{ "language": "en", "url": "https://stackoverflow.com/questions/219847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Class-member access-modifiers I want a method of the class: "One" ("AccessibleWithinSameNamespace") to be accessible by the class: "Two", without having "Two" extending "One". Both classes are in the same namespace, so I'm thinking that maybe there's an access-modifier that emulates the "protected" modifyer, but for...
{ "language": "en", "url": "https://stackoverflow.com/questions/219851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Permissions problems with Excel Services in SharePoint I'm trying to implement an Excel Services reporting solution in SharePoint (MOSS). Since the source data is a SharePoint list, this problem is doubly frustrating. I keep bumping up against permissions problems, even though I've enabled virtually everything in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Client notification, should I use an AJAX Push or Poll? I am working on a simple notification service that will be used to deliver messages to the users surfing a website. The notifications do not have to be sent in real time but it might be a better user experience if they happened more frequently than say every 5 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: WordPress: I got rid of the second "home" page, but it's not good enough I have a WordPress site (2.6.2) in which I have set the Home page to a static page instead of the normal posts page. The ID of this page is 2, so in the WordPress template I have changed the wp_list_pages to look like this: <?php wp_list_pages(...
{ "language": "en", "url": "https://stackoverflow.com/questions/219870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Graph rendering using 3D acceleration We generate graphs for huge datasets. We are talking 4096 samples per second, and 10 minutes per graph. A simple calculation makes for 4096 * 60 * 10 = 2457600 samples per linegraph. Each sample is a double (8 bytes) precision FP. Furthermore, we render multiple linegraphs on on...
{ "language": "en", "url": "https://stackoverflow.com/questions/219872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Internet Explorer Toolbar Tab Key I've written a IE Toolbar in C# and everything is working fine except that when I open a child Windows Form from my toolbar, the tab key doesn't work on the child form to allow me to move from field to field. The interesting part is that when I open my child form using form.showDia...
{ "language": "en", "url": "https://stackoverflow.com/questions/219873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Check username and password of Windows account I have an installation package that installs a service process that I create. I'd like to prompt the user for the username/password of the account that the service process should run under. I'd like to verify the the username/password combination are valid before cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/219875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Java array reflection: isArray vs. instanceof Is there a preference or behavior difference between using: if(obj.getClass().isArray()) {} and if(obj instanceof Object[]) {} ? A: If obj is of type int[] say, then that will have an array Class but not be an instance of Object[]. So what do you want to do with obj. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "188" }
Q: What is the best way to implement a property that is readonly to the public, but writable to inheritors? If I have a property that I want to let inheritors write to, but keep readonly externally, what is the preferred way to implement this? I usually go with something like this: private object m_myProp; public objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/219904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Does a Poco to DataSet project exist? I have a POCO object that goes 4 levels deep contained objects (like Invoice has line items that have taxes that have gl entries), and I want to turn the entire thing into a DataSet. So there would be 4 tables, each with constraints being applied to the parent table. Does anyone...
{ "language": "en", "url": "https://stackoverflow.com/questions/219910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What use are const pointers (as opposed to pointers to const objects)? I've often used pointers to const objects, like so... const int *p; That simply means that you can't change the integer that p is pointing at through p. But I've also seen reference to const pointers, declared like this... int* const p; As I un...
{ "language": "en", "url": "https://stackoverflow.com/questions/219914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What functionality should always be third-party? What prompts my question is this post from Jeff Atwood, and this post from Dare Obasanjo. It seems to me that there might be at least a few areas where third-party functionality is a better idea than custom code. For example, should logging always be third-party? Ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/219915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Intro to GPU programming Everyone has this huge massively parallelized supercomputer on their desktop in the form of a graphics card GPU. * *What is the "hello world" equivalent of the GPU community? *What do I do, where do I go, to get started programming the GPU for the major GPU vendors? -Adam A: I think t...
{ "language": "en", "url": "https://stackoverflow.com/questions/219928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "186" }
Q: PHP - Sessions - Security How secure are php Sessions? I am planning to use the native PHP sessions to authenticate users. Can users modify session data like they can $_POST and $_GET data? A: Data only goes into a session when you as the developer have the user put it into the session via the code you write. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/219944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Working with Seaside continuations How do I get a BlockClosure in Squeak (I want to use BlockClosure>>callCC)? When I write [#foo] that is a BlockContext, what's the deal? Update: I have worked out that BlockClosure is a thing mainly of new compiler. Instead how do I work with seaside Continuations? I'm having probl...
{ "language": "en", "url": "https://stackoverflow.com/questions/219958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Oracle: How can I implement a "natural" order-by in a SQL query? e.g, foo1 foo2 foo10 foo100 rather than foo1 foo10 foo100 foo2 Update: not interested in coding the sort myself (although that's interesting in its own right), but having the database to do the sort for me. A: You can use functions in your order-by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# class from a SQL database table Came across this: http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp And wondering if this is the right solution as I am not that big of a fan of creating a class for every stored procedure or do I use Enterprise Library for ASP.net 2.0 project. A: You definitely...
{ "language": "en", "url": "https://stackoverflow.com/questions/219986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How much sustained data should a dedicated server be able to serve? We have a dedicated godaddy server and it seemed to grind to a halt when we had users downloading only 3MB every 2 seconds (this was over about 20 http requests). I want to look into database locking etc. to see if that is a problem - but first I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/219988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I encrypt password data in a database using PHP? I am connecting to a MySQL database with PHP and the CodeIgniter Framework. I want to store my passwords encrypted in the database and would like to know the best way to do this. A: Encrypting the passwords is a bad idea. If somebody gets your database, they...
{ "language": "en", "url": "https://stackoverflow.com/questions/219999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Where do you put program scope variables in UI driven application? Ok, so I know that global variables are considered bad, and the singleton pattern is overused. And I have read in many places that a class should do only one task and contain only those variables that allow it to accomplish that one task. However, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/220010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to handle checkboxes in ASP.NET MVC forms? Caution: This question is over nine years old! Your best option is to search for newer questions, or to search the answers below looking for your specific version of MVC, as many answers here are obsolete now. If you do find an answer that works for your version, ple...
{ "language": "en", "url": "https://stackoverflow.com/questions/220020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "247" }
Q: How do I configure log4net so that log.IsDebugEnabled is true? I am trying to use log4net in an ASP.NET application with Visual Studio 2005. I have declared an instance of the logger like so: Private Shared ReadOnly log As ILog = LogManager.GetLogger("") I am trying to use it in the following manner: If log.IsDebug...
{ "language": "en", "url": "https://stackoverflow.com/questions/220021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How do I make FlexBuilder recognize my MXML files as applications instead of components? I am attempting to import mxml files that I developed with Emacs into a new project in FlexBuilder...I have created a project and manually added all my MXML and actionscript files into FlexBuilder. I now can't figure out how to...
{ "language": "en", "url": "https://stackoverflow.com/questions/220026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best ASP.NET ConfigSection to DB Schema Previously, settings for deployments of an ASP.NET application were stored in multiple configuration files under the Web.config config sections using a KEY/VALUE format. We are moving these 'site module options' to the database for a variety of reasons. Here are the two optio...
{ "language": "en", "url": "https://stackoverflow.com/questions/220031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to get as much as possible from dbx I do TDD on a daily basis for my C++ development on Solaris10. It has greatly reduced the time I have to spend using my debugger but sometime this is the only option. DBX is pretty powerful but not that user friendly. Note that I'm talking about console DBX not the SunStudio G...
{ "language": "en", "url": "https://stackoverflow.com/questions/220040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which sort algorithm works best on mostly sorted data? Which sorting algorithm works best on mostly sorted data? A: Splaysort is an obscure sorting method based on splay trees, a type of adaptive binary tree. Splaysort is good not only for partially sorted data, but also partially reverse-sorted data, or indeed any...
{ "language": "en", "url": "https://stackoverflow.com/questions/220044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "187" }
Q: Parsing A Data Feed I'm not the best at PHP and would be extremely grateful if somebody could help. Basically I need to parse each line of a datafeed and just get each bit of information between each "|" - then I can add it to a database. I think I can handle getting the information from between the "|"'s by using e...
{ "language": "en", "url": "https://stackoverflow.com/questions/220051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Deploying to Amazon EC2 Has anyone got much experience deploying applications to Amazons EC2? I am considering doing this in future and wonder about peoples experiences compared to shared hosting and dedicated server hosting are. A: So far, so good. Being able to turn on 5/10/50/100+ machines at a time is awesome. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: MSBuild -- Use the .csproj file or roll your own? OK, so I readily concede that I'm a newbie when it comes to continuous integration. That being said, I'm trying to set up a CC.NET environment to educate myself, but I'm having trouble finding the information I need to get the automated build portion set up. As I und...
{ "language": "en", "url": "https://stackoverflow.com/questions/220075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: What is the best model for taking user authentication off-line? I am building authentication into a client-server application, and some of the feedback I've received is that I should leave the hash calculation to the server (it was initially implemented to have the client receive the hash, calculate a hash from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Whats the best method to maintain or measure how well sorted a collection is so we can choose best sort algorithm? Inspired by this question The choice of which algorithm to use to sort a collection can be made better if we know ahead of time how well sorted a collection is. Is there a way we can measure (or maintai...
{ "language": "en", "url": "https://stackoverflow.com/questions/220084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Read/Write 'Extended' file properties (C#) I'm trying to find out how to read/write to the extended file properties in C# e.g. Comment, Bit Rate, Date Accessed, Category etc that you can see in Windows explorer. Any ideas how to do this? EDIT: I'll mainly be reading/writing to video files (AVI/DIVX/...) A: For tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/220097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "111" }
Q: How do I enable double-buffering of a control using C# (Windows forms)? How do I enable double-buffering of a control using C# (Windows forms)? I have a panel control which I am drawing stuff into and also an owner-drawn tab control. Both suffer from flicker, so how can I enable double-buffering? A: In the construc...
{ "language": "en", "url": "https://stackoverflow.com/questions/220100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: A good Java library for network math I'm looking for a Java library that is geared towards network math and already tested. Nothing particularly fancy, just something to hold ips and subnets, and do things like print a subnet mask or calculate whether an IP is within a given subnet. Should I roll my own, or is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/220110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Is there a faster alternative to Google Analytics? I like to keep my websites extremely light and fast, but of course I need some kind of user tracking and analytics. It seems like Google Analytics always takes significant enough processing time that I'd like to replace it with something faster (and/or hosted local...
{ "language": "en", "url": "https://stackoverflow.com/questions/220112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: IE7 fails after reload of Orbited powered page I am working on an Orbited-powered website and I'm experiencing some annoying behavior with IE7. Everything works fine and dandy in FF3, but in IE7, I get a recurring error if I reload the page: Error: Can't execute code from a freed script In other words, the site wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/220117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Database agnostic jdbc table import/export to files? Is it at all possible to do database-agnostic table dumps/hydrates? I don't have any complicated constraints. I would also settle for db-specific ways, but the more pure jdbc it is the better (I don't want to resort to impdp/expdp). A: Have a look at DBUnit. DBU...
{ "language": "en", "url": "https://stackoverflow.com/questions/220119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I detected whether a hard drive is connected via USB? I am trying to write a little backup program for friends and family and want it to be as simple to use a possible. I don't want to have to ask the user where to backup their data to, I just want to search for and use the first USB hard drive connected to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/220123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Given an array of ActiveRecord objects, can I easily collect their relationships through a method call? Let's say I have the following code: @sites = Site.find(session[:sites]) # will be an array of Site ids @languages = Language.for_sites(@sites) for_sites is a named_scope in the Language model that returns the la...
{ "language": "en", "url": "https://stackoverflow.com/questions/220126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java Instantiation * *When an object is instantiated in Java, what is really going into memory? *Are copies of parent constructors included? *Why do hidden data members behave differently than overridden methods when casting? I understand the abstract explanations that are typically given to get you use this s...
{ "language": "en", "url": "https://stackoverflow.com/questions/220133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Managing file uploads in JSP/Servlets Once again a very beginner-ish question, but here I go: I would like to use a servlet or similar to copy an uploaded file (from an html file select) to a permanent location. This is all I need to do with the file. I am currently going with using the Apache Commons FileUpload and...
{ "language": "en", "url": "https://stackoverflow.com/questions/220135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Simplest way to print out the contents of a text field in SQL Server I need to output the contents of a text field using MS Query Analyzer. I have tried this: select top 1 text from myTable (where text is a text field) and DECLARE @data VarChar(8000) select top 1 @data = text from myTable PRINT @data The first on...
{ "language": "en", "url": "https://stackoverflow.com/questions/220142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Error 1783 - instsrv.exe REMOVE from Win2k3 My applications installer offers the user the ability to run the application as a service through use of the srvany.exe application. To remove the application on uninstall, I've been using the application instsrv.exe with the following command: instsrv "myservice" REMOVE...
{ "language": "en", "url": "https://stackoverflow.com/questions/220146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Splitting rows in SQL Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows as in a Venn di...
{ "language": "en", "url": "https://stackoverflow.com/questions/220147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I access the HTTP request header fields via JavaScript? I want to capture the HTTP request header fields, primarily the Referer and User-Agent, within my client-side JavaScript. How may I access them? Google Analytics manages to get the data via JavaScript that they have you embed in you pages, so it is def...
{ "language": "en", "url": "https://stackoverflow.com/questions/220149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: What is the comparative speed of temporary tables to physical tables in SQL? I have a script that needs to extract data temporarily to do extra operations on it, but then doesn't need to store it any further after the script has run. I currently have the data in question in a series of temporary local tables (CREAT...
{ "language": "en", "url": "https://stackoverflow.com/questions/220151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you print out a stack trace to the console/log in Cocoa? I'd like to log the call trace during certain points, like failed assertions, or uncaught exceptions. A: Cocoa already logs the stack trace on uncaught exceptions to the console although they're just raw memory addresses. If you want symbolic informati...
{ "language": "en", "url": "https://stackoverflow.com/questions/220159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "304" }
Q: Resources for learning GNUMake? I'm trying to learn GNUMake for a small project I'm working on. So far, even the "basic" tutorials seem pretty rough and I've yet to make sense of the makefile syntax. Does anyone have some good resources for an absolute beginner to get familiar with GNUMake? A: The most commonly use...
{ "language": "en", "url": "https://stackoverflow.com/questions/220165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How can I install a local gem? If I download a .gem file to a folder in my computer, can I install it later using gem install? A: you can also use the full filename to your gem file: gem install /full/path/to/your.gem this works as well -- it's probably the easiest way A: Go to the path in where the gem is and ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/220176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "359" }
Q: Algorithms or libraries for textual analysis, specifically: dominant words, phrases across text, and collection of text I'm working on a project where I need to analyze a page of text and collections of pages of text to determine dominant words. I'd like to know if there is a library (prefer c# or java) that will ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I determine if a dynamically-created DOM element has been added to the DOM? According to spec, only the BODY and FRAMESET elements provide an "onload" event to attach to, but I would like to know when a dynamically-created DOM element has been added to the DOM in JavaScript. The super-naive heuristics I am c...
{ "language": "en", "url": "https://stackoverflow.com/questions/220188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: How do you run a program you don't know where the arguments start? The subject doesn't say much cause it is not easy to question in one line. I have to execute a few programs which I read from the registry. I have to read from a field where somebody saves the whole paths and arguments. I've been using System.Diagnos...
{ "language": "en", "url": "https://stackoverflow.com/questions/220202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does the WinForms WebBrowser control support mhtml content set by the DocumentText property? Or if any body knows of an alternative control that does? It would be handy to serve up content to the WebBrowser control that has embedded images & other resources from a database without having a dependency on these resour...
{ "language": "en", "url": "https://stackoverflow.com/questions/220203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best library to create an AJAX auto-suggest textbox in a web form? I'm creating a web application for work where the user has to enter the name of the person that requested the job. I'd like to create a simple AJAX auto-suggest dropdown so they don't need to type the entire name. On the backend, the da...
{ "language": "en", "url": "https://stackoverflow.com/questions/220211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the easiest to use ORM framework for PHP? I'm looking for Ruby's Active record for PHP. Something that is so simple that I just define my fields, extend the base ORM class, and I get ACID operations for free. I should get default getters and setters without writing any code, but overriding a default getter o...
{ "language": "en", "url": "https://stackoverflow.com/questions/220229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Accessing the web page's HTTP Headers in JavaScript How do I access a page's HTTP response headers via JavaScript? Related to this question, which was modified to ask about accessing two specific HTTP headers. Related: How do I access the HTTP request header fields via JavaScript? A: You can't access the http hea...
{ "language": "en", "url": "https://stackoverflow.com/questions/220231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "480" }
Q: Intercepting an exception inside IDisposable.Dispose In the IDisposable.Dispose method is there a way to figure out if an exception is being thrown? using (MyWrapper wrapper = new MyWrapper()) { throw new Exception("Bad error."); } If an exception is thrown in the using statement I want to know about it when th...
{ "language": "en", "url": "https://stackoverflow.com/questions/220234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to embed fonts in HTML? I'm trying to figure out a decent solution (especially from the SEO side) for embedding fonts in web pages. So far I have seen the W3C solution, which doesn't even work on Firefox, and this pretty cool solution. The second solution is for titles only. Is there a solution available for ful...
{ "language": "en", "url": "https://stackoverflow.com/questions/220236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: How comment a JSP expression? How can I comment a JSP expression like: <%= map.size() %> Is there something like <%= // map.size() %>? A: You can use this comment in jsp page <%--your comment --%> Second way of comment declaration in jsp page you can use the comment of two typ in jsp code single line comment ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "146" }
Q: Using VS2005 and VSS is there a way to add comments to checkins? All the googling around hasn't found an answer for me yet... I have one of our devs that is using VSS and VS2005. Checking in works (abeit quite painfully across the 'Net) but there doesn't seem to be a way to put comments into a checkin (unless you e...
{ "language": "en", "url": "https://stackoverflow.com/questions/220245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In C# why can't a conditional operator implicitly cast to a nullable type I am curious as to why an implicit cast fails in... int? someValue = SomeCondition ? ResultOfSomeCalc() : null; and why I have to perform an explicit cast instead int? someValue = SomeCondition ? ResultofSomeCalc() : (int?)null; It seems to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Can you override MessageDlg calls to a Custom TForm/Dialog? I have been using code similar to this MessageDlg('', mtWarning, [mbOK], 0); throughout my project, (thanks to the GExperts Message Dialog tool :) ) and i was wondering if anyone knows of a way do override the call and show my own custom Form. The only way...
{ "language": "en", "url": "https://stackoverflow.com/questions/220254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How are NUnit assemblies appearing in VS "Add Reference" dialog? So after installing NUnit, the assemblies (nunit.framework, etc.) now appear in the References > Add Reference dialog, but they're not in the %WINDIR%\Microsoft.NET\Framework\v2.0.50727 dir and there is no NUnit registry entry for the Assembly Path (i....
{ "language": "en", "url": "https://stackoverflow.com/questions/220266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I reorder my divs using only CSS? Given a template where the HTML cannot be modified because of other requirements, how is it possible to display (rearrange) a div above another div when they are not in that order in the HTML? Both divs contain data that varies in height and width. <div id="wrapper"> <di...
{ "language": "en", "url": "https://stackoverflow.com/questions/220273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "325" }
Q: Remote machines cannot connect to Visual Studio web server I remember when MS was developing Cassini - I believe they rolled it into VS 05/08, so I think this is a Cassini web server question. I am using Windows XP with Visual Studio 2008, and find it quite inconvenient when I want to test a web page/styling with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: Is there an equivalent to -pedantic for gcc when using Microsoft's Visual C++ compiler? I would like to have my warnings set to the highest level using Microsoft Visual C++ compiler. Similar to using -pedantic on gcc. What compiler switches do you use to have the most warnings enabled? A: AS billmcc64 mentioned, gc...
{ "language": "en", "url": "https://stackoverflow.com/questions/220298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What xml/xslt library(ies) currently work well for java? I need to apply some xml templates to various streams of xml data (and files, on occasion) and there seem to be a large number of xml libraries for java out there -- enough that it's difficult to quickly determine which libraries are still active, how they dif...
{ "language": "en", "url": "https://stackoverflow.com/questions/220313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are DbProviderFactory, DbConnection, DbCommand, and DbDataAdapter Thread-Safe? Are the .net classes relating to DbProviderFactory thread safe? A: from msdn: Thread Safety Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. A: W...
{ "language": "en", "url": "https://stackoverflow.com/questions/220317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Determine Process Info Programmatically in Darwin/OSX I have a class with the following member functions: /// caller pid virtual pid_t Pid() const = 0; /// physical memory size in KB virtual uint64_t Size() const = 0; /// resident memory for this process virtual uint64_t Rss() const = 0; /// cpu used by this...
{ "language": "en", "url": "https://stackoverflow.com/questions/220323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I check SQL replication status via T-SQL? I want to be able to check the status of a publication and subscription in SQL Server 2008 T-SQL. I want to be able to determine if its okay, when was the last successful, sync, etc.. Is this possible? A: Old post but adding for others - The following stored procedu...
{ "language": "en", "url": "https://stackoverflow.com/questions/220340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Disable layout in ASP.NET MVC? In MonoRail you can just CancelLayout() to not render the layout. In ASP.NET MVC, the only way to affect the layout seems to be to pass the layout name into the View() method like View("myview", "mylayout"); only it seems that passing null or an empty string doesn't do what I'd want. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: Best Way to Organize PHP Class Hierarchy I've got a somewhat primitive framework I've been using for most of my projects, but a general design issue came to mind that I haven't been able to work out yet. For a given application, should I separate the application-specific class structure from the framework's structur...
{ "language": "en", "url": "https://stackoverflow.com/questions/220347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to avoid screen flickering when showing form with user drawn controls? So the transparent background problem is solved. Now, every time I show the form (or have to have it repainted), I get a lot of flickering. Is there any way I can not update the screen until the paint event is complete, or any other way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the reason to retain proprietorship on commissioned work? I have always included clauses to transfer to my clients full author, ownership and use rights for all the source code, original images, original resources, etc. I develop/create for them. Of course, I retain author, ownership and use rights for my li...
{ "language": "en", "url": "https://stackoverflow.com/questions/220368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Do I have to close() every EntityManager? I have just started migrating my homegrown persistence framework to JPA. Given that the persistence frameworks hide a lot of the plumbing, I'm interested in knowing if NOT closing EntityManagers will create a resource leak, or if the frameworks will collect and close them fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/220374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: How can a windows service programmatically restart itself? I need to write robust code in .NET to enable a windows service (server 2003) to restart itself. What is the best way to so this? Is there some .NET API to do it? A: It would depend on why you want it to restart itself. If you are just looking for a way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "147" }
Q: Compass Search Annotations cause compiler errors I'm trying to use the @Searchable annotations from the Compass search engine in my Java program, but I receive a compile-time error: "type mismatch: cannot convert Searchable to Annotation". I have included all of the jar files that I can think of, and scoured the web...
{ "language": "en", "url": "https://stackoverflow.com/questions/220385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Join arrays in VB.NET What's the simplest way to join one or more arrays (or ArrayLists) in Visual Basic? I'm using .NET 3.5, if that matters much. A: You can take a look at this thread that's titled Merging two arrays in .NET. A: This is in C#, but surely you can figure it out... int[] a = new int[] { 1, 2, 3, 4,...
{ "language": "en", "url": "https://stackoverflow.com/questions/220387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Java Concurrent and Parallel GC This article here suggests to use -XX:+UseParNewGC "To enable a parallel young generation GC with the concurrent GC". My confusion is that in order to enable both parallel and concurrent GC, should I * *use -XX:+UseParNewGC or *use both -XX:+UseParNewGC and -XX:+UseConcMarkSweep...
{ "language": "en", "url": "https://stackoverflow.com/questions/220388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Cannot bind to the property or column Name on the DataSource. Parameter name: dataMember This is the exception that I'm getting when I'm trying to bind to a System.Type.Name. Here is what I'm doing: this.propertyTypeBindingSource.DataSource = typeof(System.Type); /* snip */ this.nameTextBox1.DataBindings.Add( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/220392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }