Tuesday 21 October 2014

Create new user in MySQL and give it full access to one database


GRANT ALL PRIVILEGES ON dbTest.* To 'user'@'hostname' IDENTIFIED BY 'password';
 
If you are running the code/site accessing MySQL on the same machine, hostname would be localhost.

Now, the break down.
  1. GRANT - This is the command used to create users and grant rights to databases, tables, etc.
  2. ALL PRIVILEGES - This tells it the user will have all standard privileges. This does not include the privilege to use the GRANT command however.
  3. dbtest.* - This instructions MySQL to apply these rights for the use onto the full dbtest database. You can replace the * with specific table names or store routines if you wish.
  4. TO 'user'@'hostname' - 'user' is the of the user account you are creating. Note: You must have the single quotes in there. 'hostname' tells MySQL what hosts the user can connect from. If you only want it from the same machine, use localhost
  5. IDENTIFIED BY 'password' - As you would have guessed, this sets the password for that user.

Wednesday 15 October 2014

A Car Hit a Curb

Mechanics hear the car hit a curb story from drivers often. It happens to even the best drivers. Although more common in the winter months when drivers are dealing with ice and snow the reality is it can happen anytime.
The questions will be do you have front end damage and what to do about it. This article will talk about how to evaluate the situation and determine the best course of action for your scenario.
Not all curb hits are created equal. Two things to consider would be the speed at which the vehicle was traveling when it hit the curb and the second thing is the overall height of the curb itself. As an example if you were traveling 50 mph and hit a curb that was higher than six inches chances are there is extensive front end damage.
On the other hand if you hit a 3 inch curb traveling below 5 mph then chances are you have no damage at all depending on the vehicle construction of course. As an opinionated quick rule of thumb the cheaper the automobile the more damage occurs.
Seriously consider the impact event when determining what to do next. When in doubt take your vehicle to a trusted mechanic for inspection of the vehicle. There's a few things you can do to get an idea of what the auto repair shop might find before you go.

Front End Damage After a Curb Hit

I start by inspecting the wheel and tire that made contact with the curb, usually the right front tire in the United States. When it comes to tire construction the tread is stronger than the side wall and much thicker.
Often you will see chunks taken out of the side wall of the tire on top of any wheel damage, usually found on the edge out towards the sealing bead. This kind of damage should be repaired or at least inspected immediately. If the wheel and tire look okay or only have minor damage such as scuffs the next step would be to drive the car.

On this diagnostic road-test we can make an attempt at determining if the wheel alignment was affected in any way by the impact event.
Just because a car hit a curb does not mean that it automatically needs a front wheel alignment. Although the guy who owns an alignment rack might tell you a different story.
In fact after the alignment is set at the Factory the adjustments are locked down and are designed to hold in place under harsh road conditions such as slamming potholes. If the car hit a curb hard enough it is possible however for the alignment to be affected. There are things that you can look for on the road test after the curb contact.
I recommend going to an empty parking lot to do so then driving the car slowly in a straight line and compare this with the position of the steering wheel. If there has been serious damage to the front end the steering wheel will probably no longer be in the same straight ahead position you remembered prior to the accident.
Another sign that may indicate a bent wheel would be a back-and-forth wobbling of the steering wheel at low speeds. At higher speeds this might turn into what feels like a vibration. If the car slams the curb real hard chances are that front end parts will be bent.
This can cause not only the steering wheel to be off-center but also a hard pulling condition towards the side of the impact. If a car hit a curb with the right front wheel and bent the control arm back this would cause a negative caster setting and the automobile will pull to the right side.

Common Problems After a Car Hits a Curb
I should mention that in most cases a mechanic can put a vehicle up in the air and inspect the front end and the attaching parts to detect any damage. There are situations where the only way to detect the damage is to set the vehicle up on an alignment rack and take measurements of the alignment settings.
In some cases car insurance companies may require a print out of these readings after a car hits a curb to verify repairs are needed. When I was turning a wrench in New Jersey we saw quite a lot of these curb hit situations during the winter months.

Back in the old days when a car hit a curb we would find damage to the ball joint area and sometimes the tie rod ends (weakest link). But with modern sub-frame construction it is really more common to find bent control arms. You know the old saying, they don't make them like they use to.

Saturday 11 October 2014

汽车为什么要预热

  首先我们要对汽车做个简单的了解,我们都知道发动机的零件都是金属制造的,金属有个物理特性就是“热胀冷缩”,而发动机是在热态下工作的,所以发动机所有运转的零件之间都必须预留间隙,这个间隙就是留给零件膨胀的空间,(例如:曲轴与轴瓦之间,缸套与活塞之间等),这个间隙也是润滑油流动的空间。如果没有间隙发动机就会“受热抱死”。

  我们都知道任何设备的运转零件之间间隙越大,磨损越快,间隙使机件游动产生敲击,所以磨损加剧,所以要使设备寿命长,就要控制早期磨损,如果磨损间隙越来越大,最终就没法控制了。所以汽车的70%以上的磨损发生在冷启动阶段就是这个道理。换言之控制了冷启动磨损就等于延长了发动机的寿命。

  早上汽车启动后,噪音会很大,原因之一就是机油没有完全到达摩擦表面,第二就是间隙大零件敲击,第三是怠速转速过高。

  因为气温低会使启动困难,所以发动机电脑会根据气温调整怠速,气温越低怠速越高。

  此时混合气浓度也较高,由于氧传感器温度低,不能马上工作,所以发动机此时为开环工作状态,废气排放状态最差(冷启动后尾气味道很大),发动机此时为最恶劣的状态。

  冷启动的恶劣情况有以下几点:

  1.发动机机件之间间隙大,易发生敲击磨损。

  2.润滑油未及时到达零件之间,发生干摩擦现象。

  3.怠速较高,使敲击频率增高,使磨损加剧。

  4.混合气较浓,进气管,气门背面易产生积碳。

  5.发动机开环工作,废气排放恶化,缩短三元催化器寿命。

  那么怎样才能控制这些恶劣现象呢?怎样做才是正确的呢?

  1.使用低温粘度低的润滑油,例如5W30或5W40的润滑油,这种机油会迅速进入摩擦表面,将机件隔离,由于进入较快,就缩短了干摩擦的时间。

  2.使用正厂的机油滤清器,滤清器的透过流量决定了机油进入摩擦表面的速度,劣质的机油滤清器透过性较差,低温时机油粘度高,会延长流动的速度。优质滤清器会使机油快速通过,迅速进入摩擦表面,就快速控制了磨损。

  3.将预热过程分为两段:怠速预热+行走预热。怠速的发动机转速很高,混合气很浓,我们无法控制,但可以控制怠速预热时间,怠速预热时间是给润滑油充分润滑的时间,其后是行走预热时间,行走预热可以使发动机快速升温,进入闭环工作状态,快速补偿间隙,待水温达到正常,发动机才进入正常的工作状态,行走预热过程也宣告结束。

  4.控制怠速预热时间,请记住这个公式:以一分钟(60秒)为基数加减环境气温。

  气温在零度以上:用60减去气温,例如:气温30℃,60-30=30秒(预热时间)

  气温在零度以下:用60加上气温,例如:气温-30℃,60+30=90秒(预热时间)

  顺便提醒一下:水温未达到正常值,在行走预热阶段,发动机转速控制在3000转以下,将会大大延长发动机的寿命。地下停车场热车,千万不能有一点水温就走。因为从地下车库出来,基本上都要上一个较陡的斜坡,这时发动机还未达到正常工作的温度,硬着头皮上只能让车子磨损更大。


所以对于汽车发动立马要上陡坡的情况,建议 夏天热车3分钟 冬天热车5分钟。 

Tuesday 7 October 2014

Highlander SE vs. Land Cruiser

Highlander SE vs. Land Cruiser

2011 Toyota Land Cruiser
9.7

starting from

$69,730

Reasons to buy the Toyota Land Cruiser

Badge
Quite powerful
381 HP @ 5,600 RPM
Badge
Good ground clearance for rough terrain
8.9"
Badge
Rear air conditioning
Standard
Badge
Passenger power seats
Standard
2011 Toyota Highlander SE
9.5

starting from

$36,110

Reasons to buy the Toyota Highlander SE

Badge
Good cargo space
95.4 ft3
Badge
Very inexpensive
$36,110
Badge
Better suspension
Independent
Badge
Average city fuel efficiency
17 mpg


Entertainment System 7.6 vs 10.0
2011 Toyota Land Cruiser Winner: Land Cruiser
[details]

  • The Land Cruiser has 8 more speakers, providing a better entertainment experience, 14 vs 6
  • The Land Cruiser 's subwoofer accurately reproduces deep bass notes in music
  • It'll cost you to get an entertainment system on the Land Cruiser ; but it's not available at all on the Highlander SE


Cost 10.0 vs 8.2
2011 Toyota Highlander SE Winner: Highlander SE
[details]

  • The best price we've seen is $33,620 cheaper (around 50% less), $36,110 vs $69,730
  • Gets more than 30% more miles per gallon in the city, 17 mpg vs 13 mpg


Safety Features 9.4 vs 10.0
2011 Toyota Land Cruiser Winner: Land Cruiser
[details]

  • The Land Cruiser has 1 more airbag (including Rear Side), 7 vs 6


Performance 9.8 vs 10.0
2011 Toyota Land Cruiser Winner: Land Cruiser
[details]

  • More than 40% more powerful, 381 HP @ 5,600 RPM vs 270 HP @ 6,200 RPM
  • The Land Cruiser has 1 more gear, which can improve performance, 6 vs 5
  • Almost the same, 15.1 lb/hp vs 15.8 lb/hp


Practicality 10.0 vs 9.8
2011 Toyota Highlander SE Winner: Highlander SE
[details]

  • Room for around 20% more stuff, 95.4 ft3 vs 81.7 ft3
  • Almost the same, 59.3 ft3 vs 58.0 ft3
  • The Highlander SE can carry more than 10% more weight, 1734 lb vs 1510 lb


Luxury Features 10.0 vs 10.0


Too close to call
[details]

  • Both come standard with sun roofs
  • Both come standard with leather interiors
  • Both have power seats


Crash Test Ratings 10.0 vs -


Missing information
[details]


Road Tests 10.0 vs -


Missing information
[details]

Overall 9.5 vs 9.7

Entertainment System


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
Number of speakers 6 vs 14 The Land Cruiser has an extraordinary amount of speakers, but the Highlander SE has very few
Help
Has speed sensitive volume Yes vs No The Highlander SE's stereo cranks the volume to compensate for road noise, but the Land Cruiser does not
Help
CD player Standard vs Standard CD player comes standard
Help
premium radio Optional vs Standard Have your pick of music from around the world with the Land Cruiser 's satellite radio; in the Highlander SE, too, but it'll cost
Help
Has auxiliary audio input Yes vs Yes Both have an audio-in jack so you can plug in your own MP3 player to the stereo
Help
Has subwoofer No vs Yes The Land Cruiser has a subwoofer to accurately produce deep bass frequencies in music
Help
entertainment system Not Available vs Optional It'll cost you to get an entertainment system on the Land Cruiser ; but it's not available at all on the Highlander SE

Cost


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
MSRP $36,110 vs $69,730 The Highlander SE has a reasonable price, while the Land Cruiser is very expensive
Help
In-city gas mileage 17 mpg vs 13 mpg The Highlander SE has OK city mileage, while the Land Cruiser is very inefficient
Help
basic warranty miles 36,000 mile vs 36,000 mile Shorter basic warranty
Help
basic warranty years 3 year vs 3 year Shorter-lasting basic warranty

Safety Features


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
antilock brakes Standard vs Standard Both come standard with ABS brakes
Help
Stability control system Yes vs Yes Both have electronic stability control
Help
Airbags 6 vs 7 Both have good airbag coverage
Help
Rear brakes Disc vs Disc Both have the usual brakes for this class of vehicle
Help
child door locks Standard vs Standard Child door locks come standard
Help
Roadside assistance system None vs SafetyConnect

Performance


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
Horsepower 270 HP @ 6,200 RPM vs 381 HP @ 5,600 RPM The Land Cruiser is very powerful, while the Highlander SE is only of average power
Help
Number of gears 5 vs 6 The Land Cruiser has more gears and the Highlander SE is OK, too
Help
Transmission Semi-automatic transmission vs Automatic transmission The Highlander SE's semi-automatic transmission is rare for this class of vehicle
Help
paddle shifters Not Available vs Not Available Neither offers paddle shifters
Help
Air compressor None vs None Neither has an air compressor for increased power output
Help
Power-to-weight ratio 15.8 lb/hp vs 15.1 lb/hp Both provide sporty handling
Help
Drivetrain type four-wheel drive vs four-wheel drive Both will do well in poor weather or off-road conditions
Help
Curb-to-curb turning radius 38.7 ft vs 38.7 ft Both cars corner comparably to other vehicles in their class

Practicality


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
Passengers 7 vs 8 People mover
Help
Cargo space 95.4 ft3 vs 81.7 ft3 The Highlander SE has lots of cargo room and the Land Cruiser is pretty good
Help
front seats 59.3 ft3 vs 58.0 ft3 Both average size front seats
Help
Base payload capacity 1734 lb vs 1510 lb Average towing capacity
Help
folding rear seats Standard vs Standard Both have a rear seat that folds down for extra storage space
Help
power outlets Standard vs Standard Both have power outlets
Help
navigation system Optional vs Optional Both offer an upgrade to a navigation system
Help
Cupholders 10 vs 12 Both have a good number of cupholders but the Land Cruiser is particularly good
Help
front air conditioning Standard vs Standard A/C for hot summer days comes standard

Luxury Features


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
moon roof Standard vs Standard Both come standard with sun roofs
Help
power seats Standard vs Standard Both have power seats
Help
keyless entry Standard vs Standard Both have keyless entry
Help
leather Standard vs Standard Both come standard with leather interiors

Crash Test Ratings


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
Rollover resistance 4 stars vs Unknown
Help
Front driver crash test 4 stars vs Unknown
Help
Driver side crash test 5 stars vs Unknown

Road Tests


Toyota
Highlander SE

2011 Toyota Highlander SE

2011 Toyota Land Cruiser
Toyota
Land Cruiser
Help
0-60 mph 8.0 seconds vs 7.3 seconds The Land Cruiser has a good 0-60 time, but the Highlander SE is just average
Help
Braking distance at 60mph 139 ft vs 140 ft Both have average braking ability for this class of vehicle
Help
1/4 mile 16.4 s @ 87 mph vs 15.7 s @ 92 mph The Land Cruiser 's 1/4 mile time is zippy, but the Highlander SE's is just OK
Help
Lateral acceleration 0.74 g vs Unknown
Help
Top speed 114 mph vs Unknown