联邦学习

ML:我猜是Machine Leaning
https://blog.csdn.net/alw_123/article/details/82193535
https://blog.csdn.net/alw_123/article/details/82825785
ML中称它为损失函数(说白了就是计算误差的函数):线性方程与实际数据的偏差求和。
这里用到了欧拉定理()
涉及技术:
1、线性回归
2、同态加密技术

找到一组参数(也就是线性方程每一项上的系数)能让我的损失函数的值最小,那我这一组参数就能最好的拟合我现在的训练数据
1、梯度下降
2、线性回归方程正规求解

鸿蒙wifiiot编译问题解决

rm/system -Lbuild/build_tmp/scripts -Lbuild/libs -Lbuild/libs/hi3861/release/no_mesh -Lbuild/scripts -Lohos/libs -Tbuild/build_tmp/scripts/link.lds -Map=output/bin/Hi3861_wifiiot_app.map -o output/bin/Hi3861_wifiiot_app.out –start-group –no-whole-archive –whole-archive -lHwKeystoreSDK -ladc -lat -lauthmanager -lbootstrap -lbroadcast -lc_flash -lcfg -lcjson_static -lcmsis -lcommon_lite -lcpup -ldiag -ldiscovery -ldrv -lflash -lgcc -lgpio -lhal_file_static -lhal_iothardware -lhal_sysparam -lhal_token_static -lhichainsdk -lhilog_lite -lhiview_lite -lio -liothardware -liperf -lkal -lled_example -llitekernel_flash -lltoswpa -llwip -lm_flash -lmbedtls -lnative_file -lparttab -lres_cfg -lsamgr -lsamgr_adapter -lsamgr_source -lsdio -lsec_flash -lsensing_demo -lspiffs -lsysparam -lsystem -ltoken_static -ltrans_service -ltsensor -luart -lupg -lutils_kv_store -lwifi -lwifi_flash -lwifiiot_app -lwifiservice -lwpa –end-group
riscv32-unknown-elf-ld: ohos/libs/libhal_iothardware.a(hal_wifiiot_i2c.o): in function .L0 ': hal_wifiiot_i2c.c:(.text.HalI2cWrite+0x12): undefined reference to hi_i2c_write’
riscv32-unknown-elf-ld: hal_wifiiot_i2c.c:(.text.HalI2cRead+0x12): undefined reference to hi_i2c_read' riscv32-unknown-elf-ld: hal_wifiiot_i2c.c:(.text.HalI2cInit+0x12): undefined reference to hi_i2c_init’
riscv32-unknown-elf-ld: ohos/libs/libhal_iothardware.a(hal_wifiiot_pwm.o): in function .L0 ': hal_wifiiot_pwm.c:(.text.HalPwmInit+0x16): undefined reference to hi_pwm_set_clock’
riscv32-unknown-elf-ld: hal_wifiiot_pwm.c:(.text.HalPwmInit+0x24): undefined reference to hi_pwm_init' riscv32-unknown-elf-ld: hal_wifiiot_pwm.c:(.text.HalPwmStart+0x12): undefined reference to hi_pwm_start’
riscv32-unknown-elf-ld: hal_wifiiot_pwm.c:(.text.HalPwmStop+0x12): undefined reference to `hi_pwm_stop’
scons: *** [output/bin/Hi3861_wifiiot_app.out] Error 1
BUILD FAILED!!!!
Failed building output/bin/Hi3861_wifiiot_app.out: Error 1
Traceback (most recent call last):
File “../../build/lite/build_ext_components.py”, line 64, in
sys.exit(main())
File “../../build/lite/build_ext_components.py”, line 58, in main
cmd_exec(args.command)
File “../../build/lite/build_ext_components.py”, line 32, in cmd_exec
raise Exception(“{} failed, return code is {}”.format(cmd, ret_code))
Exception: [‘sh’, ‘hm_build.sh’] failed, return code is 2
ninja: build stopped: subcommand failed.
you can check build log in /home/tony/homo/out/wifiiot/build.log
/home/tony/homo/tools/ninja/ninja -w dupbuild=warn -C /home/tony/homo/out/wifiiot failed, return code is 1
usage:

解决方法:

  1. 编译过程中报错:undefined reference to hi_pwm_init 等几个 hi_pwm_开头的函数,

    • 原因: 因为默认情况下,hi3861_sdk中,PWM的CONFIG选项没有打开
    • 解决: 修改vendor\hisi\hi3861\hi3861\build\config\usr_config.mk文件中的CONFIG_PWM_SUPPORT行:
      • # CONFIG_PWM_SUPPORT is not set修改为CONFIG_PWM_SUPPORT=y
  2. 编译过程中报错:undefined reference to hi_i2c_init 等几个 hi_i2c_开头的函数,

    • 原因: 因为默认情况下,hi3861_sdk中,I2C的CONFIG选项没有打开

    • 解决: 修改vendor\hisi\hi3861\hi3861\build\config\usr_config.mk文件中的CONFIG_I2C_SUPPORT行:

      • # CONFIG_I2C_SUPPORT is not set修改为CONFIG_I2C_SUPPORT=y

鸿蒙Theme设置

方法一:在config.json的aiblities下新增主题样式
“metaData”: {
“customizeData”: [
{
“name”: “hwc-theme”,
“value”: “androidhwext:style/Theme.Emui.NoTitleBar”
}
]
}

鸿蒙小汽车

今天组装鸿蒙小汽车

具体功能有;
1、避障模式(超声波避障)
2、循迹模式

可惜超声波避障无效,循迹暂时无法触发。

申请找莹姐换一个,不知道给不给换。。。。

我回来了

一年多没写点什么

记录点什么了

账号都找了好久才全部回来

嘿,

你好吗!

保险拆单校验

业务上需要,老范叫加一个拆单校验。规则是这样的:

个险渠道自动核保条件增加一条:
若同一投保人、同一被保险人、同样的保险计划,在一周内出现两单及以上,系统自动核保不通过,提示语言为: 疑似拆单,请核保师关注。


由于规则条件较多,刚工作的小姑娘显然搞不了啊。
之前由于契约归我做,所以稍微跟她讲了一下思路,oracle自带的列转行函数可以轻松地(bian tai de )实现一些转换。

web支持cors

场景:

客户端发出http请求,服务端对客户端的http请求进行验证

问题:

问题的表象是 从Chrome发出HTTP命令后,Chrome console中报 “Origin null is not allowed by Access-Control-Allow-Origin”错误。

产生原因:

这是由于Browser的same origin policy 限制的缘故。简单来说,从HTML中发出XMLHttpRequest  请求时,Browser会做检查,如果发现Response中没有Access-Control-Allow-Origin Header或Access-Control-Allow-Origin Header Header的值与 HTML的 orgin 不同时,Browser会拒接绝该Response,Javascript就收不到该Response。 本地HTML的Origin是 null, 而Server端没有发出Access-Control-Allow-Origin Header Header给Browser,  所以会有了“Origin null is not allowed by Access-Control-Allow-Origin”错误。

简单的说,就是由于客户端和服务端处于两个不同的域,相互之间是不允许通信的.

不同的域包含:1.静态文件向服务器请求 2.客户端和服务端域名不同 3.客户端和服务端端口不同 等等,个人理解总结的,不是很准确.

解决办法:

事实上有一个W3C标准,Cross Origin Resource Sharing (CORS) 专门用来解决这个问题的。目前的主流Browser也有支持。CORS 在HTTP Message 加入几个Header, Browser和 Server可以利用这些Header来判断对方是否是安全,是否可以通信。

http://enable-cors.org/  介绍了目前常用的服务器和技术的支持CORS的办法.其中对与JAVA Web,里面没提到.整理下让Java Web支持的办法.

Java Web支持的办法:

使用CORS Filter 解决.

下载地址:http://software.dzhuvinov.com/cors-filter.html

使用方法:http://software.dzhuvinov.com/cors-filter-installation.html 

参考文章

http://www.cnblogs.com/LevinJ/archive/2012/04/09/2439670.html

43 Things: CORS
BuzzNet: CORS
del.icio.us: CORS
Flickr: CORS
IceRocket: CORS
LiveJournal: CORS
Technorati: CORS

http://blog.163.com/user_zhaopeng/blog/static/16602270820126111524280/

,