⑴ 求一个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#指导,保证掌握工作能力,写上万行软件。