Skip to main content

Posts

Showing posts from July, 2013

Regex for Folder name.

void Main() {        TestRegex( "siddharth965388888888" );        TestRegex( "s-_]p[{};_~!@#$%.^&()_-+=" );        TestRegex( "siddharth mishra 9653" ); } // Define other methods and classes here private void TestRegex( string str) {        Regex reg = new Regex( "^[^\\/?*:|<>\"]+$" );     if (reg.IsMatch(str.ToString()))        Console.WriteLine( "Matched" );        else               Console.WriteLine( "NO" );          }

iConcept:Basic MVVM with Reactive Cocoa

Basic MVVM with Reactive Cocoa MVC – One Pattern to Rule them all The MVC design pattern has existed since the late 1970s and has been in use in the Foundation, AppKit & UIKit Frameworks for a long time now. At its heart is a very simple design and a good idea. The Design is this As you can see we have 3 components Model – The Data model our view is managing View – The User Interface on screen consisting of things such as text fields, buttons, etc. Controller – The Controller in MVC exists to decouple the view from the model. In the MVC design pattern, the controller separates the model from the view so that each can change independently. If we didn’t have such a decoupling then every time the model changed, the view would need to change as well. In this design pattern interactions happen like this A view triggers an action to happen on the Controller The Controller executes said action and updates the model The controller may receive a notification from the ...

iDiscussion : Writing Apps? Juggling Multiple Platforms and the Bumpy Road Ahead

Targeting multiple operating systems has been an industry goal or non-goal depending on your perspective since some of the earliest days of computing. For both app developers and platform builders, the evolution of their work follow typical patterns—patterns where their goals might be aligned or manageable in the short term but become increasingly divergent over time. While history does not always repeat itself, the ingredients for a repeat of cross-platform woes currently exist in the domain of mobile apps (mobile means apps developed for modern sealed-case platforms such as iOS, Android, Windows RT, Windows Phone, Blackberry, etc.) The network effects of platforms and the “winner take all” state that many believe is reached (or perhaps desirable) influences the behavior and outcome of cross-platform app development as well as platform development. Today app developers generally write apps targeting several of the mobile platforms. If you look at number of “sockets” over the pas...

iConcept: COCOA Design Pattern

A Design Pattern is a reocurring solution to a common software engineering problem. The idea behind design patterns is to not continually reinvent the wheel. Design Patterns differ from Templates in that they do not contain executable code. http://goo.gl/OeSCu An example of a Design Pattern is the Listener (Observer). A Listener is an object which waits for information from another object. Now, it is clear that this is a very useful basic idea. Listeners are used in all aspects of Mac OS X and Cocoa for many purposes, not the least of which is GUI management. However, rather than stumble over the same design issues whenever you need to implement a type of listener, the Listener is a documented design pattern that features prepared solutions to these issues. You don't need to discover for yourself that all the Observers for an object can be stored in a single array, because this is included in the Design Pattern. For more on design patterns, including many examples: http://w...