⑴ 求一個cobol小程序代碼五十行左右的
IDENTIFICATION DIVISION.
PROGRAM-ID. F1111111.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. HITAC.
OBJECT-COMPUTER. HITAC.
DATA DIVISION.
WORKING-STORAGE SECTION.
EXEC SQL INCLUDE SQLCA END-EXEC.
EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 COPY F401R PREFIXING F401-.
01 COPY F801R PREFIXING F801-.
01 COPY F801R PREFIXING W801-.
01 COPY F010R PREFIXING F010-.
01 COPY F010R PREFIXING W010-.
01 COPY F657R PREFIXING F657-.
01 COPY F657R PREFIXING W657-.
01 COPY F658R PREFIXING F658-.
01 COPY F658R PREFIXING W658-.
01 COPY F811R PREFIXING F811-.
01 COPY F811R PREFIXING W811-.
01 COPY F130R PREFIXING F130-.
01 COPY F122R PREFIXING F122-.
01 COPY F104R PREFIXING F104-.
01 COPY F604R PREFIXING F604-.
01 COPY F166R PREFIXING F166-.
H0000-MAIN SECTION.
H0000-000.
ACCEPT W-DATE FROM DATE.
ACCEPT W-TIME FROM TIME.
PERFORM H1000-MSGGET.
PERFORM SHOKI-SHORI.
PERFORM H3000-PFKEY.
PERFORM MSGSEND-SHORI.
PERFORM H5000-END.
H0000-999.
GOBACK.
H1000-MSGGET SECTION.
H1000-000.
PERFORM MSG-RECEIVE-SHORI.
PERFORM CTS-RECEIVE-SHORI.
H1000-999.
EXIT.
MSG-RECEIVE-SHORI SECTION.
H1100-000.
MOVE SPACE TO F0SABN-IFA.
RECEIVE IN-PCB FIRST SEGMENT INTO XMAP-RECV.
MOVE IN-STAT TO IO-STAT.
MOVE INT-NAME TO IOT-NAME.
IF IO-STAT = '00000'
MOVE OFF-FLAG TO ERR-FLG
W-CTS-FLG
ELSE
MOVE 'DC' TO F0SABN-KBN
MOVE 'RECEIVE' TO F0SABN-DC-FUNC
MOVE 'IO-PCB' TO F0SABN-CD-AREA
MOVE IO-STAT TO F0SABN-DC-STAT
MOVE 'MSG-RECEIVE-SHORI' TO F0SABN-SEC
PERFORM H9100-ABEND
END-IF.
H1100-999.
EXIT.
CTS-RECEIVE-SHORI SECTION.
CTS-RECEIVE-SHORI-000.
MOVE IOT-NAME TO CT-TMPID.
MOVE TAM-RECIVE TO TAM-REQCD.
CALL 'CBLDCTAM' USING TAM-CTRL TAM-FUNC CT-TMPID TAM-REC.
MOVE TAM-REC TO CTS-AREA.
IF CT-STAT NOT = '00000'
IF CT-STAT = '01731'
PERFORM CTS-SEND-SHORI
ELSE
MOVE 'DC' TO F0SABN-KBN
MOVE 'RECEIVE' TO F0SABN-DC-FUNC
MOVE 'CT-PCB' TO F0SABN-CD-AREA
MOVE CT-STAT TO F0SABN-DC-STAT
MOVE 'CTS-RECEIVE-SHORI' TO F0SABN-SEC
PERFORM H9100-ABEND
END-IF
END-IF.
CTS-RECEIVE-SHORI-999.
EXIT.
SHOKI-SHORI SECTION.
SHOKI-SHORI-000.
INITIALIZE WORK-AREA.
INITIALIZE W010-F010R.
MOVE OFF-FLAG TO ERR-FLG.
MOVE FUNCTION CURRENT-DATE TO DATETIME.
MOVE LOW-VALUE TO M081-F0M081G.
MOVE OFF-FLAG TO W401-FLAG.
PERFORM H2100-3FCLR.
MOVE XMAP-CNTRL1 TO M081-CNTRLO.
MOVE M081-F0M081S TO W-IMAP-LENG.
MOVE XMAP-RECV-MAPI TO M081-F0M081I.
MOVE W-IMAP-LENG TO M081-F0M081S.
PERFORM H2200-SPCLR.
MOVE CTS-NOW-PAGE TO W-PG.
MOVE XMAP-SENDT TO XMAP-SEND.
MOVE MAP-ID TO XMAP-SEND-PMAPNAME.
MOVE TRAN-ID TO XMAP-SEND-TRN.
MOVE W-SEND-REQ-INOUT TO XMAP-SEND-REQ.
MOVE 'DSP001 ' TO XMAP-SEND-TNAME.
MOVE W-SYSTEM-DATE TO M081-SYSTEM-DATEO.
MOVE W-SYSTEM-TIME TO M081-SYSTEM-TIMEO.
SHOKI-SHORI-999.
EXIT.
滿意的話就採納吧
⑵ 關於java的日期的小程序 求代碼 不會
用yyyy-MM-dd,,M小寫月少一天,你試下。
我的方法:不管輸入的是什麼,直接用yyyy-MM-dd去格式化成時間類型,如果轉不了,異常,給出提示說日期格式不合法;算兩個日期間相差的天數,直接用getTime()方法,得到與1970年相差毫秒數,然後兩個一減,就是兩個日期相差的毫秒數a,然後a/1000/60/60/24 就是天數了。
這是大概的思路,具體的你自己寫一下,要動手。
⑶ 小程序js文件後面的M代表什麼
這個應該是版本控制工具提示的,說明你該文件有修改(modify),M 是首字母縮寫
⑷ 開發一個小程序大概需要多少錢
如果沒有一個具體的條件限定的話是無法給出准確的價格區間的。具體介紹兩種個常見的小程序開發方式的大致費用情況:⑸ 求java小程序源代碼 在線等 急急急!!!
/*
*12.24日,完成了蛇撞到自己的檢測.修改方法是在蛇的初始化的時候,用雙循環來置FALSE;
* 在重寫代碼的時候,我借鑒了別人的思路:將整個游戲的界面定義為一個布爾型的二維數組.
* 用一個LinkedList來儲存蛇.當蛇移動的時候,在蛇的頭部增加一個節點,然後刪除最後一個節點.
* 因為只是做練習,所以沒做游戲界面,比如菜單欄,計分欄什麼的.另外還有一個問題,就是當兩次點擊回車時,蛇的移動速度會變快
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class Game {
public static void main(String args[]) {
GameFrame frame = new GameFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
frame.show();
JOptionPane.showMessageDialog(null, "上,下左,右控制蛇的方向\n回車開始,S暫停");
}
}
class GameFrame extends JFrame {
public GameFrame() {
setSize(294, 482);
setTitle("貪吃蛇DEMO");
this.setLocation(360, 100);
Container c = getContentPane();
GamePanel panel = new GamePanel();
c.add(panel, BorderLayout.CENTER);
}
}
class GamePanel extends JPanel implements KeyListener {
static int panelWidth = 294;
static int panelHeight = 450;
int rectX = 15;
int rectY = 15;
Snake snake;
Node n;
public GamePanel() {
snake = new Snake(this, panelWidth / rectX, panelHeight / rectY);
setBackground(Color.WHITE);
setSize(panelWidth, panelHeight);
setFocusable(true);
addKeyListener(this);
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
LinkedList list = snake.snakeList;
Iterator it = list.iterator();
g2.setColor(Color.black);
while (it.hasNext()) {
n = (Node) it.next();
drawNode(g2, n);
}
g2.setColor(Color.ORANGE);
Node f = snake.food;
drawNode(g2, f);
snake.drawMap(g2);// 繪制地圖
}
public void keyPressed(KeyEvent e) {
int keycode = e.getKeyCode();
if (keycode == KeyEvent.VK_ENTER) {
begin();
} else if (keycode == KeyEvent.VK_UP) {
snake.changeDirection(Snake.up);
} else if (keycode == KeyEvent.VK_DOWN) {
snake.changeDirection(Snake.down);
} else if (keycode == KeyEvent.VK_LEFT) {
snake.changeDirection(Snake.left);
} else if (keycode == KeyEvent.VK_RIGHT) {
snake.changeDirection(Snake.right);
} else if (keycode == KeyEvent.VK_S) {
Snake.run = false;
}
}
public void keyReleased(KeyEvent e) {
}
public void keyTyped(KeyEvent e) {
}
public void drawNode(Graphics2D g, Node n) {
g.fillRect(n.x * rectX, n.y * rectY, rectX - 2, rectY - 2);
}
public void begin() {
Snake.run = true;
SnakeThread thread = new SnakeThread(snake);
thread.start();
}
}
class Node {
int x;
int y;
public Node(int x, int y) {
this.x = x;
this.y = y;
}
}
class SnakeThread extends Thread {
Snake snake;
public SnakeThread(Snake s) {
snake = s;
}
public void run() {
Snake.run = true;
while (Snake.run) {
try {
snake.move();
sleep(200);
} catch (InterruptedException e) {
}
}
Snake.run = false;
}
}
class Snake {
GamePanel panel;
Node food;
boolean[][] all;
public static boolean run;
int maxX;
int maxY;
public static int left = 1;
public static int up = 2;
public static int right = 3;
public static int down = 4;
int direction = 4;
LinkedList snakeList = new LinkedList();
public Snake(GamePanel p, int maxX, int maxY) {
panel = p;
this.maxX = maxX;
this.maxY = maxY;
all = new boolean[maxX][maxY];
for (int i = 0; i < maxX; i++) {
for (int j = 0; j < maxY; j++) {
all[i][j] = false;
}
}
int arrayLength = maxX > 20 ? 10 : maxX / 2;
for (int i = 0; i < arrayLength; i++) {
int x = maxX / 10 + i;
int y = maxY / 10;
snakeList.addFirst(new Node(x, y));
all[x][y] = true;
}
food = createFood();
all[food.x][food.y] = true;
}
// 蛇移動的方法
public void move() {
Node n = (Node) snakeList.getFirst();
int x = n.x;
int y = n.y;
if (direction == 3) {
x++;
} else if (direction == 4) {
y++;
} else if (direction == 1) {
x--;
} else if (direction == 2) {
y--;
}
// 實現對蛇撞到自身的檢測
if ((0 <= x && x <= GamePanel.panelWidth / 15 - 1)
&& (0 <= y && y <= GamePanel.panelHeight / 15 - 1)) {
if (all[x][y]) {
if (x == food.x && y == food.y) {
snakeList.addFirst(food);
food = createFood();
all[food.x][food.y] = true;
} else {
JOptionPane.showMessageDialog(null, "你撞到自己了");
System.exit(0);
}
} else {
snakeList.addFirst(new Node(x, y));
all[x][y] = true;
Node l = (Node) snakeList.getLast();
snakeList.removeLast();
all[l.x][l.y] = false;
}
} else {
JOptionPane.showMessageDialog(null, "越界了,游戲結束");
System.exit(0);
}
panel.repaint();
}
public Node createFood() {
int x = 0;
int y = 0;
do {
Random r = new Random();
x = r.nextInt(maxX - 10);
y = r.nextInt(maxY - 10);
} while (all[x][y]);
return new Node(x, y);
}
//設置蛇不能回頭
public void changeDirection(int newDirection) {
if (direction % 2 != newDirection % 2) {
direction = newDirection;
}
}
public void drawMap(Graphics2D g) {
for (int i = 0; i < maxX; i++) {
for (int j = 0; j < maxY; j++) {
if (all[i][j] == true) {
g.setColor(Color.red);
g.fillRect(i, j, 4, 4);
}
}
}
}
}
⑹ 微信小程序代碼文件夾有沒有大小限制的
微信小程序的大小不能超過2M。如果超過2M也有些解決方案:
壓縮圖片或者是將圖片等資源放入伺服器
採用分包載入策略。如何分包,可以看下微信小程序的官網,有詳細說明
⑺ java編寫的程序封裝成exe後會有多大啊我寫了個小程序,代碼只有六七百行,但是打包後很大
jdk打包在一起是為了防止你移植的機器上沒有安裝jdk也能讓你程序運行。你只要保證機器上有安裝jdk的,那麼久不需要將jdk也打包成exe
⑻ 求Java 日歷的小程序的源代碼
當在一段代碼塊定義一個變數時,Java就在棧中 為這個變數分配內存空間,當該變數退出該作用域後,Java會自動釋放掉為該變數所分配的內存空間,該內存空間可以立即被另作他用。
Java內存分配中的堆
堆內存用來存放由new創建的對象和數組。 在堆中分配的內存,由Java虛擬機的自動垃圾回收器來管理。
⑼ 小程序和APP的區別,開發一個小程序要多少錢
如果是定製開發需要幾萬到十幾萬不等,APP和小程序區別如下:⑽ 求C#的小程序代碼
銳英源有專業的C#指導,保證掌握工作能力,寫上萬行軟體。