Tuesday, August 22, 2017
2017 IRA and 401k Contribution Limit
A 403(b) is a retirement plan offered by certain public institutions and tax-exempt organizations.
A 401(k) plan is the tax-qualified, defined-contribution pension account defined in subsection 401(k) of the Internal Revenue Code.
A 457 plan is a type of nonqualified, tax advantaged deferred-compensation retirement plan that is available for governmental and certain non-governmental employers in the United States.
A traditional IRA is a way to save for retirement that gives you tax advantages. Contributions you make to a traditional IRA may be fully or partially deductible, depending on your circumstances, and Generally, amounts in your traditional IRA (including earnings and gains) are not taxed until distributed.
A Roth IRA (individual retirement account) is a retirement plan under US law that is generally not taxed, provided certain conditions are met.
A SIMPLE IRA plan (Savings Incentive Match PLan for Employees) allows employees and employers to contribute to traditional IRAs set up for employees. It is ideally suited as a start-up retirement savings plan for small employers not currently sponsoring a retirement plan.
A SIMPLE 401K plan is a subset of the 401(k) plan. Just like the SIMPLE IRA plan, this is a plan just for you: the small business owner with 100 or fewer employees.
Friday, August 11, 2017
Javascript Keyboard events
Events & event values
There are keydown, keypress, and keyup events. For most keys, browser dispatches a sequence of key events like this:
Using this kind of tool, we can quickly detect the keyCode, which, charCode values from keydown, keypress and keyup events.
Cross browser compatibility
Different Keyboard Layouts
There are keydown, keypress, and keyup events. For most keys, browser dispatches a sequence of key events like this:
- When the key is first depressed, the keydown event is sent.
- If the key is not a modifier key, the keypress event is sent.
- When the user releases the key, the keyup event is sent.
In the event object, event.which, event.keyCode and event.charCode are more relating to Javascript programming.
There is some online testing tool for these keyboard events, for instance
Using this kind of tool, we can quickly detect the keyCode, which, charCode values from keydown, keypress and keyup events.
Cross browser compatibility
However, different browsers might return different keyCode for same character. For instance, IE/Edge browser returns 229 but Chrome/Firefox returns 50 keyCode from keydown event. If we look at below comparison figure, same browser returns different keyCode value from different keyboard events. One example here is: keypress event, for same @ char, chrome returns 64 keyCode, but Firefox returns 0 keyCode.
Fortunately, jQuery normalize browser difference for keyCode etc. Further more, jQuery recommends event.which over event.keyCode and event.charCode keyboard events.
http://api.jquery.com/event.which/
http://api.jquery.com/event.which/
The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch event.which for keyboard key input.
event.which also normalizes button presses (mousedown and mouseupevents), reporting 1 for left button, 2 for middle, and 3 for right. Use event.which instead of event.button.
MDN (Mozilla Developer Network) has the following note:
In a keypress event, the Unicode value of the key pressed is stored in either the keyCode or charCode property, never both. If the key pressed generates a character (e.g. 'a'), charCode is set to the code of that character, respecting the letter case. (i.e. charCode takes into account whether the shift key is held down). Otherwise, the code of the pressed key is stored in keyCode. charCode is never set in the keydown and keyup events. In these cases, keyCode is set instead.
http://unixpapa.com/js/key.html gives more details regarding keyboard events compatibility landscape across different browsers.
Different Keyboard Layouts
Same character might have different keyCode when using foreign keyboard layouts
Stackoverflow gives some simple solution as below for different keyboard layouts compatiblity:
Use onkeypress to ascertain the correct character code for the key that was pressed. In the event handler, check the event.which and event.keyCode properties:
function whichKey(evt) {
alert(String.fromCharCode(evt.which || evt.keyCode));
}
KeyboardEvent.key to the rescue?
Model browsers start to support KeyboardEvent.key which should be used to replace charCode etc.
The definition of 'KeyboardEvent.key' is in "Document Object Model (DOM) Level 3 Events Specification" Working Draft (as of August 2017).
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
http://caniuse.com/#feat=keyboardevent-key
Apart from Android browsers, IE11/Edge, other modern browsers have support event.key.
Conclusion
Apart from Android browsers, IE11/Edge, other modern browsers have support event.key.
Conclusion
Explore event.key if your web app doesn't need to support legacy browsers.
Use event.which, event.keyCode, and event.charCode wisely in different keyboard events.
Use event.which, event.keyCode, and event.charCode wisely in different keyboard events.
Tuesday, July 18, 2017
ASP.NET Controls
UI controls can help developers quickly build web apps. That is why such kind of library, suite, components get popular. There are many open source libraries, but commercial licenses usually provide more features, more controls and premium support.
.NET controls not only enable developers to build applications with intuitive user interfaces but also enhances productivity. While Microsoft provides standard set of controls with Visual Studio, third party suites contain numerous controls with wide range of unique features for the development of applications for PC and portable mobile devices.
Here is a list I am aware of:
www.telerik.com/devcraft
Familiar API, design-time support, app templates and more, using Kendo UI
www.componentone.com/controls
300+ Controls For Mobile, Web & Desktop.
https://www.infragistics.com/products/aspnet
Infragistics Ultimate UI for ASP.NET includes over 60 controls to help you create high-performing, full-featured enterprise apps that look great in any browser.
https://www.devexpress.com/
DevExpress provides best in class user interface controls for WinForms, ASP, MVC, WPF and Silverlight.
https://www.syncfusion.com/products/communitylicense
More than 800 controls and frameworks for web, desktop and mobile development.
ext.net
ASP.NET and ASP.NET MVC Controls and Components integrating the Sencha Ext JS JavaScript Library.
http://www.fineui.us
ASP.NET WebForms/MVC Components for Enterprise Apps, 50+ components with built-in AJAX support for desktop, tablets and phones. It is built based on jQuery with high performance and high quality, very popular in China.
.NET controls not only enable developers to build applications with intuitive user interfaces but also enhances productivity. While Microsoft provides standard set of controls with Visual Studio, third party suites contain numerous controls with wide range of unique features for the development of applications for PC and portable mobile devices.
Here is a list I am aware of:
www.telerik.com/devcraft
Familiar API, design-time support, app templates and more, using Kendo UI
www.componentone.com/controls
300+ Controls For Mobile, Web & Desktop.
https://www.infragistics.com/products/aspnet
Infragistics Ultimate UI for ASP.NET includes over 60 controls to help you create high-performing, full-featured enterprise apps that look great in any browser.
https://www.devexpress.com/
DevExpress provides best in class user interface controls for WinForms, ASP, MVC, WPF and Silverlight.
https://www.syncfusion.com/products/communitylicense
More than 800 controls and frameworks for web, desktop and mobile development.
ext.net
ASP.NET and ASP.NET MVC Controls and Components integrating the Sencha Ext JS JavaScript Library.
http://www.fineui.us
ASP.NET WebForms/MVC Components for Enterprise Apps, 50+ components with built-in AJAX support for desktop, tablets and phones. It is built based on jQuery with high performance and high quality, very popular in China.
Subscribe to:
Posts (Atom)

