iPhone 7 Plus 评测体验

嗷嗷,因为选的是钢琴黑/Jet Black,等了一个月的新手机终于到了……用了一天简单谈一下。

无键程Home键

换了没键程的Home后那Taptic Engine真的是以假乱真啊,完全就是按下去的手感。不过那感觉不是按Home那个键,而是按整个屏幕下方,手感和Apple Mouse Pro极其相似。

关于Apple Mouse Pro,图在这里:

海外党:https://www.google.ca/search?q=Apple+Mouse+Pro&tbm=isch

百度:https://image.baidu.com/search/index?tn=baiduimage&word=Apple%20Mouse%20Pro

 

Force Touch / 3D Touch

这个其实不是新功能,可是博主之前用的一直是iPhone 6 Plus,所以一直没这功能。感觉了一下7的3D Touch感觉和6s系列一样糟糕,完全感觉是在硬硬的屏幕上强行按,反馈可以忽略不计。相比Home键的真实程度相差甚远。

 

双声道

声音大了一些,音质没什么提升,我估计还是不太可能开外放听音乐。

 

速度

速度比起6 plus提升很多,尤其是指纹识别速度(据说和6s一样快)。我终于知道为什么苹果要支持抬手显示了。因为默认设置下的话,按Home键显示直接就进主界面了,还来不及看锁屏内容……(当然有设置可以设置这个,我这里只是说默认情况下)

 

屏幕显示

我只是感觉比我的6p颜色更柔和了

 

拍照

我这个不专业的摄影师没发现有啥区别。。。

 

 

BTW,这个手机解决了我之前一直遇到的一个问题,就是我的6 plus在30%点亮一下经常出现突然关机显示电量耗尽打不开的情况。今天试了试7在恢复备份后没有这个问题。没白买……

ParBlog is now back online

Due to an unexpected restart of the blog server’s physical node, parblog was out of service. During the blog service interruption, the main part of ParCloud was still functioning well. ParBlog now has been fully recovered.

 

由于博客所在节点的一次意外重启,帕尔萨斯博客无法正常服务。在博客服务中断期间,核心的帕尔萨斯云服务仍然运转正常。现在帕尔萨斯博客已经完全恢复。

2015年2月28日IELTS General考试回顾

原文地址: http://blog.xparthas.com/2015年2月28日ielts-general考试回顾/

Parthas Menethil原创,转载请注明。谢谢。

听力:
第一个选择+填空
关于跑步的。一个叫Patrick的人想报长跑活动,问情况。没位置了要等,要带防蛇kit,帐篷要和说同一种语言的人住在一起,每天必须至少吃xxx卡路里的食物否则会有penalties。
问lastname,问国籍不是Irish是British,问电话09xxx88xx,邮件
Healthcare@xxx.com第二个填空
两个人一男一女准备一个关于儿童运动饮料的课题,每天都做什么。第一周分配任务做desk搜索,XXxX这个空忘记了,男的要赶着写第一个Section,要联系manager要做媒体推广。男的借book给女的因为书上有checklist
第三个选择加填空
关于一个地区举办fair。要推迟因为时间和一个学校冲突了,这个活动起源于为了promot area,从赞助商拿钱,改变了路线因为人太多了,上一次活动不完美的原因是媒体关注太少,然后第二部分选择场地,有些太贵,有些不给折扣还是太贵,有些因为Construction是unavailable,有些可以进一步讨论。

第四篇文章选择+填空
是关于单独性别的学校的…某叫兽做研究,某哈弗大学医学院做研究前面选择男男女女的听得一桶浆糊……后面说老师跟男生说话和跟女生说话的voice要不同,翻页(这里坑了啊,我还以为有停顿的结果没有啊~233了),赶紧翻过来,女生喜欢分组,男生喜欢实际的东西,女生对成就感更critical神马的……一桶浆糊,不知听的对不对,不过感觉所有空都听到了而且自认为make sense。

阅读:
第一篇图书馆行为规范。TRUE,FALSE,NOT GIVEN。
是不是必须向每个人展示身份。是不是没等和用户说完就可以接电话。是不是预定的书要放在边上xxxx。是不是有固定的翻新时间表。是不是客户打电话用词鲁莽可以直接挂电话。
第二篇,连线
一堆餐馆酒吧。哪个还没开张,哪个必须走着去(就是在步行街上),哪个有舒服的座位,哪个每个人的价格是固定的,哪个有很多wine可供选择,哪个可以听音乐,哪个可以在外面吃,哪个可以偶尔见到名流。

第三篇,
介绍某公司。全英国第十大IT服务商,有什么活动可以让员工了解公司背景,在哪里员工可以和领导和同事交流(吃饭的地方?),什么职位一直会负责管理某个员工(The staff manager?)。明年(12个月后)会出什么学习package。现有的非技术学习package是教人们做什么的(soft skills?)。每次完成项目后奖励是(A day off?XD)
第四篇,
关于一个对自己名气不是很重视的爱尔兰(Irish)乐队。乐队名字是以某成员的妹妹命名的。鼓手刚成立后就离开了。去美国的时候因为隐私被暴露的太多就不是很很开心。有人让他们出之前专辑的live版,但是因为他们不想做这么21333的事情(把同样的歌曲以更差的效果发布出去)。出了四张专辑。第一张专辑后来才发布。有一张专辑没名(第二张还是第三张忘了)。还有一张专辑是什么来着。。。第四张专辑里面有两套歌曲,很认真做的但是因为有电影所以有点黯然失色。

写作:
小作文-你要有一个小休假去某地方写信给住在那的朋友问这问那。
大作文-讨论自顾和给公司或者机构工作的区别。

口语:
第一问,介绍你的家乡。
第二问,描述一个你最喜欢的app。
第三问s,没有手机你是否有安全感。哪样科技改变了人们的生活。怎样看待老年人使用科技产品的问题。科技是否为人节省了时间。(部分问题可能描述不准,有点忘了)。

之前只做了一遍随便找的听力,做了一遍阅读,还有某Crystal大大给的口语题竟然神奇的命中了,考试前一晚上看了七篇小作文还有四篇大作文,没写,几乎裸考很坑啊……听力最后一个题原来是连着放的,还好它有过渡及时翻页没错过什么,阅读除了T,F,NG这个难以抉择有些坑爹,我感觉第四篇难度还好,比我练习的那篇简单多了……这口语后面几个部分原来这么多问题,每个就说那么一点……我几乎口语80%都被考官手势叫停。。。黑线……考完了求高分……

Regex filter visible characters with character class

最近有一个任务就是过滤掉文件中的非法不可读字符,也就是除了大小写字符,数字还有标点符号外其它的所有字符。网上找竟然没有现成的,就自己写了一个:

"[^a-zA-Z0-9 -/:-@\[-`{-~]"

符合这个条件的字符都会被替换为空,虽然可以更精简一点,不过我还是把标点符号那一部分孤立出来了,加强了扩展性,小伙伴们可以直接摘取,标点符号有几段是不连续的。

Recently a task was put on my desk which I needed to write a regex to filter out all non-readable characters from . In other words, only alphabetic, numeric and symbolic characters are allowed in that field. Well, I did not find anyone wrote this kinda of regex on the internet and came up my own one:

"[^a-zA-Z0-9 -/:-@\[-`{-~]"

All characters meets the above regex will be replaced with an empty string. Though it can be more simple, for compatibility, I just isolated the symbolic part from other two parts (alphabetic and numeric). The symbolic part is not continues and has several chunks coz those chunks are not continuous on the ASCII table. Please feel free to use it and leave your comment below.

Recaptcha 2 is now on site

There was a spamming problem on my blog a few months ago. Though I have Akismet to block them, I quickly get bored seeing my spamming box is filled with trashes. It is necessary to include some kinda of verification stuff for the comment module.

Unfortunately, due to my laziness I left an unfinished verification system for months. :(

Well, the comment function here is no longer disabled. I just implemented Recaptcha 2. K, now please get busy commenting! XD

=======================Translation===========================

之前我一直深受垃圾邮件的困扰。即使我有Akismet插件可是我很不喜欢看到我的垃圾邮件箱充满了无用的广告。我想我需要给评论模块加一个验证机制。

可惜我灰常懒,我一直留着一个未完工的验证马系统在那里好几个月。

不过现在就好了。我刚刚引入了Recaptcha2。现在小伙伴们可以尽情评论啦!O(∩_∩)O哈哈~

Windows Server 2012 on ESXi 4.1

From: http://jgiffard.wordpress.com/2013/06/25/windows-server-2012-on-esxi-4-1/

My I.T infrastructure at home has 4 ESXi 4.1 servers which host a number of VMs that are used for home and work purposes.  However, my organically grown infrastructure has now reached the point where it needs re-organising.  As part of that I’m installing new A/D controllers and decided to use Server 2012.

And then found that ESXi 4.1 doesn’t support it.  Try it and you’ll get the Server 2012 sad face appearing.  I don’t have time just now to update to ESX5.X on my servers, so I hunted around the Internet to see if there was a workaround.

I found these set of instructions ( really don’t do this for a production environment )

    • Create a  new VM over the vSphere Client.
    • As “Guest Operating System” use Microsoft Windows Server 2008 R2 (64-bit)
    • After VM has been created but before first power on, download the following  bios file and upload it to your ESXi datastore into the folder of the VM
    • Now open the .vmx file of the new VM and add the follwing lines
bios440.filename = "bios.440.rom"
mce.enable = TRUE
cpuid.hypervisor.v0 = FALSE
vmGenCounter.enable = FALSE
    • Power on VM and Server 2012 will install and run

数据库问题修复

之前一段时间里我的附属服务器,也就是这个博客所在服务器,的数据库总是会定期挂掉。通常会显示Error establishing database connection.

这个问题目前已经解决,并且我专门用Go写了一个守护进程来保证数据库的正常运行。

KOFAX驱动KER_UNDERRUN错误和解决方案

最近使用TWAIN协议调用使用KOFAX驱动的扫描仪,主线程内同步调用完全没有问题,在异步扫描的时候很诡异得报错KER_UNDERRUN。在谷歌上搜索只能搜索到这个问题的前半部分KER_可是后面的UNDERRUN却没有任何结果。由于我封装好了一个与扫描仪通信的类,对于这个问题一开始完全没有头绪,可是经过替换排除法我发现了问题的所在。首先说一些结论,这个问题我至今无法在那个扫描程序中解决。

问题出现在我扫描程序提供的一个小功能。在扫描之前,我的扫描程序支持读取数据(扫描仪支持纸张类型和颜色等等)然后展示给用户。只要是进行了这个操作,之后在另一个线程扫描就有几乎90%的可能性出现KER_UNDERRUN错误。即使我在卸载了DLL再重新载入也无法修复这个问题。最后就是取消了在该程序主线程中执行OpenSource这个行为,完全在另一个线程做所有的事情。

不过我还是不想取消这个功能,跨线程读取扫描仪配置然后和主线程通信又很麻烦,于是在我们架构师的建议下找到了一个解决方案:写了另外一个小程序,在用户选择完扫描仪后会被调用,它会读取扫描仪信息然后存在本地,然后主程序等待它执行完后读取那个文件就可以获得全套信息了。因为是在另外一个程序中调用OpenSource,而且执行后另外一个程序会销毁,所以不会影响主程序的行动。这个问题就完美解决了。

[C++]Doubly Linked List with Iterator

During the study week I tried to implement an integer list using Visual C++. My goal is to be as similar to as the list and iterator in the standard library. My goal is to simulate the implementation of the standard library list and iterator.

There are many people having issues with insertion and deletion of the iterator. In order to delete the boundaries of the list, the iterator need to have the access of the front and back of the list. According to the standard iterator, it does not have such a function:

A sample source main is:

#include "DoublyLinkedList.h"
#include
using namespace std;
int main(){
	DoublyLinkedList dll;
	dll.pushFront(12);
	dll.pushFront(11);
	dll.pushFront(10);
	dll.pushBack(13);
	dll.pushBack(14);
	dll.pushFront(9);
	while (!dll.isEmpty()){
		cout << "[DLL]Element:" << dll.getBack() << endl;
		dll.popBack();
	}
	int a[] = {55,66,77,88,99};
	DoublyLinkedList dll2(a, a + 5);
	for (DoublyLinkedList::iterator it = dll2.begin(); it != dll2.end(); ++it){
		cout << "[DLL2]Element:" << *it << endl;
	}
	return 0;
}

Output:

[DLL]Element:14
[DLL]Element:13
[DLL]Element:12
[DLL]Element:11
[DLL]Element:10
[DLL]Element:9
[DLL2]Element:55
[DLL2]Element:66
[DLL2]Element:77
[DLL2]Element:88
[DLL2]Element:99

Source Code(Please feel free to fork & contribute): https://github.com/Parthas-Menethil/DoubleLinkedList

[Master C++ Pointer #1]Retrieve private and protected stuffs in C++

[You may only do this practice on Linux..Coz windows behaves weirdly allocating memory for stack variables~ :( ]

 

This practice is made by Parthas Menethil(Luke.J.Sun). All rights reserved.

C++ is such a flexible language to have fun. You can break the common rule an do fantastic things. In this post, I am going to work with you to hack private information out from classes using only pointers!

I have three classes declared and instantiated one instance of each class in main. Some of the values inside the class are inaccessible by normal methods. We are going to pull them out from the memory.

NOTE: This program should be complied targeting 32bit operating system. The preferred compiler would be GCC 4.6.3

/*	How to access values in a class abnormally
 *
 * */
#include <iostream>
using namespace std; // Not a good habit, just for testing
class A{
private:
	int apples;
	double weight;
	unsigned int bugs;
public:
	A() : apples(100), weight(99.9989), bugs(123456){}
};
class B{
private:
	double exam_grade;
protected:
	double test_grade;
public:
	double quiz_grade;
	B(double exam, double test, double quiz){
		exam_grade = exam;
		test_grade = test;
		quiz_grade = quiz;
	}
	virtual void placeholder(){ /* Nothing to show */ }
};
struct Date{
private:
	int day;
	int month;
	int year;
public:
	Date(int d, int m, int y){
		day = d;
		month = m;
		year = y;
	}
};
class C : public B{
protected:
	Date *d;
public:
	C() : B(55, 50, 60.9){
		d = new Date(20, 9, 1993);
	}
	~C(){
		delete d;
	}
};
int main(){
	A a;
	B b(99,98,97);
	C c;
	cout<<"C++ is flexible!"<<endl<<endl;
	cout<<"Example done by Parthas Menethil(Luke.J.Sun)"<<endl<<endl;
	cout<<"Size of class A: "<<sizeof(a)<<endl;
	cout<<"->int(4) + double(8) + uint(4) = 16"<<endl;
	cout<<"Size of class B: "<<sizeof(b)<<endl;
	cout<<"->virtual table pointer(4) + double(8) * 3 = 28"<<endl<<endl;
	cout<<"Now let's retrieve everything from memory..."<<endl;
	/* Instance a */
	cout<<"In instance a:"<<endl;
	// Take stuffs from the beginning pointer
	cout<<"[Private]apples:"<<*(int*)(&a)<<endl;
	// Change the pointer to a char pointer so offset would moved by 1 per increasement, use sizeof to count the size of variable type
	cout<<"[Private]weight:"<<*(double*)((char*)(&a) + sizeof(int))<<endl;
	cout<<"[Private]bugs:"<<*(unsigned int*)((char*)(&a) + sizeof(int) + sizeof(double))<<endl<<endl;
	/* Instance b */
	cout<<"Ininstance b:"<<endl;
	// Pass the initial virtual table pointer
	cout<<"[Private]exam_grade:"<<*(double*)((char*)&b + 4)<<endl;
	// Move forward to pass the first double and retrieve the second one
	cout<<"[Protected]test_grade:"<<*(double*)((char*)&b + 4 + sizeof(double))<<endl;
	// Move forward to pass the second double and retrive the third one
	// The use of sizeof is not necessary because sometimes we know the variable type length
	// double has the length of 8
	cout<<"[Public]quiz_grade:"<<*(double*)((char*)&b + 4 + sizeof(double) + 8)<<endl<<endl;
	/* Let's try to retrieve the values in the Date object in C class */
	/* Instance c */
	cout<<"Instance c:"<<endl;
	cout<<"[Protected]d->day:"<<"[Your answer?]"<<endl;
	cout<<"[Protected]d->month:"<<"[Your answer?]"<<endl;
	cout<<"[Protected]d->year:"<<"[Your answer?]"<<endl;
	return 0;
}

At the beginning, I counted and explained the sizes as well as structures of class A and B, and then retrieved all values from A and B using only pointers.

To get the variables’ values from class C is tricky, you can try to do it by yourself! I believe that you can find the right answers out!

My solution will be released in the next post about this topic. Before that, try it out!

The right output should be:

C++ is flexible!

Example done by Parthas Menethil(Luke.J.Sun)

Size of class A: 16
->int(4) + double(8) + uint(4) = 16
Size of class B: 28
->virtual table pointer(4) + double(8) * 3 = 28

Now let’s retrive everything from memory…
In instance a:
[Private]apples:100
[Private]weight:99.9989
[Private]bugs:123456

Ininstance b:
[Private]exam_grade:99
[Protected]test_grade:98
[Public]quiz_grade:97

Instance c:
[Protected]d->day:20
[Protected]d->month:9
[Protected]d->year:1993

Try to match my output. There could be many ways to do the samething in c++.