Generating string consisting of the same character
2013-11-03
Recently I’ve been asked by friend of mine, how to generate string consisting of 50 commas.
I came up with these three code snippets:
105 words
|
1 minute
NHibarnate - using event listeners to set entity modification date
2013-08-24
I think, that it is a common practice to store information about creation and modification date of entities.
However keeping appropriate columns up to date manually is error prone. We must remember that every time we modify entity, we also have to change its modification date.
Fortunately thanks to event listeners, NHibernate can do all of this boring stuff for us.
Let’s start from creating class which implements two interfaces:
611 words
|
3 minutes
Extjs - vertical header in grid
2013-06-30
Extjs doesn’t provide us with any build-in mechanism for flipping text vertically in grid’s header.
Fortunately we can achieve this effect by using a mixture of CSS rules and some javascript code.
In order to make code more reusable, I’ll write it as a plugin for grid.
Let’s start from creating CSS rules responsible for text rotation
351 words
|
2 minutes
Extjs - drag-and-drop between tables
2013-05-22
Extjs framework provides us with two helper classes responsible for performing drag-drop operation:
617 words
|
3 minutes
Fixing missing semicolon issue using WebStorm
2013-04-14
Recently in the company I work for, we’ve been trying to improve Javascript code quality.
After hooking up JSlint into our build script, it turned out that the most common issue with our code is missing semicolon at the end of statements.
Fixing all warnings manually would be very boring task, that is why I started searching for alternative solution.
Fortunatelly once again, WebStorm came for the rescue.
As you probably know WebStorm has it’s own code inspection tool which indicates problems with code.
However except that, this tool can also fix these problems automatically.
Here is a little demonstration. Let us start with simple code.
248 words
|
1 minute
Fluent Nhibernate - automappings
2013-03-25
Writing mappings for models in large application is quite boring task.
Fortunatelly, Fluent NHibernate provides possibility for automatic mapping creation - so called automappings.
654 words
|
3 minutes
Extjs - Changing style of items in dropdownlist
2013-03-19
I’ve recently been asked to create ComboBox with custom styled drop-down list.
Colors of items of drop-dow list should be picked based on values of record bounded to given item.
After reading some post on Extjs forum, I decided to overwrite default template of drop-down list.
264 words
|
1 minute
StringBuilder - removing trailing characters
2013-03-17
Today just quick tip about StringBuilder I used to remove last character(s) from StringBuilder using Remove method.
64 words
|
1 minute