`
cqh520llr
  • 浏览: 509647 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

广东11选5任5

 
阅读更多
DECLARE
  V_FIRST  VARCHAR(2);
  V_SECOND VARCHAR2(2);
  V_THIRD  VARCHAR(2);
  V_FOURTH VARCHAR2(2);
  V_FIFTH  VARCHAR(2);
  V_BALL   VARCHAR2(8) := '11112970';
  CURSOR CUR_BALL IS
    SELECT *
      FROM (SELECT *
              FROM BALL_ELEVEN_ORDER
             WHERE BALL_FIRST = V_FIRST
               AND BALL_SECOND = V_SECOND
               AND BALL_THIRD = V_THIRD
               AND BALL_FOURTH = V_FOURTH
               AND BALL_FIFTH = V_FIFTH
             ORDER BY BALL_NO DESC) C
     WHERE ROWNUM = 1;
  BALL_TBL BALL_ELEVEN%ROWTYPE;
  V_COUNT  NUMBER(10) := 0;
BEGIN
  FOR I IN 1 .. 7 LOOP
    V_FIRST := LPAD(I, 2, '0');
    FOR J IN 2 .. 8 LOOP
      IF J > I THEN
        V_SECOND := LPAD(J, 2, '0');
        FOR K IN 3 .. 9 LOOP
          IF K > J AND K > I THEN
            V_THIRD := LPAD(K, 2, '0');
            FOR L IN 4 .. 10 LOOP
              IF L > K AND L > J AND L > I THEN
                V_FOURTH := LPAD(L, 2, '0');
                FOR M IN 5 .. 11 LOOP
                  IF M > L AND M > K AND M > J AND M > I THEN
                    V_FIFTH := LPAD(M, 2, '0');
                    OPEN CUR_BALL;
                    LOOP
                      FETCH CUR_BALL
                        INTO BALL_TBL;
                      EXIT WHEN CUR_BALL%NOTFOUND;
                      V_COUNT := (TO_DATE(SUBSTR(V_BALL, 1, 6), 'yymmdd') -
                                 TO_DATE(SUBSTR(BALL_TBL.BALL_NO, 1, 6),
                                          'yymmdd')) * 70 +
                                 TO_NUMBER(SUBSTR(V_BALL, 7, 8)) -
                                 TO_NUMBER(SUBSTR(BALL_TBL.BALL_NO, 7, 8));
                      DBMS_OUTPUT.PUT_LINE(V_FIRST || ',' || V_SECOND || ',' ||
                                           V_THIRD || ',' || V_FOURTH || ',' ||
                                           V_FIFTH || ': ' || V_COUNT);
                    END LOOP;
                    CLOSE CUR_BALL;
                  END IF;
                END LOOP;
              END IF;
            END LOOP;
          END IF;
        END LOOP;
      END IF;
    END LOOP;
  END LOOP;
END;


<%@ page import="java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	List<Integer[]> balls = new ArrayList<Integer[]>();
	Integer[] ball = {1,5,3,9,8};
	balls.add(ball);
	ball = new Integer[]{5,10,2,8,11};
	balls.add(ball);
	request.setAttribute("balls", balls);
%>
<body>
	<div style="background:#FFE4C4;white-space:nowrap;">
		<c:forEach items="${balls}" var="ball">
			<c:forEach begin="0" end="4" var="v">
				<c:forEach begin="1" end="11" var="x">
					<font face="verdana"
					<c:if test="${ball[v] == x}">
						color="#AB82FF"
					</c:if>
					<c:if test="${ball[v] != x}">
						color="#CDB38B"
					</c:if>
					>
					<c:if test="${x < 10}">0</c:if>${x}
					</font>
				</c:forEach>
				&nbsp;&nbsp;
			</c:forEach>
			<br/>
		</c:forEach>
	</div>
</body>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics