Bovey's Blog

点滴


  • 首页

  • 归档

  • 标签

markdownFlowTest

发表于 2017-07-24

code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
st=>start: Start|past:>http://www.google.com[blank]
e=>end: End:>http://www.google.com
op1=>operation: My Operation|past
op2=>operation: Stuff|current
sub1=>subroutine: My Subroutine|invalid
cond=>condition: Yes
or No?|approved:>http://www.google.com
c2=>condition: Good idea|rejected
io=>inputoutput: catch something...|request

st->op1(right)->cond
cond(yes, right)->c2
cond(no)->sub1(left)->op1
c2(yes)->io->e
c2(no)->op2->e

flow

唯一不变的是变化中的需求

发表于 2017-06-30

摘自软件开发为什么很难, 版权声明:自由转载-非商用-非衍生-保持署名| Creative Commons BY-NC-ND 3.0

一个有意思的举例

软件开发为什么很难中有一个需求不断变化的举例,很有意思,特意给记录下来

需求的变化方向

作为程序员,有一天你被要求写一段代码,这段代码需要完成一件很简单的事:

打印”Hello, world”5次 很容易嘛,你想,然后顺手就写下了下面这几行代码:

1
2
3
4
5
print("Hello, world")
print("Hello, world")
print("Hello, world")
print("Hello, world")
print("Hello, world")

阅读全文 »

Markdown table test

发表于 2017-06-29 | 分类于 markdown

目标

测试github markdown表格语法,因为之前想用表格时参照别人的语法得不到想要的表格。

原生语法

参考利用Markdown创建表格

1
2
3
4
5
| Name | Academy | score | 
| - | :-: | -: |
| Harry Potter | Gryffindor| 90 |
| Hermione Granger | Gryffindor | 100 |
| Draco Malfoy | Slytherin | 90 |

结果如下:
| Name | Academy | score | | - | :-: | -: | | Harry Potter | Gryffindor| 90 | | Hermione Granger | Gryffindor | 100 | | Draco Malfoy | Slytherin | 90 |

教程1 简单语法

参考利用Markdown创建表格

1
2
3
4
5
Name | Academy | score 
- | :-: | -:
Harry Potter | Gryffindor| 90
Hermione Granger | Gryffindor | 100
Draco Malfoy | Slytherin | 90

结果如下:
Name | Academy | score

  • | :-: | -:
    Harry Potter | Gryffindor| 90
    Hermione Granger | Gryffindor | 100
    Draco Malfoy | Slytherin | 90

教程2 简书教程

参考Markdown——入门指南

1
2
3
4
5
| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |

结果如下:
| Tables | Are| Cool |
| —–|:—–:| —–:|
| col 3 is|right-aligned|$1600|
| col 2 is| centered|$12|
| zebra stripes | are neat|$1 |

170628-Create_a_empty_branch_under_git

发表于 2017-06-28

参考链接

Creating Project Pages manually 作者: Volcano 发表于October 15, 2012 at 3:38 pm

版权信息: 可以任意转载, 转载时请务必以超链接形式标明文章原始出处和作者信息及此声明

永久链接 - http://www.ooso.net/archives/636

有时候我们需要在Git下创建一个空分支,从头开始Coding —— 这大概是那些重构帝最喜欢的事情。参考了github,才找到一个合适的方法。

怎样安全的进行这项操作

我们需要建一个“孤立”的空分支,为了尽可能的保证数据安全,最好还是重新clone一份代码。

1
2
3
4
5
6
7
8
9
$git clone https://github.com/user/repo.git
# Clone our repo

# Cloning into \'repo\'...
# remote: Counting objects: 2791, done.
# remote: Compressing objects: 100% (1225/1225), done.
# remote: Total 2791 (delta 1722), reused 2513 (delta 1493)
# Receiving objects: 100% (2791/2791), 3.77 MiB | 969 KiB/s, done.
# Resolving deltas: 100% (1722/1722), done.

开工

这里以github的操作为例,下面试图创建一个名为gh-pages的空分支

1
2
3
4
5
6
7
8
9
$cd repo

$ git checkout --orphan gh-pages
# 创建一个orphan的分支,这个分支是独立的
Switched to a new branch \'gh-pages\'

git rm -rf .
# 删除原来代码树下的所有文件
rm \'.gitignore\'

注意这个时候你用git branch命令是看不见当前分支的名字的,除非你进行了第一次commit。

下面我们开始添加一些代码文件,例如这里新增了一个index.html

1
2
3
4
$ echo \"My GitHub Page\" > index.html
$ git add .
$ git commit -a -m \"First pages commit\"
$ git push origin gh-pages

在commit操作之后,你就可以用git branch命令看到新分支的名字了,然后push到远程仓库。

Vscode GBKtoUTF8 bug

发表于 2017-06-12

问题

使用Vscode过程中,会有一些文件是GBK编码格式,打开后是乱码,所以就安装了插件GBKtoUTF8,自动进行转换。
问题来了,如果一个*.h文件是GBK编码格式的,同时这个文件又被一个*.c文件给包含了,那么当按住ctrl键,同时移动鼠标到这个头文件的名称上时,会在当前位置打开*.h文件进行格式转换,并将转换后的代码覆盖*.c文件中的原有代码。

解决

需要时再打开GBKtoUTF8功能。^_^,简单粗暴。

TPS54331 Debug

发表于 2017-05-16

背景

一个项目中用到了TPS54331电源芯片,电源输入电压5V,输出4V,负载GPRS模块。

问题

上电后设备无法正常工作,输出波形2s周期三角波,最低电压2V,最高电压4V。增大输入电压后工作正常;或者增大输出电流后也正常。故障现象具有普遍性,所有设备都存在相同问题。

阅读全文 »

BeyondStudio for NXP Builder Settings

发表于 2017-04-19

摘要

在使用BeyondStudio过程中,发现修改Makefile中的部分配置信息无效,不能生产相应的文件,例如配置了JENNIC_CHIP=JN5168,但是实际生成的文件却是JENNIC_CHIP=JN5169。

阅读全文 »

BeyondStudio Nxp IDE Note

发表于 2017-02-24 | 分类于 Nxp

简述

最近研究JN5168,需要用到NXP官方提供的开发环境,使用中遇到的小东小西就纪录在这里。

问题

Type ‘uint8’ could not be resolved

参考官方文档JN-UG-3098,page 25:
Step 4 Configure the workspace preferences as follows:

  • Open the Preferences dialogue box by following the menu path Window>Preferences.
  • In the left tree of the Preferences dialogue box, open the C/C++ entry and click on the Indexer sub-entry. The right side of the dialogue box is now populated with the Indexer options.
  • In the section Build configuration for the indexer, select the radio-button Use active build configuration.
  • Click Apply and then OK.

问题解决。每次新建workspace都需要配置。

阅读全文 »

17224-bstudio_nxp-User Workspace config

发表于 2017-02-24 | 分类于 NXP

背景

最近要搞JN5168的开发,下载了官网的历程,搭建了官方提供的bstudio_nxp环境,默认配置下,导入官方demo,编译成功,但是导入到自定义workspace路径时就不能成功。

原因

简单了解发现,工程中的C文件包涵的头文件都没有。研究build文件夹下的makefile发现有如下语句:

1
2
3
4
5
SDK_BASE_DIR       ?= $(abspath ../../../../sdk/$(JENNIC_SDK)/)
APP_BASE = $(abspath ../..)
APP_BLD_DIR = $(APP_BASE)/$(TARGET)/Build
APP_SRC_DIR = $(APP_BASE)/$(TARGET)/Source
APP_COMMON_SRC_DIR = $(APP_BASE)/Common/Source

可以发现SDK_BASE_DIR经过路径设定指向了sdk/JN-SW-4163,而JN-SW-4163中放的是板级支持包,正是工程中c文件内缺少的头文件存放的位置。
分析默认配置发现,这些路径是在安装路径下可用的,而makefile用的是当前路径。所以呢最简单的办法是修改SDK_BASE_DIR变量指向JN-SW-4163所在路径。参考

1
#SDK_BASE_DIR       ?= $(abspath /C/NXP/bstudio_nxp/sdk/$(JENNIC_SDK)/)

阅读全文 »

chrome自动打开ahlqs bengpala 51m33

发表于 2017-02-08

背景

网上下载了个破解工具,然后还无视windows defender提示的有问题。结果…杯了个具。

经过很多次的折腾…

阅读全文 »

12345
xu.bovey

xu.bovey

点点 - 滴滴

49 日志
18 分类
27 标签
RSS
© 2019 xu.bovey
由 Hexo 强力驱动
主题 - NexT.Pisces