param

pig的基本操作(对hadoop文件)

家住魔仙堡 提交于 2019-11-27 15:27:27
pig是什么? 我的理解是: pig就相当于 shell , hadoop就相当于linux (所以我尽可能的会使用pig操作hadoop的文件) 1.进入HADOOP_HOME目录。 2.执行sh bin/hadoop 我们可以看到更多命令的说明信息: Usage: hadoop [--config confdir] COMMAND where COMMAND is one of: namenode -format format the DFS filesystem secondarynamenode run the DFS secondary namenode namenode run the DFS namenode datanode run a DFS datanode dfsadmin run a DFS admin client fsck run a DFS filesystem checking utility fs run a generic filesystem user client balancer run a cluster balancing utility jobtracker run the MapReduce job Tracker node pipes run a Pipes job tasktracker run a MapReduce task

ValidateUtil常用验证工具类,如手机、密码、邮箱等

大兔子大兔子 提交于 2019-11-27 14:04:41
package cn.com.ssk.util.utils; import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; /** * 常用的一些验证,如手机、移动号码、联通号码、电信号码、密码、座机、 邮政编码、邮箱、年龄、身份证、URL、QQ、汉字、字母、数字等 */ public class ValidateUtil { /** 手机号规则 */ public static final String MOBILE_PATTERN="^((13[0-9])|(14[0-9])|(15[0-9])|(17[0-9])|(18[0-9]))(\\d{8})$"; /** 中国电信号码格式验证 手机段: 133,153,180,181,189,177,1700,173 **/ private static final String CHINA_TELECOM_PATTERN = "(?:^(?:\\+86)?1(?:33|53|7[37]|8[019])\\d{8}$)|(?:^(?:\\+86)?1700\\d{7}$)"; /** 中国联通号码格式验证 手机段:130,131,132,155,156,185,186,145,176,1707,1708,1709,175 **/

mybatis新增记录使用 useGeneratedKeys无法返回主键

こ雲淡風輕ζ 提交于 2019-11-27 12:59:25
问题代码 1. mybatis 新增记录返回主键 DAO 层   /** * 添加用户信息 * @param userInfo 用户信息 * @return */ Integer AddUserInfo(@Param("userInfo") UserInfo userInfo); XML <insert id="AddUserInfo" parameterType="com.jijisoft.entity.UserInfo" useGeneratedKeys="true" keyProperty="userId"> insert into user_info (nick_name,head_pic,gender,open_id) value (#{userInfo.nickName},#{userInfo.headPic},#{userInfo.gender},#{userInfo.openId})</insert> 此代码测试不能返回主键信息 解决:DAO层不能使用@Param注解 代码如下:    /** * 添加用户信息 * @param userInfo 用户信息 * @return */ Integer AddUserInfo(UserInfo userInfo);   <insert id="AddUserInfo" parameterType="com

http/https请求工具类

家住魔仙堡 提交于 2019-11-27 12:29:53
package com.platform.util; import org.jsoup.Connection; import org.jsoup.Connection.Method; import org.jsoup.Connection.Response; import org.jsoup.Jsoup; import java.io.*; import java.security.SecureRandom; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import javax.net.ssl.X509TrustManager; /** *

TP5通用化API接口数据封装

*爱你&永不变心* 提交于 2019-11-27 09:38:04
之前在做项目的时候,特别是最近总是再使用前后端分离模式,向客户端提供接口,每次都傻不拉几的 在每一个方法里面 写 $data = ['status'=>1,'message'=>'XXX','data'=>$data]; 累的要死,这脑子从来没想过封装一下吗?真是年龄大了啊,这个项目就抽出来吧,在common.php下写一个函数 以后调用 show就行了 /** * 通用化接口封装 * @param $status * @param $message * @param $data * @param $httpCode * @return array */ function show($status, $message, $data, $httpCode){ $data = [ 'status' => $status, 'message' => $message, 'data' => $data, ]; return json($data,$httpCode); } 来源: https://www.cnblogs.com/we-jack/p/11356460.html

PInvoke C#: Function takes pointer to function as argument

半世苍凉 提交于 2019-11-27 08:56:55
I'd like to access this function in my c# code, is this possible? so in the end the c++ code would call my function and also apply the struct called "sFrameofData". C++ Code: //The user supplied function will be called whenever a frame of data arrives. DLL int Cortex_SetDataHandlerFunc(void (*MyFunction)(sFrameOfData* pFrameOfData)); Would this work perhaps? C# Code: [DllImport("Cortex_SDK.dll")] public extern static int Cortex_SetDataHandlerFunc(ref IntPtr function(ref IntPtr pFrameOfData) ); ahawker You want to use a delegate that matches the method signature of your "MyFunction" C++ method.

C/C++实现排序算法(持续更新~~~~~~)

我与影子孤独终老i 提交于 2019-11-27 07:12:54
github: https://github.com/xiaozhengwei/Algorithms-And-DataStructure /** * 冒泡排序 * 时间复杂度(平均) : O(n²) * 时间复杂度(最好) : O(n) * 时间复杂度(最坏) : O(n²) * 空间复杂度 : O(1) * 稳定性: : 稳定 * @param arr : 标记数组首地址的指针 * @param length : 数组长度 * @param type : 排序类型 * @param state : 若数组不再发生变化,则表示已经排序成功,停止排序 * 为0从小到大 * 非0从大到小 */ void bubbleSort(int *arr, int length, int type) { if (length < 2) return; int state = 1;//标记状态,若数组没有发生变化,则停止排序 for (int i = 0; i < length - 1; i++){ for (int j = 0; j < length - i - 1; j++){ if (type ? arr[j] < arr[j + 1] : arr[j] > arr[j + 1]) { arr[j] = arr[j] ^ arr[j + 1]; arr[j + 1] = arr[j] ^

dao层方法中的@Param说明

ぐ巨炮叔叔 提交于 2019-11-27 07:11:43
采用@Param的方法可有多个参数 public void abc(@Param("userName") String name,@Param("password") String passWord); 而xxMapper.xml中的#{}中的参数则是根据@Param括号中的参数来获取相应的数据 <select> select * from testTable where username = #{userName} </select> 来源: https://www.cnblogs.com/welearn/p/11350083.html

SqlHelper.cs

半腔热情 提交于 2019-11-27 07:03:51
using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Collections; using System.Data.SqlClient; using System.Configuration; namespace Shuobo.DAL { /// <summary> /// 数据库的通用访问代码 /// 此类为抽象类,不允许实例化,在应用时直接调用即可 /// </summary> public abstract class SqlHelper { //获取数据库连接字符串,其属于静态变量且只读,项目中所有文档可以直接使用,但不能修改 public static readonly string ConnectionStringLocalTransaction = ConfigurationManager.ConnectionStrings["pubsConnectionString"].ConnectionString; // 哈希表用来存储缓存的参数信息,哈希表可以存储任意类型的参数。 private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());

How to pass values from HTML page to java applet?

核能气质少年 提交于 2019-11-27 06:24:42
问题 I have tried passing values using javascript like below <script language= "javascript" type= "text/javascript"> var num; function getVal() { num=document.getElementById('in').value; alert(document.getElementById('parm').value); } </script> <body> <form > Number : <input type="text" id="in" ><br/> <button id="myBtn" onclick="getVal()">Try it</button><br/> </form> <APPLET code="Calc.class" width="100" height="100"> <PARAM name="number" id="parm"> </APPLET> </body> </html> The alert box displays