text
string
meta
dict
Q: How to highlight occurrences of a search term in text in Visual Studio? How do I make all occurrences of a phrase (search term) in a file to be highlighted in the VS code editor? A: I have just done a quick google for this very feature. Came up with these results VS 2008 http://visualstudiogallery.msdn.microsoft.co...
{ "language": "en", "url": "https://stackoverflow.com/questions/256931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: getUrl using Java Is there a way of getting the websites absolute URL (http://www.domain.com/) using Java? because I've googled a bit but I only come across with having to make 2 or 3 classes to create that function =/ Update: The thing is I am trying to create a crawler that will give me some information and among ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why doesn't dynamically generated content change the height of containing div? I am writing a footer div that displays info from the database. The footer has a different background color than the rest of the page, and will have a height that depends on how much content the database throws to it. When I generate th...
{ "language": "en", "url": "https://stackoverflow.com/questions/256938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP datepicker control and event calendar needed I'm looking for suggestions for a PHP: * *calendar control/widget that I can embed on a web page to enable users to select dates. A datepicker. *calendar software that will provide weekly calendar view, similar to what Microsoft Outlook provides. It should displ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Building a Webapp Around User-Workflow The more I think about how I use computers, the more I become convinced that 'workflow' is the key factor in terms of productivity, and the way I should go about designing interactions. I'm thinking of workflow as the way we approach and manage data, information and knowledge ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HTML 5 versus XHTML 1.0 Transitional? It seems that HTML 5 is going to be supported (partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XHTML 1.0 Transitional does not recognize. What is the behavior supposed to be if I use a new HTML 5 tag in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/256953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Shortcuts for creating/modifying web forms in PHP? I'm new to PHP and before I waste a lot of time doing things the hard way, I wanted to find out if there are shortcuts/techniques to creating PHP web forms apps. All this app will do is display web forms with data from 1 or more tables. In addition to displaying d...
{ "language": "en", "url": "https://stackoverflow.com/questions/256956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set Return Type of Stored Procedure to Auto - Generated using Entity Framework In LINQ2SQL it was possible to set the return type of a stored procedure to auto generated. I am unable to do so with the Entity Framework. I want to set the return type of a stored procdure to auto-generated with the Entity Framework. Is...
{ "language": "en", "url": "https://stackoverflow.com/questions/256962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to persist an enum using NHibernate Is there a way to persist an enum to the DB using NHibernate? That is have a table of both the code and the name of each value in the enum. I want to keep the enum without an entity, but still have a foreign key (the int representation of the enum) from all other referencing e...
{ "language": "en", "url": "https://stackoverflow.com/questions/256978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Hierarchical tagging in SQL I have a PHP web application which uses a MySQL database for object tagging, in which I've used the tag structure accepted as the answer to this SO question. I'd like to implement a tag hierarchy, where each tag can have a unique parent tag. Searches for a parent tag T would then match al...
{ "language": "en", "url": "https://stackoverflow.com/questions/256997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you round a number to two decimal places in C#? I want to do this using the Math.Round function A: This is for rounding to 2 decimal places in C#: label8.Text = valor_cuota .ToString("N2") ; In VB.NET: Imports System.Math round(label8.text,2) A: Here's some examples: decimal a = 1.994444M; Math.Round(...
{ "language": "en", "url": "https://stackoverflow.com/questions/257005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "470" }
Q: PHP class or method to decrypt the DES Encryption Are DES Encryption called "One Way Encryption" or "two way Encryption" ? Are there a PHP class or method to decrypt the DES Encryption ? A: The php crypt function is a one-way hashing function, if you want to be able to decrypt, take a look at the mcrypt extension w...
{ "language": "en", "url": "https://stackoverflow.com/questions/257015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Linq To Sql vs Entity Framework Performance I have been searching for recent performance benchmarks that compare L2S and EF and couldnt find any that tested calling stored procedures using the released version of EF. So, I ran some of my own tests and found some interesting results. Do these results look right? Shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/257016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do I create an nullary Functor in C++ (using the loki library) Writing something like this using the loki library, typedef Functor<void> BitButtonPushHandler; throws a compiler error, but this works typedef Functor<void,TYPELIST_1(Matrix3D*)> Perspective; Functor.h:530: error: '((Loki::FunctorHandler, int>*)t...
{ "language": "en", "url": "https://stackoverflow.com/questions/257030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I round a number up in PHP? I need to round any non-integers up to the nearest integer, regardless of whether the number after the decimal place is >5 or not. A: You can make use of the ceil($value) function in PHP to round up. Similarly you can make use of floor() for rounding down.
{ "language": "en", "url": "https://stackoverflow.com/questions/257032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is a good design for an extensible query interface? Our application exposes queries by way of web services, and what we've found is that our clients often want custom queries, either by way of further limiting the results returned by specifying additional criteria, or by asking for things that we don't already ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Managing the migration of breaking database changes to a database shared by old version of the same application One of my goals is to be able to deploy a new version of a web application that runs side by side the old version. The catch is that everything shares a database. A database that in the new version tends ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to divide an area composed of small squares into bigger rectangles? Where would i go to look for algorithms that take a 2d grid of values that are either 0 or 1 as input and then identifies all possible non-overlapping rectangles in it? In a more practical explanation: I am drawing a grid that is represented by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I get a particular word from a string in PHP? Say you have a string, but you don't know what it contains. And you want to replace all occurences of a particular word or part of a word with a formatted version of the same word. For example, I have a string that contains "lorem ipsum" and i want to replace the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to design multiple lookups * *The user of an application wants to assign a task to a programmer. *The "Edit Task" form is presented to the User. *A popup (actually an absolutely positioned div) window comes up with all the programmers to choose from. *The programmer is not there so the user asks for a "ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/257052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to add a specific version of a file to the git index? The reason I am asking this is that I had accidentally done a git commit -a that included a file I did not yet want to commit. My solution was to do the following: git reset --soft HEAD^ git reset -- file/with/changes_not_to_committed git commit -C...
{ "language": "en", "url": "https://stackoverflow.com/questions/257065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Microsoft Project Is Microsoft Project the best tool for managing software development or IT projects or is there an alternative that is better? A: I tend to use MSProject for capacity planning - a nice big broad brush of who could do what over a period, at a level of abstraction that makes it easy to rejig plans. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How is "20" and 20 considered equal in JavaScript? I understand that using the "===" compares type, so running the following code results in "not equal" because it's comparing a number type to a string type. var a = 20; var b = "20"; if (a === b) { alert("They are equal"); } else { alert("The...
{ "language": "en", "url": "https://stackoverflow.com/questions/257078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Javascript not running on IE I have a JavaScript snippet that runs very well on Firefox and Safari, but refuses to run on IE: var drop= function(id) { if(document.getElementById("select1").value == "Ficha de pediatria"){ top.location.href = "print.jsp?id="+id+"&type=2"; } else if(document.getElementById...
{ "language": "en", "url": "https://stackoverflow.com/questions/257085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I flush the cin buffer? How do I clear the cin buffer in C++? A: How about: cin.ignore(cin.rdbuf()->in_avail()); A: I prefer: cin.clear(); fflush(stdin); There's an example where cin.ignore just doesn't cut it, but I can't think of it at the moment. It was a while ago when I needed to use it (with Mingw)....
{ "language": "en", "url": "https://stackoverflow.com/questions/257091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "133" }
Q: Calculate mode (or frequency) distribution of a value over time in SQL Server Given the following table, how does one calculate the hourly mode, or value with the highest frequency by hour? CREATE TABLE Values ( ValueID int NOT NULL, Value int NOT NULL, LogTime datetime NOT NULL ) So far, I've come up w...
{ "language": "en", "url": "https://stackoverflow.com/questions/257093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is Visual Studio Tools for Applications part of Office 2007? The VSTO bit I understand. Visual Studio has the project templates to get you started with creating nice .NET based add-ins. But where is VSTA? I installed the SDK but it seems to be gears towards adding extensibility to your own applications. I had thoug...
{ "language": "en", "url": "https://stackoverflow.com/questions/257096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP: Can a function know if it's being assigned as a value? In other words, can fn() know that it is being used as $var = fn(); rather than as fn();? A use case would be to echo the return value in the latter case but to return it in the former. Can this be done without passing a parameter to the function to declare...
{ "language": "en", "url": "https://stackoverflow.com/questions/257102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Automatic JUnit on SVN checkin I'm using IntelliJ-Idea to write Java daemons. We use JUnit to unit test our code and want to have automated runs on check-in to subversion. Are there any tools available that can automatically run unit tests and then send reports in email and to Hobbit? A: We use Hudson as our Contin...
{ "language": "en", "url": "https://stackoverflow.com/questions/257104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do i write to the beginning of the file? C++ When I write to the beginning of the file,it always leaves the first line empty,and start writing from the second one. How can I make it write from the first line,including the first one and on? Thanks. A: If I understand your question correctly, you are creating a n...
{ "language": "en", "url": "https://stackoverflow.com/questions/257111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the performance cost of autoeventwireup? I have been looking at improving my ASP.NET page performance. Is it worth changing autoeventwireup from true to false and adding event handlers, or is the performance penalty very small? This is an ASP.NET 2.0 project. A: From MSDN article. Performance Tips and Trick...
{ "language": "en", "url": "https://stackoverflow.com/questions/257112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I get the TNMHTTP Get method to respond on a redirect I'm using TNMHTTP in Delphi to retrieve the code from a webpage. The code is relatively simple: NMHTTP1 := TNMHTTP.Create(Self); NMHTTP1.InputFileMode := FALSE; NMHTTP1.OutputFileMode := FALSE; NMHTTP1.ReportLevel := Status_Basic; NMHTTP1.TimeOut := 3000;...
{ "language": "en", "url": "https://stackoverflow.com/questions/257120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: (human) Language of a document Is there a way (a program, a library) to approximately know which language a document is written in? I have a bunch of text documents (~500K) in mixed languages to import in a i18n enabled CMS (Drupal).. I don't need perfect matches, only some guess. A: There is a pretty easy way to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/257125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Weird compile error dealing with Winnt.h When trying to compile a file that include winnt.h via windows.h, I get the following error: MyGl.cpp ..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2988: unrecognizable template declaration/definition ..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : erro...
{ "language": "en", "url": "https://stackoverflow.com/questions/257134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: User ownership of personal information At the moment it seems that most webapps store their user-data centrally. I would like to see a movement towards giving the user total access and ownership of their own personal information and data; ultimately allowing the user to choose where their data is stored. As an exa...
{ "language": "en", "url": "https://stackoverflow.com/questions/257144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Bit Operators to append two unsigned char in C++ If I have two things which are hex, can I someone how append their binary together to get a value? In C++, say I have unsigned char t = 0xc2; // 11000010 unsigned char q = 0xa3; // 10100011 What I want is somehow, 1100001010100011, is this possible using bit-wise o...
{ "language": "en", "url": "https://stackoverflow.com/questions/257152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ruby on Rails XML generation I am attempting to build a simple method that creates an XML file from a database in ruby on rails. I feel like my code is right but I am not seeing all of the users in the XML. I am a complete newbie to RoR. Here's my code: def create_file @users = User.find(:all) file = File.n...
{ "language": "en", "url": "https://stackoverflow.com/questions/257157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Change journal operations in .NET? I'm looking for the .NET/C# way of performing Change Journal Operations (without importing unmanaged code). Any hints or RTM-links? A: This looks promising (and in C#): http://mchangejournal.codeplex.com/ You have to download the Source code as there are no official Releases. I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/257170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What would be the best approach to designing a highly available pool of web services? I've heard a lot of people touting success using Linux based proxies to handle routing for high availability of web applications, but what are others doing with web services? I have a bank of WCF services that need to be moved to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/257189", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MySQL: get differences of each sorted column in set of rows Here is a simple scenario with table characters: CharacterName GameTime Gold Live Foo 10 100 3 Foo 20 100 2 Foo 30 95 2 How do I get this output for the query SELECT Gold, Live FROM characters WHERE name = 'Foo' ORDER BY GameTime: Gold Live 100 3 0 -1 -5...
{ "language": "en", "url": "https://stackoverflow.com/questions/257190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I highlight a selection made programmatically in a Winforms TextBox I've not gone into much research here, but the intuitive thing is not working: private void SerachButton1_Click(object sender, EventArgs e) { String serchTerm = searchTerm1.Text; String text = usualTextBox.Text; Int32 index = text....
{ "language": "en", "url": "https://stackoverflow.com/questions/257209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why does adding a project reference break my build? solution structure [Plain Winforms + VS 2008 Express Edition] * *CoffeeMakerInterface (NS CoffeeMaker) *CoffeeMakerSoftware (NS CoffeeMakerSoftware) *TestCoffeeMaker (NS TestCoffeeMaker) CoffeeMakerSoftware proj references CoffeeMakerInterface. TestCoffeeMak...
{ "language": "en", "url": "https://stackoverflow.com/questions/257220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Asp.net multilingual web application - localization What's your opinion for the best possible way to build asp.net multilingual localized web application (only UI localization of string resources). Especially this two things: * *How to store resources? Xml files, resx files or something else? *How to handle URL'...
{ "language": "en", "url": "https://stackoverflow.com/questions/257221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Writing an input integer into a cell I am writing a quick application myself - first project, however I am trying to find the VBA code for writing the result of an input string to a named cell in Excel. For example, a input box asks the question "Which job number would you like to add to the list?"... the user would...
{ "language": "en", "url": "https://stackoverflow.com/questions/257229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Howto: Taking photos in windows mobile without CameraCaptureDialog? I want to create a windows mobile app (windows mobile 5.0 and above, using CompactFramework [in SharpDevelop]) to capture photos automatically, without user involvement (like it would be with CameraCaptureDialog). After going through google searches...
{ "language": "en", "url": "https://stackoverflow.com/questions/257232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the simplest jQuery way to have a 'position:fixed' (always at top) div? I'm relatively new to jQuery, but so far what I've seen I like. What I want is for a div (or any element) to be across the top of the page as if "position: fixed" worked in every browser. I do not want something complicated. I do not wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/257250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Eclipse Shortcut to Split Long Strings I swear I've seen someone do this, but I can't find it in the various lists of shortcuts. Given: String s = "A very long ............................ String"; Is there an Eclipse shortcut to turn it into: String s = "A very long ............................ " + "String"; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Generic way to fill out a form in javascript I'm looking for a really generic way to "fill out" a form based on a parameter string using javascript. for example, if i have this form: <form id="someform"> <select name="option1"> <option value="1">1</option> <option value="2">2</option> </select> <select...
{ "language": "en", "url": "https://stackoverflow.com/questions/257255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: New approach for adding a new Node to a Linked List void addNewNode (struct node *head, int n) { struct node* temp = (struct node*) malloc(sizeof(struct node)); temp -> data = n; temp -> link = head; head = temp; } The code give above is the popularly wrong version of a function for adding a new nod...
{ "language": "en", "url": "https://stackoverflow.com/questions/257259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How should I handle Session timeouts when using AJAX Web controls on an Aspx page? The following is a question I asked on my blog a few months back but I still haven't got a proper answer to. Then a couple of days ago I was asked if I had the answer so I decided to copy the question in here where it will get a much ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: No SDL Keypress events being detected I am completely stumped as to why this code does not get any SDL keypress events. The other SDL events (removed for clarity) work fine. It does not work on my XP or Vista machines. No compile/link errors, just never recieve a keydown event. #include "SDL/SDL.h" // Yes SDL.lib...
{ "language": "en", "url": "https://stackoverflow.com/questions/257275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Comparing Char which holds hex values C++ in C++ I have two chars holding hex values e.g.: char t = 0x4; char q = 0x4; How would i compare if the two values held in the char are the same?? I tried if (t == q) // should give me true but no, any help, thanks! A: A char is just an 8-bit integer. It doesn't matter ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Templated check for the existence of a class member function? Is it possible to write a template that changes behavior depending on if a certain member function is defined on a class? Here's a simple example of what I would want to write: template<class T> std::string optionalToString(T* obj) { if (FUNCTION_EXIS...
{ "language": "en", "url": "https://stackoverflow.com/questions/257288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "613" }
Q: Which rule from FxCop do you deactivate? I personally don't use FxCop yet. We want to work out the unit testing first before going with code analysis. However, which rules would you permanantly deactivate? Which rules would you deactivate temporarily and in which situation? A: I dislike rule CA1021: Avoid out param...
{ "language": "en", "url": "https://stackoverflow.com/questions/257301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I disable an individual item in a combo box in Flex so that it is not clickable? I want to create a combobox in flex which will take three values, Available, Unavailable, and Busy. The constraint is, I should not allow user to go directly from Unavailable to Busy. So when a User is selected Unavailable, I sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/257319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Oracle: how to add minutes to a timestamp? I need to add 30 minutes to values in a Oracle date column. I do this in my SELECT statement by specifying to_char(date_and_time + (.000694 * 31) which works fine most of the time. But not when the time is on the AM/PM border. For example, adding 30 minutes to 12:30 [wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/257324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: C(++) Compiler Transition - Make DJGPP go away please I'm working on writing a kernel, and I have a few friends working with me on the project. We've been using DJGPP to compile the project for a while, but we're having some cross-platform compatibility issues with compiling this way that have left my main Partnet o...
{ "language": "en", "url": "https://stackoverflow.com/questions/257329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I explain what a "naive implementation" is? What is the clearest explanation of what computer scientists mean by "the naive implementation"? I need a good clear example which will illustrate — ideally, even to non-technical people — that the naive implementation may technically be a functioning solution to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/257331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Clojure editor/IDE recommendations on Mac OS X I am starting to learn the Clojure programming language. Are there any recommendations for Clojure editors/IDEs on Mac OS X? Update 2009-09-23: The Clojure space has changed tremendously since I originally posted this question. Many of the links below, especially those ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: How do you generate an RSS feed? I've never done it myself, and I've never subscribed to a feed, but it seems that I'm going to have to create one, so I'm wondering. The only way that seems apparent to me is that when the system is updated with a new item (blog post, news item, whatever), a new element should be wri...
{ "language": "en", "url": "https://stackoverflow.com/questions/257339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Check if Char is in range If I have a range of say 000080-0007FF and I want to see if a char containing hex is within that range, how can I do it? Example char t = 0xd790; if (t is within range of 000080-0007FF) // true A: wchar_t t = 0xd790; if (t >= 0x80 && t <= 0x7ff) ... In C++, characters are interchangeab...
{ "language": "en", "url": "https://stackoverflow.com/questions/257343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: form layout with CSS I need to create a form with, half linear view (textboxes and dropdownlists in separate line) and the other half, non linear view i.e. the textboxes will appear next to each other, like first name and last name will be next to each other. I am aware how to acomplish the linear view with CSS. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's bigger than a double? Is there a native c++ variable type that's "bigger" than a double? float is 7 double is 15 (of course depending on the compiler) Is there anything bigger that's native, or even non-native? A: C++ has long double, but there is no guarantee that it's any more precise than a plain double....
{ "language": "en", "url": "https://stackoverflow.com/questions/257353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: API to broadcast live webcam I would like to know if anyone here knows an API where it's possible for me to create a live webcam broadcast from inside my website? I was checking the uStream API and it seems that you can't create anything, just retrieve data... Does anyone knows anything like this? Thanks in advance!...
{ "language": "en", "url": "https://stackoverflow.com/questions/257364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should carriage return \r and new line \n always be used together? \r\n In JavaScript this was a cross-browser compatibility issue, so both were used, but there are numerous instances in different languages where I see both printed out together as \r\n. Is this still the generally excepted norm that you should just ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Custom Virtual Earth Clustering I want to implement my own clustering algorithm using this Virtual Earth javascript API: http://msdn.microsoft.com/en-us/library/cc966716.aspx However, the VE engine calls my cluster function once for every shape in the layer. This makes it very slow! It seems to me that VE should pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/257378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to "simplify" UIImagePickerController I am using UIImagePickerController to take photo, there are two steps involved, "Take photo" and "Use photo". Is there any way to override the behavior, merge these two action in one? Say "Take and use photo". Thanks. A: There is no way in the current SDK to do this, you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: C error with pointer and const char[] I have a const char arr[] parameter that I am trying to iterate over, char *ptr; for (ptr= arr; *ptr!= '\0'; ptr++) /* some code*/ I get an error: assignment discards qualifiers from pointer target type Are const char [] handled differently than non-const? A: Switch the dec...
{ "language": "en", "url": "https://stackoverflow.com/questions/257391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WPF CommandParameter Binding Problem I'm having some trouble understanding how command parameter binding works. When I create an instance of the widget class before the call to InitializeComponent it seems to work fine. Modifications to the parameter(Widget) in the ExecuteCommand function will be "applied" to _widg...
{ "language": "en", "url": "https://stackoverflow.com/questions/257396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Message Box in Python Is there a UI library to create a message box or input box in python? A: Simple message boxes and input boxes can be created using EasyGui, a small library using Tkinter, which Python comes with. You can get EasyGui here: http://easygui.sourceforge.net/ A: I've heard good things about wx pyth...
{ "language": "en", "url": "https://stackoverflow.com/questions/257398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: NSData and UIImage I am trying to load UIImage object from NSData, and the sample code was to NSImage, I guess they should be the same. But just now loading the image, I am wondering what's the best to troubleshoot the UIImage loading NSData issue. A: UIImage has an -initWithData: method. From the docs: "The data i...
{ "language": "en", "url": "https://stackoverflow.com/questions/257400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: How2 in Configuration Net 2.0: Add element to section defined in different assembly How could I add a config element in config file in Net 2.0 that would be placed under existing structure that is defined in different assembly? In my case I have some core library that creates root section (and already some other set...
{ "language": "en", "url": "https://stackoverflow.com/questions/257405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Download image file from the HTML page source I am writing a scraper that downloads all the image files from a HTML page and saves them to a specific folder. All the images are part of the HTML page. A: Here is some code to download all the images from the supplied URL, and save them in the specified output folder....
{ "language": "en", "url": "https://stackoverflow.com/questions/257409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: do { ... } while (0) — what is it good for? I've been seeing that expression for over 10 years now. I've been trying to think what it's good for. Since I see it mostly in #defines, I assume it's good for inner scope variable declaration and for using breaks (instead of gotos.) Is it good for anything else? Do you us...
{ "language": "en", "url": "https://stackoverflow.com/questions/257418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "416" }
Q: Debugging 100% iowait problem in linux I've been trying to trace down why I have 100% iowait on my box. If I do something like a mysql select query, system goes to 100% iowait (on more than one cpu on my server,) which kills my watchdogs and sometimes kills httpd itself. In vmstat I see that every 8 seconds or so, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it worth caching objects created by Delphi's Memory Manager? I have an application that creates, and destroys thousands of objects. Is it worth caching and reusing objects, or is Delphi's memory manager fast enough that creating and destroying objects multiple times is not that great an overhead (as opposed to ke...
{ "language": "en", "url": "https://stackoverflow.com/questions/257428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: PostgreSQL UNIX domain sockets vs TCP sockets I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much? A: I believe that UNIX domain sockets in theory give better throughput than TCP sockets on the loopback in...
{ "language": "en", "url": "https://stackoverflow.com/questions/257433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Exporting UTF8 data from db2 I have a db2 table that contains values in many languages (including right-to-left languages.) When I export this table on a linux box using cli's ''export'' command, I get a good looking comma delimited text file (DEL file,) but when I try it on aix, it replaces all characters that are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best way to get IIS for XP Pro SP2 if you don't have the CD? I have a work laptop that was purchased new, but it came without the CD. It has XP Pro, but it did not come with IIS installed. This looked to be a good approach: http://ezinearticles.com/?Guide---How-To-Install-IIS-on-Windows-XP-SP2-Without-CD...
{ "language": "en", "url": "https://stackoverflow.com/questions/257461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# to PHP base64 encode/decode So I have this c# application that needs to ping my web server thats running linux/php stack. I am having problems with the c# way of base 64 encoding bytes. my c# code is like: byte[] encbuff = System.Text.Encoding.UTF8.GetBytes("the string"); String enc = Convert.ToBase64String(encbu...
{ "language": "en", "url": "https://stackoverflow.com/questions/257462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's the difference between scgi and wsgi? What's the difference between these two? Which is better/faster/reliable? A: SCGI is a language-neutral means of connecting a front-end web server and a web application. WSGI is a Python-specific interface standard for web applications. Though they both have roots in CGI...
{ "language": "en", "url": "https://stackoverflow.com/questions/257481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: CSS fixed width in a span Within an unordered list: <li><span></span> The lazy dog.</li> <li><span>AND</span> The lazy cat.</li> <li><span>OR</span> The active goldfish.</li> Adding a class or style attribute is permitted but padding the text and adding or changing tags is not allowed. The page is rendering with Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/257505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "431" }
Q: Understanding Dynamic Binding I understand how the implementation of dynamic binding works and also the difference between static and dynamic binding, I am just having trouble wrapping my brain around the definition of dynamic binding. Basically other than it is a run-time binding type. A: Basically, dynamic bindin...
{ "language": "en", "url": "https://stackoverflow.com/questions/257507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rating Items From Ratings of Random Sets I'm looking for an algorithm to determine ratings or tags for items when my own input is giving the user random sets of these items and letting them tell me which ratings or tags are within that set. For example, they might say if a set of images contains any "good" photos an...
{ "language": "en", "url": "https://stackoverflow.com/questions/257512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Android: Access child views from a ListView I need to find out the pixel position of one element in a list that's been displayed using a ListView. It seems like I should get one of the TextView's and then use getTop(), but I can't figure out how to get a child view of a ListView. Update: The children of the ViewGrou...
{ "language": "en", "url": "https://stackoverflow.com/questions/257514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Is NUnit's ExpectedExceptionAttribute only way to test if something raises an exception? I'm completely new at C# and NUnit. In Boost.Test there is a family of BOOST_*_THROW macros. In Python's test module there is TestCase.assertRaises method. As far as I understand it, in C# with NUnit (2.4.8) the only method of d...
{ "language": "en", "url": "https://stackoverflow.com/questions/257519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can the Windows Mobile 6 SDK be used to develop programs for older versions of Windows Mobile? I'd like to develop a few applications for a device I own which has Windows Mobile 2003 on it, but I don't care to hunt down a copy of Visual Studio 2003 to do so. I'd like to know if the Mobile 6 SDK can be used for this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you undo a folder move in Solutions Explorer in Visual Studio with SVN? I accidentally moved a very important and large folder from the root project into a sub-folder. Now when I try to move the folder back, it gives me an error message "Cannot create a file when that file already exists." How do I move thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/257538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: php/Ajax - Best practice for pre-loading images I have put together a script which is very much like the flickr photostream feature. Two thumbnails next to each other, and when you click the next or prev links the next (or previous) two images slide in. Cool! Currently when the page loads it loads the two images. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/257550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to unit test complex methods I have a method that, given an angle for North and an angle for a bearing, returns a compass point value from 8 possible values (North, NorthEast, East, etc.). I want to create a unit test that gives decent coverage of this method, providing different values for North and Bearing to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: C++ Program communicating with MySQL Database Does anyone know of a simple way for a C++ program to communicate directly with a MySQL database? I have looked at MySQL++ and found it to be very confusing. If anyone knows of a very simple way of doing this, please let me know. Thanks P.S. I am developing on a Window...
{ "language": "en", "url": "https://stackoverflow.com/questions/257552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Python MySQL Statement returning Error hey, I'm very new to all this so please excuse stupidity :) import os import MySQLdb import time db = MySQLdb.connect(host="localhost", user="root", passwd="********", db="workspace") cursor = db.cursor() tailoutputfile = os.popen('tail -f syslog.log') while 1: x = ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/257563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using Stream Result with Struts2 I am attempting to use a Stream Result to return an image from a struts2 application. I seem to be having problem with configuring the action. Here is the configuration: <result name="success" type="stream"> <param name="contentType">image/jpeg</param> <pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/257566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why do some menus open to the left of the cursor and others to the right? In some applications (notably Visual Studio 2008, Windows Explorer, Internet Explorer) all of the menus open to the left of the cursor. In other apps (Firefox, ACDSee) they open to the right. Then there's Foxit Reader, where the ones in the me...
{ "language": "en", "url": "https://stackoverflow.com/questions/257569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: IDE, SVN and pushing to sites! Im thinking of updating my practices, and looking for a little help and advice! I do a lot of work on sites that run joomla, oscommerce, drupal etc and so I have created a lot of custom components/plugins and hacks etc. Currently each site has its own folder on my xampp setup. What I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/257577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: schedule webpage I need to schedule several different pages on several different sites to be run at certain times, usually once a night. Is there any software out there to do this? it would be nice if it called the page and then recorded the response and whether the called page was successful run or not. I was us...
{ "language": "en", "url": "https://stackoverflow.com/questions/257583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What model should I use for a browser-based game? As a hobby project I am currently trying to create a small browser-based game - and I thought it would be the "right thing" to code it using the MVC pattern, separating the game's "engine" from presentation. It would be a simple "rpg" game, where the player's charact...
{ "language": "en", "url": "https://stackoverflow.com/questions/257586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Bring a window to the front in WPF How can I bring my WPF application to the front of the desktop? So far I've tried: SwitchToThisWindow(new WindowInteropHelper(Application.Current.MainWindow).Handle, true); SetWindowPos(new WindowInteropHelper(Application.Current.MainWindow).Handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NO...
{ "language": "en", "url": "https://stackoverflow.com/questions/257587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "239" }
Q: How to log XML SOAP messages (Request and Response) to SQL Database? In my web application, I need to log all the SOAP messages to my SQL 2005 database whenever I make a web service call to my business partners' web service. How do I accomplish that? Thanks in Advance, Tony A: You haven't specified what language yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/257588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Rails Associations, habtm? Polymorphic? Both? In my Rails app I have three models, Projects, BlogPosts and Images. Projects and BlogPosts can have many linked images and an image can be linked to a Project, a BlogPost or both. What is the best way of setting up the associations to make this work in Rails? A: I'd te...
{ "language": "en", "url": "https://stackoverflow.com/questions/257593", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }