Javascript does not need a Template for Connection Classes.
One Class fits all!
Items.js:
C# class template
Template for a business class in C#.
The example is the "Party" from the "Party-Person-Organization" pattern.
The example is the "Party" from the "Party-Person-Organization" pattern.
CORS Cross Origin Resource Sharing Javascript
For many years we were stuck with JSONP if we needed to make a cross domain query.
JSONP was OK except for one major point: The amount of data to send where limited by max URL length and then again it had to be URI encoded.
Now we have a solution supported by all browsers except IE7 & Opera (for some reason).
JSONP was OK except for one major point: The amount of data to send where limited by max URL length and then again it had to be URI encoded.
Now we have a solution supported by all browsers except IE7 & Opera (for some reason).
Google Translate using JSONP
We have a web page.
In this page there is a set of Fields (input-text/ textarea) with Greek (or whatever google supports) text content.
There are some corresponding Fields where we like to have the english translation.
First get a key from Google API console
You have to remember that max URL length is 2038 characters for IE, that gives less than 1K for the string to translate. You can get more (a lot) from chrome, firefox, opera (>64K).
Google says that you can to it with POST instead of GET, but that is another post.
In this page there is a set of Fields (input-text/ textarea) with Greek (or whatever google supports) text content.
There are some corresponding Fields where we like to have the english translation.
First get a key from Google API console
You have to remember that max URL length is 2038 characters for IE, that gives less than 1K for the string to translate. You can get more (a lot) from chrome, firefox, opera (>64K).
Google says that you can to it with POST instead of GET, but that is another post.
Special Characters for HTML
Special characters with their HTML code like:
½ ¼ ¾ © ® ™ ℗
Unicode characters that have not HTML codes but can be used in HTML Pages like: ☎ ✉ ✔ ☒ ✖
HTML5 Sticky Footer
Table layouts are fine for the nonconformists among us.
But there are cases we realy need a CSS layout. Like when we have to rearrange the layout depending on the window size of the browser, to accommodate everything from mobile browsers to extra wide monitors.
Here is a Sticky Footer CSS layout.
But there are cases we realy need a CSS layout. Like when we have to rearrange the layout depending on the window size of the browser, to accommodate everything from mobile browsers to extra wide monitors.
Here is a Sticky Footer CSS layout.
Protect post from copy paste
Friends keep asking me how to protect their blog posts from being copied.
As you can see I have no protection for my blogs because I think that the effort is futile. I'v seen posts of mine plainly copied in other blogs. In some cases they give a reference to my blog, and for those I am really happy.
In other cases they have no reference even though they just copied and pasted without any work of their own.
Still, my friends want to restrict copy-paste, so I prepared a list of the available solutions:
As you can see I have no protection for my blogs because I think that the effort is futile. I'v seen posts of mine plainly copied in other blogs. In some cases they give a reference to my blog, and for those I am really happy.
In other cases they have no reference even though they just copied and pasted without any work of their own.
Still, my friends want to restrict copy-paste, so I prepared a list of the available solutions:
Database Version Control
There are two types of projects I am involved in these days.
Usually when a database is upgraded, a new version of the application is issued. If only one application is using the database then application-database sync is easy.
When multiple applications are using the same database then this problem is quite difficult to solve.
This is my solution to database versioning problem:
- Custom enterprise applications where we design the database and manage it.
- Web applications, that we host, where each customer has his own copy of the database.
- Developer databases
- Test database (both internal and customer)
- Production database
Usually when a database is upgraded, a new version of the application is issued. If only one application is using the database then application-database sync is easy.
When multiple applications are using the same database then this problem is quite difficult to solve.
This is my solution to database versioning problem:
SVG Javascript with events
I need a widget displaying the months of the year. I implemented using SVG and not by Canvas because I needed the capability of SVG to assign events to any element of the picture.
- The user should be able to select a month by clicking on it
- The widget should give an event for every month change
- The user should be able to deselect a month by clicking on it or at the center of the wheel.
Subscribe to:
Posts (Atom)