修改Mac用户名导致丢失管理员权限问题修复

出现的问题主要有两点

  1. 数据恢复问题 1)修改用户名后,mac系统认为是创建了一个新的用户,这时候,之前管理员账号的数据在当前用户的finder里是看不到的。这时候可以去到桌面,点击又上角的“前往” 。
  2. 管理员权限问题 虽然数据问题恢复了,但是另外一个更严重的问题又出现了。新的用户名账号只是一个普通用户账号,没有管理员权限没有管理员权限了。在需要管理员权限的操作中输入具有管理员权限的前用户名和密码也不认了。 解决办法:
  3. 创建一个新的具有管理员权限的用户 第一步:重启电脑,并长按组合键:command+s进入Single User Model模式,出现像DOS一样的提示符 。 第二步:在命令行顺序输入命令:
1
2
3
4
fsck -y
mount -uaw /
rm /var/db/.AppleSetupDone
reboot

苹果电脑会重启,并且在开机后出现新装机时的欢迎界面。重新建立一个新的管理员账号。

巡查自查整合类图

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
title 巡查及处理整合迭代
center header
巡查执法及处理整合设计实现图
endheader

'******* 类声明模块 *******'
'类型:class,abstract,interface,annotation,enum'
'访问域:(-)私有,(#)保护,(~)包私有,(+)公有'

class TagCenter{
-- 私有属性-- '分隔符--,..,==,__'
IBOutlet UIScrollView *titleScrollView;
IBOutlet UIScrollView *contentScrollView;
NSMutableArray *titleLabels;
IBOutlet PatrolSearchBar *ibSearchBar;
IBOutlet UIView *ibErrorView;
ReqFilterStoreModel *filterModel;
__初始化 滚动标题方法__
// 初始化UIScrollView
- (void)setUpScrollView
// 添加所有子控制器对应标题
- (void)setUpTitleLabel
// 添加所有子控制器
- (void)setUpChildViewController
}
package 过滤工具 <<Folder>>{
class JHTagListView{
--动画属性--
IBOutlet NSLayoutConstraint *ibTableViewToLeftViewConut;
IBOutlet NSLayoutConstraint *ibShadeToFilterViewConut;
--方法--
-(void)setupFilterView:(NSArray *)dataArray;
-(void)loadDataList:(dispatch_group_t)group;
-(void)showListView;
}
JHTagListView *-- JHFilterStoreTypeCell
UICollectionView ()- JHFilterStoreTypeCell 
class JHFilterStoreTypeCell{
--接口属性--
NSString *typeName;
NSArray *tagArr;
}
JHTagListView *-- JHFilterPatrolTimeCell
class JHFilterPatrolTimeCell{

}
JHFilterPatrolTimeCell *-- DateAlertPickerController 
class DateAlertPickerController{
}
note left of DateAlertPickerController
时间选择器的封装
end note
note right of JHFilterPatrolTimeCell
定义时间cell样式
end note

note top of JHFilterStoreTypeCell
定义业态类型样式
end note 


}
'显示/隐藏类,类方法属性等 关键字支持class,interface,enum'

'---- 声明类关系线备注,可以当做用例来参与到关系连接中 ---'
note "实现过滤UI及业务的类" as filterClassnote

'###### 类备注模块 类声明末尾使用:note 位置: 备注#########'
note left of TagCenter #red
整个框架的主体:包括搜索框/过滤条件列表/滚动标签
end note

'&&&&&& 类组合模块 类模块 &&&&&&&'
'六种组合样式:Node,Rectangle,Folder,Frame,Cloud,Database'
package tagList <<Folder>>{
class tagBase{
-- 属性-- '分隔符--,..,==,__'
TagListType curTagType; //标签类型
NSMutableArray *dataArray; //列表数据源
__ getter/setter方法__
-(NSMutableArray *)dataArray //通过标签类型过滤出当前列表的数据源
}
package 基础类 <<Folder>> {
class JHTagBanLiModel{
ddd
}
class JHTagBanliCell{
ddd
}
}

package 巡查执法 <<Folder>>{
tagBase <|-- DaiBan
class DaiBan{
--属性--
tagtype
redhot //红点显示
--方法--
tableView
}
tagBase <|-- YiBanVC 
package YiBan <<Folder>>{
class YiBanVC{
dddd
}
YiBanVC *-- YiBanCellView
JHTagBanliCell <|-- YiBanCellView 
tagBase <|-- Guanli
class Guanli{
--属性--
tagtype
--方法--
tableView
} 
}

}
package 自检自查 <<Folder>>{
tagBase <|-- YiZCha
class YiZCha{
--属性--
tagtype
--方法--
tableView
}
tagBase <|-- WeiZCha
class WeiZCha{
--属性--
tagtype
--方法--
tableView
}
}
}

'>>>>>> 类关系图及连接备注模块 >>>>>>>>'
'关系节点符:(|>)继承,(*)合成 ,(o)聚合, 其他#,x,},+,^ 连线符:(--)实线 ,(..)虚线'
TagCenter "1" *-down[#red]- "3+2"tagBase:列表基类 >
note left on link #green
解偶列表与搜索功能相关的UI和业务
end note
TagCenter "1" *-down[#red]- "1"JHTagListView:过滤条件列表 >






center footer
类图实现设计图
endfooter

在Codeanywhere上使用zsh终端及高亮样式

检查是否安装:

1
chsh

打印:

安装

Debian / Ubuntu 安装:

1
$ sudo apt-get install zsh

zsh直接启动:

1
zsh

安装oh-my-zsh样式工具

在hexoDeploy项目根目录执行:

1
sh Util/oh-my-zsh/installTemplate.sh

会提示sed文件修改失败的错误:

Hexo插件开发

{% github hexojs site e1839be width = 30% %}

Hexo 有强大的插件系统,使您能轻松扩展功能而不用修改核心模块的源码。在 Hexo 中有两种形式的插件:

脚本(Scripts)

如果您的代码很简单,建议您编写脚本,您只需要把 JavaScript 文件放到 scripts 文件夹,在启动时就会自动载入。

Hexo开发文档及使用教程

{% github hexojs hexo 0b26940 width = 30% %}

开始之前

请遵守以下准则:

  • 遵守 Google JavaScript 代码风格。
  • 使用 2 个空格缩排。
  • 不要把逗号放在最前面。

工作流程

  1. Fork hexojs/hexo
  2. 把库(repository)复制到电脑上,并安装所依赖的插件:
1
2
3
4
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
  1. 新增一个功能分支:
1
$ git checkout -b new_feature
  1. 开始开发。
  2. 推送(push)分支:
1
$ git push origin new_feature
  1. 建立一个新的合并申请(pull request)并描述变动.

注意事项

不要修改 package.json 的版本号。 只有在测试通过的情况下您的合并申请才会被批准,在提交前别忘了进行测试。

Jazzy生成Swift文档工具

{% github realm jazzy 6932e5e width = 30% %}

demo {% github appcoda SwiftDocSample 24c1649 width = 30% %}

使用 Jazzy 产生代码文档

Jazzy 是一款可以为 Swift 和 Objective-C 代码产生具有 Apple 风格的代码文档工具。事实上,Jazzy 会为你创建一个链接所有代码文档的独立网页。它是一款命令行工具,但还是很容易使用的。 在 Xcode 中使用 Markdown 生成 Swift 代码文档