`
jyangzi5
  • 浏览: 207871 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

test

    博客分类:
  • test
 
阅读更多

 

a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0);}/* 1.去除android a/button/input标

 

http://www.cnblogs.com/ahwwmb/p/3377809.html

极客标签 http://www.gbtags.com/gb/syslogin.htm

http://www.nikolakis.net/liquidcarousel/

http://www.cnblogs.com/zhwl/p/3524793.html

 

http://www.tuicool.com/articles/au26Rz

http://wenku.baidu.com/course/study/5efb001ca300a6c30c229f96#5efb001ca300a6c30c229f96

http://slide.sports.sina.com.cn/l/slide_2_22616_71225.html#p=1

http://slide.sports.sina.com.cn/l/slide_2_22616_73505.html#p=1

 

<div style="width:200px;height:50px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis; " title="试试看,<font color=red>hi.baidu.com</font>/commy,试试看,hi.baidu.com/commy,">试试看,<font color=red>hi.baidu.com</font>/commy,试试看,hi.baidu.com/commy,</div>

 

 

1.springmvc-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p
    xmlns:context="http://www.springframework.org/schema/context
    xmlns:mvc="http://www.springframework.org/schema/mvc
    xsi:schemaLocation="  
           http://www.springframework.org/schema/beans  
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
           http://www.springframework.org/schema/context  
           http://www.springframework.org/schema/context/spring-context-3.0.xsd 
           http://www.springframework.org/schema/mvc  
           http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
   
    <!-- 启动扫描所有的controller -->
    <context:component-scan base-package="com.houtai.web"/>
   
    <!--  主要作用于@Controller,激活该模式
       
     下面是一种简写形式,完全可以手动配置替代这种简写形式;
      它会自动注册DefaultAnnotationHandlerMapping与AnnotationMethodHandlerAdapter 两个bean,
        是spring MVC为@Controllers分发请求所必须的
     -->
    <mvc:annotation-driven />
   
    <!-- 这里拦截器还有一种配置方法【针对路径进行配置】 推荐使用这个,方便直观-->
    <mvc:interceptors>
     <mvc:interceptor>
       <mvc:mapping path="/qt/meeting*"/>
   <bean  class="com.houtai.web.interceptor.MyInterceptorForQt"></bean>
     </mvc:interceptor>
     <mvc:interceptor>
       <mvc:mapping path="/ht/*"/>
   <bean  class="com.houtai.web.interceptor.MyInterceptor"></bean>
     </mvc:interceptor>
    </mvc:interceptors>
   
     <!-- 全局配置
    <mvc:interceptors>
     <bean class="com.houtai.web.interceptor.MyInterceptor"></bean>
    </mvc:interceptors>
    -->
    <!-- 配置js,css等静态文件直接映射到对应的文件夹,不被DispatcherServlet处理 -->
    <mvc:resources location="/WEB-INF/resources/**" mapping="/resources"/>
   
    <!-- jsp页面解析器,当Controller返回XXX字符串时,先通过拦截器,然后该类就会在/WEB-INF/views/目录下,查找XXX.jsp文件-->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
     <property name="prefix" value="/WEB-INF/views/"></property>
     <property name="suffix" value=".jsp"></property>
    </bean>
   
</beans>

-----------------------------------------

2.applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xmlns:aop="http://www.springframework.org/schema/aop
    xmlns:tx="http://www.springframework.org/schema/tx
    xmlns:context="http://www.springframework.org/schema/context
    xsi:schemaLocation="  
          http://www.springframework.org/schema/beans  
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
          http://www.springframework.org/schema/tx  
          http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
          http://www.springframework.org/schema/context  
          http://www.springframework.org/schema/context/spring-context-3.0.xsd  
          http://www.springframework.org/schema/aop  
          http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" default-autowire="byName">

     <context:property-placeholder location="classpath:database.properties"/>
    
     
       <bean id="dataSource" 
          class="org.apache.commons.dbcp.BasicDataSource" 
          destroy-method="close"> 
        <property name="driverClassName" value="${driverclass}"/> 
        <property name="url" value="${jdbcurl}"/> 
        <property name="username" value="${user}"/> 
        <property name="password" value="${password}"/> 
        <!--maxActive: 最大连接数量-->   
        <property name="maxActive" value="150"/> 
        <!--minIdle: 最小空闲连接-->   
        <property name="minIdle" value="5"/> 
        <!--maxIdle: 最大空闲连接-->   
        <property name="maxIdle" value="20"/> 
         <!--initialSize: 初始化连接-->   
        <property name="initialSize" value="30"/> 
        <!-- 连接被泄露时是否打印 --> 
        <property name="logAbandoned" value="true"/> 
        <!--removeAbandoned: 是否自动回收超时连接-->   
        <property name="removeAbandoned"  value="true"/> 
        <!--removeAbandonedTimeout: 超时时间(以秒数为单位)-->   
        <property name="removeAbandonedTimeout" value="10"/> 
        <!--maxWait: 超时等待时间以毫秒为单位 1000等于60秒--> 
        <property name="maxWait" value="1000"/> 
        <!-- 在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位. --> 
         <property name="timeBetweenEvictionRunsMillis" value="10000"/> 
         <!--  在每次空闲连接回收器线程(如果有)运行时检查的连接数量 --> 
         <property name="numTestsPerEvictionRun" value="10"/> 
         <!-- 1000 * 60 * 30  连接在池中保持空闲而不被空闲连接回收器线程--> 
         <property name="minEvictableIdleTimeMillis" value="10000"/> 
         
     </bean> 

    
     <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
         <!-- 指定所上传文件的总大小不能超过200KB。注意maxUploadSize属性的限制不是针对单个文件,而是所有文件的容量之和 -->
         <property name="maxUploadSize" value="20000000"/>
     </bean>
    
     <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource"></property>
     </bean>
    
     <!-- 声明式事务管理 -->
     <aop:config>
      <aop:advisor pointcut="execution(* com.houtai.service.impl.*ServiceImpl.*(..))" advice-ref="myAdvice"/>
     </aop:config>
     <tx:advice id="myAdvice" transaction-manager="txManager">
      <tx:attributes>
       <tx:method name="add*"    propagation="REQUIRED"/>
       <tx:method name="update*" propagation="REQUIRED"/>
       <tx:method name="delete*" propagation="REQUIRED"/>
       <tx:method name="save*"   propagation="REQUIRED"/>
       <tx:method name="*" read-only="true" rollback-for="com.houtai.util.DaoException"/>
      </tx:attributes>
     </tx:advice>
    
     <!-- 自动扫描组件,需要把controller去掉,否则影响事务管理 -->
     <context:component-scan base-package="com.houtai">
      <context:exclude-filter type="regex" expression="com.houtai.web.*"/>
     </context:component-scan>
    
</beans>

--------------------------------------------------------------

3.web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
 xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 

  <context-param>
 <param-name>contextConfigLocation</param-name>
 <param-value>classpath:/META-INF/jdbc-context.xml</param-value>
  </context-param> 
 
  <listener>
   <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>

  <servlet>
   <servlet-name>spring-mvc</servlet-name>
   <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
   <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:/META-INF/springmvc-servlet.xml</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
  </servlet>
 
  <servlet-mapping>
   <servlet-name>spring-mvc</servlet-name>
   <url-pattern>*.do</url-pattern>
  </servlet-mapping>
 
 
 
  <!-- openFlashChart配置 -->  
  
   <servlet> 
  <servlet-name>ChartRenderServlet</servlet-name>
  <servlet-class>org.crabdave.chartdemo.ChartRenderServlet</servlet-class>
 </servlet>
 <servlet-mapping>
  <servlet-name>ChartRenderServlet</servlet-name>
  <url-pattern>/ChartRenderServlet</url-pattern>
 </servlet-mapping>
 <!-- openFlashChart配置 -->  

 

  <filter>
   <filter-name>encodingFilter</filter-name>
   <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
   <init-param>
    <param-name>encoding</param-name>
       <param-value>utf-8</param-value>
   </init-param>
  </filter>
 
  <filter-mapping>
   <filter-name>encodingFilter</filter-name>
   <url-pattern>/*</url-pattern>
  </filter-mapping>
 
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
 
    <error-page>
 <error-code>404</error-code>
 <location>/errorPage404.jsp</location>
  </error-page>
</web-app>

 

 

4 .dao

@Repository 
public class MeetingDao extends JdbcDaoSupport implements java.io.Serializable{
 
 /**
  *
  */
 private static final long serialVersionUID = 1L;


 @SuppressWarnings("unchecked")
 public List<Meeting> getMeetingInfoListByUser(Integer sqrId,String userName,String findType) {
  
   StringBuffer getList = new StringBuffer();
  
   if("chakan".equals(findType))
   {
    getList.append(" select a.* from meet a where exists (select  b.id from meet_member b  where a.id = b.meet_id and  b.SJHM = ? ) or a.sqr_id =").append(sqrId);
   }
   else if("qiandao".equals(findType))
    {
    getList.append(" select a.* from meet a where exists (select  b.id from meet_member b  where a.id = b.meet_id and  b.SJHM = ? and (b.sfqd is null or b.sfqd = '0') ) ");
        getList.append(" and a.qssj < now() and a.jzsj > now() ");
    }
   getList.append(" order by a.qssj desc");
  
   final List<Meeting> list= new ArrayList<Meeting>();
   getJdbcTemplate().query(getList.toString(),
     new Object[] {userName},
     new RowMapper() {
      public Object mapRow(ResultSet rs, int index)
        throws SQLException {
       
       Meeting  meet=new Meeting();
       meet.setId(rs.getInt("id"));
       meet.setHyzt(rs.getString("hyzt")); //会议主题
       meet.setSqsj(rs.getString("sqsj"));    //申请时间
       meet.setBase_id(rs.getInt("base_id")); // 中心名称
       meet.setZbdw(rs.getString("zbdw")); //主办单位
       meet.setHydd(rs.getString("hydd")); //会议地点
       meet.setQssj(rs.getString("qssj")); //起始时间
       meet.setJzsj(rs.getString("jzsj")); //节制时间
       meet.setLxr(rs.getString("lxr")); //联系人
       meet.setHycd(rs.getString("hycd")); //会议场地
       list.add(meet);
       return null;
      }
     });
  
   return list;
 }

 

5.service

@Service
@Transactional
public class MeetingServiceImpl implements MeetingService {

 @Autowired
 private MeetingDao meetingDao;

 @Override
 public List<MeetingArrange> getMeetingArrangeListByMeetingId(
   Integer meetingId) {
  // TODO Auto-generated method stub
  return meetingDao.getMeetingArrangeByMeetingId(meetingId);
 }

 

6.controller

@Controller
public class MeetingController {

 @Autowired
 private MeetingService meetingService;

 // 前台controller--------------------------------------------------
 
 @RequestMapping(value="/qt/meetingQianDao.do")
 public ModelAndView meetingQianDao(HttpServletRequest request)
 {
   QtUser qtUser = (QtUser)request.getSession().getAttribute("qtUser");
   List <Meeting> list = meetingService.getMeetingListByUser(qtUser.getId(),qtUser.getSj(),"qiandao");   
   ModelAndView mav = new ModelAndView("/phoneView/meetingLieBiao");
   mav.addObject("meetingList", list);
   mav.addObject("findType", "qiandao");
   return mav;  
 }
 

 

-------------------

http://wenku.baidu.com/link?url=0sKbLddqM-foa3llTnwhZ7lDsgftc1TND-M-txlOa3Chg_DUkTtWIbjeH8EWoar9a1-TFMdEhGP3Xvoq45ZsNBNhmLD9xz5bTbs1hJrMjAm

 

 

http://outofmemory.cn/code-snippet/3793/spring-aop-example

 

 

 

 

 

 

 

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name ="android.permission.GET_TASKS" />
    <uses-permission android:name ="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

 

 

 

webView.setWebViewClient( new WebViewClient() {

   @Override
   public boolean shouldOverrideUrlLoading(WebView view, String url) {
    // TODO Auto-generated method stub
    //return super.shouldOverrideUrlLoading(view, url);
//    //downloadURL = "";
//    if (downloadURL == null || downloadURL.compareTo(url) != 0)
//    {
//     view.loadUrl(url);
//    }
//    else
//    {
//     Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
//           startActivity(intent);
//           return true;
//     //return super.shouldOverrideUrlLoading(view, url);
//    }
    
     if(url.indexOf("tel:")<0){//页面上有数字会导致连接电话
               view.loadUrl(url);
           }
     else
     {
     Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
           startActivity(intent);
           return true;
     //return super.shouldOverrideUrlLoading(view, url);
     }

    return true;
   }
         
        });
       
        webView.setWebChromeClient(new WebChromeClient() {
            @Override
            public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
                AlertDialog.Builder b2 = new AlertDialog.Builder(MainActivity.this);
                    b2.setTitle("温馨提示").setMessage(message)
                        .setPositiveButton("OK",
                                new AlertDialog.OnClickListener() {
                                    @Override
                                    public void onClick(DialogInterface dialog,
                                            int which) {
                                        result.confirm();
                                        // MyWebView.this.finish();
                                    }
                                });

                b2.setCancelable(false);
                b2.create();
                b2.show();
                return true;
            }
           
            @Override
            public boolean onJsConfirm(WebView view, String url, String message,
            final JsResult result) {
            final AlertDialog.Builder builder = new AlertDialog.Builder(view
            .getContext());
            builder.setTitle("确认框").setMessage(message)
            .setPositiveButton("确定", new OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
            result.confirm();
            }
            }).setNeutralButton("取消", new OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
            result.cancel();
            }
            });
            builder.setOnCancelListener(new OnCancelListener() {
            @Override
            public void onCancel(DialogInterface dialog) {
            result.cancel();
            }
            });
           
           //屏蔽keycode等于84之类的按键,避免按键后导致对话框消息而页面无法再弹出对话框的问题
            builder.setOnKeyListener(new OnKeyListener() {
            @Override
            public boolean onKey(DialogInterface dialog, int keyCode,
            KeyEvent event) {
            Log.v("onJsConfirm", "keyCode==" + keyCode + "event=" + event);
            return true;
            }

   
            });
            //禁止响应按back键的事件
            //builder.setCancelable(false);
            AlertDialog dialog = builder.create();
            dialog.show();
            return true;
            // return super.onJsConfirm(view, url, message, result);
            }

        });

分享到:
评论

相关推荐

    parasoft c++Test9.0破解

    最好用的单元测试工具,除了这里你是找不到9.0版本的破解的。 ... 独立的版本破解: ... 把lic_client.jar复制到 ... c:\Program Files (x86)\Parasoft\Test\9.0\plugins\...这个是:plugins-c++Test For Visual Studio.7z

    eNetTest 网管内网单机测速工具

    eNetTest 网管内网单机测速工具eNetTest 网管内网单机测速工具eNetTest 网管内网单机测速工具eNetTest 网管内网单机测速工具eNetTest 网管内网单机测速工具eNetTest 网管内网单机测速工具eNetTest 网管内网单机测速...

    Parasoft c++Test9.0破解文件

    c:\Program Files (x86)\Parasoft\C++test for Visual Studio\9.0\plugins\ 这个目录中 把plugins-Test for Virsual Studio.7z 中的文件覆盖到 c:\Program Files (x86)\Parasoft\Test for Visual Studio\9.0\...

    C++Test学习文档

    C++test 文档库包含以下各项: • C++test 用户手册 ( 当前指南): C++test 用户手册(当前指南):解释如何使用在 Eclipse 上构 建的 C++test 功能(如果您拥有单机版的 C++test),或者如何使用添加到 Eclipse 的...

    test3test3test3test3test3test3

    test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3test3

    Enabler Test Specification for SUPL V2.0

    This document describes in detail available test cases for SUPL V2.0, OMA-ERP-SUPL-V2_0. URL:http://www.openmobilealliance.org/ The test cases are split in two categories, conformance and ...

    C++ Test 7.2及9.2版本(附带许可证)学习资料!!

    内含 C++Test 两个版本的软件 、 VC++6.0(可以在Win 10 环境使用) 、 C++ Test 许可证书 、C语言编码规范(试用) 详细情况请见文章里面包含使用该软件的步骤及配置过程...

    c++ test9.5破解工具

    1.安装,安装时不能开vs,会安装失败 2.尽量选择独立安装一个配置cpptest_9_5 2.复制xtest.lic.client.dll...X:\Program Files\Parasoft\Test for Visual Studio\9.5\plugins\com.parasoft.xtest.libs.vstudio\Parasoft

    test.py_pythontest_python_

    test python programming language

    Cracking the GRE Mathematics Subject Test 4th Edition.pdf

    Getting a high score on the GRE Math Subject Test isn’t about memorizing everything there is to know about math–it’s about targeting your test preparation. We teach you only the information you’ll...

    software test automation effective use of test execution 自动化测试

    software test automation effective use of test execution 自动化测试

    LMS_Test.Lab中文操作指南.pdf

    LMS Test Lab是一款综合全面的振动噪声试验解决方案,其独特的工作流程设计界面,使得LMS Test Lab为系统的易用性、高效率和数据一致性确立了新的标准。为未来的振动噪声试验方式,提供了新的突破。 LMS Test Lab ...

    [Test Studio] 软件测试入门教程 (Test Studio 实现) (英文版)

    Embark on the exciting journey of test automation, execution, and reporting in Test Studio with this practical tutorial Overview Learn to use Test Studio to design and automate tests valued with ...

    C++test V1.3序列号

    C++test序列号 V1.3 C++Test是一个C/C++单元级测试工具,自动测试C/C++类、函数或部件,而不需要编写测试用例、测试驱动程序或桩调用代码。C++Test能够自动测试代码构造(白盒测试)、测试代码的功能性(黑盒测试)和...

    Building a Successful Board-Test Strategy 2nd Edition

    Building a Successful Board-Test Strategy A successful test strategy is a byproduct of overall product life-cycle management. Anyone building such a strategy must consider the product's development, ...

    IPv6_Ready Self_Test

    Test Specification: 4.0.6 Self Test Tool: 5.0.0 Interoperability Test Scenario: 4.0.4 If you are going to run test from now, please use the newest version. However, in case the test specification ...

    c++test 中文使用说明

    C++Test是一个C/C++单元测试工具,自动测试任何C/C++类、函数或部件,而不需要您编写一个测试用例、测试驱动程序或桩调用。C++Test能够自动测试代码构造(白盒测试)、测试代码的功能性(黑盒测试)和维护代码的完整...

    workTest.rar

    从e:\mysql\test.sql中将文件中的SQL语句导入数据库中: 1.从命令行进入mysql,然后用命令CREATE DATABASE test2;创建数据库test2。 2.退出mysql 可以输入命令exit;或者quit; 3.在CMD中输入下列命令: c:\&gt;...

    Parasoftc++ Test 9.0破解文件

    最好用的单元测试工具,除了这里你是找不到9.0版本的破解的。 ... 独立的版本破解: ... 把lic_client.jar复制到 ... c:\Program Files (x86)\Parasoft\Test\9.0\plugins\...这个是:( plugins-Test for Virsual Studio.7z )

    TestComplete 7 破解

    把程序目录bin下:用TestComplete替换掉原有TestComplete 然后启动替换后的程序。 首次登陆按照如下设置: User Name: Eternal Shield Company Name: HOMEZ, Inc. Registration Code: 558B8FDC-6BF62C26-F83BF6FF

Global site tag (gtag.js) - Google Analytics