pic

Vue中使用全局变量

时光总嘲笑我的痴心妄想 提交于 2019-12-01 23:01:46
配置这个的原因是因为在项目中有一些地方引用到了图片url,但是因为ip会不一样,每次修改这么多页面挺麻烦,就做了一下统一配置,方法如下: 1.在main.js中设置一个全局变量 Vue.prototype.$IMGURL = 'http://192.168.12.1:23000/img_files/';//统一设置页面上图片URL路径 2.界面上的使用(直接将定义的变量名写过来即可,不用加this.) <img :src="$IMGURL+scope.row.content" width="480" class="head_pic" @load="loadImg"/> 3.js中的使用 (需要在变量前边加上this.) this.imageUrl = this.$IMGURL+res.data.value; 来源: https://www.cnblogs.com/lswzt/p/11720103.html

Pack numbers into a bitset (python,bitwise operations)

无人久伴 提交于 2019-12-01 14:00:48
问题 The PIC microcontroller has a dead simple instruction set format. Each instruction is exactly 14 bits long, composed of a variety of numbers at differing bit lengths. I am trying to build a function that can take all these inputs and build a number that represents that instruction. This is what I have been trying to get working: def fileRegOp(opcode, d, f): out = opcode << 13 out = out | d << 7 out = out | f return out print "FIN:", bin(fileRegOp(1,True,15)) It outputs FIN: 0b10000010001111

How do you call an assembly function from C program?

不打扰是莪最后的温柔 提交于 2019-12-01 13:36:36
I am very new to Microcontroller programming particularly PIC18F87J11 , and I am using MPLAB C18 compiler. I was reading the datasheet for various topics such as saving to memory or working with timers. I noticed the examples are written in assembly language, but I have minimum experience with it. Is there a way to use the power of Assembly and C together in my project? I do not understand assembly that good or else I would try to convert the code to C, in this case, I rather just use the assembly code with few changes. Now can someone show me an example of how you would use an assembly

How do you call an assembly function from C program?

亡梦爱人 提交于 2019-12-01 11:42:44
问题 I am very new to Microcontroller programming particularly PIC18F87J11, and I am using MPLAB C18 compiler. I was reading the datasheet for various topics such as saving to memory or working with timers. I noticed the examples are written in assembly language, but I have minimum experience with it. Is there a way to use the power of Assembly and C together in my project? I do not understand assembly that good or else I would try to convert the code to C, in this case, I rather just use the

PIC16 C compiler

♀尐吖头ヾ 提交于 2019-11-30 15:45:38
问题 I am looking for a good C compiler for the PIC 16 family, working on Windows. A couple of colleagues use bknudc but some seem to dislike it. Apparently you cannot use the linker efficiently, and it turns out that the best is to set all code in include files. SDCC seems nice, but looks like it is still in beta, and not easy to setup or to have to deal with. There are quite some other options, all are the best available according to themselves. I found some forums discussing the topic and no

PIC16 C compiler

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 15:28:28
I am looking for a good C compiler for the PIC 16 family, working on Windows. A couple of colleagues use bknudc but some seem to dislike it. Apparently you cannot use the linker efficiently, and it turns out that the best is to set all code in include files. SDCC seems nice, but looks like it is still in beta, and not easy to setup or to have to deal with. There are quite some other options, all are the best available according to themselves. I found some forums discussing the topic and no one seem to agree with one another. MikroC , CCS (expensive), HiTech , BoostC. I would like to have some

python 显示gif图像

為{幸葍}努か 提交于 2019-11-30 13:16:37
from PIL import Image, ImageSequence import cv2 import numpy pic_name = "ani.gif" im = Image.open(pic_name) for frame in ImageSequence.Iterator(im): #使用迭代器 frame = frame.convert('RGB') cv2_frame = numpy.array(frame) show_frame = cv2.cvtColor(cv2_frame, cv2.COLOR_RGB2BGR) cv2.imshow(pic_name, show_frame) cv2.waitKey(10) 来源: https://blog.csdn.net/zhqh100/article/details/101444797

Android有用代码片段(三)

梦想的初衷 提交于 2019-11-30 08:35:47
前两个已经到第四十个了,所以还得再开一篇,用于记录,以前文章: Android有用代码片段(二) 、 android有用代码片段 ,有需要的朋友可以去看一下。 四十一、数据库写入图片信息: [java] view plain copy print ? <span style= "font-family:Tahoma, 'Microsoft Yahei', Simsun;color:#444444;" >数据库中的字段设置为 binary类型 Bitmap bitmap = BitmapFactory.decodeFile(path); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(CompressFormat.JPEG, 50 , baos); String sql = "insert into pic_info(pic_data, pic_name,pic_size,send_date,is_success) " + "values(?,?,?,?,?)" ; Object[] args = new Object[]{baos.toByteArray(), name, size, now, isSucess}; db.insert(sql, args); 读取数据库的图片信息:

Multithreading using C on PIC18

那年仲夏 提交于 2019-11-30 07:23:31
How does one create threads that run in parallel while programming PIC18 , since there is no OS? Don't use threads, use an event loop. The PIC18 is a small processor and an event loop based style means you don't have to keep many deep stacks hanging around. You need to write your code in terms of the event loop, but that is probably reasonable. If you do have some long running tasks, use timers are different interrupt priority levels to allow higher priority event loops to preempt lower priority event loops, and put appropriate types of work into the appropriate event queue. You could try

ubuntu16.04下跑Faster R-CNN demo (基于caffe). (亲测有效,记录经历两天的吐血经历)

≯℡__Kan透↙ 提交于 2019-11-30 05:29:38
本文假设你已经完成了安装,并可以运行demo.py 不会安装且用PASCAL VOC数据集的请看另来两篇博客。 caffe学习一: ubuntu16.04下跑Faster R-CNN demo (基于caffe). (亲测有效,记录经历两天的吐血经历) https://www.cnblogs.com/elitphil/p/11527732.html caffe学习二:py-faster-rcnn配置运行faster_rcnn_end2end-VGG_CNN_M_1024 (Ubuntu16.04) https://www.cnblogs.com/elitphil/p/11547429.html 一般上面两个操作你实现了,使用Faster RCNN训练自己的数据就顺手好多了。 第一步:准备自己的数据集 (1). 首先,自己的数据集(或自己拍摄或网上下载)分辨率可能太大,不利于训练,通过一顿操作把他们缩小到跟VOC里的图片差不多大小。 在/py-faster-rcnn/data/VOCdevkit2007/VOC2007 (找到你自己文件相对应的目录),新建一个python文件(如命名为trans2voc_format.py) 把以下内容粘贴复制进去,然后执行该python文件即可对你的图片进行裁剪缩放等操作: #coding=utf-8import os #打开文件时需要from