难得将要放一个多月的漫长寒假,学点新东西增一下! 工具准备: 搭建开发环境需要安装的工具有: Visual Studio python,(以python2.7.3版本为例)下载地址:https://www.python.org/download/releases/2.7.3/ Cocos2d-x,(以cocos2d-x-2.2.6为例)下载地址:h
难得将要放一个多月的漫长寒假,学点新东西增值一下!
工具准备:
搭建开发环境需要安装的工具有:
Visual Studio
python,(以python2.7.3版本为例)下载地址:https://www.python.org/download/releases/2.7.3/
Cocos2d-x,(以cocos2d-x-2.2.6为例)下载地址:http://cn.cocos2d-x.org/download/
安装配置python2.7.3
1. 下载并安装python2.7.3。
2. 配置环境
右键单击“计算机”,选择“属性”----》“高级系统设置”,在“高级”选项卡下选择“环境变量”!
在“系统变量”下选中“Path”,并点击下方的编辑按钮:

在弹出的“编辑系统变量”对话框中编辑“变量值”,在“变量值”的后面添加Python的安装路径(D:\Program Files (x86)\Python27),用英文分号(;)将其与后面的其他内容隔开。

同样地,在“PATHEXT“的变量值中添加 .PY;.PYM 。
3. 检验安装是否成功打开cmd控制台,输入 python,如果出现如下提示,则说明python安装成功。
安装创建Cocos2d-x-2.2.2项目
- Cocos2d-x-2.2.6项目无需安装,下载Cocos2d-x-2.2.6文件并解压,直接双击运行相应的sln解决方案即可,如 cocos2d-win32.vc2012.sln
- 将你要运行的项目设为启动项,点击运行。
- 如果一切正常,你将得到如下的界面。那么祝贺你!你已成功的在Windows 7平台中运行Cocos2d-x引擎了。
创建项目:
打开..\cocos2d-x-2.2.6\tools\project-creator文件夹,找到create_project.py文件。按住shift,点击鼠标右键,在当前目录打开命令提示符
输入下图方框内的命令python create_project.py (熟练使用时可跳过此步骤),将会出现如下的提示信息。
上图信息为你提供了创建项目的方法,画线部分中:
PROJECT_NAME 表示项目名称,可自定义。
PACKAGE_NAME 表示你的包名。(包名必须为三部分例如:com.myPackage.lalala,否则会报错)
PROGRAMING_LANGUAGE 表示你所要创建项目的开发语言,可以是cpp,lua和javascript。
根据上图的提示创建项目。
输入命令: Python create_project.py -project myTest -package com.myPackage.lala
-language cpp
,回车后出现下方信息表示创建成功
查看目录你会发现在“Cocos2d-x-2.2.6”文件夹中生成了“projetcs”新文件,同时在“Cocos2d-x-2.2.6/projects”目录中会出现新建的“myTest”新项目。依次打开“
myTest/proj.win32 ”文件夹,“ myTest.sln ”解决方案,单击运行项目。出现下面的界面则项目创建成功

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.

MySQL is an efficient relational database management system suitable for storing and managing data. Its advantages include high-performance queries, flexible transaction processing and rich data types. In practical applications, MySQL is often used in e-commerce platforms, social networks and content management systems, but attention should be paid to performance optimization, data security and scalability.

The relationship between SQL and MySQL is the relationship between standard languages and specific implementations. 1.SQL is a standard language used to manage and operate relational databases, allowing data addition, deletion, modification and query. 2.MySQL is a specific database management system that uses SQL as its operating language and provides efficient data storage and management.

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.