自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 收藏
  • 关注

转载 《零基础入门学习Python》0

0. Python 是什么类型的语言?Python是脚本语言脚本语言(Scripting language)是电脑编程语言,因此也能让开发者藉以编写出让电脑听命行事的程序。以简单的方式快速完成某些复杂的事情通常是创造脚本语言的重要原则,基于这项原则,使得脚本语言通常比 C语言、C++语言 或 Java 之类的系统编程语言要简单容易。也让脚本语言另有一些属于脚本语言的特性:语法和结构通...

2019-07-17 16:06:15 119

原创 1003.数素数

原题链接 题目描述 令Pi表示第i个素数。现任给两个正整数M <= N <= 10000,请输出PM到PN的所有素数。输入描述: 输入在一行中给出M和N,其间以空格分隔。输出描述: 输出从PM到PN的所有素数,每10个数字占1行,其间以空格分隔,但行末不得有多余空格。输入例子: 5 27输出例子: 11 13 17 19 23 29 31 37 41 4347 53 59 61 67 7

2017-08-28 18:46:45 572

原创 1002.数字分类

原题链接 题目描述 给定一系列正整数,请按要求对数字进行分类,并输出以下5个数字:A1 = 能被5整除的数字中所有偶数的和;A2 = 将被5除后余1的数字按给出顺序进行交错求和,即计算n1-n2+n3-n4…;A3 = 被5除后余2的数字的个数;A4 = 被5除后余3的数字的平均数,精确到小数点后1位;A5 = 被5除后余4的数字中最大数字。输入描述: 每个输入包含1个测试用例。每个测试用例先

2017-08-26 21:03:54 443

原创 1001.A+B和C

原题链接 题目描述 给定区间[-2的31次方, 2的31次方]内的3个整数A、B和C,请判断A+B是否大于C。输入描述: 输入第1行给出正整数T(<=10),是测试用例的个数。随后给出T组测试用例,每组占一行,顺序给出A、B和C。整数间以空格分隔。输出描述: 对每组测试用例,在一行中输出“Case #X: true”如果A+B>C,否则输出“Case #X: false”,其中X是测试用例的

2017-08-25 18:14:22 289

原创 566. Reshape the Matrix

In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its original data.You’re given a matrix represented by a two-dimensio

2017-05-12 23:27:40 393

原创 575. Distribute Candies 以及 unordered_map<int, int>函数以及map<int, int>函数

Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of the corresponding kind. You need to distribute these

2017-05-11 18:22:22 305

原创 LeetCode 561. Array Partition I

Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possibl

2017-05-09 19:53:18 593

原创 第一张:JAVA的简介

1.1 什么是JAVA语言Java是在1995年由Sun公司推出的一种极富创造力的面向对象的程序设计语言,它由Java之父詹姆斯•戈士林博士设计。作为Sun研究院院士,詹姆斯•戈士林亲手设计了Java语言,并完成了Java技术的原始编译器和虚拟机。Java最初的名字是OAK,在1995年被重命名为Java。Java是一种通过解释方式来执行的语言,其语法规则与C++类似,同时也是一种跨平台的程序设计语

2017-04-26 22:02:44 577

原创 第一章:概序

1.1计算机网络在信息时代种的作用

2017-04-24 23:39:52 341

原创 taidou服务器创建流程

一.创建taidou服务器端的工程1.打开VS,因为是服务器端的程序,所以新建一个类库类型的TaidouServer项目2.在TaidouServer里添加(5个类库:ExitGamesLibs.dll” “Photon.SocketServer.dll” “PhotonHostRuntimeInterfaces.dll”,ExitGames.Logging.Log4Net.dlllog4net.d

2017-04-11 00:27:48 643

原创 server 内部异常堆栈跟踪的结尾

1.在taidou中,创建完人物,然后点击进入游戏 出现此问题的解决方法日志输出情况为下:解决方法如下:从日志输出上边可以看出 是一个LitJson转化时出的的错误。 再从日志输出上看到是在TaidouServer的RolerHandler的第55行转换时出现的问题,即    ParameterTool.AddParameter(parameters,ParameterCo

2017-04-10 21:16:56 15991

原创 389. Find the Difference

Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was added in

2017-04-05 21:06:54 199

原创 TaidouDatebase-Manager-TestUserManager

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using TaidouDatebase.Model;namespace TaidouDatebase.Manager{ class TestUserManag

2017-04-05 12:50:40 354 1

原创 TaidouDatebase-NHibernateHelper

using FluentNHibernate.Cfg;using FluentNHibernate.Cfg.Db;using NHibernate;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace

2017-04-05 12:49:17 456

原创 TaidouDatebase-Model(数据库对应的Model类以及映射类)

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace TaidouDatebase.Model//与数据库对应的model类{ class TestUser { publi

2017-03-30 19:55:33 285

原创 TaidouChatServerClient(客户端)

/*需添加引用:"ExitGamesLibs.dll" "Photon.SocketServer.dll" "PhotonHostRuntimeInterfaces.dll"" Photon3DotNet.dll"*/using ExitGames.Client.Photon;using System;using System.Collections.Generic;using System

2017-03-30 19:32:19 285

原创 ChatServer

/*需添加引用:"ExitGamesLibs.dll" "Photon.SocketServer.dll" "PhotonHostRuntimeInterfaces.dll" 需要把server部署到PhotonServer上。也就是把项目生成的输出路径改为G:\photon server\photon\Photon-OnPremise-Server-SDK_v4-0-29-11263\deplo

2017-03-30 19:30:57 1176

原创 TaidouChatServer(客户端)

代码块代码块语法遵循标准markdown代码,例如:Unity内需要添加Photon3Unity3D.dll(在unity的Plugin里)using UnityEngine;using System.Collections;using ExitGames.Client.Photon;using System.Collections.Generic;public class PhotonS

2017-03-30 19:26:08 292

原创 TaidouChatServer(客户端)

Unity内需要添加Photon3Unity3D.dll(在unity的Plugin里)using UnityEngine;using System.Collections;using ExitGames.Client.Photon;using System.Collections.Generic;public class PhotonS

2017-03-26 20:14:37 247

原创 TaidouChatServerClient(客户端)

需添加引用:"ExitGamesLibs.dll" "Photon.SocketServer.dll" "PhotonHostRuntimeInterfaces.dll"" Photon3DotNet.dll"using ExitGames.Client.Photon;using System;using System.Collections.Gen

2017-03-26 19:59:51 346

原创 ChatServer

using Photon.SocketServer;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ChatServer{    //继承自 applicationb

2017-03-26 17:22:41 405

原创 错误提示:“FluentNHibernate.Cfg.FluentConfigurationException”类型的未经处理的异常在 FluentNHibernate.dll 中发生

using FluentNHibernate.Cfg;using FluentNHibernate.Cfg.Db;using NHibernate;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;

2017-03-22 18:39:04 1317

原创 4.0版本较3.4版本 PeerBase的改变

using Photon.SocketServer;using Photon.SocketServer.Rpc;using PhotonHostRuntimeInterfaces;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.T

2017-03-22 18:37:07 948 1

原创 104. Maximum Depth of Binary Tree以及->的一些小用法解释

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.my answer:/** * Definition

2017-03-08 12:25:26 222

原创 448. Find All Numbers Disappeared in an Array and sort()函数的简单用法

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.

2017-03-06 22:42:44 265

原创 136. Single Number and与、或、异或、取反、左移和右移运算

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext

2017-03-06 20:41:08 197

原创 520. Detect Capital

Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All letters in t

2017-03-02 21:13:45 174

原创 292. Nim Game

You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the

2017-03-02 20:36:40 190

原创 485. Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutiv

2017-03-01 22:21:18 182

原创 463. Island Perimeter

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely

2017-02-28 21:40:16 198

原创 344. Reverse String

Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".my answer:class Solution {public:    string reverseString(st

2017-02-28 18:14:31 209

原创 412. Fizz Buzz

Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”.

2017-02-28 17:39:58 177

原创 Next Greater Element(下一个更大的元素)

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums

2017-02-27 22:18:49 336

转载 c++中vector的用法详解

vector是C++标准模板库中的部分内容,它是一个多功能的,能够操作多种数据结构和算法的模板类和函数库。vector是一个容器,它能够存放各种类型的对象,简单地说,vector是一个能够存放任意类型的动态数组,可以动态改变大小。       用法:1.为了使用vector,必须在你的头文件中包含下面的代码:     #include 2.vector属于std命名域的,因此需要通

2017-02-27 22:09:00 219

转载 Keyboard Row

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.Example 1:Input: ["Hello", "Alaska", "Da

2017-02-26 16:32:19 277

原创 Number Complement(数量补语)

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.Note:The given integer is guaranteed to fit within the range

2017-02-21 23:15:15 394

原创 算法每日题Hamming distance

1.The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance(汉明距离).No

2017-02-20 22:49:48 347

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除