text
stringlengths
8
267k
meta
dict
Q: How to stop a PHP output buffer from going over the memory limit? Most of my PHP apps have an ob_start at the beginning, runs through all the code, and then outputs the content, sometimes with some modifications, after everything is done. ob_start() //Business Logic, etc header->output(); echo apply_post_filter(ob_g...
{ "language": "en", "url": "https://stackoverflow.com/questions/281531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Does VB.NET trash Access databases? Grasping at straws here... I work with a VB6 desktop system using several 2003-style Access databases (.MDB). Recently, I changed the first function from VB6 to VB.NET, still using an Access database. This is more than a conversion, but a rewrite with additional functionality. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ZRM snapshot vs InnoDB hot backup for MySQL Are there major advantages to InnoDB hot backup vs ZRM snapshots in terms of disruption to the running site, the size of compressed backup files, and speed of backup/restore on a medium-sized to largish all-InnoDB database? My understanding is that InnoDB's approach is mor...
{ "language": "en", "url": "https://stackoverflow.com/questions/281538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to quickly switch the status bar background style when an application is started? This might be a bit difficult to explain in writing, so please bear with me here. Whenever I wanted to customize the style of the status bar to the "dark" one, I simply add the following line to my AppDelegate's -applicationDidFini...
{ "language": "en", "url": "https://stackoverflow.com/questions/281542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What can influence Delphi executable size? I have the very same delphi version, bpls, components, everything. And yet in three machines the resulting executables are different in size. What else can influence in the size of the exe? In my machine I get this size (Vista 6.0.6001): 4.547.584 bytes In my colleague's m...
{ "language": "en", "url": "https://stackoverflow.com/questions/281548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How good is FreeBSD as a development platform? I know that lots of web hosting providers are offering FreeBSD, but how good is FreeBSD as a development platform? Specifically, is Java 1.6 available in it? Is there somthing specific that it offers with regard to tools that is not available under Linux? A: You can g...
{ "language": "en", "url": "https://stackoverflow.com/questions/281555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Run a method on tab switch or when leaving a UIViewController's focus I'd like to run a method when a user switches to another tab or when the application is closed. Is there a way to do this with the iphone sdk? I've tried looking at the methods for the view controllers and the tab bars, but I didn't see any metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/281559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delphi 2007 VI/VIM Key Mapping After reading The Pragmatic Programmer, I became quite accustomed to VIM. When in Visual Studio I have ViEmu (http://www.viemu.com/) to provide me with VIM functionality. Is anyone aware of a similar program/key binding/workaround to integrate VI/VIM key bindings in CodeGear Delphi 20...
{ "language": "en", "url": "https://stackoverflow.com/questions/281561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Getting begin and end positions with AntLR I'm currently using AntLR to parse some files with a proprietary language. I have a need of highlighting sections of it on an editor (think of highlighting a method in a Java class, for instance). Does anyone has a hint on how to get them? Say I have this code: function tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/281563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: FileSystemWatcher and network disconnect? How can I make it work in a network? It works then it stops working without reason (maybe because the network isn't perfect). A: You need to reconnect with FileSystemWatcher. Make your variable of type FileSystemWatcher global to your class, add the event WatcherError. Insi...
{ "language": "en", "url": "https://stackoverflow.com/questions/281573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Web page runtime errors As I use the web, I regularly get runtime errors (usually javascript) being reported via popups. This can make for a really unsatisfying user experience on many otherwise excellent websites and also makes me wonder what functionality I am not getting access to. Why is this such a common issue...
{ "language": "en", "url": "https://stackoverflow.com/questions/281576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby - Passing Blocks To Methods I'm trying to do Ruby password input with the Highline gem and since I have the user input the password twice, I'd like to eliminate the duplication on the blocks I'm passing in. For example, a simple version of what I'm doing right now is: new_pass = ask("Enter your new password: ")...
{ "language": "en", "url": "https://stackoverflow.com/questions/281579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: lovdbyless VS Community engine...which is best? So with ruby being ushered in as the new programming messiah, I'm wondering if anyone has preferences based upon ease of use, resources needed to run, usability and ease of customization. is there a better of the two? A: Well, any comparison of Rails-based social netw...
{ "language": "en", "url": "https://stackoverflow.com/questions/281582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Display collections of objects in DataGridViews Using an ORM approach in applications can often lead to the scenario where you have a collection of objects you've retrieved and would like to display them in a tabular view using a DataGridView. In my (limited) experience, binding collections of objects using a custom...
{ "language": "en", "url": "https://stackoverflow.com/questions/281584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to maintain ASP.NET ViewState in dynamically rendered HTML control? I want to make custom control which has couple of <input type='checkbox' /> controls which I render in Render method. Is it possible to retain ViewState (e.g. checked or not) on these Controls? There is a way of doing this by using A...
{ "language": "en", "url": "https://stackoverflow.com/questions/281586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the actual performance differences between Int64 and Int32 on 32 and 64 bit MS Windows? What are the actual performance differences between Int64 and Int32 on 32 and 64 bit MS Windows? It would also be great to see some actual timings of Int64 vs Int32 on each of the two operating system variants. XP or Vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/281590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I test my pages in the AOL browser without installing AOL? How can I test my site in AOL without installing AOL? I did that once on my machine, and it killed it... ;) I know, I know... I can use a Virtual Machine, but I'm really just looking for an AOL Browser... a separate browser install. A: You can downlo...
{ "language": "en", "url": "https://stackoverflow.com/questions/281596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how do you specify field dependencies in an XML Schema? This is more of an generic XML Schema question, but if and how do you specify field dependencies in an XML Schema. For example, how would I say fieldB is required, if fieldA is provided ??? A: You could fake this using <choice> and/or <sequence>. For example, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Use a separate scroll bar for a textbox I am developing a touch screen application that has to display a possibly large amount of text. The problem I am having is that the default scroll bar attached to text boxes is just too small to be practically used in a touch screen application. I have tried adding a separate ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why does UDP have a length field in the header and TCP does not? Why does UDP have a length field in the header and TCP does not? I am guessing that the length of the segment in TCP is inferred from the IP header but one should be able to do the same for a UDP datagram A: According to TCP/IP Illustrated Volume 1, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/281606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: database encryption I need my database to be secure in case of the hard drive being stolen. I have not seen many databases (even mainstream ones) claiming to support encryption. * *Do you guys know of any databases that support encryption? *If I'm using a database that doesn't support encryption, is it a bad i...
{ "language": "en", "url": "https://stackoverflow.com/questions/281618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Best way to modularize a block of JSP code I have a block of JSP code that needs to be used in several places (basically a widget that several pages use). What's a good way to modularize this? I'd rather not put it in an object since string manipulation of HTML gets ugly. Using <%@ include file="foo.jsp"%> is proble...
{ "language": "en", "url": "https://stackoverflow.com/questions/281624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Graceful handling of server timeout in BlazeDS I have a flex client that makes service calls to a tomcat server running BlazeDS. I would like to gracefully handle server session timeouts in this environment. I do have security constraints on the service, so the client authenticates against a remote object by initia...
{ "language": "en", "url": "https://stackoverflow.com/questions/281627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I get a human-readable file size in bytes abbreviation using .NET? How do I get a human-readable file size in bytes abbreviation using .NET? Example: Take input 7,326,629 and display 6.98 MB A: string[] suffixes = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; int s = 0; long size = fileInfo.Length...
{ "language": "en", "url": "https://stackoverflow.com/questions/281640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "328" }
Q: SQL Command Add Database Diagramming Is there a tsql command on sqlserver 2008 which can be run in order to enable Database Diagramming instead of this dialog appearing: This database does not have one or more of the support objects required to use database diagramming. Do you wish to create them? A: The script ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Splitting Word documents with VBA I have a Word document that starts with a Table of Contents. I need to break up the document into sections based on the Table of Contents. The Table of Contents has a section title and section number. How can I use VBA to split the document based on the section numbers/ name? A: If...
{ "language": "en", "url": "https://stackoverflow.com/questions/281657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET - Separation of concerns Imagine the following scenario - we have Page1 which contains controls Control A and Control B. Say Control A has a button, and on the click of this button we want Control B to react. But we want to do this in an abstract fashion, i.e. we can't have Control B knowing anything about C...
{ "language": "en", "url": "https://stackoverflow.com/questions/281664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET Development Server or Localhost IIS? Currently our dev team set up all the websites they're working on in IIS on their local machine. We're thinking of switching to using the built in ASP.NET development server instead. Is this a good idea? What are the pros / cons of using the ASP.NET dev Server? Are there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Reference to undeclared entity exception while working with XML I am trying to set the innerxml of a xmldoc but get the exception: Reference to undeclared entity XmlDocument xmldoc = new XmlDocument(); string text = "Hello, I am text &alpha; &nbsp; &ndash; &mdash;" xmldoc.InnerXml = "<p>" + text + "</p>"; This thro...
{ "language": "en", "url": "https://stackoverflow.com/questions/281682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to create an ASP.NET custom control with a dash in the name? I want to set up an ASP.NET custom control such that it has a custom name, specifically, with a hyphen within it, so it might look like this in markup: <rp:do-something runat="server" id="doSomething1" /> I don't mind if this syntax requires setting up...
{ "language": "en", "url": "https://stackoverflow.com/questions/281694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I find the remote host name in asp.net? I used code like this to find the remote user name: banner_label.Text = "Welcome, <B>" + User.Identity.Name + "</B>!" I'd also like to find the remote host name. My production environment will be a corporate intranet with active directory. A: You're on an Intranet, so...
{ "language": "en", "url": "https://stackoverflow.com/questions/281697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is wrong with this inheritance? I just don't get it. Tried on VC++ 2008 and G++ 4.3.2 #include <map> class A : public std::multimap<int, bool> { public: size_type erase(int k, bool v) { return erase(k); // <- this fails; had to change to __super::erase(k) } }; int main() { A a; a....
{ "language": "en", "url": "https://stackoverflow.com/questions/281698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Has anyone tried their software with ReactOS yet? The Free MS Windows replacement operating system ReactOS has just released a new version. They have a large and active development team. * *Have you tried your software with it yet? *if so what is your recommendation? *Is it time to start investigating it as a...
{ "language": "en", "url": "https://stackoverflow.com/questions/281704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Drag and drop from Windows File Explorer onto a Windows Form is not working I'm having an issue dragging a file from Windows Explorer on to a Windows Forms application. It works fine when I drag text, but for some reason it is not recognizing the file. Here is my test code: namespace WindowsFormsApplication1 { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: DoEvents In a DLL Do you have any ideas how to call DoEvents from a C# DLL A: Do you mean System.Windows.Forms.Application.DoEvents()? A: I'd echo the "don't" (either from a dll or a UI project). There are several things you can do to make library code play nicely with a UI,including the same threading tricks (wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/281714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: pulling location.href or window.location from fire fox without it being encoded I'm passing a url through google translate and in my location bar on Fire fox, the url looks as it should: http://72.14.235.104/translate_c?hl=en&langpair=en|ru&sl=ru&tl=ru&u=http://something.something/something/.....orig_term%3Dмалярии ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Howto get SharePoint version using object model With WSSv2 (SharePoint 2003) you could get the version of SharePoint you were working with e.g. SPGloablAdmin.Version gives you "12.0.0.6219" for WSSv3 SP1 However its now obsolete (although still works). Does anyone know the WSSv3 (SharePoint 2007) equivalent? You ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/281718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Has anyone out there succeeded in building Chrome under Windows? I am quantitatively studying various metrics associated with automated tests. Chrome seems to have a reasonable set, so I wanted to add it to my data set. I downloaded the Chrome source code and tried to build it with VisualStudio but got several hundr...
{ "language": "en", "url": "https://stackoverflow.com/questions/281719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does the MySQL TRIM function not trim line breaks or carriage returns? From my experiments, it does not appear to do so. If this is indeed true, what is the best method for removing line breaks? I'm currently experimenting with the parameters that TRIM accepts of the character to remove, starting with trimming \n an...
{ "language": "en", "url": "https://stackoverflow.com/questions/281724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Template specialization based on inherit class I want to make this specialized w/o changing main. Is it possible to specialize something based on its base class? I hope so. -edit- I'll have several classes that inherit from SomeTag. I don't want to write the same specialization for each of them. class SomeTag {}; cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/281725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Best Strategies for preventing addresses with PO Boxes? I have a client which is shipping via UPS, and therefore cannot deliver to Post Office boxes. I would like to be able to validate customer address fields in order to prevent them from entering addresses which include a PO box. It would be best if this were impl...
{ "language": "en", "url": "https://stackoverflow.com/questions/281743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using PreparedStatement pooling in dbcp Can someone explain how exactly prepared connection pooling using dbcp can be used? (with some example code if possible). I've figured out how to turn it on - passing a KeyedObjectPoolFactory to the PoolableConnectionFactory. But how should the specific prepared statements be...
{ "language": "en", "url": "https://stackoverflow.com/questions/281744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Unit tests vs integration tests with Spring I'm working on a Spring MVC project, and I have unit tests for all of the various components in the source tree. For example, if I have a controller HomeController, which needs to have a LoginService injected into it, then in my unit test HomeControllerTest I simply instan...
{ "language": "en", "url": "https://stackoverflow.com/questions/281758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: In CocoaTouch (iPhone OS) how do I find/eliminate leaks that the Instruments Leak tool doesn't find? I have an iPhone app that is running great in the simulator. It responds well to the memory warnings by getting rid of everything that is not absolutely essential. When I run it on the device, it runs well. But af...
{ "language": "en", "url": "https://stackoverflow.com/questions/281764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Code Pointers in VS.Net 2003 are out of whack I have a .net 1.1 project in VS.Net 2003 (using C#) in which I can set a breakpoint in one method, and step through code just fine, but when I hit one specific method (which we also wrote), the breakpoints and code pointers go "whacky", for lack of a better term. If the...
{ "language": "en", "url": "https://stackoverflow.com/questions/281765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to increase mysqld-nt CPU usage I have a pretty much default installation on mysql on Windows 2003. I am rebuilding some indexes and the process only seems to use 3-20% of the CPU. Is there a way to allow it to use more and speed up the process? A: This applies to every application/process, not only mysql. If y...
{ "language": "en", "url": "https://stackoverflow.com/questions/281767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NSXMLParser and entity references What do I need to do to NSXMLParser so it handles entity characters? For example, if I have the following element <anElement>Left & Right</anElement> I am only getting " Right" in the parser:foundCharacters: delegate method. Thanks. A: I threw together a really quick prototype appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/281781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Building a VST plugin on Mac OS X without Xcode How do I build a VST plugin on Mac without using Xcode? (I'm using Code::Blocks). A: If you really insist on bypassing Xcode, you should just go ahead and use 'make', which probably will prove to be just as much of a pain as trying to use Code::Blocks. Although Xcode...
{ "language": "en", "url": "https://stackoverflow.com/questions/281783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best way to take a snapshot of an object to a file What's the best way to output the public contents of an object to a human-readable file? I'm looking for a way to do this that would not require me to know of all the members of the class, but rather use the compiler to tell me what members exist, and what their nam...
{ "language": "en", "url": "https://stackoverflow.com/questions/281787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting the background of NSBox to a gradient programmatically without subclassing I want to set the background of an NSBox to be a gradient. In Interface Builder it is possible to set the background color of an NSBox to selectedMenuColor which is a gradient. NSBox only has a setFillColor method so how is Interface...
{ "language": "en", "url": "https://stackoverflow.com/questions/281791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reg-Free COM in an ASP.Net application I am wondering if it is possible to use Reg-Free COM in an ASP.Net application? A: According to this it is: http://www.mazecomputer.com/sxs/help/iis6aspnet2.htm I haven't tried, it I've just been researching the same idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/281800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I test if two dates are within a certain tolerance in NUnit? How do I test if two dates are within a certain tolerance in NUnit? A: You may want to look at the "Within" method that lives off of the Constraint object. For example: Assert.That(DateTime.Now, Is.EqualTo(DateTime.Now.AddMilliseconds(1000)).Within...
{ "language": "en", "url": "https://stackoverflow.com/questions/281811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Unmangling the result of std::type_info::name I'm currently working on some logging code that supposed to - among other things - print information about the calling function. This should be relatively easy, standard C++ has a type_info class. This contains the name of the typeid'd class/function/etc. but it's mangle...
{ "language": "en", "url": "https://stackoverflow.com/questions/281818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "122" }
Q: How to show a Context Menu when you right click a Menu Item I am porting an MFC application to .NET WinForms. In the MFC application, you can right click on a menu or on a context menu item and we show another context menu with diagnostic and configuration items. I am trying to port this functionality to .NET, but I...
{ "language": "en", "url": "https://stackoverflow.com/questions/281831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Transforming HTML with XSL and modifying form attributes I would like to parse HTML document and replace action attribute of all the forms and add some hidden fields with XSL. Can someone show some examples of XSL that can do this? A: What you need first is well formed HTML (at least transitional), although best re...
{ "language": "en", "url": "https://stackoverflow.com/questions/281837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Retrieve target element in CodeAccessSecurityAttribute I realize you can't get the target entity in the Attribute itself, but what about in an associated Permission object when using a CodeAccessSecurityAttribute? The Permission object gets called at runtime so it seems there should be a way but I'm at a loss. publ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Large XML parcels and using attributes or elements I understand that there's no universal answer to the attribute vs. element debate (and I read through the other questions I saw on this), but any insight into this particular circumstance would be greatly appreciated. In our case we're going to be receiving very l...
{ "language": "en", "url": "https://stackoverflow.com/questions/281847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the rationale of SwingWorker? For what I can read, it is used to dispatch a new thread in a swing app to perform some "background" work, but what's the benefit from using this rather than a "normal" thread? Is not the same using a new Thread and when it finish invoke some GUI method using SwingUtilities.invo...
{ "language": "en", "url": "https://stackoverflow.com/questions/281855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Get IP Address of Remote Client with No DNS Entry in VB.Net I have a Windows forms application running on a terminal server. I need to determine the IP addresses of each client machine. I found a way to retreive the IP address for computers with DNS entries (example below), but several of my thin clients were set u...
{ "language": "en", "url": "https://stackoverflow.com/questions/281856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Access Response Object in a class ASP.NET I have a function that checks if a cookie (by name) exists or not: Private Function cookieExists(ByVal cName As String) As Boolean For Each c As HttpCookie In Response.Cookies If c.Name = cName Then Return True Next Return False End Function I have a cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/281864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Query: count multiple aggregates per item Often you need to show a list of database items and certain aggregate numbers about each item. For instance, when you type the title text on Stack Overflow, the Related Questions list appears. The list shows the titles of related entries and the single aggregated number of q...
{ "language": "en", "url": "https://stackoverflow.com/questions/281866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SessionID keeps changing in ASP.NET MVC why? I am trying to keep track of something and using the SessionID as they key to that object However the SessionID every 2-3 reqiests changes shouldn't it remain the same? HttpContext.Session.SessionID Is the code I am using. A: I've seen that happen even without MVC. If I...
{ "language": "en", "url": "https://stackoverflow.com/questions/281881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: A Small Web Server Can someone suggest a small webserver implementation that will illustrate the concepts of what a webserver does? It should be in a language that is easily read, and understood, and should implement security and cgi, maybe javascript? A: thttpd, a tiny/turbo/throttling http server. It is writte...
{ "language": "en", "url": "https://stackoverflow.com/questions/281884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Open explorer on a file In Python, how do I jump to a file in the Windows Explorer? I found a solution for jumping to folders: import subprocess subprocess.Popen('explorer "C:\path\of\folder"') but I have no solution for files. A: For anyone wondering how to use a variable in place of a direct file path. The code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: Hibernate JPA to DDL command line tools There are Hibernate tools for mapping files to ddl generation; ddl to mapping files and so on, but I can't find any command line tools for simple DDL generation from JPA annotated classes. Does anyone know an easy way to do this? (Not using Ant or Maven workarounds) A: I'm no...
{ "language": "en", "url": "https://stackoverflow.com/questions/281890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you rename a Role using Membership in .NET? I'm using ASP.NET Membership and noticed there isn't a method in the Roles class to modify a role (its name for instance), only to create and delete them. Is it possible or it's not supported? EDIT: @CheGueVerra: Yes, nice workaround. Do you know (for extra credit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to return a range of cells in VBA without using a loop? let's say I have a excel spread sheet like below: col1 col2 ------------ dog1 dog dog2 dog dog3 dog dog4 dog cat1 cat cat2 cat cat3 cat I want to return a range of cells (dog1,dog2,dog3,dog4) or (cat1,cat2,cat3) based on either "dog" or "c...
{ "language": "en", "url": "https://stackoverflow.com/questions/281909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I change the event queue priority in JavaScript? I need a distinct sound to play when a error occurs. The error is the result of a problem with one of perhaps two hundred barcodes that are being inputted in rapid fire. The event queue seems to handle keyboard input (which the barcode scanner emulates) first, a...
{ "language": "en", "url": "https://stackoverflow.com/questions/281912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I change the database schema using a Statement.execute() in Java ( and SQL Server)? I need to execute a SQL Server system stored procedure, programmatically, and since it executes in the current schema, I need to change it on the fly. Like this Statement st = connection.createStatement(); st.execute("EXEC SP...
{ "language": "en", "url": "https://stackoverflow.com/questions/281913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What do you suspect when ASP.NET ignores a CustomValidator? This is as much a code maintenance issue as a code issue, but I have a WebForm that no longer checks it CustomValidator. It worked when I last touched the code over a year ago, but it no longer works now that the user has requested some changes ... The WebF...
{ "language": "en", "url": "https://stackoverflow.com/questions/281914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I do synchronous rpc calls I'm building a program that has a class used locally, but I want the same class to be used the same way over the network. This means I need to be able to make synchronous calls to any of its public methods. The class reads and writes files, so I think XML-RPC is too much overhead. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Buffer pool management using C# We need to develop some kind of buffer management for an application we are developing using C#. Essentially, the application receives messages from devices as and when they come in (there could be many in a short space of time). We need to queue them up in some kind of buffer pool so...
{ "language": "en", "url": "https://stackoverflow.com/questions/281924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Easy parallelisation I often find myself writing simple for loops to perform an operation to many files, for example: for i in `find . | grep ".xml$"`; do bzip2 $i; done It seems a bit depressing that on my 4-core machine only one core is getting used.. is there an easy way I can add parallelism to my shell scripti...
{ "language": "en", "url": "https://stackoverflow.com/questions/281928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to rewrite this block of code using a StringBuilder in Java? Given a word, I've to replace some specific alphabets with some specific letters such as 1 for a, 5 for b etc. I'm using regex for this. I understand that StringBuilder is the best way to deal with this problem as I'm doing a lot of string manipulation...
{ "language": "en", "url": "https://stackoverflow.com/questions/281933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Are there any Ajax-based UML modeling tools? I'm looking for something like WWW SQL Designer for UML Modeling. A: This one is not in Ajax, it's in flash, at least it is online: http://www.gskinner.com/gmodeler/launch.html A: http://www.websequencediagrams.com/ Sequence diagrams are UML too. A: http://www.umlcanva...
{ "language": "en", "url": "https://stackoverflow.com/questions/281940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Data type support in ColdFusion querynew() Does anyone know of a way to store values as NVARCHAR in a manually created query in ColdFusion using the querynew() function? I have multiple parts of a largish program relying on using a query as an input point to construct an excel worksheet (using Ben's POI) so it's so...
{ "language": "en", "url": "https://stackoverflow.com/questions/281945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: "net use" command in a Windows Service We're using the following command line from within a Windows Service developed with C# .Net Framework 1.1: net use z: \\myComputer\c$ The service is running under a domain account that is a local administrator on "myComputer". After debugging the code we can see that it does n...
{ "language": "en", "url": "https://stackoverflow.com/questions/281951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to highlight input text field upon clicking it in Safari? I would like the value of the input text box to be highlighted when it gains focus, either by clicking it or tabbing to it. <html> <body> <script> function focusTest(el) { el.select(); } </script> <input type="text" value="one" OnFocus="focusTest(thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/281960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What do Streams do when implementing AES encryption in .NET? The Rijndael encryption algorithm is implemented in .NET using 3 streams in the following example: Rinjdael. Can someone explain to me what these streams are doing? How/Why are they used? // Declare the streams used // to encrypt to an in memory // array ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are all the valid ASP.NET Webmethod return types? Can my webmethod only return strings like I see in all the asp.net site examples? A: asp.net Webmethods can return any serializable data type. A: Assuming that this question is about the legacy ASMX web service technology, see Data Types Supported by XML Web S...
{ "language": "en", "url": "https://stackoverflow.com/questions/281978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Do you generate your data dictionary? Do you generate your data dictionary? If so, how? I use extended procedures in SQL Server 2005 to hold onto table and field information. I have some queries that create a dictionary out of them, but it's ... meh. Do you have a particular query or tool you use? Do you generate i...
{ "language": "en", "url": "https://stackoverflow.com/questions/281979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Visual Studio 2005 Quick find missing Search in solution If I open a solution then press CTRL + F and select Quick Find, the Look in drop-down doesn't have "Entire solution" as an option (Find in files still has it). Any idea how to fix this? Thanks! A: According to a response on Experts exchange(a community where ...
{ "language": "en", "url": "https://stackoverflow.com/questions/281985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I read the value of a checkbox in a word (*.doc) file in VB.net using a Range object? How do I read the value of a checkbox in a word (*.doc) file in VB.net using a range object? This is what I have so far: Dim app As New Word.Application Dim doc As Document doc = app.Documents.Open("C:\myDoc.doc") dim chkBox...
{ "language": "en", "url": "https://stackoverflow.com/questions/281990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to add more syntax elements for eclipse Im trying to add more syntax elements for Zend Studio for eclipse. I want to change the color of the equal sign and it is not listed so I can change it. A: You'll probably want to vote for http://bugs.eclipse.org/213992 as there's no way to do it without changing the sou...
{ "language": "en", "url": "https://stackoverflow.com/questions/281992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: RichTextBox CtrlI I have a RichTextBox in .NET WinForms. I have been hooking up hot keys with KeyUp. Everything is working fine, except for CtrlI. By the time my handler gets its turn, the selection has been replaced with a '\t'. I turned off ShortcutsEnabled, but it didn't make any difference. Any ideas? A: D...
{ "language": "en", "url": "https://stackoverflow.com/questions/281997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WinForms .NET 2.0: How to paint the proper sized icon? i have an ico file that contains a 48x48 and a 256x256 Vista PNG version (as well as the 32x32 and 16x16 versions). i want to draw the icon using the appropriate internal size version. i've tried: Icon ico = Properties.Resources.TestIcon; e.Graphics.DrawIcon(ico...
{ "language": "en", "url": "https://stackoverflow.com/questions/281999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Finding relevant document snippets for search result display In developing search for a site I am building, I decided to go the cheap and quick way and use Microsoft Sql Server's Full Text Search engine instead of something more robust like Lucene.Net. One of the features I would like to have, though, is google-e...
{ "language": "en", "url": "https://stackoverflow.com/questions/282002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Trackbacks in PHP I'm writing a custom blog engine and would like to have trackbacks similar to Wordpress. I could look at the Wordpress source, but I'd really prefer a tutorial of some sort and so far I haven't been able to find one. Are there any good tutorials for implementing trackbacks or pingbacks in PHP5? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/282004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to Disable Wireless Network Connection Notification Balloon? I want to programmatically disable the notification I get when I connect to a wireless network. I know there is a way to disable ALL notifications (see here) but is there a way to only disable the one issued by Windows wireless Manager (i.e. wlanapi.dl...
{ "language": "en", "url": "https://stackoverflow.com/questions/282007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .NET Windows Forms design time rules I have an object that starts a thread, opens a file, and waits for input from other classes. As it receives input, it writes it to disk. Basically, it's a thread safe data logging class... Here's the weird part. When I open a form in the designer (Visual Studio 2008) that uses t...
{ "language": "en", "url": "https://stackoverflow.com/questions/282014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using C++ COM interface in C# for both client and server I need to make a piece of C# code interact through COM with all kinds of implementations. To make it easeier for users of that integration, I included the interacted interfaces in IDL (as part of a relevant existing DLL, but without coclass or implementation),...
{ "language": "en", "url": "https://stackoverflow.com/questions/282016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Nested views - how to access from the controller? In my admin view I would like several sub directories for example: admin/users/list.aspx I also have: admin/list.aspx What is the correct code to access admin/users/list.aspx from the controller? Or should the admin sub directories be at root level of View/ and then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Single read-only user for svn I'm doing some maintenance on a private svn server. Authentication is handled through Apache basic HTTP+mod_authz_svn. I need to have it so every user has read/write access, except for a single read-only user. The read-only user still needs to be authenticated, though. I setup my authz ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to simulate bit-fields in Delphi records? I would like to declare a record in Delphi that contains the same layout as it has in C. For those interested : This record is part of a union in the Windows OS's LDT_ENTRY record. (I need to use this record in Delphi because I'm working on an Xbox emulator in Delphi - s...
{ "language": "en", "url": "https://stackoverflow.com/questions/282019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Audit Schema Mapping with Hibernate and AOP I am trying to audit the action that the user performed that resulted in changes to corresponding tables. For example if a user were to transfer money between 2 accounts this would generate the following sequence of events: * *Insert transfer amount into Transfer table ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP - Randomize function returning same value for two different seeds So I'm generating a random number using Rnd and Randomize to set a seed that looks like this: Randomize lSeed Response.Write Rnd I'm noticing that it's returning the same result for two values in a row for lSeed (e.g. 123, 124) but then on say 12...
{ "language": "en", "url": "https://stackoverflow.com/questions/282024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can ASP.NET 3.5 Web Application Projects be Extended or Patched "in Flight"? In building an ASP.NET 3.5 WAP, I'm always frustrated by the feeling that no matter how I "isolate" or "encapsulate" bits of logic or UI I'm still going to bring down the whole site any time I need to update a single line of code. I may be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How Do You "Lock" the focus of a form to a specific control? How does one lock the focus of a .net application to a specific control? For example, if I have a form with 5 text boxes, and I want them filled out in a specific order, how can I stop someone who is in box 1 from tabbing/clicking to box 2, or hitting OK ...
{ "language": "en", "url": "https://stackoverflow.com/questions/282035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Importing and using external schema using XML Beans I have a bit of a problem. I wrote an API a long time ago for our production system, and it used Apache XML Beans. The schema was homogeneous (ie no imports, everything was from within the same schema), and everything worked just fine, even if the code for API ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/282061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What do I need to do to make property element syntax work for my custom attached property in Silverlight? I have a class like this: public class Stretcher : Panel { public static readonly DependencyProperty StretchAmountProp = DependencyProperty.RegisterAttached("StretchAmount", typeof(double), typeof(Stretcher...
{ "language": "en", "url": "https://stackoverflow.com/questions/282062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }