0
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Posted on 3:29 AM by Softminer and filed under
C#,
Visual Studio
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
// Factory Method pattern -- Structural example using System; namespace DoFactory.GangOfFour.Factory.Structural { /// <summary> /// MainApp startup class for Structural /// Factory Method Design Pattern. /// </summary> class MainApp { /// <summary> /// Entry point into console application. /// </summary> static void Main() { // An array of creators Creator[] creators = new Creator[2]; creators[0] = new ConcreteCreatorA(); creators[1] = new ConcreteCreatorB(); // Iterate over creators and create products foreach (Creator creator in creators) { Product product = creator.FactoryMethod(); Console.WriteLine("Created {0}", product.GetType().Name); } // Wait for user Console.ReadKey(); } } /// <summary> /// The 'Product' abstract class /// </summary> abstract class Product { } /// <summary> /// A 'ConcreteProduct' class /// </summary> class ConcreteProductA : Product { } /// <summary> /// A 'ConcreteProduct' class /// </summary> class ConcreteProductB : Product { } /// <summary> /// The 'Creator' abstract class /// </summary> abstract class Creator { public abstract Product FactoryMethod(); } /// <summary> /// A 'ConcreteCreator' class /// </summary> class ConcreteCreatorA : Creator { public override Product FactoryMethod() { return new ConcreteProductA(); } } /// <summary> /// A 'ConcreteCreator' class /// </summary> class ConcreteCreatorB : Creator { public override Product FactoryMethod() { return new ConcreteProductB(); } } }
0
Checker plus for Gmail
Yet another extension for google bookmark
Alex traffic rank
AdBlock
Screen capture
BuiltWith technology provider
FB photo zoom
RSS subscription extension
XML viewer
Posted on 1:30 AM by Softminer and filed under
Internet
Checker plus for Gmail
Yet another extension for google bookmark
Alex traffic rank
AdBlock
Screen capture
BuiltWith technology provider
FB photo zoom
RSS subscription extension
XML viewer
2
Posted on 2:12 AM by Softminer and filed under
C#,
Visual Studio
using System; using System.Threading.Tasks; namespace Listing_02 { class Listing_02 { static void Main(string[] args) { // use an Action delegate and a named method Task task1 = new Task(new Action(printMessage)); // use a anonymous delegate Task task2 = new Task(delegate { printMessage(); }); // use a lambda expression and a named method Task task3 = new Task(() => printMessage()); // use a lambda expression and an anonymous method Task task4 = new Task(() => { printMessage(); }); task1.Start(); task2.Start(); task3.Start(); task4.Start(); // wait for input before exiting Console.WriteLine("Main method complete. Press enter to finish."); Console.ReadLine(); } static void printMessage() { Console.WriteLine("Hello World"); } } }
0
Posted on 7:33 AM by Softminer and filed under
C#,
Visual Studio
class Program { static BackgroundWorker _bw = new BackgroundWorker(); static void Main() { _bw.DoWork += TODO; _bw.RunWorkerAsync("Message to worker"); Console.ReadLine(); } void TODO(object sender, DoWorkEventArgs e) { // This is called on the worker thread // writes "Message to worker" Console.WriteLine (e.Argument); _backgroundworker.CancelAsync(); // Perform time-consuming task... } }
0
Posted on 1:29 AM by Softminer and filed under
<?php $pageURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } $goto = str_replace("olddomain.com", "newdomain.com",strtolower($pageURL)); header ("Location: $goto"); ?>
0
Online Project Management tool
http://www.zoho.com/projects/
if you want to host the tool on your own domain, I suggest BugNET which is based on ASP.NET and SQL Server.
http://www.bugnetproject.com/
Live Demo
Help Desk Management
Jira Issue and project tracking software
Gemini
Redmine
Support Center
taskulu
Trello
Posted on 3:04 AM by Softminer and filed under
Project Management
Online Project Management tool
http://www.zoho.com/projects/
if you want to host the tool on your own domain, I suggest BugNET which is based on ASP.NET and SQL Server.
http://www.bugnetproject.com/
Live Demo
Help Desk Management
Jira Issue and project tracking software
Gemini
Redmine
Support Center
taskulu
Trello
0
To view Log files you need always scroll to bottom of page, with following tool its easy to view logs which automatically update the last changes in log file.
Dynamic Log Viewer
Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory
http://www.microsoft.com/en-us/download/details.aspx?id=24659
Posted on 2:24 AM by Softminer and filed under
Software
To view Log files you need always scroll to bottom of page, with following tool its easy to view logs which automatically update the last changes in log file.
Dynamic Log Viewer
Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory
http://www.microsoft.com/en-us/download/details.aspx?id=24659