text
stringlengths
8
267k
meta
dict
Q: Tree (directed acyclic graph) implementation I require a tree / directed acyclic graph implementation something like this: public class TreeNode<K, V> { private K key; // 'key' for this node, always present private V value; // 'value' for this node, doesn't have to be set private TreeNode<K, V> parent; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to use apache's mod_rewrite rewriterule without changing relative paths I've the following rewrite rule in .htaccess: RewriteRule ^groups/([^/\.]+)/?$ groupdetail.php?gname=$1 [L,NC] This takes something like www.example.com/groups/groupname and calls www.example/groupdetail.php?gname=groupname. And it works ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can I make Hibernate transparently avoid string duplication in the database? I have a Java program that uses Hibernate and MySQL to store a lot of tracing data about the use of the Eclipse IDE. This data contains a lot of strings such as method names, directories, perspective name, etc. For example, an event object...
{ "language": "en", "url": "https://stackoverflow.com/questions/144657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery jWYSIWYG inside jquery.ui.tab So I managed to get a page with Ajax ui.tab and in one of the tab I put jWYSIWYG textarea plugin. Unfortunately, I can only see normal textarea. However, accessing the page directly (ie. not using the ajax tab) works. What happened? p/s: I'm new to jQuery / JavaScript / AJAX / CS...
{ "language": "en", "url": "https://stackoverflow.com/questions/144659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python vs. Ruby for metaprogramming I'm currently primarily a D programmer and am looking to add another language to my toolbox, preferably one that supports the metaprogramming hacks that just can't be done in a statically compiled language like D. I've read up on Lisp a little and I would love to find a language t...
{ "language": "en", "url": "https://stackoverflow.com/questions/144661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: How do I restore a deleted file in CVS? I've removed a checked in file from the CVS branch, i.e.: cvs remove -f file.txt cvs commit How do I restore the file? A: I believe that: cvs add file.txt cvs commit file.txt ... will resurrect it from the attic. A: The cvs add did not work for me because my cvs version on...
{ "language": "en", "url": "https://stackoverflow.com/questions/144669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: Problem with update site categories in Eclipse 3.4 I am using Eclipse 3.4 (ganymede official, not the service pack). I have an update site that organizes features into categories; everything looks great in the editor and in the XML. Once the site is online, accessing it in the usual manner tells me that all the feat...
{ "language": "en", "url": "https://stackoverflow.com/questions/144671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to capture an anchor value from url in Ruby on Rails? After updating or creating a record I use url helper to redirect to the part on the page where the record happened to be located: if record.save .... redirect_to records_url, :anchor => "record_" + record_id.to_s end the resulting url will be something l...
{ "language": "en", "url": "https://stackoverflow.com/questions/144675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the point of using a Logging framework? I think I might be missing the point of having a logging framework for your application. In all the small apps I've always written a small "Logging" class and just pass log messages to a method in it which is written to a file. What is the purpose of a 3rd party log...
{ "language": "en", "url": "https://stackoverflow.com/questions/144682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Eclipse start up menu What is the window which is displayed when you first install Eclipse called, and how can I find it? A: Help -> Welcome That thing? A: Do you mean the splash screen? You can change it if you need (for example, your own RCP or a version of Eclipse like IBM's WSAD). Read about branding your appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/144694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is exposing a session's CSRF-protection token safe? Django comes with CSRF protection middleware, which generates a unique per-session token for use in forms. It scans all incoming POST requests for the correct token, and rejects the request if the token is missing or invalid. I'd like to use AJAX for some POST requ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Teaching: Field, Class & Package Relationships In general I think I can convey most programming related concepts quite well. Yet, I still find it hard to summarise the relationship between Fields, Classes and Packages. How do You summarise "Fields", "Classes" and "Packages" and "Their Relationship" ? A: I've faced...
{ "language": "en", "url": "https://stackoverflow.com/questions/144700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I convert a .NET console application to a Winforms or WPF application I frequently start with a simple console application to try out an idea, then create a new GUI based project and copy the code in. Is there a better way? Can I convert my existing console application easily? A: Just add a new Winform, add ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Fuse bindings for php I am writing an application that thus far has been written in PHP, from the interface to the daemons. I have a need to use fuse and would like to continue to use PHP just for consistency. However, there doesn't seem to be bindings for PHP. Python, Java etc have bindings, and I can code in those...
{ "language": "en", "url": "https://stackoverflow.com/questions/144707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Add a namespace to elements I have an XML document with un-namespaced elements, and I want to use XSLT to add namespaces to them. Most elements will be in namespace A; a few will be in namespace B. How do I do this? A: You will need two main ingredients for this recipe. The sauce stock will be the identity transfor...
{ "language": "en", "url": "https://stackoverflow.com/questions/144713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: With what GUI framework is the Mono .NET Windows.Forms implemented? With what GUI framework is the Mono .NET Windows.Forms implemented? Example: KDE, Gnome, X11 itself? A: Mono does not use Qt (KDE) or GTK+ (GNOME) widgets because they don't match up with the Winforms API. Mono implements Winforms on top of their S...
{ "language": "en", "url": "https://stackoverflow.com/questions/144716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET MVC and...YUI? jQuery? Other After the last project I've done using WebForms, I've decided to pass on using that framework in the future. It's great for getting your basic features out there...not so great when you have more complex UI logic. I'm looking at ASP.NET MVC, and like what I see so far. Of course ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Things to consider when writing for touch screen? I'm starting a new project which involves developing an interface for a machine that measures wedge and roundness of lenses and stores the information in a database and reports on it. There's a decent chance we're going to be putting a touch screen on this machine so...
{ "language": "en", "url": "https://stackoverflow.com/questions/144730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do you store request URL's in Javascript to satisfy the DRY principal? Are there any commonly used patterns in Javascript for storing the URL's of endpoints that will be requested in an AJAX application? For example would you create a "Service" class to abstract the URL's away? A: You could create a collection ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When is it good (if ever) to scrap production code and start over? I was asked to do a code review and report on the feasibility of adding a new feature to one of our new products, one that I haven't personally worked on until now. I know it's easy to nitpick someone else's code, but I'd say it's in bad shape (while...
{ "language": "en", "url": "https://stackoverflow.com/questions/144734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Best way to get started with programming other things than your computer? What is the best way to get started with programming things outside of your computer? I don't mean mainstream things like cell phones with APIs. Please assume working knowledge of C/C++ A: It's not a microcontroller, but the Lego Minstorm is...
{ "language": "en", "url": "https://stackoverflow.com/questions/144735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to install/register more than one instances in SqlServer Is it possible to install/register another local server instance in any SqlServer version, besides the default local instance, where only one SqlServer version is installed? A: Yes, it's possible. I have several combinations in my servers. I have one ser...
{ "language": "en", "url": "https://stackoverflow.com/questions/144739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I install the D programming language into C:\Program Files? The prompt says that if I install the software into a directory with spaces: the rebuild build tool used by the D Shared Source System will fail to build and that I will be forced to reinstall in a different location However, I don't like random ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to remove accents and tilde in a C++ std::string I have a problem with a string in C++ which has several words in Spanish. This means that I have a lot of words with accents and tildes. I want to replace them for their not accented counterparts. Example: I want to replace this word: "había" for habia. I tried re...
{ "language": "en", "url": "https://stackoverflow.com/questions/144761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: What are essential topics to have in a Web Services (semester) course? I am in the process of designing a Web Services course for students in an Information Technology program. Some students stop after getting a two-year associates degree, but other students in the program go on to a four-year bachelor's degree. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/144767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does GetWindowRgn fail on Vista? I'm writing a program that uses SetWindowRgn to make transparent holes in a window that belongs to another process. (This is done only when the user explicitly requests it.) The program has to assume that the target window may already have holes which need to be preserved, so bef...
{ "language": "en", "url": "https://stackoverflow.com/questions/144774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# classes in separate files? Should each class in my C# project get its own file (in your opinion)? A: While the one class per file policy is strictly enforced in Java, it's not required by C#. However, it's generally a good idea. I typically break this rule if I have a very small helper class that is only used by...
{ "language": "en", "url": "https://stackoverflow.com/questions/144783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Is there one API to handle the Task Scheduler in XP and Vista? I have a couple applications that I would like to be able to add scheduled tasks from within them. I've been Googling for how to add tasks in both XP and Vista. Apparently, Vista has a new Task Scheduler that is very different from the one in XP. Does an...
{ "language": "en", "url": "https://stackoverflow.com/questions/144789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java Log Viewer Unfortunately, sometimes the only way to debug a program is by going through its long log files. I searched for a decent log viewer for a while now, and haven't found a real solution. The only program that seemed to be most appropriate was Chainsaw with its Socket connector but after a few short use...
{ "language": "en", "url": "https://stackoverflow.com/questions/144807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: jQuery get textarea text Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in FPS games, et...
{ "language": "en", "url": "https://stackoverflow.com/questions/144810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "523" }
Q: is bash getopts function destructive to the command-line options? Can you use the bash "getopts" function twice in the same script? I have a set of options that would mean different things depending on the value of a specific option. Since I can't guarantee that getopts will evaluate that specific option first, I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/144824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Most Useful Attributes I know that attributes are extremely useful. There are some predefined ones such as [Browsable(false)] which allows you to hide properties in the properties tab. Here is a good question explaining attributes: What are attributes in .NET? What are the predefined attributes (and their namespace)...
{ "language": "en", "url": "https://stackoverflow.com/questions/144833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "797" }
Q: Silverlight RC0 Upgrade Issue Since upgrading to RC0 from SL2 B2 the following line of code in my Page.xaml gives a AG_E_PARSER_BAD_PROPERTY_VALUE...anyone have any ideas? I didn't see anything in the breaking changes document. It seems to be the binding mode in the snippet below. ItemsSource="{Binding Mode=TwoWay...
{ "language": "en", "url": "https://stackoverflow.com/questions/144857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Bluetooth APIs in Windows/.Net? I am in the process of writing a Bluetooth scanner that locates and identifies mobile devices in the local vicinity. Is this something that I can accomplish using C#, or do I need to drop down into the C/C++ APIs? My application is targeting Windows XP and Vista. Pointers are apprecia...
{ "language": "en", "url": "https://stackoverflow.com/questions/144862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: JFreeChart XYPlot with labels I'm using an XYPlot in JFreeChart. All the lines on it are XYSeries objects. Both axes are NumberAxis objects. The Y-Axis range is from 0-1, with ticks every .1. Along with displaying the numbers though, I'd like to display text on the Y-Axis, like High/Medium/Low. High would cover .7-1...
{ "language": "en", "url": "https://stackoverflow.com/questions/144872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to judge the strength of a directed acyclic graph? Curious what is recognized as a solid algorithm/approach for judging the strength of a directed acyclic graph - particularly the strength of certain nodes. The main question I have about this can be boiled down to the following two graphs: (if graph doesn't sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/144880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reading call history in iPhone OS I'm doing some research on the feasibility of an iPhone application, and can't find any indication in Apple's documentation that an iPhone app can read the call history of the phone, specifically the number/address book entry called, when, and the duration. Does anyone know if this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/144888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to center a Window in Java? What's the easiest way to centre a java.awt.Window, such as a JFrame or a JDialog? A: This should work in all versions of Java public static void centreWindow(Window frame) { Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); int x = (int) ((dimension.getWidth...
{ "language": "en", "url": "https://stackoverflow.com/questions/144892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "132" }
Q: How to detect design time in a VS.NET 2003 control library project Code below is not working as expected to detect if it is in design mode (VS.Net 2003 - Control Library): if (this.Site != null && this.Site.DesignMode == true) { // Design Mode } else { // Run-time } It is used in a complex user control, derivin...
{ "language": "en", "url": "https://stackoverflow.com/questions/144898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: system wide keyboard hook on X under linux What would be the best approach to install a keyboard hook on Linux (X-windows) in order to trigger some application when some key-combo is pressed?? Is there a way to do this regardless of which window manager is running? The idea is to have an application being called ( o...
{ "language": "en", "url": "https://stackoverflow.com/questions/144901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Speed of DataSet row/column lookups? Recently I had to do some very processing heavy stuff with data stored in a DataSet. It was heavy enough that I ended up using a tool to help identify some bottlenecks in my code. When I was analyzing the bottlenecks, I noticed that although DataSet lookups were not terribly slow...
{ "language": "en", "url": "https://stackoverflow.com/questions/144902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can I display the global variables of a RTP in the shell? In VxWorks, I can display global variables in the shell like so: -> my_global my_global = 0x103c4110: value = 4 = 0x4 Is there a way to do the same with a RTP global variable? A: You can display global variables in a specific RTP by using the command (cmd)...
{ "language": "en", "url": "https://stackoverflow.com/questions/144923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When Using Dynamic Proxies, how do I access the underlying object's Annotations? When Using Dynamic Proxies, how do I access the underlying object's Annotations? Specifically I'm annotating settings of a ORM object with @Column("client_id") and then making a Dynamic Proxy keep track of when the annotated setters are...
{ "language": "en", "url": "https://stackoverflow.com/questions/144936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Exception.Data How have you used the Exception.Data property in C# projects that you've worked on? I'd like answers that suggest a pattern, rather than those that are very specific to your app. A: The exception logger I use has been tweaked to write out all the items in the Data collection. Then for every e...
{ "language": "en", "url": "https://stackoverflow.com/questions/144957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Ruby. How can I copy and paste in irb on Windows? How can I copy and paste in irb (Interactive Ruby Shell) on Windows? A: To copy: Hit alt-space, choose Edit, choose Mark, drag-select the text, hit enter. To paste: Hit alt-space, choose Edit, choose Paste. A: To avoid having to open the drop-down menu and clicking...
{ "language": "en", "url": "https://stackoverflow.com/questions/144959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Can I get the current page sourcecode from a firefox extension? Can this be done? How? I want to write my own extension. Can Get the current page sorcecode in my own extension? A: As Rich says, adding view-source in front of the URL will give you the current page's source code. A keyboard shortcut for this is Ctrl...
{ "language": "en", "url": "https://stackoverflow.com/questions/144960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cannot find the Create GUID tool in VS2005 I have Visual Studio 2005 Professional ENU installed and want to create GUIDs using its Create GUIDs utility. However, I cannot find it under the Tools menu. What should I do to get this utility? Thanks A: <visual studio install>\Common7\Tools\guidgen.exe A: I find it han...
{ "language": "en", "url": "https://stackoverflow.com/questions/144965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing multithreading in C# (code review) Greetings. I'm trying to implement some multithreaded code in an application. The purpose of this code is to validate items that the database gives it. Validation can take quite a while (a few hundred ms to a few seconds), so this process needs to be forked off into it...
{ "language": "en", "url": "https://stackoverflow.com/questions/144980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I make Emacs start without so much fanfare? Every time I start Emacs I see a page of help text and a bunch of messages suggesting that I try the tutorial. How do I stop this from happening? A: You can customize message in minibuffer therefore remove fanfare: ;; Hide advertisement from minibuffer (defun disp...
{ "language": "en", "url": "https://stackoverflow.com/questions/144983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Programming on a Nintendo DS I was reading this answer previously and it got me interested in purchasing a Nintendo DS Lite for learning to program embedded devices. Before I go out and splurge on a DS I had a few questions: * *Are there any restrictions on what you can program? The post I indicated earlier seem...
{ "language": "en", "url": "https://stackoverflow.com/questions/144985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How much overhead is there in calling a function in C++? A lot of literature talks about using inline functions to "avoid the overhead of a function call". However I haven't seen quantifiable data. What is the actual overhead of a function call i.e. what sort of performance increase do we achieve by inlining functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/144993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: What's the future of the web? XHTML 2, HTML 5, or something else? I'm confused by the discussion and advancement both of a new version of HTML and a new version of XHTML. Are they competitors? If so, what is likeliest to be the adopted future of the web? If not, what is the differing non-competing purpose for each? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: End of FILE* pointer is not equal to size of written data Very simply put, I have the following code snippet: FILE* test = fopen("C:\\core.u", "w"); printf("Filepointer at: %d\n", ftell(test)); fwrite(data, size, 1, test); printf("Written: %d bytes.\n", size); fseek(test, 0, SEEK_END); printf("Filepointer is now at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What web server should I use with NetBeans? I haven't been around Java development for 8 years, but am starting to build a NetBeans Web Application. When I walk through the Web Application wizard, it asks for the server I'm going to be using. What would be the best and simplest server for me to start using with Net...
{ "language": "en", "url": "https://stackoverflow.com/questions/145017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: WCF Service authorization patterns I'm implementing a secure WCF service. Authentication is done using username / password or Windows credentials. The service is hosted in a Windows Service process. Now, I'm trying to find out the best way to implement authorization for each service operation. For example, consider ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Are there any considerations needed to be taken running your .net program on x64 vs x86? I believe the architecture type (x86 vs x64) is abstracted away for you when making .Net programs, but are there any other considerations that can cause problems? A: This article has a lot of good issues to be aware of: http://...
{ "language": "en", "url": "https://stackoverflow.com/questions/145026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: 192.168.0.71... What is this special address used for? I have some accesses from 192.168.0.71 on my apache logs. I looked up this IP (because my server almost exclusively takes requests from 127.0.0.1, and I saw that it's reserved for "special purposes." What types of purposes might those be? Edit: I didn't tell ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I stop Emacs from automatically editing my startup file? Emacs edits my .emacs file whenever I use the customization facility, or when I type a command that is disabled by default. Any automatic editing of my configuration makes me nervous. How can I stop Emacs from ever editing my .emacs. file? A: The fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/145043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Simplest way to use "BeanUtils alike" replace Is there any libraries that would allow me to use the same known notation as we use in BeanUtils for extracting POJO parameters, but for easily replacing placeholders in a string? I know it would be possible to roll my own, using BeanUtils itself or other libraries with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript as a functional language I am looking get to grips with functional programming concepts. I've used Javascript for many years for client side scripting in web applications and apart from using prototypes it was all simple DOM manipulation, input validation etc. Of late, I have often read that Javascript ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Is this a reasonable implementation of the quadratic Bézier function in OCaml? A friend came across a quadratic Bézier curve function in his codebase that used a gigantic rats nest of a switch table to perform the computation. He challenged me to find a single, short expression that would allow him to replace the g...
{ "language": "en", "url": "https://stackoverflow.com/questions/145056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: YUV Conversion via a fragment shader I have implemented a YUV to RGB conversion via a fragment shader written in Nvidia's shader language. (Y, U and V are stored in separate textures that are combined via multi texturing in my fragment shader). It works great under OpenGL, but under Direct3D I just can't get the out...
{ "language": "en", "url": "https://stackoverflow.com/questions/145064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Distributing iPhone applications 2.1 vs 2.0 Can iPhone applications compiled against 2.1 be successfully installed via iTunes on a 2.0 device? I know iPhone applications compiled with 2.1 can run on a 2.0 device (assuming they're not using anything new from 2.1). But am not sure if iTunes will let the install take p...
{ "language": "en", "url": "https://stackoverflow.com/questions/145080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it true that there is no need to learn C because C++ contains everything? I am taking a class in C++ programming and the professor told us that there is no need to learn C because C++ contains everything in C plus object-oriented features. However, some others have told me that this is not necessarily true. Can...
{ "language": "en", "url": "https://stackoverflow.com/questions/145096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: What's the best way to benchmark programs in Windows? I need to do some performance benchmarks on .NET programs (C#) in Windows, but I haven't done benchmarking much in the Windows world. I've looked into using the Windows 2000/XP Performance monitor with custom counters for this, but I don't think this is quite wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/145103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: C++ performance vs. Java/C# My understanding is that C/C++ produces native code to run on a particular machine architecture. Conversely, languages like Java and C# run on top of a virtual machine which abstracts away the native architecture. Logically it would seem impossible for Java or C# to match the speed of C...
{ "language": "en", "url": "https://stackoverflow.com/questions/145110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "119" }
Q: What's the best strategy for unit-testing database-driven applications? I work with a lot of web applications that are driven by databases of varying complexity on the backend. Typically, there's an ORM layer separate from the business and presentation logic. This makes unit-testing the business logic fairly straigh...
{ "language": "en", "url": "https://stackoverflow.com/questions/145131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "399" }
Q: What should my Objective-C singleton look like? My singleton accessor method is usually some variant of: static MyClass *gInstance = NULL; + (MyClass *)instance { @synchronized(self) { if (gInstance == NULL) gInstance = [[self alloc] init]; } return(gInstance); } What could I b...
{ "language": "en", "url": "https://stackoverflow.com/questions/145154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "333" }
Q: Something like Explorer's icon grid view in a Python GUI I am making a Python gui project that needs to duplicate the look of a Windows gui environment (ie Explorer). I have my own custom icons to draw but they should be selectable by the same methods as usual; click, ctrl-click, drag box etc. Are any of the gui t...
{ "language": "en", "url": "https://stackoverflow.com/questions/145155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Nintendo DS homebrew with Ada? Note: I know very little about the GCC toolchain, so this question may not make much sense. Since GCC includes an Ada front end, and it can emit ARM, and devKitPro is based on GCC, is it possible to use Ada instead of C/C++ for writing code on the DS? Edit: It seems that the target tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/145157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Inadvertent Session Hijacking Issue With Restful Authentication I'm using the current version of restful_authentication that is found on github and I'm having a bunch of strange session issues. The server seems to be somehow assigning sessions to users it shouldn't be. This only happens when crossing the logged out/...
{ "language": "en", "url": "https://stackoverflow.com/questions/145169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to invoke an interactive elisp interpreter in Emacs? Right now I write expressions in the *scratch* buffer and test them by evaluating with C-x C-e. I would really appreciate having an interactive interpreter like SLIME or irb, in which I could test Emacs Lisp expressions. A: Your best bet is the *scratch* buff...
{ "language": "en", "url": "https://stackoverflow.com/questions/145175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Is HTML considered a programming language? I guess the question is self-explanatory, but I'm wondering whether HTML qualifies as a programming language (obviously the "L" stands for language). The reason for asking is more pragmatic—I'm putting together a resume and don't want to look like a fool for listing thing...
{ "language": "en", "url": "https://stackoverflow.com/questions/145176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: Best way to store tags in a sql server table? What's the best way to store tags for a record? Just use a varchar field? What about when selecting rows that contains tag x? Use the like operator? thanks! A: Use a tags table with the smallest allowable primary key. If there are less than 255 tags use a byte (tinyint)...
{ "language": "en", "url": "https://stackoverflow.com/questions/145185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Algorithm to estimate number of English translation words from Japanese source I'm trying to come up with a way to estimate the number of English words a translation from Japanese will turn into. Japanese has three main scripts -- Kanji, Hiragana, and Katakana -- and each has a different average character-to-word ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/145190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Dynamic .NET language performance? I understand that IronPython is an implementation of Python on the .NET platform just like IronRuby is an implementation of Ruby and F# is more or less OCaml. What I can't seem to grasp is whether these languages perform closer to their "ancestors" or closer to something like C# ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Mounting NTFS filesystem on CentOS 5.2 I want to mount some internal and external NTFS drives in CentOS 5.2, preferably automatically upon boot-up. Doesn't matter if it's read/write or read-only, but read/write would be preferred, if it's safe. Edit: Thanks for all answers, I summarized them below =) A: first do a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do small software patches correct big software? One thing I've always wondered about is how software patches work. A lot of software seems to just release new versions on their binaries that need to be installed over older versions, but some software (operating systems like Windows in particular) seem to be able...
{ "language": "en", "url": "https://stackoverflow.com/questions/145236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Change the value of a text box to its current order in a sortable tab Edit: I have solved this by myself. See my answer below I have set up a nice sortable table with jQuery and it is quite nice. But now i want to extend it. Each table row has a text box, and i want i am after is to, every time a row is dropped, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/145241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Collaboration desktop sharing - Multiple Mouse I'm using Windows Xp and i'm looking for a software where I can see the screen of a remote desktop and be able to show a second mouse (or pointer of any sort) that I can mouse to just show something. I want to work with a peer over the net, pretty much like the XP progr...
{ "language": "en", "url": "https://stackoverflow.com/questions/145246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a free software for creating windows help files for your program? Is there a free software for creating windows help files for your program? I would like something that allows an output of both CHM and HTML files. A: HTML Help Workshop by Microsoft. A: If you're developing for .NET and you're looking to g...
{ "language": "en", "url": "https://stackoverflow.com/questions/145247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Any experience with compiling VBScript? I have a home-spun 2000 lines VBScript script, that has become progressively slow with each additional code I add. It was created as a private debugging aid and now that it has become really useful. I want to polish it and ship it along with our product. I thought I could spee...
{ "language": "en", "url": "https://stackoverflow.com/questions/145262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is "Total Functional Programming"? Wikipedia has this to say: Total functional programming (also known as strong functional programming, to be contrasted with ordinary, or weak functional programming) is a programming paradigm which restricts the range of programs to those which are provably term...
{ "language": "en", "url": "https://stackoverflow.com/questions/145263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: HTTP communication monitoring on OS X What application do you use to monitor HTTP communication on OS X? A: Charles Proxy Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP traffic between their machine and the Internet. This includes requests, respon...
{ "language": "en", "url": "https://stackoverflow.com/questions/145264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Calling C/C++ from Python? What would be the quickest way to construct a Python binding to a C or C++ library? (I am using Windows if this matters.) A: The question is how to call a C function from Python, if I understood correctly. Then the best bet are Ctypes (BTW portable across all variants of Python). >>> from...
{ "language": "en", "url": "https://stackoverflow.com/questions/145270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "596" }
Q: Is Lambda Probe dead? Does anyone know where to get the source code for LambdaProbe? Alternatively, does anyone know if the project could be moved to a community repository? Besides the tool not being updated for over a year, the LambdaProbe website has been down since late September 2008. Background: Lambda Probe...
{ "language": "en", "url": "https://stackoverflow.com/questions/145272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Smart home in Emacs Can you have smart behavior for the home key in Emacs? By smart I mean that instead of going to the character number 0, it should go to the first non-blank character, and go to 0 on a second pressing, and back to the first non-blank in a third and so on. Having smart end would be nice as well. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/145291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: When to use thread pool in C#? I have been trying to learn multi-threaded programming in C# and I am confused about when it is best to use a thread pool vs. create my own threads. One book recommends using a thread pool for small tasks only (whatever that means), but I can't seem to find any real guidelines. What ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/145304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "128" }
Q: Maximum number of threads in a .NET app? What is the maximum number of threads you can create in a C# application? And what happens when you reach this limit? Is an exception of some kind thrown? A: You should be using the thread pool (or async delgates, which in turn use the thread pool) so that the system can d...
{ "language": "en", "url": "https://stackoverflow.com/questions/145312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "165" }
Q: How to set OS X Terminal's default home? For some reason after I installed Boot Camp, my os x terminal started to point to the Boot Camp drive instead of my os x home directory by default! Once in the terminal I know how to switch back an forth and am able to do that, but I was wondering how to make my terminal defa...
{ "language": "en", "url": "https://stackoverflow.com/questions/145321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: WebFocus - is there a free/open source alternative? What is a good free/open source alternative to WebFOCUS? Is there an ASP.NET way of getting info from an OLAP cube? Update: I chose Magnus Smith's answer as the correct one, but Alexmac's answer was also very good! A: I am not aware of free analytical suite. Bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/145322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's a Windows text editor that matches this criteria My Situation: I love e editor, however I'm on a new computer and my license is being used on my old one. I can't exactly afford another license, so I'm looking for a free editor that meets the follow criteria: * *Decent syntax highlighting *Ability to view...
{ "language": "en", "url": "https://stackoverflow.com/questions/145327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I brighten the colors in the rxvt family of terminals? I know how to lighten the colors for certain commands, however I'd like to lighten the standard ansi colors across all commands. A: I found instructions for doing it for Xterm and aterm here: http://gentoo-wiki.com/TIP_Linux_Colors_in_Aterm/rxvt From tho...
{ "language": "en", "url": "https://stackoverflow.com/questions/145335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Checking if array is multidimensional or not? * *What is the most efficient way to check if an array is a flat array of primitive values or if it is a multidimensional array? *Is there any way to do this without actually looping through an array and running is_array() on each of its elements? A: After PHP 7 you...
{ "language": "en", "url": "https://stackoverflow.com/questions/145337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "161" }
Q: Wide exec for C/C++ Is there a wchar_t version of exec[lv][pe] (i.e. an exec that uses wchar_t as path and wchar_t as arguments)? In Windows, I can just do CreateProcessW(process, cmdline), but in *nix, I'm stuck (i.e. no pure POSIX equivalent). I'm trying to add UTF-16 support to my program (an autorun). A: There ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Adding custom log locations to the OS X console application After searching online, the best solution I've found so far is to just make a symbolic link in either "/Library/logs/" or "~/Library/logs/" to get it to show up in the Console application. I'm wondering if it would be possible to add a new directory or log ...
{ "language": "en", "url": "https://stackoverflow.com/questions/145354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Debugging SharePoint 2007 Code How do you debug your SharePoint 2007 code? Since SharePoint runs on a remote server, and I'm developing on a windows xp machine (with the necessary .dll files copied into my GAC), I haven't had much luck with finding easy ways to debug. Breakpoints don't work, etc. The best way I've...
{ "language": "en", "url": "https://stackoverflow.com/questions/145361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you pass an object to a windsor container instead of a type? I have the following class: public class ViewPage<TView,TPresenter> : Page where TView : IView where TPresenter : Presenter<TView> { public ViewPage() { if (!(this is TView)) throw new Exception(String.Format("Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/145364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the default intellisense shortcut in vs2008? I'd like to open the intelligence window without typing a character and then backspacing it. I can't seem to remember the shortcut for this. What is it? A: Ctrl + Space for normal Intellisense, and Ctrl + Shift + Space for parameter Intellisense (e.g. to see what...
{ "language": "en", "url": "https://stackoverflow.com/questions/145371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: PHP's SPL: Do its interfaces involving arrays cover all array properties? Would it be possible to write a class that is virtually indistinguishable from an actual PHP array by implementing all the necessary SPL interfaces? Are they missing anything that would be critical? I'd like to build a more advanced Array obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/145376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }