Time is the best refrigerant in a week, you'll find this feature is not so important.

Source: Internet
Author: User

The input value of the animation needs to be clearly known, but this does not mean that you need to know the exact attribute value of the animation at each moment, because this is an interpolation animation, animated only need to know the initial and end values, it will all the intermediate values dynamically calculated to apply to the animation, which is somewhat similar to CSS3 in the Keyframe animation. It provides spring, decay, timing three animation methods, in fact, this is three different ways of difference, specify the same initial value and end value, they will be different functions to calculate the median and apply to the animation, the final output is three different animation.
Observer mode is a software design will be applied to a model, no matter what kind of prophecy, because I am an Android ape, so this article only discusses the viewer mode of Android, in order to elaborate this model, this article is divided into three parts: concept, simple implementation, The specific implementation of the ListView in Android. After reading these three parts, I believe you can easily write the observer pattern in your own software.

If you get back time is not long, do it. Because this time pm mind is hot, the heart is in a state of fanaticism, you may ask how to say but he. Most of what he said was illogical, and the data was largely based on fantasy.

You'd better try to calm him down. For example, if we're going to talk about this for a week, you're optimizing 2-3 versions of the prototype.
1) using the STR function

As one of the methods, it is not the best of the three methods, because the STR function produces a space to complete the predetermined total length and to complete a predetermined decimal point length of 0. If you want the original data to be true, you need to use LTrim to clear the head space and substring+patindex to clear the tail of the 0-digit string. Need some extra work.

DECLARE @FL as Floatdeclare @RL as Realdeclare @DC as DECIMAL ( -,2) SET @FL=1234567.89SET @RL=1234567.89SET @DC=1234567.89SELECT STR (@FL, -,8) as Pure_by_str, REVERSE (SUBSTRING (REVERSE (LTRIM (STR (@FL, -,8)), PATINDEX ('%[1-9]%', REVERSE (LTRIM (STR (@FL, -,8)), LEN (REVERSE (LTRIM (STR (@FL, -,8)))-patindex ('%[1-9]%', REVERSE (LTRIM (STR (@FL, -,8))))+1) as Float_by_str, REVERSE (SUBSTRING (REVERSE (LTRIM (STR (@RL, -,8)), PATINDEX ('%[1-9]%', REVERSE (LTRIM (STR (@RL, -,8)), LEN (REVERSE (LTRIM (STR (@RL, -,8)))-patindex ('%[1-9]%', REVERSE (LTRIM (STR (@RL, -,8))))+1)) as Real_by_str

Results

Pure_by_str              Float_by_str             real_by_str------------------------------------------------------------------------        1234567.89000000 1234567.89               1234567.875 (1 row (s) affected)

Time is the best refrigerant in a week, you'll find this feature is not so important.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.