自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Yuting's Blog

怕什么真理无穷,进一寸有一寸的欢喜。

  • 博客(49)
  • 收藏
  • 关注

原创 微信小程序,修改按钮Button尺寸(宽度或高度)

当前版本的微信小程序,在.wxss文件里设置Button宽度无效,例如:.answer-button { display: block; margin-top: 2vh; font-size: 3.5vh; width: 80vw}无论如何调整width,Button的宽度都不会有变化,有博主提出,要把 app.json里的 style: v2语句删掉。这样虽然也...

2020-01-08 11:35:05 65452 19

原创 Unity适配全面屏两边黑边问题

若Unity在打包给安卓全面屏的时候,出现屏幕两边的黑边。在尝试适配策略,甚至代码中强行锁定分辨率也没用时,多半是自定义Android.Manifest文件中缺少以下代码:<meta-data android:name="android.max_aspect"              android:value="2.2"/>(2.2这个数字可以改成2.1以上的数字,通常全面屏为18...

2018-03-19 22:39:50 10232 3

原创 Assets/spine-unity/Editor/SkeletonBaker.cs(803,21): error CS0619: ....升级Unity2017 问题解决

升级Unity2017后,spine 库会报出类似如下的错误。Assets/spine-unity/Editor/SkeletonBaker.cs(803,21): error CS0619: `UnityEditor.AnimationUtility.SetAnimationType(UnityEngine.AnimationClip, UnityEditor.ModelImporterAn

2017-07-19 09:49:00 3310

原创 U3D 接入Android SDK 后,运行游戏闪退问题

解决问题:进入游戏,弹出Unity3D图标(如果使用的是免费版Unity)后,自动退出。在Log中只能看见 onDestroy这样的内容,没有任何出错警告信息。

2016-08-26 13:00:46 8346

原创 ndnSIM 2.0 因缺少pythonbind无法使用visual组件问题 —pybindgen (found '') ".. ns3::VisualSimulatorImpl not found"

如果在执行 ./waf --run=ndn-simple --vis时,遇见 ns3::VisualSimulatorImpl not found 错误。并且在configure的时候,发现有如下信息:> Checking for pybindgen version : > pybindgen (found ''), (need '0.17.0.post45+ng4806e4f')

2016-08-18 17:23:12 3514

翻译 [ndnSIM 2.0] ndnSIM 2.0 综述摘要 - Introduction

内容来源于:ndnSIM 2.0: A new version of the NDN simulator for NS-3 Spyridon Mastorakis, Alexander Afanasyev, Ilya Moiseenko and Lixia Zhang University of California, Los Angeles.

2016-08-10 07:53:57 1018

原创 error CS0117: `System.IO.File' does not contain a definition for `WriteAllBytes'

今天将unity3d引擎升级了一个小版本,发现项目出现了error CS0117: `System.IO.File' does not contain a definition for `WriteAllBytes' 的报错。错误提示file中没有writeallbytes这个方法的定义,用ide查看代码,转到定义后发现库中的确没有相关定义。以为是vs的问题,重装了vs tools f

2016-06-18 15:50:53 4810

原创 U3D Destroy 由预设克隆出的物体后,预设组件丢失

U3D在脚本中通过预设来生成物体的方式是使用Instantiate(GameObject, Vector3, Quaternion)方法,具体可以去百度。此方法第一个参数是预设。这里有两种方法把预设导入到代码中:一种 是在代码里声明 public GameObject goPrefab,并通过U3D的图形界面把预设与此goPrefab绑定。二种 是把预设放置在 Resour

2016-04-30 13:20:34 2773

原创 LeetCode Algorithms #119 <Pascal's Triangle II>

Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1].Note:Could you optimize your algorithm to use only O(k) extra space?思路:因为只返回结果

2016-04-14 16:04:55 323

原创 LeetCode Algorithms #102 <Binary Tree Level Order Traversal>

Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20

2016-04-13 16:18:58 285

原创 LeetCode Algorithms #172 <Factorial Trailing Zeroes>

Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.思路:a * (b*c)  = a * b * c;只有2*5会产生0;所以这道题可以转化成 1,2,3....n中

2016-04-13 16:06:11 351

原创 Unity3D中 Box Collider 2D 覆盖 OnMouseDown

利用Unity3D 自带的UI组件做界面时,因为Button组件不能很好的满足需求。所以很多时候是手动在控件上添加BoxCollider2D组件。

2016-04-12 12:42:36 3914

原创 LeetCode Algorithms #66 <Pascal's Triangle>

Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]思路:虽然我希望再简单的题我也能记录下自己的思路

2016-04-01 22:12:04 304

原创 LeetCode Algorithms #26 <Remove Duplicates from Sorted Array>

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with

2016-04-01 21:45:51 249

原创 LeetCode Algorithms #66 <Remove Element>

Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.思路:从最后一位开始+1,发现大

2016-04-01 19:36:43 341

原创 LeetCode Algorithms #27 <Remove Element>

Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.

2016-04-01 18:39:36 302

原创 LeetCode Algorithms #107 <Binary Tree Level Order Traversal II>

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,15,7},

2016-03-27 18:30:07 313

原创 LeetCode Algorithms #101 <Symmetric Tree>

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the f

2016-03-24 16:50:38 224

原创 LeetCode Algorithms #24 <Swap Nodes in Pairs>

Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe

2016-03-24 16:25:18 319

原创 LeetCode Algorithms #198 <House Robber>

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house

2016-03-24 15:28:20 228

原创 LeetCode Algorithms #24 <Swap Nodes in Pairs>

Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y

2016-03-24 10:39:04 233

原创 LeetCode Algorithms #232 <Implement Queue using Stacks>

Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.peek() -- Get the front element.empty(

2016-02-24 19:06:33 327

原创 LeetCode Algorithms #21 <Merge Two Sorted Lists>

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路:就和玩积木一样,这些基本的链表操作是没有任何难度的,小心些,不犯低级错误就可以一次ac。解:

2016-02-24 18:38:56 401

原创 LeetCode Algorithms #231 <Power of Two>

Given an integer, write a function to determine if it is a power of two.思路:2这个数字很特殊,因为计算机使用的数制是二进制。所以可以尝试通过位操作来完成判断。2的幂的数字特点就是有且只有一个1,比如二进制1000,10这些。我发现1000-1 = 111和1000直接按位取反是一样的,但是C++语言的取反会把前面

2016-02-24 18:01:50 1055

原创 LeetCode Algorithms #326 <Power of Three>

Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?思路:递归的很好做,就是在每次调用的时候看能不能被3整除,不能直接返回false,能的话继续除以3,直到最

2016-02-23 18:39:13 311

原创 LeetCode Algorithms #202 <Happy Number>

Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares

2016-02-16 21:49:15 264

原创 LeetCode Algorithms #263 <Ugly Number>

Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly si

2016-02-16 21:29:42 217

原创 LeetCode Algorithms #83 <Remove Duplicates from Sorted List>

Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.思路:一个指针向后遍历,发现自己的下一

2016-02-13 02:07:04 274

原创 LeetCode Algorithms #70 <Climbing Stairs>

You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?思路:n个阶梯的方法相当于n-1个阶梯迈一步,和

2016-02-13 01:45:45 371

原创 LeetCode Algorithms #191 <Number of 1 Bits>

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 000000

2016-02-13 01:26:14 348

原创 LeetCode Algorithms #13 <Roman to Integer>

Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.思路:(摘自互动百科)表示数的基本方法:除I、X、C位于大数后作为加数,位于大数前作为减数外,一般把若干罗马基本数字写在一起,它表示的数字等

2016-02-12 22:23:43 208

原创 LeetCode Algorithms #206 <Reverse Linked List>

Reverse a singly linked list.思路:。。。解:/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * };

2016-02-02 19:46:01 382

原创 LeetCode Algorithms #328 <Odd Even Linked List>

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in

2016-02-02 12:51:21 291

原创 LeetCode Algorithms #235 <Lowest Common Ancestor of a Binary Search Tree>

Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined betw

2016-02-02 00:16:13 223

原创 LeetCode Algorithms #169 <Majority Element>

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2016-01-31 17:59:49 266

原创 LeetCode Algorithms #217 <Contains Duplicate>

Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element

2016-01-31 17:38:44 226

原创 LeetCode Algorithms #171 <Excel Sheet Column Number>

Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ...

2016-01-31 17:27:00 207

原创 LeetCode Algorithms #242 <Valid Anagram>

Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.Note:You may a

2016-01-31 17:10:31 222

原创 LeetCode Algorithms #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

2016-01-31 16:09:41 256

原创 LeetCode Algorithms #226 <Invert Binary Tree>

invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1思路:简单的递归调用,不知道Homebrew的作者为什么没做出来。解:/** * Definition for a bina

2015-10-11 08:33:25 312

空空如也

空空如也

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

TA关注的人

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