text
stringlengths
8
267k
meta
dict
Q: Sorting an array of an array of objects in PHP by key value Basically I have a setup like the following: Array ( [0] => Array ( [0] => stdClass Object ( [nid] => 1 [title] => title1 [uid] => 1 [parent] => 0 [weight] => -15 [name] => name1 [value] => 0 ) [1] => stdClass Object ( [nid] => 2 [title] => ...
{ "language": "en", "url": "https://stackoverflow.com/questions/414906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: JMenus caused JOGL GLCanvas canvas to flicker Clicking through JMenu options is causing my JOGL GLCanvas to flicker. The JMenu has the setDefaultLightWeightPopupEnabled set to false. I don't want to use JGLPanel because it runs slower (the application needs to run in full screen mode). Interesting, the flicker st...
{ "language": "en", "url": "https://stackoverflow.com/questions/414915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: DeepCopy for arrays Anyone knows if there is an easy or known way to write a deep copy method that's gonna work on arrays of any kind, ie jagged, multidimensional, etc? I plan to write it as an extension method. There isn't a default method in the framework to do this, right? I am surprised not to find one. I have s...
{ "language": "en", "url": "https://stackoverflow.com/questions/414922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any way to get all the controls on a container control? I've got a form with a bunch of controls on it, and I wanted to iterate through all the controls on a certain panel and enable/disable them. I tried this: var component: TComponent; begin for component in myPanel do (component as TControl).Enable...
{ "language": "en", "url": "https://stackoverflow.com/questions/414928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: ASP.Net Mvc - Is it acceptable for the View to call functions which may cause data retrieval? I am currently playing around with the Asp.Net mvc framework and loving it compared to the classic asp.net way. One thing I am mooting is whether or not it is acceptable for a View to cause (indirectly) access to the databa...
{ "language": "en", "url": "https://stackoverflow.com/questions/414931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: exchange powershell : get-mailbox outside default scope how do you run the cmdlet "get-mailbox" outside the current default scope of the current domain? When I run get-mailbox -OrganizationalUnit bob.com/bobsage I get an error message saying: Get-mailbox: The requested search root 'rss.com/rsstoilet' is not in the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/414932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Access DOM elements after ajax.load I am inserting the HTML response from an AJAX call into my page, but then when I try to access those elements after they have been created, it fails.. This is how i retrieve and insert the HTML: $.ajax({url: 'output.aspx', data: 'id=5', type: 'get', datatype: 'html', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/414943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use Linq to Query for terminal/Leaf nodes in Hierarchical Table/Composite pattern I have a self-referencing table with an Id, CategoryName, and ParentId. It's a typical scenario of a hierarchy table of categories that can themselves be divided into categories that DB experts tell me is called the adjacency model. W...
{ "language": "en", "url": "https://stackoverflow.com/questions/414945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Check if ValidationSummary is Valid using OnClientClick Is there a way to check if a ValidationSummary control has its IsValid property set to true using Javascript in the OnClientClick event of a button? What I'm trying to do is to show a message that says "please wait while your file is uploading" on an upload pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/414946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQLAlchemy DateTime timezone SQLAlchemy's DateTime type allows for a timezone=True argument to save a non-naive datetime object to the database, and to return it as such. Is there any way to modify the timezone of the tzinfo that SQLAlchemy passes in so it could be, for instance, UTC? I realize that I could just use...
{ "language": "en", "url": "https://stackoverflow.com/questions/414952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: How do I fix a fatal error: cannot redeclare class that's only on Macintosh? I get this fatal error only when I run on a Macintosh, but not on a windows browser, which doesn't make sense since, other than checking for the Browser condition, the conditional loops run the same code: Can someone help me understand how ...
{ "language": "en", "url": "https://stackoverflow.com/questions/414954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: silverlight, how to implement a property of type StoryBoard I have a user control and I want to create a property of type storyboard which I can set in xaml, so I tried to following, but I get a bad property error when I run it: private Storyboard sbTransitionIn_m; public Storyboard TransitionIn { get {return sb...
{ "language": "en", "url": "https://stackoverflow.com/questions/414959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to determine when 4 images have been loaded using JS? I have 4 images on a page. I want to trigger a JS event once all 4 images are loaded. I of course can't be sure which order the images will be loaded in, so I can't trigger the event on the last image. One thought was to have a counter, but I can't...
{ "language": "en", "url": "https://stackoverflow.com/questions/414976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding values in various combinations Not sure how best to explain it, other than using an example... Imagine having a client with 10 outstanding invoices, and one day they provide you with a cheque, but do not tell you which invoices it's for. What would be the best way to return all the possible combination of val...
{ "language": "en", "url": "https://stackoverflow.com/questions/414978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Directly modifying List elements I have this struct: struct Map { public int Size; public Map ( int size ) { this.Size = size; } public override string ToString ( ) { return String.Format ( "Size: {0}", this.Size ); } } When using array, it works: Map [ ] arr = new Map ...
{ "language": "en", "url": "https://stackoverflow.com/questions/414981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How to stop .NET from encoding an XML string with XML.Serialization I am working with some Xml Serialization in ASP.NET 2.0 in a web service. The issue is that I have an element which is defined such as this: <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable...
{ "language": "en", "url": "https://stackoverflow.com/questions/414982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Generate string from Grouping Linq Query Given the following code: var people = new List<person>(){ new person { Name = "John", FamilyName = "Pendray" }, new person { FamilyName = "Emery", Name = "Jake"}, new person { FamilyName = "Pendray", Name = "Richard" } }; var q = from p in people ...
{ "language": "en", "url": "https://stackoverflow.com/questions/414984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Integer value changes when exiting preprocessor block I have a chunk of code where it appears that a variable is changing at the end of a pre-processor block of code. int initialKeyCount; #if(DEBUG) // int initialKeyCount = _root.CountAllKeys(); initialKeyCount = 20000; #endif currNode = currNod...
{ "language": "en", "url": "https://stackoverflow.com/questions/414986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I set the Subclipse/Eclipse date format on OS X? Using the Subclipse plugin (1.4.5) for Eclipse (3.4.1, OS X) adds some subversion metadata to the file navigator pane, including the modified date. Unfortunately this date is in m/d/y format, when I would prefer it to be in d/m/y. Subclipse may be using Eclipse...
{ "language": "en", "url": "https://stackoverflow.com/questions/415004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP session variables not carrying over to my logged in page, but session ID is I'm using PHP 4.3.9, Apache/2.0.52 I'm trying to get a login system working that registers DB values in a session where they're available once logged in. I'm losing the session variables once I'm redirected. I'm using the following code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Calling .NET code from IronPython, getting error loading the log4net assembly I've got an IronPython script that configures log4net, then calls .NET code that uses log4net. log4net is properly configured, as I log a message to indicate that it is initialized. But when I try to use my .NET class, it reports "could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Floating columns both ways in JavaScript I am trying to float columns using CSS so they stack up evenly like on this blog: http://typeneu.com It seems to be impossible using CSS so I am looking into JavaScript. The website listed above uses this JavaScript file: http://typeneu.com/wp-content/themes/grid-a-licious/sc...
{ "language": "en", "url": "https://stackoverflow.com/questions/415018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: can cherrypy receive multipart/mixed POSTs out of the box? We're receiving some POST data of xml + arbitrary binary files (like images and audio) from a device that only gives us multipart/mixed encoding. I've setup a cherrypy upload/POST handler for our receiver end. I've managed to allow it to do arbitrary number...
{ "language": "en", "url": "https://stackoverflow.com/questions/415019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Change Tracking Structure We are looking to implement Optimistic locking in our WCF/WPF application. So far the best way I've come up with doing this is to implement a generic Optimistic which will store a copy of the original and any changes (so it will store two copies: the original and modified) of any value obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/415020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: restarting the video driver (programmatically) I have a strange bug somewhere in my system that causes the screen to move very fast when it occurs (I can't really describe it) and I learned to deal with it by putting my laptop to sleep then waking it up .. I'm suspecting it's something with the display driver, and i...
{ "language": "en", "url": "https://stackoverflow.com/questions/415022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Must have Emacs extensions? I'm trying out http://emacspeak.sourceforge.net now that I have it running on windows. I'd like to use emacs as more than a plain text editor and was wondering what extensions/packages everyone can't live with out? The languages I use the most are Perl, Java, and some C/C++. A: There is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I associate metadata with a DeepZoom SubImage? I'm trying to sort through a collection of DeepZoom sub-images based on arbitrary data associated with each image. The sub-images get loaded automagically through an XML file generated by DeepZoom Composer. I don't see a clear way to associate arbitrary data with...
{ "language": "en", "url": "https://stackoverflow.com/questions/415036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is gcc serial? I am compiling some benchmarks, and it says that I can try the option gcc-serial instead of only gcc, can anyone please explain the difference between gcc and gcc serial?. The place where that appears is here and it is mentioned for example in the slide 71. It is mentioned in more places but in n...
{ "language": "en", "url": "https://stackoverflow.com/questions/415063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CSS Overflow Firefox issue I am trying to write a CSS in which when the user writes text and it overflows instead of having a scrollbar or hiding, it just goes down like in a normal Word Document or so. I have this code: #content-text { width: 960px; padding-left: 10px; padding-right:10px; text-align...
{ "language": "en", "url": "https://stackoverflow.com/questions/415065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Managing date formats differences between PHP and MySQL I'm writing my first PHP app that has to directly deal with dates, and thus to directly deal with the fact that PHP and MySQL have different date formats. My question is: what's the most elegant way to manage this difference? I have the following two functions ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I get a Remote Desktop for Linux (XDMCP, VNC) I do this all the time using VNC and it is very easy, but I am curious about a few things like XDMCP. As I understand it, this is a way of creating the entire desktop on a remote X-Server which seems fairly elegant. Several years ago, I worked on a Solaris server ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Passing form data from asp file to php I have a form in an ASP file that I would like to pass to a php script for processing. Is this possible? I don't see why it wouldn't be, but I tried a dummy form on an asp file, with the action="phptest.php" and when submitting it just reloads the form page. A: The data bein...
{ "language": "en", "url": "https://stackoverflow.com/questions/415095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need Visual Studio macro to add banner to all C# files Can someone post a Visual Studio macro which goes through all C# source files in a project and adds a file banner? Extra credit if it works for any type of source file (.cs, .xaml, etc). A: Visual Studio macro to add file headers A: Here you go, I provide an...
{ "language": "en", "url": "https://stackoverflow.com/questions/415101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Strange behavior of Java's TreeMap put() method I have the following code, which splits up a Vector into a string vector (to use as a key) and an integer at the end (to use as value). payoffs.put(new Vector<String>(keyAndOutput.subList(0, keyAndOutput.size() - 1)), Integer.parseInt(keyAndOutput.lastElement())); The...
{ "language": "en", "url": "https://stackoverflow.com/questions/415158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best method of Instantiating an XMLHttpRequest object What is the best method for creating an XMLHttpRequest object? It should work in all capable browsers. A: Here's a useful link and some code (should cover all bases) http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/415160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: ExtJS: AJAX Links in Grid in Tab in Window I am working on my first project using ExtJS. I have a Data Grid sitting inside a Tab that is inside a Window. I want to add a link or button to the each element of the grid (I am using extended elements at the moment with HTML content through the RowExpander) that will mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/415170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Quick, Petty Java Question: Parenthesis around SQLException try { ... } catch (SQLException sqle) { String theError = (sqle).getSQLState(); ... } What does surrounding sqle with parenthesis do? Anything? Just curious. A: Quick reply - Nothing. Longer reply - It might be a vestigial remnan...
{ "language": "en", "url": "https://stackoverflow.com/questions/415179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Company seeking my personal projects during non-work at home? Ok, so I'm building "Web 2.0/3.0" sites to make extra money. I currently run my own personal project sites with some advanced technology in the backend (AI stuff, recommendation system) that I've developed over the years. It's a subscription site for me t...
{ "language": "en", "url": "https://stackoverflow.com/questions/415188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best way to create a simple python web service I've been using python for years, but I have little experience with python web programming. I'd like to create a very simple web service that exposes some functionality from an existing python script for use within my company. It will likely return the results in csv. W...
{ "language": "en", "url": "https://stackoverflow.com/questions/415192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "142" }
Q: Auto generation of META tags in PHP I was thinking of writing a PHP script that would analyse a CMS'd page's content (i.e. database field) and then auto-generate (X)HTML META description & keyword tags, but as always there's no point reinventing the wheel so I'm wondering if anyone knows of such a beastie? The forme...
{ "language": "en", "url": "https://stackoverflow.com/questions/415198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: const_cast for vector with object I understand that const_cast to remove constness of objects is bad, I have the following use case, //note I cannot remove constness in the foo function foo(const std::vector<Object> & objectVec) { ... int size = (int) objectVec.size(); std::vector<Object> tempObjectVec; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to make $_POST persistent? if i have a search function for my site and i want the user's former search preferences to be available at any page on my site where the search module is available all i can think of is to convert the $_POST variable to a cookie... but i am just modifying what was already constructed b...
{ "language": "en", "url": "https://stackoverflow.com/questions/415204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I read the custom HTTP status code using WCF REST? I'm using the ChannelFactory in WCF to call into a REST service and I want to determine whether the server returned HTTP 200 or 201 in response to a PUT call. Currently, the call succeeds, but I can't determine if my object was created or updated. How can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP IRC Robot, Send Command, but now I need the bot to read the command I have a PHP IRC Robot that I use in my channel and I need it to make OPs to specific set users in the script by me. Anyways I want the robot to check if the user is logged into NickServ to prevent any sort of fraud or anything. Anyways, here is...
{ "language": "en", "url": "https://stackoverflow.com/questions/415213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Fixed length strings or structures in C# I need to create a structure or series of strings that are fixed lenght for a project I am working on. Currently it is written in COBOL and is a communication application. It sends a fixed length record via the web and recieves a fixed length record back. I would like to writ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: intro to lambda/anonymous functions I have this function from a plugin (from a previous post) // This method implements the test condition for // finding the ResolutionInfo. private static bool IsResolutionInfo(ImageResource res) { return res.ID == (int)ResourceIDs.ResolutionInfo; } And the line thats calling th...
{ "language": "en", "url": "https://stackoverflow.com/questions/415218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Generate XML documentation for private members Is there a way to generate XML documentation for private members? Be default it only generates it for public members, which is correct for published code but not for code only used within a company. A: Try using GhostDoc. A: My advise is to write the xml documentation...
{ "language": "en", "url": "https://stackoverflow.com/questions/415220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Forms with action="" I just found out (the hard way), that when you have a HTML form with action="", Webkit browsers treat it differently to Firefox and Internet Explorer. In FF and IE, these two form tags are equivalent: <form method="post" action=""> <form method="post"> They will both submit the form back to th...
{ "language": "en", "url": "https://stackoverflow.com/questions/415234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: XML Serialization empty collections not self closing Wondering if anyone can help me with this annoying but trivial (in terms of need) question. I have an object which has inside it a collection of object public class OuterClass { InnerClasses innerClasses= new InnerClasses(); public InnerClasses InnerCl...
{ "language": "en", "url": "https://stackoverflow.com/questions/415239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: .NET Class Refactoring Dilemma So I'm refactoring a legacy codebase I've inherited, and in the process I found a static class that encapsulates the logic for launching 3rd party applications. It essentially looks like this (shortened for brevity to only show one application): using System.IO; using System.Configurat...
{ "language": "en", "url": "https://stackoverflow.com/questions/415240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you make a unit test when the results vary? I am building an application that queries a web service. The data in the database varies and changes over time. How do I build a unit test for this type of application? The web service sends back xml or a no search results html page. I cannot really change the we...
{ "language": "en", "url": "https://stackoverflow.com/questions/415244", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you find out what users really want? I've read somewhere (I forget the source, sorry - I think the MS Office developer's blog?), that when you do a survey of users asking them about what features they would like to see in your software/website, they will more often than not say that they want every little thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/415260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: silverlight: setting RowDetailsTemplate controls from RowDetailsVisibilityChanged Given a silverlight datagrid with RowDetailsVisibilityMode="VisibleWhenSelected", on clicking a row in the datagrid, how do you set or bind the controls in the RowDetailsVisibilityChanged() event? <data:DataGrid.RowDetailsTempl...
{ "language": "en", "url": "https://stackoverflow.com/questions/415268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Installing and Linking PhysX Libraries in Debian Linux I am trying to get PhysX working using Ubuntu. First, I downloaded the SDK here: * *http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz Next, I extracted the files and installed each package with: dpkg -i filename.deb This ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Add Rows on Migrations I'd like to know which is the preferred way to add records to a database table in a Rails Migration. I've read on Ola Bini's book (Jruby on Rails) that he does something like this: class CreateProductCategories < ActiveRecord::Migration #defines the AR class class ProductType < ActiveReco...
{ "language": "en", "url": "https://stackoverflow.com/questions/415287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Best way to combine two or more byte arrays in C# I have 3 byte arrays in C# that I need to combine into one. What would be the most efficient method to complete this task? A: The memorystream class does this job pretty nicely for me. I couldn't get the buffer class to run as fast as memorystream. using (MemoryStr...
{ "language": "en", "url": "https://stackoverflow.com/questions/415291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "276" }
Q: Is there a difference between Perl's shift versus assignment from @_ for subroutine parameters? Let us ignore for a moment Damian Conway's best practice of no more than three positional parameters for any given subroutine. Is there any difference between the two examples below in regards to performance or functional...
{ "language": "en", "url": "https://stackoverflow.com/questions/415297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Why is this wrong? (use of "this" with jQuery) <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js"></script> <script type="text/javascript"> function bigtosmalltriangle() { $(this).siblings("div.break").removeClass('triangle3').addClass('triangle1'); setTimeout ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Element gains 100% width with a height in IE6 I'm trying to make a horizontal list of links with <ul> wherein all <a> is display:block and has a height. In IE6, it keeps getting 100% width after I set a height for <a>, making it a vertical list. HTML: <ul id="header"> <li><a href="#"><span>ST.KILDA ROAD MEDICAL ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Efficiency of persistence methods for large asp.net cache store Curious if anyone has opinions on which method would be better suited for asp.net caching. Option one, have fewer items in the cache which are more complex, or many items which are less complex. For sake of discussion lets imagine my site has SalesPerso...
{ "language": "en", "url": "https://stackoverflow.com/questions/415309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Flash security: problem loading Flash 8 AS2 modules into Flash 6 AS1 module I have an old program written in Actionscript 1, compiled in Flash 6. It loads 10 other modules, of which 3 are written in Actionscript 2, compiled in Flash 8. The original program is embedded into an html and works perfectly when the html f...
{ "language": "en", "url": "https://stackoverflow.com/questions/415310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What happens to an IDisposable object created in the middle of a statement that I cannot explicity call Dispose() on? Say I'm working with Sharepoint (this applies to other object models as well) and in the middle of my statement, I call a method, in this case "OpenWeb()", which creates an IDisposable SPWeb object. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Rails: Fields_for without a scope? Is there a way to use fields_for with in a form without having a scope? For example: <% fields_for "user[]" do |x| <%= x.text_field :name %> <% end %> Without the user model being loaded in memory? I got it working using territory[user][][name], but I would like to keep it in ER...
{ "language": "en", "url": "https://stackoverflow.com/questions/415315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What logging implementation do you prefer? I'm about to implement a logging class in C++ and am trying to decide how to do it. I'm curious to know what kind of different logging implementations there are out there. For example, I've used logging with "levels" in Python. Where you filter out log events that are lower...
{ "language": "en", "url": "https://stackoverflow.com/questions/415344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Induce WCF openTimeout closeTimeout I wish to test and observe timeout behaviours between a WCF client and service host. For receiveTimeout and sendTimeout, it is probably easy to transmit a large byte stream that takes more than a few seconds and set those timeout attributes to ridiculously low values. However, sin...
{ "language": "en", "url": "https://stackoverflow.com/questions/415356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LCD display and Data lines LCDs have 4 data lines. But the data to be displayed in the LCD is given in the ASCII form which is 7 bits. How is that possible? A: I answered a question from another user a while ago (here) that referenced the following doc: www.cloverlcd.com/pdf/S6A0069.pdf. You can get an idea as to h...
{ "language": "en", "url": "https://stackoverflow.com/questions/415368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to display loading graphics in Firefox in Microsoft Reporting Services I am using MS reporting services and some of the reports are taking longer than it should. By default the report viewer displays a loading graphics in IE. However, this graphics is not visible in Firefox. It works fine in IE. How can I displa...
{ "language": "en", "url": "https://stackoverflow.com/questions/415374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using SSE in c# is it possible? I was reading a question about c# code optimization and one solution was to use c++ with SSE. Is it possible to do SSE directly from a c# program? A: Can C# explicitly make an SSE call? No. C# cannot produce inline IL much less inline x86/amd64 assembly. The CLR, and more specifi...
{ "language": "en", "url": "https://stackoverflow.com/questions/415375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What's the difference between .bashrc, .bash_profile, and .environment? I've used a number of different *nix-based systems of the years, and it seems like every flavor of Bash I use has a different algorithm for deciding which startup scripts to run. For the purposes of tasks like setting up environment variables a...
{ "language": "en", "url": "https://stackoverflow.com/questions/415403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: Why does gethostbyaddr(gethostname()) return my IPv6 IP? I'm working on making a simple server application with python, and I'm trying to get the IP to bind the listening socket to. An example I looked at uses this: HOST = gethostbyaddr(gethostname()) With a little more processing after this, it should give me jus...
{ "language": "en", "url": "https://stackoverflow.com/questions/415407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Run batch file as a Windows service In order to run one application, a batch file has to be kicked off (which does things like start Jetty, display live logs, etc). The application will work only if this batch file is running. I am hence forced to have this batch file running and not logout from the Windows server. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "193" }
Q: Testing strategy for large application with few public methods? I'm working on a project which I'm really not sure how to unit test. It's an unobtrusive tag based framework for wiring up events between models, views and delegates in a GUI system. Basically you have one large json file which is used describes all of...
{ "language": "en", "url": "https://stackoverflow.com/questions/415413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to debug CLR stored procedures I have a fairly complex CLR stored procedure. What is the best way to debug the procedure? I would like to step through it if possible. A: Google is your friend. Or more info in your post. How to: Debug a SQL CLR Stored Procedure
{ "language": "en", "url": "https://stackoverflow.com/questions/415418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hiring a SqlServer OLTP Specialist, What experience or requirements should I look for? I'm running into Db performance issues with an OTLP project I'm working on. Another developer and I have reached the end of our accumulated performance knowledge and seek out an individual to join the team to help us speed up our...
{ "language": "en", "url": "https://stackoverflow.com/questions/415419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make this SSIS scenario more parallel I have a million rows in a database table. For each row I have to run a custom exe, parse the output and update another database table How can I run process multiple rows in parallel? I now have a simple dataflow task ->GetData->Run Script (Run Process , Parse Output)->St...
{ "language": "en", "url": "https://stackoverflow.com/questions/415427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to mock ObjectContext or ObjectQuery in Entity Framework? How to mock ObjectContext or ObjectQuery in Entity Framework? A: Why can't we just create the actual context object to be used in our tests? Since we don't want our tests to affect the production database, we can always specify a connection string that p...
{ "language": "en", "url": "https://stackoverflow.com/questions/415432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Sometimes git will track all remote git branches as local branches without me asking to. What happened? sometimes, git will spontaneously (during some, but not all, "pull" or "clone" operations) copy all of the remote branches of a repository into my local repository (and even set them all up to track the correspond...
{ "language": "en", "url": "https://stackoverflow.com/questions/415433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can automated unit testing replace static type checking? I've started to look into the whole unit testing/test-driven development idea, and the more I think about it, the more it seems to fill a similar role to static type checking. Both techniques provide a compile-time, rapid-response check for certain kinds of er...
{ "language": "en", "url": "https://stackoverflow.com/questions/415434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: iPhone (SDK 2.2): adusting playback volume while NOT actively playing music w/ AVFoundation? So I have an app which plays many short sound clips. I need to know when the sounds are finished playing, and I need to use mp3s, so I'm using AVFoundation for the sound playback. When a sound is actively playing, and the u...
{ "language": "en", "url": "https://stackoverflow.com/questions/415442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Object-orientation in C What would be a set of nifty preprocessor hacks (ANSI C89/ISO C90 compatible) which enable some kind of ugly (but usable) object-orientation in C? I am familiar with a few different object-oriented languages, so please don't respond with answers like "Learn C++!". I have read "Object-Oriented...
{ "language": "en", "url": "https://stackoverflow.com/questions/415452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "174" }
Q: Can a team function predictably and deliver (on time) without a project manager? Or they (team members) need someone to keep pushing? Edit: * *The above line was supposed to be sarcastically funny. Sorry to throw you guys off. *I am talking more in the lines of distributing that work within the team, and not ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/415454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any software for pattern-matching and -rewriting source code? I have some old software (in a language that's not dead but is dead to me ;-)) that implements a basic pattern-matching and -rewriting system for source code. I am considering resurrecting this code, translating it into a modern language, and open-sourcin...
{ "language": "en", "url": "https://stackoverflow.com/questions/415455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I profile Perl regexes? What's the best way to profile Perl regexes to determine how expensive they are? A: Just saying "use the Benchmark" module doesn't really answer the question, though. Benchmarking a regex is different than benchmarking a calculation; you need a large amount of realistic data so you ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Clone a file input element in Javascript I have a file input element that needs to be cloned after the user has browsed and selected a file to upload. I started by using obj.cloneNode() and everything worked fine, that is until I tried using it in IE. I've since tried using jQuery's clone method as follows: var tmp...
{ "language": "en", "url": "https://stackoverflow.com/questions/415483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to Indexing and searching business entities using Lucene.Net? I would like to know how to use Lucene.NET for indexing and searching my business entities. I see NHibernate.Search has nice features for this issue, but it still needs DB. I don't need DB, I only want to store all data in my Lucene.NET's index. I als...
{ "language": "en", "url": "https://stackoverflow.com/questions/415485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: When should I use a compiled Regex vs. interpreted? After reading this article http://www.codinghorror.com/blog/archives/000228.html I understand the benefits of compiled regular expressions a little better, however in what personal scenarios would you consider mandates the use of a compiled Reg Ex? For instance, I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I get the current time? How do I get the current time? A: The following is what I use to get the time without having to format. Some people don't like the split method, but it is useful here: from time import ctime print ctime().split()[3] It will print in HH:MM:SS format. A: This question is for Python bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/415511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3701" }
Q: How can I read and manipulate CSV file data in C++? Pretty self-explanatory, I tried google and got a lot of the dreaded expertsexchange, I searched here as well to no avail. An online tutorial or example would be best. Thanks guys. A: If what you're really doing is manipulating a CSV file itself, Nelson's answer m...
{ "language": "en", "url": "https://stackoverflow.com/questions/415515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: How do I make Tomcat stop caching my servlet responses? I'm learning Servlets programming, using Apache Tomcat 6 on a Ubuntu 8.10 machine, and I'm running with a very annoying issue -- apparently, related to caching. This is what I'm doing: I write a servlet, put it in a nice directory structure and deploy it using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Blocks of similar text for test data For testing purposes I need to create sets of text files that have similar but not identical text. Each set needs to be different from the other set but also share some commonality. For example, I may need to create 10 sets of 20 documents each for a total of 200 documents. Each ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: implementing type inference I see some interesting discussions here about static vs. dynamic typing. I generally prefer static typing, due to compile type checking, better documented code, etc. However, I do agree that they do clutter up the code if done the way Java does it, for example. So I'm about to start build...
{ "language": "en", "url": "https://stackoverflow.com/questions/415532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "100" }
Q: Maintain CSS styling when converting HTML to PDF in ASP.NET I am using ITextSharp to convert an HTML page to PDF. However, ITextSharp prints the CSS in the STYLE declaration straight out, ignores stylesheets even when added programmatically and only listens to some inline styles (e.g. font-size and color but not bac...
{ "language": "en", "url": "https://stackoverflow.com/questions/415535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Math, programming, and learning It has been discussed on this site before about the relationship between math and programming, and whether one is a subset of the other, etc. In my recent study of programming, I've found myself more and more wishing I was better at math. You all know the scenario when programming boo...
{ "language": "en", "url": "https://stackoverflow.com/questions/415537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: prototype and jQuery peaceful co-existence? I know very little about JavaScript but despite this I'm trying to cobble something together on my wordpress blog. It's not working, and I don't know how to resolve it, and hey, that's what StackOverflow is for, right? Firstly, the error message is: Error: element.dispatch...
{ "language": "en", "url": "https://stackoverflow.com/questions/415550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: MSTest Code Coverage Is there a way to test code coverage within visual studio if I'm using MSTest? Or do I have to buy NCover? Is the NCover Enterprise worth the money or are the old betas good enough if Microsoft doesn't provide built in tools to do code coverage? EDIT: Description of VS Products and which ones i...
{ "language": "en", "url": "https://stackoverflow.com/questions/415562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to combine these two queries into one? (multiple joins against the same table) Given two tables, one for workers and one for tasks completed by workers, CREATE TABLE IF NOT EXISTS `workers` ( `id` int(11) NOT NULL, PRIMARY KEY (`id`) ); INSERT INTO `workers` (`id`) VALUES (1); CREATE TABLE IF NOT EXISTS ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regex Named Groups in Java It is my understanding that the java.regex package does not have support for named groups (http://www.regular-expressions.info/named.html) so can anyone point me towards a third-party library that does? I've looked at jregex but its last release was in 2002 and it didn't work for me (admit...
{ "language": "en", "url": "https://stackoverflow.com/questions/415580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: How do you use WatiN to click on an Ajax toolkit TabContainer header? I have an ajax toolkit TabContainer control on my page with a couple tabs. In my test, I would like to switch between the tabs. I've tried _ie.Span("tabHeaderID").Click(), .MouseDown(), .FireEvent("onclick"). I've tried these same methods on the p...
{ "language": "en", "url": "https://stackoverflow.com/questions/415583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Set value of textarea in jQuery I am attempting to set a value in a textarea field using jquery with the following code: $("textarea#ExampleMessage").attr("value", result.exampleMessage); The issue is, once this code executes, it is not altering the text in the textarea? However when performing an alert($("textarea...
{ "language": "en", "url": "https://stackoverflow.com/questions/415602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "583" }
Q: Javascript: var map = {}; var list = []; Can someone tell me what exactly the two above lines of javascript do? And more importantly, what it's called so I can search some javascript references to learn about it? I assume they are both creating some form of an array that objects can be added to...? A: Curly braces ...
{ "language": "en", "url": "https://stackoverflow.com/questions/415605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }