css vertical-align

Recently I faced with a problem trying to figure out how to make div content vertically aligned to bottom. I failed. The issue is that vertical-align doesn’t work for block elements. Workaround solution is to put the div content inside table and apply vertical-align to td:

<div class="class"><table><tr><td>content</td></tr></table></div>

.class table {
height: 100%;
}
.class table tr td {
vertical-align: top;
}

Leave a Comment

FIFA manager 09 — team training

Some fifa manager players prefer to schedule long-term training conditions. I don’t, because I think that it is better to set training each Sunday depending on the current players energy and training progress.
It is very hard to keep your players fresh, with high energy level. Below are some instructions on how to succeed in it.

The first thing to do is — hire 2 good assistant managers. Of course, you should stay within your budgets. You need assistants because when you begin the game your level is low (level 1), so training all players in your group will give a zero or negative effect. Keep as less players in your own group, as possible, until you reach a manager level of at least 3.

The next thing is make all your players 100% fit. Hire fitness trainer in the beginning of the season. Schedule more fitness sessions in the first several weeks until you get 90-100 fitness points for each player in your squad.

Once you make all your players 100% fit, you can exclude fitness from all your next weeks. If any player looses fitness, you can move him to a separate group and restore fitness for him individually. There is no need to train fitness for players who are already fit.

To keep your players fresh, try not to set training sessions harder than ‘friendly’. Just don’t use fitness and keep physical training on 10%-20% level. Keep ‘Recovery’ on the second level and always have ‘no training’ on 10%-20% level so your players will not lose atmosphere.

If your tactics levels are low, focus on tactical training. But don’t make it more than 30-35% as players might lose morale. Focus on the weakest tactics if some is very low.

That’s it for now.

Leave a Comment

Fifa manager 09

Fifa Manager 09 — first experience

Bugs in Fifa Manager 09. Frankly speaking, I was disappointed by numerous bugs in first release of Fifa manager 09. I was always a total club manager fan, so I was waiting for the new game with a large hope to get the best experience I could ever have, but unfortunately there are many bugs that spoil my experience. Some are not the bugs, some are simply things that disappoint me.

1.When I played the game in beginning, there were no system errors, but since one day every time I exit the game it returns windows error saying «Application tried to access memory…» (I believe many people know what I’m talking about). I’m not sure if it relates to my own system configuration (I disabled some windows services I don’t use for better system performance), but I think that good application should detect that necessary services are disabled by default and alarm the end user.

2.The next thing that disappoints me is that the game can die. It exited during the match only two times (and I’ve played over 100), but the facts make me worried.

3.The above two bugs are the ones I don’t like and then come the ones I can ignore (but why should I do it?) In 3D match there is always only one referee. As I know the first official patch will fix it.

4.In 3d match the commentators often call the teams as «Arsenal» and «Chelsea» (it makes me think I bought a demo :)) Hopefully, it will be fixed in the first patch as well.

5.In 3d match there are sometimes a 1-2 play between goalkeepers when one goalkeeper kicks the ball to another and vice-versa.

6.Sometimes players get into throw-in trap in 3d match, when they cannot get the ball back into game for several times (sometimes more than 8 throw-ins in a row)

7.Strikers don’t try to shoot in one touch even if they are just in front of the goal and the goalkeeper is already played out.

8.There is music played during international matches. It is good, but not always in time. For example, I don’t understand why music plays when my players are substituted (even if I’m losing in away match)

BTW, I bought the license version, so please don’t think that all of the bugs I face with are caused by pirated version.

There are many things in Fifa Manager 09 that make me pleased as well. Here is what I like:

1.You can make substitutions without any pause in 3d match.

2.More talent stars involved. There are now silver and gold stars (1 gold star equals 2 silver stars), so there are 10 talent levels. It makes the game more interesting as it is much more difficult to find a max-talent prospect.

3.The tactics screen became better. It’s hard to explain, you’d better see it. It is now more convenient to manage individual orders. You can assign it to a certain position or to a certain player.

And finally, I’d like to warn the pirated users that you will be fired from your club every time in the end of the season. It’s better to spend some money for license (of course, if you can leave with the bugs I mentioned above)

Leave a Comment

how to remove padding in IE

Inexperienced XHTML integrator might get stuck with an IE problem when there is space appeared without any reasons. For example, it can happen if you create a small div block with little height:

<div style="height: 2px;background-color: green;">

It will not be 2px in IE. It will be more. Try this solution:

<div style="height: 2px;font-size:2px;line-height:1px;background-color: green;">

Leave a Comment

How to learn php

Tips for php beginner

I learned php basics in 2 weeks. More than 2 years passed since that time and I’m still learning php. So my first tip is «Don’t try to learn everything in php. You don’t need it to be sucessful php programmer.» Here is a short plan on how to start learning php:

Day 0. Yes, php counting starts from zero. You should always remember it. Use day 0 to learn HTML basics and maybe CSS basics if you have enough time. You cannot make websites in php unless you know HTML.

Day 1. Learn some basics about how php works. You should understand that php is an interpreted language. It can be run under various enviroments. The essential thing is that the server should have php libraries installed. If you don’t know how server works, you should learn some basics about it as well (client-server model) Read some info about basic concept of HTTP protocol. For better understanding, I recommend you to use Firefox with LiveHTTP Headers addon installed. Open some of your favorite pages and take a look at the headers your browser sends with requests and the headers returned by the server.

Day 2. Open PHP manual. Read through the first chapters about constants, php syntax, variables, etc. If you don’t have any experience in programming, you may need to have somebody explain all these things. Of course, you can read some books about it, but it’s better to have a tutor who will save your time and possibly some money.

Day 3. Now you should start programming even if you don’t know how to do it. The issue is that if you don’t start doing something quickly, you will lose any interest in php. Find some simple scripts and examples written by other people and try modifying it. You will understand php much faster. Learn how to read scripts written by other people. Just try to translate php code into human language. It will help you in the future to understand the code by other people and to make necessary changes.
When you find any function you don’t know about, don’t be lazy — open php manual and find the function, learn what it does and try to use it in a different way.

Day 4. If you were not lazy in the previous day, you know some php functions. Try to write something by yourself. Think about some script. Not very complex, but useful. For example, a guestbook script (no need for complex validations, smilies, etc.), just a simple functional.

Day 5 and next. Every day you should learn anything useful. Work on new scripts you can imagine. Even if you think you cannot do it — try and use php manual to find necessary functions. You will extend your knowledge and experience step-by-step. And don’t work only on php knowledge, you should extend your experience in related areas as well: continue learning XHTML, CSS, JavaScript, etc.
When you feel confident, try to write something not for yourself. Maybe you can even try some freelance work. The issue is that other people may have some requirements that you couldn’t think about.

Take some tests and certifications from time to time to check your current knowledge level. For example, brainbench tests.

Leave a Comment

minimal font size supported by browsers

Do you know that the minimal font-size that can be set in CSS and will be supported by Opera is 10px? I mean that font-size: 8px;,font-size: 9px; and font-size: 10px; will look in Opera the same. Not a good thing for a good browser I think. Firefox supports even 1px (of course, you’ll read nothing, but it supports that!). Internet Explorer also supports font-size of 1px as well as Apple Safari does. Google Chrome does too. So here is a table that accumulates these data. If I have experience with new browsers, I’ll extend the table.

Browser Supported minimal font-size
Opera 10px
Apple Safari 1px
Mozilla Firefox 1px
Internet Explorer 1px
Google Chrome 1px

Maybe Opera’s purpose was just to make the life of black hat search engine optimizers more difficult?

Leave a Comment

security issues with flash applications (swf)

Recently I faced with a problem: swf application didn’t work properly. I’ve done troubleshooting and found out that there are some security specifics in flash that block cross site scripting. A cool feature when you know about it and simply annoying when you don’t know anything about it.

So here are some tips that might help anybody not to get stuck with the same problem.

1. If your SWF file loads some files from another domain, you should add a special XML file to your domain root:

crossdomain.xml

It should contain the code similar to

<?xml version="1.0"?>
   <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <allow-access-from domain="domain1.com" />
   <allow-access-from domain="domain2.com" />
   </cross-domain-policy>

As you might caught the idea, it should list the domains to files from which your action script should have access to.

2. If your SWF file links something to external websites, you may face with a problem when your flash buttons don’t work. You should use special flash parameter to resolve the issue:

allowscriptaccess

set it to “always”.

Leave a Comment

My first post in this blog

Hello! My name is Denis Vlasov and this is my first blog. I decided to start it because I have sometimes something to tell but don’t have appropriate audience close to me at the moment. Sometimes I want to write something for myself, sometimes I want to share my experience with others to help others avoid mistakes I did or to use solutions I created or found. And when I was a child, I had a dream to become a writer. Not a computer writer, a book writer. I couldn’t even imagine that I will be a professional programmer. Ha-ha! It’s the time when dream comes true.

Leave a Comment