text
stringlengths
8
267k
meta
dict
Q: Unable to run assembly program I have just started reading Introduction to 80x86 Assembly Language and Computer Architecture.I am trying to use NASM, to run the first example shown in chapter 3 ,but unsuccessfully.Has anyone read the book,and run the examples? A: According to Google Books, you should be using MASM,...
{ "language": "en", "url": "https://stackoverflow.com/questions/146368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Visual Studio support for new C / C++ standards? I keep reading about C99 and C++11 and all these totally sweet things that are getting added to the language standard that might be nice to use someday. However, we currently languish in the land of writing C++ in Visual Studio. Will any of the new stuff in the standa...
{ "language": "en", "url": "https://stackoverflow.com/questions/146381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: Server cert and Client Truststore I am trying to call a webservice using ssl. How do i get the relevant server cert so that i can import it into my truststore? I know about the use of property com.ibm.ssl.enableSignerExchangePrompt from a main method but i would add the server cert to my truststore manually. I dont ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the best way to produce random double on POSIX? I'd like to get uniform distribution in range [0.0, 1.0) If possible, please let the implementation make use of random bytes from /dev/urandom. It would also be nice if your solution was thread-safe. If you're not sure, please indicate that. See some solution I...
{ "language": "en", "url": "https://stackoverflow.com/questions/146387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is a good search engine for embedding in a web site I am thinking of changing my web site's homegrown search engine. Before I break out Visual Studio, I wondered if anyone can suggest an alternative that gives me what I need. This being: * *Works with an ASP.NET site (is a .NET project) *Creates a file-base...
{ "language": "en", "url": "https://stackoverflow.com/questions/146388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Java printf functionality for collections or arrays In python you can use a tuple in a formatted print statement and the tuple values are used at the indicated positions in the formatted string. For example: >>> a = (1,"Hello",7.2) >>> print "these are the values %d, %s, %f" % a these are the values 1, Hello, 7.200...
{ "language": "en", "url": "https://stackoverflow.com/questions/146390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Annotations on Interfaces? I can't figure out a use case for being able to annotate interfaces in Java. Maybe someone could give me an example? A: A use case that I am working with is javax/hibernate bean validation, we are using interfaces to help us on avoiding to define validations on every specific class. publ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do I execute any command editing its file (argument) "in place" using bash? I have a file temp.txt, that I want to sort with the sort command in bash. I want the sorted results to replace the original file. This doesn't work for example (I get an empty file): sortx temp.txt > temp.txt Can this be done in one li...
{ "language": "en", "url": "https://stackoverflow.com/questions/146435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "111" }
Q: Way to stop a program from starting up using c#? Here's the idea, I'd like to make a service? that will look for a certain program starting up and dissallow it unless certain conditions are met. Let's say I have a game I want to stop myself from playing during the week. So if I start it up on any day other than Fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/146439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are POD types in C++? I've come across this term POD-type a few times. What does it mean? A: POD stands for Plain Old Data - that is, a class (whether defined with the keyword struct or the keyword class) without constructors, destructors and virtual members functions. Wikipedia's article on POD goes into a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/146452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1195" }
Q: Tutorials for Wii programming I have a Nintendo Wii, and I've got devkitpro working to load some simple programs. The example source code that I've been able to find is very simplistic, such as drawing and rotating a simple shape. I've been looking for more in depth tutorials, and I haven't been able to find much...
{ "language": "en", "url": "https://stackoverflow.com/questions/146466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: How do I get the resolution of the main monitor in Mac OS X in C++? I have a graphical app that needs to test the resolution of the display it is starting up on in Mac OS X to ensure it is not larger than the resolution. This is done before the window itself is initialized. If there is more than one display, it n...
{ "language": "en", "url": "https://stackoverflow.com/questions/146480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the windows API to change Screen refresh rate? Can some one specify the windows API, one need to use in order to be able to change programmatically the screen refresh rate? A: you can use ChangeDisplaySettings as described before. But you should use EnumDisplaySettings to get a list of valid combinations of...
{ "language": "en", "url": "https://stackoverflow.com/questions/146484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are the quintessential tools and resources for hosting Rails applications on Amazon's EC2? I'm looking for: * *documentation *blogs *books *ready-to-use pre-configured slice images *services *wrappers *libraries *tutorials ...anything that would make it easier to start using EC2 to host a Rails appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/146486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: JTable column spanning I am trying to make a JTable that has column spans available. Specifically, I am looking to nest a JTable inside another JTable, and when the user clicks to view the nested table, it should expand to push down the rows below and fill the empty space. This is similar to what you see in MS Acces...
{ "language": "en", "url": "https://stackoverflow.com/questions/146498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I conditionally display a field in Infopath? I'm trying to do the following in infopath: I have to choose between 2 options (with bullets), and depending on this, if we choose Option1, I need to display a text field to enter more details, but if Option2 is chosen, I don't need this additional field. I'm not s...
{ "language": "en", "url": "https://stackoverflow.com/questions/146504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to programmatically simulate XP's "Windows Security" start menu option on Windows 2000 I'm trying to find a way to invoke the Ctrl+Alt+Delete dialog on a Windows 2000 computer that I'm connected to via Remote Desktop. Windows XP and 2003 include a new start menu command called "Windows Security" that does this, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I successfully pass a function reference to Django’s reverse() function? I’ve got a brand new Django project. I’ve added one minimal view function to views.py, and one URL pattern to urls.py, passing the view by function reference instead of a string: # urls.py # ------- # coding=utf-8 from django.conf.urls...
{ "language": "en", "url": "https://stackoverflow.com/questions/146522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is the fastest way to get to documentation for Ruby? Say I'm writing some ruby code and I want to use the standard Date type to get the current date. Instead of using a search engine, is there a faster way to find the documentation for this class? I know I can get the methods for Date by typing Date.methods, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/146528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Delete all but the 50 newest rows I have a SQL table with news stories and Unix timestamps. I'd like to only keep the 50 newest stories. How would I write an SQL statement to delete any amount of older stories? A: Blockquote delete from table where id not in ( select id from table order by id desc lim...
{ "language": "en", "url": "https://stackoverflow.com/questions/146531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to version control my SQL server stored procedures? What is the best way to version control my database objects? I'm using Visual studio 2005/2008 and SQL server 2005. I would prefer a solution which can be used with SVN. A: I use SVN for all of my table/sproc/function source control. I couldn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/146543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Do you use the "global" statement in Python? I was reading a question about the Python global statement ( "Python scope" ) and I was remembering about how often I used this statement when I was a Python beginner (I used global a lot) and how, nowadays, years later, I don't use it at all, ever. I even consider it a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/146557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Crafting .webloc file I'm writing a program (for Mac OS X, using Objective-C) and I need to create a bunch of .webloc files programmatically. The .webloc file is simply file which is created after you drag-n-drop an URL from Safari's location bar to some folder. Generally speaking, I need an approach to create items...
{ "language": "en", "url": "https://stackoverflow.com/questions/146575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Why is the Java main method static? The method signature of a Java mainmethod is: public static void main(String[] args) { ... } Is there a reason why this method must be static? A: It's just a convention, but probably more convenient than the alternative. With a static main, all you need to know to invoke a J...
{ "language": "en", "url": "https://stackoverflow.com/questions/146576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "537" }
Q: Links with and without the .aspx extention Is is possible to configure a server to allow using links with and without using the .aspx extention. If yes, how could I go about setting this up. I'm working on a client site who is using umbraco. I know it has built in friendly URL capibility. Unfortunatly the site is a...
{ "language": "en", "url": "https://stackoverflow.com/questions/146582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Upgrading DOS Batch files for Windows Has anyone had any recent requirements for programming automated DOS Batch style tasks on a Windows box? I've got some automation to do and I'd rather not sit and write a pile of .BAT files in Notepad if there is a better way of automating these tasks: mainly moving of files und...
{ "language": "en", "url": "https://stackoverflow.com/questions/146602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why isn't my NHibernate bag collection setting the 'parent id' of the children dynamically? I have a new object with a collection of new objects within it on some property as an IList. I see through sql profiler two insert queries being executed.. one for the parent, which has the new guid id, and one for the child,...
{ "language": "en", "url": "https://stackoverflow.com/questions/146604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: I'm using Python regexes in a criminally inefficient manner My goal here is to create a very simple template language. At the moment, I'm working on replacing a variable with a value, like this: This input: The Web Should produce this output: The Web This Is A Test Variable I've got it working. But looking at...
{ "language": "en", "url": "https://stackoverflow.com/questions/146607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Sieve of Eratosthenes in Erlang I'm in the process of learning Erlang. As an exercise I picked up the Sieve of Eratosthenes algorithm of generating prime numbers. Here is my code: -module(seed2). -export([get/1]). get(N) -> WorkList = lists:duplicate(N, empty), get(2, N, WorkList, []). get(thats_the_end,...
{ "language": "en", "url": "https://stackoverflow.com/questions/146622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: C header file loops I have a couple of header files, which boil down to: tree.h: #include "element.h" typedef struct tree_ { struct *tree_ first_child; struct *tree_ next_sibling; int tag; element *obj; .... } tree; and element.h: #include "tree.h" typedef struct element_ { tree *tree_pare...
{ "language": "en", "url": "https://stackoverflow.com/questions/146657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I get a floating footer to stick to the bottom of the viewport in IE 6? I know this would be easy with position:fixed, but unfortanately I'm stuck with supporting IE 6. How can I do this? I would rather use CSS to be clean, but if I have to use Javascript, that's not the end of the world. In my current imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/146659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I build an Adobe Air project with Maven? Has anyone successfully built an Adobe Air application with Maven? If so, what are the steps to get it working? I have been trying to use flex-mojos to build an Air applications. When I set the packaging type to "aswf", as suggested in the DashboardSamplePom, Maven ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I parse a number from a String that may have a leading zero? In ruby I am parsing a date in the following format: 24092008. I want to convert each section (year, month, date) into a number. I have split them up using a regex which produces three Strings which I am passing into the Integer constructor. date ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Glassfish: Deploying application in domain failed; Error loading deployment descriptors - invalid bit length repeat I'm trying to deploy a .war trough the server's web interface. Getting the same error when deploying it as an exploded directory with IDEA. What is the solution to this problem? A: The message points ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is _VERSION the only global variable left in Lua 5.1? Puzzled by the Lua 5.0 documentation references to things like _LOADED, LUA_PATH, _ALERT and so on (that I could not use in Lua 5.1), I discovered all of those have been removed and the functionality put elsewhere. Am I right in thinking that the only one global ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Use the serialVersionUID or suppress warnings? I want to create a class that, for example, extends HttpServlet? My compiler warns me that my class should have a serialVersionUID. If I know that this object will never be serialized, should I define it or add an annotation to suppress those warnings? What would you do...
{ "language": "en", "url": "https://stackoverflow.com/questions/146715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Development with a tablet, not a mouse Lifehacker had a post a couple days ago asking people about the best mouse you've ever had and it appears some people have traded their mouse for a tablet. I'm curious if anyone here has traded their mouse in for a tablet? Does it work well for development? Looking for pros a...
{ "language": "en", "url": "https://stackoverflow.com/questions/146730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I go with SSIS or multithreaded C# application to load flat files in to database? Within SQL Server Integration Services (SSIS) there is the ability to setup a connection to a flat file that can hold millions of records and have that data pushed to a SQL DB. Furthermore, this process can be called from a C# a...
{ "language": "en", "url": "https://stackoverflow.com/questions/146732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Closures in PHP... what, precisely, are they and when would you need to use them? So I'm programming along in a nice, up to date, object oriented fashion. I regularly make use of the various aspects of OOP that PHP implements but I am wondering when might I need to use closures. Any experts out there that can shed s...
{ "language": "en", "url": "https://stackoverflow.com/questions/146737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: How do I programmatically cycle a router? I have the need to be able to cycle my linksys router via a program, the reason I want to do this is complex, so let's just assume there is no better option. Is there anyway to do this? I think there is because when I install a firmware update to the router via the admin co...
{ "language": "en", "url": "https://stackoverflow.com/questions/146741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you store an Integer and Boolean key value pair in an un-ordered collection? I need to store a list of key value pairs of (integer, boolean) in .NET When I use a dictionary it re-orders them. Is there a built in collection that will handle this. A: List<KeyValuePair<int, bool>> l = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why are user created namespaces not being recognized by Visual Studio 2008? For some reason when I create a new namespace in Visual Studio 2008 its not being recognized. I'm using asp.net mvc, I don't know if that has anything to do with it. Has anyone come across this before?...and how do you fix it? Also is there...
{ "language": "en", "url": "https://stackoverflow.com/questions/146745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any reason to have SQL Server 2005 and 2008 installed on same machine? I'm setting up a new development server and want to install the latest version of SQL Server 2008 Express. Will our existing sql2005 databases work with 2008 without modification? If so is there any reason to install both versions on the same s...
{ "language": "en", "url": "https://stackoverflow.com/questions/146750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What SNMP library for .NET makes traps, sets or gets simple? What are the best SNMP libraries to use with .NET? Specifically for listening for traps or sending set or get requests. A: I am using the Sharp SNMP Suite (#SNMP) : LGPL, Mono compatible, developed in C# 3.0, has very good API. A: Hi as the author of #S...
{ "language": "en", "url": "https://stackoverflow.com/questions/146766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: In what namespace should you put interfaces relative to their implementors? Specifically, when you create an interface/implementor pair, and there is no overriding organizational concern (such as the interface should go in a different assembly ie, as recommended by the s# architecture) do you have a default way of o...
{ "language": "en", "url": "https://stackoverflow.com/questions/146777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: In Django, where is the best place to put short snippets of HTML-formatted data? This question is related to (but perhaps not quite the same as): Does Django have HTML helpers? My problem is this: In Django, I am constantly reproducing the basic formatting for low-level database objects. Here's an example: I have tw...
{ "language": "en", "url": "https://stackoverflow.com/questions/146789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Any way to un-register a WPF dependency property? I'm running into an unusual problem in my unit tests. The class I'm testing creates a dependency property dynamically at runtime and the type of that dependency property can vary depending on the circumstances. While writing my unit tests, I need to create the depend...
{ "language": "en", "url": "https://stackoverflow.com/questions/146794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to read config file entries from an INI file I can't use the Get*Profile functions because I'm using an older version of the Windows CE platform SDK which doesn't have those. It doesn't have to be too general. [section] name = some string I just need to open the file, check for the existence of "section", and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/146795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I rename a SharePoint virtual machine I am using virtual machines for development,but each time I need a new VM, I copy the file and create a new server, but I need a new name for the server to add it to our network. After renaming the server, the Sharepoint sites have many errors and do not run. A: Actually...
{ "language": "en", "url": "https://stackoverflow.com/questions/146801", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Googlebot + IFrames? How does googlebot treat iframes? Does it follow the src attribute like a link? Is the iframe content analyzed as if it was part of the page where it is included? A: IFrames are sometimes used to display content on web pages. Content displayed via iFrames may not be indexed and available to ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/146805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I tell what type of computers are in a coffee shop? This is more a thought experiment than anything. I'm wondering what it would take to detect everything I legally can about the laptops in a hotspot. My first thought was to grab every MAC address I can and extract the maker from the first 24bit. The questio...
{ "language": "en", "url": "https://stackoverflow.com/questions/146807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Struts2 Annotation-Validators for Invalid Chars While using Struts2, I am using several annotations to do my validations inside the Model class, in the set() methods, like: @RequiredStringValidator(message = "Name is required") @StringLengthFieldValidator(message = "Name must be between 5 and 60 characters", ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The exec family I have a project the requires the use of the exec family. My project consist of making an interactive shell. The shell will implement a few basic commands like cd, ls, echo, etc. I have been researching the use of exec, but have not found a useful site. Any suggested links would help. int ret; ret = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Comprehensive server-side validation I currently have a fairly robust server-side validation system in place, but I'm looking for some feedback to make sure I've covered all angles. Here is a brief outline of what I'm doing at the moment: * *Ensure the input is not empty, or is too long *Escape query strings to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why does my "out of the box" SharePoint Navigation look like it is leaking memory My site has quite a deep navigation structure and quite often it looks like the out of the box navigation is leaking memory, especially the SPWeb objects. The log message looks like Potentially excessive number of SPRequest objects (1...
{ "language": "en", "url": "https://stackoverflow.com/questions/146841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is D a credible alternative to Java and C++? Is the D language a credible alternative to Java and C++? What will it take to become a credible alternative? Should I bother learning it? Does it deserve evangelizing? The main reason I ask is that with the new C++ standard (c++0x) almost here, it's clear to me that the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "165" }
Q: How does the UTF-8 support of TinyXML work? I'm using TinyXML to parse/build XML files. Now, according to the documentation this library supports multibyte character sets through UTF-8. So far so good I think. But, the only API that the library provides (for getting/setting element names, attribute names and values,...
{ "language": "en", "url": "https://stackoverflow.com/questions/146873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Tips for speeding up build time on Linux using ANT, Javacc, JUnit and compiling Java classes We have a large codebase that takes approx 12 minutes on the developer machines to auto-generate some Java 5 classes using JavaCC and then compiles all the classes as well as running the units test. The project consists of m...
{ "language": "en", "url": "https://stackoverflow.com/questions/146888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Anyone successfully using Commission Junction API? Is anyone successfully using the CJ web services? I just keep getting java.lang.NullPointerExceptions even though my app is .net (clearly their errors). CJ support doesn't even know what a web service is. I googled and found many people getting this or other errors....
{ "language": "en", "url": "https://stackoverflow.com/questions/146890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Key concepts to learn in Assembly I am a firm believer in the idea that one of the most important things you get from learning a new language is not how to use a new language, but the knowledge of concepts that you get from it. I am not asking how important or useful you think Assembly is, nor do I care if I never u...
{ "language": "en", "url": "https://stackoverflow.com/questions/146893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I access UserId in ASP.NET Membership without using Membership.GetUser()? How can I access UserId in ASP.NET Membership without using Membership.GetUser(username) in ASP.NET Web Application Project? Can UserId be included in Profile namespace next to UserName (System.Web.Profile.ProfileBase)? A: I decided t...
{ "language": "en", "url": "https://stackoverflow.com/questions/146896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Error with bindParam overwriting in PHP This is a bit of a weird one, and I could well be coding this completely wrong - hence why I've hit the same error twice in two days, in completely different parts of a script. The code I'm using is below: public function findAll( $constraints = array() ) { // Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/146897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to correctly write dynamic files to an FTP server? I'm using C# and i have written a locally installed application that dynamically generates files which need to be on an FTP server. Do i generate them to disk then upload them to the FTP server? or is there a way to open a stream to an FTP server and write the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/146901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Top & httpd - demystifying what is actually running I often use the "top" command to see what is taking up resources. Mostly it comes up with a long list of Apache httpd processes, which is not very useful. Is there any way to see a similar list, but such that I could see which PHP scripts etc. those httpd processes...
{ "language": "en", "url": "https://stackoverflow.com/questions/146906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is MySQL mostly doing? Is there any way to see an overview of what kind of queries are spent the most time on every day on MySQL? A: Yes, mysql can create a slow query log. You'll need to start mysqld with the --log-slow-queries flag: mysqld --log-slow-queries=/path/to/your.log Then you can parse the log usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/146914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript Events: Getting notified of changes in an control value I have the following problem: I have an HTML textbox (<input type="text">) whose contents are modified by a script I cannot touch (it is my page, but i'm using external components). I want to be notified in my script every time the value of that tex...
{ "language": "en", "url": "https://stackoverflow.com/questions/146916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I tell if a given path is a directory or a file? (C/C++) I'm using C and sometimes I have to handle paths like * *C:\Whatever *C:\Whatever\ *C:\Whatever\Somefile Is there a way to check if a given path is a directory or a given path is a file? A: Call GetFileAttributes, and check for the FILE_ATTRIBU...
{ "language": "en", "url": "https://stackoverflow.com/questions/146924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Should I not subclass by type of object if there are many types? I am working with a log of events where there are about 60 different "types" of events. Each event shares about 10 properties, and then there are subcategories of events that share various extra properties. How I work with these events does depend on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/146931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What can you do to a legacy codebase that will have the greatest impact on improving the quality? As you work in a legacy codebase what will have the greatest impact over time that will improve the quality of the codebase? * *Remove unused code *Remove duplicated code *Add unit tests to improve test coverage w...
{ "language": "en", "url": "https://stackoverflow.com/questions/146936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: NHibernate + JSON/Ajax Parent/Child Relationships? Why this isn't working? I have a typical parent/child relationship. Writing news in .NET and adding children works fine, NHibernate plays nice and adds the correct relationships. However, when passing a JSON object from the client to some method that serializes my J...
{ "language": "en", "url": "https://stackoverflow.com/questions/146942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Help improve this INI parsing code This is something simple I came up with for this question. I'm not entirely happy with it and I saw it as a chance to help improve my use of STL and streams based programming. std::wifstream file(L"\\Windows\\myini.ini"); if (file) { bool section=false; while (!file.eof()) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should I be extending this class? (PHP) I'm creating an ORM in PHP, and I've got a class 'ORM' which basically creates an object corresponding to a database table (I'm aiming for similar to/same functionality as an ActiveRecord pattern.) ORM itself extends 'Database', which sets up the database connection. So, I ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/146963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can SQLExpress 2005 and 2008 be installed on same machine without issue? I would like to install SQLExpress2005 as an instance "SQLExpress" and install SQLExpresss2008 as "SQLExpress2008" instance. Is there any problem with doing this on the same machine? A: As Long as you give them distinct names, there shouldn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/146970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Powershell script to download file, having trouble setting up a secure connection I'm making an automated script to read a list from a site posting the latest compiled code. That's the part I've already figured out. The next part of the script is to grab that compiled code from a server with an Untrusted Cert. Thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/146973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Search Engines Inexact Counting (about xxx results) When you search in Google (i'm almost sure that Altavista did the same thing) it says "Results 1-10 of about xxxx"... This has always amazed me... What does it mean "about"? How can they count roughly? I do understand why they can't come up with a precise figure in...
{ "language": "en", "url": "https://stackoverflow.com/questions/146980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What #defines are set up by Xcode when compiling for iPhone I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want something like #ifdef IPHONE_SDK.... Presumably Xcode defines something, but I can't see anything under project properties, and Google isn't much hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/146986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: Is writing "this." before instance variable and methods good or bad style? One of my nasty (?) programming habits in C++ and Java is to always precede calls or accesses to members with a this. For example: this.process(this.event). A few of my students commented on this, and I'm wondering if I am teaching bad habits...
{ "language": "en", "url": "https://stackoverflow.com/questions/146989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Image processing server I'm looking for a free, preferably open source, http image processing server. I.e. I would send it a request like this: http://myimageserver/rotate?url=http%3A%2F%2Fstackoverflow.com%2FContent%2FImg%2Fstackoverflow-logo-250.png&angle=90 and it would return that image rotated. Features wanted...
{ "language": "en", "url": "https://stackoverflow.com/questions/146994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Where to put common writable application files? I thought that CSIDL_COMMON_APPDATA\company\product should be the place to put files that are common for all users of the application and that the application can modify, however, on Vista this is a read-only location, unless modified by the installer (as per MSDN - ht...
{ "language": "en", "url": "https://stackoverflow.com/questions/147016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: When creating a web control should you override OnLoad or implement Page_Load When you create a new web user control in visual studio it by default adds the Page_Load event. What is the advantage to using this rather than overriding the base OnLoad event on the control? Is it just that the Page_Load event fires be...
{ "language": "en", "url": "https://stackoverflow.com/questions/147033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Automatically adding specified text at beginning of files in VS 2008 Is there a way to have Visual Studio 2008 automatically add heading information to files? For example, "Copyright 2008" or something along those lines. I've been digging through the options, but nothing seems to be jumping out at me. A: I assume y...
{ "language": "en", "url": "https://stackoverflow.com/questions/147040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it correct to use inheritance instead of name aliasing in c#? In other words, is it correct to use: public class CustomerList : System.Collections.Generic.List<Customer> { /// supposed to be empty } instead of: using CustomerList = System.Collections.Generic.List<Customer> I'd rather use the first approach ...
{ "language": "en", "url": "https://stackoverflow.com/questions/147049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: REGEX: Grabbing everything until a specific word ex: <a><strike>example data in here</strike></a> I want everything inside the a tag, to the end /<a>([^<]*)<\/a>/ It works when there are no additional tags within the <a> tag, but what if there are? I want to know if you can tell it to grab everything up to [^</a...
{ "language": "en", "url": "https://stackoverflow.com/questions/147052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Outlook attachments.Add() is not showing in mail body I'm creating a new mail item, in C# VS-2008 outlook 2007, and attaching a file. The first issue is that I don't see an attachment area under the subject line showing the attachment. If I send the e-mail its properties show that there is an attachment and the e-...
{ "language": "en", "url": "https://stackoverflow.com/questions/147053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Unix path-searching C function I am programming a UNIX shell and I have to use the execv() system call to create a process. One of the parameters for execv() is the filepath for the executable. So if somebody types in /bin/ls, it will run the ls executable. But what I need is a function such that when ls is typed,...
{ "language": "en", "url": "https://stackoverflow.com/questions/147057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does iPhone support XML-RPC? Does iPhone support XML-RPC, Is their any open source framework which I can use? A: "Airsource Ltd" is really really incredibly wrong about that document. That document is specific to Mac OS X and NOT the iPhone. In fact (almost) all Apple iPhone documentation is hidden away behind a lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/147062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can a service control its own state? I have a standard windows server that inherits from the ServiceBase class. On the OnStart method I want to check for certain conditions before I get to the main purpose of what my service does. For example: protected override void OnStart(string[] args) { if (condition == f...
{ "language": "en", "url": "https://stackoverflow.com/questions/147083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How are permissions inherited on an Ubuntu Server? Sorry for the second newbie question, I'm a developer not a sysadmin so this is all quite new to me. I hope I can explain myself clearly! Here goes. Here's what I did: * *Logged into the root account *Created the accounts 'richard' and 'austin' *Created the gro...
{ "language": "en", "url": "https://stackoverflow.com/questions/147084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are there any free ways to turn an html page into an image with .net I want to take html, including the text and images and turn it into one image containing everything. Is there a free way to do it? This is using .net 3.5. See also: Server Generated web screenshots? What is the best way to create a web page thumbn...
{ "language": "en", "url": "https://stackoverflow.com/questions/147100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's a solid, full-featured open rich text representation usable on the Web? I'm looking for an internal representation format for text, which would support basic formatting (font face, size, weight, indentation, basic tables, also supporting the following features: * *Bidirectional input (Hebrew, Arabic, etc.)...
{ "language": "en", "url": "https://stackoverflow.com/questions/147104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why do discussions of "swappiness" act like information can only be in one place at a time? I've been reading up on Linux's "swappiness" tuneable, which controls how aggressive the kernel is about swapping applications' memory to disk when they're not being used. If you Google the term, you get a lot of pages like t...
{ "language": "en", "url": "https://stackoverflow.com/questions/147125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to diagnosis app crash from OS X error log? Short Q.: What does this exception mean? "EXC_BAD_ACCESS (0x0001)" Full Q.: How can I use this error log info (and thread particulars that I omitted here) to diagnosis this app crash? (NB: I have no expertise with crash logs or OS kernels.) In this case, my email clien...
{ "language": "en", "url": "https://stackoverflow.com/questions/147126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: c# downcasting when binding to and interface Is there a better way of binding a list of base class to a UI other than downcasting e.g: static void Main(string[] args) { List<Animal> list = new List<Animal>(); Pig p = new Pig(5); Dog d = new Dog("/images/dog1.jpg"); list.Add(p); list.Add(d...
{ "language": "en", "url": "https://stackoverflow.com/questions/147129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why doesn't C++ have a garbage collector? I'm not asking this question because of the merits of garbage collection first of all. My main reason for asking this is that I do know that Bjarne Stroustrup has said that C++ will have a garbage collector at some point in time. With that said, why hasn't it been added? T...
{ "language": "en", "url": "https://stackoverflow.com/questions/147130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "297" }
Q: Easy way to scroll overflow text on a button? Does anyone have any examples or resources where i might find information on scrolling text which is too long to display in a button control? I'm thinking something along these lines. * *Display as much text will fit within the current rect with a '...' at the end to...
{ "language": "en", "url": "https://stackoverflow.com/questions/147154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SMS + Web app: Providers of SMS "Long codes" for use by U.S. carrier subscribers within U.S.? Q.: How to get a cellular phone SMS "Long code" for use by U.S. carrier subscribers within U.S.? Background: I'm building a web app that receives queries from/sends answers to cell phones. The app design (and business model...
{ "language": "en", "url": "https://stackoverflow.com/questions/147164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the benefit of global resource URIs (i.e. addressability)? What is the benefit of referencing resources using globally-unique URIs (as REST does) versus using a proprietary id format? For example: * *http://host.com/student/5 *http://host.com/student?id=5 In the first approach the entire URL is the ID. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/147172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: `testl` eax against eax? I am trying to understand some assembly. The assembly as follows, I am interested in the testl line: 000319df 8b4508 movl 0x08(%ebp), %eax 000319e2 8b4004 movl 0x04(%eax), %eax 000319e5 85c0 testl %eax, %eax 000319e7 7407 je 0x000319f0 I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/147173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: What is a good, simple way to compute ISO 8601 week number? Suppose I have a date, i.e. year, month and day, as integers. What's a good (correct), concise and fairly readable algorithm for computing the ISO 8601 week number of the week the given date falls into? I have come across some truly horrendous code that mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/147178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I convert my Java program to an .exe file? If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file? I also need an installer for my program. A: I would say launch4j is the best tool for converting a java source code(.java) to .exe file You can even bundle a jre w...
{ "language": "en", "url": "https://stackoverflow.com/questions/147181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "572" }