text
string
meta
dict
Q: most efficient character counting algorithm? Let's say you want to count the occurances of chars in some text. The fastest way i could think of was to use an array like unsigned char charcounts[256], initialize it to zeros, then look at each char in the text input and do charcounts[c]++. then linear search charcount...
{ "language": "en", "url": "https://stackoverflow.com/questions/190544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What's the Difference Between func(int &param) and func(int *param)? In the following code, both amp_swap() and star_swap() seems to be doing the same thing. So why will someone prefer to use one over the other? Which one is the preferred notation and why? Or is it just a matter of taste? #include <iostream> using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Java: Threading Techniques & Concepts When using threads I sometimes visualise them as weaving together 3 or more dimensional interconnections between Objects in a Spatial context. This isn't a general use case scenario, but for what I do it is a useful way to think about it. Are there any APIs which you use which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: jQuery animate backgroundColor I am trying to animate a change in backgroundColor using jQuery on mouseover. I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error. The element I am working with is a div. $...
{ "language": "en", "url": "https://stackoverflow.com/questions/190560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "336" }
Q: How can I pull artifacts from TeamCity? I would like to pull artifacts from teamcity. I've been trying to use c# and the HtmlAgilityPack to goto the website and find the latest version and its artifacts. I'm currently stuck at the login, I think I just need to be sending Session Cookies out. Am I going in the right ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Does Ruby have a built-in do ... while? Ruby has a wealth of conditional constructs, including if/unless, while/until etc. The while block from C: while (condition) { ... } can be directly translated to Ruby: while condition ... end However, I can't seem to find a built-in equivalent in Ruby for a C-like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Page Lifecycle - Using FindControl to reference a control created programmatically during page load I'm creating some text boxes on my form programmatically which I need to reference later using FindControl. I've put the FindControl instruction in the page load method after the code which creates them but get an err...
{ "language": "en", "url": "https://stackoverflow.com/questions/190593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Deploying binary gems to a different platform I have a Rails app that I need to deploy. Here are the facts: * *The app was developed on Windows and requires Windows binary gems *The app is to be deployed onto an Open Solaris shared server (Joyent) *I do not have permissions to install gems on the server *For t...
{ "language": "en", "url": "https://stackoverflow.com/questions/190594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Drag and drop in winapi I have a pure Winapi application that needs a few new features. One of them would best be implemented as two lists where you can drag-and-drop (multiple) elements between the lists. The new feature can be limited to a single dialog. What would be the quickest way to implement this? A few idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/190596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to go about mocking a class with final methods? Say I have class A with class A { final String foo() { // .. computing result, contacting database, whatever .. return "some computed value"; } // ... and a bazillion other methods, some of them final. } Now I have class B with class B { String met...
{ "language": "en", "url": "https://stackoverflow.com/questions/190597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there a way to see if a character is using 1 or 2 bytes in Delphi 2009? Delphi 2009 has changed its string type to use 2 bytes to represent a character, which allows support for unicode char sets. Now when you get sizeof(string) you get length(String) * sizeof(char) . Sizeof(char) currently being 2. What I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/190598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Guidelines for asp.net website loading estimation? I wonder if there is any good guideline for system administrators to calculate the resources needed to host an ASP.NET website? I want to do some estimates on the processing power needed so I know what kind of VPS/Cloud I need to get. A: Load testing will be your b...
{ "language": "en", "url": "https://stackoverflow.com/questions/190609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Initialise A Variable With The Output Of A Stored Procedure In MS SQL Server I have created the following stored procedure.. CREATE PROCEDURE [dbo].[UDSPRBHPRIMBUSTYPESTARTUP] ( @CODE CHAR(5) , @DESC VARCHAR(255) OUTPUT ) AS DECLARE @SERVERNAME nvarchar(30) DECLARE @DBASE nvarchar(30) DECLARE @SQL nvarchar(2000)...
{ "language": "en", "url": "https://stackoverflow.com/questions/190625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the easiest way to parse an INI file in Java? I am writing a drop-in replacement for a legacy application in Java. One of the requirements is that the ini files that the older application used have to be read as-is into the new Java Application. The format of this ini files is the common windows style, wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/190629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "110" }
Q: Hide/Disable TitleBar Mozilla FireFox using Javascript How to disable the Minimize button of FireFox Browser or How to hide titlebar of FireFox Browser. I am using Window.Open to Open Window in fullscreen Mode using javascript A: I am afraid this is impossible to do, and rightly so. I would be pretty annoyed if a w...
{ "language": "en", "url": "https://stackoverflow.com/questions/190641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP Script crashes IE6 The code below crashes IE6 for some reason. Much as IE is god-awful, i have never seen this before. Does anyone have any ideas? <div id="edit"> <?php $a = $_POST['category']; if ($a == "") { $a = $_GET['category']; } $result = mysql_query("SELECT * FROM media WHERE related_page_id = $a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Has anyone used (or considered using) Sql Server Compact Edition? I've been preparing to deliver a presentation on SQL Server Compact Edition 3.5 (SP1 - recently released) and I was wondering if anyone had designed (or contemplated designing) a system with SQL Server CE 3.5 (or earlier versions)? In particular, has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How should I configure Jetty 7 pre3 to use oracle JDBC source? All stuff is running under Windows XP Pro SP2/32-bit. I have downloaded Jetty 7 pre3 from http://dist.codehaus.org/jetty/jetty-7.0.0-prereleases/jetty-7.0.0pre3/jetty-assembly-7.0.0pre3.zip>dist.codehaus.org. I have extracted jetty to C:\jetty-7.0.0pre3\...
{ "language": "en", "url": "https://stackoverflow.com/questions/190644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Has anyone managed to build any applications with the LinkedIn API? LinkedIn are very cautious of applications using their APIs. I have tried and failed to get access to them. Has anyone actually built any real applications with them yet? If yes, what strategy did you employ to get access to their API? BTW I am ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: LINQ to SQL and Concurrency Issues We are trying to build a High-Volume Orders Record System. There are three primary tables: 1. Orders 2. OrderDetails 3. OrderShipment The Shipment table contains n record per order and any record shipment entry can be changed before the Customer accepts th order, after which it is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Need only some rows in a CListCtrl control to have check boxes I'm using a CListCtrl control to display information in my MFC app. At the moment I have LVS_EX_CHECKBOXES set in SetExtendedStyle so all rows in the control have a checkbox next to them. What I would like however is that only some of the rows in the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/190667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Read colors of image with Python (GAE) How can I read the colors of an image with python using google app engine? Example: I like to build a function to determine the most striking colors of an image to set a harmonic background color for it. A: The Images API does not (currently) contain pixel-level functions. To ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When is loop unwinding effective? Loop unwinding is a common way to help the compiler to optimize performance. I was wondering if and to what extent the performance gain is affected by what is in the body of the loop: * *number of statements *number of function calls *use of complex data types, virtual methods,...
{ "language": "en", "url": "https://stackoverflow.com/questions/190681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to use Process Monitor to Resolve an UnauthorizedAccessException I'm trying to write a log file from an ASP.NET application under IIS7, but keep getting the following exception: UnauthorizedAccessException "Access to the path 'C:\Users\Brady\Exports' is denied." I've been advised to use Process Monitor to help ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to maintain a customer's account balance Is it better to have a field in the database that stores the customers account balance or use views and queries to generate the information. A: For performance, I'd say both. Keep a log of all the transactions (in a separate table) but maintain a field in the custom...
{ "language": "en", "url": "https://stackoverflow.com/questions/190687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: is_a? and dRuby objects I'm working with dRuby and basicly I'm calling a remote method that returns me an object. In the clientside I have this code: handle_error(response) if response.is_a?(Error) where response is the DRbObject. (I've developed this code before using dRuby and I'm returning an Error object if som...
{ "language": "en", "url": "https://stackoverflow.com/questions/190691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Oracle - How does transaction, rollback segment and the undo_retention parameter work? I'm no DBA, and I'm having a bit of a hard time understanding Oracle's transaction management process. From what I understood by reading some reliable-looking pages on the Internet (most notably this AskTom note -- but don't bothe...
{ "language": "en", "url": "https://stackoverflow.com/questions/190693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Creating your own Tinyurl style uid I'm writing a small article on humanly readable alternatives to Guids/UIDs, for example those used on TinyURL for the url hashes (which are often printed in magazines, so need to be short). The simple uid I'm generating is - 6 characters: either a lowercase letter (a-z) or 0-9. "...
{ "language": "en", "url": "https://stackoverflow.com/questions/190701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: MySQL: Select N rows, but with only unique values in one column Given this data set: ID Name City Birthyear 1 Egon Spengler New York 1957 2 Mac Taylor New York 1955 3 Sarah Connor Los Angeles 1959 4 Jean-Luc Picard La Barre 2305 5 Ellen Ripley No...
{ "language": "en", "url": "https://stackoverflow.com/questions/190702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Do I need to worry about the String Constant Pool? I have a Java application that's very String-heavy - it takes a feed of huge numbers of big, different String objects. Do I need to worry about the String Constant Pool for memory and performance? Is there any way to see how big the pool is at any point? A: As Mari...
{ "language": "en", "url": "https://stackoverflow.com/questions/190714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Stack memory read With the following piece of code: typedef struct { char fileName[ 1024]; time_t deleteTime; } file_item_t; .... .... setEntry(char *fileName) { file_item_t file; memset( &file, 0x00, sizeof( file_item_t )); memcpy( file.fileName, fileName, sizeof...
{ "language": "en", "url": "https://stackoverflow.com/questions/190738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting ruby hash .default to a list I thought I understood what the default method does to a hash... Give a default value for a key if it doesn't exist: irb(main):001:0> a = {} => {} irb(main):002:0> a.default = 4 => 4 irb(main):003:0> a[8] => 4 irb(main):004:0> a[9] += 1 => 5 irb(main):005:0> a => {9=>5} All goo...
{ "language": "en", "url": "https://stackoverflow.com/questions/190740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Why can't I put a variable declaration in the test portion of a while loop? You can, obviously, put a variable declaration in a for loop: for (int i = 0; ... and I've noticed that you can do the same thing in if and switch statements as well: if ((int i = f()) != 0) ... switch (int ch = stream.get()) ... But when...
{ "language": "en", "url": "https://stackoverflow.com/questions/190748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Initialized event of WPF UserControl not firing I've got a very simple WPF UserControl that looks like this: namespace MyUserControl { /// <summary> /// Interaction logic for UserControl1.xaml /// </summary> public partial class UserControl1 : UserControl { public UserControl1() { InitializeC...
{ "language": "en", "url": "https://stackoverflow.com/questions/190749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's the best way to document Perl code? Any suggestion how I can document my Perl code? What do you use and what tools are available to help me? Which module do you use to convert pod to html? A: Which module do you use to convert pod to html? Check out Pod::ProjectDocs - you get a simple command-line utilit...
{ "language": "en", "url": "https://stackoverflow.com/questions/190755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Can PHP detect if its run from a cron job or from the command line? I'm looking for way to PHP to detect if a script was run from a manual invocation on a shell (me logging in and running it), or if it was run from the crontab entry. I have various maintenance type scripts written in php that i have set to run in my...
{ "language": "en", "url": "https://stackoverflow.com/questions/190759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: How secure is sending sensitive data over https? Is SSL secure enough for using sensitive data (like password) in query string? Is there any extra options to implement? A: SSL is secure, but remember that any encryption can be broken if given enough time and resources. Given that you don't know which packets conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/190771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Rebinding Report to new XML XSD I cannot for the life of me find an example of what I need. I have a report that is bound by xsd. How can I take this report in c#, and set the datasource to a new xml file? Every possible way that I've tried just throws me a nice logon screen. I know the files exists in the places th...
{ "language": "en", "url": "https://stackoverflow.com/questions/190772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Stemming algorithm that produces real words I need to take a paragraph of text and extract from it a list of "tags". Most of this is quite straight forward. However I need some help now stemming the resulting word list to avoid duplicates. Example: Community / Communities I've used an implementation of Porter Stemm...
{ "language": "en", "url": "https://stackoverflow.com/questions/190775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How To have Dynamic SQL in MySQL Stored Procedure How do you build and use dynamic sql in a MySQL stored procedure? A: I don't believe MySQL supports dynamic sql. You can do "prepared" statements which is similar, but different. Here is an example: mysql> PREPARE stmt FROM -> 'select count(*) -> from inf...
{ "language": "en", "url": "https://stackoverflow.com/questions/190776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: make bad code good I got myself reading a article regarding changing the existing bad code into a good one. For reference, this is the link to the article http://www.javaworld.com/jw-03-2001/jw-0323-badcode.html?page=1 It broadly talked about the following * *Add comments *Re-Factoring Code * *Break large cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/190781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Newely explained concepts in .net Framework 3.5 We have developed our website(Business users website) in .net Framework 2.0 Our client us to migrate to .net Framework 3.5. I am not interested in developing the same thing in both the frameworks. Please anyone tell me some of the new features like card space, work f...
{ "language": "en", "url": "https://stackoverflow.com/questions/190803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does one go about developer scalability and code-reuse in Flash? I've so far dabbled in Flash doing 1-man shows for quite some time, but have never done any big projects with it, where actually source management and code-reuse was truly necessary. However I'm considering Flash for a new project, but this time ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/190805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: "read lock failed" at cvs annotate I am trying to use cvs annotate. This is the what I run: cvs -d /mycvs/cvsroot/ annotate "projects/dg/SomeClass.java" However, I get the following error: cvs annotate: failed to create lock directory for `/mycvs/cvsroot/projects/dg^M' (/mycvs/cvsroot/projects/dg^M/#cvs.lock): No s...
{ "language": "en", "url": "https://stackoverflow.com/questions/190809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DBUnit Data Export Does anyone know if dbunit has the power to export specific data from multiple tables at once based on a sql statement, as can be done by using dbunit's QueryDataSet class to export data from a single table based on a sql statement, as can been seen here. James A: http://jailer.sourceforge.net/ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting the Bound Field Name at Run Time in ASP.NET If I have a control, within a FormView, that is bound using a <% #Bind(...)%> expression. At run time, is there any way of retrieving the name of the field the control is bound to. To be clear, if the expression is <% #Bind("UserName") %> I want to return the stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/190816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why can I select aliases but not symbolic links in NSOpenPanel? I want to create an NSOpenPanel that can select any kind of file, so I do this NSOpenPanel* panel = [NSOpenPanel openPanel]; if([panel runModalForTypes:nil] == NSOKButton) { // process files here } which lets me select all files except symbolic...
{ "language": "en", "url": "https://stackoverflow.com/questions/190818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flash Standard Libraries? For a new project with Flash I was looking for something along the lines of standard libraries for basic programming needs, along the lines of Python or Ruby standard libraries. But the only thing I found was a dead project on Sourceforge. Thus is there no standard library for flash? Does e...
{ "language": "en", "url": "https://stackoverflow.com/questions/190819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# controls in a MFC Application I am responsible for the User Interface of an application written completely in Visual C++ using MFC and some third-part controls. I would like to use C# (WinForms or even better WPF) to improve the application look&feel. I would like some advices about how to do it. Links, articles...
{ "language": "en", "url": "https://stackoverflow.com/questions/190830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to add to the available parameters of a request (HttpServletRequest) I want to intercept a request in a filter/servlet and add a few parameters to it. However, the request does not expose a 'setParameter' method and the parameter map when manipulated throws an error saying it is locked. Is there an al...
{ "language": "en", "url": "https://stackoverflow.com/questions/190833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What JDBC tools do you use for synchronization of data sources? I'm hoping to find out what tools folks use to synchronize data between databases. I'm looking for a JDBC solution that can be used as a command-line tool. There used to be a tool called Sync4J that used the SyncML framework but this seems to have falle...
{ "language": "en", "url": "https://stackoverflow.com/questions/190838", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I convert my current page to pdf after some content dynamically added via AJAX? I have found some libraries or web services in PHP that does the job. The problem is that the conversion is done when the page is fully loaded, I would like to convert the page to PDF after some content dynamically added via AJAX...
{ "language": "en", "url": "https://stackoverflow.com/questions/190840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I get file extensions with JavaScript? See code: var file1 = "50.xsl"; var file2 = "30.doc"; getFileExtension(file1); //returns xsl getFileExtension(file2); //returns doc function getFileExtension(filename) { /*TODO*/ } A: var parts = filename.split('.'); return parts[parts.length-1]; A: function f...
{ "language": "en", "url": "https://stackoverflow.com/questions/190852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "696" }
Q: Good book/resource to learn "effective" template programming in C++? I saw Scott Meyers' "Effective C++" third edition book having a small section on "Template Programming". Any other book/links containing information on "effective" usage of templates ? A: Vandevoorde / Josuttis 'C++ Templates the Complete Guide' i...
{ "language": "en", "url": "https://stackoverflow.com/questions/190854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Multiple viewports of the same DisplayObject Is it possible to have multiple view of the same display object? (e.g. same-computer multi-player game using split screen) The sample code that failed to work follows: var content: Sprite = new Sprite(); var v1: Sprite = new Sprite(); var v2: Sprite = new Spri...
{ "language": "en", "url": "https://stackoverflow.com/questions/190867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: On Qt widgets like DoubleSpinBox or ComboBox, how do i have custom right click menu I have a few combo-boxes and double spin boxes on my Qt Dialog. Now I need a "ResetToDefault" item on a menu that comes up when you right click on the widget (spin box or combo box). How do i get it. Is there some way I can have a c...
{ "language": "en", "url": "https://stackoverflow.com/questions/190876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Order of tags in does it matter at all what order the <link> or <script> or <meta> tags are in in the <head></head>? (daft question but one of those things i've never given any thought to until now.) A: One important thing to note: if you're using the Internet Explorer meta X-UA-Compatible tag to switch rendering ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: How can I disable the UITableView selection? When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing? A: To sum up what I believe are the correct answers based on my own experience in implementing this: If you want to disable selection f...
{ "language": "en", "url": "https://stackoverflow.com/questions/190908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1263" }
Q: How to generate ASP.NET page every time when using master pages? I'm moving an old VBScript web site over to ASP.NET, so I'm starting to use master pages instead of #includeing lots of other files with server side VBScript in them. How can I stop the pages (as in the ones that are based on master pages) from being ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: /etc/motd printing twice on Gentoo Linux I've run into a problem where I'm getting two printouts of my /etc/motd file on Gentoo Linux. sshd is doing one of the printouts, and I can toggle that by configuring /etc/ssh/sshd_config, but I can't find out who's printing the second copy. I can't disable sshd from printi...
{ "language": "en", "url": "https://stackoverflow.com/questions/190912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to change the backcolor of a row in a DataGridView based on the value of a cell? I have a DataGridView which shows the content of a DataTable. I want to set the backcolor of a row based on the value of a cell in this row. Note that the cell in question is in a column which is not displayed in the DataGridView (V...
{ "language": "en", "url": "https://stackoverflow.com/questions/190914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using tables in UDF's in Excel 2007 I am writing a UDF for Excel 2007 which I want to pass a table to, and then reference parts of that table in the UDF. So, for instance my table called "Stock" may look something like this: Name            Cost            Items in Stock Teddy Bear    £10              10 Lollipops ...
{ "language": "en", "url": "https://stackoverflow.com/questions/190915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How is 'from/where/select' keywords impemented under the hood in LINQ and C#? When I type 'from' (in a LINQ query) after importing System.Linq namespace, it is understood as a keyword. How does this magic happen? Is 'from' a extension method on some type? A: In practice, yes - LINQ keywords map to extension methods...
{ "language": "en", "url": "https://stackoverflow.com/questions/190936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Screen glint effect in WPF or Silverlight I'm looking for a way to create an "it will look cool" effect for a full screen WPF application I'm working on - a "screen glint" effect that animates or moves across the whole screen to give off a shiny display experience. I'm thinking of creating a large rectangle with a h...
{ "language": "en", "url": "https://stackoverflow.com/questions/190937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: T4 Template directory missing on build server I've just set up a new build server with the Windows 2008 .NET 3.5 SDK, and for some reason it hasn't installed c:\Program Files\Common Files\Microsoft Shared\TextTemplating so I can't run t4 templates on it. I had a look at the install options in add/remove programs and...
{ "language": "en", "url": "https://stackoverflow.com/questions/190940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Industry experience with WYSIWYG editors Just wanted to get an idea for ways (web) developers get round the short fall of (most) WYSIWYG editors, whereby the users that are editing the text aren't always HTML literate enough to produce good/great results. In the past we have resigned ourselves to either locking down...
{ "language": "en", "url": "https://stackoverflow.com/questions/190956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows authentication problems using asp.net I have an asp.net application that should access data from two SQL Servers. One of the SQL Servers is present on the same machine as IIS (let us call it SQLSERVER1) whereas the other SQL server is present on another machine (SQLSERVER2). The connection strings are truste...
{ "language": "en", "url": "https://stackoverflow.com/questions/190961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I access the keychain on the iPhone? This question discusses encrypting data on the iPhone using the crypt() function. As an alternative, is there a keychain on the iPhone and if so, what code would I use to access it in order to store login details and then retrieve them for us in an application? A: I really l...
{ "language": "en", "url": "https://stackoverflow.com/questions/190963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Getting the pattern back from a compiled re? Assume I have created a compiled re: x = re.compile('^\d+$') Is there a way to extract the pattern string (^\d+$) back from the x? A: You can get it back with x.pattern from the Python documentation on Regular Expression Objects
{ "language": "en", "url": "https://stackoverflow.com/questions/190967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How do I set the character set using XMLHttp Object for a POST in classic ASP? I have to use the XMLHttp object in classic ASP in order to send some data to another server via HTTP from server to server: sURL = SOME_URL Set oXHttp = Server.CreateObject("Msxml2.XMLHTTP") oXHttp.open "POST", sURL, false oXHttp.setR...
{ "language": "en", "url": "https://stackoverflow.com/questions/190988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using maven2 to build autotools-based C/C++ package I am working on a collection MATLAB, Java, and C/C++ components that all inter-operate, but have distinctly different compilation/installation steps. We currently don't compile anything for MATLAB, use maven2 for our Java build and unit tests, and use autotools fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/190996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to add SVG images to a web page through CSS? I just started experimenting with SVG in web pages, and I discovered that it is only possible to add SVG images into HTML using <object /> tags, not <img /> like I would have expected. Most of the time, I add graphics to web pages through CSS because they a...
{ "language": "en", "url": "https://stackoverflow.com/questions/190999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I customise the browser's output for print/print preview? I'm trying to dynamically hide certain DIV's when a print (or print preview) occurs from the browser. I can easily differentiate statically by having two style sheets, one for normal and one for print media: But I need to go one step further and hid...
{ "language": "en", "url": "https://stackoverflow.com/questions/191004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to get a complete list of object's methods and attributes? dir(re.compile(pattern)) does not return pattern as one of the lists's elements. Namely it returns: ['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn'] According to the manual, it is supposed to co...
{ "language": "en", "url": "https://stackoverflow.com/questions/191010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "249" }
Q: Can anonymous class implement interface? Is it possible to have an anonymous type implement an interface? I've got a piece of code that I would like to work, but don't know how to do this. I've had a couple of answers that either say no, or create a class that implements the interface construct new instances of that...
{ "language": "en", "url": "https://stackoverflow.com/questions/191013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "507" }
Q: QDockWidget initial width How do I set the initial width of a QDockWidget? I have implemented the sizeHint function but what next? A: If you want it to have the same width as the same last time the program was running, you should look into settings. The Qt 4.4 documentation has an example on how to use settings her...
{ "language": "en", "url": "https://stackoverflow.com/questions/191020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How does Windows actually detect LAN (proxy) settings when using Automatic Configuration When Windows Internet Properties -> Connections -> LAN Settings -> Automatic Configuration is set to "Automatically detect settings" how does Windows actually determine/discover what the settings are? Is it a network broadcast o...
{ "language": "en", "url": "https://stackoverflow.com/questions/191023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: How to integrate telecommuters in an agile process? I'm sure that all of us have had to deal with telecommuters at some point in time, and I'm facing a situation now where my new project will have a "core" group of office workers and some off-site telecommuters. Not wanting to repeat past mistakes, I'd really like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: When could or should I use chmod g+s on a file or directory? In deploying to a new (Solaris 9) environment recently, one of the steps was to copy a set of files and directories to their new location and then to apply the group UID bit (using "chmod -R g+s") to all files in the directory tree giving a mode of -rwxr-s...
{ "language": "en", "url": "https://stackoverflow.com/questions/191039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How to get started creating CSS for given (dynamically generated) HTML? The Separation of Layout and Content is the domain of CSS and HTML - so far well understood. Now about separating... I'm looking for hints and Best Practices to get started with the task of providing a "skin" or "theme" for a content management ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the basic minimum set of Code Analysis rules that you would recommend? What are the basic minimum set of Code Analysis rules that you would recommend for a 200K LOC solution? We're using unit testing but code analysis has been turned off. Ideally all rules would be turned on by default but I'd like to do t...
{ "language": "en", "url": "https://stackoverflow.com/questions/191054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inhibit a checkbox from changing when clicking it I want a checkbox on a web page. When I click it, it sends an ajax request to the server. When the server replies, I want the checkbox to change. I can fix everything except the fact that the checkbox immediately changes state when clicked. A: Are you sure you real...
{ "language": "en", "url": "https://stackoverflow.com/questions/191056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Architecture Tips: Business Logic / Data Access We plan to redesign, improve our (C#) application architecture. Anyone has some framework, hompage or book recommendations? Mainly concerning the business logic. A: Maybe look at CSLA.NET? Its a framework that really builds around business objects. Buy the book and r...
{ "language": "en", "url": "https://stackoverflow.com/questions/191057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python Webframework Confusion Could someone please explain to me how the current python webframworks fit together? The three I've heard of are CherryPy, TurboGears and Pylons. However I'm confused because TurboGears seems to use CherryPy as the 'Controller' (although isn't CherryPy a framework in in it's own right?)...
{ "language": "en", "url": "https://stackoverflow.com/questions/191062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you manage the String Translation Process? I am working on a Software Project that needs to be translated into 30 languages. This means that changing any string incurs into a relatively high cost. Additionally, translation does not happen overnight, because the translation package needs to be worked by diff...
{ "language": "en", "url": "https://stackoverflow.com/questions/191066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Built in code generation in vs.net 2008? or free via MS? What code generation tools are built-in to vs.net 2008 or are officially available via Microsoft? I know of: * *Entity Framework *sqlmetal What else is there? Ideally i'm looking for something that will generate from an existing database schema. A: How ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Matching an (easy??) regular expression using C#'s regex Ok sorry this might seem like a dumb question but I cannot figure this thing out : I am trying to parse a string and simply want to check whether it only contains the following characters : '0123456789dD+ ' I have tried many things but just can't get to figure...
{ "language": "en", "url": "https://stackoverflow.com/questions/191082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: LINQ practice exercises or puzzles? I'm still trying to learn LINQ, though it's going more smoothly now that I've started to use it daily at work. I still don't feel good at it, though. Does anyone have any challenging practice exercises or puzzles I can use as a code-kata to improve my skills? I'll leave this as co...
{ "language": "en", "url": "https://stackoverflow.com/questions/191084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: What Tools Do You Recommend To Auto-Build Your Application? As recently as several years ago, the developers actually made the builds that went to clients. This was obviously a disaster for reasons too numerous to list. Then when we started to learn the errors of our ways, we looked for a way to auto-build the enti...
{ "language": "en", "url": "https://stackoverflow.com/questions/191093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why should I create my child controls in CreateChildControls() on a CompositeControl? Ok so the obvious answer is, because the flow of a composite control demands my childcontrols to be created at a certain point in time. I got a problem i think other people must have had as well. My control is a composite "containe...
{ "language": "en", "url": "https://stackoverflow.com/questions/191125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UI Components for Windows Mobile Applications (.NET Compact Framework) Applications which run on mobile devices have special user interface requirements. I think Apple did a great job introducing innovative controls on the iPhone/iPod touch platform. Now, I have to design an application for the Windows Mobile platfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/191136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Database development organisation A question regarding a DB development project. The database already exist and is rather large (several TBs). * *What do you use for version control in DB development? *How do you control concurrent changes to the data model by different teams *What is your approach to the Unit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Entity Framework Validation I'm getting ready to start a new project and I've been researching the entity framework. My question is what is the best strategy for validating the entities? Other projects I've worked on have used attributes for most of the validation, but obviously this is not possible in the entity fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/191143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is the best way to store static unit test variables? I am currently using NUnit and testing a class library. Up until now, I have used a list of constants at the top of the test class to hold some static test variables. Is this the best way to do this, or is there a more fluent way to handle it? A: By "static ...
{ "language": "en", "url": "https://stackoverflow.com/questions/191151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: When would you use delegates in C#? What are your usage of delegates in C#? A: A slightly different use is to speed up reflection; i.e. instead of using reflection each time, you can use Delegate.CreateDelegate to create a (typed) delegate to a method (a MethodInfo), and call that delegate instead. This is then muc...
{ "language": "en", "url": "https://stackoverflow.com/questions/191153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "104" }
Q: window.onload vs What exactly is the difference between the window.onload event and the onload event of the body tag? when do I use which and how should it be done correctly? A: 'so many subjective answers to an objective question. "Unobtrusive" JavaScript is superstition like the old rule to never use gotos. Wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/191157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "243" }
Q: How do you convert VARCHAR to TIMESTAMP in MSSQL? You'd like to call a stored proc on MS SQL that has a parameter type of TIMESTAMP within T-SQL, not ADO.NET using a VARCHAR value (e.g. '0x0000000002C490C8'). What do you do? UPDATE: This is where you have a "Timestamp" value coming at you but exists only as VARCHAR....
{ "language": "en", "url": "https://stackoverflow.com/questions/191159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I extract the version and path from an SVN working copy into a nant variable? I am creating a new build process for a DotNet project which is to be held in Subversion. For each dll/exe that I compile (via Nant) I would like to include 2 additional attibutes in the dlls that are built. I already understand the...
{ "language": "en", "url": "https://stackoverflow.com/questions/191160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I find the user's fonts in my .NET application? How can I find the font that the user has set in their Windows Display Properties using C# in .NET? I want to display a form using the fonts that the user has selected. The fonts I want are those selected in the Windows Display Properties form for 3D-objects, m...
{ "language": "en", "url": "https://stackoverflow.com/questions/191179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Will a database generated from SQL Server Express work with the main version of SQL? I want to create a SQL Server Express database on my local machine and then upload it to a website that will be using the full SQL Server software - can I do this ? A: The MS SQL Express databases are completely compatible with ful...
{ "language": "en", "url": "https://stackoverflow.com/questions/191184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }