text
stringlengths
8
267k
meta
dict
Q: Passing function Pointers in C++ i want to do this simple piece of code work. #include <iostream> #include <windows.h> void printSome (int i) { std::cout << i << std::endl; } void spawnThread (void (*threadName)(int i)) { CreateThread ( 0, // d...
{ "language": "en", "url": "https://stackoverflow.com/questions/402992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Deserializing JSON objects as List not working with asmx service I am having trouble deserializing my JSON string. I have a class of type person with public properties for sequence number of type int, first name, and last name. I want to pass an array of these objects in JSON format and have them deserialized as a...
{ "language": "en", "url": "https://stackoverflow.com/questions/402996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do you feel about including ie7.js or ie8.js in your page? See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is it worth including? Do you recommend it? A: It works, but its worth keeping in mind that ie7.js and ie8.js do much more than provide transp...
{ "language": "en", "url": "https://stackoverflow.com/questions/403011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Connect to MySQL from Microsoft Data Application Block lI am using the Data Application block for a majority of my data access, specifically using the SqlHelper class to call the ExecuteReader, ExecuteNonQuery, and like methods. Passing the connection string with each database call. How can I modify this to enable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you return error messages from AJAX calls using jQuery and ASP.NET MVC? If I have an ASP.NET MVC controller action that is called from a jQuery .ajax call that needs to throw an error, how do I do so? I know I can create a JSON object and pass it an "error" property, but what if the response from the .ajax c...
{ "language": "en", "url": "https://stackoverflow.com/questions/403025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing CSS style from ASP.NET code Possible Duplicate: Change CSS Dynamically I need to change the height of a div container(CSS Property Height) from ASP.NET code (VB). How can I do that? A: VB Version: Class: Protected divControl As System.Web.UI.HtmlControls.HtmlGenericControl OnLoad/Other function: divCon...
{ "language": "en", "url": "https://stackoverflow.com/questions/403031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: C# MySqlCommand Multiple Drop Foreign Key problem I'm hoping someone can help me with this problem. I have a small app to 'patch' our DB as we need to augment the functionality and fix bugs. It reads in the patches which are just files with SQL statements and does some internal housekeeping, querying the DB and app...
{ "language": "en", "url": "https://stackoverflow.com/questions/403047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Raising javascript event from an ASP.NET user control and handling in ASP.NET page In an ASP.NET page I have a user control and I want to perform some action within it using javascript. When that action is complete I want to raise an event (again in javascript) to be picked up by the containing ASP.NET page (again i...
{ "language": "en", "url": "https://stackoverflow.com/questions/403048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: OO style parameters vs type parameters Say you have these two methods: Number 1: void AddPerson(Person person) { // Validate person if(person.Name != null && IsValidDate(person.BirthDate) DB.AddPersonToDatabase(person); } Number 2: void AddPerson(string name, DateTime birthDate) { Person p = new Person(n...
{ "language": "en", "url": "https://stackoverflow.com/questions/403058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Will XSLT work well with AJAX? This might be a stupid or obvious question, but our whole site is rendered using XSLT to transform xml which is created on the fly from database queries and other pieces. Im starting to push a lot of ajax into the site to make it more dynamic, is there a good tutorial on xslt and ajax?...
{ "language": "en", "url": "https://stackoverflow.com/questions/403067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Practical use of expression trees Expression trees are a nice feature, but what are its practical uses? Can they be used for some sort of code generation or metaprogramming or some such? A: Implementation of LINQ providers is mostly done by processing expression trees. I'm also using them to remove literal strings ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Objective C NSString* property retain count oddity I have the following example class: Test.h: @interface Test : UIButton { NSString *value; } - (id)initWithValue:(NSString *)newValue; @property(copy) NSString *value; Test.m: @implementation Test @synthesize value; - (id)initWithValue:(NSString *)newValue { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Do i have to force my customers to install the Office Xxxx Primary Interop Assemblies? It seems if you try to reference the Office COM objects (as you would do in other development environments), Visual Studio gets it wrong - and it just won't work. So you must use the converted type library that Microsoft hand-conv...
{ "language": "en", "url": "https://stackoverflow.com/questions/403114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: .NET: If my .NET automates Office, does the customer have to have Office installed? If i create a program, which in one small out of the way area, uses Excel automation: will the application fail when Excel is needed or will the application fail to start? Update Let me ask the same question, but in a more drawn out...
{ "language": "en", "url": "https://stackoverflow.com/questions/403118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Typed dataset not recognized when moved to another project I moved a typed dataset from one project to an ASP Web Application project. I put the typed dataset into one of the existing directories as it was in the App_Code directory of the previous site but don't see the option to create that asp.net folder in this p...
{ "language": "en", "url": "https://stackoverflow.com/questions/403122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to catch a SQL server cracker? Quick synopsis: The guys on my team have been working on a production database (sql server 2005). We've added various things such as constraints, added triggers, etc. Now we've found that someone or something has been rolling back our changes at various times. Problem is we all sha...
{ "language": "en", "url": "https://stackoverflow.com/questions/403135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Highlighting an active tab - CSS I have a small tabbed navigation setup using CSS. When hovering over the tabs the colour changes, great. However when i click a tab and it navigates to the corresponding page, i would like that tab (the active tab?) to remain highlighted, indicating the current page. I am currently d...
{ "language": "en", "url": "https://stackoverflow.com/questions/403138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: undefined method 'cache_sweeper' I'm trying to setup some caching on my site and am having troubles with getting a cache sweeper working. I followed the Railscast but when I try to load a page with the model, I'm getting an error. Here's what I've done thus far: 1.) Added the app/sweepers directory and put a basic s...
{ "language": "en", "url": "https://stackoverflow.com/questions/403143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: onreadystatechange function not being called For some reason, onreadystatechange call back function is not being called in asynchronous mode. I tested the post in synchronous mode and confirmed that post itself is working fine (commented out testing code I used to check post in synchronous mode). The problem occurs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert .pfx to .cer Is it possible to convert a .pfx (Personal Information Exchange) file to a .cer (Security Certificate) file? Unless I'm mistaken, isn't a .cer somehow embedded inside a .pfx? I'd like some way to extract it, if possible. A: If you're working in PowerShell you can use something like the followin...
{ "language": "en", "url": "https://stackoverflow.com/questions/403174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "196" }
Q: Show a loading screen in vb.net I need to show a screen or something, saying 'Loading' or whatever while long process are working. I am creating a application with the Windows Media Encoder SDK and it takes awhile to initialize the encoder. I would like for a screen to pop up saying 'Loading' while it is starting t...
{ "language": "en", "url": "https://stackoverflow.com/questions/403202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What does the Alias attribute of FieldRef do? MSDN is less than descriptive: http://msdn.microsoft.com/en-us/library/ms442728.aspx Alias - Optional Text. Per a user request, I was trying to rename the field name that shows in the header of a custom view. So I changed the ViewFields section in schema.xml to look lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/403203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are some options for implementing search on a ASP.NET MVC website? I am currently finishing up my first ASP.NET MVC application and would like to implement site searching. What are some options for allowing a visitor to search the site? A: Lucene.NET A: Answers to the following questions may help... * *Is...
{ "language": "en", "url": "https://stackoverflow.com/questions/403209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to version control, deploy and develop php and mySQL I'm working in a project where we develop php on Zend using a mySQL database and the project is about to get to a point where it will be necessary to use version control not only for the actual code but also for the database. Also we are getting a good produc...
{ "language": "en", "url": "https://stackoverflow.com/questions/403210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Check for existence of column in DataReader OR not make debugger break on certain exceptions I have code that looks like: //System.Data.IDataRecord dr try { Consolidated = Utility.NullConvert.ToBool(dr[Constants.Data.Columns.cConsolidated], false); } catch (IndexOutOfRangeException) { } //swallow I...
{ "language": "en", "url": "https://stackoverflow.com/questions/403215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Does C# .NET support IDispatch late binding? The Question My question is: Does C# nativly support late-binding IDispatch? Pretend i'm trying to automate Office, while being compatible with whatever version the customer has installed. In the .NET world if you developed with Office 2000 installed, every developer, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How do I move a file with Ruby? I want to move a file with Ruby. How do I do that? A: An old question, i'm surprised no one answered this simple solution. You don't need fileutils or a systemcall, just rename the file to the new location. File.rename source_path, target_path Happy coding A: You can use FileUtils ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "185" }
Q: Visual Source Safe - Removing files from web projects I'll try to make this as straight forward as possible. * *Currently our team has a VSS database where our projects are stored. *Developers grab the code and place on their localhost machine and develop locally. *Designated developer grabs latest version and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I read a resource file from a Java jar file? I'm trying to access an XML file within a jar file, from a separate jar that's running as a desktop application. I can get the URL to the file I need, but when I pass that to a FileReader (as a String) I get a FileNotFoundException saying "The file name, directory...
{ "language": "en", "url": "https://stackoverflow.com/questions/403256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Can Microsoft Windows Workflow route to specific workstations? I want to write a workflow application that routes a link to a document. The routing is based upon machines not users because I don't know who will ever be at a given post. For example, I have a form. It is initially filled out in location A. I now w...
{ "language": "en", "url": "https://stackoverflow.com/questions/403270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Mercurial practices: use with IDEs and scalability I am not an experimented user of SCM tools, even though I am convinced of their usefulness, of course. I used some obscure commercial tool in a former job, Perforce in the current one, and played a bit with TortoiseSVN for my little personal projects, but I disliked...
{ "language": "en", "url": "https://stackoverflow.com/questions/403279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Find missing values I have a table, with 2 important columns DocEntry, WebId Sample data is like DocEntry WebId 1 S001 2 S002 3 S003 4 S005 Now as we can notice here, in column WebId, S004 is missing. How can we locate such missing numbers, with a query. Further explanation: The web...
{ "language": "en", "url": "https://stackoverflow.com/questions/403291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: parse html code to find a field I have these page http://www.elseptimoarte.net/. The page have a search field, If I put for instance "batman" it give me some searchs results with a url of every result: http://www.elseptimoarte.net/busquedas.html?cx=003284578463992023034%3Alraatm7pya0&cof=FORID%3A11&ie=ISO-8859-1&oe=...
{ "language": "en", "url": "https://stackoverflow.com/questions/403303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP - Javascript Controls I'm currently developing (another) Open Source CMS in PHP and I'd like to use javascript controls especially for the admin panel. The question is, are there any open-source, freely distributable controls (for creating javascript Editable Grids, Trees, tabs etc ) that have an interface for P...
{ "language": "en", "url": "https://stackoverflow.com/questions/403310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you use nAnt to copy files to a non-domain machine I have a nAnt script that works perfectly to build and copy a website to another domain machine. However, when I try to copy the website to a machine not on the domain I get security errors. I know it's because the user that I have set to run nAnt doesn't ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/403318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How detailed should error messages be? I was wondering what the general consensus on error messages was. How detailed should they be? I've worked on projects where there was a different error message for entering a number that was too big, too small, had a decimal, was a string, etc. That was quite nice for the user...
{ "language": "en", "url": "https://stackoverflow.com/questions/403333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Getting a query intersection in JPA? I have: "image" 1:Many "imageToTag" Many:1 "tag" I want to issue a query that will return all images that have at least tags [a, b, c]. It's not clear to me how one can model this in JPQL. I could build the query string dynamically but that's bad for performance and security reas...
{ "language": "en", "url": "https://stackoverflow.com/questions/403336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Visual Studio: How to have multiple developers on a solution that references Office? When I add a reference to Office COM Library, I to go: * *References *Add Reference *Select the COM tab *Select Microsoft Office 12.0 Object Library And magically named reference appears: Microsoft.Office.Core The Projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/403338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Window placement: WinSplit Revolution -like application for Linux (KDE)? What is the WinSplit Revolution -like application for Linux (KDE)? Or maybe there is a functionality in KDE I am missing? A: It's not really a programming related question, I guess. Anyhow...there seems to be a plugin for compiz-fusion called...
{ "language": "en", "url": "https://stackoverflow.com/questions/403348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: unicode char comparing to non unicode char, but no warning nor error Why does the following code NOT give an error, nor any type of a warning about an implicit conversion? std::wstring str = L"hi"; if(str[0] == 'h') cout<<"strange"<<endl; The proper normal code is: std::wstring str = L"hi"; if(str[0] == L'h')...
{ "language": "en", "url": "https://stackoverflow.com/questions/403349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mozilla client side XSLT not displaying. (Using jQuery too) I want to use firebug to debug and help be quickly finish some XSLT layout issues, but I cannot get the following code to perform and display the client side XSLT in Firefox (everything is fine in IE): $().ready(function() { var oXMLHTTP var oXSLT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I maintain child objects with LinqToSql over WCF? I am currently stuck in the design of this solution. The data layer design consists of the following: * *Recipe (parent high level object) * *Language Detail (name, description by language) (many) * *Headers (many) *Steps (many) * *Ingredients (m...
{ "language": "en", "url": "https://stackoverflow.com/questions/403365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Javascript/Ajax - Manually remove event handler from a Sys.EventHandlerList() I have two script controls, one holds the other, and I have successfully been able to handle events from the child on the parent using: initialize: function() { this._autoComplete = $get(this._autoCompleteID); this._onAutoComplet...
{ "language": "en", "url": "https://stackoverflow.com/questions/403370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How rotate a pdf document using php? How can I rotate a pdf document using php and linux? A: Rotate an Entire PDF Document's Pages to 180 Degrees $command = "pdftk in.pdf cat 1-endS output out.pdf"; system($command); A: You could use pdf90 from PDFjam. To address some of the other suggestions: * *I would be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java cannot find symbol compile error new to Java. I want to use the org.apache.commons.lang.WordUtils package. Tried importing it. Tried downloading it and adding it to my build path. When I use intellisense for the word WordUtils Eclipse auto puts the import statement at the top of the file. I get the following er...
{ "language": "en", "url": "https://stackoverflow.com/questions/403378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I know when my tomcat web application stopped? I want to get an 'event' before tomcat stops my web application. My application needs to "wrap up" stuff before it is being closed. A: A servlet that does nothing but respond to destroy() is functional but a bit of a hack. Servlets are meant to handle web reque...
{ "language": "en", "url": "https://stackoverflow.com/questions/403379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How important is indexing and clustered indexing to database performance? There have been several questions recently about database indexing and clustered indexing and it has been kind of new to me until the last couple weeks. I was wondering how important it is and what kind of performance gains can be expected fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/403393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Identifying An Encryption Algorithm First off, I would like to ask if any of you know of an encryption algorithm that uses a key to encrypt the data, but no key to decrypt the data. This seems highly unlikely, if not impossible to me, so sorry if it's a stupid question. My final question is, say you have access to...
{ "language": "en", "url": "https://stackoverflow.com/questions/403394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# MySQL Connection problems I'm trying to connect a C# application (using Visual C# 2008 Express Edition) to a remote MySQL server. I have the drivers for this, but when I followed the tutorials (including adding the pooling and connection reset properties), I get an error that: Object reference not set to an insta...
{ "language": "en", "url": "https://stackoverflow.com/questions/403398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Creating nunit tests without exporting them with the api I'm new to unit testing using nunit (and Java development in general). When creating unit tests for private methods on classes, it looks as though the test file must be in the same package as the class being tested. What is the typical way of avoiding export...
{ "language": "en", "url": "https://stackoverflow.com/questions/403408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Delphi 2009 ShellTreeView/ShellListView Fix When a Delphi 2009 project is closed with ShellTreeView/ShellListView on the mainform in the IDE Index out of bounds(0) exceptions are generated. Is there a fix for ShellTreeView/ShellListView so the exceptions can be eliminated? A: That's the first I've heard of this. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/403411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set Custom Text into DropdownList in ASP.Net I have dropdown list control in one of my application and when I add Items in it from database Its displaying the first Item into Dropdown list by default but I want to display someother text into this like "Select Item from the List" Is there any way I can do th...
{ "language": "en", "url": "https://stackoverflow.com/questions/403419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert XSD into SQL relational tables Is there something available that could help me convert a XSD into SQL relational tables? The XSD is rather big (in my world anyway) and I could save time and boring typing if something pushed me ahead rather than starting from scratch. The XSD is here if you want to have a loo...
{ "language": "en", "url": "https://stackoverflow.com/questions/403420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How do I sort a list of objects based on an attribute of the objects? I have a list of Python objects that I want to sort by a specific attribute of each object: [Tag(name="toe", count=10), Tag(name="leg", count=2), ...] How do I sort the list by .count in descending order? A: Readers should notice that the key= m...
{ "language": "en", "url": "https://stackoverflow.com/questions/403421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1153" }
Q: Making the value of a table equal to another value in a different table I have a small problem with a program that im writing. I have a table - stocks which contains information(products, barcodes etc.) about items stored in a fridge. I then have another table - shop which acts like a shop,containing loads of produc...
{ "language": "en", "url": "https://stackoverflow.com/questions/403433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Migrating EJB2.x BMP entity beans We use EJB2.x entity beans with BMP (bean managed persistence). It appears BMP is not supported in EJB3. We had wanted to stay current and upgrade to EJB3. Does anyone know if there are in fact any BMP options available in 3.0? From what I can tell, using 3.0, all entity beans ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/403441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set up access to MSSQL 2005 Database Mail? I've just setup Database mail within MSSQL 2005. I have been able to send email from an administrator account on the server and through a SQL Server Agent job. But, I unable to send email when I tried to send email via a login that just has access to a database for o...
{ "language": "en", "url": "https://stackoverflow.com/questions/403443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a VB.NET equivalent for C#'s '??' operator? Is there a VB.NET equivalent for C#'s ?? operator? A: The accepted answer doesn't have any explanation whatsoever and is simply just a link. Therefore, I thought I'd leave an answer that explains how the If operator works taken from MSDN: If Operator (Visual Bas...
{ "language": "en", "url": "https://stackoverflow.com/questions/403445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "199" }
Q: Bring the data module to work with --- pass-Store-use a connection inside a reusable data module I want to seperate the data module of a site into an assembly ( a single dll file ) , What is the best way to get-store and pass the ConnectionString of the site in dealing with the web application . Inside the data asse...
{ "language": "en", "url": "https://stackoverflow.com/questions/403448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JavaScript: 'Disallow leading _ in identifiers' as an option in JSLint I have just started writing my own JavaScript Framework (just for the learning experience), and have prefixed some private members with a _, like such: var _isFireBugEnabled = function () { return (window.console && window.console.firebug); }...
{ "language": "en", "url": "https://stackoverflow.com/questions/403454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using "var" to declare variables in C# When using "var" to declare variables in C#, is there boxing/unboxing taking place? Also is there a chance of a runtime type mis-match when using var to declare variables? A: No. using var is compiled exactly as if you specified the exact type name. e.g. var x = 5; and int x...
{ "language": "en", "url": "https://stackoverflow.com/questions/403455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to mimic struts validation using javascript/html/css For the past few years I've focused on back-end development so my javascript & css skills are lacking. I'm volunteering as a webmaster for a site and would like to spruce up the form validation (currently there is none). My problem: Basically I have one form ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to overlay images I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image. On top of this linked image I would like an image of a m...
{ "language": "en", "url": "https://stackoverflow.com/questions/403478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "130" }
Q: Using a custom URL rewriter, IIS6, and urls with .htm, .html, etc I have a custom site I'm building with automatic url rewriting using a custom engine. The rewriting works fine as long as the page url doesn't end in somehting like .htm or .html. For these pages it goes directly to the iis 404 page instead of hitti...
{ "language": "en", "url": "https://stackoverflow.com/questions/403480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is a good vector library for Cocoa or Cocoa-touch? I'm looking for a good vector library for displaying animated graphics on the iPhone. Something that could possibly display SVG. Anyone have any ideas or insights? A: Quartz, i.e. the vector graphics library that's already built into the phone. Depending on...
{ "language": "en", "url": "https://stackoverflow.com/questions/403481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is Silverlight Secure? We have a need for an application that runs on an end user's machine and provides us with score results, and we need to results to be accurate (i.e. not tampered with). Currently, there is a debate between Flash and Silverlight, and it looks like Silverlight is going to be the winner. Aside ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# LINQ equivalent of a somewhat complex SQL query So I have a SQL Query as Follows SELECT P.Date, P.CategoryName, P.ProductName, SUM(Quantity) Quantity, SUM(Sales) TotalSales, IsLevelThree FROM Products P LEFT JOIN LevelThreeTracking LTT ON P.Date = LTT.Date AND P.CategoryName = P.CategoryName AND P.SecurityID ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Passing data from Controller to a User Control View with ASP.NET MVC I have a View class (OrderView.aspx) which shows the details of an order (Account Name, Order Date) as well as a list of order lines via the Repeater control. Each order line is represented by a User Control View (OrderLineView.ascx) which shows t...
{ "language": "en", "url": "https://stackoverflow.com/questions/403509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP - Find URL of script that included current document I have a template I made that sets variables that rarely change, call my headers, calls my banner and sidebar, loads a variable which shows the individual pages, then calls the footer. In one of my headers, I want the URL of the page in the user's address bar. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET MVC and .NET 3.5 SP1 on Windows Server 2003 and IIS I am writing a website for a client who says their servers run the following: "Windows 2003 with the latest IIS". What do I need to do to get them ready for hosting my ASP.NET MVC website built with .NET 3.5SP1? A: You'll probably also run into an issue w...
{ "language": "en", "url": "https://stackoverflow.com/questions/403524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Making a SQL Query in two tables I'm wondering, is it possible to make an sql query that does the same function as 'select products where barcode in table1 = barcode in table2'. I am writing this function in a python program. Once that function is called will the table be joined permanently or just while that funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/403527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are Extension Methods? What are extension methods in .NET? EDIT: I have posted a follow up question at Usage of Extension Methods A: Extension methods allow developers to add new methods to the public contract of an existing CLR type, without having to sub-class it or recompile the original type. Ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/403539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Value object with OID Can you describe the pros and cons of including an OID (typically a database row identifier) in a POJO representing an entity in your model? In fact I'm not talking about issues related to equals/hashcode and so on, I should have described better my problem (my bad :) )... We've got some of tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/403549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do regular expressions work in selenium? I want to store part of an id, and throw out the rest. For example, I have an html element with an id of 'element-12345'. I want to throw out 'element-' and keep '12345'. How can I accomplish this? I can capture and echo the value, like this: | storeAttribute | //pathToMy...
{ "language": "en", "url": "https://stackoverflow.com/questions/403560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can you organize imports for an entire project in eclipse with a keystroke? Wouldn't it be nice to just do a keystroke and have eclipse organize all imports in all java classes instead of just the one you are looking at? Is this possible? Is there a keystroke for it? A: For Eclipse Helios, open the "Project Explore...
{ "language": "en", "url": "https://stackoverflow.com/questions/403569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "150" }
Q: How to get random double value out of random byte array values? I would like to use RNGCryptoServiceProvider as my source of random numbers. As it only can output them as an array of byte values how can I convert them to 0 to 1 double value while preserving uniformity of results? A: This is how I would do this. pri...
{ "language": "en", "url": "https://stackoverflow.com/questions/403572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the use of package level protection in java? I know how package level protection in java works. I read a lot of code (including lots of open source stuff) and no-one seem to be using it. The whole protection level seems slightly faulty to me (I'd have c#'s internal any day of the week). Are there any legit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: What are the current best practices for load testing and profiling ASP.NET web applications? I am tasked with improving the performance of a particular page of the website that has an extremely high response time as reported by google analytics. Doing a few google searches reveals a product that came with VS2003 cal...
{ "language": "en", "url": "https://stackoverflow.com/questions/403590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any way to share resources in a Silverlight library project? In a silverlight application you have App.xaml, but in a Silverlight library you don't. I tried using generic.xaml but I think this serves the specific purpose of applying styles to all controls based on their type. In case, I just want a place ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Usage of Extension Methods * When does using extension methods make sense? * Does adding extension methods to a type affect performance? These questions are follow up to the question i asked earlier about Extension Methods. A: From my answer here: As regards a practical use for Extension Methods, you might add ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/403619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Selenium: Is it possible to concatenate an xpath with a variable? The xpath of my elements are becoming extremely hard to read. //div[@id='main_content']/div[2]/div[2]/div[2]/div[4]/table/tbody/tr[2]/td/form/fieldset/p[1]/input It would be nice if I could store most of that as a variable and use it later like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I completely replace the content of a WPF button with a graphic path? I've deconstructed a standard WPF button using Blend and have managed to create a nicely styled button, but I cannot figure out how to make the path fill the interior of the button space (the button width and height). I am also not sure if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Full-Text Search in SQL Server 2008 across multiple tables, columns I need to search across multiple columns from two tables in my database using Full-Text Search. The two tables in question have the relevant columns full-text indexed. The reason I'm opting for Full-text search: 1. To be able to search accente...
{ "language": "en", "url": "https://stackoverflow.com/questions/403630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Treatment of Shared in GAC Included Assemblies I know that when creating a DLL and declaring items as "Shared" (Static in C#) that they are instantiated when first called, and then that object reference lives on as the single reference. So declaring a shared string property once set can be called again to retreive t...
{ "language": "en", "url": "https://stackoverflow.com/questions/403634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What Exception should be thrown from Propery Set? In .NET, what type of exception should be thrown if someone passes an illegal value to the set { } part of a property? Example: public string Provider { get { return _provider; } set { if (String.IsNullOrEmpty(value)) throw new Exception("Provider...
{ "language": "en", "url": "https://stackoverflow.com/questions/403643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I make Xcode refresh its local copies of my project's image files? I'm having some weird issues with Xcode, and this is pretty much impossible to find answers by simply googling around. I have a few icon image files (just PNGs) in my Xcode project, and when I modify some of them in Photoshop, they don't get u...
{ "language": "en", "url": "https://stackoverflow.com/questions/403645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Determining the path to Outlook.exe from java? I want to invoke outlook from the command line (for various reasons) and wanted to know how I go about discovering the Path to the Outlook.exe file. I'm pretty sure it's stored in the registry, but was wondering how to go about reading that from Java. thanks A: I found...
{ "language": "en", "url": "https://stackoverflow.com/questions/403660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I convert a string in C++ or C to an integer array? How do I convert a string into an array of integers? Can I use sstream, because atoi doesn't work?! A: As you said in the comments, you got a binary string and you want to convert it into integers. Use bitset for that: std::istringstream is(str); std::bitse...
{ "language": "en", "url": "https://stackoverflow.com/questions/403662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: SQLite for read-only applications? Will SQLite work OK for a multi-user read-only application where the database resides on a Windows network drive? A: I think that, if you are only reading, then yes. According to SQLite FAQ writing might be a problem. A: Most of the SQLite work is done in memory. If you have eno...
{ "language": "en", "url": "https://stackoverflow.com/questions/403668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: The differences between .build, .create, and .create! and when should they be used? So I've been seeing people using .build, .create, and .create! within their controllers more and more lately. What's the difference from just using .new and passing the param'd object and then .save? Are there pros and cons? Does usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/403671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "177" }
Q: Switching OK-Cancel and Cancel-OK to enforce user interaction? This is inspired by the question OK-Cancel or Cancel-OK?. I remember reading somewhere about the concept of switching OK-Cancel/Cancel-OK in certain situations to prevent the user from clicking through information popups or dialog boxes without reading t...
{ "language": "en", "url": "https://stackoverflow.com/questions/403687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Does anyone know of a GUI-less application that can be called from JavaScript to create and save desktop screen shots? While the subject could sound like I'm looking to do something shifty, I'm not; I maintain an internal web site used by several hundred phone operators, and would like to add the following function...
{ "language": "en", "url": "https://stackoverflow.com/questions/403689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MaxAutoWidth in WPF Is there a good way to limit the Auto Width of an element or Grid Column? I want to limit the Auto Width only, but allow any user changes. For example, I want to allow GridSplitter to arbitrarily resize the column, but the initial (Auto) Width should not exceed a specific value. Same for the elem...
{ "language": "en", "url": "https://stackoverflow.com/questions/403702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use mod_rewrite with Zend Framework? I've just deployed a new site using Zend Framework. Due to the popularity of my tutorials I'd like to redirect any request for a tutorial to the relevant page on the new site. So far this is what I've got: URL before Rewrite: http://neranjara.org/tutorials/?tid=56 URL afte...
{ "language": "en", "url": "https://stackoverflow.com/questions/403703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Strong Name Validation Failed Two machines. Both with .NET 3.5 and the VS 2008 VC++ SP1 redistributables A single exe which uses two signed DLLs, one in C++/CLI and one in C# The exe loads and runs fine on one machine. On the other, I get "Strong Name Validation Failed" on the C++ executable (HRESULT 0x8013141A) Any...
{ "language": "en", "url": "https://stackoverflow.com/questions/403731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Can't find Dotnet install optimizer, any ideas? Back in 2005 I worked on a dotnet desktop application. At the time I was looking for installers to create the install package. During my search I cam across a neat tool that would bind your application with dotnet itself only including the parts of dotnet that were req...
{ "language": "en", "url": "https://stackoverflow.com/questions/403734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Include one RSS feed in another, possible? How? I'm using JAlbum to create my webalbum and since version 8.1 JAlbum supports RSS feeds of the albums. However the RSS feeds generated by JAlbum do not work for albums containing a hierarchy of folders. What they try to do in the RSS feeds is to include the RSS feeds of...
{ "language": "en", "url": "https://stackoverflow.com/questions/403735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Centering entire page with CSS I am attempting to center my entire page using only CSS and it is proving more complicated than i first expected. Currently my code works in IE but not in Firefox which makes a change. The page can be seen here. Below is the code portion involved: #wrap { width: 960px; margin: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/403736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Bests practices for localized texts in C++ cross-platform applications? In the current C++ standard (C++03), there are too few specifications about text localization and that makes the C++ developer's life harder than usual when working with localized texts (certainly the C++0x standard will help here later). Assumi...
{ "language": "en", "url": "https://stackoverflow.com/questions/403747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How can I customize the accessory disclosure image in a UITableViewCell? I would like to use a custom version of the standard disclosure accessory image in my UITableView. How can I do this? I'm hoping that sub-classing UITableViewCell is not necessary for something this basic. A: I ran into the same problem as Gre...
{ "language": "en", "url": "https://stackoverflow.com/questions/403748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }