pic

cdc_acm : failed to set dtr/rts - can not communicate with usb cdc device

落花浮王杯 提交于 2019-12-03 14:50:10
I was trying to enumerate usb cdc device using pic24fj128gb206. Device seems to be enumerated properly. But when I connect my device to Linux PC, I am getting the below warning message from kernel. cdc_acm 1-8.1.6.7:1.0: failed to set dtr/rts And this message will repeat when I try to connect using screen. screen /dev/ttyACM9 115200 And I am not able to communicate with my device from PC [ Ubuntu, 14.04 ] When analysing the data using wireshark, it looks like USB communication is fine until, host issues URB_CONTROL_out and the device responds with URB status as Broken Pipe (-EPIPE ) (-32) Can

linux,进行批量下载文件操作

夙愿已清 提交于 2019-12-03 14:40:31
wget -i url.txt -P . /Photo 批量下载图片(一般是某个相册的图片) 首先先得到一张图片的地址如:www.example.com/pic/001.jpg 同相册的图片地址会有一定的规律,可以用: $: echo www.example.com /pic/ {001..020}.jpg >url.tx t 得到二十张图片的地址是用空格分开的,再用vim编辑url文件,把空格替换成回车(\r) :s/ /\r /g wget命令的-i参数是从指定的文件读取地址,-P参数是把下载的文件放到指定的路径下。 来源: https://www.cnblogs.com/qiangyuzhou/p/11800421.html

ajax

被刻印的时光 ゝ 提交于 2019-12-03 12:59:11
1、什么是ajax?   1.AJAX 是一种在无需重新加载整个网页的情况下,能够更新部分网页的技术。   2.AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML)。   3.AJAX 不是新的编程语言,而是一种使用现有标准的新方法。 2、ajax与传统开发模式的区别:    ajax开发模式: 页面将用户的操作通过ajax引擎与服务器进行通信,将返回的结果给ajax引擎,然后ajax将数据插入指定位置。    传统的开发模式: 用户的每一次操作都触发一次返回服务器的HTTP请求,服务器做出处理后,返回一个html页面给用户。 3、ajax的使用: 1、ajax发送字符串数据 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>注册</title> <script type="text/javascript" src="../static/js/jquery-1.12.4.min.js"></script> <script type="text/javascript" src="../static/js/main.js"></script> </head> <body> <form method="post" enctype=

laravel Collections&#039;s function only on Elequent ORM result always return empty collection

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want only return the id , name and pic_thumbnail column of the Eloquent ORM collections result. I use only() on the result of get() . But I always get the empty collection. public function models() { if(!isset($_SESSION["uid"])) return Response::json(['error' => 'please login.']); $models = Model::where('user_id', $_SESSION["uid"])->get(); Log::info($models); Log::info($models->only(['id', 'name'])); Log::info($models->only(['id', 'name'])->all()); foreach($models as $model){ $pic = $model->pics()->orderBy('displayorder')->first(); if($pic

Whats the best resource to learn Assembly language for PIC microcontroller's [closed]

孤者浪人 提交于 2019-12-03 07:21:49
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. I'm going to start working on a project where I need to have a decent understanding of Assembly language for the PIC microcontroller's. I'm intimately familiar with C/C++, so I know how to code for the most part, and I have done many projects for the PIC

Free alternative to MPLAB (PIC development)

拈花ヽ惹草 提交于 2019-12-03 05:24:31
I started using MPLAB recently, but for someone that works with Eclipse and VS the IDE it's very limited. Do you know any free IDE or how to configure Ecplise or Netbeans to PIC development? Thanks all The underlying toolchain (compiler/linker etc.) can be used from any environment including Eclipse and Visual Studio, though Eclipse is probably the more flexible in this respect. MPLAB has a feature to export a project as a makefile that can be used with GNU make, although you may rather generate your own makefile, or use the project management provided by Eclipse. In Visual Studio, create a

R extract first number from string

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a string in a variable which we call v1. This string states picture numbers and takes the form of "Pic 27 + 28". I want to extract the first number and store it in a new variable called item. Some code that I've tried is: item <- unique(na.omit(as.numeric(unlist(strsplit(unlist(v1),"[^0-9]+"))))) This worked fine, until I came upon a list that went: [1,] "Pic 26 + 25" [2,] "Pic 27 + 28" [3,] "Pic 28 + 27" [4,] "Pic 29 + 30" [5,] "Pic 30 + 29" [6,] "Pic 31 + 32" At this point I get more numbers than I want, as it is also grabbing other

How does ajax work with python? [closed]

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm been googling around, but I don't quite understand how ajax works. Could please somebody explain how this works? $.ajax({ url: "{{ url_for( 'app.slideshow.<tag>' ) }}", type: "", data: {'param':}, dataType: "", success : function(response) { } What I'm trying to do is see if document.getElementsByClassName(current) has changed. If it has, it will ask app.py for comments and tags on current, and update the page without refreshing. I have no idea what to write to receive this on the app.py either. I'll include my app.py, but it is not good

Could not find com.squareup.picasso:picasso:2.5.2

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I adding picasso dependencies but seem it not worked. I tried changing the version. But still useless. This my build.gradle (module) apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion '23.0.3' defaultConfig { applicationId "bhouse.travellist_starterproject" minSdkVersion 21 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs',

Creating a movie in Jython/Python

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to make a movie, whilst creating frames through a loop. It is saving, but only the first frame (which it plays as a movie - short movie!) I've tried various things and cannot figure out what I am doing wrong. Thanks def synthesiseFrame ( folder ): folder = r "D:\FOLDER" m = 0.5 for x in range ( 1 , 121 ): pic = makeEmptyPicture ( 960 , 540 ) for x in range ( 0 , 960 ): for y in range ( 0 , 540 ): r =# some code g =# some code b =# some code color = makeColor ( r , g , b ) px = getPixel ( pic , x , y ) setColor ( px ,