分类: 计科

比如一些作者说他们没找到有关的研究,但我就找到了在他们之前的研究这种
比如作者1称另外一些作者的研究还停留某某阶段,但作者1发布论文后还是作者依旧停留在原始阶段
为了完成论文,完全可以随便取糟粕说哪里哪里没做好,接着就取精华说是自己想出来的
取不同的糟粕和不同的精华就形成了不同的文章

###### 放弃上线
* 放弃国内市场,转战海外市场

* 国内条条框框太多,如需要软著,需要版号

* 海外市场指steam, app store, google play, microsoft store
* google play需要google账号绑定国际银行卡以便付注册开发者费用
* 现在注册google账号需要手机号,中国的手机号好像直接说不支持给发短信/语音的验证码
* steam上线游戏需要多少钱一个来着,几百??
* app store是ios的把,妹有ios机子
* micro store开发者注册需要visa银行卡

###### 不搞qq小游戏开发
* 微信小游戏开发用cocos creator, 但此不支持qq小程序
* 虽然一些微信小游戏可以直接放qq上跑,但可能会出现一些bug,这些bug多半是因为qq自己妹整好
* 需要学js/TypeScript, 妹有原生socket, 原生的话需要用websocket
* 服务器用node.js,一些web前端用的socket库,服务器还需要用同样的库之类的

###### cocos creator
* 简称ccc
* 向unity学习,界面实在是太像了,也可将脚本赋给sprite(称为组件化)
* 本来凉了的,但优于unity不可以wx小游戏,ccc以此为优势又吸引了开发者回归

1.wall向所有登陆用户发消息
example :
wall “hell,who are you”
wall filename

2.write向指定用户的指定终端发送消息
write username ttyname
example:
write root pts/0

3.

echo “Hey Binn. how are you?” > /dev/tty2

解决WSL无法运行32位程序问题

解决WSL无法运行32位程序问题

./arm-none-linux-gnueabi-gcc: cannot execute binary file: Exec format error

因为我是学生,比较穷,只有一台电脑,而且有使用Windows的需要,但是又需要使用到Linux,所以选择了Windows子系统(WSL),但是发现WSL不支持32位程序的运行,在苦苦搜索后,终于在github找到了解决方法。

解决方案的原链接

微软官方说了,WSL暂时不准备支持ELF-32的运行

要求系统版本1709, build 16299 或以上。

安装qemu 和 binfmt

1
2
3
sudo apt update
sudo apt install qemu-user-static
sudo update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'

注意: 每次重启WSL后如果需要i386的支持需要以下命令

1
sudo service binfmt-support start

Enable i386 architecture and packages

1
2
3
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install gcc:i386

测试

1
2
3
4
5
6
7
8
$ file arm-none-linux-gnueabi-gcc
arm-none-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
$ ./arm-none-linux-gnueabi-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/2009q3-respin-linux-lite/src/gcc-4.4/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --disable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2009q3-67' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/julian/2009q3-respin-linux-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/julian/2009q3-respin-linux-lite/obj/host-libs-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/julian/2009q3-respin-linux-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/julian/2009q3-respin-linux-lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67)

  1. 1.配置m个worker来map,r个worker来reduce。
  2. 2.将混合均匀的输入文件分成m个输入文件,每个输入文件对应一个doMap。这里的混合均匀表示每份输入文件中的内容之间没有联系,可以拆分成小份一份一份的处理。
  3. 3.对每个输入文件使用doMap进行遍历。每个doMap对应一次mapF(filename string, content string) []KeyValue。doMap首先将输入文件名和文件内容传给mapF处理。mapF处理完这个文件,返回很多键值对,doMap接着将这些混合均匀的键值对们平均分成r份,1每份有多个键值对,2每份对应给一个doReduce处理, 3每份保存到一个文件,文件名格式为jobName-mapTaskIndex-reduceTaskIndex。———注意:mapF返回的<key, value>中的key不是作为参数传给mapF的filename,而是可以随便的。mapF这里就相当于从命令行中读取到了输入。
  4. 4.遍历m次doReduce。doReduce读取m个来自m个doMapTask的文件,(因为每个doMapTask都产生一个文件给每个doReduceTask)。doReduce合并这些文件中key相同的,key有多少个不同的就调用多少次reduceF(key string,  values []string) string。每个reduceF返回这一个key的对应的最终结果值。doReduceTask最终得到所有不同key及其对应的最终结果值。———注意:doReduceTask得到的这些<Key, Value>中的key是mapF返回的key
  5. 5.所有doReduceTask的结果再次合并。

有以下规律:

  1. 一个输入文件对应一个doMap,doMap对应r个输出文件给r个doReduceTask,doReduceTask有m个输入文件来自m个doMap。
  2. 2. 输入文件被均分成m个,每个doMap的结果被均分给r个doReduceTask,每个doReduceTask使用来自每一个doMapTask的输出。

输入命令bluetoothctl进入蓝牙交互界面。

交互界面里:

1. scan on 开始扫描, scan off 结束扫描

2. pair AB:CD… 进行配对

3. connect AB:CD… 进行连接。

如果connect时

 org.bluez.Error.Failed

这可能是由于未安装pulseaudio-module-bluetooth软件包。如果丢失则安装它,然后重新启动pulseaudio。

sudo apt install pulseaudio-module-bluetooth 
pulseaudio -k
pulseaudio --start

如果问题不是由于缺少包,那么在这种情况下的问题是PulseAudio没有赶上。此问题的常见解决方案是重新启动PulseAudio。请注意,在PulseAudio以用户身份运行时,以root身份运行bluetoothctl是完全正常的。重新启动PulseAudio后,重试连接。没有必要重复配对。

仅当上述内容不适合您时,继续尝试第二部分:

如果重启PulseAudio不起作用,则需要加载module-bluetooth-discover。

sudo pactl load-module module-bluetooth-discover

可以将相同的load-module命令添加到/etc/pulse/default.pa
如果仍然无效,或者您正在使用PulseAudio的系统范围模式,还要加载以下PulseAudio模块(同样可以通过default.pa或system.pa加载这些模块):

module-bluetooth-policy module-bluez5-device module-bluez5-discover


 

 

接着如果还是使用默认的设备播放,而不是蓝牙播放的话

编辑 /etc/pulse/default.pa,添加下面2行

# automatically switch to newly-connected devices
load-module module-switch-on-connect

1 .  application目录下新建http/middleware/CrossDomain.php

<?php
/**
* 请求处理中间件
* Author: weiyongqiang<hayixia606@163.com>
* Date: 2018/9/27
* Time: 11:02
*/
namespace app\http\middleware;
use think\Response;
class CrossDomain
{
public function handle($request, \Closure $next)
{
header(‘Access-Control-Allow-Origin: http://localhost:8080’);
header(‘Access-Control-Allow-Credentials: true’);
header(‘Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With’);
header(‘Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE’);
header(‘Access-Control-Max-Age: 1728000’);
if (strtoupper($request->method()) == “OPTIONS”) {
return Response::create()->send();
}
return $next($request);
}
}

2.  需要的模块下middleware.php(与controller目录 同目录):

<?php
/**
* 中间件注册
* Author: weiyongqiang<hayixia606@163.com>
* Date: 2018/9/27
* Time: 11:49
*/
return [
\app\http\middleware\CrossDomain::class
];

0. 以管理员方式运行powershell

1.

vue init simulatedgreg/electron-vue my-project

// 1. 不要用eslint!不然对js格式要求严格

// 2. 用builder而不是packager,packager太慢了

2.

cd my-project

3.

cnpm install

4. 安装element-ui

cnpm install element-ui –save-prod

 

背景:学习PC Assemble Language。

1. nasm -f elf fileName.asm

这样生成了合适的fileName.o

2. nasm -f elf -d ELF_TYPE asm_io.asm

这样生成了合适的第三步用到的asm_io.o

P.S. 这里就是”ELF_TYPE”, 不要换成其他的如”elf”

3. gcc -m32 -o fileName driver.c asm_io.o

这样就生成了可执行文件fileName

4. ./fileName

这样就运行了!