`

WeekselectPanel选择一年中的某周

    博客分类:
  • JAVA
阅读更多
系统要增加工作计划功能,让每个营业部每周末分派下周本部门每个人的工作量。
用到了这个周次选择Panel。网上随便搜搜没有,就自己弄了个。
界面如图:


主功能代码
package transms.app._0all.util.weekselect;

import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.Insets;

import javax.swing.JButton;
import java.text.ParseException;
import java.util.HashMap;
import java.util.Map;

import javax.swing.JToggleButton;

import org.apache.log4j.Logger;

import transms.app._0all.util.VOUtil;
import transms.app._0all.util.providers.Colors;
import util.Info;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JToolBar;
import javax.swing.JComboBox;

public class WeekselectPanel extends JPanel {

    private static final long serialVersionUID = 1L;

    /**
     * This is the default constructor
     */
    public WeekselectPanel() {
        super();
        initialize();
        selectedyear = Integer.valueOf(VOUtil.now().substring(0, 4));
        getComboYear().setSelectedItem(String.valueOf(selectedyear));
        try {
            addWeeks(selectedyear);
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        setToday();
    }

    private int selectedyear = -1;

    public String getYear() {
        return String.valueOf(selectedyear);
    }

    private int selectedweek = -1;

    public int getWeek() {
        return selectedweek;
    }

    /**
     * 选中今天
     */
    private void setToday() {
        try {
            int currentweek = du.getWeekNumOfYearDay(VOUtil.now());
            mapButton.get(currentweek).setSelected(true);
            action(String.valueOf(currentweek));
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    Logger logger = Logger.getLogger(WeekselectPanel.class); // @jve:decl-index=0:

    Map<Integer, JToggleButton> mapButton = new HashMap<Integer, JToggleButton>(); // @jve:decl-index=0:

    Map<Integer, Color> mapMonthcolor = new HashMap<Integer, Color>(); // @jve:decl-index=0:

    Map<Integer, Color> mapSeasoncolor = new HashMap<Integer, Color>(); // @jve:decl-index=0:

    private JPanel panelWeek = null;

    private JToolBar jToolBar = null;

    private JComboBox comboYear = null;

    private JButton jButtonOK = null;

    {
        mapMonthcolor.put(1, Colors.Chartreuse3);
        mapMonthcolor.put(2, Colors.DarkOliveGreen2);
        mapMonthcolor.put(3, Colors.DarkOrange1);
        mapMonthcolor.put(4, Colors.Firebrick1);
        mapMonthcolor.put(5, Colors.Ivory2);
        mapMonthcolor.put(6, Colors.Khaki1);
        mapMonthcolor.put(7, Colors.LightSalmon);
        mapMonthcolor.put(8, Colors.OrangeRed);
        mapMonthcolor.put(9, Colors.PaleGreen);
        mapMonthcolor.put(10, Colors.PaleTurquoise1);
        mapMonthcolor.put(11, Colors.Purple3);
        mapMonthcolor.put(12, Color.CYAN);

        mapSeasoncolor.put(1, Colors.Ivory2);
        mapSeasoncolor.put(2, Colors.Ivory2);
        mapSeasoncolor.put(3, Colors.Ivory2);
        mapSeasoncolor.put(4, Colors.Chartreuse3);
        mapSeasoncolor.put(5, Colors.Chartreuse3);
        mapSeasoncolor.put(6, Colors.Chartreuse3);
        mapSeasoncolor.put(7, Colors.Purple3);
        mapSeasoncolor.put(8, Colors.Purple3);
        mapSeasoncolor.put(9, Colors.Purple3);
        mapSeasoncolor.put(10, Colors.DarkOrange1);
        mapSeasoncolor.put(11, Colors.DarkOrange1);
        mapSeasoncolor.put(12, Colors.DarkOrange1);
    }

    private DateUtil du = new DateUtil(); // @jve:decl-index=0:

    private void addWeeks(int year) throws ParseException {
        ButtonGroup bg = new ButtonGroup();
        getPanelWeek().removeAll();
        mapButton.clear();
        for (int i = 1; i < 55; i++) {
            String sun = du.getYearWeekFirstDay(year, i);
            String sat = du.getYearWeekEndDay(year, i);
            if (!sat.startsWith(String.valueOf(year))) {
                continue;
            }
            if (mapButton.get(i) == null) {
                JToggleButton button = new JToggleButton(String.valueOf(i));
                mapButton.put(i, button);
                getPanelWeek().add(mapButton.get(i));
                bg.add(mapButton.get(i));
                mapButton.get(i).addActionListener(getButtonAction());
            }
            mapButton.get(i).setMargin(new Insets(0, 0, 0, 0));
            mapButton.get(i).setToolTipText(
                    i + " " + du.getMonth(sun) + " " + sun + " - " + sat);
            mapButton.get(i).setForeground(mapMonthcolor.get(du.getMonth(sat)));
            mapButton.get(i).setBackground(mapSeasoncolor.get(du.getMonth(sat)));
            mapButton.get(i).setActionCommand(String.valueOf(i));

        }
    }

    private ActionListener getButtonAction() {
        return new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                action(e.getActionCommand());
            }
        };
    }

    private void action(String actionCommand) {
        selectedweek = Integer.valueOf(actionCommand);
        try {
            getJButtonOK().setText(
                    actionCommand
                            + "周 "
                            + du.getYearWeekFirstDay(Integer.valueOf(getComboYear()
                                    .getSelectedItem().toString()), selectedweek)
                            + Info.labelInfo("to")
                            + du.getYearWeekEndDay(Integer.valueOf(getComboYear()
                                    .getSelectedItem().toString()), selectedweek));
        } catch (NumberFormatException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (ParseException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }

    }

    /**
     * This method initializes this
     * 
     * @return void
     */
    private void initialize() {
        this.setLayout(new BorderLayout());
        this.setSize(312, 102);
        this.add(getPanelWeek(), BorderLayout.CENTER);
        this.add(getJToolBar(), BorderLayout.NORTH);
        this.setBorder(BorderFactory.createEtchedBorder());
    }

    /**
     * This method initializes panelWeek
     * 
     * @return javax.swing.JPanel
     */
    private JPanel getPanelWeek() {
        if (panelWeek == null) {
            GridLayout gridLayout1 = new GridLayout(0, 13);
            panelWeek = new JPanel();
            panelWeek.setLayout(gridLayout1);
        }
        return panelWeek;
    }

    /**
     * This method initializes jToolBar
     * 
     * @return javax.swing.JToolBar
     */
    private JToolBar getJToolBar() {
        if (jToolBar == null) {
            jToolBar = new JToolBar();
            jToolBar.add(getComboYear());
            jToolBar.add(getJButtonOK());
        }
        return jToolBar;
    }

    /**
     * This method initializes comboYear
     * 
     * @return javax.swing.JComboBox
     */
    private JComboBox getComboYear() {
        if (comboYear == null) {
            String[] years = { "2009", "2010", "2011", "2012", "2013", "2014", "2015",
                    "2016", "2017", "2018", "2019", "2020" };
            comboYear = new JComboBox(years);
            comboYear.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    selectedyear = Integer
                            .valueOf(comboYear.getSelectedItem().toString());
                    try {
                        addWeeks(selectedyear);
                    } catch (NumberFormatException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                    } catch (ParseException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                    }
                }
            });
        }
        return comboYear;
    }

    /**
     * This method initializes jButtonOK
     * 
     * @return javax.swing.JButton
     */
    private JButton getJButtonOK() {
        if (jButtonOK == null) {
            jButtonOK = new JButton();
            jButtonOK.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent e) {
                    logger.info(selectedyear + " " + selectedweek);
                }
            });
        }
        return jButtonOK;
    }

} // @jve:decl-index=0:visual-constraint="10,9"


日期处理工具,网上随便搜的:
package transms.app._0all.util.weekselect;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;
import java.util.GregorianCalendar;

/**
 * 说明: 取日期时间工具
 */
public class DateUtil {
    /**
     * @see 取得当前日期(格式为:yyyy-MM-dd)
     * @return String
     */
    public String GetDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String sDate = sdf.format(new Date());
        return sDate;
    }

    /**
     * @see 取得当前时间(格式为:yyy-MM-dd HH:mm:ss)
     * @return String
     */
    public static String GetDateTime() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String sDate = sdf.format(new Date());
        return sDate;
    }

    /**
     * @see 按指定格式取得当前时间()
     * @return String
     */
    public String GetTimeFormat(String strFormat) {
        SimpleDateFormat sdf = new SimpleDateFormat(strFormat);
        String sDate = sdf.format(new Date());
        return sDate;
    }

    /**
     * @see 取得指定时间的给定格式()
     * @return String
     * @throws ParseException
     */
    public String SetDateFormat(String myDate, String strFormat) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat(strFormat);
        String sDate = sdf.format(sdf.parse(myDate));
        return sDate;
    }

    public String FormatDateTime(String strDateTime, String strFormat) {
        String sDateTime = strDateTime;
        try {
            Calendar Cal = parseDateTime(strDateTime);
            SimpleDateFormat sdf = null;
            sdf = new SimpleDateFormat(strFormat);
            sDateTime = sdf.format(Cal.getTime());
        } catch (Exception e) {
        }
        return sDateTime;
    }

    public static Calendar parseDateTime(String baseDate) {
        Calendar cal = null;
        cal = new GregorianCalendar();
        int yy = Integer.parseInt(baseDate.substring(0, 4));
        int mm = Integer.parseInt(baseDate.substring(5, 7)) - 1;
        int dd = Integer.parseInt(baseDate.substring(8, 10));
        int hh = 0;
        int mi = 0;
        int ss = 0;
        if (baseDate.length() > 12) {
            hh = Integer.parseInt(baseDate.substring(11, 13));
            mi = Integer.parseInt(baseDate.substring(14, 16));
            ss = Integer.parseInt(baseDate.substring(17, 19));
        }
        cal.set(yy, mm, dd, hh, mi, ss);
        return cal;
    }

    public int getDay(String strDate) {
        Calendar cal = parseDateTime(strDate);
        return cal.get(Calendar.DATE);
    }

    public int getMonth(String strDate) {
        Calendar cal = parseDateTime(strDate);
        return cal.get(Calendar.MONTH) + 1;
    }

    public int getWeekDay(String strDate) {
        Calendar cal = parseDateTime(strDate);
        return cal.get(Calendar.DAY_OF_WEEK);
    }

    public String getWeekDayName(String strDate) {
        String mName[] = { "日", "一", "二", "三", "四", "五", "六" };
        int iWeek = getWeekDay(strDate);
        iWeek = iWeek - 1;
        return "星期" + mName[iWeek];
    }

    public int getYear(String strDate) {
        Calendar cal = parseDateTime(strDate);
        return cal.get(Calendar.YEAR) + 1900;
    }

    public String DateAdd(String strDate, int iCount, int iType) {
        Calendar Cal = parseDateTime(strDate);
        int pType = 0;
        if (iType == 0) {
            pType = 1;
        } else if (iType == 1) {
            pType = 2;
        } else if (iType == 2) {
            pType = 5;
        } else if (iType == 3) {
            pType = 10;
        } else if (iType == 4) {
            pType = 12;
        } else if (iType == 5) {
            pType = 13;
        }
        Cal.add(pType, iCount);
        SimpleDateFormat sdf = null;
        if (iType <= 2)
            sdf = new SimpleDateFormat("yyyy-MM-dd");
        else
            sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String sDate = sdf.format(Cal.getTime());
        return sDate;
    }

    public String DateAdd(String strOption, int iDays, String strStartDate) {
        if (!strOption.equals("d"))
            ;
        return strStartDate;
    }

    public int DateDiff(String strDateBegin, String strDateEnd, int iType) {
        Calendar calBegin = parseDateTime(strDateBegin);
        Calendar calEnd = parseDateTime(strDateEnd);
        long lBegin = calBegin.getTimeInMillis();
        long lEnd = calEnd.getTimeInMillis();
        int ss = (int) ((lBegin - lEnd) / 1000L);
        int min = ss / 60;
        int hour = min / 60;
        int day = hour / 24;
        if (iType == 0)
            return hour;
        if (iType == 1)
            return min;
        if (iType == 2)
            return day;
        else
            return -1;
    }

    /***************************************************************************
     * @功能 判断某年是否为闰年
     * @return boolean
     * @throws ParseException
     **************************************************************************/
    public boolean isLeapYear(int yearNum) {
        boolean isLeep = false;
        /** 判断是否为闰年,赋值给一标识符flag */
        if ((yearNum % 4 == 0) && (yearNum % 100 != 0)) {
            isLeep = true;
        } else if (yearNum % 400 == 0) {
            isLeep = true;
        } else {
            isLeep = false;
        }
        return isLeep;
    }

    /***************************************************************************
     * @功能 计算当前日期某年的第几周
     * @return interger
     * @throws ParseException
     **************************************************************************/
    public int getWeekNumOfYear() {
        Calendar calendar = Calendar.getInstance();
        int iWeekNum = calendar.get(Calendar.WEEK_OF_YEAR);
        return iWeekNum;
    }

    /***************************************************************************
     * @功能 计算指定日期某年的第几周
     * @return interger
     * @throws ParseException
     **************************************************************************/
    public int getWeekNumOfYearDay(String strDate) throws ParseException {
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        Date curDate = format.parse(strDate);
        calendar.setTime(curDate);
        int iWeekNum = calendar.get(Calendar.WEEK_OF_YEAR);
        return iWeekNum;
    }

    /***************************************************************************
     * @功能 计算某年某周的开始日期
     * @return interger
     * @throws ParseException
     **************************************************************************/
    public String getYearWeekFirstDay(int yearNum, int weekNum) throws ParseException {

        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.YEAR, yearNum);
        cal.set(Calendar.WEEK_OF_YEAR, weekNum);
        cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
        // 分别取得当前日期的年、月、日
        String tempYear = Integer.toString(cal.get(Calendar.YEAR));
        String tempMonth = Integer.toString(cal.get(Calendar.MONTH) + 1);
        String tempDay = Integer.toString(cal.get(Calendar.DATE));
        String tempDate = tempYear + "-" + tempMonth + "-" + tempDay;
        return SetDateFormat(tempDate, "yyyy-MM-dd");

    }

    /***************************************************************************
     * @功能 计算某年某周的结束日期
     * @return interger
     * @throws ParseException
     **************************************************************************/
    public String getYearWeekEndDay(int yearNum, int weekNum) throws ParseException {
        Calendar cal = Calendar.getInstance();
        cal.set(Calendar.YEAR, yearNum);
        cal.set(Calendar.WEEK_OF_YEAR, weekNum + 1);
        cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
        // 分别取得当前日期的年、月、日
        String tempYear = Integer.toString(cal.get(Calendar.YEAR));
        String tempMonth = Integer.toString(cal.get(Calendar.MONTH) + 1);
        String tempDay = Integer.toString(cal.get(Calendar.DATE));
        String tempDate = tempYear + "-" + tempMonth + "-" + tempDay;
        return SetDateFormat(tempDate, "yyyy-MM-dd");
    }

    /***************************************************************************
     * @功能 计算某年某月的开始日期
     * @return interger
     * @throws ParseException
     **************************************************************************/
    public String getYearMonthFirstDay(int yearNum, int monthNum) throws ParseException {

        // 分别取得当前日期的年、月、日
        String tempYear = Integer.toString(yearNum);
        String tempMonth = Integer.toString(monthNum);
        String tempDay = "1";
        String tempDate = tempYear + "-" + tempMonth + "-" + tempDay;
        return SetDateFormat(tempDate, "yyyy-MM-dd");

    }

    /***************************************************************************
     * @功能 计算某年某月的结束日期
     * @return interger
     * @throws ParseException
     **************************************************************************/
    public String getYearMonthEndDay(int yearNum, int monthNum) throws ParseException {

        // 分别取得当前日期的年、月、日
        String tempYear = Integer.toString(yearNum);
        String tempMonth = Integer.toString(monthNum);
        String tempDay = "31";
        if (tempMonth.equals("1") || tempMonth.equals("3") || tempMonth.equals("5")
                || tempMonth.equals("7") || tempMonth.equals("8")
                || tempMonth.equals("10") || tempMonth.equals("12")) {
            tempDay = "31";
        }
        if (tempMonth.equals("4") || tempMonth.equals("6") || tempMonth.equals("9")
                || tempMonth.equals("11")) {
            tempDay = "30";
        }
        if (tempMonth.equals("2")) {
            if (isLeapYear(yearNum)) {
                tempDay = "29";
            } else {
                tempDay = "28";
            }
        }
        // System.out.println("tempDay:" + tempDay);
        String tempDate = tempYear + "-" + tempMonth + "-" + tempDay;
        return SetDateFormat(tempDate, "yyyy-MM-dd");
    }
}


自定义颜色类:
package transms.app._0all.util.providers;

import java.awt.Color;

public class Colors extends Color {

    private static final long serialVersionUID = 3680677118390160469L;

    public Colors(int rgb) {
        super(rgb);
    }

    /**
     * 淡黄
     */
    public static final Color Khaki1 = new Color(255, 246, 143);

    /**
     * 浅蓝
     */
    public static final Color PaleTurquoise1 = new Color(187, 255, 255);

    /**
     * 背景色
     */
    public static final Color Ivory2 = new Color(238, 238, 224);

    /**
     * 火红
     */
    public static final Color Firebrick1 = new Color(255, 48, 48);

    /**
     * 暗绿
     */
    public static final Color Chartreuse3 = new Color(69, 139, 0);

    /**
     * 紫
     */
    public static final Color Purple3 = new Color(125, 38, 205);

    /**
     * 橘红
     */
    public static final Color OrangeRed = new Color(255, 69, 0);

    /**
     * 暗橙
     */
    public static final Color DarkOrange1 = new Color(255, 127, 0);

    /**
     * 暗橄榄绿
     */
    public static final Color DarkOliveGreen2 = new Color(188, 238, 104);

    /**
     * 淡红
     */
    public static final Color LightSalmon = new Color(255, 160, 122);

    /**
     * 淡绿
     */
    public static final Color PaleGreen = new Color(152, 251, 152);
}
  • 大小: 6 KB
分享到:
评论

相关推荐

    城市GDP.npz

    城市GDP.npz

    基于深度学习的语音增强、去混响

    基于深度特征映射的语音增强方法 本项目为可以利用DNN和CNN的方法来进行语音增强,其中DNN使用的三个隐层每个隐层512个节点,CNN使用的是R-CED的网络结构并且加入了一些resnet来防止过拟合。你也可以选择是否使用dropout或者l2等。 使用: 第一步. 运行 ex_trac.sh 数据准备并将数据分成训练集和交叉验证集,然后提取 log spectragram 特征. 第二步. 运行 train.sh 来训练和测试模型. 第三步. 运行 ca_pesq.sh 使用PESQ来评价你的结果。

    昭春落日iPad水彩胶带第2期-课程网盘链接提取码下载 .txt

    本期课程将继续探索iPad水彩胶带绘画技巧,以昭春落日为主题,引导学员掌握绘画技巧和色彩运用,创作独特的水彩作品。通过实践与指导,学员将提升绘画技能,感受艺术的魅力,展现个性化创作,享受绘画带来的乐趣与成就感。 课程大小:8.6G

    永磁起重器使用与维护手册

    永磁起重器使用与维护手册

    机械设计测漏机sw21可编辑非常好的设计图纸100%好用.zip

    机械设计测漏机sw21可编辑非常好的设计图纸100%好用.zip

    纵横科技产品服务手册 FPM120TC-T 说明书

    纵横科技产品服务手册 FPM120TC-T 说明书

    如何提升产品的广告变现效率?.docx

    如何提升产品的广告变现效率?.docx

    机械设计灯板自动插线设备sw18可编辑非常好的设计图纸100%好用.zip

    机械设计灯板自动插线设备sw18可编辑非常好的设计图纸100%好用.zip

    LORA 模型 pantPullDownLora_pantpulldownV1.safetensors

    pantPullDownLora_pantpulldownV1

    经典CNN网络之AlexNet 对7种小麦叶片病害分类

    【基于Alexnet对7种小麦叶片病害分类】 【包含代码、数据集和训练好的权重文件,可直接运行】 项目总大小:640 MB 本数据集分为以下7类别:水泡,褐色斑点等等 下载解压后的图像目录:训练集(16,149张图片)、和测试集(678张图片) data-train 训练集-每个子文件夹放同类别的图像,文件夹名为分类类别 data-test 测试集-每个子文件夹放同类别的图像,文件夹名为分类类别 【项目介绍】 网络训练的时候采用cos 学习率自动衰减,简单测试了10个epoch。模型在测试集最好的表现达到88.9%精度,加大epoch可以增加精度。在run_results 目录下存有最好的权重文件,以及训练日志和loss、精度曲线等等 预测的时候,只需要运行predict即可,代码会自动将inference下所有图片推理,并取前三个概率最大类别的绘制在左上角 【训练自己的数据参考readme文件,不需要更改,代码会自动生成,例如分类类别个数等等】

    LORA 模型 lactation_v10.safetensors

    lactation_v10

    httpsyy70958.com29875videoplayvid45958.m3u8..m3u

    httpsyy70958.com29875videoplayvid45958.m3u8..m3u

    机械设计VFFS Makinesi-1包装机sw14非常好的设计图纸100%好用.zip

    机械设计VFFS Makinesi-1包装机sw14非常好的设计图纸100%好用.zip

    Java毕业设计-基于Springboot的医院管理系统的设计与实现 (源码+数据库+文档).zip

    基于Spring Boot的医院管理系统涉及多个功能模块,如病人管理、医生管理、预约挂号、医疗记录管理。以下是一个基本的设计和实现建议: 1. 数据库设计:设计合适的数据库模式来存储医院相关的信息,如病人信息、医生信息、预约信息等。可以使用关系型数据库(如MySQL、PostgreSQL)或非关系型数据库(如MongoDB。 2. 后端(Spring Boot)部分: - 定义实体类:根据数据库设计,在后端定义实体类来映射数据库中的表结构。 - 数据访问层(DAO):使用Spring Data JPA或者MyBatis等技术,编写数据访问层代码,用与数据库进行交互,包括增删改查等操作。 - 业务逻辑层(Service):定义业务逻辑,包括对病人、医生、预约等信息的管理和操作。可以使用@Service注解标识这些服务类,并在其中注入相应的DAO层组件。 - 控制器层(Controller):使用@RestController注解标记控制器类,定义各个接口以供前端调用。在接口中处理请求、调用服务层处理业务逻辑,并返回相应的数据。 3. 前端部分: - 页

    node-v12.22.3-darwin-x64.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    php-8.2.18-Win32-vs16-x64.rar

    php-8.2.18-Win32-vs16-x64.rar

    node-v10.16.0-sunos-x64.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    XC03-W4DI 说明书

    XC03-W4DI 说明书

    node-v12.22.6-darwin-x64.tar.xz

    Node.js,简称Node,是一个开源且跨平台的JavaScript运行时环境,它允许在浏览器外运行JavaScript代码。Node.js于2009年由Ryan Dahl创立,旨在创建高性能的Web服务器和网络应用程序。它基于Google Chrome的V8 JavaScript引擎,可以在Windows、Linux、Unix、Mac OS X等操作系统上运行。 Node.js的特点之一是事件驱动和非阻塞I/O模型,这使得它非常适合处理大量并发连接,从而在构建实时应用程序如在线游戏、聊天应用以及实时通讯服务时表现卓越。此外,Node.js使用了模块化的架构,通过npm(Node package manager,Node包管理器),社区成员可以共享和复用代码,极大地促进了Node.js生态系统的发展和扩张。 Node.js不仅用于服务器端开发。随着技术的发展,它也被用于构建工具链、开发桌面应用程序、物联网设备等。Node.js能够处理文件系统、操作数据库、处理网络请求等,因此,开发者可以用JavaScript编写全栈应用程序,这一点大大提高了开发效率和便捷性。 在实践中,许多大型企业和组织已经采用Node.js作为其Web应用程序的开发平台,如Netflix、PayPal和Walmart等。它们利用Node.js提高了应用性能,简化了开发流程,并且能更快地响应市场需求。

    信息技术填空选择100题

    总结出了信息技术课程常考的100道填空题,答案在花括号内。制卷时只需要将花括号及其中的内容替换成圆括号即可。

Global site tag (gtag.js) - Google Analytics