zoukankan      html  css  js  c++  java
  • 前端基础

    写在前面:

      做后台的也得明白点前端的啊,不然的话,会死得很惨。

    篇一:html

    篇二:javascript

    篇三:velocity

    http://blog.sina.com.cn/s/blog_4b01279a0100hc6o.html

      1.判断对象是否为空。

        总统上说,判断是否为null有下面几种方法:

        1. #if (! $foo) 判断$foo为空,判断非空为 #if ($foo)

        2. 使用 #ifnull() 或 #ifnotnull()

        #ifnull ($foo)

        要使用这个特性必须在velocity.properties文件中加入:

    userdirective = org.apache.velocity.tools.generic.directive.Ifnull
    userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

        3. 使用null工具判断

        #if($null.isNull($foo))

        注意这种方式特别有用,尤其你在需要这个判断作为一个判断字句时,比如我要你判断一个集合为null或为空时只能使用这种方式了:

        $if ($null.isNull($mycoll) || $mycoll.size()==0)

    http://blog.csdn.net/happy_cheng/article/details/43769725

    (1)判断null

    #if( $name  ==  null)

     something code

    #end

    (2)判断null或者false

    #if( !$name)

     something code

    #end

    (3)判断null或者空字符串

    #if( "$!name" == "")

     something code

    #end

    篇四:未完待续。。。

  • 相关阅读:
    元组,字典
    python字符串
    tensorflow 学习笔记
    tensorflow example1
    python第二章(2)列表
    python3.5学习第二章(1)标准库,bytes
    类加载过程
    数据值与地址值
    类的初始化与实例化顺序
    SpringCloudBus
  • 原文地址:https://www.cnblogs.com/not-NULL/p/5358147.html
Copyright © 2011-2022 走看看