Brief introduction cubic-bezierAlso known as three times Bezier, a curve is depicted with four dots (P0,P1,P2,P3).P0 defaults to (0,0), P3 defaults to (). So we just have to focus on P1,P2.In the CSS3 animation, it is used to represent the speed curve.about the three-time Bell curve:Formula:;Want to know three times Bell curve, self Baidu.don't want to know can be directly adjusted on this website: http://www.roblaplaca.com/examples/bezierBuilder/# get parameters. The website is slow to ente
", as the storage path//here with for (int i=1;i Five, Tool class Package Com.geenk.web.velocity_engine;import Org.apache.velocity.template;import Org.apache.velocity.velocitycontext;import Org.apache.velocity.app.velocity;import Org.slf4j.Logger;import Org.slf4j.loggerfactory;import Java.io.bufferedwriter;import Java.io.file;import Java.io.FileOutputStream;import Java.io.outputstreamwriter;import java.util.properties;/** * @author duchong * @since 2018-04-28 18:35 **/public class Ge nerateh
Of course, looking for cases of the big people generally want to go directly to a case on the line, not a lot of time to read a lot of text, so not long-winded.
One of course first to download velocity required jar bag, everywhere there are downloads of course I'm going to the official download, after all, the official things are generally more formal
To say the Apache official, think of just start out to work in the basic daily in the official Apac
(Do not use this template, the latest version of spring boot is not supported.) Use Freemarker bar: http://blog.csdn.net/clementad/article/details/51942629)
In a few simple steps, use the velocity template to generate text in spring boot:
1. Introduction of Dependency
2. Create templates directory in Resources
3. Create a. VM template file Welcome.vm:
4, use the template, test cases:
@Autowired
velocityengine velocityengine;
parsing and including corresponding resource files# Parse ("me. VM"), which shares the corresponding context with the main file # Stop: Used to stop parsing and return results. It is mainly used for debugging.6. Velocity # macro is quite powerful.# Macro, similar to macro definition, is used to customize the corresponding tag.A macro is defined as follows, which is used to output the list in the table.# Macro (tablerows $ color $ somelist)# Foreach (
Velocity. Exception. parseerrorexception: encountered "
Was expecting one:
"("..."##"..."\\\\"..."\\"..."*#"..."*#"..."{"..."}"...
After checking for more than an hour, I found that there is a # if not used # End closed in the VM file.
The problem is solved.
Velocity foreach usage, velocityforeach# Set ($ result =$ {list })# Set ($ I = 0)# Foreach ($ onlineData in $ {onlineDataList })$ Result. get ($ I)# Set ($ I = $ I + 1)# Foreach ($ hour in [0 .. 23])# End
# Foreach ($ online in $ onlineData)
# End
# End
Note: onlineDataList is a list defined in the background. It accesses multiple onlineData and onlineData is also a list.
1. Path Problem When Using velocityengine. gettemplate (filepath) (The resource does not exist)
Note: The relative path must be used to set the template location. The path is relative to the "file. Resource. loader. Path" attribute of velocityengine. You can set this attribute as follows.
Velocityengine VE = new velocityengine ();
Ve. setproperty ("file. Resource. loader. Path", "E: // resource // Java // tpsno02 // res // template // test ");
Ve. INIT ();
2.
1. because it is the latest eclipse, the plug-in prior to installation needs to install the support plug-in Eclipse 2.0 Style Plugin Help, Install New software->add follow the interface input Click OK, wait a minute.Only tick the selection of the red box, because I have installed, so the icon before the text is white. The color is not installed.Click on the next button, eclipse will automatically find the required dependencies, after the check will pop up the page to agree to the Agreement, c
The standard notation for velocity calls Java code is this
$! {Classname.staticmethod ()} or $! {Objectname.instancemethod ()}
Like what:
$! {Salehelper.iswltuser ($info. Getcateid (), $info. GetUserID ())}
This code, which belongs to the type of the object invocation instance method, needs to be noted for two places:
1, the syntax format must be correct, otherwise call not to the back-end Java method, and not to debug to the
2, the parameter ty
Recently, in the project, you need to add and subtract operations in the VM page, such as
#set ($balance =$!{ sumamont}+$! {surcharge}-$! {Depositamount})Always error, print on the page is
100+50-120
In the tangle for a long time after finally resolved, recorded here, one is to remind themselves, the second is for everyone to meet this error not like me, tangled too long.
The symbols on the page in velocity automatically call the ToString metho
Method 1: Valid for null and FALSE
#if (! $car. Fuel)Method 2: null and "" are valid#if ("$!car.fuel" = = "")If you judge the character blank:#if ("$car. Fuel" = = "")Combination Method 1 and 2, the judging field can only be null#if ((! $car. Fuel) ("$!car.fuel" = = ""))Method 4: Use tool detection, see: Http://wiki.apache.org/velocity/NullTool#if ($null. IsNull ($car. Fuel))Method 5: Use your own method to detect#if ($car. Fuelempty)The car class i
There are several workarounds for Velocity's $ vs. jquery $ conflict:
1. Use jquery instead of $.
such as: Jquery.ajax ();
Cons: Not suitable for expansion, once replaced with a third-party library, it is troublesome
2, use Jquery.noconflict.
such as: var j = jquery.noconflict (); J.ajax ();
Cons: When using jquery's related plugins, it will invalidate the plugin.
3. The conflict method in wrap jquery.
If $.ajax () conflicts in velocity, it is red
Learn the things to write here, forget to come back at any time to check, good memory than bad blog, haha, good nonsense not to say, this article mainly introduces the integration of SPRINGMVC and MyBatis
Note: SPRINGMVC version 3.1.2. MyBatis version 3.2.2 Database is Oracle First look at the configuration of Spring.xml
Very simple, just configure the @service support and database connection resource files, of course you can also add some other need to initialize the resource files;
2. Confi
Next http://blog.csdn.net/qust008/article/details/9623513
This configuration still needs to import the package, the new imported package is commons-beanutils-1.7.0, sitemesh-2.4.2, velocity-tools-View-2.0
Create a general template first. All VMS returned from the background are embedded in this template.
Under webcontent, create the folder decorators and create a file template. VM under decorators. The content is as follows:
Create the file decorato
, but we can also check whether it is successful:1, Uname-rEnter the command to see if there is a kernel 4.9.0 kernel, which means replacing the kernel.2, Sysctl Net.ipv4.tcp_available_congestion_controlEnter the command and see if there is a return "Net.ipv4.tcp_available_congestion_control = Bbr cubic Reno"3, Lsmod | grep BBREnter the command to see the BBR WordHere we are successful in installation.Iv. speed record after installation of BBRAfter the successful installation BBR, we are looking
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.