text
stringlengths
8
267k
meta
dict
Q: Dynamic creation of control for (int i = 0; i < 200; i++) { Control control = new Control(); control = new CheckBox(); Size size = control.Size; Point point = new Point(20, 22); control.Location = point; int width = size.Width...
{ "language": "en", "url": "https://stackoverflow.com/questions/433833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should one be strict on design pattern implementation? I'm currently reading, "Design Patterns:Elements of Reusable Object-Oriented Software" by Erich Gamma and others. I decided to do some small projects to see the actual result of applying design patterns to the software I write. How strict should I be on implemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/433837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Access a control inside a the LayoutTemplate of a ListView How do I access a Control in the LayoutTemplate of a ListView control? I need to get to litControlTitle and set its Text attribute. <asp:ListView ID="lv" runat="server"> <LayoutTemplate> <asp:Literal ID="litControlTitle" runat="server" /> <asp:Plac...
{ "language": "en", "url": "https://stackoverflow.com/questions/433846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: "RewriteRule ^([^/]+) index.php?id=$1" posts "index" instead entered text If I do it by typing /?id=some_text in url then index.php script works as it shuld but if I do /some_text then index.php always receives id to have value "index". At first I had RewriteRule ^([^/]+) ?id=$1 but that returned "Internal Server Er...
{ "language": "en", "url": "https://stackoverflow.com/questions/433848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Two basic C++ questions about string literals and dynamic allocation Are these two equivalent? char * aString = "This is a string."; char aString[] = "This is a string."; From my understanding, C++ stores strings by their addresses, so the pointer is getting a valid address. I assume the strings are also stored as t...
{ "language": "en", "url": "https://stackoverflow.com/questions/433850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are some common Java pitfalls/gotchas for C++ programmer? As the question says, what are some common/major issues that C++ programmers face when switching to Java? I am looking for some broad topic names or examples and day to day adjustments that engineers had to make. I can then go and do an in-depth reading ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Rails: how do you access RESTful helpers? I'm trying to work through this guide to Rails routing, but I got stuck in section 3.3: Creating a RESTful route will also make available a pile of helpers within your application and then they list some helpers like photos_url, photos_path, etc. My questions: Where can I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: What's the best way to debug Javascript on IE? What's the best way to debug Javascript on Internet Explorer? A: Depends on what tools you have available to you. If you have a copy of Visual Studio, I'd use the Visual Studio debugger. It works pretty well. You'll need to try following the instructions in that link i...
{ "language": "en", "url": "https://stackoverflow.com/questions/433869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Optimized Table structure for Tags table Consider these 3 table structures. Which will perform these queries the best. Structure 1 - TagID as int with a join table Article ------- ArticleID int Article_Tag ------------ ArticleTagID int ArticleID int TagID int Tag --- TagID int TagText varchar(50) Structure 2 - Ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/433881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why are C character literals ints instead of chars? In C++, sizeof('a') == sizeof(char) == 1. This makes intuitive sense, since 'a' is a character literal, and sizeof(char) == 1 as defined by the standard. In C however, sizeof('a') == sizeof(int). That is, it appears that C character literals are actually integers. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "115" }
Q: How to get the total numbers of rows stored in the MySQL database table? Is there a MySQL command to count the number of rows in a table, and if so, what is it? A: A nice way to get AN ESTIMATE of the number of rows can be via meta-data information in the information_schema tables. Note, this is just an ESTIMATE us...
{ "language": "en", "url": "https://stackoverflow.com/questions/433903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to link to apps on the app store I am creating a free version of my iPhone game. I want to have a button inside the free version that takes people to the paid version in the app store. If I use a standard link http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300136119&mt=8 the iPhone opens Safar...
{ "language": "en", "url": "https://stackoverflow.com/questions/433907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "757" }
Q: In SQL is there a difference between count(*) and count() Pretty self explanatory question. Is there any reason to use one or the other? A: Select count(*) selects any row, select count(field) selects rows where this field is not null. A: Count(*) counts all records, including nulls, whereas Count(fieldname) does ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Extension method not updating object passed in I recently started to learn about LINQ and came across the OrderBy extension method. This initially excited me because the syntax seemed much nicer than the Sort method that we use all over the place for Generic Lists. For example, when sorting a list of languages, we n...
{ "language": "en", "url": "https://stackoverflow.com/questions/433918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JavaScript simulate right click through code I am writing some UI tests using Selenium and i have a JavaScript Tree control, using the Dojo toolkit. I have implemented a context menu for each node of the tree using the examples that Dojo provide, but I need the Selenium test to "invoke" the right click on the tree ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Generic C# Copy Constructor What would be the best way to write a generic copy constructor function for my c# classes? They all inherit from an abstract base class so I could use reflection to map the properties, but I'm wondering if there's a better way? A: A copy constructor basically means you have a single para...
{ "language": "en", "url": "https://stackoverflow.com/questions/433926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: SQL JOIN: how would a JOIN look like if I want to get user2's information from table "users"? SELECT * FROM friends WHERE (user1 = $userid OR user2 = $userid) AND accepted = 1 how would a JOIN look like if I want to get lets say user2's information from table "users"? table friends: `id` int(11) NOT NULL auto_inc...
{ "language": "en", "url": "https://stackoverflow.com/questions/433933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mongrel hangs after several hours I'm running into a problem in a Rails application. After some hours, the application seems to start hanging, and I wasn't able to find where the problem was. There was nothing relevant in the log files, but when I tried to get the url from a browser nothing happened (like mongrel ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/433940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JFileChooser for Python? I was wondering if there is something similar to Java's JFileChooser for Python? JFileChooser is a graphical front end to choose a file. Preferably something that is already with Python. Maybe with Tkinter. A: wxPython (www.wxpython.org) provides the wx.FileDialog class which will give you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Java decimal formatting using String.format? I need to format a decimal value into a string where I always display at lease 2 decimals and at most 4. So for example "34.49596" would be "34.4959" "49.3" would be "49.30" Can this be done using the String.format command? Or is there an easier/better way to do this i...
{ "language": "en", "url": "https://stackoverflow.com/questions/433958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Protected derived class #include <iostream> using namespace std; class Base { public: Base(){cout <<"Base"<<endl;} virtual ~Base(){cout<<"~Base"<<endl;} virtual void foo(){ cout<<"foo base"<<endl;} }; class Derived: private Base { public: Derived(){cout<<"Derived"<<endl;} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: mysql select - how to retrieve a result for threaded/nested messages? I'm creating a threaded message board and I'm trying to keep it simple. There's a message table, and then a replies table that has an 'reply_id' field that can be null to indicate a top level response, or a value that indicates a threaded respons...
{ "language": "en", "url": "https://stackoverflow.com/questions/433970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Do SQL Views retain relationship information in terms of performance? Consider the tables: (-> denotes a SQL defined relationship) USER (userid, username, imageid->IMAGE.imageid) EVENT (eventid, userid->USER.userid, description) IMAGE (imageid, location) Say I have a view (let's call it vw_UserInfo) defined as the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Too Little CPU Utilization in Java Hey stackoverflow community! I'm having an issue where a highly involved algorithmic program is using TOO LITTLE cpu utilization: somewhere between 3 and 4%. It is taking very long to return results, and I believe it's just not working hard enough. Do any of you geniuses have any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/433973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is your preferred document format for documenting databases I am in the process of writing an application which, among other functionality, generates MediaWiki documentation of an MSSQL database (objects, tables, table data). My question is which document formats you prefer, or are required to produce. I have t...
{ "language": "en", "url": "https://stackoverflow.com/questions/433984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What are the POSIX cancellation points? What are the POSIX cancellation points? I'm looking for a definitive list of POSIX cancellation points. I'm asking because I have a book that says accept() and select() are cancellation points, but I've seen sites on the internet claim that they are not. Also, if Linux cancell...
{ "language": "en", "url": "https://stackoverflow.com/questions/433989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Gorm main window does not accept drag-and-drop When I try to add any widget (label, button ...) to main application Window in Gorm, the Window does not accept the widget. I try to drag and drop but nothing wants to 'stick'. When I select and left click on button widget in palette window the curson changes to '2 gree...
{ "language": "en", "url": "https://stackoverflow.com/questions/434007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: adl command line turned silent I am starting to develop a new air/html/ajax application today and for some reason my trace() output is not being printed to the console window anymore. Plus, I am also not getting any error messages printed for syntax errors or runtime errors. I tried this on a different machine and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/434008", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I list the first value from a three-way joined table query? Ugh ok I'm terrible at explaining things, so I'll just give you the quotes and links first: Problem 4b (near bottom): 4b. List the film title and the leading actor for all of 'Julie Andrews' films. movie(id, title, yr, score, votes, director) a...
{ "language": "en", "url": "https://stackoverflow.com/questions/434013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Class inheritance with Hibernate and hbm2java I am generating my domain objects from my hbm files with hbm2java and now I want them to all inherit a base class. This class will have some utility methods for dealing with listeners. It does not really need to be persisted and I am hoping that I would not have to do a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript Debugging in Visual Studio 2008 I'm trying to debug javascript code just by adding a breakpoint in VS2008, but the debugger's not stopping. Do I have to do some special setup in order to enable javascript debugging? Or does the code have to be in a separate js file? A: Did you uncheck the checkboxes in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What's the cmd/PowerShell equivalent of back tick on Bash? Redirecting command output: For example: echo "Foo `./print_5_As.rb`" would echo "Foo AAAAA" A: In PowerShell, you use $( ) to evaluate subexpressions... For example: PS C:\> "Foo $(./print_5_As.rb)" Foo AAAAA A: In CMD.EXE there is no direct equivalent....
{ "language": "en", "url": "https://stackoverflow.com/questions/434038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: C# Reading 'Zip' files with FileStream I have written a program that will etablish a network connection with a remote computer using TCPClient I am using it to transfer files in 100k chunks to a remote .net application and it inturn then writes them to the HardDrive. All file transfers work good except when it comes...
{ "language": "en", "url": "https://stackoverflow.com/questions/434039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how do you use IME? I want to make a control that handles user input, so I want to be able to handle different keyboards, and one of the ways is using IME. If you don't handle it, there is a floating window that appears when you have IME active (for example japanese writing active). I found the messages that needs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do I increase the size of data sent to ADO.Net Data Services? I have a data service that takes a byte array. I then have a web page that attempts to send a file to that data service. If the file is small (say 50kb) then everything functions as expected, however if the file is large (anything over 100kb) I get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What simple guidelines would you give your developers for writing good SQL against Oracle? I work in a group of about 25 developers. I'm responsible for coming up with the database design (tables, views, etc) and am called apon for performance tuning when necessary. There are a couple of different applications that...
{ "language": "en", "url": "https://stackoverflow.com/questions/434061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Implement sticky overlays in .NET I'm looking for a nice way to render overlays over a native Windows form not owned by myself preferably using a library available for .NET (WinForms, GTK#, ...). Precisely, I'd like to display a few labels or text boxes at a given location on the window. Device Context & System.Draw...
{ "language": "en", "url": "https://stackoverflow.com/questions/434065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Making Mac shortcuts (e.g. Cmd-C) work on linux Is there a way to map Cmd+C to Copy in linux? (instead of Ctrl+C) Would be nice if I could also have the emacs style ones, like Ctrl+B to move left by one character. A: Is there a way, on Linux/X, to map certain key combos to other key combos? In the tradition of al...
{ "language": "en", "url": "https://stackoverflow.com/questions/434083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: C library vs WinApi Many of the standard c library (fwrite, memset, malloc) functions have direct equivalents in the Windows Api (WriteFile, FillMemory/ ZeroMemory, GlobalAlloc). Apart from portability issues, what should be used, the CLIB or Windows API functions? Will the C functions call the Windows Api functions...
{ "language": "en", "url": "https://stackoverflow.com/questions/434085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Design by contract/C# 4.0/avoiding ArgumentNullException I'm terribly tired of checking all my arguments for null, and throwing ArgumenutNullExceptions when they are. As I understand it, C# 4.0 enables some design by contract constructs. Will it be possible to specify that a method will not accept null arguments in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to enable native threads support in Bigloo Scheme in OS X? I am trying to compile Bigloo Scheme from source and I cannot figure out how to enable native thread support via ./configure in OS X 10.5 (Leopard) (and I haven't read anywhere that threading is not supposed to work on this platform). I run ./configure -...
{ "language": "en", "url": "https://stackoverflow.com/questions/434089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I scan multiple log files to find which ones have a particular IP address in them? Recently there have been a few attackers trying malicious things on my server so I've decided to somewhat "track" them even though I know they won't get very far. Now, I have an entire directory containing the server logs and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mac OSX - Xcode/Leaks problem I'm new to development using Xcode, and am having trouble using the built-in Leaks Instrument. I have enabled guard malloc and put MallocStackLogging YES & MallocStackLoggingNoCompact YES in the environmental variables for the executable. Then running the process by clicking Run->Star...
{ "language": "en", "url": "https://stackoverflow.com/questions/434099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Creating C# winform simple dynamic controls private void CreateNewControl() { List<Control> list = new List<Control>(); TableLayoutPanel layout = new TableLayoutPanel(); layout.Dock = DockStyle.Fill; this.Controls.Add(layout); layout.ColumnC...
{ "language": "en", "url": "https://stackoverflow.com/questions/434108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What SDK should I use? c++ I have this program in mind that I would like to attempt and create in c++. I am not sure what SDK I should use, Here is the idea: Basically like Facebooks status' or twitter but strictly for your desktop. Window like AIM or MSN would allow you to view your friends and their current status...
{ "language": "en", "url": "https://stackoverflow.com/questions/434121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Setting Up Event Handler in Delphi 2007 and Getting "Parameter Lists Differ" Error I'm trying to write a class in Delphi 2007 that uses a ActiveX library. The class will catch an event that the ActiveX library has to expose its own event that adds some information to the ActiveX library's event. The bottom line is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CSS stripped from content embeded via Javascript into Div I have the following file file: <html> <head> <title></title> <script type="text/javascript" src="/Prototype.js"></script> <script type="text/javascript"> function load_content() { new Ajax.PeriodicalUpdater('content', '/UpdatedContent/, { method: 'p...
{ "language": "en", "url": "https://stackoverflow.com/questions/434127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find the value of a neuron in a neural network Since a lot of these sites found on google use mathematical notation and I have no idea what any of it means I want to make a feedforward neural network like this: n1 i1 n3 n2 o1 i2 n4 n3 Now can someone explain to me how to find t...
{ "language": "en", "url": "https://stackoverflow.com/questions/434128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to set more than 2 Expression in Expression.Or I want to create a query which has more than 3-4 Expression.Or ? But Expression.Or just let me to add two Expressions inside it. if (!string.IsNullOrEmpty(keyword)) query .Add(Expression.Or( Expression...
{ "language": "en", "url": "https://stackoverflow.com/questions/434138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Array of structs and new / delete I have a struct like this: class Items { private: struct item { unsigned int a, b, c; }; item* items[MAX_ITEMS]; } Say I wanted to 'delete' an item, like so: items[5] = NULL; And I created a new item on that same spot later: items[5] = new item; Would I s...
{ "language": "en", "url": "https://stackoverflow.com/questions/434140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: NSDictionary initWithContentsOfFile: messes up NSDecimalNumbers, why? In my iPhone app I employ NSDecimalNumber to store some some currency rate values. I pull the data from the web the first time the app is launched and then again when they become obsolete, and I store them in a NSDictionary; then I use writeToFile...
{ "language": "en", "url": "https://stackoverflow.com/questions/434145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use File::Find::Rule in taint mode? I am trying to get a list of subdirectories in a given directory using something like the following: #!/usr/bin/perl -wT use strict; use warnings; use File::Find::Rule; use Data::Dumper; my @subdirs = File::Find::Rule->maxdepth(1)->directory->relative->in('mydir'); pri...
{ "language": "en", "url": "https://stackoverflow.com/questions/434149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to make a side-scrolling website load quickly? I'm new to stack-overflow and programming so forgive me for any awkward phrasing! I am building a side-scrolling website which is graphic-rich, and 680x9400px in size. I will be using some javascript and/or mootools to create a cool side-scrolling e...
{ "language": "en", "url": "https://stackoverflow.com/questions/434188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using C# how should I go about extracting titles subtitles and paragraphs from a docx document Using C# how should I go about extracting titles subtitles and paragraphs from a docx document. I am thinking of doing this through VSTO but do know know the word object model. I am only familiar with the Excel object mode...
{ "language": "en", "url": "https://stackoverflow.com/questions/434203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why am I getting "Invalid Cast" when using Linq to SQL? I am a bit of a newbie when it comes to Linq to SQL but I hope you can help out. I've written the following Linq to SQL statement with Extension Methods: Cedb.ClassEvents.Where(c => c.ClassID == 1).Select(c => c).Single() Where Cedb is the Datacontext, ClassE...
{ "language": "en", "url": "https://stackoverflow.com/questions/434204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Showing generic class eg Table in xml comments in visual studio I know this maybe a basic question but I just can't seem to find the answer anywhere. I have a class like this Table<T> {} then I have some code that uses the above class that I would like to comment I would like to be able to do something like: /// <s...
{ "language": "en", "url": "https://stackoverflow.com/questions/434213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Adding SSL on a single Page in ASP.NET I want 'only' my Login page to be SSL enabled. When the user logsin using https://mysite.login.aspx, after the login the user should be taken to an http://mysite.default.aspx Please tell me step by step how to do it. A: Here's a Step by Step Guide for you! Try out this guide f...
{ "language": "en", "url": "https://stackoverflow.com/questions/434223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: deployment of winforms applications what is the best way to deploy a winforms app if you know you are going to be doing frequent releases A: Click Once is your best bet. A: Click Once is great if you know the customer base will always have access to an internet connection and they only ever need a single version i...
{ "language": "en", "url": "https://stackoverflow.com/questions/434243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to programmatically "chain" several PDF files, preferably from command line? Is there a way, in Linux, Windows, or preferably Mac OS X to take a bunch of PDF files and "chain them" into one "booklet" without owning Acrobat and preferably without doing this manually? I have TexShop, MikTex and the like...
{ "language": "en", "url": "https://stackoverflow.com/questions/434248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to reverse a Unicode string It was hinted in a comment to an answer to this question that PHP can not reverse Unicode strings. As for Unicode, it works in PHP because most apps process it as binary. Yes, PHP is 8-bit clean. Try the equivalent of this in PHP: perl -Mutf8 -e 'print scalar reverse("ほげほげ")...
{ "language": "en", "url": "https://stackoverflow.com/questions/434250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Timer doesn't "loop" Alright so here is the deal. I am trying to make a application that's a GUI application yet has no GUI. So when the application starts, it has a small form with a login screen (I have done this part). This the code for the main() in which the form runs but as soon as it is closed, I dispose of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is a Warm-Up Cache? I am working with some multicore simulators such as GEMS or M5. In all of them there is an option to "Warm up the cache". What does that term mean? A: The warm up is just the period of loading a set of data so that the cache gets populated with valid data. If you're doing performance testin...
{ "language": "en", "url": "https://stackoverflow.com/questions/434259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: IIS7 Overrides customErrors when setting Response.StatusCode? Having a weird problem here. Everybody knows that if you use web.config's customErrors section to make a custom error page, that you should set your Response.StatusCode to whatever is appropriate. For example, if I make a custom 404 page and name it 404.a...
{ "language": "en", "url": "https://stackoverflow.com/questions/434272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: Using generics and methodinfo I am building a basic profiler for an open source project. One requirement is to measure execution time of a method. While this is easy enough, I have to do it without knowing the method or its containing class until runtime. The way to invoke the profiler will be when the user will inv...
{ "language": "en", "url": "https://stackoverflow.com/questions/434276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Super Basic Templating System I'd like to be able to replace things in a file with a regular expression using the following scheme: I have an array: $data = array( 'title' => 'My Cool Title', 'content' => '' ) I also have a template (for clarity's sake, we'll assume the below is assigned to a variable $template...
{ "language": "en", "url": "https://stackoverflow.com/questions/434283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: db4o concerns I'm interested in using db4o as my persistence mechanism in my Desktop application but I'm concerned about a couple things. 1st concern: Accidentally clipping very complex object graphs. Say I have a tree with a height of 10 and I fetch the root, how does it handle me storing the root object again? Fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/434284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Terminal command to build and install the iPhone app in simulator without launching from Xcode Is there any terminal command that can be used to achieve this? I know xcodebuild install -configuration can compile our xcodeproj from terminal without launching from Xcode, however the compilation files are under iOS but...
{ "language": "en", "url": "https://stackoverflow.com/questions/434286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to iterate over a list in chunks I have a Python script which takes as input a list of integers, which I need to work with four integers at a time. Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples. Currently, I'm iterating over it this way: for i in ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/434287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "656" }
Q: Projections.RowCountInt64() returns 0 when i set SetFirstResult rowCount returns 0 when query.SetFirstResult is different from 0 ? if the result of pageIndex x pageSize = 0 // it gives me the rowCount but when it is not equal to 0, countCriteria gives me 0 instead of rowCount. What can i do ? Thanks in advance A: F...
{ "language": "en", "url": "https://stackoverflow.com/questions/434289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are there standard definitions for the terms alpha, beta and RC1 in software development? I am interested to know if the terms alpha, beta and RC1 are terms that are used throughout the software industry or just MS. What are the definitions? Malcolm A: Yes these are standard terms and have standard definitions, tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/434293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Will plug-ins such as Flash, Silverlight, etc. eventually replace XHTML/CSS/Javascript? I've been developing with XHTML, CSS and Javascript for about 4 years now. I love it a lot and hate it a little. I've looked into Flash and Silverlight a bit, but as a developer, I'm not too keen on them. One reason is that they ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MVC Model: submitting multiple objects to the View I'm not sure if there is a difference in these two methods. If so, which would be considered the better practice when submitting more than one object to the View. * *Having the controller make separate calls to the datalayer for each object model and then wrappin...
{ "language": "en", "url": "https://stackoverflow.com/questions/434312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Interoperating between Matlab and C# After peeking around the internet it looks like it is possible to interop between C# and Matlab. I am wondering if anyone has had success with it and what they did to do so. If possible somehow pulling it off without the use of COM. Thanks for your time. A: Yes, I managed to do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How can I show a spinner while loading images from Flickr? I'm using jquery.flickr-1.0.js to search flickr for images in my application. The problem i'm facing is that sometimes it takes a few seconds for flickr to respond with results and i want to load a spinning gif in place of my search button 'btnRefresh' unti...
{ "language": "en", "url": "https://stackoverflow.com/questions/434336", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: BAML obfuscation Is there any tool / commercial obfuscator that can obfuscate BAML resources in WPF controls? If not, its a tough time in terms of IP protection sicne hackers can easily peek into the BAML resource by using BAML to XAML converters. A: Herein lies the problem with .NET stuff: Claytons Open Source -- ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .Net C# regex for parsing URL parameters I need to parse a string, such as /a/b/c/d=uno/c=duo.html into three groups, such as * */a/b/c/ *d=uno/ *c=duo.html The parsing rules are: * *The first group is everything until "d=" or the whole string if "d=" is not a part of the string. *The second group is everyt...
{ "language": "en", "url": "https://stackoverflow.com/questions/434347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Comparing dictionaries in Python Given two dictionaries, d1 and d2, and an integer l, I want to find all keys k in d1 such that either d2[k]<l or k not in l. I want to output the keys and the corresponding values in d2, except if d2 does not contain the key, I want to print 0. For instance, if d1 is a: 1 b: 1 c: 1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Language with similar object use to Javascript/JSON I've been doing a project at work recently focused on an almost entirely client-driven web site. Obviously Javascript is used heavily, and I've been using jQuery on top of it which has turned out to be an absolute pleasure to work with. One of the things that has ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I have a condition comparing DateTime in C# using the < operator and it return's false even if it should not. Why? I have this code below and the "if ((DateTime)DataReader[0] > DateTime.Now)" condition returns false even if the datetime in the database is greater than the datetimenow. I used this code before and it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Monotonically increasing time in Java? In a Java application I want to be able to take a timestamp at the start of an operation and be able to periodically check how long the operation has been running. The catch is: I do not want to be impacted by the Network Time Protocol moving the clock around, or the admin chan...
{ "language": "en", "url": "https://stackoverflow.com/questions/434369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Another SQL tutorial question: Field > 0? Alright, this one (3a; sample problem with provided answer) has got me scratching my head: bbc(name, region, area, population, gdp) 3a. Find the largest country in each region: SELECT region, name, population FROM bbc x WHERE population >= ALL (SELECT population ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to store a unique URL Slug? I'm trying to generate some url 'slugs' for my website. It's based upon a single piece of user generated text. Now, i have made my own slug method, so i'm not after some code for that. What i'm wondering is where is the best place to determine if this slug is unique a...
{ "language": "en", "url": "https://stackoverflow.com/questions/434376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to have text fields fill 100% horizontally If I have a text field with SWT, how can I get the field to fill to 100% or some specified width. For example, this text field will only reach for so much horizontally. public class Tmp { public static void main (String [] args) { Display display = new Displ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why can't I edit the servlet name in web.xml? I have gotten everything working for my class in which I am using Tomcat and Eclipse to write java servlets. What I would like to know is why eclipse seems to give me problems when I try to edit the servlet-name in the web.xml file. Does eclipse not allow you to edit t...
{ "language": "en", "url": "https://stackoverflow.com/questions/434385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is Windows Authentication for WCF Enough? I am developing an application where the security requirements for data transferred and access are fairly high. As I understand, Windows authentication is the preferred method for TCP over an intranet. How do you deal with situations where Domains are not used and only simpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/434404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Installing certain packages using virtualenv So, I want to start using virtualenv this year. I like the no-site-packages option, that is nice. However I was wondering how to install certain packages into each virtualenv. For example, lets say I want to install django into each virtualenv... is this possible, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why are System.out/err implemented as Byte Streams in Java? I was having a look at this tutorial at Sun on command line I/O. It stated that: You might expect the Standard Streams to be character streams, but, for historical reasons, they are byte streams. System.out and System.err are defined as PrintStream...
{ "language": "en", "url": "https://stackoverflow.com/questions/434408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the most EVIL code you have ever seen in a production enterprise environment? What is the most evil or dangerous code fragment you have ever seen in a production environment at a company? I've never encountered production code that I would consider to be deliberately malicious and evil, so I'm quite curious...
{ "language": "en", "url": "https://stackoverflow.com/questions/434414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Is there a way to get coordinates relative to the innermost NSView when the parent is not the window? I have question about NSView: Imagine a Custom View where the mouseDown, mouseDrag and mouseUp methods are overriden so the user can drag a point (NSRect) on the screen. To drag it I need the mouse coordinates relat...
{ "language": "en", "url": "https://stackoverflow.com/questions/434424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Open a .NET WPF window or Windows Form from VBA code Can anyone give me the syntax required to call a .NET assembly from VBA code. I want to open a WPF window or Windows form from an Access form. Malcolm A: Yes I have control of the assembly I want o be able to deploy the assembly to a file share and have the VBA c...
{ "language": "en", "url": "https://stackoverflow.com/questions/434432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Predictive "blood glucose" algorithm? I'm writing an app that lets a diabetic user enter his/her "blood glucose" readings, and then charts them on a graph over time from left to right. Since the blood readings will be done only several times a day, an algorithm would be handy to: a) fill in the gaps on the graph bet...
{ "language": "en", "url": "https://stackoverflow.com/questions/434435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What have you used to test (functional/load/stress) your network service with its custom protocol? I recently created a turn-based game server that can accept 10s of thousands of simultaneous client connections (long story short - epoll on Linux). Communication is based on a simple, custom, line-based protocol. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/434438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Set App TimeZone using PInvoke .Net I have used PInvoke to change the TimeZone of my Clients System. Instead of that Iwould like to change TimeZone of my Application only. Is there a workaround for this. A: Can you simply store the timezone information in memory? You should be able to also serialize this data so t...
{ "language": "en", "url": "https://stackoverflow.com/questions/434441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Duplex Callbacks or Client-Side Threading for Responsive WCF Clients I have a certain service where specific functions will take longer to call than others, sometimes they might take seconds to return. In order to prevent the client's UI being blocked when this happens what is the preferred solution: * *Use a Dup...
{ "language": "en", "url": "https://stackoverflow.com/questions/434443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Extending XHTML I'm playing around with writing a jQuery plugin that uses an attribute to define form validation behavior (yes, I'm aware there's already a validation plugin; this is as much a learning exercise as something I'll be using). Ideally, I'd like to have something like this: Example 1 - input: <input id="...
{ "language": "en", "url": "https://stackoverflow.com/questions/434450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: displaying an image from a bitmap variable using codebehind I wish to create a very simple web app that simply displays an Image(s) from a database based upon either a date (from a calendar click event) or from a keyword search, getting the image(s) is no problem but I don't know how to display the resulting image. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/434452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to clear System.Windows.Forms.WebBrowser session data? How can I clear current session data (cookies, cached data, auth sessions, etc) without restarting the application? Update: I'm talking about WebBrowser control in Windows.Forms, not the ASP.Net session. A: To clear session (such as HttpOnly cookies), you c...
{ "language": "en", "url": "https://stackoverflow.com/questions/434469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: In LINQ to SQL, how do you pass parts of a LINQ query into a function Is it possible to pass parts of a linq Query into a function? I want create a common interface for my DAL that always uses the same query interface. For example, List<T> Get(Join j, Where w, Select s){ return currentDataContext<T>.Join...
{ "language": "en", "url": "https://stackoverflow.com/questions/434480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Flex with javascript only? Have you tried using straight javascript (rather straight ECMAscript 3 standard) in Flex applications, with none of the ECMAScript 4 enhancements? If one were to do so, would it be better to let the AS3 compiler build from the javascript, or use the javascript bridge liberally? A: I'm not...
{ "language": "en", "url": "https://stackoverflow.com/questions/434491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Serial Port (rs232) in Mono for multiple platforms I am planning on re-writing a Win32 application (native C++) in .NET - most likely using mono so I can run it on Win32, Linux and mac. The problem I am trying to solve (having only really developed for Win32) is an issue with the serial port definition. How does o...
{ "language": "en", "url": "https://stackoverflow.com/questions/434494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }