text
stringlengths
8
267k
meta
dict
Q: How do I sort a vector of pairs based on the second element of the pair? If I have a vector of pairs: std::vector<std::pair<int, int> > vec; Is there and easy way to sort the list in increasing order based on the second element of the pair? I know I can write a little function object that will do the work, but is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/279854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "151" }
Q: How do I get projects to place their build output into the same directory with Scons? Background I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: * *Prj1 is an EXE that depends on Prj2 *Prj2 is a DLL that exports some functions The problem I'm running into is that the l...
{ "language": "en", "url": "https://stackoverflow.com/questions/279860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: View multiple files in Visual Studio I just realised that Office 2007 now shows multiple pages per default. I can finally take advantage of that huge monitor I've bought. Is there a similar feature with Visual Studio? Something like "View -> Two Pages" A: Try This: Click Window -> New Vertical Tab Group A: You ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/279861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Are you writing custom pages for iPhone web apps? I read the tutorials for web applications and the special rules you can put into style sheets. Are folks finding they can just tweak their style sheets to serve up content to iPhones or do they deliver custom iPhone specific pages? would you bother with this if you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/279895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it better to use tables instead of arrays field type in PostgreSql when arrays do not exceed 50 elements? Or better said: When to use array as a field data type in a table? Which solution provides better search results? A: Don't know how long these links stay live so I'll paste the results below: http://sqlfiddl...
{ "language": "en", "url": "https://stackoverflow.com/questions/279902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Checkbox in a Crystal Report What is the best way to display a checkbox in a Crystal Report? Example: My report has a box for "Male" and "Female", and one should be checked. My current workaround is to draw a small graphical square, and line it up with a formula which goes like this: if {table.gender} = "M" then "X"...
{ "language": "en", "url": "https://stackoverflow.com/questions/279907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PyOpenGl or pyglet? I am looking to do some tinkering with openGL and Python and haven't been able to find good reasons for using PyOpenGl versus pyglet Which would you recommend and why? A: I'd say that Pyglet is actually more evolved than PyOpenGL. It has a nice API of it's own, and it has a full wrapper around O...
{ "language": "en", "url": "https://stackoverflow.com/questions/279912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Format text in Excel file via PHP I'm loading data from my database, and exporting to an Excel file via a method I found on this site: http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8 It works, but what I want to do now is format the text before it exports - change the font and text size. Does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/279917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I use C to change the last modified date of a file in Windows? Is there a C function call that can change the last modified date of a file or directory in Windows? A: You can use the SetFileTime function, for the directories, you have to use the CreateFile function with the FILE_FLAG_BACKUP_SEMANTICS flag t...
{ "language": "en", "url": "https://stackoverflow.com/questions/279919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Set permissions on a compressed file in python I have a file test.txt that is inside a zip archive test.zip. The permissions on test.txt are out of my control when it's compressed, but now I want them to be group-writeable. I am extracting the file with Python, and don't want to escape out to the shell. EDIT: Here...
{ "language": "en", "url": "https://stackoverflow.com/questions/279945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Hard-coding HTML into VB6 code Background: we have an application that generates reports from HTML (that may or may not have inline scripting). The HTML source is normally stored as a blob in the database. There is now the need to hard-code a particular report into the application (i.e. so that it is not database de...
{ "language": "en", "url": "https://stackoverflow.com/questions/279947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Issue when using Visual Studio Report Designer with Linq to SQL datasource I don't expect to get a great response from this, so if you have had experience in this any contribution would be appreciated. I am trying to use the Visual Studio Report Designer with a Linq to SQL datasource, I have no experience of using t...
{ "language": "en", "url": "https://stackoverflow.com/questions/279948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET Login Page Styles I have created a user login page and am using Forms Authentication. Users are required to log into the system to use it, there are no anon pages. When the go into the system and get automatically redirected to the login page though, they loose all styles on the page. It is as if the paths t...
{ "language": "en", "url": "https://stackoverflow.com/questions/279951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to send an email with attachments using SmtpClient.SendAsync? I am using a service component through ASP.NET MVC. I would like to send the email in a asynchronous way to let the user do other stuff without having to wait for the sending. When I send a message without attachments it works fine. When I send a mess...
{ "language": "en", "url": "https://stackoverflow.com/questions/279953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Is there any way to programmatically set the comment attribute on a file in XP? Links to point me in the correct direction, or sample code will be appreciated. A: You can do it with some unmanaged calls, check the OLE32 function StgOpenPropStg() and StgOpenStorageEx() functions at MSDN: http://msdn.microsoft.com/en...
{ "language": "en", "url": "https://stackoverflow.com/questions/279956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I set a session variable when a user is automatically logged in via Forms Authentication? I'm using Forms Authentication (and the built in Login controls) and letting users click the "remember me" checkbox when logging in. When they return to the site, they are automatically logged in as expected. Is there an...
{ "language": "en", "url": "https://stackoverflow.com/questions/279957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: XDebug server on Eclipse PDT test server issue I have Eclipse PDT with Subclipse installed and currently have a PHP project drawing from a repository on my production server. I have VMWare Workstation installed with Linux and was hoping to use that as a debug server using XDebug. The problem is that when I update ...
{ "language": "en", "url": "https://stackoverflow.com/questions/279958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I make shift+spacebar page up in Vim? I have an entry in my .vimrc which makes it page down the viewport when I hit the spacebar. It looks like this: map <Space> <PageDown> I want to create another key mapping which pages the viewport up when holding shift and hitting the spacebar. I have tried the followin...
{ "language": "en", "url": "https://stackoverflow.com/questions/279959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: How can I export a Gridview's data to Excel using C#? How can I export a GridView's data to a Microsoft Excel 2007 file? Also, does Microsoft Excel 2007 support html elements and tags? A: If your users are using IE, just have them right-click on the GridView (which will have been rendered as an HTML table), right-c...
{ "language": "en", "url": "https://stackoverflow.com/questions/279962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP_SELF vs PATH_INFO vs SCRIPT_NAME vs REQUEST_URI I am building a PHP application in CodeIgniter. CodeIgniter sends all requests to the main controller: index.php. However, I don't like to see index.php in the URI. For example, http://www.example.com/faq/whatever will route to http://www.example.com/index.php/faq/...
{ "language": "en", "url": "https://stackoverflow.com/questions/279966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "117" }
Q: Importing "libraries" in powershell I'm finding myself writing a bunch of related functions dealing with different nouns (clusters, sql servers, servers in general, files, etc.) and put each of these groups of functions in separate files (say cluster_utils.ps1, for example). I want to be able to "import" some of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/279974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I convert Geometry data into a Geography data in MS SQL Server 2008? How can I convert some Geometry data into Geography data in MS SQL Server 2008? A: Yes you can but the geometry datatype is more forgiving than the geography in my experience. So there is some data you might have in geometry that you can'...
{ "language": "en", "url": "https://stackoverflow.com/questions/279983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Pasting source code in word 2007 If i try to paste source code in word 2007 the spacing between the lines seems to get messed up as all new lines are spaced way apart compared to a programming text editor. Can somebody tell me how to paste source code in word 2007 preserving the formatting and the spacing between li...
{ "language": "en", "url": "https://stackoverflow.com/questions/279988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Where can I find sample code on mouse movements and polygon spins in OpenGL? Where can I find sample code on mouse movements and polygon spins in OpenGL? I am using Java, so sample code in Java is preferred. A: You'd probably find this useful: http://pepijn.fab4.be/software/nehe-java-ports/ A: If you would like to...
{ "language": "en", "url": "https://stackoverflow.com/questions/279990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.NET-Saving Special Characters to Database Please tell me how can save a string with special characters to DB.Special characters may contatin single quotes/double quotes etc.. I am using ASP.NET with C# A: Use parameterized queries. http://aspnet101.com/aspnet101/tutorials.aspx?id=1 When rendering to the client...
{ "language": "en", "url": "https://stackoverflow.com/questions/279991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I retrieve the properties of a photo taken on a digital camera using .NET? Preferably in VB.Net, but C# is fine, how can I access the extra properties added to a file by my digital camera, like Date Picture Taken, Shutter Speed or Camera Model? A: I maintain a library that offers comprehensive support for ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/280003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to get the FTP error when using PHP I have a script which logs on to a remote server and tries to rename files, using PHP. The code currently looks something like this example from the php.net website: if (ftp_rename($conn_id, $old_file, $new_file)) { echo "successfully renamed $old_file to $new_file\n"; } else...
{ "language": "en", "url": "https://stackoverflow.com/questions/280014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Table inside a table row I want to put a table inside a table row. But when i try to take the preview it's not working. Can anyone help me on this? A: I'm guessing you want a subreport. You'll need to have a parameter on the subreport that ties to a value in the row that the report is displayed in. Once you place...
{ "language": "en", "url": "https://stackoverflow.com/questions/280016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: UIViewController vs. UIView - which one should create subviews? I'm trying to wrap my head around the roles of UIViews and UIViewControllers. If I'm creating and inserting subviews programmatically, is it typical to do this from the view or the controller? I'm really just wondering if there's a convention/pattern f...
{ "language": "en", "url": "https://stackoverflow.com/questions/280017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: mobile ocr sample code I was wondering if you can give me sample (or snippet) code in OCR for Mobile Phones because i need to have an idea how to start my project. i know how to code it for the use in desktop PC's but my partner told me that mobile phones has a different platform. We are planning to use .net for mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/280021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Shoes' download() to do basic HTTP authentication I'm trying to use Shoes' download() method to pass a username and password in the HTTP header to authenticate the HTTP request (talking to a Rails app). I'm a bit of a newb when it comes to this stuff. I havn't quite understood whether I should be automaticall...
{ "language": "en", "url": "https://stackoverflow.com/questions/280024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C++ Header Files, Code Separation I am new to C++ and I had a few general questions about code separation. I have currently built a small application, all in one file. What I want to do now is convert this into separate files such that they contain similar code or whatnot. My real question right now is, how do I k...
{ "language": "en", "url": "https://stackoverflow.com/questions/280033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What is a "Cloud OS"? The term is getting 'hotter' with Microsoft Azure and Windows 7. What are the benefits + how does the status quo of desktop computing now change? Does the machine no longer need an OS installation (or a highly stripped down version of a typical OS)... what is needed to interact with the 'Cloud...
{ "language": "en", "url": "https://stackoverflow.com/questions/280037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Corner radius in Adobe Air application How can we make rounded corners on the vbox control in the Air application? I am hiding the header and setting transparent to true, but then it does not show me rounded corners on the VBox in the application. I am showing this VBox to the user. Thanks in advance. A: You can do...
{ "language": "en", "url": "https://stackoverflow.com/questions/280040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VB6 PictureBox Mouseover I'm using a VB6 PictureBox on my User Control. I set the PictureBox's picture, I set the BorderStyle to 0, and I set the BackColor to the User Control's BackColor. The idea is that I want a "floating" icon. However, I want that icon to appear clickable when the mouse hovers over it. Two...
{ "language": "en", "url": "https://stackoverflow.com/questions/280041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NCover Nunit CruiseControl.NET Task with NCover Addin Can someone provide me a sample for a ncover task for a nunit dll? A: http://madcoderspeak.blogspot.com/2006/01/code-coverage-with-ncover-from-nunit.html http://madcoderspeak.blogspot.com/2006/06/integrating-ncover-code-coverage-with.html Maybe a bit dated.. but...
{ "language": "en", "url": "https://stackoverflow.com/questions/280044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to create a JavaScript callback for knowing when an image is loaded? I want to know when an image has finished loading. Is there a way to do it with a callback? If not, is there a way to do it at all? A: Image.onload() will often work. To use it, you'll need to be sure to bind the event handler before you set...
{ "language": "en", "url": "https://stackoverflow.com/questions/280049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "185" }
Q: iPhone - Memory Leak - NSData dataWithContentsOfUrl & UIWebView Please help! Have been staring at this for 12 hours; and have looked online and can't find solution. In my application, I use 2 UIView controls in separate pages/controllers: * *UIImageView (retrieve data via NSData dataWithContentsOfUrl) *UIWebView...
{ "language": "en", "url": "https://stackoverflow.com/questions/280053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Does ADO.NET + massive INSERTs + Excel + C# = "A bad time"? Basically I need to insert a bunch of data to an Excel file. Creating an OleDB connection appears to be the fastest way but I've seen to have run into memory issues. The memory used by the process seems to keep growing as I execute INSERT queries. I've n...
{ "language": "en", "url": "https://stackoverflow.com/questions/280058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: GCC: program doesn't work with compilation option -O3 I'm writing a C++ program that doesn't work (I get a segmentation fault) when I compile it with optimizations (options -O1, -O2, -O3, etc.), but it works just fine when I compile it without optimizations. Is there any chance that the error is in my code? or shoul...
{ "language": "en", "url": "https://stackoverflow.com/questions/280069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Tools to assist with continual Java to C# Conversion These days, many projects have started their life written in Java. Some of them are eventually converted to C# for incorporation in .NET. Examples that come to mind are log4net, nhibernate and db4o. Including sharpen (which is db4o's tool) have you seen and/or u...
{ "language": "en", "url": "https://stackoverflow.com/questions/280072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Atomic operations in Django? I'm trying to implement (what I think is) a pretty simple data model for a counter: class VisitorDayTypeCounter(models.Model): visitType = models.CharField(max_length=60) visitDate = models.DateField('Visit Date') counter = models.IntegerField() When someone comes through, i...
{ "language": "en", "url": "https://stackoverflow.com/questions/280075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Does the order of parameters in the where clause affect whether a table uses an index? So I am wondering if there is a definitive answer to this question. Also, does it matter if the index is clustered vs. non-clustered. Is it the same in all RDBMS implementations or is the exact behavior going to be proprietary? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/280086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to prevent injections in ASP/VBScript? What are the best ways (or at least most common ways) in ASP (VBScript) for input handling? My main concerns are HTML/JavaScript injections & SQL injections. Is there some equivalent to PHP's htmlspecialchars or addslashes, et cetera? Or do I have to do it manually with som...
{ "language": "en", "url": "https://stackoverflow.com/questions/280101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JEditorPane inside JScrollPane not resizing as needed I am implementing a Comment box facility in my application which user can resize using mouse. This comment box contains a scrollpane which instead contains a JEditorPane in which user can insert comment. I have added the editor pane inside a scroll pane for the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/280106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What does the term "canonical form" or "canonical representation" in Java mean? I have often heard this term being used, but I have never really understood it. What does it mean, and can anyone give some examples/point me to some links? EDIT: Thanks to everyone for the replies. Can you also tell me how the canonical...
{ "language": "en", "url": "https://stackoverflow.com/questions/280107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Dynamically growing an array of text inputs (HTML/JavaScript) I'm creating a data entry app for some in-house stuff. My team needs to enter info about "items" which can have many "categories" and vice versa. I need a quick way to let them enter an arbitrary amount of categories. Here's my idea: On the item entry pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/280109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# and Data Hiding I'm new to C# and .Net in general so this may be a naive thing to ask. But anyway, consider this C# code: class A { public int Data {get; set;} } class B { public A Aval {get; set;} } The B.Aval property above is returning a reference to its internal A object. As a former C++ programmer,...
{ "language": "en", "url": "https://stackoverflow.com/questions/280114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I create a menu separator bar in WPF using code I am creating menus in WPF programatically using vb.net. Can someone show me how I can add separator bar to a menu in code? No xaml please. A: WPF has a Separator control for just that purpose and it also separates your menu items when the appear on a toolbar...
{ "language": "en", "url": "https://stackoverflow.com/questions/280115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Dynamic Slidedown effect using jQuery reading data from a table I want to list some records from the table in a ASP.NET page. For each record, I want to display some data and at the same time, provide a button for them to click. I want to show a “CLICK TO VIEW BUTTON” If they click on the button, I want to have a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/280124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get rid of try catch? I'm bored with surrounding code with try catch like this.. try { //some boring stuff } catch(Exception ex) { //something even more boring stuff } I would like something like SurroundWithTryCatch(MyMethod) I know I can accomplish this behaviour by creating a delegate with the ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/280127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Using MySql From .Net - Licensing Concerns I am working on a project and trying to determine what platform to use. Right now, my first choice would be to use ASP.Net MVC with a MySql database. My concern with this is that the MySql drivers have a GPL license. I am creating this for a company and therefore it can't b...
{ "language": "en", "url": "https://stackoverflow.com/questions/280135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Making a custom run Dialog with C or C++? Well I would like to make a custom run dialog within my program so that the user can test commands without opening it themselves. The only problem is, msdn does not provide any coverage on this. If I cannot make my own custom run dialog and send the data to shell32.dll (wher...
{ "language": "en", "url": "https://stackoverflow.com/questions/280143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best practices for new Rails deployments on Linux? I've used straight Mongrel, I've used Mongrel clusters behind Apache, I've looked at Thin, and I'm becoming very intrigued by Passenger. I've looked at Nginx, too. I've looked at MRI, Ruby Enterprise Edition, Rubinius, and JRuby. There are a lot of options, each cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/280155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Is there a way to do a C++ style compile-time assertion to determine machine's endianness? I have some low level serialization code that is templated, and I need to know the system's endianness at compiletime obviously (because the templates specializes based on the system's endianness). Right now I have a header ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: C++ class to read INI files on windows mobile Does anyone know a good C++ class to read (and possibly also write) INI files on Windows Mobile? Ideally this class sould work on Windows mobile 2003, 5 and 6 and be public domain but other alternatives may be interesting. A: See this question How to read config file en...
{ "language": "en", "url": "https://stackoverflow.com/questions/280166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create Generic Class instance based on Anonymous Type I have a class ReportingComponent<T>, which has the constructor: public ReportingComponent(IQueryable<T> query) {} I have Linq Query against the Northwind Database, var query = context.Order_Details.Select(a => new { a.OrderID, a.Product.ProductName,...
{ "language": "en", "url": "https://stackoverflow.com/questions/280172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: C Inline Functions and Memory Use If I use inline functions, does the memory usage increase? A: There is another point you have to consider: Using inline functions, the compiler is able to see where variables of the caller are going to be used as variables in the callee. The compiler can optimize out (often this is...
{ "language": "en", "url": "https://stackoverflow.com/questions/280173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the relationship between quality and user-friendliness of software? Is user-friendliness an important aspect of the quality of software? For example most of the Microsoft products are quite user friendly, but does that necessarily imply that their quality is superior too. A: Quality is the measure of comple...
{ "language": "en", "url": "https://stackoverflow.com/questions/280176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Passing parameter to VBA Macro I am trying to run a macro when I double click on Visio shapes. I want to pass the shape object to the VBA macro so that I could do something in the macro depending on the id of the Shape object. Is it possible to pass the parameter to VBA macro. If yes, please let me know how? Thanks...
{ "language": "en", "url": "https://stackoverflow.com/questions/280189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best USB library to communicate with USB HID devices on Windows? The library should; * *Be easy to use and few lines of client code should accomplish much *Be as platform independent as possible. (In case of future ports to other platforms) *Have C++ bindings. *Be mature and stable I would also lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/280199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: 3D laser scanner capturing normals? The Lab university I work at is in the process of purchasing a laser scanner for scanning 3D objects. All along from the start we've been trying to find a scanner that is able to capture real RAW normals from the actual scanned surface. It seems that most scanners only capture poi...
{ "language": "en", "url": "https://stackoverflow.com/questions/280200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: External JS file in web user control? In a html page we use the head tag to add reference to our external .js files .. we can also include script tags in the body .. But how do we include our external .js file in a web user control? After little googling I got this. It works but is this the only way? ScriptManager.R...
{ "language": "en", "url": "https://stackoverflow.com/questions/280201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: email body from a parsed email object in jython I have an object. fp = open(self.currentEmailPath, "rb") p = email.Parser.Parser() self._currentEmailParsedInstance= p.parse(fp) fp.close() self.currentEmailParsedInstance, from this object I want to get the body of an email, text only no HTML.... How ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Creating a multithreading application in vc6 with boost library? Is it possible to create a multithreading application in VC6 with boost library? If it is possible, what are some relevant tutorials. A: Yes, I have done this successfully, but with Boost v1.30.0. So if you have trouble with the latest versions of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/280209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loading HTML from a .res file Using VS2005/2008 as a resource editor, one of the options in the Add Resource dialog is HTML: it appears to allow me to embed HTML file(s) into a resource (res) file. Does anyone know how to grab the HTML (as a string) from VB6 code? The LoadResData appears to be close to what I'm look...
{ "language": "en", "url": "https://stackoverflow.com/questions/280211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where to begin learning Flex and Flash I want to start developing Flash and Flex applications so that I can put all of the concepts floating around in my head into action. The problem is that I have never done any programming nor dealt with code...ever. I have worked in the graphic design industry and a lot of the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/280216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Python - sort a list of nested lists I have input consisting of a list of nested lists like this: l = [[[[[39]]]], [1, 2, 3], [4, [5, 3], 1], [[[[8, 9], 10], 11], 12]] I want to sort this list based on the sum of all the numbers in the nested lists... so, the values I want to sort by of l would look like this: [39,...
{ "language": "en", "url": "https://stackoverflow.com/questions/280222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: I want to add items to an ASP.Net combobox using Javascript I want to add an item to an ASP.Net combobox using Javascript. I can retrieve the ID (No Masterpage). How can I add values to the combobox from Javascript? My present code looks like this. //Fill the years (counting 100 from the first) function fill...
{ "language": "en", "url": "https://stackoverflow.com/questions/280229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET MVC with Entity Framework I'm thinking it would be smart to setup the Entity object context in Application_BeginRequest, store it in Request.items, use it throughout the request and dispose it in Application_EndRequest. That way the context is always available and I can navigate the Entity Framework object g...
{ "language": "en", "url": "https://stackoverflow.com/questions/280239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I use a Linked List in Python? What's the easiest way to use a linked list in Python? In Scheme, a linked list is defined simply by '(1 2 3 4 5). Python's lists, [1, 2, 3, 4, 5], and tuples, (1, 2, 3, 4, 5), are not, in fact, linked lists, and linked lists have some nice properties such as constant-time conc...
{ "language": "en", "url": "https://stackoverflow.com/questions/280243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "187" }
Q: Menu Accelerator Keys Not Showing Up (Delphi 2009) I've tried my best and cannot figure out what happened here. It worked fine in Delphi 4. After upgrading to Delphi 2009, I don't know if this is the way it is supposed to work, or if it's a problem: This is what my program's menu looks like in Design Mode under Delp...
{ "language": "en", "url": "https://stackoverflow.com/questions/280247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: When is a website considered "static" or "dynamic" I have created a site, which parses XML files and display its content on the appropriate page. Is my site a dynamic web page or static web page? How do dynamic and static web pages differ? I feel it's dynamic, because I parse the content from xml files; initially i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to Read SMS/MMS in UIQ How to Read SMS/MMS in UIQ ? A: I am going to assume that you want information about how to write some C++ source code that will allow an application to receive SMS/MMS and read the content of the messages it receives. On Symbian OS, the message store can store SMS, MMS, EMAIL... The API...
{ "language": "en", "url": "https://stackoverflow.com/questions/280254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: i18n - best practices for internationalization - XLIFF, gettext, INI, ...? EDIT: I would really like to see some general discussion about the formats, their pros and cons! EDIT2: The 'bounty didn't really help to create the needed discussion, there are a few interesting answers but the comprehensive coverage of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Does LINQ to Entities reuse instances of objects? Using LINQ to Entities sounds like a great way to query against a database and get actual CLR objects that I can modify, data bind against and so forth. But if I perform the same query a second time do I get back references to the same CLR objects or an entirely new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Creating DNS records programmatically The situation is, I have a website where the users get a sub domain. eg: client.mydomain.com. If the client fails to meet certain condition (eg. payment default), I want the above site to be pointing to a different web site. The way we want to do it is by creating a dns record w...
{ "language": "en", "url": "https://stackoverflow.com/questions/280277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Practical FlapJax Has anybody used or seen a website that uses FlapJax to function, rather than just as a demo? I'm curious to see how they operate / how difficult they were to write. List one example per answer. A: I'm going to ignore the one app per answer request: http://continue2.cs.brown.edu/ http://resumedemo...
{ "language": "en", "url": "https://stackoverflow.com/questions/280283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Forms - Dropdownlist How to design a dropdown list that can have multiple selections using checkboxes. Can we do it using html/css or it requires javascript? For a visual clarity you can have a look at the image I have attached.image link A: You can have a look at the HTML source code of the site on your screenshot...
{ "language": "en", "url": "https://stackoverflow.com/questions/280295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is relational parametricity? A complicated-sounding term with no good explanations from a simple google search... are there any more academically-oriented folk who could explain this one? A: Both answers are mostly right. I would say that parametricity is a possible property of polymorphism. And polymorphism i...
{ "language": "en", "url": "https://stackoverflow.com/questions/280298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Does persistence ignorance in ADO.NET entity framework mean what I think it means? If the framework is persistence agnostic, can my unit tests construct a file system version of the persistance store underneath my entity model? I'll be using the model first features of entity framework in the GUI for sure because it...
{ "language": "en", "url": "https://stackoverflow.com/questions/280308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Merge XML files in a XDocument I am trying to merge several XML files in a single XDocument object. Merge does not exist in XDocument object. I miss this. Has anyone already implemented a Merge extension method for XDocument, or something similar ? A: Being pragmatic, XDocument vs XmLDocument isn't all-or-nothing (...
{ "language": "en", "url": "https://stackoverflow.com/questions/280313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: When is "self" required? I have been using classes for only a short while and when I write a method, I make all variables reference self, e.g. self.foo. However, I'm looking through the wxPython in Action book and notice that "self" isn't used all the time. For example: import wx class TextFrame(wx.Frame): def...
{ "language": "en", "url": "https://stackoverflow.com/questions/280324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Programming for the 64 bit platform While working on a .Net application (let's say an Asp.Net one), are there any differences in the way you would do things while working on the 64 bit platform, as compared to working on a 32 bit platform. I would imagine very little since you are working on the framework, and the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/280327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HorizontalAlignment=Stretch, MaxWidth, and Left aligned at the same time? This seems like it should be easy but I'm stumped. In WPF, I'd like a TextBox that stretches to the width of it's parent, but only to a maximum width. The problem is that I want it to be left justified within its parent. To get it to stretch y...
{ "language": "en", "url": "https://stackoverflow.com/questions/280331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "104" }
Q: UpdatePanel seems to struggle with huge data as AsynPostBack. jSonSerializer maxLength doesn't help I have a ASP.NET 3.5 App and trying to update a Update Panel which has a nested custom control. In that custom control is a ComponentArt Gird, which gets filled by almost 13MB of Data (Yes, I could chunck that...) at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I use PostThreadMessage to close internet explorer from C++ I'm trying to start iexplore.exe let it run for 5 seconds and then close it again. iexplore opens just fine however it doesn't close when I call the PostThreadMessage. Can anyone see what I'm doing wrong? Here is my code: CString IEPath = "C:\\Progr...
{ "language": "en", "url": "https://stackoverflow.com/questions/280345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to convert Unicode string into a utf-8 or utf-16 string? How to convert Unicode string into a utf-8 or utf-16 string? My VS2005 project is using Unicode char set, while sqlite in cpp provide int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb /* OUT: SQLite db h...
{ "language": "en", "url": "https://stackoverflow.com/questions/280347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .NET CF Application and Out of Memory Exception I am developing a .NET CF 3.5 network game. My issue is the app loads all the resources at first instance. However upon subsequent launches, the app gives me memory out of exception while loading resources especially sounds or big images. Please guide me A: I assume y...
{ "language": "en", "url": "https://stackoverflow.com/questions/280351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php quotation strip In my webpage, I want the website to greet the user, but the username is surrounded by 'single quotations'. Since this isn't to prevent MySQL injection, i just want to remove quotes around my name on the display page. Ex: Welcome 'user'! I'm trying to find the way where i can strip the quotations...
{ "language": "en", "url": "https://stackoverflow.com/questions/280356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: *FREE* Screencasting Apps & Utilities I know there has been previous talk on here about screencasting tools/apps, however I thought I would be more specific in what I am after in the hope that it can help me and others :) I am looking at trialling some screencasts on my blog. There are numerous reasons for this (hop...
{ "language": "en", "url": "https://stackoverflow.com/questions/280362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Real life business case for using spring method replacement? Spring IoC container gives you an option of replacing a method of a bean. Can someone provide a real life example of using this feature to solve real life problem? I can see this used for adapting an old legacy code (w/o sources) to work with your app. But...
{ "language": "en", "url": "https://stackoverflow.com/questions/280363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there any way to access MSMQ public queue if not on domain? The solution is crying out for the MSMQ solution but unfortunately the posting service is not on the domain. Is there anyway to post to the public queue that is on the domain from the machine in the DMZ? I could use a webservice to post but this is a ext...
{ "language": "en", "url": "https://stackoverflow.com/questions/280367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Struts - Loading result-templates (like JSP) from JAR-Files How can I define it in the struts framework, when I would like to load templates (JSP, ZUL etc.) from different JAR-Files? A: As far as I understand there should be no additional configuration as soon as all your JARs are accessible from struts jar (usuall...
{ "language": "en", "url": "https://stackoverflow.com/questions/280374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Increment version number in advanced installer I read a little of the help for my advanced installer 6.5.1 and couldn't find a way to change the version string except by hand. A: Here is a snippet from one of our push scripts. Rob, maybe you'll find this useful too- Advanced installer provides the ability to set th...
{ "language": "en", "url": "https://stackoverflow.com/questions/280378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What could cause Vb6 run time error 430 I have a COM dll written in vb6. When I try to create a new object of a class module from this dll I get a Run timer error 430: Class does not support automation or does not support expected interface. The interesting thing is that this happens only from outside the IDE, when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: PHP by-reference parameters and default null Let's say we have a method signature like public static function explodeDn($dn, array &$keys = null, array &$vals = null, $caseFold = self::ATTR_CASEFOLD_NONE) we can easily call the method by omitting all parameters after $dn: $dn=Zend_Ldap_Dn::explodeDn('CN=Alice ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do you find out the caller function in JavaScript? function main() { Hello(); } function Hello() { // How do you find out the caller function is 'main'? } Is there a way to find out the call stack? A: I usually use (new Error()).stack in Chrome. The nice thing is that this also gives you the line number...
{ "language": "en", "url": "https://stackoverflow.com/questions/280389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1020" }
Q: Obtaining my custom error message from SQL 2000 sp I have an sp with the following pseudo code... BEGIN TRANSACTION set @errorLocation='Deleting Permissions' DELETE [tblUsrPermissions] WHERE lngUserID = @lngUserID if @@error>0 begin ...
{ "language": "en", "url": "https://stackoverflow.com/questions/280399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I architecture the data transfer between CSV and SQL? I'm building a series of SSIS packages which will be designed to do the following: 1.) import a few thousand rows from a CSV file into a series of SQL 2005 tables 2.) export a few thousand rows into a series of CSV files I've a few concerns before I dive i...
{ "language": "en", "url": "https://stackoverflow.com/questions/280403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }