text
string
meta
dict
Q: What's the difference between the different XML parsing libraries in PHP5? The original question is below, but I changed the title because I think it will be easier to find others with the same doubt. In the end, a XHTML document is a XML document. It's a beginner question, but I would like to know which do you thin...
{ "language": "en", "url": "https://stackoverflow.com/questions/246819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ProtectedData.Protect intermittent failure I'm writing a password encryption routine. I've written the below app to illustrate my problem. About 20% of the time, this code works as expected. The rest of the time, the decryption throws a cryptographic exception - "The data is invalid". I believe the problem is in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: VS2008 Express: How to save as UTF-8 all files by default? Is there any way to make Visual Studio 2008 Express store all the files as UTF-8 by default? Thanks for your time. Best regards. A: If you create a new file inside VS it will be UTF8 by default, but if the file is already created by other enconding you have...
{ "language": "en", "url": "https://stackoverflow.com/questions/246830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to resize an image? I have taken an image from UIImagePickerController, but the file looks too big to be transferred through internet, I'd like to resize the image. I couldn't find any method related to the image process. Any recommendation? A: You could create a context of the desired size using UIGraphicsBeg...
{ "language": "en", "url": "https://stackoverflow.com/questions/246831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to find the records with most common tags, like the related questions in StackOverflow We may tag a question with multiple tags in StackOverflow website, I'm wondering how to find out the most related questions with common tags. Assume we have 100 questions in a database, each question has several tags. Let's sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/246841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Best practices for storing UI settings? we're currently planning a larger WPF LoB application and i wonder what others think being the best practice for storing lots of UI settings e.g. * *Expander States *Menu orders *Sizing Properties *etc... i don't like the idea of having dozens of stored values using th...
{ "language": "en", "url": "https://stackoverflow.com/questions/246849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: HTTP 1.0 vs 1.1 Could somebody give me a brief overview of the differences between HTTP 1.0 and HTTP 1.1? I've spent some time with both of the RFCs, but haven't been able to pull out a lot of difference between them. Wikipedia says this: HTTP/1.1 (1997-1999) Current version; persistent connections enabled by def...
{ "language": "en", "url": "https://stackoverflow.com/questions/246859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "291" }
Q: "Simple" SQL Query Each of my clients can have many todo items and every todo item has a due date. What would be the query for discovering the next undone todo item by due date for each file? In the event that a client has more than one todo, the one with the lowest id is the correct one. Assuming the following min...
{ "language": "en", "url": "https://stackoverflow.com/questions/246870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the HOME method? A client asked me if I knew anything about the HOME development method. I, together with wikipedia and acronymfinder, drew a complete blank. Has anyone here heard about a development method called HOME? A: The closest thing I found that mentioned a HOME development model was this document o...
{ "language": "en", "url": "https://stackoverflow.com/questions/246871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP mangles my dates $doba = explode("/", $dob); $date = date("Y-m-d", mktime(0,0,0, $doba[0], $doba[1], $doba[2])); The above code turns any date i pass through into 1999-11-30 and i know it was working yesterday. Date is correct when I echo $doba. Anyone have any ideas? Cheers A: What is the format of $doba? Re...
{ "language": "en", "url": "https://stackoverflow.com/questions/246876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Nice code template for windows service Any links to a good template for a windows service? (looking for C# code) Something that has the basic functionality that I could extend. A: It is a little clear what you are looking for. The Windows Service project type in Visual Studio creates a project with the templates ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Update a program setup I haven´t experience in making setup, but I all ready make mine but now I need help because when I made a new version I want that the user double click the shortcut and it do the update if there are any. The application is in c#. Could you help? A: Here's how I have implemented an updater pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/246884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Process for updating a windows service? Automated or is it manual? If I have a windows service on a server, what is 'best practise' for updating the service? (say there was a bug in it, or I need to ad more features to it). Is there a way I could shutdown the service, patch it and get it up and running in a more aut...
{ "language": "en", "url": "https://stackoverflow.com/questions/246886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Bookmarked page redirect I recently converted a site from asp to CF. Unfortunately, alot of the old users had the "homepage" bookmarked. www.example.com/homepage.asp Is there a sort of catch all way I could redirect any traffic from that page to the current index.cfm? I would normally just delete those files, but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .Net Equivalent of set_unexpected() Is there a .net equivalent to the C++ unexpected()/set_unexpected() functionality? Edit: Sorry--I omitted some details previously: Language: C# 2.0 I have some legacy apps that seem to be throwing some unhandled exception somewhere. I just want to put something in place to stop...
{ "language": "en", "url": "https://stackoverflow.com/questions/246893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jCarousel -help with new skin I'm creating a new theme for the jCarousel component that I'll be using for my web site and the dimension for this component will be: width:485px , height:161px including the two arrows and what i want is to have 3 items per cycle each having the a dimension of 140X100 (width X height) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Review my game project OR (How to peer-review my project)? I just finished a 2d platformer in C++/Allegro. Its still in an incomplete stage... I wonder how to go about a peer-review from people who are into game development. I would like to review my project on grounds of * *game play *Collision detection *use...
{ "language": "en", "url": "https://stackoverflow.com/questions/246905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: 2 instances of the same table inside jsp Currently there are 2 pages in a jsp file: one of them displays the data and the second one is used for pagination. The task is to include exactly the same paginator table above the data table. Sorry, couldn't resist to draw it :) |-----------------------------------------| |...
{ "language": "en", "url": "https://stackoverflow.com/questions/246912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is Visual Studio written in Windows Forms? Is Visual Studio written in .NET Windows Forms? Or is Windows Forms just too slow for a editor type application? A: Apparently VS 2010 has parts written in WPF. A: SharpDevelop is a .NET Windows Forms application. A: This sounds a bit like a "Are you still beating your...
{ "language": "en", "url": "https://stackoverflow.com/questions/246913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to store an ASP.NET master page in a common library? We would like to have several internal web applications which use the same master page. Is there a way to store a master page in a common library referenced by all projects? A: You can do this, but it is difficult and has quite a few drawbacks. This process ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Page View Counter like on StackOverFlow What is the best way to implement the page view counter like the ones they have here on the site where each question has a "Views" counter? Factoring in Performance and Scalability issues. A: The counter i optimized works like this: UPDATE page_views SET counter = counter + 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/246919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Use AJAX instead of TagLib? I was thinking about the idea of using Ajax instead of TagLib. The most elegant way would be: Using Java Annotation. The idea is, designers or anybody can make the HTML without any taglib ,just using the "standard" HTML tags with id or name, and call the Javascript. That way any WYSIWYG ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any difference between a GUID and a UUID? I see these two acronyms being thrown around and I was wondering if there are any differences between a GUID and a UUID? A: GUID is Microsoft's implementation of the UUID standard. Per Wikipedia: The term GUID usually refers to Microsoft's implementation of the Un...
{ "language": "en", "url": "https://stackoverflow.com/questions/246930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1107" }
Q: How do I specify the "commentable_type" field with polymorphic associations? I have two models, Article and Post that both inherit from a base model called ContentBase. You can leave comments on both Articles and Posts, so I am using a Polymorphic Association between Comments and Article or Post. However, since both...
{ "language": "en", "url": "https://stackoverflow.com/questions/246931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Basic MS SQL Server 2008 questions Can you import (or migrate) SQL Server 2005 databases to SQL Server 2008? Is it possible to have the same 2005 and 2008 running on the same machine without complications? A: Yes. You can restore a backup from SQL 2005 in SQL 2008. You can also have instances of both on the same ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/246951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm to find articles with similar text I have many articles in a database (with title,text), I'm looking for an algorithm to find the X most similar articles, something like Stack Overflow's "Related Questions" when you ask a question. I tried googling for this but only found pages about other "similar text" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Practical Singleton & Dependency Injection question Say I have a class called PermissionManager which should only exist once for my system and basically fulfills the function of managing various permissions for various actions in my application. Now I have some class in my application which needs to be able to check...
{ "language": "en", "url": "https://stackoverflow.com/questions/246963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: is it normal for image inputs to be omitted from the DOM in document.forms[x].elements? I've found that given a form in a HTML page like this: <form name="form"> <input type="image" name="foo" src="somewhere.gif" alt="image" value="blah"/> <input type="text" name="bar" value="blah"/> </form> When a...
{ "language": "en", "url": "https://stackoverflow.com/questions/246966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible do Declare a constant array that includes another constant array? I want to do something like this: const MyFirstConstArray: array[0..1] of string = ('Hi', 'Foo'); MySecondConstArrayWhichIncludesTheFirstOne: array[0..2] of string = MyFirstConstArray + ('Bar'); Basically I want the following...
{ "language": "en", "url": "https://stackoverflow.com/questions/246969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is using flexible array members in C bad practice? I recently read that using flexible array members in C was poor software engineering practice. However, that statement was not backed by any argument. Is this an accepted fact? (Flexible array members are a C feature introduced in C99 whereby one can declare the las...
{ "language": "en", "url": "https://stackoverflow.com/questions/246977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: Writing to a FileStream behaves strangely, as observed by process monitor I'm using FileStream to write to a file, and watching the underlying system calls using Process Monitor. I'm having trouble with some file locking issues in a production deployment, so I'm looking at the details closely. This sample code: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is wrong with this create table statement Does anyone have any idea what is wrong with this create statement for mysql? EDIT: now it states the error is near: revised VARCHAR(20), paypal_accept TINYINT, pre_terminat' at line 4 Thanks for the help everyone Still errors after using sql beautifier though CREATE ...
{ "language": "en", "url": "https://stackoverflow.com/questions/246981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Informix: how to get an id of the last inserted record What's the most efficient way of getting the value of the SERIAL column after the INSERT statement? I.e. I am looking for a way to replicate @@IDENTITY or SCOPE_IDENTITY functionality of MS SQL A: The value of the last SERIAL insert is stored in the SQLCA recor...
{ "language": "en", "url": "https://stackoverflow.com/questions/246983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What needs to go in order to fully remove a MAMP install from OSX? For reasons that we won't discuss, I have determined that MAMP is a pile of crap that haunts my system, and unless I remove it fully, I will live in shame. I've done the obvious thing and removed the MAMP directory from my Applications folder, howeve...
{ "language": "en", "url": "https://stackoverflow.com/questions/246998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How can I use Linq in a T4 template? I am using T4 to generate some screens and middle-tier code for a project, and would like to use Linq to simplify some of my template code. However, when I try to use Linq, the template reports a syntax error. A: By default in Visual Studio 2008 (and as used in most online exam...
{ "language": "en", "url": "https://stackoverflow.com/questions/247005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: Save cookies for remote web pages I've got a PHP application which needs to grab the contents from another web page, and the web page I'm reading needs a cookie. I've found info on how to make this call once i have the cookie ( http://groups.google.com/group/comp.lang.php/msg/4f618114ab15ae2a ), however I've no idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/247006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Get an array of list element contents in jQuery I have a structure like this: <ul> <li>text1</li> <li>text2</li> <li>text3</li> </ul> How do I use javascript or jQuery to get the text as an array? ['text1', 'text2', 'text3'] My plan after this is to assemble it into a string, probably using .join(', '), and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "105" }
Q: Using the main method of classes for debugging? It is good practice to use the main method to test a java/.net class? I've seen it reccommended in some text books, but to me it seems like using a unit testing framework would make more sense... The main method gives you one point of entry to the class and you can tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/247025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I get 'footer' content on a master page to push down when main content requires it? Been a while since I've dealt with ASP.NET and this is the first time I've had to deal with master pages. Been following tutorials everything is fine except a problem I'm having with the footer. The master page has divs for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/247045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I send output to an external/second display in Java? I would like to be able to emulate the functionality of the "Presenter Tools" in MS Office. This requires the program to be able to detect and use an external/secondary monitor/projector. Could somebody please point me in the right direction for achieving...
{ "language": "en", "url": "https://stackoverflow.com/questions/247051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get javascript version from browser !=IE in asp.net In my current logging class I log the browser, browser version and javascript version. The Javascript version I get through HttpContext.Request.Browser.JScriptVersion This works fine for IE, but not for any other browser. Is there another way (not javascript base...
{ "language": "en", "url": "https://stackoverflow.com/questions/247052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Enabling floating point interrupts on Mac OS X Intel On Linux, feenableexcept and fedisableexcept can be used to control the generation of SIGFPE interrupts on floating point exceptions. How can I do this on Mac OS X Intel? Inline assembly for enabling floating point interrupts is provided in http://developer.apple...
{ "language": "en", "url": "https://stackoverflow.com/questions/247053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Is there a Newline constant defined in Java like Environment.Newline in C#? In C# there is the static property Environment.Newline that changed depending on the running platform. Is there anything similar in Java? A: As of Java 7: System.lineSeparator() Java API : System.lineSeparator Returns the system-dependen...
{ "language": "en", "url": "https://stackoverflow.com/questions/247059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "223" }
Q: What do you need to do Unit testing in Java with Eclipse? I've recently been lifted out of the .Net world into the Java world and I miss my unit tests. Using Visual Studio I used NUnit and TestDriven.net to run my unit tests. What is a comparable system for Java Using Eclipse? I'm looking specifically for the plugin...
{ "language": "en", "url": "https://stackoverflow.com/questions/247064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Reading and Parsing Files in .NET - Performance For Hire I want the most performat way to read and parse a file. Is it possible to read a file in .NET, but not load the entire file into memory? i.e. just load the file line by line as I parse the content of each row? Does XmlTextReader load the entire file into memo...
{ "language": "en", "url": "https://stackoverflow.com/questions/247066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Retain relative mouse position while resizing a JPanel in a JScrollPane I'm resizing a JPanel inside of a JScrollPane, and I want to make sure that the point on the JPanel where my mouse is currently located retains its position with respect to the JScrollPane after the resize (like Google maps does when you zoom in...
{ "language": "en", "url": "https://stackoverflow.com/questions/247071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can I change the Dojo namespace to something other than dojo? I know you can do it for jQuery using jQuery.noConflict. Is there a way to do something similar with Dojo? A: I believe you can. See this page about running more than one version of Dojo on a page. It's fiddly, but seems to be what you're looking for. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/247085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Should unit tests be written before the code is written? I know that one of the defining principles of Test driven development is that you write your Unit tests first and then write code to pass those unit tests, but is it necessary to do it this way? I've found that I often don't know what I am testing until I've w...
{ "language": "en", "url": "https://stackoverflow.com/questions/247086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How to debug ORA-01775: looping chain of synonyms? I'm familiar with the issue behind ORA-01775: looping chain of synonyms, but is there any trick to debugging it, or do I just have to "create or replace" my way out of it? Is there a way to query the schema or whatever to find out what the current definition of a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Edit Registry Values I want to change the registry values on the pocketPC. I ran the following code: if(enabled) { dwData = 120; } if(RegSetValueEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\Power\\Timeouts\\BattSuspendTimeout"), 0, REG_DWORD, (LPBYTE)&dwData, sizeof(DWORD))) { return FALSE;...
{ "language": "en", "url": "https://stackoverflow.com/questions/247093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: x64 .NET compilation / Process Explorer oddity Apologies if any of what I'm about to say makes no sense or overlooks something obvious - my knowledge of CLR internals is spotty. If I understand correctly, then if I just build a solution for 'AnyCPU' in VS2K5 (or point MSBuild at that .sln file with those settings) t...
{ "language": "en", "url": "https://stackoverflow.com/questions/247098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you do a union of two tables in NHibernate? I need to do a union of two tables using NHibernate and HQL. I have found very little help online, and I want to know if it is possible and if so how? A: Found my answer: http://www.hibernate.org/117.html#A21 It doesn't currently support union or intersect. A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/247103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: '\0' related issue Looking at this loop that copies one c-string to another: void strcpyr(char *s, char *t) { while(*s++=*t++)// Why does this work? ; } Why do we not check for the '\0' character in the while loop, like this? while((*s++=*r++)!='\0').. How does the first loop terminate? A: When we hit...
{ "language": "en", "url": "https://stackoverflow.com/questions/247106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Looking for suggestions for building a secure REST API within Ruby on Rails I'm getting started on building a REST API for a project I'm working on, and it led me to do a little research as to the best way to build an API using RoR. I find out pretty quickly that by default, models are open to the world and can be c...
{ "language": "en", "url": "https://stackoverflow.com/questions/247110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: Should I build my next web app in ASP.NET MVC? My team is considering building our next web app using the ASP.NET MVC framework. I am slightly hesitant, as are some others, because it is still only in beta. I really want to dive in because it seems to be a great way of providing clear separation of concerns and im...
{ "language": "en", "url": "https://stackoverflow.com/questions/247115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can Biztalk run a console application? I am writing a C# console application that takes a binary file, rips it apart, analyzes it, and stores the data into a database. We want to use BizTalk to orchestrate watching when a new binary file is placed in a directory and calling my application with the file name/names ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sharepoint Web Services Tutorial I'm trying to upload documents to SharePoint using web services attaching custom metadata to the files. I've searched but have not found a good tutorial covering all these topics. Can anybody point me in the right direction? Here's why I think I need to use web services: I'm develo...
{ "language": "en", "url": "https://stackoverflow.com/questions/247127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to auto-size an iFrame? Possible Duplicate: Resizing an iframe based on content I'm loading an iFrame and want the parent to automatically change the height based upon the height of the iFrame's content. To simply things, all pages belong to the same domain, so I shouldn't run into cross-site scripting issues...
{ "language": "en", "url": "https://stackoverflow.com/questions/247128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Using XPATH to search text containing   I use XPather Browser to check my XPATH expressions on an HTML page. My end goal is to use these expressions in Selenium for the testing of my user interfaces. I got an HTML file with a content similar to this: <tr> <td>abc</td> <td>&nbsp;</td> </tr> I want to select a n...
{ "language": "en", "url": "https://stackoverflow.com/questions/247135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "127" }
Q: Matching FORTRAN rounding in C# FORTRAN provides several functions to convert a double precision number to an integral value. The method used for truncation/rounding differs. I am converting complex scientific algorithms which use these. According to FORTRAN documentation: aint(x) returns the integral value betwee...
{ "language": "en", "url": "https://stackoverflow.com/questions/247143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Calling COM objects from a Firefox addon I'm about to take on a project that requires a Firefox addon to issue call to COM dll's installed on the client Windows machine and I'm having a hard time estimating the complexity of this undertaking. I have quite a bit of experience with COM, so I'm not frightened by it. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Removing repeated conditions using polymorphism and the Factory pattern <?php /** * My codebase is littered with the same conditionals over and over * again. I'm trying to refactor using inheritance and the Factory * pattern and I've had some success but I'm now stuck. * * I'm stuck because I want to derive a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I check if ini_set() is enabled either in the global PHP.INI or in my PHP script? I have an app that is failing on the install. The vendor says I probably have ini_set() disabled. How can I check this? A: I did some research on this, and it turns out that sometimes ini_set will not return FALSE, but an empty...
{ "language": "en", "url": "https://stackoverflow.com/questions/247152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Merging a custom ContextMenuStrip with the system edit context menu in a DataGridView I have a DataGridView in a VB.NET app that I have limited to cell selection only. The control has two columns, the first is not editable, the second is editable. I have a ContextMenuStrip that provides some additional functionality...
{ "language": "en", "url": "https://stackoverflow.com/questions/247154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Which of these two GetLargestValue C# implementations is better, and why? I'm having a disagreement with someone over how best to implement a simple method that takes an array of integers, and returns the highest integer (using C# 2.0). Below are the two implementations - I have my own opinion of which is better, an...
{ "language": "en", "url": "https://stackoverflow.com/questions/247156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I turn a String into a InputStreamReader in java? How can I transform a String value into an InputStreamReader? A: I also found the apache commons IOUtils class , so : InputStreamReader isr = new InputStreamReader(IOUtils.toInputStream(myString)); A: ByteArrayInputStream also does the trick: InputStream i...
{ "language": "en", "url": "https://stackoverflow.com/questions/247161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "291" }
Q: Exclusive Or in Regular Expression Looking for a bit of regex help. I'd like to design an expression that matches a string with "foo" OR "bar", but not both "foo" AND "bar" If I do something like... /((foo)|(bar))/ It'll match "foobar". Not what I'm looking for. So, how can I make regex match only when one term or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Is there a formula to convert from Thomas Bros Map page & grid to a latitude/longitude? I'm working on a project that contains Thomas Brothers Map page and grid numbers. Is there a way to programatically convert from this map page to a latitude & longitude? An Example would be for the intersection of the US101 & I4...
{ "language": "en", "url": "https://stackoverflow.com/questions/247174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Load multiple external websites into one webpage via re-using ONE IFrame + Ajax I am trying to embed multiple external websites into one web page. Using an IFRAME works ok, but once you get past 10 embedded iframes, the memory fottprint starts to get too big. So I was thinking, is it possible via ajax/javascript, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/247200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Telerik RadEditor Find & Replace in HTML View We use Telerik's RadEditor for our content management system's WYSIWYG editor. We need the find & replace functionality that is in the WYSIWYG editor to also be in the HTML editor. The editor is pretty customizable, anyone know if there is a way to enable this or hack ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I convert a DTD to a Schema as part of a Maven or ANT build? How can I convert a DTD to a Schema as part of a Maven build? Specifically, I am looking for a Maven plugin to which I can give the URL to a DTD and it will generate an XML Schema Definition file. Failing a good Maven plugin, perhaps I can embed an...
{ "language": "en", "url": "https://stackoverflow.com/questions/247207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Commonly accepted best practices around code organization in JavaScript As JavaScript frameworks like jQuery make client side web applications richer and more functional, I've started to notice one problem... How in the world do you keep this organized? * *Put all your handlers in one spot and write functions for...
{ "language": "en", "url": "https://stackoverflow.com/questions/247209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "569" }
Q: When using keytool to generate a CSR file, does it have to be generated on the hosting server? I was under the impression that I could run it on any machine, but a guy from our hosting company is saying that the csr has to be generated on the server hosting the site. Can anyone clear this one up for me? Thanks. A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247220", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: iSeries - Call SQL stored procedure from CL program How can I run a stored procedure from a CL program? RUNSQLSTM requires a source member, but I just want to build a command so users can pass in variables easily, so this won't work. A: You can call the system program QZDFMDB2 and pass it one parameter with the SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/247228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Do you know a similar program for wc (unix word count command) on Windows? A quick search gives me tawbaware wc, but it does not accept stdout as input stream, meaning I can not use pipe within a DOS session. Note: I can not install cygwin or use powershell (which would have allowed a '|foreach-object {(get-content...
{ "language": "en", "url": "https://stackoverflow.com/questions/247234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Event signature pattern in .net What's the point in the standard pattern for event delegates in .net? I.e. the EventHandler predefined delegate? Why not just choose the most appropriate signature for the requirement? Edit: And furthermore, is it necessary to slavishly follow Microsoft's example in all cases? A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/247241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to add an HTML link in the body of a MAILTO link I have not had to mess with mailto links much. However I now need to add a link in the body of a mailto if it is possible. Is there a way to add a link or to change the email opened to an html email vs a text email? Something like: <a href="mailto:te...
{ "language": "en", "url": "https://stackoverflow.com/questions/247245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: Should I persist a sqlconnection in my data access layer? It seems like there is a lot of overhead involved in rapidly opening and closing sqlconnections. Should I persist a connection (one, per client, per database), or continue declaring a new sqlconnection object whenever I need one, and making sure I clean up af...
{ "language": "en", "url": "https://stackoverflow.com/questions/247247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Accessing data with stored procedures One of the "best practice" is accessing data via stored procedures. I understand why is this scenario good. My motivation is split database and application logic ( the tables can me changed, if the behaviour of stored procedures are same ), defence for SQL injection ( users can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What $_POST[] do i need to post to a forum? I am admin on a forum. Earlier we had phpbb 2.0 and i made a bot that could write to the forum. Now, we have upgraded the forum to phpbb 3.0, but i can't get my bot to write to the forum anymore. I have looked for a solution, but now i am out of ideas. So it would have be...
{ "language": "en", "url": "https://stackoverflow.com/questions/247257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VS2008 C# Exceptions with methods invoked by reflection If I invoke a method which does something illegal, the debugger will stop at the line of code, in that method, which threw the exception If I use reflection to call a method via Invoke and that method throws an exception, the debugger stops on line where the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/247269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to (de)serialise JSON data in Silverlight using a different name to member variable I have the following members defined in a class that I'm trying to deserialise: [DataMemberAttribute(Name = "cust_title")] public String Title { get; set; } [DataMemberAttribute(Name = "cust_description")] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Modifying form values with beforeSubmit with jQuery ajaxSubmit? I have a form I am submitting using jQuery's ajaxSubmit function from the Forms plugin. I'm trying to add a form name/value pair to the form data just before submission occurs. My plan is to modify the form data in the beforeSubmit event handler. Given ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Working with multiple programmers on MS Access Would you recommend working with multiple programmers on an MS Access application? One of our MS Access application has grown to the point where the number of changes (bug fixes) and new features can no longer be handled by one programmer in the requested time frame. We...
{ "language": "en", "url": "https://stackoverflow.com/questions/247292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: what are the advantages of using plpgsql in postgresql Besides the syntactic sugar and expressiveness power what are the differences in runtime efficiency. I mean, plpgsql can be faster than, lets say plpythonu or pljava? Or are they all approximately equals? We are using stored procedures for the task of detecting ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What data type to use for hashed password field and what length? I'm not sure how password hashing works (will be implementing it later), but need to create database schema now. I'm thinking of limiting passwords to 4-20 characters, but as I understand after encrypting hash string will be of different length. So, ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/247304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "311" }
Q: Using jQuery tableSorter on dynamically modified table I am using the jQuery tableSorter plugin on a page. Unfortunatley, the table that is being sorted is dynamically modified, and when I sort after adding an element, the element disappears, restoring the table to the state that it was in when the tableSorter was ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: SqlDataReader: In this scenario, will the reader get closed? I am cleaning up the DataReaders in an old .NET 1.1 project that I inherited. The previous developer coded the data-access-layer in such a way that most of the DAL methods returned SqlDataReaders (thus leaving it up to the caller to properly call the .Clo...
{ "language": "en", "url": "https://stackoverflow.com/questions/247311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I Format A String Like A Number in .NET? If I had a phone number like this string phone = "6365555796"; Which I store with only numeric characters in my database (as a string), is it possible to output the number like this: "636-555-5796" Similar to how I could if I were using a number: long phone = 6365...
{ "language": "en", "url": "https://stackoverflow.com/questions/247313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Oracle - ODBC connection using MS Access error (ORA-12154) I am trying to use MS access to connect to a Oracle database. I keep on getting the following error message: ORA-12154: TSN- could not resolve the connect identifier secified The Oracle Drivers OracleClient10g can verify that the database server exists. I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/247317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP SimpleXML::addChild with empty string - redundant node Calling addChild with an empty string as the value (or even with whitespace) seems to cause a redundant SimpleXml node to be added inside the node instead of adding just the node with no value. Here's a quick demo of what happens: [description] => !4jh5jh1ui...
{ "language": "en", "url": "https://stackoverflow.com/questions/247318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Problem to porting managed c++ from vs2003 to vs2008 In trying to port my managed c++ project from vs2003 to vs2008. I have added oldSyntax flag. But I still get error sourceanotations.h. A: We have a project that was written with the managed extensions for C++ that simply doesn't compile in VS2005 using /clr:oldSy...
{ "language": "en", "url": "https://stackoverflow.com/questions/247327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: refactor HTML-generating JavaScript Unfortunately on my project, we generate a lot of the HTML code in JavaScript like this: var html = new StringBuffer(); html.append("<td class=\"gr-my-deals\"><a href=\"").append(deal.url).append("\" target=\"_blank\">").append(deal.description).append("</a></td>"); I have 2 spec...
{ "language": "en", "url": "https://stackoverflow.com/questions/247329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Applying CSS to Text inputs with Classes I'm using jQuery validate on a form I am building and it is working great. What I want to do is when something is invalid to have the text field change colors and the error message to be white. I figured the following CSS would work: label .error {color: white; font-weight: b...
{ "language": "en", "url": "https://stackoverflow.com/questions/247331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to retrieve maven properties inside a JUnit test? I'm writing a test for a file parser class. The parse method receives a file name as parameter, and must open it in order to parse it ( duh ). I've writen a test file, that I put into the test/resources directory inside my project directory, and would like to pas...
{ "language": "en", "url": "https://stackoverflow.com/questions/247346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Available Build Tools (make, etc)? There's a lot of questions on here regarding various niche build needs (.NET, continuous integration, etc) but, of course, my niche need is different. Rather than asking a very specific question right now, I'd like a survey of available build tools (such as make, ant, etc) so I can...
{ "language": "en", "url": "https://stackoverflow.com/questions/247350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: ASP.NET : Binding textbox maxlength to Class constant in HTML I am attempting to allow my web designers to use the metadata we have about database fields in the asp.net pages they are creating. The most obvious one is as follows: <asp:TextBox runat="server" id="txTextBox" MaxLength="<Value From Metadata here>" ... /...
{ "language": "en", "url": "https://stackoverflow.com/questions/247369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What time format is this? (not UNIX, not UTC, nothing) I'm importing data from another system to MySQL, its a CSV file. The "Date" field however contains cryptic of 3-digit time entries, here's a random sample set: > 540 > 780 > 620 > 965 What's this? obviously its not 5:40 and 6:20. But it's not UNIX either (I tri...
{ "language": "en", "url": "https://stackoverflow.com/questions/247373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to force NHibernate to recognize db changes not made through NHibernate I am implementing NHibernate into an existing web application. However, we have some other processes that do bulk inserting and updating on the database. How can I make NHibernate aware that changes are occurring on the backend db that were ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: php observer pattern to log user out when session times out I'm trying to log users out when the user's session timeout happens. Logging users out - in my case - requires modifying the user's "online" status in a database. I was thinking that I might be able to use the observer pattern to make something that would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/247412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }