随笔-71  评论-5  文章-0  trackbacks-0
 

/Files/kokosang/html5拖拽上传.zip

  前几天想做个给安卓app升级做个上传页面,然后从网上down了个页面下面(主要是嫌弃自己页面整的太丑,见不了人),然后就一直在整后台取值的办法
  各种百度,值取出来了,但是,悲催的是总是乱码,崩溃了,大神看了后,鄙视一番,给我整了下,简直就是重写了

  贴出来,先放张页面效果
  


  赏心悦目的后台来咯

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.List;

import org.apache.log4j.Logger;
import org.apache.tomcat.util.http.fileupload.FileItem;
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory;
import org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload;

import com.puff.framework.annotation.Controller;
import com.puff.web.mvc.PuffContext;
import com.puff.web.view.View;

@Controller("/upload/android")
public class AndroidVersionUploadController {

    private static final Logger logger = Logger.getLogger(UserImageController.class);
    
    private static final String FILE_PATH = "C:/Users/Administrator/Desktop";
    
    private static final String FILE_APK_NAME = "/nn.apk";
    private static final String FILE_VER_NAME = "/ver.txt";
    
    /**
     * 版本上传
     * 
@return
     * 
@throws Exception 
     
*/
    public View update() throws Exception {
        DiskFileItemFactory factory = new DiskFileItemFactory(); 
        ServletFileUpload upload = new ServletFileUpload(factory); 
        List<FileItem> items = upload.parseRequest( PuffContext.getRequest()); 
        
        String ver = null;
        String info = null;
        String isFoucs = null;
        for(Object object : items) { 
            FileItem fileItem = (FileItem)object; 
            if(fileItem.isFormField()) { 
                
                String name = fileItem.getFieldName();
                String value = fileItem.getString("utf-8");
                
                if("ver".equals(name)){
                    ver = value;
                }else if("content".equals(name)){
                    info = value;
                }else if("radio".equals(name)){
                    isFoucs = value;
                }
            } else {
                saveFileInfo(fileItem);
            }
        } 
        
        saveContentInfo(ver, info, isFoucs);
        
        return null;
    
    }

    private void saveFileInfo(FileItem fileItem) {
        
        InputStream is = null;
        OutputStream os = null;
        try {
            File file = new File(FILE_PATH);
            if(file.exists()) {
                file.mkdirs();
            }
            
            is = fileItem.getInputStream();
            os = new FileOutputStream(FILE_PATH + FILE_APK_NAME);
            
            int len = 0;
            byte[] buffer = new byte[8 * 1024];
            while ((len = is.read(buffer, 0, 8 * 1024)) != -1) {
                os.write(buffer, 0, len);
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            closeOutputStream(os);
            closeInputStream(is);
        }
    }
    
    public void saveContentInfo(String ver, String info, String isFoucs) {
        BufferedWriter br = null;
        try {
            File file = new File(FILE_PATH);
            if(file.exists()) {
                file.mkdirs();
            }
            
            br = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(FILE_PATH + FILE_VER_NAME), "utf-8"));
            br.write("ver:" + ver + "\r\n");   //版本号
            br.write("update:" + isFoucs+ "\r\n");   //是否强制更新
            br.write("content:" + info );    //版本升级内容
            br.flush();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if(br != null) {
                    br.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                br = null;
            }
        }
    }


    private void closeOutputStream(OutputStream os) {
        if(os != null) {
            try {
                os.close();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                os = null;
            }
        }
    }
    
    private void closeInputStream(InputStream is) {
        if(is != null) {
            try {
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                is = null;
            }
        }
    }
}
posted @ 2015-08-24 10:35 藤本蔷薇 阅读(254) | 评论 (0)编辑 收藏
public static void main(String[] args) {

        String xml = "<?xml version=\"1.0\" encoding=\"gb2312\"?><p><seqid></seqid><code></code><msg>成功</msg>" +
                          "<node><ename>huoniu</ename><cname>火牛</cname><prefix>108</prefix><begin>20150603</begin><end>20160630</end><borr>1000000</borr><margin>100000</margin><usdborr>1000000</usdborr><usdmargin>100000</usdmargin><mainp>0.60</mainp><midp>0.60</midp><growp>0.60</growp><mainpt>0.60</mainpt><midpt>0.60</midpt><growpt>0.30</growpt><shcomm>0.000300</shcomm><szcomm>0.000300</szcomm><warn>1.000</warn><close>1.000</close><interest>200</interest><commf>13</commf><layout>p-huo01:1100000:574810</layout><unmoney>0</unmoney><tstatus>0</tstatus><cstatus>0</cstatus></node>" +
                          " <node><ename>nn</ename><cname>牛牛</cname><prefix>102</prefix><begin>20150615</begin><end>20151015</end><borr>10000000</borr><margin>8000000</margin><usdborr>10000000</usdborr><usdmargin>8000000</usdmargin><mainp>0.60</mainp><midp>0.60</midp><growp>0.30</growp><mainpt>0.60</mainpt><midpt>0.60</midpt><growpt>0.30</growpt><shcomm>0.003000</shcomm><szcomm>0.003000</szcomm><warn>0.800</warn><close>0.800</close><interest>0</interest><commf>0</commf><layout></layout><unmoney>18000000</unmoney><tstatus>0</tstatus><cstatus>0</cstatus></node>" +
                         "<node><ename>ag-huo</ename><cname>兜底代理商</cname><prefix>huo</prefix><begin>20150602</begin><end>20160630</end><borr>0</borr><margin>0</margin><usdborr>0</usdborr><usdmargin>0</usdmargin><mainp>0.60</mainp><midp>0.60</midp><growp>0.30</growp><mainpt>0.60</mainpt><midpt>0.60</midpt><growpt>0.30</growpt><shcomm>0.000300</shcomm><szcomm>0.000300</szcomm><warn>0.010</warn><close>0.010</close><interest>0</interest><commf>0</commf><layout></layout><unmoney>0</unmoney><tstatus>0</tstatus><cstatus>0</cstatus></node></p>";

        List<Map> nodeList = new ArrayList<Map>();
        Map<String, Object> sendMap = new HashMap<String, Object>();
        try {
            
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document doc = db.parse(new InputSource(new StringReader(xml)));
            Element root = doc.getDocumentElement();// 根节点

            Node node = root.getFirstChild();
            while(node != null) {
                String nodeName = node.getNodeName().trim();
                String nodeValue = node.getTextContent().trim();
                
                if("node".equals(nodeName) && node.hasChildNodes()) {
                    
                    Map<String, Object> nodeMap = new HashMap<String, Object>();
                    
                    Node childNode = node.getFirstChild();
                    while(childNode != null) {
                        nodeMap.put(childNode.getNodeName(), childNode.getTextContent());
                        childNode = childNode.getNextSibling();
                    }
                    
                    nodeList.add(nodeMap);
                } else {
                    sendMap.put(nodeName, nodeValue);
                }
                
                node = node.getNextSibling();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        
        sendMap.put("node", nodeList);
        
        System.out.println(sendMap);
    }



打印结果 :
{node=[{warn=1.000, cstatus=0, tstatus=0, borr=1000000, growpt=0.30, unmoney=0, midpt=0.60, usdmargin=100000, commf=13, close=1.000, begin=20150603, shcomm=0.000300, usdborr=1000000, growp=0.60, interest=200, layout=p-huo01:1100000:574810, prefix=108, ename=huoniu, midp=0.60, mainpt=0.60, margin=100000, szcomm=0.000300, cname=火牛, end=20160630, mainp=0.60}, 
            {warn=0.800, cstatus=0, tstatus=0, borr=10000000, growpt=0.30, unmoney=18000000, midpt=0.60, usdmargin=8000000, commf=0, close=0.800, begin=20150615, shcomm=0.003000, usdborr=10000000, growp=0.30, interest=0, layout=, ename=nn, midp=0.60, mainpt=0.60, margin=8000000, szcomm=0.003000, end=20151015, mainp=0.60},
            {warn=0.010, cstatus=0, tstatus=0, borr=0, growpt=0.30, unmoney=0, midpt=0.60, usdmargin=0, commf=0, close=0.010, begin=20150602, shcomm=0.000300, usdborr=0, growp=0.30, interest=0, layout=, prefix=huo, ename=ag-huo, midp=0.60, mainpt=0.60, margin=0, szcomm=0.000300, end=20160630, mainp=0.60}], seqid=, code=, msg=成功}
posted @ 2015-08-09 10:15 藤本蔷薇 阅读(256) | 评论 (0)编辑 收藏
      public static void main(String[] args) throws Exception {
            Map<String, Object> sendMap = new HashMap<String, Object>();
            String data = "<?xml version=\"1.0\" encoding=\"gb2312\"?><p><seqid></seqid><client>0BF3F2D9A01797BBF05D6BC89877DC91</client><ename>108-wc</ename><code>0</code><msg>成功</msg><totalm>12447.97</totalm><cash>5669.13</cash><stockm>6778.84</stockm><num>2</num><stock><node><market>0</market><symbol>600104</symbol><direct>1</direct><type>0</type><avgprice>21.010</avgprice><holdnum>299</holdnum></node><node><market>0</market><symbol>601818</symbol><direct>1</direct><type>0</type><avgprice>4.993</avgprice><holdnum>4</holdnum></node></stock></p>";

            List<Map> nodeList = new ArrayList<Map>();
            try {
                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                DocumentBuilder db = dbf.newDocumentBuilder();
                Document doc = db.parse(new InputSource(new StringReader(data)));
                Element root = doc.getDocumentElement();// 根节点
                Node node = root.getFirstChild();
                while(node != null) {
                    String nodeName = node.getNodeName().trim();
                    String nodeValue = node.getTextContent().trim();
                    if("stock".equals(nodeName) && node.hasChildNodes()) {
                        Node  nodeOne =  node.getFirstChild();
                        while(nodeOne != null) {
                         String nodeOneName = nodeOne.getNodeName().trim();
                         if("node".equals(nodeOneName) && nodeOne.hasChildNodes()){
                             Map<String, Object> nodeMap = new HashMap<String, Object>();
                              Node threeNode = nodeOne.getFirstChild();
                                while(threeNode != null) {
                                    nodeMap.put(threeNode.getNodeName(), threeNode.getTextContent());
                                    threeNode = threeNode.getNextSibling();
                                }
                                nodeList.add(nodeMap);
                              }
                           nodeOne = nodeOne.getNextSibling();
                           }
                        }else{
                            sendMap.put(nodeName, nodeValue);
                        }
                    node = node.getNextSibling();
                    }                    
                sendMap.put("node", nodeList);
            } catch (Exception e) {
                e.printStackTrace();
            }
            System.out.println(sendMap);
      }  


打印结果:{node=[{direct=1, market=0, symbol=600104, avgprice=21.010, holdnum=299, type=0},
             {direct=1, market=0, symbol=601818, avgprice=4.993, holdnum=4, type=0}],
              num=2, seqid=, client=0BF3F2D9A01797BBF05D6BC89877DC91, stockm=6778.84, cash=5669.13, ename=108-wc, code=0, totalm=12447.97, msg=成功}
posted @ 2015-08-09 10:09 藤本蔷薇 阅读(467) | 评论 (0)编辑 收藏
/Files/kokosang/DoubleUtil.txt



package frameWork.util;
import java.math.BigDecimal;
import java.text.DecimalFormat;
/**   
 * 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精   
 * 确的浮点数运算,包括加减乘除和四舍五入。   
 */    
public class DoubleUtil {
//这个类不能实例化    
private DoubleUtil(){    
}  
//默认除法运算精度    
private static final int DEF_DIV_SCALE = 10;  
//默认的保留位数
private static DecimalFormat df=new DecimalFormat("0.00");  
/**
* 按照格式保留几位
* @param money  double数
* @param format 格式
* @return
*/
public static double  format(double money,String format){
if(format != null && format != ""){
df=new DecimalFormat(format); 
}
double moneyformat=new Double(df.format(money).toString());  
return moneyformat;
}
/**   
* 提供精确的加法运算。   
* @param v1 被加数   
* @param v2 加数   
* @return 两个参数的和   
*/    
public static double add(double v1,double v2){    
BigDecimal b1 = new BigDecimal(Double.toString(v1));    
BigDecimal b2 = new BigDecimal(Double.toString(v2));    
return b1.add(b2).doubleValue();    
}    
/**   
* 提供精确的减法运算。   
* @param v1 被减数   
* @param v2 减数   
* @return 两个参数的差   
*/    
public static double sub(double v1,double v2){    
BigDecimal b1 = new BigDecimal(Double.toString(v1));    
BigDecimal b2 = new BigDecimal(Double.toString(v2));    
return b1.subtract(b2).doubleValue();    
}    
/**   
* 提供精确的乘法运算。   
* @param v1 被乘数   
* @param v2 乘数   
* @return 两个参数的积   
*/    
public static double mul(double v1,double v2){    
BigDecimal b1 = new BigDecimal(Double.toString(v1));    
BigDecimal b2 = new BigDecimal(Double.toString(v2));    
return b1.multiply(b2).doubleValue();    
}    
/**   
* 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到   
* 小数点以后10位,以后的数字四舍五入。   
* @param v1 被除数   
* @param v2 除数   
* @return 两个参数的商   
*/    
public static double div(double v1,double v2){    
return div(v1,v2,DEF_DIV_SCALE);    
}    
/**   
* 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指   
* 定精度,以后的数字四舍五入。   
* @param v1 被除数   
* @param v2 除数   
* @param scale 表示表示需要精确到小数点以后几位。   
* @return 两个参数的商   
*/    
public static double div(double v1,double v2,int scale){    
if(scale<0){    
throw new IllegalArgumentException("The scale must be a positive integer or zero");    
}    
BigDecimal b1 = new BigDecimal(Double.toString(v1));    
BigDecimal b2 = new BigDecimal(Double.toString(v2));    
return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();    
}    
/**   
* 提供精确的小数位四舍五入处理。   
* @param v 需要四舍五入的数字   
* @param scale 小数点后保留几位   
* @return 四舍五入后的结果   
*/    
public static double round(double v,int scale){    
if(scale<0){    
throw new IllegalArgumentException("The scale must be a positive integer or zero");    
}    
BigDecimal b = new BigDecimal(Double.toString(v));    
BigDecimal one = new BigDecimal("1");    
return b.divide(one,scale,BigDecimal.ROUND_HALF_UP).doubleValue();    
}    
/**   
* 提供精确的类型转换(Float)   
* @param v 需要被转换的数字   
* @return 返回转换结果   
*/    
public static float convertsToFloat(double v){    
BigDecimal b = new BigDecimal(v);    
return b.floatValue();    
}    
/**   
* 提供精确的类型转换(Int)不进行四舍五入   
* @param v 需要被转换的数字   
* @return 返回转换结果   
*/    
public static int convertsToInt(double v){    
BigDecimal b = new BigDecimal(v);    
return b.intValue();    
}    
/**   
* 提供精确的类型转换(Long)   
* @param v 需要被转换的数字   
* @return 返回转换结果   
*/    
public static long convertsToLong(double v){    
BigDecimal b = new BigDecimal(v);    
return b.longValue();    
}    
/**   
* 返回两个数中大的一个值   
* @param v1 需要被对比的第一个数   
* @param v2 需要被对比的第二个数   
* @return 返回两个数中大的一个值   
*/    
public static double returnMax(double v1,double v2){    
BigDecimal b1 = new BigDecimal(v1);    
BigDecimal b2 = new BigDecimal(v2);    
return b1.max(b2).doubleValue();    
}    
/**   
* 返回两个数中小的一个值   
* @param v1 需要被对比的第一个数   
* @param v2 需要被对比的第二个数   
* @return 返回两个数中小的一个值   
*/    
public static double returnMin(double v1,double v2){    
BigDecimal b1 = new BigDecimal(v1);    
BigDecimal b2 = new BigDecimal(v2);    
return b1.min(b2).doubleValue();    
}    
/**   
* 精确对比两个数字   
* @param v1 需要被对比的第一个数   
* @param v2 需要被对比的第二个数   
* @return 如果两个数一样则返回0,如果第一个数比第二个数大则返回1,反之返回-1   
*/    
public static int compareTo(double v1,double v2){    
BigDecimal b1 = new BigDecimal(v1);    
BigDecimal b2 = new BigDecimal(v2);    
return b1.compareTo(b2);    
}
/**
* 格式化double
* @param arg0
* @param num
* @return
*/
public static String doubleFormat(double arg0,Integer num){
DecimalFormat df = new DecimalFormat("####.00"); 
/*DecimalFormat df2 = new DecimalFormat("##.00%");  
DecimalFormat df3 = new DecimalFormat("###,##0.00");*/
if(num !=null){
if(num == 1){
df = new DecimalFormat("####.0"); 
}else if(num == 2){
df = new DecimalFormat("####.00"); 
}else if(num == 3){
df = new DecimalFormat("####.000"); 
}else if(num == 4){
df = new DecimalFormat("####.0000"); 
}
}else{
df = new DecimalFormat("####"); 
}
if(df.format(arg0).contains(".")){
if(df.format(arg0).substring(0, df.format(arg0).indexOf(".")).length()<=0){
df = new DecimalFormat("0.00");
if(num !=null){
if(num == 1){
df = new DecimalFormat("0.0"); 
}else if(num == 2){
df = new DecimalFormat("0.00"); 
}else if(num == 3){
df = new DecimalFormat("0.000"); 
}else if(num == 4){
df = new DecimalFormat("0.0000"); 
}
}else{
df = new DecimalFormat("0"); 
}
}
}
return df.format(arg0);
}
/**
* 百分比格式化
* @param arg0
* @param num
* @return
*/
public static String percentageFormat(double arg0,Integer num){
DecimalFormat df = new DecimalFormat("##.00%");
if(num !=null){
if(num == 1){
df = new DecimalFormat("####.0%"); 
}else if(num == 2){
df = new DecimalFormat("####.00%"); 
}else if(num == 3){
df = new DecimalFormat("####.000%"); 
}else if(num == 4){
df = new DecimalFormat("####.0000%"); 
}
}else{
df = new DecimalFormat("####%"); 
}
if(df.format(arg0).contains(".")){
if(df.format(arg0).substring(0, df.format(arg0).indexOf(".")).length()<=0){
df = new DecimalFormat("0.00%");
if(num !=null){
if(num == 1){
df = new DecimalFormat("0.0%"); 
}else if(num == 2){
df = new DecimalFormat("0.00%"); 
}else if(num == 3){
df = new DecimalFormat("0.000%"); 
}else if(num == 4){
df = new DecimalFormat("0.0000%"); 
}
}else{
df = new DecimalFormat("0%"); 
}
}
}
return df.format(arg0);
}
/**
* double每三位短号分割
* @param arg0
* @param num
* @return
*/
public static String splitNumberFormat(double arg0,Integer num){
DecimalFormat df = new DecimalFormat("###,##0.00");
if(num !=null){
if(num == 1){
df = new DecimalFormat("###,##0.0"); 
}else if(num == 2){
df = new DecimalFormat("###,##0.00"); 
}else if(num == 3){
df = new DecimalFormat("###,##0.000"); 
}else if(num == 4){
df = new DecimalFormat("###,##0.0000"); 
}
}else{
df = new DecimalFormat("###,###"); 
}
return df.format(arg0);
}
}
posted @ 2015-08-07 13:47 藤本蔷薇 阅读(566) | 评论 (0)编辑 收藏
假如  redis  在/usr/local/bin

配置文件在/usr/local/redis-2.8.21 

 root@iZ239bujfzrZ:    /usr/local/bin# ./redis-server redis.conf nohup 
posted @ 2015-08-07 10:36 藤本蔷薇 阅读(209) | 评论 (0)编辑 收藏

      public static interface NUMBER{
public static String STR_FORMAT = "00000"; 
        static String TOKEN = null; 
}


//配资单号格式
    public static String AddOne(String code){
   Integer intHao = Integer.parseInt(code);
   intHao++;
   DecimalFormat df = new DecimalFormat(NUMBER.STR_FORMAT);
   return df.format(intHao);
    }
    
    public static void main(String[] args) {
    String code = "ASD0034252345234500001";
       String  xlh = code.substring(code.length()-5, code.length());
       System.out.println("数据库原有的最大序列号:"+xlh);
       if(xlh!=null){
      System.out.println("累加的新生成的序列号:"+AddOne(xlh));
       }else{
      System.out.println("最新的新生成的序列号:"+"00001"); //如果没有手动生成一条最小的
       }
  }
    
posted @ 2015-08-03 11:50 藤本蔷薇 阅读(443) | 评论 (0)编辑 收藏
    /**
     * 获取股票板块信息
     * 沪市A股 : 600、601、603 开头
     * 深市A股 : 000开头
     * 中小板 : 002开头
     * 创业板 : 300开头
     * 沪市新股申购:730
     * @param code
     * @return
     */
    public static int getPlateInfo(String code){
    if(code.startsWith("600") || code.startsWith("601") || code.startsWith("603")){
    return 0;
    }else if(code.startsWith("000")){
    return 1;
    }else if(code.startsWith("002")){
    return 2;
    }else if(code.startsWith("300")){
    return 3;
    }else if(code.startsWith("730")){
    return 4;
    }else {
    return 5;
    }
    }
posted @ 2015-07-29 19:07 藤本蔷薇 阅读(368) | 评论 (0)编辑 收藏
 
            我想把String 类型 yyyy-MM-dd 格式的数据转换成 String 类型  yyyyMMdd 格式,然后

String end_date = "2015-09-07";
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); 
        Date date_2 = formatter.parse(end_date);
String date_22 = formatter.format(date_2);
System.out.println(date_2);
System.out.println(date_22);

  
        打印出来结果是:
                Tue Dec 09 00:00:00 CST 2014
                20141209

       后来,吾家上神告知,不能直接转
      
                String end_date = "2015-09-07";
DateFormat format =new SimpleDateFormat("yyyy-MM-dd");
Date date_1 = format.parse(end_date);
format = new SimpleDateFormat("yyyyMMdd");  
String date_11 = format.format(date_1);
System.out.println(date_1);
System.out.println(date_11);


      打印出来结果是:

               Mon Sep 07 00:00:00 CST 2015
               20150907


    总结语: 吾家上神棒棒哒!!!

posted @ 2015-07-27 16:27 藤本蔷薇 阅读(200) | 评论 (0)编辑 收藏
         
             原本写了 if  else  判断股票所属板块的,觉得繁琐,就去改了下面的

                  public static void main(String[] args) {
    String code ="002348";
    String stock = "002".equals(code.substring(0,3)) ? "002" : code.substring(0,1);
System.out.println(stock);
}

               然后跑去得瑟,被鄙视了,然后  ↓↓↓↓

                 public static String getPlateInfo(String code){
    return code.startsWith("002") ? "002" : code.substring(0,1);
                  }

            还补了一刀,你看你写的什么玩意儿,哼,好想让他跪搓衣板
posted @ 2015-07-02 00:26 藤本蔷薇 阅读(227) | 评论 (0)编辑 收藏
Map<String, Object> userInfoMap = new HashMap<String, Object>();
// String data = JsonUtil.toJson(infoMap);
userInfoMap.put("agent", agent);
userInfoMap.put("ename", ename);
Map<String, Object> infoMap = SocketLogic.logic.userInfo(userInfoMap);
JSONObject rootObj = (JSONObject)JSONObject.toJSON(infoMap);
JSONArray nodeArr = rootObj.getJSONArray("node");
for(int i = 0; i < nodeArr.size(); i ++) {
authority = nodeArr.getJSONObject(i).get("authority").toString();          //交易权限
margin = nodeArr.getJSONObject(i).getLongValue("margin");  //保证金
warn = nodeArr.getJSONObject(i).getFloatValue("warn");      //警戒线
close = nodeArr.getJSONObject(i).getFloatValue("close");    //平仓线
end =  nodeArr.getJSONObject(i).getLongValue("end");       //结束时间
mainp = nodeArr.getJSONObject(i).getFloatValue("mainp"); //主板单票比例
midp = nodeArr.getJSONObject(i).getFloatValue("midp");   //中小板单票比例
growp = nodeArr.getJSONObject(i).getFloatValue("growp"); //创业板单票比例
   
}
posted @ 2015-06-29 19:20 藤本蔷薇 阅读(328) | 评论 (1)编辑 收藏
仅列出标题
共8页: 上一页 1 2 3 4 5 6 7 8 下一页