*
*

Podlipensky Paul

Blog about technology and money

Share/Save/Bookmark Subscribe

http://feeds.feedburner.com/podlipensky

Translated from: Russian to English


Shadows in the third CSS

-webkit-box-shadow (the latest Webkit) and-moz-box-shadow support "internal" shadow with inset team. You can also specify multiple shadows through zyapyatuyu.

 ""

To obtain such a picture, just write the following:


1:


div.
Box
( 

2:-webkit-box-shadow:
0 3px 3px rgba 
(0,0,0,0.20),
rgba (0,0,0,0.12) 
0px 0px 10px inset;

3:-moz-box-shadow:
0 3px 3px rgba 
(0,0,0,0.20),
rgba (0,0,0,0.12) 
0px 0px 10px inset;


4:-webkit-border-radius:

10px;


5:-moz-border-radius:

10px;

6: 
border:

1px solid # fff;

7: 
padding:

6px;

8: 
width:

200px;

9: 
background:

# fff;
 view original
			
			
			
			

Profession: Programmer 4th in the ranking of the most tranquil

 ""

According to a poll conducted by Money Magazine and PayScale.com, the profession of software developer 4th in the list of most peaceful occupations. In the first place Profession Education / Training Consultant, on the second Physical Therapist, third - College Professor. As the arguments in favor of such a provision of our profession in the rating, cites the following:

1. Free schedule.

2. Ability to work izdomu.

3. Flexibility deadlines smaller subtasks.

But what is particularly nice - technical writers, admins, and even architects lose more nerve cells than mere developers.

Take care of your nerves, comrades developers and you enjoy your crisis!

view original

ExtJS: Expanding the functional

Sooner or later there comes a time when opportunities framework you enough. "Oh, how can that be, have forgotten this useful button / control / application to do ..." - Complains you. And then it comes the idea to write the missing functional itself. Precise finish. And any self-respecting framework provides mechanisms for its own expansion / changes. ExtJs was no exception.

In fact, the expansion is a class inherited from the existing library and implementing additional functional. Let us imagine that we need to realize Control, very similar in purpose and functionality of Ext.Panel, but with a slight difference - a new panel should always be square (ie the width should always be equal to its height).


1:
SquarePanel = Ext.extend (Ext.Panel, ( 

2:

/ / Set the size of the panel by default

3: width:
100, 

4: height:
100, 

5: onResize:

function
(width, height) ( 

6:

/ / If the size of our panel have been changed, with a disproportionately - to return it to square

7:

if
(width! = Height) ( 

			
			 view original
			
			
			
			

ExtJS: Events

Today I begin a series of articles devoted to the framework ExtJs. It will not be Tutorials and manuals for incremental learning library. I just want to share their experiences, so start with something horrible, namely - with the events.

With the advent of GUI and the Mouse, DOM-objects, like buttons and text fields have become by some events. For example, Click, mouseover, keyDown, and others. In fact, the event - the message, the call, generated by one part of the application (the source), which notifies the other part of the application (the receiver or subscriber) that something happened.


1:


<div

id

= "theDiv"

onclick

= "alert ( 'You clicked me ')">
Click 
me!




div>

In ExtJs DOM-elements wrapped in Ext.Element, so subscribe to the same event will look like this:

 view original
			
			
			
			

America

They announced boarding. A few minutes later the plane Kiev-New York landed at the airport JFK. Most of our aircraft. We are all strangers. But we are united by one thing - the happy faces.

So roughly, and began my journey to the States several months ago. But to write about it, I found the time just now. DSC04408

Then there was another plane, and so I was in San Francisco, California. The first impression of America was in itself a negative case - the case all the difference in mentality. I felt like an alien. But not because I was surprised by the height of skyscrapers, or clean the streets ... Americans - that's what surprised me from the first minute. Banal smile, many times so it is not enough, but when you smile a few hundred people almost simultaneously, anywhere on Broadway or the 5th, 7th, and any other avenues. Really unpleasant. Do not know what to do in response. The same smile? I can not smile during the day. We - the Soviet people (yes, I was born in the USSR!) - Developed the wrong muscles of the face. I tried. By evening smile sticks, face perekosobochivaet, the smile turns deadly wound nnogo rights.

Ocean. The next thing that made a strong impression on me. At the weekend I got to the ocean. On the occasion of the month of July, no one bathed, only amused a few surfers in their respective costumes. And I popularly explained that all along the Pacific coast of North America is a cold current, so the water temperature does not rise above 18-23 C. The only people who are not embarrassed by such a low temperature of the water, were - children. They swam and behaved as well as we, on the beaches of the Crimea - something dug, looked for something to surf somewhere and the water buckets were built unimaginable structure of the sand. P7040021

Americana said: "America has made the car." This is understandable. Most of the life they spend in cars. Machines are good, no words, but not less good roads on which these vehicles travel. Concrete slabs, stacked in a butt joint, almost without cracks. Some sections of roads - paid (including bridges). What is a toll road? This is the shortest way to your destination, with excellent high-speed mode and bandwidth (due to the quality of the coating). Corks have, but with no ...

view original

Do you think you know JavaScript

You bearded web developer and you think you have seen all kinds of miracles in the JavaScript-code? Hmm, then what have these puzzles for you.

1. + + Math.PI
2. (0.1 + 0.2) + 0.3 == 0.1 + (0.2 + 0.3)
3. typeof NaN
4. typeof typeof undefined
5. a = (null: null); typeof a.null;
6. a = "5"; b = "2"; c = a * b;
7. a = "5"; b = 2; c = a + + + b;
8. isNaN (1/null)
9. (16). ToString (16)
10. 016 * 2
11. ~ null
12. "ab c". match (/ b w b /)

Waiting for your options in the comments (please do not fast on ten identical comments, it is still earlier than I promoderyu them they will not appear). Until companies, I'll get tomorrow, so your comments, too, will be back tomorrow, and along with an update to this post - in the form of answers and explanations for decisions (yes, I accompanied them with your comments, so at first think, then write!)

Answers and solutions:

1. 4.141592653589793

With this hope is understandable, in school all went .... I know some embarrassing, that sort of Pi must be a constant, but I hasten to disappoint you - in dzhavaskripte constants bad, but rather they are not in the sense in which we see them, say, C #.

2. false

The same answer given and Java developers, because as Java and JavaScript using IEEE 754 floating point numbers. More information about operations with floating point numbers can be found tutanki.

3. "number"

Logical explanation that I have not found, the only thing that I can advise is try to use the isNaN instead of typeof SomePotentialNumber, in order to avoid mishaps.

4. "string"

Everything is simple - the first typeof operator returns the type of a variable as a string, hence the second statement should return the result type of the first operator, ie string.

5. "object"

We assigned a variable, an object with a field "null", whose value is null, and this, in turn, albeit specific, but the object. In other words, we here have a.null === null.

6. 10

If the operation of multiplication, division or subtraction of one of the operators line - the interpreter tries to convert it to a number.

view original


Minimum wage

I think all already know that we have a crisis (now it seems financial), however like all. And everyone understands that nothing good to him this event will bring. And one of the "benefits" of the crisis is the minimum wage, ie the amount of money for which you do not mind to work and the boss to fire you no reason. Sounds great, right? True. For most people, well-developed sense of possessiveness, so long as it's not mine, I do not care who owns it, but as soon as it was my - fuck who it is, I will choose! And here is the deal - lower wages! I will not be distributed on the tree here is instructive comic on this subject:

 ""

view original

4 interesting online presentations for the Web Developer

1. Ajax 101 | Workshop
Author: Bill Scott | This presentation on SlideShare
Introduction to programming with Ajax. Includes XMLHttpRequest, XML, JSON, JavaScript, HTML, CSS, Dom Scripting, Event Handling with a few examples of YUI.


2. Modular CSS
Author: Russ Weakley | This presentation on Slide Share
It is available (even I realized) due to the mechanism of constructing a regular modular CSS, that allows you to hide / show some CSS rules for specific browsers, without different kinds of tricks and detours.

3. jQuery in 15 minutes
Author: Simon | This presentation on SlideShare
A small introduction to JQuery. Functions, collections, working with values and chains.

view original

Video: Layout Engine Internals

Interesting video to the theme to the previous post. If you are not aware of how the browser works - click on the gray triangle next to the fellow.

view original

Skazheni Kabani: Optimizing operations with the DOM 'th

Long been known that the operation with DOM 'th very, very cumbersome. Losses in productivity is usually visible in three cases:

  • when the script performs the manipulation of the tree of objects (creates, deletes, or revises part of the tree)
  • if the script "forces " browser to redraw (redraw) or rebuild the layout (reflow) Pages
  • and finally, in the case when the script "looking " one of the nodes in the tree of objects (if the tree is large).

The last point I have discussed in an article in its cycle Skazheni Kabani, for example, JQuery. So today we'll talk about the first two. Em ... actually I cheat, and the first paragraph is nothing but a cause of the second paragraph. Then immediately proceed to the second paragraph and try to understand in terms of the redraw and re-counting:

Redraws the Browser occurs when something has changed visually, but the page layout remains the same. For example, change the color of an element or element is visible / invisible (with visibility: [hidden, visible], because it does not affect the counting). This operation significantly affects the performance of Web applications, as well as makes the browser go on a tree of objects and determine what elements are visible and how they should be displayed.

Restructuring page layout more expensive operation. It occurs in the following cases:

  • when you first load the page. In the case of Firefox, the restructuring may occur several times, as far as resuming the page's content;
  • when you add or remove items DOM 'a. I must say, there is one exception - if you add / remove an object with absolute positioning, it may not lead to a restructuring of the markup page as well as the position and size of other elements have not changed;
  • when the style of a changed and it affects the size and position of this or other objects;
  • when you try to apply to properties that require calculations of the browser (for example, offsetWidth, clientHeight). And also in case of attempts to obtain the calculated values of CSS (using getComputedStyle () or currentStyle in IE).

Restructuring page layout looks as follows:

Mozilla.org

Wikipedia

But the restructuring of the layout of page is not Seewer ...

view original