pattern (5,008)


How can I get at the matches when using preg_replace in PHP?

How can I get at the matches when using preg_replace in PHP?

I am trying to grab the capital letters of a couple of words and wrap them in span tags. I am using preg_replace for extract and wrapping purposes, but it's not outputting anything. preg_replace("/[A-…


sql server - How do I unit test persistence?

As a novice in practicing test-driven development, I often end up in a quandary as to how to unit test persistence to a database. I know that technically this would be an integration test(not a unit…


design patterns - What are MVP and MVC and what is the difference?

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. When…


SVN Client Ignore Pattern for VB.NET Solutions

What is the best SVN Ignore Pattern should TortoiseSVN have for a VB.NET solution?…



SQL Server Escape an Underscore

How do I escape the underscore character? I am writing something like the following where clause and want to be able to find actual entries with_d at the end. Where Username Like '%_d'…


ruby on rails - Why all the Active Record hate?

As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on Active Record.Often, people say that it doesn't scale well(ci…


Extension interface patterns

The new extensions in.Net 3.5 allow functionality to be split out from interfaces. For instance in.Net 2.0 public interface IHaveChildren{string ParentType{get;}int ParentId{get;}…


Custom WPF command pattern example

I've done some WPF programing and one thing I never got was the command pattern. Every example seems to be for built in ones, edit, cut, paste. Anyone have an example or suggestion of best practice…


language agnostic - Do you use design patterns?

What's the penetration of design patterns in the real world? Do you use them in your day to day job-discussing how and where to apply them with your coworkers-or do they remain more of an academi…


How to dispose a class in.net?

The.NET garbage collector will eventually free up memory, but what if you want that memory back immediately? What code do you need to use in a class MyClass to call MyClass.Dispose() and free up all…




example java design matching with string regex how and multiple