text
stringlengths
8
267k
meta
dict
Q: Python Dependency Injection Framework Is there a framework equivalent to Guice (http://code.google.com/p/google-guice) for Python? A: pinject (https://github.com/google/pinject) is a newer alternative. It seems to be maintained by Google and follows a similar pattern to Guice (https://code.google.com/p/google-guice...
{ "language": "en", "url": "https://stackoverflow.com/questions/156230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Asp.net MVC View Testing? With more and more code pushed to the Views in Asp.Net MVC (i.e. AJAX, JQuery, etc...), how do you maintain the 'testability'? * *How do you test your Views? *How do you test your views with client-side jscript code? *How do you test your Views with Async behavior? It seems that most...
{ "language": "en", "url": "https://stackoverflow.com/questions/156232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Object allocate and init in Objective C What is the difference between the following 2 ways to allocate and init an object? AController *tempAController = [[AController alloc] init]; self.aController = tempAController; [tempAController release]; and self.aController= [[AController alloc] init]; Most of the apple e...
{ "language": "en", "url": "https://stackoverflow.com/questions/156243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Notification of object destruction in Ruby I have written a custom Rails model. This model is backed by an actually server not by a database table (so it does not inherit from ActiveRecord::Base). In order to get the requested information from the server I open a SSH connection to it. Because rails does not reuse...
{ "language": "en", "url": "https://stackoverflow.com/questions/156248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: WPF: Calling TextBox.Clear() from LostFocus handler causes NullReferenceException when window closes The sample below has two TextBoxes. The second TextBox has a handler for the LostFocus event which calls Clear() on itself. Changing focus between the two text boxes works fine; however, if the focus is on the sec...
{ "language": "en", "url": "https://stackoverflow.com/questions/156256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: AI Applications in C++: How costly are virtual functions? What are the possible optimizations? In an AI application I am writing in C++, * *there is not much numerical computation *there are lot of structures for which run-time polymorphism is needed *very often, several polymorphic structures interact dur...
{ "language": "en", "url": "https://stackoverflow.com/questions/156257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is the equivalent of the C++ Pair in Java? Is there a good reason why there is no Pair<L,R> in Java? What would be the equivalent of this C++ construct? I would rather avoid reimplementing my own. It seems that 1.6 is providing something similar (AbstractMap.SimpleEntry<K,V>), but this looks quite convoluted. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "710" }
Q: Does setbuf() affect cout? Yet again, my teacher was unable to answer my question. I knew who may be able to... So, I've never really learned C. In C++, I would, obviously, use a cout statement all of the time. In a recent assignment, my teacher told us to make sure to put setbuf( stdout , NULL ); at the top of ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/156278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to import a SQL Server .bak file into MySQL? The title is self explanatory. Is there a way of directly doing such kind of importing? A: I did not manage to find a way to do it directly. Instead I imported the bak file into SQL Server 2008 Express, and then used MySQL Migration Toolkit. Worked like a charm! A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Using Mercurial, is there an easy way to diff my working copy with the tip file in the default remote repository When using mercurial, I'd like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this? I know I can do an "hg incoming -p" to see...
{ "language": "en", "url": "https://stackoverflow.com/questions/156280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How should I order my ctor parameters for DI/IOC? I'm a bit of a DI newbie, so forgive me if this is the wrong approach or a silly question. Let's say I have a form which creates/updates an order, and I know it's going to need to retrieve a list of products and customers to display. I want to pass in the Order objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/156292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# Attributes On Fields How do I set an attribute on a field anywhere in my assembly, then reflect on those field attributes in my entire assembly and get/set the field values that the attribute is attached too? A: 1) Create custom attribute targeted for fields 2) Add it to desired fields 3) Iterate through types d...
{ "language": "en", "url": "https://stackoverflow.com/questions/156304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Mask redirect to temporary domain with mod_rewrite We are putting up a company blog at companyname.com/blog but for now the blog is a Wordpress installation that lives on a different server (blog.companyname.com). The intention is to have the blog and web site both on the same server in a month or two, but that lea...
{ "language": "en", "url": "https://stackoverflow.com/questions/156315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What do people think of the fossil DVCS? fossil http://www.fossil-scm.org I found this recently and have started using it for my home projects. I want to hear what other people think of this VCS. What is missing in my mind, is IDE support. Hopefully it will come, but I use the command line just fine. My favorite...
{ "language": "en", "url": "https://stackoverflow.com/questions/156322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "124" }
Q: Is there a standard encoding for NEEDED entries in ELF? I'm trying to make some of my code a bit more friendly to non-pure-ascii systems and was wondering if there was a particular character encoding used for NEEDED entries in ELF binaries, or is it rather unstandard and based on the creating system's filesystem enc...
{ "language": "en", "url": "https://stackoverflow.com/questions/156327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: unwanted leading blank space on oracle number format I need to pad numbers with leading zeros (total 8 digits) for display. I'm using oracle. select to_char(1011,'00000000') OPE_NO from dual; select length(to_char(1011,'00000000')) OPE_NO from dual; Instead of '00001011' I get ' 00001011'. Why do I get an extra lea...
{ "language": "en", "url": "https://stackoverflow.com/questions/156329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Get timer ticks in Python I'm just trying to time a piece of code. The pseudocode looks like: start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds." How does this look in Python? More specifically, how do I get the number of ticks since midnight (or however Python organizes that t...
{ "language": "en", "url": "https://stackoverflow.com/questions/156330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Wouldn't MS Access(.mdb) file size reduce after deleting the content of database? I was inserting data into a MS Access database using JDBC-ODBC driver. The blank mdb file was 2KB. After populating this database, the size grew to 155MB. Then I was deleting the data. But I found the size of mdb remains the same a...
{ "language": "en", "url": "https://stackoverflow.com/questions/156331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Does a (.net) COM+ assembly need to be installed in the GAC? I have a .net assembly that has a COM+ ServicedCopmonent in it and at the moment I install it into the GAC to get everything working. This means that I need to have every assembly that it references in the GAC as well. During development it is quite painf...
{ "language": "en", "url": "https://stackoverflow.com/questions/156338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: flash: for loops running slow I have a question about loops in flash.... In a tile game I'm making a have a mini map of the whole level. The way it renders the map is a function with a for loop in another for loop. It cycles through each tile position and attaches a map piece (basically a 3x3 pixel square) which is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Get all items from thread Queue I have one thread that writes results into a Queue. In another thread (GUI), I periodically (in the IDLE event) check if there are results in the queue, like this: def queue_get_all(q): items = [] while 1: try: items.append(q.get_nowait()) except Em...
{ "language": "en", "url": "https://stackoverflow.com/questions/156360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is the difference between include and extend in Ruby? Just getting my head around Ruby metaprogramming. The mixin/modules always manage to confuse me. * *include: mixes in specified module methods as instance methods in the target class *extend: mixes in specified module methods as class methods in the tar...
{ "language": "en", "url": "https://stackoverflow.com/questions/156362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "476" }
Q: Which languages support *recursive* function literals / anonymous functions? It seems quite a few mainstream languages support function literals these days. They are also called anonymous functions, but I don't care if they have a name. The important thing is that a function literal is an expression which yields a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/156369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: in-house projects: to stable release or not? Suppose you work at a medium-to-large software company with many independently-developed projects (independent coders) but which rely on each other (dependent code). If it were up to you, would you make sure each project produced stable branches so that the other projects...
{ "language": "en", "url": "https://stackoverflow.com/questions/156372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using .reset() to free a boost::shared_ptr with sole ownership I'm storing an object (TTF_Font) in a shared_ptr that is provided to me from a third-party API. I cannot use new or delete on the object, so the shared_ptr is also provided a "freeing" functor. // Functor struct CloseFont { void operator()(TTF_Font* ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to prevent Crystal webserver refetching data on each page We're using Crystal 11 through their webserver. When we run a report, it does the Sql query and displays the first page of the report in the Crystal web reportviewer. When you hit the next page button, it reruns the Sql query and displays the next page. H...
{ "language": "en", "url": "https://stackoverflow.com/questions/156391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Method access in Ruby How is it that Ruby allows a class access methods outside of the class implicitly? Example: class Candy def land homer end end def homer puts "Hello" end Candy.new.land #Outputs Hello A: A simple way to find out what happens * *What classes/modules are searched to re...
{ "language": "en", "url": "https://stackoverflow.com/questions/156394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Sending a message to nil in Objective-C As a Java developer who is reading Apple's Objective-C 2.0 documentation: I wonder what "sending a message to nil" means - let alone how it is actually useful. Taking an excerpt from the documentation: There are several patterns in Cocoa that take advantage of this fact. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/156395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: Why does GWT ignore browser locale? GWT gets locale from either the locale property or the locale query string. If neither is specified, it uses the "default" (ie en_US) locale. Why doesn't it get it from the browser settings? It seems the only solution to this is to replace your static html launch page with somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/156412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is regular expression recognition of an email address hard? I recently read somewhere that writing a regexp to match an email address, taking into account all the variations and possibilities of the standard is extremely hard and is significantly more complicated than what one would initially assume. Why is that? Ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/156430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Sorting a collection in classic ASP It's quite a simple question - how do I sort a collection? I've got a CSV file with rows in a random order. I'd like to sort the rows according to the date in one column. Do I add the rows to a recordset? Can I sort with a Scripting.Dictionary? I've clearly been spoilt with .NET a...
{ "language": "en", "url": "https://stackoverflow.com/questions/156436", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What Does It Mean For a C++ Function To Be Inline? See title: what does it mean for a C++ function to be inline? A: It means one thing and one thing only: that the compiler will elide multiple definitions of the function. A function normally cannot be defined multiple times (i.e. if you place a non-inline function ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Is buffer overflow/overrun possible in completely managed asp.net c# web application Can there be buffer overflow/overrun vulnerabilities in completely managed asp.net web portal.If yes how can this be tested. A: In the general case, you don't need to worry about buffer overruns. This is one of the major advantages...
{ "language": "en", "url": "https://stackoverflow.com/questions/156445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Enumerate errors in an error provider Is it possible to enumerate all the current errors being displayed through an "Error Provider" without having to access the controls? A: You can get all of the errors from an ErrorProvider by enumerating the Controls collection of its parent and calling GetError on each. Not ef...
{ "language": "en", "url": "https://stackoverflow.com/questions/156457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there any benefit to this switch / pattern matching idea? I've been looking at F# recently, and while I'm not likely to leap the fence any time soon, it definitely highlights some areas where C# (or library support) could make life easier. In particular, I'm thinking about the pattern matching capability of F#, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/156467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "158" }
Q: Is there a good drop-in replacement for Java's JEditorPane? I'm not happy with the rendering of HTML by Swing's JEditorPane. In particular bullets for unordered lists are hideous. Customising the rendering seems extremely difficult. Therefore I'm looking for a replacement with better HTML rendering. Does this exist?...
{ "language": "en", "url": "https://stackoverflow.com/questions/156472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing cache correctly in a class library for use in an asp.net application I'm implementing a cache in a class library that i'm using in an asp.net application. I created my cache object as a singleton pattern with a static method to update the cache which is really just loading a member variable/property wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/156478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to properly implement a shared cache in ColdFusion? I have built a CFC designed to serve as a dynamic, aging cache intended for almost everything worth caching. LDAP queries, function results, arrays, ojects, you name it. Whatever takes time or resources to calculate and is needed more than once. I'd like to be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Restore Office Environment to Default after development After I develop my add-in for Microsoft Office ( and in the process messed up all my menu bars and tool bars) using Visual Studio For Office, is there anyway to restore the MS Office to default? For the record, Clean Solution alone is not enough! A: Did you tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/156493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to write an Excel workbook to a MemoryStream in .NET? How do I write an Excel workbook to a MemoryStream without first saving it to the file system? All options within the Microsoft.Office.Interop.Excel.WorkBook save options take a filename. A: I have done extensive work with the PIA and with storing Excel file...
{ "language": "en", "url": "https://stackoverflow.com/questions/156500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do you assert that a certain exception is thrown in JUnit tests? How can I use JUnit idiomatically to test that some code throws an exception? While I can certainly do something like this: @Test public void testFooThrowsIndexOutOfBoundsException() { boolean thrown = false; try { foo.doStuff(); } catch...
{ "language": "en", "url": "https://stackoverflow.com/questions/156503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2245" }
Q: How to skip the docstring using regex I'm trying to insert some import lines into a python source file, but i would ideally like to place them right after the initial docstring. Let's say I load the file into the lines variable like this: lines = open('filename.py').readlines() How to find the line number, where th...
{ "language": "en", "url": "https://stackoverflow.com/questions/156504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does a Silverlight memory profiler exist? CLR profiler does not seem to work with the Silverlight CLR. Does another memory profiler exist? A: Here is memory profiling in silverlight using Xperf. Get GC Information A: Try this one, it is very useful: http://www.red-gate.com/products/ants_memory_profiler/index.htm...
{ "language": "en", "url": "https://stackoverflow.com/questions/156507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Closing a Java FileInputStream Alright, I have been doing the following (variable names have been changed): FileInputStream fis = null; try { fis = new FileInputStream(file); ... process ... } catch (IOException e) { ... handle error ... } finally { if (fis != null) fis.close(); } Recent...
{ "language": "en", "url": "https://stackoverflow.com/questions/156508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Increase Stack Size on Windows (GCC) Is there a way to increase the stack size of a Windows application at compile/link time with GCC? A: You could run editbin after linking. A: IIRC, In GCC you can provide the --stack,[bytes] parameter to ld. E.g. gcc -Wl,--stack,16777216 -o file.exe file.c To have a stack of 16...
{ "language": "en", "url": "https://stackoverflow.com/questions/156510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Java HttpURLConnection: Can it cope with duplicate header names? I am debugging some code in the Selenium-rc proxy server. It seems the culprit is the HttpURLConnection object, whose interface for getting at the HTTP headers does not cope with duplicate header names, such as: Set-Cookie: foo=foo; Path=/ Set-Cookie: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156514", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to determine if a class is a subclass of other class? I'd like to check if a Class object represents a subclass of other class for example Class class1 = Class.forName("Class1"); Class class2 = Class.forName("Class2"); if(class1.isSubClassOf(class2)) // fake methos isSubClassOf { // do sth } How can I impl...
{ "language": "en", "url": "https://stackoverflow.com/questions/156527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the best way to do Java development in Emacs? What modes are the best? And any tips or tricks that make developing java in emacs a bit better. A: Eclim is a project that uses eclipse running in headless mode to provide features to Emacs such as in-line error checking, auto import management, basic refactori...
{ "language": "en", "url": "https://stackoverflow.com/questions/156529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do I import a whitespace-delimited text file into MySQL? I need to import largish (24MB) text files into a MySQL table. Each line looks like this: 1 1 0.008 0 0 0 0 0 There are one or more spaces after each field, and the last field is tailed by about 36 spaces before th...
{ "language": "en", "url": "https://stackoverflow.com/questions/156532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Dependence on DependencyObject and DependencyProperty I'm building a Silverlight application and one of my caveats from last time was that if you need anything done right in Silverlight/WPF way you'd need to model your objects as a DependecyObject and use DependencyProperty(ies) I find this model to be rather cumbe...
{ "language": "en", "url": "https://stackoverflow.com/questions/156538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Visual Studio: Automatically re-order page events according to the ASP.NET Page LifeCycle? What would be the easiest way to re-order existing page events according to the ASP.NET Page LifeCycle? I'm trying to make my events more readable and maybe make it easy to scroll into a sequentially near event. If there's no...
{ "language": "en", "url": "https://stackoverflow.com/questions/156539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using Microsoft SMS Sender to send out smses in batch? I understand that we can use SMS Sender in command line mode. But i been getting this error same as this article http://www.oreillynet.com/pub/a/wireless/2003/10/10/sms.html The smssender.exe will use the last device that was successfully used to send messages i...
{ "language": "en", "url": "https://stackoverflow.com/questions/156543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating a two-pass PHP cache system with mutable items I want to implement a two-pass cache system: * *The first pass generates a PHP file, with all of the common stuff (e.g. news items), hardcoded. The database then has a cache table to link these with the pages (eg "index.php page=1 style=default"), the databa...
{ "language": "en", "url": "https://stackoverflow.com/questions/156552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to fully utilize attachment students? From time to time, there will be student attached to our projects, i would certainly like to assign him/her many things to do so can learn more. But alot of times we are resigned to assigning stuff like documentaiton, updating of ui mockup screens etc. As problem is that is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you manage asp.net SQL membership roles/users in production? How do you setup an asp.net sql membership role/membership provider on a production machine? I'm trying to setup BlogEngine.NET and all the documentation says to use the ASP.NET Website Administration tool from Visual Studio but that isn't available...
{ "language": "en", "url": "https://stackoverflow.com/questions/156563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What the best rollover log file tracelistener for .NET I'm looking for a good TraceListener for .Net that supports rolling over the log file based on size limits. Constraints * *Uses .Net built in Trace logging *Independent class or binary that's not part of some gigantic library *Allows rolling over a log fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/156575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Namespace documentation on a .Net project (Sandcastle)? I started using Sandcastle some time ago to generate a Documentation Website for one of our projects. It's working quite well but we've always only written documentation for classes, methods, properties (...) in our project and had completely separate documenta...
{ "language": "en", "url": "https://stackoverflow.com/questions/156582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: Build deployment using CruiseControl.net I've seen a few examples on how to do build deployment, however I have something unique that I'd like to do: * *Deploy the build to a folder that has the build number (eg. Project\Builds\8423) *Alter the version number in the .NET AssmblyInfo.cs to match the build number ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can Dns.GetHostEntry ever return an IPHostEntry with an empty AddressList? I'm just wondering if there can be a case where the hostname can be successfully resolved but the returned hostEntry.AddressList is empty. Currently I'm doing something like this: IPHostEntry hostEntry = Dns.GetHostEntry("some.hostname.tld");...
{ "language": "en", "url": "https://stackoverflow.com/questions/156585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In Java, how to reload dynamically resources bundles in a web application? We are using fmt:setBundle to load a resource bundle from a database (we extended the ResourceBundle class to do that). When we modify a value in database, we have to reload the web server to display the new value on the web app. Is there any...
{ "language": "en", "url": "https://stackoverflow.com/questions/156586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best way to handle English and Chinese in a Flex application? I have a requirement to be able to provide a flex component in English and several asian languages. I have looked at the flex documentation and it seems that I have to build several swf's, which feels wrong. Does anyone know of a straightfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/156610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to setup JNDI for Sun App Server 8.2 http://localhost:8080/rtsclient/loginform.faces Url jnp://localhost:1099 Application Server Type jboss40 Datasource jdbc/ilogDataSource User rtsAdmin Password rtsAdmin The above is for jboss. Now i have deployed RTS onto Sun Application Server. And i want to configure th...
{ "language": "en", "url": "https://stackoverflow.com/questions/156634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL query to prepend character to each entry I have a table of users which has a username column consisting of a six digit number e.g 675381, I need to prepend a zero to each of these usernames e.g. 0675381 would be the final output of the previous example, is there a query that could handle this? A: what type is...
{ "language": "en", "url": "https://stackoverflow.com/questions/156641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Does the last element in a loop deserve a separate treatment? When reviewing, I sometimes encounter this kind of loop: i = begin while ( i != end ) { // ... do stuff if ( i == end-1 (the one-but-last element) ) { ... do other stuff } increment i } Then I ask the question: would you write this?...
{ "language": "en", "url": "https://stackoverflow.com/questions/156650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: What is the best XSLT engine for Perl? I would like to know what of the many XSLT engines out there works well with Perl. I will use Apache (2.0) and Perl, and I want to obtain PDFs and XHTMLs. I'm new to this kind of projects so any comment or suggestion will be welcome. Thanks. Doing a simple search on Google I f...
{ "language": "en", "url": "https://stackoverflow.com/questions/156683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Creating a REST webserver with security I am very new to creating webservers - and I have had several goes at trying to understand them and write a quick webserver, but it's never quite 'clicked'. At the moment I am under the impression that REST would be most suitable for my purposes (I will explain later). Can an...
{ "language": "en", "url": "https://stackoverflow.com/questions/156684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to start automatic download of a file in Internet Explorer? How do I initialize an automatic download of a file in Internet Explorer? For example, in the download page, I want the download link to appear and a message: "If you download doesn't start automatically .... etc". The download should begin shortly afte...
{ "language": "en", "url": "https://stackoverflow.com/questions/156686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Community server Username issue - User Username not found in membership store does not exist I have an error occuring frequently from our community server installation whenever the googlesitemap.ashx is traversed on a specific sectionID. I suspect that a username has been amended but the posts havn't recached to ref...
{ "language": "en", "url": "https://stackoverflow.com/questions/156688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do you have a common base class for Hibernate entities? Do you have a common base class for Hibernate entities, i.e. a MappedSuperclass with id, version and other common properties? Are there any drawbacks? Example: @MappedSuperclass() public class BaseEntity { private Long id; private Long version; ......
{ "language": "en", "url": "https://stackoverflow.com/questions/156689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is it safe to run Access 2003 and 2007 at the same time? My question about the reconfiguration delay when switching between Access 2003 and 2007 the comment was made: Btw, you can't avoid the reconfiguration between Access 2007 and earlier versions. Access 2007 uses some of the same registry keys as earlier versions...
{ "language": "en", "url": "https://stackoverflow.com/questions/156694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Which web browsers natively support Array.forEach() Which browsers other than Firefox support Array.forEach()? Mozilla say it's an extension to the standard and I realise it's trivial to add to the array prototype, I'm just wondering what other browsers support it? A: All modern browsers but IE. A: I just checked...
{ "language": "en", "url": "https://stackoverflow.com/questions/156696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: How to encode characters from Oracle to XML? In my environment here I use Java to serialize the result set to XML. It happens basically like this: //foreach column of each row xmlHandler.startElement(uri, lname, "column", attributes); String chars = rs.getString(i); xmlHandler.characters(chars.toCharArray(), 0, char...
{ "language": "en", "url": "https://stackoverflow.com/questions/156697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Dealing with "global" data structures in an object-oriented world This is a question with many answers - I am interested in knowing what others consider to be "best practice". Consider the following situation: you have an object-oriented program that contains one or more data structures that are needed by many diffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/156701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: In Eclipse, how do I replace a character by a new line? In Eclipse 3.3.2, I would like to replace a character (say ',') by a new line in a file. What should I write in the "Replace with" box in order to do so ? EDIT : Many answers seems to be for Eclipse 3.4. Is there a solution for Eclipse 3.3.X ? A: Check box 'Re...
{ "language": "en", "url": "https://stackoverflow.com/questions/156707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: What is the default lifetime of a session? If I hit a page which calls session_start(), how long would I have to wait before I get a new session ID when I refresh the page? A: Check out php.ini the value set for session.gc_maxlifetime is the ID lifetime in seconds. I believe the default is 1440 seconds (24 mins) ht...
{ "language": "en", "url": "https://stackoverflow.com/questions/156712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: Seam Problem: Could not set field value by reflection I'm having a problem with my Seam code and I can't seem to figure out what I'm doing wrong. It's doing my head in :) Here's an excerpt of the stack trace: Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field com.oobjects.sso.manager.h...
{ "language": "en", "url": "https://stackoverflow.com/questions/156724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Hooking up Reporting Services 2005SP2 to SQL Server 2008 I am trying to configure Reporting Services 2005SP2 on a machine with SQL 2008 on another hosting the ReportServer DB. When I create the ReportServerDB the DB is created as version C.0.9.45: When, afterwards, I try to initialise Reporting Services, I get an er...
{ "language": "en", "url": "https://stackoverflow.com/questions/156740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best Practices for Eclipse's Problems View I am using Eclipse for quite some time and I still haven't found how to configure the Problems View to display only the Errors and Warnings of interest. Is there an easy way to filter out warnings from a specific resource or from a specific path? For example, when I generat...
{ "language": "en", "url": "https://stackoverflow.com/questions/156745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: SSL pages under ASP.NET MVC How do I go about using HTTPS for some of the pages in my ASP.NET MVC based site? Steve Sanderson has a pretty good tutorial on how to do this in a DRY way on Preview 4 at: http://blog.codeville.net/2008/08/05/adding-httpsssl-support-to-aspnet-mvc-routing/ Is there a better / updated way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: What's the difference between an argument and a parameter? When verbally talking about methods, I'm never sure whether to use the word argument or parameter or something else. Either way the other people know what I mean, but what's correct, and what's the history of the terms? I'm a C# programmer, but I also wonder...
{ "language": "en", "url": "https://stackoverflow.com/questions/156767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "978" }
Q: How can I find similar address records? The workflow is like this: * *I receive a scan of a coupon with data (firstname, lastname, zip, city + misc information) on it. *Before I create a new customer, I have to search the database if the customer might exist already. Now my question: What's the best way to fin...
{ "language": "en", "url": "https://stackoverflow.com/questions/156769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there any website which showcase nice / comprehensive build.xml? What i mean exactly is that build.xml that actually included those plugins like findbugs etc. Or nicely done build.xml A: A great resource for sample Ant build files is Google code search. Search Google Code for build.xml. Once you search, narrow ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Distributed corporate collaboration tools I'm looking for a corporate collaboration tool to help bring together my team, who are geographically and organisationally distributed. Some team members operate on client sites, behind corporate firewalls and similar. The restrictions I have are: * *Must allow creation ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to output a CDATA section from a Sax XmlHandler This is a followup question of How to encode characters from Oracle to Xml? In my environment here I use Java to serialize the result set to xml. I have no access to the output stream itself, only to a org.xml.sax.ContentHandler. When I try to output characters in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# - How do I define an inline method Func as a parameter? I've written a simple SessionItem management class to handle all those pesky null checks and insert a default value if none exists. Here is my GetItem method: public static T GetItem<T>(string key, Func<T> defaultValue) { if (HttpContext.Current.Session...
{ "language": "en", "url": "https://stackoverflow.com/questions/156779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Does .NET Reporting Services support vectorial graphics? After diving into the www, I don't have a clue about the support of vectorial grahics/image by reporting services. It seems to be impossible. We are using Reporting Services with a PDF rendering and we are forced to use raw bitmap into reports. That leads to h...
{ "language": "en", "url": "https://stackoverflow.com/questions/156782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: IE6 crashes while displaying simple site I have a really strange problem with an quite simple ASP.NET (.NET 3.5) Site and the IE6. It seems sometimes and on certain machines, the IE6 crashes while displaying the site. CSS was already eliminated as a reason for the crashes. After a while of research, I was not able t...
{ "language": "en", "url": "https://stackoverflow.com/questions/156798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is data area? In C++ the storage class specifier static allocates memory from the data area. What does "data area" mean? A: I'm not familiar with the term “data area” but memory is often divided into “code section” and “data section”. Code resides in the former, data in the latter. I presume this is what's mea...
{ "language": "en", "url": "https://stackoverflow.com/questions/156799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Silverlight display problem I have created a nice silverlight control doing exactly what I want it to do, and it looks great :) When I host it in the test projects ASPX sample file or the HTML sample file it shows up nicely. I now have to use the control in my existing ASP.NET 2.0 project, which has a fancy design. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/156800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Download files to local drive when sshed What is the best way to download files to local hard drive when logged in to another computer using ssh in bash. I'm aware of sftp, but it is not convienent, e.g. it lacks tab completion of directory names. I'm using Ubuntu 8.04.1 . I don't have a public IP and would not like...
{ "language": "en", "url": "https://stackoverflow.com/questions/156810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Explain x => x.ToString() //simplify so many calls In a question answer I find the following coding tip:- 2) simple lambdas with one parameter: x => x.ToString() //simplify so many calls As someone who has not yet used 3.0 I don't really understand this tip but it looks interesting so I would appreciate an expantio...
{ "language": "en", "url": "https://stackoverflow.com/questions/156815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Online viewing of server logs? Is this encouraged? I understand that this could be a big security issue if people manage to hack it and able to view the server logs. Is there any application that can actually grab logs and display via web interface with the necessary security imposed? I am talking about java enterpr...
{ "language": "en", "url": "https://stackoverflow.com/questions/156817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Redirect ILog Messages I'm currently developing a RCP Eclipse Application. For logging purposes I use SFL4J over log4j. For my own code this works well since I can specify the correct logger ( LoggerFactory.getLogger ... logger.debug...). But how can I redirect all the plugin logs to the same location, so that I can...
{ "language": "en", "url": "https://stackoverflow.com/questions/156821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: database synchronization - SFTP / RMAN / By codes? Which method you all will recommend and why? A: Since you mention RMAN, may I assume that you are talking in particular about an Oracle database? Or are you talking about a more generic problem? What is the business purpose of synchronizing the databases? That is...
{ "language": "en", "url": "https://stackoverflow.com/questions/156830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to consume a wcf service when i only know its URL I need to consume a wcf service dynamically when all i know is its URL. I do not have the option of creating a service reference or web reference as my client side code picks up the URL from a config file. What classes and methods can i use from the System.Servic...
{ "language": "en", "url": "https://stackoverflow.com/questions/156833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Undefined Variable in php I have inherited some code for a custom CMS that is a little out of my league and keep stumbling over the same errors, Notice: Undefined variable: media in /Applications/MAMP/htdocs/Chapman/Chapman_cms/admin/team-2.php on line 48. This is supposed to create new users and edit old users. How...
{ "language": "en", "url": "https://stackoverflow.com/questions/156835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Dynamicaly populating a combobox with values from a Map based on what's selected in another combobox Ok, here's one for the Java/JavaScript gurus: In my app, one of the controllers passes a TreeMap to it's JSP. This map has car manufacturer's names as keys and Lists of Car objects as values. These Car objects are si...
{ "language": "en", "url": "https://stackoverflow.com/questions/156852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to communicate between CE 6.0 device (as server) and PC (as client) We're in the process of developing a measurement device that will be running CE 6.0 with CF 3.5 on x86 embedded hardware, a PC is used to control the device and is connected with it using ethernet. We would like to communicate using interfaces...
{ "language": "en", "url": "https://stackoverflow.com/questions/156860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to optimize PostgreSQL Configuration? (Is there a tool available?) In postgresql you have a wealth of optimizations at hand to configure it for your performance needs. The settings for memory usage are still easy enough, but with other options like the cost factors for CPU and IO which are used for the query opt...
{ "language": "en", "url": "https://stackoverflow.com/questions/156866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Good simulation software for mobile devices Can anyone recommend good simulation software for mobile devices? I am most interested in Nokia smart phones. A: Are you looking for Emulator for Nokia phones? You can find those here.. Otherwise explain clearly what kind of simulation software you are looking for! A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/156871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }