text
stringlengths
8
267k
meta
dict
Q: ‘Remember Me’ Login in CodeIgniter How do you implement this in CodeIgniter? A: (This answer was a response to the original question) How would you do this ? Or, how would you create a session with a longer expiration date than the others ? All created sessions would use the same $config['sess_expiration'] i...
{ "language": "en", "url": "https://stackoverflow.com/questions/419900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Getting selected value from drop down box in a html form without submit How to get the text of selected item from a drop down box element in html forms? (using python) How can I store the value to a variable, when I select one item from the drop down box using mouse? (ie. without using a submit button) This is for a...
{ "language": "en", "url": "https://stackoverflow.com/questions/419908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: when to use Collection vs List Possible Duplicate: What is the difference between List (of T) and Collection(of T)? What is the best practice for when to use one vs the other? Both implement IList<T> and hold the data in an ordered fashion, but only List expose the sorting semantics.... A: * *Collection<T>: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Can you suggest good ways of generating URLS for viewing tagged content For example, here on stack overflow the URL https://stackoverflow.com/questions/tagged/javascript+php will give you all questions tagged with javascript and php. The system I have allows tags with spaces in them, so the approach used here would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PictureBoxSizeMode.Zoom - What's the zoom factor? I have a PictureBox (its SizeMode property set to Zoom) containing an image, and both may vary in size. Since the user has to interact with the image directly, I need to be able to convert the PictureBox click coordinates to image coordinates. What I have done so far...
{ "language": "en", "url": "https://stackoverflow.com/questions/419933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: virtual inheritance What is the meaning of "virtual" inheritance? I saw the following code, and didn't understand the meaning of the keyword virtual in the following context: class A {}; class B : public virtual A; A: Virtual inheritance is used to solve the DDD problem (Dreadful Diamond on Derivation). Look at t...
{ "language": "en", "url": "https://stackoverflow.com/questions/419943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: How to Optimize/Speedup Code Execution C#, Windows.Net I have following Code Block Which I tried to optimize in the Optimized section DataSet dsLastWeighing = null; DataSet ds = null; DataSet dsWeight = null; string strQuery = string.Empty; string strWhere = string.Empty; Database db = null; #region Original Code B...
{ "language": "en", "url": "https://stackoverflow.com/questions/419954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mixing VB ASP.NET and C# ASP.MVC projects in a single solution Background We are a TDD team who have inherited a legacy ASP.NET application and are trying to bring it under control by separating presentation, business and data access concerns and thereby improving testability. We have had some success using an MVP p...
{ "language": "en", "url": "https://stackoverflow.com/questions/419961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Parsing XML from an HTTPS URL using NSXMLParser? I'm trying to parse XML directly from an HTTPS URL, as follows: NSString *const URL = @"https://some/HTTPS/url"; NSURL* url = [NSURL URLWithString:URL]; NSXMLParser* parser = [[NSXMLParser alloc] initWithContentsOfURL:url]; [parser setDelegate:self]; [parser parse]; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/419963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Larger alternative to default UITextfield font that looks GOOD In interface builder i've created a UITextfield within a subclass of a UITableViewCell. The default font is just too small. If I make it bigger in interface builder it looks a bit ugly. Not as crisply rendered. I'd like a font similar to that used in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/419964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: QNX Object oriented threads in c++ I want to create a parallel object oriented system in QNX using c++ and threads. How do I do this? I tried: pthread_t our_thread_id; pthread_create(&our_thread_id, NULL, &functionA ,NULL); with function A being a pointer to a function: void *functionA() { //do something } However...
{ "language": "en", "url": "https://stackoverflow.com/questions/419966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing that an event has an EventHandler assigned I'm wanting to test that a class has an EventHandler assigned to an event. Basically I'm using my IoC Container to hook up EventHandlers for me, and I'm wanting to check they get assigned properly. So really, I'm testing my IoC config. [Test] public void create_pe...
{ "language": "en", "url": "https://stackoverflow.com/questions/419967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: japanese email subject encoding Aparently, encoding japanese emails is somewhat challenging, which I am slowly discovering myself. In case there are any experts (even those with limited experience will do), can I please have some guidelines as to how to do it, how to test it and how to verify it? Bear in mind that I...
{ "language": "en", "url": "https://stackoverflow.com/questions/419977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Setting environment variables in pre-build event and using in compilation step In Visual Studio 2003, I am trying to set an environment variable in the pre-build event that will then be used in the compilation step, but the value doesn't seem to be propagated. For example, if the pre-build event contains this (eith...
{ "language": "en", "url": "https://stackoverflow.com/questions/419979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to change the row position of virtual mode DataGridView? How to change the row position of virtual mode DataGridView? I am using Windows Forms. A: You have to clear the old position and set a new one The collection dataGridView1.SelectedRows has the current selected Rows. Depending on the MultiSelect property o...
{ "language": "en", "url": "https://stackoverflow.com/questions/419980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How is it possible to connect a mainframe with a PC running Windows? How is it possible to connect a mainframe with a PC running Windows?.Is it still regarded a mainframe as a computer with a high processing power running Unix or IBM System360 A: We use a piece of software called Rumba for this. A: A mainframe wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/419992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Rendering on top of Adobe AIR My co-worker posted a question on his blog . He is referring to rendering an MPEG-4 stream in adobe air. He wants to know basically two things. Are there any technical articles floating around that... * *Describe how AIR renders. *Describes a technique for painting o...
{ "language": "en", "url": "https://stackoverflow.com/questions/420006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Conveniently move a class to a different package in eclipse without borking svn When moving a file from old.package to new.package I want two things to happen: * *Update all references to that class (in all files of the project) so that the new package is used *svn move old/package/Foo.java new/package/Foo.java ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Why sometimes I get an "Invalid transaction object" exception? Is there something wrong with this code? Sometimes I get an unhandled "Invalid transaction object" exception in it: procedure BlaBla; var TD: TDBXTransaction; begin TD := SQLConnection.BeginTransaction; try SQLConnection.ExecuteDirect('some sql...
{ "language": "en", "url": "https://stackoverflow.com/questions/420022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Thread using 50-100% CPU usage : MSVCR80.dll!endthreadex I have sql 2005 sp1, and have been noticing a lot of MSVCR80.dll!endthreadex threads using Process Explorer taking all of the CPU on the server and they never go away until you either kill it, or restart sql server? Does any one know any work around as in like...
{ "language": "en", "url": "https://stackoverflow.com/questions/420027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Memory management when using UIImage My application heavily uses the UIImage object to change images on a single UIImageView based on user input and the previous image which was set. I use [UIImage imageNamed:] to create my UIImage objects. I guess this is not the best way to use UIImage coz my memory usage keeps in...
{ "language": "en", "url": "https://stackoverflow.com/questions/420031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Running a bootstrapper on Windows 2000 Is there any way how to run the setup.exe bootstrapper generated by VS2008 with .NET 2.0 WinForms application on Windows 2000 SP4? If I try to run it, it gives me an error message about missing HeapSetInformation in Kernel32.dll and it doesn't run. I tried to install manually W...
{ "language": "en", "url": "https://stackoverflow.com/questions/420035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to stop IE "moving" text around within a ? Humbly asking for help with (of course) IE. I have a div that is a simple background color block (#greenback) and it contains two other divs. The first (#billboard) is some centered text and the second (#picright) holds an image. They are arranged next to each other, te...
{ "language": "en", "url": "https://stackoverflow.com/questions/420042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Usability Tests of Widely-Used Software Does anyone know where I can go to find the results of usability testing of widely used software? I want to be able to make informed decisions about: * *which bits of existing packages to copy in my software *how to choose between multiple packages (programs, component...
{ "language": "en", "url": "https://stackoverflow.com/questions/420057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I copy symbolic links in Perl? How do I copy a symbolic link (and not the file it points to) in a Perl program while preserving all of the symbolic link attributes (such as owner and permissions)? A: In Perl you can use the readlink() function to find out the destination of a symlink. You can also use the ls...
{ "language": "en", "url": "https://stackoverflow.com/questions/420058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Invoking a Linux process from Windows and receiving stdout I have a legacy application in our company built on... ahem; Classic VB (VB 6). It has got a optimizer(CPLEX MIP Solver) component running on a Linux server and is developed in Java. If we want to provide a Windows UI to invoke the optimizer instance on a re...
{ "language": "en", "url": "https://stackoverflow.com/questions/420059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Remove scope dropdown from OSSSearchResults.aspx in SharePoint MOSS When searching in SharePoint the results are returned to a page called OSSSearchResults.aspx. This page has a scope dropdown for the search i.e. Site:Departments How can I remove this scope so that the whole site collection is always searching, irre...
{ "language": "en", "url": "https://stackoverflow.com/questions/420064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best crossplatform C++/QT4 development environment I would like to develop cross-platform applications using C++ and QT4. I code on both Linux and Windows (MinGW). Currently I'm using KDevelop and it's QMake integration. On Windows I'm trying out Eclipse with QT integration plugin. However moving sources and updatin...
{ "language": "en", "url": "https://stackoverflow.com/questions/420065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is it possible in Silverlight to bind the column header text of a DataGrid to a resource string? I need to bind the column Header text of a DataGrid to a Resource string in a XAML file. Does anybody know if this is possible ? The column Header definition looks like this but I would like to replace the "MyHeaderText"...
{ "language": "en", "url": "https://stackoverflow.com/questions/420067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Most efficient javascript/AJAX toolkit? What is the most efficient Javascript/AJAX toolkit? A: According to this comparison, jQuery does reasonably well. Certainly better than Prototype. Personally I like the fluent interface model and brevity of jQuery as well. A: It really depends on what environment, framewor...
{ "language": "en", "url": "https://stackoverflow.com/questions/420069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Forcing a description widget to wrap I am trying to get a description in a XUL application to wrap, even if it contains long lines. For example, if I save the following as a .xul file and open it in Firefox, it looks fine and wraps appropriately: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" t...
{ "language": "en", "url": "https://stackoverflow.com/questions/420076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can't declare variables after statements in DevC++ The trouble here is that I can't declare variables inside a function after the function already has some statements in it. Declaring at the start works fine, but after something, it gives a parse error. For example: int main() { int b; b = sisesta(); float st[b];...
{ "language": "en", "url": "https://stackoverflow.com/questions/420095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Retrieving application settings after a name change? I have a Windows forms application that contains per-user settings. I'm using Properties.Settings.Default.Upgrade() to preserve these settings between versions and everything is fine. Recently I had to change the exe name of my application, so after an upgrade, a...
{ "language": "en", "url": "https://stackoverflow.com/questions/420097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is this' type variableofType()' function or object? #include<iostream> class name { public: int a; name():a(0){}; }; void add(name * pname) { pname = NULL; } int main() { name varName(); name * pName = new name(); add(pName); add(&varName);//error C2664: 'add' : cannot convert parameter 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/420099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the correct response to an HTTP POST request? For a POST method, the W3 specs say: If a resource has been created on the origin server, the response SHOULD be 201 (Created) and contain an entity which describes the status of the request and refers to the new resource, and a Location header (s...
{ "language": "en", "url": "https://stackoverflow.com/questions/420103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Symbian C++ - Remove or hide component (ie. CEikLabel) Seemingly a simple enough question, but I cannot work it out. I want to hide a CEikLabel at a certain point. I want a function like.. myLabel->SetVisible(EFalse); or.. myLabel->RemoveFromView(); I realise I could just use myLabel->SetTextL(_L("")); but that is...
{ "language": "en", "url": "https://stackoverflow.com/questions/420109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Castle Windsor - Nested runtime dependencies I am using Castle Windosr container. I want to be able to specify some constructor dependencies at runtime which you can obviously do by using a Resolve overload that takes a dictionary, all good and fine. However if I want to specify runtime dependency for a dependency o...
{ "language": "en", "url": "https://stackoverflow.com/questions/420114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Bookmarking with javascript I want to make a bookmark of my webpage by using javascript code. I want a javascript code to make a bookmark that should be opened in a new window. I am using firefox. A: Use this function: function bookmark_us(url, title){ if (window.sidebar) // firefox window.sidebar.addPanel(tit...
{ "language": "en", "url": "https://stackoverflow.com/questions/420118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Postback destroys user controls in my GridView columns I have a ASP.NET GridView that uses template columns and user controls to allow me to dynamically construct the datagrid. Now I'm implementing the event handler for inserting a row. To do that, I create an array of default values and add it to the data table whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/420130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Response.Redirect with Different Referrer I've got the following piece of code in an aspx webpage: Response.Redirect("/Someurl/"); I also want to send a different referrer with the redirect something like: Response.Redirect("/Someurl/", "/previousurl/?message=hello"); Is this possible in Asp.net or is the referrer...
{ "language": "en", "url": "https://stackoverflow.com/questions/420136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I avoid unwanted log messages on java project? On my java project, I have a bunch of strings externalized on a messages.properties file. On its respective Messages.java file I had the same number of public static String-typed attributes, so I could access those externalized texts. Then, I implemented a met...
{ "language": "en", "url": "https://stackoverflow.com/questions/420140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Making git auto-commit I'd like to use git to record all the changes to a file. Is there a way I can turn git 'commit' on to automatically happen every time a file is updated - so there is a new commit for every change to a file? Ideally I'd like my users to not even know that git is running behind the scenes. A us...
{ "language": "en", "url": "https://stackoverflow.com/questions/420143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "174" }
Q: Ruby block and unparenthesized arguments I extracted simple example: require 'pp' x = 1..3 pp x.map do |i| {:value => i, :double => (i*2)} end pp x.map { |i| {:value => i, :double => (i*2)} } pp(x.map do |i| {:value => i, :double => (i*2)} end) pp(x.map { |i| {:value => i, :double => (i*2)} }) I am wondering why f...
{ "language": "en", "url": "https://stackoverflow.com/questions/420147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to achieve a nightly build with CruiseControl.NET I have set up cruisecontrol.net cs for my project that has a number of modules and components that get build and get stored in folder by date on the build machine.The thing is that I need to make setup for the application(wpf non web) and the thing is that since ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Get the value from a fixed memory offset : Visual C++ Programming I would like to write an simple application able to retrieve some certain data from another process(application)'s allocated memory. Say I already know a process' id and I would like to obtain a value in this process' memory always from a fixed offset...
{ "language": "en", "url": "https://stackoverflow.com/questions/420151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Output window to file (Visual Studio 2005) In Visual Studio 2005, how can I save what's written to the output window to a file (I can't change the code writing to the output window, and it writes a lot; I just want to save the output window content to a file)? A: "File" -> "SaveOutputAs..." let's you save the conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/420154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: WebtextEdit execute Javascript function I need to execute an entire javascript function. Found what I was doing wrong: var edit = igedit_getById("FG2100RefNo"); var editText = edit.getText(); alert(!isNaN(editText)); But, this only checks & displays a message box. I need to execute the below javascript: <script lan...
{ "language": "en", "url": "https://stackoverflow.com/questions/420162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get the version information of a DLL file in C++ I need to get the version information of a DLL file I created in Visual Studio 2008 C++. How do I get it? A: If you want programmatic access, see Version Information in MSDN for the APIs and data structures you need. A: Looks like you need to access the VS_VE...
{ "language": "en", "url": "https://stackoverflow.com/questions/420185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: ADO & DAO Introduction I am looking for some material giving introduction to DAO and ADO usage in VBA. Most of the material i came across give examples of how to use them. I am looking for a broader theory based definition of what they are and how they came about and the requirements for their usage. thanks regard...
{ "language": "en", "url": "https://stackoverflow.com/questions/420192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Process dimension fails with message "A FileStore error from WriteFile occurred"? I am trying to process a dimension using SQL Server 2005 Analysis Services. This has worked in the past without problems but recently fails. The dimension is hierarchical using 4 columns from a single table (the entire cube uses a sing...
{ "language": "en", "url": "https://stackoverflow.com/questions/420193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Maximum number of columns in a LINQ to SQL object? I have 62 columns in a table under SQL 2005 and LINQ to SQL doesn't handle the updates though the reading would work just fine, I tried re-adding the table to the model, created a new data model but nothing worked, I'm guessing I've hit the maximum number of columns...
{ "language": "en", "url": "https://stackoverflow.com/questions/420195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Benefits & pitfalls of moving to IIS 7, Windows Server 2008 for WCF Services We're currently using IIS 6 and Windows Server 2003 for our web and application servers. Our web servers make WCF Service calls to our application servers. We'd like to move to IIS 7 and Windows Server 2008 so that we can use the recommende...
{ "language": "en", "url": "https://stackoverflow.com/questions/420205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Project architecture/organization on Java EE application with EJB 3.0, JPA, Dynamic web projects on JBoss I have a webapp with different Dynamic Web Projects, each of them generally containing an EJB Project. We want to keep them interacting, as in using beans and classes from each other's EJBs through JNDI, sharing...
{ "language": "en", "url": "https://stackoverflow.com/questions/420222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the difference between compare() and compareTo()? What is the difference between Java's compare() and compareTo() methods? Do those methods give same answer? A: Using Comparator, we can have n number of comparison logic written for a class. E.g. For a Car Class We can have a Comparator class to compare bas...
{ "language": "en", "url": "https://stackoverflow.com/questions/420223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "119" }
Q: Is it possible to reverse the Uni-Directional behavior of a DataContractSerialization of a Linq 2 SQL object graph? "By convention, the property on the parent side of a primary-foreign key relationship is marked for serialization. The other side in a bidirectional association is not serialized." Is it possible to so...
{ "language": "en", "url": "https://stackoverflow.com/questions/420232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Run custom code on login I’ve used the asp.net login control on my sharepoint custom master page. All works well and I can login to my site without problems. However I’d like to run some code once the user has logged, or alternatively perform a redirect based on the user’s role. Has anyone does this type of thing b...
{ "language": "en", "url": "https://stackoverflow.com/questions/420237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using boost shared_ptr I have to use a smart pointer and I found "shared_ptr" from boost looks good. I downloaded the boost library and I can see many files and libraries there. Is there any way to use only the shared_ptr ? A: You can use bcp as litb suggested, but if you're worried about dragging in extra library ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: C# Accessing data in System.Object[] I'm coding in C# and I have a dictionary with tons of data. One of the members is "children" but when I try to write out its values, I get: System.Object[] I know that children contains data, probably nested data, but I'm unsure if it's a list, dictionary, array, etc. How do I wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/420275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Append text to stderr redirects in bash Right now I'm using exec to redirect stderr to an error log with exec 2>> ${errorLog} The only downside is that I have to start each run with a timestamp since exec just pushes the text straight into the log file. Is there a way to redirect stderr but allow me to append text ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: This expression has type int but is here used with type unit I'm trying to get the exact equivalent (not functional) of this vb.net code in F#: Function FastPow(ByVal num As Double, ByVal exp As Integer) As Double Dim res As Double = 1 If exp < 1 Then If exp = 0 Then Return res exp = -exp num...
{ "language": "en", "url": "https://stackoverflow.com/questions/420294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why do some PDFs hang when downloading in IE when served by Lighttpd We have a number of PDFs hosted using Lighttpd but when they are downloaded in IE (7.0.5730.13), the file download hangs at the end and does not complete. For example http://static.vouchercodes.co.uk/printable/87-burger-king-voucher.pdf http://stat...
{ "language": "en", "url": "https://stackoverflow.com/questions/420295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are some good books, web resources, and projects for learning R? I have a book called Statistics for Computer Scientists as well as my engineering statistics textbook, so I'm thinking about using various problems and examples in those to learn R, which is probably a good start. But can anyone recommend books an...
{ "language": "en", "url": "https://stackoverflow.com/questions/420296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Full Search testing in LINQ (custom filter query) I have a table that has a list of restaurant names and links to another table that holds the cuisine type. I want to provide a search box on my web page that when typing, each word is searched for in the database and results returned. I was looking for a solution tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/420299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Lisp: Need help getting correct behaviour from SBCL when converting octet stream to EUC-JP with malformed bytes The following does not work in this particular case, complaining that whatever you give it is not a character. (handler-bind ((sb-int:character-coding-error #'(lambda (c) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Screen Scraping with PHP and XPath Does anyone know how to maintain text formatting when using XPath to extract data? I am currently extracting all blocks <div class="info"> <h5>title</h5> text <a href="somelink">anchor</a> </div> from a page. The problem is when I access the nodeValue, I can only get plain text. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Source for useful EC2 AMIs Using Amazon's own client libraries (or alternatives), you can get listings of available pre-packaged AMIs, but the interface is definitely designed for scriptability, not readability. Elasticfox is better, but still doesn't make it easy to see what an AMI does, allow for user rating, etc....
{ "language": "en", "url": "https://stackoverflow.com/questions/420310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Stacks - why PUSH and POP? I was wondering why we use the terms "push" and "pop" for adding/removing items from stacks? Is there some physical metaphor that caused those terms to be common? The only suggestion I have is something like a spring-loaded magazine for a handgun, where rounds are "pushed" into it and can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Run StyleCop against iis based Web Project on buildserver How do I run stylecop against an iis based webproject on a buildserver? Buildserver runs in continuous integration and I would like this automated. With a library I can add a few lines to the .csproj and its done. I believe it to be a website application proj...
{ "language": "en", "url": "https://stackoverflow.com/questions/420319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: validateImageData parameter and Image.FromStream() I'm concerned about the third parameter in this overload, validateImageData. The documentation doesn't explain much about it, it only states that it causes the image data to be validated but no details, what exactly is done to validate the image data? public static ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Separate 'debug' and 'release' builds? I think it's better to release the version of the software which your developers actually tested; I therefore tend to delete the 'debug' target from the project/makefile, so that there's only one version that can be built (and tested, and debugged, and released). For a similar ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: C++ ctor question (linux) * *environment: linux, userspace-application created via g++ from a couple of C++ files (result is an ELF) *there is a problem (SIGSEGV) when traversing the constructor list ( __CTOR_LIST__ ) (note: code called via this list is a kind of system initialisation for every class, n...
{ "language": "en", "url": "https://stackoverflow.com/questions/420350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get last N records with activerecord? With :limit in query, I will get first N records. What is the easiest way to get last N records? A: new way to do it in rails 3.1 is SomeModel.limit(5).order('id desc') A: For Rails 5 (and likely Rails 4) Bad: Something.last(5) because: Something.last(5).class => Array...
{ "language": "en", "url": "https://stackoverflow.com/questions/420352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "191" }
Q: XmlDataProvider Source="pack://application:,,,/FinanceExplorer/Equity.xml" Can someone explain the syntax in the source attribute here? What the heck is "pack:" and "application:" and why 3 commas? I couldn't find any decent desciptions. A: Here's the MS documentation on the Pack URI Scheme The three commas repres...
{ "language": "en", "url": "https://stackoverflow.com/questions/420362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why do some URLs contain both numeric id and name? I am wondering why the link to profile looks like: http://stackoverflow.com/users/ID/NAME not simply: http://stackoverflow.com/users/ID or even better: http://stackoverflow.com/users/NAME Can there be couple users with the same name? Or can one user have many na...
{ "language": "en", "url": "https://stackoverflow.com/questions/420380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best way to collect Rails application usage statistics I have a Rails application where users can set up their domains and publish content onto them. I need to collect public traffic statistics such as pageview count etc. One good example of this feature is flickr usage statistics i can see as a customer. The questi...
{ "language": "en", "url": "https://stackoverflow.com/questions/420382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you get the proper mapping name from a binding source bound to a List, or an anonymous type, to use on a DataGridTableStyle? I'm trying to create a DataGridTableStyle object so that I can control the column widths of a DataGrid. I've created a BindingSource object bound to a List. Actually it's bound to an an...
{ "language": "en", "url": "https://stackoverflow.com/questions/420386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Setting pretty print tags through javascript Im trying to get pretty.js to prettify code in CODE tags, using this js: onload_functions.push(function() { var node_list=document.getElementsByTagName('code'); for (i=0; i < node_list.length; i++) { node_list[i].setAttribute('class','prettyprint'); } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Setting a boolean value based on an integer I found this statement is some old code and it took me a second to figure out... IsTestActive = (TestStateID == 1 ? true : false); Please correct me if I'm wrong but isn't this the same as this one?: IsTestActive = (TestStateID == 1); If it is, why would you ever want to...
{ "language": "en", "url": "https://stackoverflow.com/questions/420404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I substitute regexp matches and map the substitutions in Perl? I.e.: echo H#97llo | MagicPerlCommand Stdout: Hallo were MagicPerlCommand is something like perl -pnle "s/#(\d+)/chr(\1)/ge" (but that doesn't work). A: As per the j_random_hacker answer, you must use $1 rather than \1. This is because using...
{ "language": "en", "url": "https://stackoverflow.com/questions/420410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I change an image in a Crystal report using C# How Can I change an Image (its an OLE Object) in a Crystal report using C#? A: you can add CRAXDRT.dll and CrystalDecisions.Shared.dll to your references then you can use this code: CRAXDRT.Report report2 = new CRAXDRT.Report(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to detect the start of a download in JavaScript? In our current project we are providing a PDF download that can be customized by the user through an HTML form he submits. It takes several seconds to dynamically generate the PDF and I'd like to visualize this, e.g. by disabling the submit button until...
{ "language": "en", "url": "https://stackoverflow.com/questions/420417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Exception refuses to be handled I tried two ways of catching unexpected unhandled exceptions: static void Main() { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(ErrorHandler.HandleException); Application.EnableVisualStyles(); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mirroring console output to a file In a C# console application, is there a smart way to have console output mirrored to a text file? Currently I am just passing the same string to both Console.WriteLine and InstanceOfStreamWriter.WriteLine in a log method. A: You could subclass the TextWriter class, and then assign...
{ "language": "en", "url": "https://stackoverflow.com/questions/420429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Automatic Properties and Structures Don't Mix? Kicking around some small structures while answering this post, I came across the following unexpectedly: The following structure, using an int field is perfectly legal: struct MyStruct { public MyStruct ( int size ) { this.Size = size; // <-- Legal a...
{ "language": "en", "url": "https://stackoverflow.com/questions/420433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: MX Record Query fails I'm a managed code guy, so when I interop with unmanaged code, and it doesn't work as advertised, I get twitchy. Can someone explain to me why this would come back with no MX records, when a command line nslookup works? [DllImport("dnsapi", EntryPoint = "DnsQuery_W", CharSet = CharSet.Unicode, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How Best to Alias an Executable Name in a WinDBG Crash Script? Background Information For saving out crash dumps, I have a script passed to cdb.exe in the Debugger value of the AeDebug registry key: C:\progra~1\debugg~1\cdb.exe -p %ld -e %ld -g -y SRV*c:\mss*http://msdl.microsoft.com/download/symbols -c "$<d:\tgtick...
{ "language": "en", "url": "https://stackoverflow.com/questions/420442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make file show when opening Visual Studio solution I need to add a C# solution with examples that would be distributed as part of a software library installer. This solution would have various examples on how to use the product's API. I want to be able to display a simple "quick start" file explaining how to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Open terminal here in Mac OS finder Is there something similar to the "Open Command Window Here" Windows Powertoy for Mac OS? I've found a couple plugins through a google search but wanted to see what works best for developers out there. A: As of Mac OS X Lion 10.7, Terminal includes exactly this functionality as a...
{ "language": "en", "url": "https://stackoverflow.com/questions/420456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "682" }
Q: Visual Studio opens upgraded web application as a web site I recently upgraded a 1.1 web project to a 2.0 web application. After going through the upgrade wizard and performing the "upgrade to web application" operation, everything looked fine. After closing and reopening Visual Studio, however, it insisted on tre...
{ "language": "en", "url": "https://stackoverflow.com/questions/420468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Mac OS counterpart to Sysinternals and Powertoys As a developer coming from a Windows background, I'd always find the different Powertoys and Sysinternals apps as invaluable tools in aiding programming. Is there something similar for a developer to watch for in the Mac world? A: Top 10 DTrace scripts for Mac OS X i...
{ "language": "en", "url": "https://stackoverflow.com/questions/420476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Performance tuning in Cocoa application I am developing a Cocoa application which communicates constantly with a web service to get up-to-date data. This considerably reduces the performance of the application. The calls are made to the web service asynchronously but the number of calls is huge. In what ways can I i...
{ "language": "en", "url": "https://stackoverflow.com/questions/420478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Server 2008 Maintenance Plans Failing because Database is in use I've created a couple of maintenance plans on our Sql Server 2008 databases that perform back-ups (full and differential) to run overnight, but they keep failing with a message saying the database is currently in use. We typically have little to no...
{ "language": "en", "url": "https://stackoverflow.com/questions/420479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Passing variables with AjaxPro I found this AJAX .NET framework the other day, and so far I am enjoying working with it. However, one thing I can't figure out (the documentation is rather poor atm) is how to pass variables through the AJAX script. This is what I have so far: //default2.aspx.vb <AjaxPro.AjaxMetho...
{ "language": "en", "url": "https://stackoverflow.com/questions/420483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Open txt file from C# application The following code is suppose to open CMD from my C# application and open the file text.txt. I tried to set the file path as an environment variable but when notepad opens it looks for %file%.txt instead of text.txt Any idea why? System.Diagnostics.Process proc = new System.Diagnost...
{ "language": "en", "url": "https://stackoverflow.com/questions/420484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why did the designers of ColdFusion decide to index arrays from 1 rather than 0? I'm just curious about this really, does anyone know why they broke convention on this one? Thanks, Ciaran A: Well, unless we have any of the original designers, it's going to be tough to do anything but speculate. But having used CF ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: python install on leopard I'll admit I'm completely dumbed by python install. Can someone help me on how to install module I want to play with PyGame, PyOpenGL etc. So I install them, but I everytime I type "import pygame" error message shows up. here's my environment so far. In .bash_profile PATH=${PATH}:/System/Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/420515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Microsoft HxS file format I was wondering if anyone had a file format reference for Help 2.0 HxS files? I've seen a few 3rd-party viewers so obviously someone has gone through the trouble of reverse-engineering the file format, but I have been unable to track anything down with Google. I am interested in creating a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/420524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PHP warnings cause script to halt on IIS running FastCGI We are migrating to a new server running Windows 2003 and IIS 6. When my PHP code runs, it has a warning on a particular line (which I'm expecting at the moment but will fix shortly). However, when it hits the warning, it immediately halts processing and retur...
{ "language": "en", "url": "https://stackoverflow.com/questions/420525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: SQL 2005: should I roll my own log shipping? I'm looking into using log shipping for disaster recovery and I'm getting mixed messages about whether to use the built-in stuff or roll my own. Which do you recommend, please, and if you favour rolling your own what's wrong with the built-in stuff? If I'm going to reinve...
{ "language": "en", "url": "https://stackoverflow.com/questions/420530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I ensure Schema Extensibility using JAXB If I am using JAXB as part of Metro Web Services under Glassfish v2, how do tell JAXB to add: <xsd:any/> and <xsd:anyAttribute/> tags to my generated complex types so that if I make changes in the future to add elements or attributes to my response objects then my c...
{ "language": "en", "url": "https://stackoverflow.com/questions/420533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }