CSS – Transition Tips & Tricks

I’m amazed at how CSS has changed since the last time I looked into it. Something that previously required a tone of Javascript is now possible to implement by putting a single line of CSS code:

div {
  transition: all 0.5s ease;
  background: red;
  padding: 10px;
}

div:hover {
  background: green;
  padding: 20px;
}

That’s all it takes to transform a div from red to green and back again!

Source: http://css-tricks.com/almanac/properties/t/transition/

CSS – Transition Tips & Tricks

I’m amazed at how CSS has changed since the last time I looked into it. Something that previously required a tone of Javascript is now possible to implement by putting a single line of CSS code:

div {
  transition: all 0.5s ease;
  background: red;
  padding: 10px;
}

div:hover {
  background: green;
  padding: 20px;
}

That’s all it takes to transform a div from red to green and back again!

Source: http://css-tricks.com/almanac/properties/t/transition/

Converting XML or JSON to C# Classes in Visual Studio

Kapil's space

In the Visual Studio 2012 IDE, a new feature is introduce to convert XML document into C# classes as a Serializable type.

In the .NET framework 4.5 there is another Paste Special option is exists in the Edit menu which enables you to copy the XML as C# Classes.

Paste-xml-as-classes.png

Copy the XML  you want to create a class/classes for, place the cursor in a class file on the location you want the code to be added and select the following menu items:

  • Edit.
  • Paste Special.
  • Paste XML as Classes.

And you’re done.

Suppose you have following XML File.
xml-in-vs-2012.jpg

And when you paste the above XML using Paste XML as classes. It will looks like that.

xml-as-classes.jpg

View original post

ASP.NET MVC – If only we had it 10 years ago

I realised that one of the technology or rather a group of the technologies that stops me from applying for some jobs is ASP.NET MVC + the usual JavaScript stack.

So I bought 2 books on the subject and have been playing with the technology for couple of days now. And I must say things have improved A LOT since I’ve been doing Web Development.

Back in 2003 I were working on an Order Management System and my boss being a perfectionist and a great fan of Google, requested that we created an order input form, comprised of 6 tabs without any postbacks to the server (‘coz they are evil)

All we had at our disposal was ASP.NET and JavaScript. But somehow we managed to archive what he wanted. We of course had to use some serious black magic to fetch data asynchronously (remember no AJAX back then) instead we realised we could use hidden Iframes to fetch all the required data. And the application (the order entry form) became extremely nice to use.

The traders would no longer have to remember the exact ticker, as long as they knew the name the app would asynchronously go and fetch corresponding tickers.

Once you selected a ticker, you would be presented with some information about the instrument, settlement date and the fees would automatically default based on the market where the instrument was traded on, if it was a bond it will also calculate yield, time to maturity, for convertible bonds it will show you all the greeks and much more (limits, holiday calender per market, settlement periods, compliance stuff, history of changes etc). Not only that but the could switch to a different tab effortlessly to see the executions and modify them if necessary. I’m not going to go to cover the other 95% of features, but the app was brilliant in terms of usability, only Google could complete.

image

Continue reading “ASP.NET MVC – If only we had it 10 years ago”

JSON# – Tutorial #5: Deserialising Complex Objects

Fork on Github
Download the Nuget package

The previous tutorial focused on deserialising simple JSON objects. This tutorial describes the process of deserialising a more complex object using JSON#.

Let’s use the ComplexObject class that we’ve leveraged in earlier tutorials:

Let’s instantiate this with some values, and serialise to JSON. I won’t bloat this post with details on how to serialise, covered in previous posts. Here is our serialised ComplexObject instance:

Notice that we have 2 collections. A simple collection of Doubles, and a more complex collection of ComplexArrayObjects. Let’s start with those.

First, create a new class, ComplexObjectDeserialiser, and implement the required constructor and Deserialise method.

Remember this method from the previous tutorial?

This effectively parses the JSON and loads each element into a NameValueCollection. This is fine for simple properties, however collection-based properties would cause the deserialiser to load each collection-element as…

View original post 229 more words

Parsing HTML in C#

C# Disciples

Today I stumbled upon a bizarre problem, I wanted to parse an HTML for a site to find out if the site contains any RSS feeds. After some research I found out that finding the RSS feed for a site is not that hard, you have to look for an element that looks like this

image

“Easy task”, I said, me Mr.Optimistic; “I will just load it up in XElement and using Linq to XML to get the data I want”. BUT guess what the web is filled with crazy HTML that a standard .NET parser such as XElement just gives up on and blows up in flames.

After some heavy head banging to walls and ceilings, I found the solution, HtmlAgilityPack. This open source project lets you load HTML even if it is not in a good shape. With some options HTMLAgilityPack will fix these errors and then you…

View original post 36 more words

MVVM in the web world

C# Disciples

Introduction

Lately I have been experimenting with some web and I must say. the web is really making really amazing advances. The JS libraries out there are pretty awesome and make your job much more fun that it was a couple of years back !

One library that really really impressed me is (no not JQuery even though I must say I am quite impressed with JQuery as well !!) Knockout.js. The idea behind Knockout.js is to introduce MVVM to the world of web… One might ask does it even make sense to introduce a pattern like MVVM, how will it work without data binding capabilities ?? Well easy, bake binding capabilities in the library Smile and that is what Knockout.js is all about.

I will not give a deep dive to knockout but I will just show some of the capabilities of this library and then explain why I…

View original post 814 more words

Resigning from Mizuho

Today I took a plunge and decided to resign from Mizuho. While all the team members are great to deal with the boss is into micro-managing, trying to control every aspect of your work.This has lasted for several months now and pushed me over the edge, I absolutely hated coming to work.

The job market here in London is very good and I have already had several interviews. I noted that there are quite a few jobs requiring knowledge of web technologies – MVC, ASP.NET, jQuery, AngularJS.

Liking all things new, I went ahead and bought a few books on various web technologies:


CMVC

Angular

JQuery

My plan is to get up to speed with those technologies so that they can be put on my CV. Back in the days (2003 – 2005) I used to be a very good web developer. It would be very exiting to see the web development has progressed since

Blog at WordPress.com.

Up ↑