2016年5月面试题(Unity&iOS)
NGUI的DrawCall
- drawcall定义:对底层图形程序(比如:OpenGL ES)接口的调用,以在屏幕上画出东西。
List在内存中连续的空间保存
List是线性直接存储类型
mipMap是什么?
mipMap是摄像机离得远近用不同的图片 - 参考文章
折半查找算法 GitHub算法链接(C++)
#include <stdio.h>
#include <stdlib.h>
#define MAX 100
int main()
{
int binaryFind(int[],int,int);
void printArray(int[],int);
int n,i,j,key,array[MAX];
printf("\t\t\t\tBinaryFind8\nInput the size of the array:");
scanf(" %d",&n);
printf("Input a sort of increase numbers:\n");
for(i=0; i<n; i++)
scanf(" %d",&array[i]);
printf("Input finished!\n");
printf("Input the key you would like to find:");
scanf(" %d",&key);
j = binaryFind(array,n,key);
printf("\nThe position of the key is : %d",j+1);
system("pause");
return 0;
}
int binaryFind(int array[],int n,int key)
{
//low低值,high高值,mid中值
int low = 0;
int high = n-1;
int mid;
//查找key
while(low <= high)
{
//更新中间位置index
mid = (low + high)/2;
//找到key,返回位置index
if(array[mid] == key)
return mid;
//中值大于key,key在前半部分,更新high
else if(array[mid] > key)
high = mid-1;
//中值小于key,key在后半部分,更新low
else low = mid+1;
}
//没有找到,返回-1
return -1;
}
//打印数组
void printArray(int array[] ,int n)
{
int i = 0;
while(i<n)
{
printf(" %d",array[i]);
i++;
}
}
iOS weak和strong
只要有任何strong 指向某个对象A,ARC就不会摧毁它(A)。
而weak所指向的对象B,只要没有其他strong指向该对象(B),ARC会摧毁它(B)。
iOS 深复制浅复制
浅复制,并不拷贝对象本身,仅仅是拷贝指向对象的指针;深复制是直接拷贝整个对象内存到另一块内存中。
信号量机制解决多线程问题
系统级的多线程同步共享资源,利用其可实现多线程的协同工作。
2016年5月面试题(Unity&iOS)的更多相关文章
- 2016年4月面试题(Unity)
一. C#中值类型和引用类型的区别? A: 值类型的数据存储在内存的栈中:引用类型的数据存储在内存的堆中,而内存单元中只存放堆中对象的地址. 值类型存取速度快,引用类型存取速度慢 值类型表示实际数据, ...
- 摩根斯坦利 - 2016年09月8日 面试题 - HashMap
摩根斯坦利 - 2016年09月8日 面试题: 给定一个 Map<Person, Object> map = new HashMap<Person, Object>(); 放入 ...
- 关于苹果开发证书失效的解决方式(2016年2月14日Failed to locate or generate matching signing assets)
前言: 从2月14日開始,上传程序的同学可能会遇到提示上传失败的提示. 而且打开自己的钥匙串,发现所有的证书所有都显示此证书签发者无效. Failed to locate or generate ma ...
- Unity iOS混合开发界面切换思路
Unity iOS混合开发界面切换思路 最近有很多博友QQ 私信 或则 留言联系我,请教iOS和Unity界面之前相互切换的问题,源代码就不私下发你们了,界面跳转功能的代码我直接贴到下面好了,顺带说i ...
- 2016年12月31日 星期六 --出埃及记 Exodus 21:26
2016年12月31日 星期六 --出埃及记 Exodus 21:26 "If a man hits a manservant or maidservant in the eye and d ...
- 2016年12月30日 星期五 --出埃及记 Exodus 21:25
2016年12月30日 星期五 --出埃及记 Exodus 21:25 burn for burn, wound for wound, bruise for bruise.以烙还烙,以伤还伤,以打还打 ...
- 2016年12月29日 星期四 --出埃及记 Exodus 21:24
2016年12月29日 星期四 --出埃及记 Exodus 21:24 eye for eye, tooth for tooth, hand for hand, foot for foot,以眼还眼, ...
- 2016年12月28日 星期三 --出埃及记 Exodus 21:23
2016年12月28日 星期三 --出埃及记 Exodus 21:23 But if there is serious injury, you are to take life for life,若有 ...
- 2016年12月27日 星期二 --出埃及记 Exodus 21:22
2016年12月27日 星期二 --出埃及记 Exodus 21:22 "If men who are fighting hit a pregnant woman and she gives ...
随机推荐
- 键盘对应的ASCII码
ESC键 VK_ESCAPE (27)回车键: VK_RETURN (13)TAB键: VK_TAB (9)Caps Lock键: VK_CAPITAL (20)Shift键: VK_SHIFT ($ ...
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project LogTest: Compilation failure -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default ...
- UIApplication详解
每个app有且只有一个UIApplication对象,当程序启动的时候通过调用UIApplicationMain方法得到的.可以通过sharedApplication方法得到. UIApplicati ...
- CVPR历年Best Papers
作者:我爱机器学习原文链接:CVPR历年Best Papers CVPR (Computer Vision)(2000-2016) 年份 标题 一作 一作单位 2016 Deep Residual L ...
- WebStorm常用配置
设置 快捷键设置 可以采用多种风格,这里采用Visual Studio风格,便于习惯使用其它IDE的用户迁移. JavaScript版本设置 JavaScript的主流版本已升至ESMAScript6 ...
- MicroERP软件更新记录2.1
最新版本:2.1 更新内容:新增客户关系管理(CRM) 下载地址:http://60.2.39.130/microerp 因部分企业用户或个人(开发者)的实际应用水平或技术开发能力参差不齐,且软件开发 ...
- php 概率算法(转)
例:function get_rand($proArr) { $result = ''; //概率数组的总概率精度 $proSum = array_sum($proArr); //概率数组循环 for ...
- as3 代码加解密
private var loader:URLLoader; ... private function init():void { loader = new URLLoader; req=URLRequ ...
- python 中的高级函数filter()
filter()函数是 Python 内置的另一个有用的高阶函数,filter()函数接收一个函数 f 和一个list,这个函数 f 的作用是对每个元素进行判断,返回 True或 False,filt ...
- Qt之C语言有符号数与无符号数运算
以32位的stm32f4为例: 1. uint32_t t_int_k = 239773, t_int_km1 = 4294859707; 则t_int_k - t_int_km1 > 0; ...