NewMoonDog 影子狗 基于JavaScript的跑酷游戏,复制就能玩

2023-10-29

这是一款横版跑酷类游戏,应为是JavaScript的所以不需要其他复杂的配置和环境,点击就能运行

线上试玩:http://longsong.games/newmoon

文末有代码地址

操作介绍:

↑ 跳跃 ↓ 坐下 跳砍 ← 往后跑 → 向前跑 enter 无敌翻滚 d 显示外形 q 重新开始游戏 energy 能量


 

 下面是项目的目录:

其中主要的几个:

main.js:

import { Player } from './player.js';
import { InputHandle } from './input.js';
import { Background} from './background.js';
import { FlyingEnemy, ClimbEnemy, GroundEnemy} from './enemies.js';
import { UI } from './UI.js';

window.addEventListener('load', function(){
    const canvas = document.getElementById('canvas1');
    const ctx = canvas.getContext('2d');
    canvas.width = 900;
    canvas.height = 500;
    let enemies = [];
    let score = 0;
    class Game{
        constructor(width, height){
            this.width = width;
            this.height = height;
            this.groundMargin = 40;
            this.speed = 0;
            this.maxSpeed = 5;
            this.background = new Background(this);
            this.player = new Player(this);
            this.input = new InputHandle(this);
            this.UI = new UI(this);
            this.enemies = [];
            this.particles = [];
            this.collisions = [];
            this.floatingMessages = [];
            this.maxParticles = 200;
            this.enemyTimer = 0;
            this.enemyInterval = 1000;
            this.debug = true;
            this.score = 0;
            this.energy = 0;
            this.time = 0;
            this.winningScore = 40;
            this.maxTime = 300000;
            this.fontColor = 'black';
            this.player.currentState = this.player.state[0];
            this.player.currentState.enter();
            this.lives = 5;
            this.game = false;
            this.pan = 1;
        }
        update(deltaTime){
            this.time += deltaTime;
            if (this.time > this.maxTime) this.gameOver = true;
            if (this.energy >= 0 ) this.energy += 1;
            if (this.energy < 0 && this.pan == 1 )this.energy += 1;
            this.background.update();
            this.player.update(this.input.keys, deltaTime);
            if(this.enemyTimer > this.enemyInterval){
                this.addEnemy();
                this.enemyTimer =0;
                
            }
            else {
                this.enemyTimer += deltaTime;
            }
            //handleEnemies
            this.enemies.forEach(enemy =>{
                enemy.update(deltaTime);
            })
            //handle message
            this.floatingMessages.forEach(message =>{
                message.update(deltaTime);
            })
            //handle partyicles
            this.particles.forEach((particle, index) =>{
                particle.update();
            });
            if (this.particles.length > this.maxParticles) {
                this.particles.length = this.maxParticles;
            }
            this.collisions.forEach((collision, index) => {
                collision.update(deltaTime);

            });
            this.collisions = this.collisions.filter(collision => !collision.markedForDeletion);
            this.particles = this.particles.filter(particle => !particle.markedForDeletion);
            this.enemies = this.enemies.filter(enemy => !enemy.markedForDeletion);
            this.floatingMessages = this.floatingMessages.filter(message => !message.markedForDeletion);
        }
        
        draw(context){

            this.background.draw(context);
            this.player.draw(context);
            this.enemies.forEach(enemy =>{
                enemy.draw(context);
            });
            this.particles.forEach(particle => {
                particle.draw(context);
            });
            this.collisions.forEach(collision => {
                collision.draw(context);
            this.floatingMessages.forEach(message =>{
                 message.draw(context);
            })
            });
            this.UI.draw(context);
        }
        addEnemy(){
            if (this.speed > 0 && Math.random() < 0.5) this.enemies.push(new GroundEnemy(this));
            else if (this.speed > 0 ) this.enemies.push(new ClimbEnemy(this));
            this.enemies.push(new FlyingEnemy(this));
            console.log(this.enemies);
        }
        restartGame(){
            this.player.restart();
            this.background.restart();
            this.enemies = [];
            this.gameOver = false;
            this.score = 0;
            this.energy = 0;
            this.lives = 5;
            this.time = 0;
            animate(0);
        }
    }

    const game = new Game(canvas.width, canvas.height);
    let lastTime = 0;
    

    function animate(timeStamp){
        const deltaTime = timeStamp - lastTime;
        lastTime = timeStamp;
        ctx.clearRect(0, 0, canvas.width, canvas.height);
        game.update(deltaTime);
        game.draw(ctx);
        if (!game.gameOver) requestAnimationFrame(animate);
    }
    animate(0);
})


 

player.js

import { Sitting, Runing, Jumping, Falling, Rolling, Diving, Hit} from './playerStates.js';
import { CollisionAnimation } from './CollisionAnimation.js'
import { FloatingMessage } from './floatingMessages.js'

export class Player{
    constructor(game){
        this.game = game;
        this.width = 100;
        this.height = 91.3;
        this.x = 0;
        this.y = this.game.height - this.height - this.game.groundMargin;
        this.vy = 0;
        this.weight = 1;
        this.image = document.getElementById('player');
        this.frameX = 0;  //第几行图片
        this.frameY = 0;   //第几个状态
        this.maxFrame;
        this.fps = 20;        //帧数
        this.frameInterval = 500/this.fps;
        this.f = 0;
        this.speed = 0;
        this.maxSpeed = 10;
        this.state = [new Sitting(this.game), new Runing(this.game), new Jumping(this.game), new Falling(this.game), new Rolling(this.game), new Diving(this.game), new Hit(this.game)];
        this.currentState = null;
        
    }
    update(input, deltaTime){
        //this.x++;
        //horizon movement
        this.checkCollision();
        this.currentState.handleInput(input);
        this.x += this.speed;
        if (input.includes('ArrowRight') && this.currentState !== this.state[6]) this.speed = this.maxSpeed;
        else if (input.includes('ArrowLeft') && this.currentState !== this.state[6]) this.speed = -this.maxSpeed;
        else this.speed = 0;
        if (this.currentState === this.state[4]) this.game.energy -= 4;
        if (this.x <0) this.x = 0;
        if (this.x > this.game.width - this.width) this.x = this.game.width - this.width;
        //vertical movement
        this.y += this.vy;
        if (!this.onGround()) this.vy += this.weight;
        else this.vy = 0;
        //console.log(this.game.height - this.height);
        // sprite animation
        if (this.y > this.game.height - this.height - this.game.groundMargin) this.y = this.game.height - this.height - this.game.groundMargin;
        if (this.f > this.frameInterval){
            this.f = 0;
            if (this.frameX < this.maxFrame) this.frameX++;
            else this.frameX = 0;
        }
        else {
            this.f =this.f +  deltaTime;
            
        }
        
        //if (this.frameX < this.maxFrame) this.frameX++;
        //else this.frameX = 0;
    }
    restart(){
        this.x = 0;
        this.y = this.game.height - this.height - this.game.groundMargin;
        
    }
    draw(context){
        if (this.game.debug) context.strokeRect(this.x, this.y ,this.width, this.height);
        context.drawImage(this.image, this.frameX * this.width, this.frameY * this.height, this.width, this.height,this.x,this.y, this.width, this.height);
    }
    onGround(){
        return this.y >= this.game.height - this.height - this.game.groundMargin;
    }
    setState(state, speed){
        this.currentState = this.state[state];
        this.game.speed = this.game.maxSpeed * speed;
        this.currentState.enter();
    }
    checkCollision(){

        this.game.enemies.forEach(enemy => {

            if (enemy.x < this.x + this.width && 
                enemy.x + enemy.width > this.x &&
                enemy.y < this.y + this.height &&
                enemy.y + enemy.height > this.y
            ){
                enemy.markedForDeletion = true;
                this.game.collisions.push(new CollisionAnimation(this.game, enemy.x + enemy.width * 0.5,enemy.y + enemy.height * 0.5 ));
                if (this.currentState === this.state[4] || this.currentState ===this.state[5]){
                    this.game.score++;
                    this.game.energy += 100;
                    this.game.floatingMessages.push(new FloatingMessage('+1', enemy.x, enemy.y,150, 50));
                }
                else {
                    this.setState(6, 0);
                    this.game.score -=5 ;
                    this.game.lives --;
                    if (this.game.lives <= 0) this.game.gameOver = true;
                }
                //collosion detected
            } else {
                //no collision
            }
        });
    }
}

 

playerState.js

import { Dust,Fire,Splash } from './particles.js'

const state = { //状态
    SITTING: 0,
    RUNNING: 1,
    JUMPING: 2,
    FALLING: 3,
    ROLLING: 4,
    DIVING: 5,
    HIT: 6
}

class State {
    constructor(state, game){
        this.state = state;
        this.game = game;

    }
}

export class Sitting extends State {
    constructor(game){
        super('SITTING', game);

    }
    enter(){
        this.game.player.frameX = 0;
        this.game.player.frameY = 5;
        this.game.player.maxFrame = 4;
    }
    handleInput(input){
//对初始状态的输入
        if (input.includes('ArrowLeft') || input.includes('ArrowRight')){
            this.game.player.setState(state.RUNNING, 1);
        }
        else if (input.includes('ArrowUp')){
            this.game.player.setState(state.JUMPING, 1);
        }
        else if (input.includes('Enter') && this.game.energy >= 0){
            this.game.player.setState(state.ROLLING, 2);
        }

    }
}
export class Runing extends State { //奔跑
    constructor(game){
        super('RUNNING', game);

    }
    enter(){
        this.game.player.frameX = 0;
        this.game.player.frameY = 3;
        this.game.player.maxFrame = 8;
    }
    handleInput(input){
        if (input.includes('Enter')) {
            this.game.pan = 0;
        }
        else this.game.pan = 1;
        this.game.particles.unshift(new Dust(this.game, this.game.player.x + this.game.player.width * 0.7, this.game.player.y + this.game.player.height));
        if (input.includes('ArrowDown')){
            this.game.player.setState(state.SITTING, 0);
        }
        else if (input.includes('ArrowUp')){
            this.game.player.setState(state.JUMPING, 1);
        }else if (input.includes('Enter')&& this.game.energy >= 0){
            this.game.player.setState(state.ROLLING, 2);
        }
    }
}
export class Jumping extends State { //跳远

    constructor(game){
        super('JUMPING',game);
    }
    enter(){
        if (this.game.player.onGround()) this.game.player.vy -= 27;
        this.game.player.frameX = 0;
        this.game.player.frameY = 1;
        this.game.player.maxFrame = 6;
    }
    handleInput(input){
        if (input.includes('Enter')) {
            this.game.pan = 0;
        }
        else this.game.pan = 1;
        if (this.game.player.vy > this.game.player.weight){
            this.game.player.setState(state.FALLING, 1);
        }else if (input.includes('Enter') && this.game.energy >= 0){
            this.game.player.setState(state.ROLLING, 2);
        }else if (input.includes('ArrowDown')){
            this.game.player.setState(state.DIVING, 0);
        }
    }
}

export class Falling extends State { //掉落
    constructor(game){
        super('FALLING', game);
    }
    enter(){
        this.game.player.frameX = 0;
        this.game.player.frameY = 2;
        this.game.player.maxFrame = 6;
    }
    handleInput(input){
        if (input.includes('Enter')) {
            this.game.pan = 0;
        }
        else this.game.pan = 1;
        if (this.game.player.onGround()){
            this.game.player.setState(state.RUNNING, 1);
        }else if (input.includes('ArrowDown')){
            this.game.player.setState(state.DIVING, 0);
        }else if (input.includes('Enter') && this.game.energy >= 0){
            this.game.player.setState(state.ROLLING, 2);
        }
    }
}

export class Rolling extends State { //冲刺
    constructor(game){
        super('ROLLING', game);

    }
    enter(){
        this.game.player.frameX = 0;
        this.game.player.frameY = 6;
        this.game.player.maxFrame = 6;
    }
    handleInput(input){
        this.game.particles.unshift(new Fire(this.game, this.game.player.x + this.game.player.width * 0.5, this.game.player.y + this.game.player.height * 0.5));
        if (this.game.energy < 0){
            if (this.game.player.onGround()){

            this.game.player.setState(state.RUNNING, 1);

        } else if (!this.game.player.onGround()){
            this.game.player.setState(state.FALLING, 1);

        } else if ( input.includes('ArrowUp') && this.game.player.onGround()){
            this.game.player.vy -= 27;

        } else if (input.includes('ArrowDown') && !this.game.player.onGround()) {
            this.game.player.vy -= 27;

        }
        }else{
            if (!input.includes('Enter') && this.game.player.onGround()){

            this.game.player.setState(state.RUNNING, 1);

        } else if (!input.includes('Enter') && !this.game.player.onGround()){
            this.game.player.setState(state.FALLING, 1);

        } else if (input.includes('Enter') && input.includes('ArrowUp') && this.game.player.onGround()){
            this.game.player.vy -= 27;

        } else if (input.includes('ArrowDown') && !this.game.player.onGround()) {
            this.game.player.vy -= 27;

        }
        }

    }
}

export class Diving extends State { //急速下坠
    constructor(game){
        super('DIVING', game);

    }
    enter(){
        this.game.player.frameX = 0;
        this.game.player.frameY = 6;
        this.game.player.maxFrame = 6;
        this.game.player.vy = 15;
    }
    handleInput(input){
        if (input.includes('Enter')) {
            this.game.pan = 0;
        }
        else this.game.pan = 1;
        this.game.particles.unshift(new Fire(this.game, this.game.player.x + this.game.player.width * 0.5, this.game.player.y + this.game.player.height * 0.5));
        if (this.game.player.onGround()){
            this.game.player.setState(state.RUNNING, 1);
            for(let i = 0; i < 30;i++){
                this.game.particles.unshift(new Splash(this.game, this.game.player.x + this.game.player.width * 0.5, this.game.player.y + this.game.player.height * 0.5));
            }
            
        } else if (input.includes('Enter') && !this.game.player.onGround()){
            this.game.player.setState(state.ROLLING, 2);
        }
    }
}

export class Hit extends State { //眩晕
    constructor(game){
        super('HIT', game);
    }
    enter(){
        this.game.player.frameX = 0;
        this.game.player.frameY = 4;
        this.game.player.maxFrame = 10;
    }
    handleInput(input){
        if (this.game.player.frameX >= 10 && this.game.player.onGround() ){
            this.game.player.setState(state.RUNNING, 1);
        } else if (this.game.player.frameX >= 10 && !this.game.player.onGround()){
            this.game.player.setState(state.FALLING, 1);
        }
    }
}

 代码库:

https://github.com/longsongline/NewMoonDog/icon-default.png?t=N2N8https://github.com/longsongline/NewMoonDog/

哪里看不懂的可以在下面留言,或者私信问我

图片我都上传到自己的服务器上上了,所以代码库里没有图片

参考:十个小时教程 ,喜欢的可以自己跟着教程做出一个差不多样子的

https://www.youtube.com/watch?v=GFO_txvwK_c&list=WL&index=12

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

NewMoonDog 影子狗 基于JavaScript的跑酷游戏,复制就能玩 的相关文章

  • 创建便利贴(便利贴)[关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 我正在设计一个网页 我想在我的页面中使用便利贴 便利贴 其中 当我们单击添加按钮时会添加每个便签 便签的颜色必须随机变化 并且必须倾斜并且
  • 在选择下拉列表中选择特定选项时添加输入框

    我需要在选择选项时将输入添加到选择选项中 每当用户选择 其他 时 就会出现一个输入框供用户输入数据 HTML
  • 在 Cytoscape.js 中为家谱设置边缘样式

    我有一个使用 Django 的家谱应用程序 我正在尝试使用http js cytoscape org http js cytoscape org对于用户界面 我想设置之间的边缘样式浪漫的伴侣像这样 http www eprintableca
  • 列表项的替代背景颜色

    我有一个列表 每个项目都是链接的 有没有办法可以替换每个项目的背景颜色 ul li a href link Link 1 a li li a href link Link 2 a li li a href link Link 3 a li
  • 在 Fabric.js 中进行裁剪的“toDataURL”函数中,Multiplier 属性无法正常工作

    我的原始尺寸canvas is 800X700 我在用clipTo要在画布的选定部分中工作 var rect new fabric Rect left 100 top 50 fill fff width 376 height 602 str
  • HTML5 Audio Element 无法在 IOS 11 设备上的 safari 中播放 mp3 直播

    我是一家广播公司的网络开发人员 自 iOS 11 发布以来 我们收到了一些用户投诉 称我们的音频直播流无法再在 IOS 11 设备上播放 为了将流嵌入我们的网站 我们使用 HTML5 AudioElement 在 iOS 11 的 iPho
  • 如何在 vuejs 中防止/停止点击传播

    我有一个递归列表 树 每个元素都有一个 click sayHello el id 现在的问题是 因为它是一个嵌套列表 例如 list element 0 01 list el 1 01 list el 2 01 list el 1 02 l
  • 如何让更大的布局适合小设备屏幕?

    我有一个小问题meta viewport元素 问题是我的布局min width比我想要使用的许多屏幕分辨率都要大 所以将其设置为 没有帮助 结果我得到的页面必须缩小以适应设备宽度 如果我什至添加像 它也不起作用 发现了一个黑客来自CSS 技
  • 如何在 jQgrid 中隐藏列但在添加/编辑面板中显示此列

    我想要一种我使用的控制形式 但字段数量太高了 如何显示网格 但只有表单添加 编辑弹出面板中的某些字段显示所有字段 以下是您可以执行此操作的方法 colModel name email label E mail editable true h
  • 如何按日期升序对对象进行排序?

    如果我有一个对象列表 var objectList LIST OF OBJECT each object列表中包含三个属性 name date gender 如何按 对列表中的对象进行排序date 属性升序 the date 属性包含字符串
  • 将 JSON 字符串传递给 Django 模板

    我一直在用头撞墙 试图找出为什么我无法将从 Django 模型生成的 JSON 字符串传递到模板的 javascript 静态文件中 事实证明 问题不在模型级别 使用serializers serialize 在脚本本身中放入相同的字符串将
  • 在 Jscript 中实例化 System.Threading.Thread 对象

    我正在尝试使用 Jscript 创建一个新的 System Threading Thread 对象 但我无法让构造函数工作 如果我只是执行以下操作 var thread new Thread threadFunc function thre
  • 在文档流中提取一个元素

    这是示例代码 top background lightGreen content outline 1px solid red bottom background lightBlue div Top div div Lorem ipsum d
  • 使用 System.js 导入 Typescript 编译的模块时出错

    我最近正在学习使用 system js 导入由 Typescript 编译的模块 这些模块之前是为 require js 编译的 并且工作正常 但是合并到system js时 应用时无法导入模块系统生产 js 控制台说 Uncaught i
  • 在 wkwebview 中启用摄像头和麦克风访问

    我有一个针对移动设备优化的网络应用程序 它利用getUserMedia访问网络摄像头和麦克风资源 我正在将这个应用程序包装在WKWebView因为我想提供原生应用程序体验 我知道 iOS 不允许通过浏览器访问相机 但是有什么方法可以使用本机
  • bootstrap-datetimepicker 仅显示日期

    我正在用这个repo https github com smalot bootstrap datetimepicker由 smalot 提供 我只想选择并显示日期 对于其他一些地方 我显示数据和时间 因此选择此存储库 我可以设法仅使用它来选
  • EaselJS Alpha 遮罩滤镜

    我对 Canvas 还很陌生 我一直在尝试将图像颠倒过来EaselJS Alpha 蒙版 http www createjs com demos easeljs alphamaskreveal示例 以便初始图像清晰 并且您可以paint是模
  • 如何实现 chromecast 对 html5 播放器的支持

    我使用js和html5设计了一个具有一些自定义功能的html5播放器 现在我需要在html5播放器上添加chromecast选项 例如https raw githubusercontent com kim company videojs c
  • 掩码输入数字 - 百分比

    如何通过 jQuery 创建具有百分比的数字掩码输入 我是否让输入仅接受三个数字 并在用户完成输入时在数字后添加百分号 keyup 我不使用插件 例子 1 Or 30 Or 99 Or 100 Or 200
  • iPad 上的网站纵向视图

    我的网站在 iPad 纵向模式下无法正确显示 它在横向模式下看起来不错 但当我将其转换为纵向模式时 我最终会得到一个混乱的网站 所有元素都分散在整个网站上 我怎样才能解决这个问题 请帮我 这是我网站的链接 inclouds co uk ht

随机推荐

  • RabbitMQ启动后无法访问http://localhost:15672等问题

    今天重启电脑后遇到了这个问题 rabbitmq服务启动后无法访问localhost 15672 同时项目也无法连接rabbitmq服务 研究了半天终于解决了 下面整理一下解决过程留作备份以及给同样遇到这个问题的人做一个参考 1 找到rabb
  • 代码例子区全区搜索索引(27th Feb 2011 Updated)

    如果以下的链接有错误 或者存在其他问题 请给我发站内短信 或者发送邮件至nono cocoa gmail com希望该帖对大家有帮助 IOS 类代码 我自己做的翻书效果 小猫咪再次登场 2011 03 02 如何实现QQLive HD界面
  • IDEA快速提取maven项目依赖版本号

    操作步骤 提取版本号 1 在pom xml文件中选中需要提取的版本号 2 键入快捷键 ctrl alt v 3 在弹出窗口中设定Name和Project Name为版本号的变量名 Project表示变量提取后存放位置 即放到哪个项目的pom
  • php mysql ajax搜索提示键盘_php+ajax做仿百度搜索下拉自动提示框(有实例)

    php mysql ajax实现百度搜索下拉提示框 主要有3个文件三个文件在同一个目录里 如下图 下面是三个文件的代码 把sql文件导入到mysql数据库里 修改下数据库密码为自己的 记得哦是UTF 8编码 php mysql ajax实现
  • 使用tailwind+next.js写一个github页面进行学习

    目的是学习tailwind语法 如果你也想照着敲可以参考这个视频 点击即刻跳转 仓库地址 点击即刻跳转 不想重复的创建仓库 我的所有内容都在该仓库 只是会通过创建分支来写项目 写的过程发现之前的一些疏忽吧 jsx后缀的尽量就不要写成js后缀
  • CoreDNS篇8-健康检查

    本文主要讲解介绍CoreDNS内置的两个健康检查插件health和ready的使用方式和适用场景 1 health插件 health插件默认情况下会在8080端口的 health路径下提供健康状态查询服务 当CoreDNS服务正常的时候 会
  • win10环境变量设置

    在装一些软件的时候 经常需要设置环境变量 但win10与win7有一些不同 1 打开文件资源管理器 2 最左边一列有 此电脑 点击 3 界面最上面一列会有 属性 点击 4 左边 高级系统设置 点击 5 环境变量 点击 有一个注意的地方是一般
  • VBA解析JSON

    前言 vba作为一种古老的语言 是不能直接处理json数据的 但是好在可以加载其他语言的执行引擎 间接的达到解析JSON的目的 示例代码 Public Function JsonParse jsonStr As String As Obje
  • 三输入或门(发现这个玩意很不好耍,编程出现错误,不知道哪里出现的,一不小心2输成3也无法查证)...

    1 timescale 1ns 1ps 2 module or3 3 x1 4 x2 5 x3 6 z1 7 8 input x1 x2 x3 9 output z1 10 11 wire x1 x2 x3 12 reg z1 13 alw
  • __autoload()不执行的解决办法spl_autoload_register();

    在php5之后已经有了类的自动加载机制 可以定义 autoload函数 在使用到某个未定义的类 执行php会出错 但是在此时php引擎在返回失败之前会去check下是否有定义 autoload去加载需要的类 但是 今天晚上 autoload
  • 原生Photoshop2022 for Mac v23.4最新中文版功能介绍 PS2022苹果安装教程支持M1,解决安装ps提示不存在、Error may be damaged已损坏等问题

    PS2022中文激活版是一款高效 专业 实用的图像处理软件 其以其强悍的编辑和调整 绘图等功能 从而受到了广泛的应用 不管是在各种图片的调整和图画绘制以及图像的修复 调色等工具都是数不胜数的 用户可以从自己照片修饰到海报 包装 横幅的制作以
  • 【Java项目】拉取公司GitLab项目的教程

    文章目录 创建Git账号 登录Git 创建Git账号 进入公司后 会拿到公司给你注册的邮箱以及密码 你得到用户名和密码之后 需要先创建一个拉取这个仓库对应的git账号 我们先登录GitLab 当你登录GitLab之后 会显示你还没有ssh
  • STM32 嵌入式开发常用网站推荐

    作者 蚂蚁会游泳 日期 2022 06 11 前言 本文推荐了一些做嵌入式软硬件开发常用到的网站 一 资料下载 正点原子资料下载中心 描述 该网站可以下载正点原子各种开发板的软件资料 网址 http www openedv com docs
  • 机器学习——特征工程和评价指标

    0 前言 首先学习特征工程这部分知识之前 要对机器学习的算法用过使用 1 特征工程 就机器学习的数据而言 特征就是数据的列名 有多少列 就有多少个维度的特征 就定义而言 特征是指数据中抽取出来对结果预测有用的信息 特征工程就是使用一些技巧来
  • 64位java8,jdk8下载,解压版

    JAVA8使用量非常广泛 但是找下往往都是安装版的 想我这种人直接自己配置环境变量用 十分不想搞个安装版 下面是解压版的 下面是打印出的version信息 wndows版本的 下面是java version的信息 直接拿走 java ver
  • 关于在linux(Ubuntu 18.04.1 LTS)环境中安装并使用AppImageLauncher

    安装步骤 1 去github上下载AppImageLauncher deb 文件 2 在下载文件所在文件夹下打开终端输入 sudo dpkg f filename deb 3 报错提示缺少依赖项 则继续输入一下内容 sudo apt get
  • 大数据 爬取网站并分析数据

    大数据 爬取前程无忧校园招聘 flume hive mysql 数据可视化 自己搭建的hadoop博客 1 爬取前程无忧网页和校园招聘 1 1用scrapy爬取前途无忧网站 我爬了10w多条数据 在存入MongoDB中 1 2 存入Mogo
  • JSP弹出对话框两种实现方式

    JSP弹出对话框两种实现方式 1 一种是弹出一个新的窗体出来 window open test html 用于控制弹出新的窗口test html 如果test html不与主窗口在同一路径下 前面应写明路径 绝对路径 http 和相对路径
  • 【NOIP 2004 提高组】合并果子

    题就自己找啦 各大OJ上应该都有 题目 题目描述 在一个果园里 多多已经将所有的果子打了下来 而且按果子的不同种类分成了不同的堆 多多决定把所有的果子合成一堆 每一次合并 多多可以把两堆果子合并到一起 消耗的体力等于两堆果子的重量之和 可以
  • NewMoonDog 影子狗 基于JavaScript的跑酷游戏,复制就能玩

    这是一款横版跑酷类游戏 应为是JavaScript的所以不需要其他复杂的配置和环境 点击就能运行 线上试玩 http longsong games newmoon 文末有代码地址 操作介绍 跳跃 坐下 跳砍 往后跑 向前跑 enter 无敌