2D small game development learning notes - CreateJs game case

1, Surround the nerve cat game How to play the game: it's easy to play. The blue circle represents the nervous cat. Click the circle around to trap the cat, even if the game is successful Game effect Logical combing: 1. Draw regular dots; 2. Set the nerve cat position; 3. Set logic 1) Six directions; 2) The end of the game: go to the ...

Posted on Sat, 28 Mar 2020 09:56:49 -0700 by ericbangug

v-for traversing 2D object array in vue

Let's start with an example var a = {}; var b = []; var i =0; while(i<10){ b[i] = a[i] = i++; } console.log('a '+typeof a +' b '+ typeof b); //a object b object Note: arrays are also objects console.log(a); //{ '0': 0,'1': 1,'2': 2,'3': 3,'4': 4,'5': 5,'6': 6,'7': 7,'8': 8,'9': 9 } console.log(b); //[ 0, 1, 2, 3, 4, 5, ...

Posted on Fri, 27 Mar 2020 09:54:40 -0700 by MattDunbar

Use d3.js in the Vue project

Before I wrote a Demo, I had to use D3 to achieve some effects, but I couldn't find a way to use D3.js in Vue in many forums. D3 on npm is relatively inhumane, and I didn't say how to use D3.js on webpack at all Finally, I saw a foreign tycoon for a long time to see that his case successfully realized the use of D3 in Vue project First installa ...

Posted on Fri, 27 Mar 2020 08:50:51 -0700 by scarabee

Java Web XSS attack defense

XSS overview Cross site scripting (XSS). The malicious attacker inserts malicious Script code into the Web page. When the user browses the page, the Script code embedded in the Web will be executed, so as to achieve the purpose of malicious attack on the user. Implement Filter and XSS Filter package com.bj58.qf.filter; import javax.servlet ...

Posted on Thu, 26 Mar 2020 08:32:50 -0700 by sharp.mac

thinkphp+jquery to achieve two-level comment reply effect

This is not an infinite level comment, but only two levels. It's easy to implement. The parent id of all comments is the id of the corresponding first level comment. When adding a comment, add it under the corresponding comment, and put the latest comment in the front with prepend()     Database design (I don't really use the database here. In ...

Posted on Wed, 25 Mar 2020 07:42:15 -0700 by shadownet

thinkphp+jquery to achieve two-level comment reply effect

This is not an infinite level comment, but only two levels. It's easy to implement. The parent id of all comments is the id of the corresponding first level comment. When adding a comment, add it under the corresponding comment, and put the latest comment in the front with prepend()     Database design (I don't really use the database here. In ...

Posted on Wed, 25 Mar 2020 07:43:17 -0700 by prometheuzz

React router prompts when routing is switched

React router version ^ 5.1.2 When the content being edited is not saved, there is a routing switch. At this time, you need to give some prompts, and the user controls whether to jump. During the route management of react router, the Prompt component can be used to realize this function. The message attribute can accept a function and Prompt whe ...

Posted on Wed, 25 Mar 2020 07:07:50 -0700 by sevenfive

Vue Principle Interpretation: Do not let transitions/animations become transition components of the dashboard

Animation has always been a tangled point in the front, which is easy to ignore but important. Writing a pleasant and natural interactive experience really adds color to the project. After all, it is easy to feel, so it is necessary to explore the implementation principle of the transition component of vue.The animation implementation of the tr ...

Posted on Tue, 24 Mar 2020 23:52:33 -0700 by flaab

EasyUI tree table displaying Json data

Use the TreeGrid component of EasyUI to format and display the Json data. First, read in the Json file, turn it into a Map object, recurse each Map, and determine whether its value is the basic type or Map. If the base type, the attribute node. If Map is an object, it needs to be traversed again. 1.Map resolves Tree objects Tree object public ...

Posted on Sun, 22 Mar 2020 08:34:46 -0700 by salim

Why does the DEBUG = False setting fail django static file access?

I'm using Django as my primary building application.So far, everything has been fine - specifying database settings, static directories for configuration, URL s, views, and so on.But when I wanted to present my beautiful custom 404.html and 500.html pages, the trouble started to creep in. I read the documentation on custom error handling, s ...

Posted on Fri, 20 Mar 2020 21:16:04 -0700 by compphenom