Looks like order of sections in web.config (or app.config for that matter) matters - you can not have appSettings before configuration section, or it ConfigurationManager will not read it.
Welcome...
...All those moments will be lost in time, like tears in rain....- soliloquy from Blade Runner
Bits and bytes do get lost, awash in the rain of data flow that is Internet. They slip away from us, never to found again... some of them will be captured here, many more will not... like tears in rain... |
Monday, December 8, 2014
Tuesday, November 11, 2014
Fiddle, fiddler on the roof
Fiddles are scaled down environment accessible via web, used to testing, demonstration, or just to share snippets. They usually have a window split for code, markup, output... Very handy.
I've used JSFiddle a lot since it allows you to add easily many popular frameworks, like jQuery, KnockoutJS, Prototype, AngularJS and even allow you to specify how you will run your code (onReady, onLoad...).
http://www.jsfiddle.net
It has echo API to simulate API calls.
Then there is Plunker - it's grown up sibling. It has link to GitHub and ability to split code into multiple files. I really liked it, and my only issue is that they succumbed to Web 2.0 fad and named the site by skipping vowels, making me mistype the site name _every_single_time.
http://plnkr.co/
But beside that unfortunate name, it's really useful tool, good for fast prototyping.
And last one I've found is SQL Fiddle:
http://www.sqlfiddle.com/
It has a list of supported databases (mySQL, SQL Server, Oracle and Postgress) that you can target. In one pane, you can create your db schema, in second pane, you can run your queries.
It supports OpenId login and accepts donations, although I couldn't find a link for donating. Looks like site is work in progress still.
I've used JSFiddle a lot since it allows you to add easily many popular frameworks, like jQuery, KnockoutJS, Prototype, AngularJS and even allow you to specify how you will run your code (onReady, onLoad...).
http://www.jsfiddle.net
It has echo API to simulate API calls.
Then there is Plunker - it's grown up sibling. It has link to GitHub and ability to split code into multiple files. I really liked it, and my only issue is that they succumbed to Web 2.0 fad and named the site by skipping vowels, making me mistype the site name _every_single_time.
http://plnkr.co/
But beside that unfortunate name, it's really useful tool, good for fast prototyping.
And last one I've found is SQL Fiddle:
http://www.sqlfiddle.com/
It has a list of supported databases (mySQL, SQL Server, Oracle and Postgress) that you can target. In one pane, you can create your db schema, in second pane, you can run your queries.
It supports OpenId login and accepts donations, although I couldn't find a link for donating. Looks like site is work in progress still.
Tuesday, October 28, 2014
classList and className
JavaScript is a language full of surprises.
Every DOM element always had className property, that was nothing but white space separated list of classes. That was not the most convenient so JQuery encapsulated manipulation of that with addClass and removeClass methods.
Now, new browsers are supporting classList API, allowing JavaScript to add and remove classes from the DOM elements easily, without JQuery. This is important for mobile browsers, where everything should be parred down if possible.
So classList is a list of classes, with length property and this list of methods for manipulation:
Looks like certain browsers allows even to pass multiple classes to add, separate by space.Every DOM element always had className property, that was nothing but white space separated list of classes. That was not the most convenient so JQuery encapsulated manipulation of that with addClass and removeClass methods.
Now, new browsers are supporting classList API, allowing JavaScript to add and remove classes from the DOM elements easily, without JQuery. This is important for mobile browsers, where everything should be parred down if possible.
So classList is a list of classes, with length property and this list of methods for manipulation:
- add (class)
- contains (class)
- item (index)
- remove (class)
- toggle (class)
Of course, older IE does not support this, only IE 10 and up.
This should do for a check:
if('classList' in document.createElement('elem')) {
document.getElementById('elem').classList.add('newClass');
}
else
{
document.getElementById('elem').className += " newClass";
}
Friday, October 24, 2014
Wednesday, July 30, 2014
Searching for something in dbml
So far, I've found 2 ways to find something in dbml:
1) through designer generated code, usually happens by using ReSharper
2) using properties panel - if you are visual mode, there is a dropdown on the top of the properties panel, which will show you all objects in the dbml diagram.
1) through designer generated code, usually happens by using ReSharper
2) using properties panel - if you are visual mode, there is a dropdown on the top of the properties panel, which will show you all objects in the dbml diagram.
Friday, July 11, 2014
Entity Framework 4.4
Old versions of Entity Framework were really more trouble than they were worth.
Case to the point - if you are using version of EF that does not support foreign keys, you are actually better of not having them defined on the table at all, because then they are treated as any other value in the table.
If they are defined as foreign keys, then you have to go to extra trouble and retrieve them, as they would be recognized as unsupported property and have value of null.
Case to the point - if you are using version of EF that does not support foreign keys, you are actually better of not having them defined on the table at all, because then they are treated as any other value in the table.
If they are defined as foreign keys, then you have to go to extra trouble and retrieve them, as they would be recognized as unsupported property and have value of null.
Subscribe to:
Posts (Atom)