text
stringlengths
8
267k
meta
dict
Q: Dot product in C++ using generic algorithms I´m sure there´s a clever one-liner using the C++ stl generic algorithms for implementing the dot product of the elements in any ordered container, such as a vector or list. I just don´t seem to remember it! The fancy implementation would be: template <class containerT> ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/312077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to deal with xapian php exceptions Help with using the xapian php wrapper. I have a couple of custom exception handlers for different categories of errors (I'm thinking of seperating them out more). Xapian handles errors by throwing standard Exception objects. I would like to use a custom exception handler for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: aurioTouch sample app's audio playback/thru not working? According to Apple's description, the aurioTouch sample app is suppose to "get the audio input and copy it to the output", which I think means that the app will playback/thru any sound the iPhone's mike picks up through the iPhone's speakers. When I loaded the...
{ "language": "en", "url": "https://stackoverflow.com/questions/312089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: File handler's limit crossing 256 My code opens more than 256 file handles, So When I run it on solaris machines I am ending up in "Exceeding file handlers limit" error. I have two questions regarding this 1) Is this limit is only for 32 bit softwares or 64 bit softwares also suffer from it. I googled about it and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Good python library for designing a mmo? Actor based design i m trying to design a mmo game using python... I have evaluated stackless and since it is not the general python and it is a fork, i dont want to use it I am trying to chose between pysage candygram dramatis and parley any one try any of these libraries? T...
{ "language": "en", "url": "https://stackoverflow.com/questions/312096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can you use LINQ or lambdas to perform matrix operations? I know how to do this using for loops. Is it possible to do something like this using LINQ or lambdas? int[] a = { 10, 20, 30 }; int[] b = { 2, 4, 10 }; int[] c = a * b; //resulting array should be { 20, 80, 300 } A: EDIT: The code below will work, but it'...
{ "language": "en", "url": "https://stackoverflow.com/questions/312103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I store an enum value in a Windows Forms settings file? I'm using Windows Forms and VS2008. I want to store an enum value in my application's settings file. The settings editor in VS2008 only gives me a limited set of types. Amazingly, enums don't seem to be one of these types that are automatically support...
{ "language": "en", "url": "https://stackoverflow.com/questions/312107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ Linking Errors: Undefined symbols using a templated class I'm getting some really wierd linking errors from a class I wrote. I am completely unable to find anything that will describe what is happening. Visual Studio (Windows XP) players.obj : error LNK2019: unresolved external symbol "public: __thiscall TreeN...
{ "language": "en", "url": "https://stackoverflow.com/questions/312115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: C++ array size dependent on function parameter causes compile errors I have a simple function in which an array is declared with size depending on the parameter which is int. void f(int n){ char a[n]; }; int main() { return 0; } This piece of code compiles fine on GNU C++, but not o...
{ "language": "en", "url": "https://stackoverflow.com/questions/312116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Why the Excess Memory for Strings in Delphi? I'm reading in a large text file with 1.4 million lines that is 24 MB in size (average 17 characters a line). I'm using Delphi 2009 and the file is ANSI but gets converted to Unicode upon reading, so fairly you can say the text once converted is 48 MB in size. ( Edit: I f...
{ "language": "en", "url": "https://stackoverflow.com/questions/312118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: opengl: how to avoid texture scaling How do I apply a repeating texture that always maintains its original scale (1 pixel in the texture = 1 pixel on screen), regardless of the vertex data it is applied with. I realize this is not the most usual task, but is it possible to easily set opengl to do this, or do I need ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where should a script block with jquery code be placed on an ASP.NET MVC Master Page? Getting started with jquery and having trouble getting hello world type example going for asp.net mvc. I get a runtime error "object expected" when trying to load a page with this script. A. Where should script tags be placed in a...
{ "language": "en", "url": "https://stackoverflow.com/questions/312150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Pagination in CouchDB? How would I go about implementation the queries required for pagination? Basically, when page 1 is requested, get the first 5 entries. For page 2, get the next 5 and so on. I plan to use this via the couchdb-python module, but that shouldn't make any difference to the implementation. A: The C...
{ "language": "en", "url": "https://stackoverflow.com/questions/312163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Java Private Field Visibility So I was making a class the other day and used Eclipse's method to create the equals method when I realized that it generated the following working code: class Test { private int privateInt; [...] public boolean equals(Object obj) { [...] Test t = (Test) obj; if ( t.pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/312168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Is VARCHAR like totally 1990s? * *VARCHAR does not store Unicode characters. *NVARCHAR does store Unicode characters. *Today's applications should always be Unicode compatible. *NVARCHAR takes twice the amount of space to store it. *Point 4 doesn't matter because storage space is extremely inexpensive. Ergo:...
{ "language": "en", "url": "https://stackoverflow.com/questions/312170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Probabilistic file verification -- algorithm or libraries? I am looking for an efficient means to partially check the integrity of "large" data sets over a slow transfer medium. This seems like a common problem as file sizes grow out of proportion to transfer rates. For example, for concrete numbers, a terabyte of...
{ "language": "en", "url": "https://stackoverflow.com/questions/312175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Disadvantages of extension methods? Extension method is a really helpful feature that you can add a lot of functions you want in any class. But I am wondering if there is any disadvantage that might bring troubles to me. Any comments or suggestions? A: Couple of things: * *It's not always clear as to where the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/312184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: kbhit() on MacOS to detect keypress I am new to C++ on MacOS. I got an error when I used kbhit() in my program. I used #include<conio.h> but got error too, so I searched and test with #include<curses.h> but error is still remained. A: No idea if this would work on Mac, but here's some code that I've used to get a s...
{ "language": "en", "url": "https://stackoverflow.com/questions/312185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is N-Tier architecture? I've seen quite a few developer job postings recently that include a sentence that reads more or less like this: "Must have experience with N-Tier architecture", or "Must be able to develop N-Tier apps". This leads me to ask, what is N-Tier architecture? How does one gain experience with...
{ "language": "en", "url": "https://stackoverflow.com/questions/312187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "198" }
Q: Generating partitions in Java I am given an integer (lets call it x) and I need to generate an array of arrays, where each subarray is a list of elements which are one of a given set of integers, and the sum of all of the elements of each subarray is x. The array of arrays needs to contain all possible distinct suba...
{ "language": "en", "url": "https://stackoverflow.com/questions/312188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I copy text from my xterm without a mouse? I want to use part of the output of a command run from the command line in another xterm, or as part of a different command. For instance: > grep error error.log error: can't find file ~/<some very long path>/thisfile and I want to do this: >ls ~/<some very long ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do I run a rake task from Capistrano? I already have a deploy.rb that can deploy my app on my production server. My app contains a custom rake task (a .rake file in the lib/tasks directory). I'd like to create a cap task that will remotely run that rake task. A: I personally use in production a helper method ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: Rotating two UIImageViews 360 degrees I've been trying to have two fixed sized UIImageviews with images on the them (that cover all the view), But I've been trying really hard (I give up!) to rotate each of them in a circular manner. So if I have one UIView, and the other right next to it, I would like to be able to...
{ "language": "en", "url": "https://stackoverflow.com/questions/312226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Proper MIME media type for PDF files When working with PDFs, I've run across the MIME types application/pdf and application/x-pdf among others. Is there a difference between these two types, and if so what is it? Is one preferred over the other? I'm working on a web app which must deliver huge amounts of PDFs and I...
{ "language": "en", "url": "https://stackoverflow.com/questions/312230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1445" }
Q: How to debug JavaScript with Firebug? I cannot seem to debug my JavaScript code with Firebug. The play button is greyed out. I use FireFox 3.0.4 and Firebug 1.2.1. Are there any known issues? This is the script I want to debug: (breakpoints set on <img onclick> and function say()), the code executes well. <html> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: document.body.offsetWidth variations for different browsers document.body.offsetWidth returns the innerwidth value from left hand side to the left side of the vertical scrollbar in firefox. In IE it doesn't, instead it returns from left hand side to the right side of the vertical scrollbar. Does anyone know a sensib...
{ "language": "en", "url": "https://stackoverflow.com/questions/312244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are the "string", "stream" and "stringstream" classes in C++? I want to know what's the difference between string and stream in c++, and what's stringstream? A: Very Informally: A string is a collection of characters, a stream is a tool to manipulate moving data around. A string stream is a c++ class that lets...
{ "language": "en", "url": "https://stackoverflow.com/questions/312245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Are there any options for secure email? Are there any good and easy to use options for sending secure email? Why is this not commonplace? A: SMTP has extensions which support encryption which are supported by most vendors. The receiving server is required to have a certificate (not the sender). So configuring your...
{ "language": "en", "url": "https://stackoverflow.com/questions/312254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Effective Keyboard Input Handling What is a good way to implement keyboard handling? In any language, where I write a keyboard-interactive program (such as a tetris game), I end up having some code that looks like this: for event in pygame.event.get(): if event.type == KEYDOWN: if False: pass #m...
{ "language": "en", "url": "https://stackoverflow.com/questions/312263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Recommended indexes for query in large table involving a 'date range' and an 'order id' I have a query (which was created by LINQ to SQL) to get me a list of 'site visits' that were made between a certain date range which resulted in an order (orderid is not null). Theres nothing wrong with the query. I just need ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/312273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to draw procedural graphics in Vista Sidebar? How do I draw procedural graphics in a Vista Sidebar gadget? I have a gadget that collects data over time and I want to draw animating graphs. My current approach is to draw the graph with VML that I update from JScript on a timer tick. Is this the best way? Can...
{ "language": "en", "url": "https://stackoverflow.com/questions/312278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Fetching attachments from gmail via either python or php I have been trying to find information on how to retrieve attachments from a gmail account in either python or PHP, I'm hoping that someone here can be of some help, thanks. Related: * *How can I download all emails with attachments from Gmail? A: I took t...
{ "language": "en", "url": "https://stackoverflow.com/questions/312284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Returning a pointer from a class For my programming class I have to write a linked list class. One of the functions we have to include is next(). This function would return the memory address of the next element in the list. #include <iostream> using namespace std; class Set { private: int num; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Catch "The program stopped working" on Vista On Vista, I got a problem with the application crash handler. Basically, if something unexpected occurs which cannot be captured by SEH, I get this pop-up window with "The application stopped working", blablabla, "Close program/Debug program" -- that is, after I disable ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Preventing stack overflows in C++ using arrays? If we implement a stack using arrays in C++, what is the best way to reduce the chance of an overflow condition? Also while keeping in mind the time-space trade off? A: Just resize your array when you get close to the "overflow condition", i.e. when the next element ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ajax Control Toolkit - Toolscriptmanager not available I've been trying to get this asp.net 2.0 application up and running with little success. I removed all references and added the ajax control toolkit again and I'm still getting "ToolScriptManager:ID property not specified". http://www.naeem.sarfraz.name/image001...
{ "language": "en", "url": "https://stackoverflow.com/questions/312306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hosting a Facebook Application? I have looked on FaceBook Developer page and found that it's possible to create a FaceBook application, however this application must be hosted by you! I'm new, does any one have an experience on that? A: Yes, you have to have a server external to Facebook. Basically what happens is...
{ "language": "en", "url": "https://stackoverflow.com/questions/312311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are some reasons a Release build would run differently than a Debug build I have a Visual Studio 2005 C++ program that runs differently in Release mode than it does in Debug mode. In release mode, there's an (apparent) intermittent crash occurring. In debug mode, it doesn't crash. What are some reasons that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Environment variables in PowerShell with a dot (.) in the name I know I can access environment variables in PowerShell using $Env. For example, I can access FOO with $Env:FOO. I can't figure out how to access the environment variable called FOO.BAR. $Env:FOO.BAR doesn't work. How can I access this from within PowerS...
{ "language": "en", "url": "https://stackoverflow.com/questions/312314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: How can I get my Autocomplete extender to work? I've tried to the letter to search for mistakes in my code, but i can't myself get that autocomplete extender to work. Help wanted. Here's my code: (excerpt from my aspx page) <asp:TextBox ID="TextBox1" Width="120px" runat="server"></asp:TextBox> <cc1:AutoCompl...
{ "language": "en", "url": "https://stackoverflow.com/questions/312318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Debugging problems with ‘WITH’ statement in Delphi 2006 Possible Duplicate: What's wrong with Delphi's “with” I am have a problem debugging code that uses a ‘WITH’ statement in BDS 2006 The debugger will not show the values of the variables with in a class or record. Am I doing something wrong or does BDS 2006 ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/312321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: If construct in hashmap.put call I have a variable of type Hashmap<String,Integer>. In this, the Integer value might have to go some manipulation depending upon the value of a flag variable. I did it like this... Hashmapvariable.put( somestring, if (flag_variable) { //manipulation code goes here new In...
{ "language": "en", "url": "https://stackoverflow.com/questions/312322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the fastest way to find the point of intersection between a ray and a polygon? Pretty much as the question asks. Answers preferably in pseudo code and referenced. The correct answer should value speed over simplicity. A: See Intersections of Rays, Segments, Planes and Triangles in 3D. You can find ways to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/312328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Suggested platform/tools for rapid game development and game prototyping What platforms and tools should I use for rapid game development and prototyping? Say that I have an idea for a simple game or a game mechanic that I want to try out, what are the best tools for quickly creating something playable that I can ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/312357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Differences between SVN and SVN+SSH on a Windows SVN server? I'm trying to understand the differences in terms of subversion repository security between a regular svn:// and svn+ssh:// access. I've setup my subversion repository in a custom port and ip address and opened that same port on the firewall, and configure...
{ "language": "en", "url": "https://stackoverflow.com/questions/312370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Debug Levels when writing an application I would like to know if you guys have any suggestions about debug levels when writing an application. I thought about 4 levels: 0 : No Debug 1 : All inputs and outputs 2 : "I am here" notification from significant functions with main parameters 3 : All variables verbose A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/312378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: WPF DrawingBrush performance I need to draw gridlines on the background of a canvas that will have other controls placed on it. I tried creating a StreamGeometry, using that to draw lines, and getting that assigned to a DrawingBrush. However I find that if the StreamGeometry has too many lines, the program becomes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How did you adapt your unit tests to deal with changing requirements? I have a project where I've been using TDD and unit tests as "software vises". In essence I translate the requirements into tests that verify that the code conforms to the requirements. I rarely have to go back and edit the unit tests, which rathe...
{ "language": "en", "url": "https://stackoverflow.com/questions/312388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Joins and where conditions I have the following (shortened query): SELECT `Statistics`.`StatisticID`, COUNT(DISTINCT `Flags`.`FlagType`) AS `FlagCount` FROM `Statistics` LEFT JOIN `Flags` ON `Statistics`.`StatisticID` = `Flags`.`StatisticID` WHERE `FlagCount` = 0 GROUP BY `Statistics`.`StatisticID` ORDER BY...
{ "language": "en", "url": "https://stackoverflow.com/questions/312400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Static linking advantages I recently read a question on here about static and dynamic linking, which reminded me of some questions I've had about it. From that post, I can see what the technical difference is (including object file contents directly instead of merely pointing to it), but I'd like to know a bit more ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What advantages does using Oslo and M have and when would you use it? After attending a talk on Oslo/M I am struggling a bit to see the advantages of using it over existing methods and in what situation it would be useful. I know its quite new and not all details have been released etc but can some one give me some ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: struts checkbox I am trying to set the fieldValue of the check box to a value I got from the property tag. I am having trouble with the syntax. This is what I have tried: <s:form id="myForm" method="post" action="removeUser" enctype="multipart/form-data"> <s:iterator value="myList"> <tr> <td...
{ "language": "en", "url": "https://stackoverflow.com/questions/312424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I'm using Zend gdata to open documents with hopes to read and write spreadsheet cells I'm not good at programming and my trying to open one of my spreadsheet documents. Below in the basic login im using, I then request a list all my spreadsheet, which is returned in $feed. And now I'm worried I'm not on the right tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/312427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Logging using policy injection application block Hi All I want to ask, how to use policy injection application block to log methods entry and exit in these cases : Case1 : in case of logging events handlers of a web form controls, you know the class let's say _Default must be inherited from class System.Web.UI.Page...
{ "language": "en", "url": "https://stackoverflow.com/questions/312428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Bash configuration on Mac OS X 10.4+ When configuring the bash on OSX via ~/.profile it seems to completely ignore it as soon as ~/.bash_profile exists. If this is correct and expected behavior, should I add my extra configuration stuff to ~/.bash_profile as well or use it instead of ~/.profile? Thanks in advance. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I split a list into equally-sized chunks? How do I split a list of arbitrary length into equal sized chunks? See How to iterate over a list in chunks if the data result will be used directly for a loop, and does not need to be stored. For the same question with a string input, see Split string every nth char...
{ "language": "en", "url": "https://stackoverflow.com/questions/312443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2993" }
Q: Python 2.6 + JCC + Pylucene issue Greetings, I'm trying to use pylucene in Python 2.6. Since there's no windows build for 2.6, I try to build the source code. First of all, I build JCC (windows, using cygwin) python setup.py build running build running build_py [...] building 'jcc' extension error: None python set...
{ "language": "en", "url": "https://stackoverflow.com/questions/312444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Installer for Oracle Forms Builder application? I have made a small project in Oracle, by using the oracle forms builder - how do I create an installer (setup.exe) for my project (one that would setup the application on MS Windows?) Please... help me, and thanks a lot A: Up to Forms 6i you can have a Forms runtime ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Scaling LAMP I have a client with a LAMP website serving mostly video. He is currently on one server with all components. He is having some scaling problems. What are some of the techniques that can be used to help. I used separating out the DB to another server with a GB Ethernet between it and the webserver. Maybe...
{ "language": "en", "url": "https://stackoverflow.com/questions/312455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to increment the TTL value on Windows? On Linux this is easy to do. Is it possible on Windows? Clarification: I want to increment the TTL for all incoming packets. A: If you mean the default (as opposed to specific for a given packet), the registry entry is: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Service...
{ "language": "en", "url": "https://stackoverflow.com/questions/312459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Starting working with Eclipse RCP I'm going to start maintaining an Eclipse RCP application for my current employer soon. What are your experiences with this platform? What are the pros, what are the cons, what are the caveats that I should be aware of? Also, what reading materials (books, tutorials) can you recomme...
{ "language": "en", "url": "https://stackoverflow.com/questions/312461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do you open an SSH Tunnel from a Windows client as a background program? I would like a Win machine to tunnel into an SSH server whenever the machine starts up. I also want the win machine to reboot the SSH program if it ever crashes. The lighterweight & more stable the SSH program, the more happier I am. What...
{ "language": "en", "url": "https://stackoverflow.com/questions/312471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Regex Filter to Eliminate Records with AlphaNumeric Before Letter "I" Need help narrowing the scope of this Regex to not return records if there is an alphanumeric character preceding the first "I" "I([ ]{1,2})([a-zA-Z]|\d){2,13}" Want to capture I APF From this string, but not the I ARPT. I APF ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Script to add MSIUSEREALADMINDETECTION to MSI Anyone have a script (JScript, VBScript or similar) in the spirit of this handy script but adding the MSIUSEREALADMINDETECTION property I know I could use Orca manually or with its transform feature, but would rather not go there. A: Some refs * *Windows Installer SD...
{ "language": "en", "url": "https://stackoverflow.com/questions/312490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Force an SVN checkout command to overwrite current files I'm adding an existing site to SVN. The files already exist on the webserver, and now identical copies (- configuration files) exist in the repository. I want to convert the webserver directory into an SVN working copy, but when I run: svn checkout http://path...
{ "language": "en", "url": "https://stackoverflow.com/questions/312491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: Codeigniter - I am looking to use/connect to a different database for one of my controllers and one model I am looking to use/connect to a different database for one of my controllers and one model. I posted this hear since on the forums of CI I am getting no response. I added this in database.php: $db['tdb']['hostn...
{ "language": "en", "url": "https://stackoverflow.com/questions/312511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Determining zoom level from single LatLong in Google Maps API I'm having some trouble with the Google Maps API; I want to determine a LatLong for a certain place (for example, from the name of a city), then focus my map on it. The LatLong part is working, and so is centering the map on that point. However, I cannot ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Referencing the Microsoft Enterprise Library DLL file in a wrapper DLL I am writing an application using the Microsoft Enterprise Library. I wrote a wrapper DLL for that Enterprise Library DLL file. I want to use my wrapper in some Windows Forms application. The problem is that every time I want to use my wrapper I...
{ "language": "en", "url": "https://stackoverflow.com/questions/312523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: OS X run rsync under sudo using ssh_config I want to set up an automatic rsync job to backup a bunch of user accounts on my OS X machine to a linux fileserver. I have set up password-free ssh from my account to another machine, and it works great, so I tried using this command: sudo rsync -avz /Users/jbloggs myserv:...
{ "language": "en", "url": "https://stackoverflow.com/questions/312527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: No Module named django.core I have updated to latest Django version 1.0.2 after uninstalling my old Django version.But now when I run django-admin.py I get the following error. How can I resolve this? Traceback (most recent call last): File "C:\Python25\Lib\site-packages\django\bin\django-admin.py", line 2, in <mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/312549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Generate .Net objects from known XSD I have some XSD-s that define my objects hierarchy. for example math.xsd, base.xsd while math.xsd is depends on base.xsd. I need to generate classes from those xsd-s. I've already read about those two tools: CodeXS tool and XSD.exe. the problem with the xsd.exe is that I didn't...
{ "language": "en", "url": "https://stackoverflow.com/questions/312551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Looking for an embeddable SQL beautifier or reformatter I am looking for a Java open source beautifier or reformatter for SQL that I can use to clean up DDL statements that I am generating with openArchitectureWare. Nothing in the answer to "Online Code Beautifier And Formatter" is of use to me and I have not been a...
{ "language": "en", "url": "https://stackoverflow.com/questions/312552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Ways to use .Net within MS Access I'd like to include custom .Net controls and .Net forms within MS Access. It's possible but I was wondering if there was any new good articles on that subject. Over time I've found a few related to the subject the but always found the process a bit cumbersome (see references below)....
{ "language": "en", "url": "https://stackoverflow.com/questions/312558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MySQL - Where IN together with GROUP_CONCAT The query used inside the IN() returns: 1, 2. However the whole query returns 0 rows which is impossible since they are present. What am I doing wrong here? SELECT DISTINCT li.auto_id FROM links AS li JOIN group_data AS gi ON li.auto_id = gi.autoid AND li.use...
{ "language": "en", "url": "https://stackoverflow.com/questions/312561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Class bucketing . . Ok, so i have been trying to put everyone one of my classes in some root folder, either: UI BusinessLogic DataAccess BusinessObjects Interfaces i have a few more where i can't seem to bucket very well so i am looking for suggestions * *A Cache class that maintains a private dictionary and a...
{ "language": "en", "url": "https://stackoverflow.com/questions/312565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to combine GUI applications in Windows I have a Windows GUI application that's using the Qt framework (currently version 3.3.5, might change to Qt4). I want to combine other Windows GUI applications in the main application. I can't use the widgets directly in the main application due to several constrains which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are some of the drawbacks to using C-style strings? I know that buffer overruns are one potential hazard to using C-style strings (char arrays). If I know my data will fit in my buffer, is it okay to use them anyway? Are there other drawbacks inherent to C-style strings that I need to be aware of? EDIT: Here'...
{ "language": "en", "url": "https://stackoverflow.com/questions/312570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How could I allow only unique strings in a JList? I have a JList that holds a bunch of strings . I would like it to act like a Set , so that it will only hold unique values . Is there any way to achieve this without checking that a new string doesn't already exist there ? A: take a look at the docs: 1.4.2 | Java 6 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to simply generate the CREATE SQL script for a table and data? So i'm used to PHPMySQL where if I want to transfer a table from one database to another, I: * *go to the table *click "export" *CTRL-C *go to the other database, insert SQL, CTRL-V In MS SQL Server 2008 Express, I try: * *right-click, scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/312576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Debugging pylons in Eclipse under Ubuntu I am trying to get pylons to debug in Eclipse under Ubuntu. Specifically. I am not sure what to use for the 'Main Module' on the Run configurations dialog. (this is a similar question on stackoverflow, but I think it applies to windows as I can't find paster-script.py on my s...
{ "language": "en", "url": "https://stackoverflow.com/questions/312599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Loading WCF config (for server + client) from custom source (not standard XML) I've been trying to find a way to load my WCF service configuration (that huge BLOB of XML config data) from an alternate source - not the standard web.config / app.config. We're running in a restricted environment where we don't have ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/312604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Submit form input fields added with javascript I'm making a simple form to create polls, therefore I want the possibility to add additional input fields in case the user wants more options in the poll. I've made Javascript code that adds a new input field to the form, but the dynamically added input fields are not p...
{ "language": "en", "url": "https://stackoverflow.com/questions/312605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Why do I need to cast self to id? I have an init method that takes an (id) argument: -(id) initWithObject:(id) obj; I'm trying to call it like this: [[MyClass alloc] initWithObject:self]; But XCode is complaining about the argument being a "distinct Objective-C type" (which usually indicates a type misma...
{ "language": "en", "url": "https://stackoverflow.com/questions/312608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: TIBCO.EMS .NET client / WCF channel Folks, TIBCO has announced support for WCF channels back in April - has anything of that materialized by now?? Where and how can I download either these new WCF channel bits, or where can I get my hands on a current .NET 2.0/3.5 version of the "TIBCO.EMS .NET client library" ?? W...
{ "language": "en", "url": "https://stackoverflow.com/questions/312612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Sending e-mail out of client application without storing password My Aim: Sending an email (e.g. support request, error report) out of a C# Windows forms application. I know how do do this technically but here is the catch: In order to authenticate myself on the mail server (e.g. gmx, yahoo, own website) I need to s...
{ "language": "en", "url": "https://stackoverflow.com/questions/312621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Removing or overwriting a component from Windsor Container I'm trying to accomplish a seemingly super simple thing: from my unit test I want to replace the type being resolved with a mock/fake object. For example: the xml config states that a component of the service IInterface should resolve to ClassA. That's fine,...
{ "language": "en", "url": "https://stackoverflow.com/questions/312624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Opening a URL in current tab/window from a Firefox Extension I am creating a Firefox Extension...what would be the javascript to open a URL in the current tab from a menuitem? e.g. in my overlay.xul file i have the following line: <menuitem label="Visit homepage" oncommand="window.location='http://www.somepage.com'"...
{ "language": "en", "url": "https://stackoverflow.com/questions/312625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Need hotkey/button to comment out a block of code in Visual Studio 2008 Express I'm coming from Eclipse, working in Visual Studio 2008 Express and just want to highlight code, right-click and comment it out. * *nothing in right-click *looking in Tools | Options, Toolbars, Commands, can't find a button for it... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Non-mathematical Description of Neural Networks I am not a mathematician. I enjoy a good math puzzle, but I admit my weaknesses whole heartedly. That said, I've always had an interest in Neural Networks, and while I understand them enough to implement them from scratch, I hit a wall when I need to understand any con...
{ "language": "en", "url": "https://stackoverflow.com/questions/312627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Routing without namespace in Rails (2.2) Related to the question asked here -- Default segment name in rails resources routing. Having trouble in edge rails trying to generate resources without a namespace prefix (i.e. /:apple_id/oranges/). Using the plugin gives me //:apple_id/oranges? Any easier way to do this? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how many classes per package? methods per class? lines per method? I have to give a general note to some huge Java project for which I have but little visibility and I was wondering if there were any guidelines for determining: * *what number of classes per package can be considered right, to low, or to high (thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/312642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Incrementing C pointers I thought that if a c pointer pointing to a char array was incremented then it would point to the next element in that array. But when I tried this I found that I had to increment it twice. Trying the increment using sizeof(char) I found that adding the size of a char was too much so it had t...
{ "language": "en", "url": "https://stackoverflow.com/questions/312648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to use size of file inside Ant target I'm currently in the process of replacing my homebrewn build script by an Ant build script. Now I need to replace various tokens by the size of a specific file. I know how to get the size in bytes via the <length> task and store in in a property, but I need the size in kilob...
{ "language": "en", "url": "https://stackoverflow.com/questions/312652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to get rid of the white rectangle flashing that occurs during Java applet loading? While an applet is loading, it displays a white rectangle for a split second. How can we get rid of it? A: If you are targeting Java 6 you can try the new plugin options for displaying a loading screen. http://www.oracle.com/tech...
{ "language": "en", "url": "https://stackoverflow.com/questions/312672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Python, optparse and file mask if __name__=='__main__': parser = OptionParser() parser.add_option("-i", "--input_file", dest="input_filename", help="Read input from FILE", metavar="FILE") (options, args) = parser.parse_args() print options result is $ pyth...
{ "language": "en", "url": "https://stackoverflow.com/questions/312673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: xampp includes not working First off, how do I know if my html file is running on localhost in Xampp? Is there a tutorial on how to manage files/directories and get that all working under htdocs? Is there a good tutorial on how to setup includes? I want to use "includes" in Xampp with my html. Can I use both html in...
{ "language": "en", "url": "https://stackoverflow.com/questions/312674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to remove excess whitespace added to code by FTP program? This happens repeatedly and is very annoying. I upload some PHP code to a client's server. A few weeks pass. They ask for a change to be made and I re-download the code as they've made some changes. However, my code which used to be neat and tidy the last...
{ "language": "en", "url": "https://stackoverflow.com/questions/312688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Howto dynamicly import a .js file in a .js file? Duplicate question - see: How do you dynamically load a javascript file? (Think C’s #include) Is there a javascript equivalent of @import? Because using the following way of including another javascript file from within a javascript file doesn't seem very nice and cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/312692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Python: Problem with overloaded constructors WARNING: I have been learning Python for all of 10 minutes so apologies for any stupid questions! I have written the following code, however I get the following exception: Message File Name Line Position Traceback Node 31 e...
{ "language": "en", "url": "https://stackoverflow.com/questions/312695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: is it safe to keep database connections open for long time I have a .net client application which is connected to a remote database. Is it safe to keep a single connection open for the lifetime of the client (hours)? Does the answer hold if I have multiple (10 or 100) clients running? A: While the specific details ...
{ "language": "en", "url": "https://stackoverflow.com/questions/312702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }