text
stringlengths
8
267k
meta
dict
Q: How to extend jQuery to make it easier to retrieve the tagName I am looking to extend jQuery so I can easily retrieve the tagName of the first element in a jQuery object. This is what I have come up with, but it doesn't seem to work: $.fn.tagName = function() { return this.each(function() { return this.t...
{ "language": "en", "url": "https://stackoverflow.com/questions/411688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: gtk.Builder, container subclass and binding child widgets I'm trying to use custom container widgets in gtk.Builder definition files. As far as instantiating those widgets, it works great: #!/usr/bin/env python import sys import gtk class MyDialog(gtk.Dialog): __gtype_name__ = "MyDialog" if __name__ == "__...
{ "language": "en", "url": "https://stackoverflow.com/questions/411708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you declare and consume marker interface in f#? How do you replicate this in F#? interface IMarker { // No members here } class MyClass : IMarker { // can contain code } Update: The following code does define marker interface, but none of the answers so far manages to producde class that implements this...
{ "language": "en", "url": "https://stackoverflow.com/questions/411709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Optimal LIKE search in SQL I have a parts database that I am going to be constantly querying for a quoting system. The parts database has 1,400,000+ records in it. The users are just going to start typing part numbers, which they expect the system to be able to find after only a few characters, so I need to be abl...
{ "language": "en", "url": "https://stackoverflow.com/questions/411724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Addressing splint warnings about functions "not used" while they are passed as parameters On a program of me, the splint checker warns: expat-test.c:23:1: Function exported but not used outside expat-test: start A declaration is exported, but not used outside this module. Declaration can use static qualifier. (U...
{ "language": "en", "url": "https://stackoverflow.com/questions/411726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Expression.Or, The parameter 'item' is not in scope I am trying to write a static function to Or two expressions, but recieve the following error: The parameter 'item' is not in scope. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace f...
{ "language": "en", "url": "https://stackoverflow.com/questions/411738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I parse dates and convert time zones in Perl? I've used the localtime function in Perl to get the current date and time but need to parse in existing dates. I have a GMT date in the following format: "20090103 12:00" I'd like to parse it into a date object I can work with and then convert the GMT time/date i...
{ "language": "en", "url": "https://stackoverflow.com/questions/411740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: RubyOnRails 2.2 + Jquery UI Sortable & AJAX: This is how I did it. Is there a better way? In a Rails 2.2 project, I'm having users put together a list of projects into a portfolio object (i.e.: PortfolioHasManyProjects). On the page is a Rails form for regular text, titles etc., as well as 2 sortable lists; the list...
{ "language": "en", "url": "https://stackoverflow.com/questions/411746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Daily builds, is that realistic? In a 1-man shop or even (especially) larger shops, how in the world can you maintain a daily build? If you change the API, or database table etc. you will have to potentially change so many layers in the application, or say the sql initialization script etc etc. How can you expect th...
{ "language": "en", "url": "https://stackoverflow.com/questions/411751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best way to repeat a character in C# What is the best way to generate a string of \t's in C# I am learning C# and experimenting with different ways of saying the same thing. Tabs(uint t) is a function that returns a string with t amount of \t's For example Tabs(3) returns "\t\t\t" Which of these three ways of implem...
{ "language": "en", "url": "https://stackoverflow.com/questions/411752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "991" }
Q: Win32: Graphical debugger that supports symbol server? i'm trying to debug a program, that i don't have the source code for: explorer.exe It's a native Win32 application from Microsoft, and symbols are avilable. All i need now is a (graphical) debugger that supports symbols. * *OllyDbg is a graphical debugger, bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/411756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: mysql: can't set max_allowed_package to anything grater than 16MB I'm not sure if this is the right place to post these kind of questions, if it's not so, please (politely) let me know... :-) I need to save files greater than 16MB on a mysql database from a php site... I've already changed the c:\xampp\mysql\bin\my....
{ "language": "en", "url": "https://stackoverflow.com/questions/411758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Variable number of inputs with Django forms possible? Is it possible to have a variable number of fields using django forms? The specific application is this: A user can upload as many pictures as they want on the image upload form. Once the pictures are uploaded they are taken to a page where they can give the pict...
{ "language": "en", "url": "https://stackoverflow.com/questions/411761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: "Trouble launching CVS process" when using TortoiseCVS When using TortoiseCVS, as I checkout a module, dialog (see screenshot) telling me "Trouble launching CVS process", "The handle is invalid". Any idea on how this would be happening? A: Reinstalling TortoiseCVS solved the problem. I had another concurrent instal...
{ "language": "en", "url": "https://stackoverflow.com/questions/411771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting the Program Process (Service and Daemon) on Linux in C I'd like to know how one would create an application that starts in the background. I'm currently creating a webserver in C as a little project, both to learn some old C and Linux Socket Programming. But my current concern is: * *How do I get the curr...
{ "language": "en", "url": "https://stackoverflow.com/questions/411777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: write-protected virtual pages, catch write Does there exist a way to catch a write into write-protected page? I plan doing a self -like object system where you copy the object to instantiate it. (because it sounds simple and compact thing compared to the rest) Obviously, the objects created for this purpose ought be...
{ "language": "en", "url": "https://stackoverflow.com/questions/411788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting 32-bit Application Into 64-bit Application in C I am presently working on converting a 32-bit application into a 64-bit application in C. This application is currently working on x86 architecture (Windows, osx, Unix, Linux). So, before starting coding, I wanted to know what do I need to consider while con...
{ "language": "en", "url": "https://stackoverflow.com/questions/411798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How do I retrieve a Django model class dynamically? Without having the full module path of a Django model, is it possible to do something like: model = 'User' [in Django namespace] model.objects.all() ...as opposed to: User.objects.all(). EDIT: I am trying to make this call based on command-line input. Is it possi...
{ "language": "en", "url": "https://stackoverflow.com/questions/411810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Possible to call Oracle FUNCTION from .Net using Enterprise Library? I have the following Oracle function: function get_job_no return number is V_job_no number; begin select appwork.tlm_corphier_job.nextval into V_job_no from dual; return V_job_no; end get_job_no; PLEASE NOTE: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I implement QHoverEvent in Qt? I'm just learning Qt with C++. I have successfully implemented signals and slots to trap standard events like ButtonPushed(), etc. However, I want to have a function called when I mouse over and mouse out of a QLabel. It looks like QHoverEvent will do what I need, but I can't se...
{ "language": "en", "url": "https://stackoverflow.com/questions/411823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: NHibernate with string primary key and relationships I've have just been stumped with this problem for an hour and I annoyingly found the problem eventually. THE CIRCUMSTANCES I have a table which users a string as a primary key, this table has various many to one and many to many relationships all off this primary ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Identity insert can anybody please, explain that what does SET IDENTITY INSERT ON AND OFF do. Thanks, Chris A: Suppose you have a table with an auto-increment/identity column. You normally cannot specify values for this column when you do inserts since it is automatically populated. However, if you call SET IDENTI...
{ "language": "en", "url": "https://stackoverflow.com/questions/411829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Application execute complex SQL query My application needs to execute a fairly complicated series of queries against a database. Normally I would just dump everything into a stored procedure and execute it that way. But I do not have access to the database I'm trying to access so I can't create a stored procedure...
{ "language": "en", "url": "https://stackoverflow.com/questions/411836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding clusters of mass in a matrix/bitmap This is in continuation with the question posted here: Finding the center of mass on a 2D bitmap which talked about finding the center of mass in a boolean matrix, as the example was given. Suppose now we expand the matrix to this form: 0 1 2 3 4 5 6 7 8 9 1 . X X . . . . ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to make Microsoft build.exe include sources from remote directories? Adding source files more than one directory away (e.g. ../../source.cpp or ../../../somewhere_else/source.cpp, vs. just source.cpp or ../source.cpp) to the SOURCES= declaration in a WDK/DDK build yields the following error: Ignoring ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How random is System.Random in .NET 3? I am currently writing a simple password generator (C#). For that I need some random numbers. Is it OK to simply use the Random class that ships with .NET or are there any known problems with that? A: There is nothing wrong with it -- it's good enough to generate simple passw...
{ "language": "en", "url": "https://stackoverflow.com/questions/411843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: uncompress .Z file in C Can someone point me to a public domain (or MIT- or BSD-license) library for decompressing .Z files in ANSI C? Thanks! A: Sorry I was talking rubbish in my previous response. Apparently unix compressed files (.Z) use LZW, not Deflate. In this case, check out liblzw. It is public domain. A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/411856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flash communication with Erlang server This is an erlang problem, it seems. I have this code to test the client sending data, written in Actionscript 3: var socket:Socket=new Socket("localhost", 2345); socket.addEventListener(Event.CONNECT, connected); private function connected(event:Event):void { socket.write...
{ "language": "en", "url": "https://stackoverflow.com/questions/411857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a fast way to change tabindexes on a form with lots of controls? So I have a form with lots of controls that all have a tab index. After inserting some extra fields, I have to edit the index of all controls after the new ones. Is there a simple way to automate this in Visual Studio, or is there some sort o...
{ "language": "en", "url": "https://stackoverflow.com/questions/411861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What does `SET ANSI_NULLS OFF` do? What does SET ANSI_NULLS OFF do? A: SET ANSI_NULLS OFF instructs the server to evaluate statements involving NULL using non-standard semantics. SET ANSI_NULLS OFF; SELECT CASE WHEN NULL = NULL THEN 1 ELSE 0 END; -- Evaluates to 1 (bad!) SET ANSI_NULLS ON; SELECT CASE WHEN NULL = N...
{ "language": "en", "url": "https://stackoverflow.com/questions/411864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Implementing IHttpSecurity in .NET (managed code) How can I implement IHttpSecurity for Webbrowser Control in .NET? I couldn't find any examples, all examples are in C++, also MSDN documentation is only for C++ A: You are going to have to use COM interop for this. Look for the IID (guid) of the interface in the I...
{ "language": "en", "url": "https://stackoverflow.com/questions/411865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: String value that represents an email attachment, how to store to disk/db? Ok it turns out this 3rd party component I am working with stores an email attachment in a property of string type (it is already decoded). How would I store this to file now? It has: filename, encodingtype and the string representation of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Convert between a C double and Cocoa's NSDecimalNumber? I'm converting an algorithm I wrote in Java to Objective-C. In java the BigDecimal class handles base-10 numbers and can take the primitive double as a constructor arg. In Cocoa's NSDecimalNumber class, however, there is no direct way to construct an instance...
{ "language": "en", "url": "https://stackoverflow.com/questions/411876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to keep track of the most popular products I'm trying to implement a "Popular Products" feature. Basically, every time a Product is viewed, I want to log to the database the number of views of that product. Where do I put the hooks for something like this? I have seen things that are based on building some sort ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pass to javascript a dictionary of a dictionary (.NET) I'm trying to solve the problem of passing a 2-dimensional table into JavaScript AJAX application through SOAP web services. I'm trying to pass data into JavaScript web page through ASP.NET web service declared with following attributes: [WebServiceBinding(Confo...
{ "language": "en", "url": "https://stackoverflow.com/questions/411896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django file upload failing occasionally I am trying to port my first Django 1.0.2 application to run on OSX/Leopard with Apache + mod_python 3.3.1 + python 2.6.1 (all running in 64-bit mode) and I am experiencing an occasional error when uploading a file that was not present when testing with the Django development ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Which text field did the user click in? My iphone app has several text fields. The "Did End on Exit" event on each text field calls a single action. How can I tell which text field called the action? Can I detect this from the sender object which is passed to the action? A: The sender object will be the UITextFi...
{ "language": "en", "url": "https://stackoverflow.com/questions/411905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# (.NET) Design Flaws What are some of the biggest design flaws in C# or the .NET Framework in general? Example: there is no non-nullable string type and you have to check for DBNull when fetching values from an IDataReader. A: The awful (and quite invisible to most people) O(N^2) behaviour of nested/recursive ite...
{ "language": "en", "url": "https://stackoverflow.com/questions/411906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Silverlight XML editor / syntax highlighting I am looking for a Silverlight text editor control that provides XML syntax highlighting. I found a few answers in Winforms or WPF, like here on Stackoverflow, but I didn't manage to convert them to Silverlight. The fact that Silverlight is missing System.Drawing is proba...
{ "language": "en", "url": "https://stackoverflow.com/questions/411913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: IIS AppPool error (1013 - W3SVC) We're getting a number of warnings in the Application Event Viewer on our IIS installation. We have an AppPool set up which contains two websites (both ColdFusion sites, not .NET). The Event Viewer shows the following warning: A process serving application pool 'HighPriorityApps' exc...
{ "language": "en", "url": "https://stackoverflow.com/questions/411918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: File based configuration handling in C (Unix) This is probably one of the most common tasks / problems when programming; You need to store the configuration of your application somewhere. While I'm trying to create a webserver or other applications, I'd like to keep the code as clean as possible since my main intere...
{ "language": "en", "url": "https://stackoverflow.com/questions/411921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Master detail example of Rails Can anyone point me to a master detail implementation in Rails? I Googled but couldn't find any good example sites. A: You probably want to start with a acts_as_tree model but the exact implementation depends a lot on what you want as an end result ;)
{ "language": "en", "url": "https://stackoverflow.com/questions/411923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Designing sharepoint pages - what can I use? I am in the process of downloading and installing the requisite sharepoint 2007 components, using the Bamboo utility to setup the software on Vista, on my Vista Home Premium machine. I am wondering, do I need Sharepoint Designer 2k7 to design in a WYSIWYG fashion or can I...
{ "language": "en", "url": "https://stackoverflow.com/questions/411935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing Line-of-Business (LOB) .NET Applications? I was wondering if anyone here has experience in unit testing LOB applications (typically CRUD). I have dabbled in the built-in unit testing tools in Visual Studio, but I have found it difficult to run tests that hit a database. Since the data changes, and combined ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: JDialog not painting I'm new to java but I would have thought this was pretty straight foward. I display a JDialog for user input when importing data from a text file but the dialog isn't being painted properly on other computers. On my computer if I run the program from within NetBeans or from the command prompt th...
{ "language": "en", "url": "https://stackoverflow.com/questions/411945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tools for faster, better web development Over the years most web developers will have built an arsenal of tools or "tools of the trade". Recently I discovered rsync and I am surprised how I managed to live without it all these years. What tools do you consider to be the most compelling? Please stick to the ones you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: How to request an aborted HttpWebRequest again? My objective is to retry an asynchronous HttpWebRequest when it fails. When I Abort() an HttpWebRequest, I cannot BeginGetResponse() again. So the only way to request again probably is recreate the HttpWebRequest object. It seems to require a lot of work since I would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/411974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Which open source database is the best option for an accounting-related system? I am in the early stages of planning and designing a custom accounting application for my firm. My goal is to utilize an open source relational database for the data storage portion and I'm aware of two solid databases that are widely su...
{ "language": "en", "url": "https://stackoverflow.com/questions/411976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Override JComponent.getBaselineResizeBehavior() but keep Java5 compatibility For my Swing project, I need to support both Java 5 and Java 6. I have defined a custom JComponent (call it Picture) and, after embedding it in a JScrollPane, I put it in a JPanel that uses DesignGridLayout manager. DesignGridLayout suppor...
{ "language": "en", "url": "https://stackoverflow.com/questions/411982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Purpose of UIViewController I'm currently learning Objective-C, coming from a Java background where I have no trouble making GUI applications. As such, the way I'm thinking about some of these problems may be a bit off. Here's the question (please excuse the ramble) - What is the purpose of UIViewController? Let...
{ "language": "en", "url": "https://stackoverflow.com/questions/412007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: RewriteRule but keep the subdomain I would like to redirect the following as an example: A.olddomain.com.au/blah.html > A.newdomain.com/blah.html B.olddomain.com.au/blah.html > B.newdomain.com/blah.html Essentially, I have a variable number of subdomains and I only want to change the domain name itself on the r...
{ "language": "en", "url": "https://stackoverflow.com/questions/412010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to build a hot pluggable WCF service library I have been working on a WCF service library where hopefully all the business logic will end up living. The problem that I am running into is that sometimes I have to make quick fixes to a service and in order to apply those fixes I have to stop the Windows Servi...
{ "language": "en", "url": "https://stackoverflow.com/questions/412011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Using a Timer in C# I'm trying to make a form invisible for x amount of time in c#. Any ideas? Thanks, Jon A: Quick and dirty solution taking advantage of closures. No Timer required! private void Invisibilize(TimeSpan Duration) { (new System.Threading.Thread(() => { this.Invoke(new MethodI...
{ "language": "en", "url": "https://stackoverflow.com/questions/412014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Postgresql.conf variables I have been playing around with the postgresql.conf file for a couple days now. I was wondering what variables you guys like customizing and why? Here is a sample of the file: # - TCP Keepalives - # see "man 7 tcp" for details #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Math optimization in C# I've been profiling an application all day long and, having optimized a couple bits of code, I'm left with this on my todo list. It's the activation function for a neural network, which gets called over a 100 million times. According to dotTrace, it amounts to about 60% of the overall functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/412019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: NHibernate query with distance calculation stored proc I have a stored procedure in my database that calculates the distance between two lat/long pairs. This stored procedure is called "DistanceBetween". I have a SQL statement allows a user to search for all items in the Items table ordered by the distance to a supp...
{ "language": "en", "url": "https://stackoverflow.com/questions/412022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I skip items when tabbing without using tabindex? Is there a good way, in a javascript onfocus() handler, to trampoline the focus to the next item in the tab order, without having to manually enter the ID of the item that should be next? I built an HTML date picker in Django/jQuery. It's a line edit followed...
{ "language": "en", "url": "https://stackoverflow.com/questions/412070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: MS Robotics Studio: "contract is different from that of the namespace" I'm trying to build a DSS service using MS Robotics Studio and VS 2008, but when I build, I get an error from dssproxy.exe saying: The class MyServiceName has a ContractAttribute but the contract is different from that of the namespace. and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: InterfaceBuilder - UIViewController subclass not recognized as subclass I'm working on a simple iPhone app. I have 1 UINavigationController and 2 subclasses of UIViewController. I have a MainWindow.xib file, a PersonListView.xib, and a PersonDetailView.xib. The MainWindow.xib has the UINavigationController with the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What value does a Reference Variable in C++ store? A pointer stores/is assigned a memory address; what about a reference variable? it stores the actual value of an object just like any other non-pointer simple variables on Stack? Thanks! A: Internally, it's just a pointer to the object (although the standard not ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/412084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Problem with procs created within loops accessing loop variables I am a ruby newb and am having a problem with procs created inside loops accessing loop variables. Here is a code file demonstrating the problem. class Route def initialize options = {} options.each do |k,v| self.instance_variable_...
{ "language": "en", "url": "https://stackoverflow.com/questions/412089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to perform multiple updates with a single UPDATE SQL statement? Let's say I have a table tbl with columns id and title. I need to change all values of title column: * *from 'a-1' to 'a1', *from 'a.1' to 'a1', *from 'b-1' to 'b1', *from 'b.1' to 'b1'. Right now, I'm performing two UPDATE statem...
{ "language": "en", "url": "https://stackoverflow.com/questions/412101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Can you create a "superset" target in Xcode? For the purposes of unit testing I'd like to create an iPhone project target in Xcode that includes all of the release application files, plus some additional files containing code useful for UI unit testing. I can do this by duplicating the original application target; h...
{ "language": "en", "url": "https://stackoverflow.com/questions/412103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: lighttpd on Mac 10.5 - can't find lighttpd.conf I just did a clean build and reinstall of lighttpd 1.4.20 on Mac OS X 10.5 and I can't find the configuration file. My goal was to install lighty to a single directory instead of being spread around, so I used the following commands successfully: ./configure --prefix="...
{ "language": "en", "url": "https://stackoverflow.com/questions/412124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to get statistics with TortoiseSVN? Is it possible to get statistics about each users contributions, total line count etc? A: You can get basic statistics by using "Show Log..." and then "Statistics" (Button at the bottom IIRC) A: Yes, as detailed in the documentation if you're not too fussy about h...
{ "language": "en", "url": "https://stackoverflow.com/questions/412129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Increment a number in the name of textbox public void test() { List<int> list = new List<int>(); list.Add(1); list.Add(2); list.Add(3); for (int i = 1; i <= list.Count; i++) { textBx.Text = list[i].ToString(); // I want it to be textBx1.Tex...
{ "language": "en", "url": "https://stackoverflow.com/questions/412151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C++ Service Providers I've been learning C++, coming from C#, where I've gotten used to using service providers: basically a Dictionary<Type, object>. Unfortunately, I can't figure out how to do this in C++. So the questions are basically: * *How would I make a dictionary in C++. *How would I use 'Type' with it,...
{ "language": "en", "url": "https://stackoverflow.com/questions/412165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to find an item in array which has the most occurrences How do I find an item in array which has the most occurrences? [1, 1, 1, 2, 3].mode => 1 ['cat', 'dog', 'snake', 'dog'].mode => dog A: First build a hash mapping each value in the array to its frequency… arr = [1, 1, 1, 2, 3] freq = arr.inject(Hash.new(...
{ "language": "en", "url": "https://stackoverflow.com/questions/412169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: when debugging in xcode an app that has cursor hidden, how can I force it to reappear In debugging a game that is full screen (on one of my two monitors) when it crashes and the debugger (on the other monitor, not captured) displays the crash location, the cursor is still hidden. Is there any way to force the cursor...
{ "language": "en", "url": "https://stackoverflow.com/questions/412174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# collection int[] mylist = { 2, 4, 5 }; IEnumerable<int> list1 = mylist; list1.ToList().Add(1); // why 1 does not get addedto list1?? A: Why would it? ToList() generates a new List and the value '1' gets added to it. Since you don't store the return, the new list then gets tossed when it's out of scope. ToLi...
{ "language": "en", "url": "https://stackoverflow.com/questions/412178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: On writing win32 api wrapper with C++, how to pass this pointer to static function I want to convert function object to function. I wrote this code, but it doesn't work. #include <iostream> typedef int (*int_to_int)(int); struct adder { int n_; adder (int n) : n_(n) {} int operator() (int x) { return x...
{ "language": "en", "url": "https://stackoverflow.com/questions/412183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Code golf: Diffie-Hellman key exchange Back in the ITAR era, there was a popular sig that performed Diffie-Hellman key exchange: #!/usr/bin/perl -- -export-a-crypto-system-sig Diffie-Hellman-2-lines ($g,$e,$m)=@ARGV,$m||die"$0 gen exp mod\n";print`echo "16dio1[d2%Sa2/d0<X+d *La1=z\U$m%0]SX$e"[$g*]\EszlXx+p|dc` With...
{ "language": "en", "url": "https://stackoverflow.com/questions/412184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SharePoint: Media Player Custom Field Control I'm trying to implement the Media Player custom field control described in this MSDN article: http://msdn.microsoft.com/en-us/library/aa981226.aspx I created a custom site column (of type Link) in a custom content type and followed all the instructions to deploy the solu...
{ "language": "en", "url": "https://stackoverflow.com/questions/412187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET Show Error Details I recently deployed my ASP.NET 3.5 application to my test server, a newly installed copy of Windows Server 2003 Standard on which is IIS 6.0 and .NET 3.5 SP1. When I view the application (even from a web browser on the server) I get: Server Error in '/' Application. Runtime Error Descript...
{ "language": "en", "url": "https://stackoverflow.com/questions/412207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to bring program to front using python I would like to force my python app to the front if a condition occurs. I'm using Kubuntu & QT3.1 I've tried setActiveWindow(), but it only flashes the task bar in KDE. I think Windows has a function bringwindowtofront() for VB. Is there something similar for KDE? A: Check...
{ "language": "en", "url": "https://stackoverflow.com/questions/412214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: mysql gui tools 64-bit rpm Are there any 64-bit version RPMs of MySQL GUI Tools? A: SQuirreL or any GUI Tool built on Java would work. You just need 64-bit JRE. [Edited] MySql Query Browser and MySql Workbench both are developed based on x86-64 architecture.
{ "language": "en", "url": "https://stackoverflow.com/questions/412216", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How should I organize my Flex application? I'm currently a .NET developer, but I'm starting to work with Flex a little bit and I've found the community to be great. There are a lot of great resources out there, but one of the issues I'm running into conceptually is how to organize a flex project. Coming from the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/412218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Parallelize code in nested loops You always hear that functional code is inherently easier to parallelize than non-functional code, so I decided to write a function which does the following: Given a input of strings, total up the number of unique characters for each string. So, given the input [ "aaaaa"; "bbb"; "ccc...
{ "language": "en", "url": "https://stackoverflow.com/questions/412227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: TDD - How much do you test? I'm working on a new project and I'm using the repository pattern, I have my repository that pulls the data from the database and a "service" class which uses the repository and does all the business logic. something similar to the following; public class UserRepository : IUserRepository ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Google Gears - To what level is synchronization supported? I have a few questions about data synchronization. The architecture does not seem to be clear about this: * *Does Google Gears provide from automatic synchronization of data (from client to server and server to client)? *If it does provide for automatic ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can the iPhone determine if you're facing north, south, east or west? Can the iPhone determine if you're facing north, south, east or west? A: If you're developing for 2.2 you might want to take a look at the following additions to CoreLocation: CLLocation.course CLLocation.speed CLLocationDirection CLLocationSpeed...
{ "language": "en", "url": "https://stackoverflow.com/questions/412256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a way to make a progress bar like that in gmail in ASP.net? Is there a way to make a progress bar like that in gmail in ASP.net? A: Here are some ASP .NET based Progress Bar controls: * *ASP.NET AJAX Progress Bar Control *ASP .NET Progress Bar (ASP .NET Control Gallery) *ASP .NET Static Progress Bar c...
{ "language": "en", "url": "https://stackoverflow.com/questions/412264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Applet with Gui Designer I want to ask you if there is a possibility to program a Java Applet in netbeans 6.5 using the GUI Designer. When I was adding a new file to the source and choose Applet or JApplet, I found now Designer as in a JForm for instance. A: If you want to design applets in NetBeans then do this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: FormsAuthentication.SignOut() does not log the user out Smashed my head against this a bit too long. How do I prevent a user from browsing a site's pages after they have been logged out using FormsAuthentication.SignOut? I would expect this to do it: FormsAuthentication.SignOut(); Session.Abandon(); FormsAuthenticat...
{ "language": "en", "url": "https://stackoverflow.com/questions/412300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "152" }
Q: How do I find which port number .Net Remoting Allocates? If I create a TcpChannel using port zero i.e. allowing .Net Remoting to allocate an available port, is there anyway to then determine which port number has been allocated? I know that I can specify the port number when creating the channel, however I don't w...
{ "language": "en", "url": "https://stackoverflow.com/questions/412305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASDF or other module system independent of home and site configurations I'm trying to find out the best practices for real-world application development. I'm having trouble understanding how to properly configure third-party libraries for deployment as a standalone package. It seems that ASDF-INSTALL and ASDF are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is this the decorator pattern? I'm using the built-in system class for sending emails in .NET. It's in System.Mail namespace or something like that. I need to add an interface to this class so I can swap it out for testing or another implementation. To do this, I just define a class that wraps this built-in class? I...
{ "language": "en", "url": "https://stackoverflow.com/questions/412319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Passing a XML parsed list from a controller to a view in ASP.NET MVC I am trying to pass an XML list to a view but I am having trouble once I get to the view. My controller: public ActionResult Search(int isbdn) { ViewData["ISBN"] = isbdn; string pathToXml= "http://isbndb.com/api/books.xml?acces...
{ "language": "en", "url": "https://stackoverflow.com/questions/412331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How should I store GUID in MySQL tables? Do I use varchar(36) or are there any better ways to do it? A: Binary(16) would be fine, better than use of varchar(32). A: The GuidToBinary routine posted by KCD should be tweaked to account for the bit layout of the timestamp in the GUID string. If the string represents a...
{ "language": "en", "url": "https://stackoverflow.com/questions/412341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "164" }
Q: a better way than casting from a base class to derived class I know downcasting like this won't work. I need a method that WILL work. Here's my problem: I've got several different derived classes all from a base class. My first try was to make an array of base class. The program has to select (more or less at random...
{ "language": "en", "url": "https://stackoverflow.com/questions/412344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Lint tool for actionscript? Are there any lint tools available for actionscript? One source would be ideal, but anything is welcome. My team is starting to adopt more a more rigorous style guide (where "more rigorous" means "existant"), and I think a linter would help us all adhere more easily to the style rules we...
{ "language": "en", "url": "https://stackoverflow.com/questions/412345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What are the most often linux (power) commands that you use? To find files containing a particular string, I use this often find . -name * | xargs grep -iH "string" A: For finding which directories take up most space (for potential clean up), start at the desired level, such as /home and execute: cd /home du -s * |...
{ "language": "en", "url": "https://stackoverflow.com/questions/412362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Read keyboard characters to determine shortcuts I'm working on a document application and part of this application I've to add support to read the keyboard pressed events and replace the pre-defined characters set if that keyboard entry is match with the pre-defind short form/word.The actual application has implemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/412366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to (simply) connect Python to my web site? I've been playing with Python for a while and wrote a little program to make a database to keep track of some info (its really basic, and hand written). I want to add the ability to create a website from the data that I will then pass to my special little place on the i...
{ "language": "en", "url": "https://stackoverflow.com/questions/412368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do people get mixin-style re-use in C#? I come from a C++ background where I can use template mixins to write code that refers to FinalClass which is a template parameter that is passed in. This allows reusable functions to be "mixed-in" to any derived class, by simply inheriting from ReusableMixin with a templ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to combine paths in Java? Is there a Java equivalent for System.IO.Path.Combine() in C#/.NET? Or any code to accomplish this? This static method combines one or more strings into a path. A: Late to the party perhaps, but I wanted to share my take on this. I prefer not to pull in entire libraries for something l...
{ "language": "en", "url": "https://stackoverflow.com/questions/412380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "434" }
Q: How do I insert a zero in front of single-digit months and days in my calendar popup? I am including Javascript code that is used to pop up a calendar. The problem with the code is that I want a '0' to be inserted in front of the month or day if the month lies between 1--9 and days between 1--9 in the calendar. The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Determine if StructureMap has a specific type configured? Is there a way to determine if a specific type has been configured in StructureMap? I want to return a generic type if it has not be specifically configured in StructureMap. A: From StructureMap version 2.5.1 there is a TryGetInstance<T>() and TryGetNamedI...
{ "language": "en", "url": "https://stackoverflow.com/questions/412386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Problem with "select All" option The problem with the below code is that Select All options works very well in Mozilla and not in Internet Explorer. <!-- Document : DG Created on : Sep 11, 2008, 12:48:37 PM Author : padmaja --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/412387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I know which are on if I have multiple UISwitches? Hope that all are fine. I have 22 UISwitch in a table view and I have created all these switch objects in one function and set them in the table view. How can I know which switch is on or off? I want to do this through only one action method but I don't kno...
{ "language": "en", "url": "https://stackoverflow.com/questions/412399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }