码迷,mamicode.com
首页 >  
搜索关键字:convert standalone    ( 5511个结果
任务22 科学计算和可视化
1 from PIL import Image 2 import numpy as np 3 4 a = np.asarray(Image.open('D:\\python_common_exercise\\exercise\\taylor.jpg').convert('L')).astype('f ...
分类:其他好文   时间:2020-05-05 10:58:07    阅读次数:68
Python图像处理 PIL中convert('L')函数原理
1. img = img.convert() PIL有九种不同模式: 1,L,P,RGB,RGBA,CMYK,YCbCr,I,F。 1.1 img.convert('1') 为二值图像,非黑即白。每个像素用8个bit表示,0表示黑,255表示白。 1.1.1 Code 1 from PIL impo ...
分类:编程语言   时间:2020-05-04 13:06:40    阅读次数:458
【字符串】6. Z 字形变换
题目: 解答: 1 class Solution { 2 public: 3 string convert(string s, int numRows) 4 { 5 if (numRows == 1) 6 { 7 return s; 8 } 9 10 // 防止s的长度小于行数 11 vector< ...
分类:其他好文   时间:2020-05-04 10:40:43    阅读次数:63
Mysql高性能优化
一、背景 最近公司项目添加新功能,上线后发现有些功能的列表查询时间很久。原因是新功能用到旧功能的接口,而这些旧接口的 SQL 查询语句关联5,6张表且编写不够规范,导致 MySQL 在执行 SQL 语句时索引失效,进行全表扫描。原本负责优化的同事有事请假回家,因此优化查询数据的问题落在笔者手中。笔者 ...
分类:数据库   时间:2020-05-03 11:03:08    阅读次数:66
python @staticmethod 注解,静态方法,可以省略类里那个self参数
class staticmethod(object): """ staticmethod(function) -> method Convert a function to be a static method. A static method does not receive an implici ...
分类:编程语言   时间:2020-05-02 22:32:25    阅读次数:120
3、递归(动态规划思想)
# -*- coding:utf-8 -*-#@Time : 2020/5/2 11:06#@Author: Aluosen#@File : Recurrence.py##进制转换def toStr(n,base): convertString = '0123456789ABCDEF' if n < ...
分类:其他好文   时间:2020-05-02 20:46:19    阅读次数:75
1290. Convert Binary Number in a Linked List to Integer
package LeetCode_1290 /** * 1290. Convert Binary Number in a Linked List to Integer * https://leetcode.com/problems/convert-binary-number-in-a-linked- ...
分类:其他好文   时间:2020-04-29 00:53:52    阅读次数:52
Java三目运算符的使用(欢聚时代考题)
下面程序输出的结果是?public class ExamSample { public static void main(String[] args) { new ExamSample().convert(); } public void convert() { int i = 012; char ...
分类:编程语言   时间:2020-04-28 09:48:23    阅读次数:118
使用AVAudioRecorder录制音频
AVAudioRecorder 同AVAudioPlayer 类似,都是AVFoundation框架下的类 AVAudioRecorder 是一个录音器,可以调用方法来录制音频,使用还是比较简单的。 一、开启录音权限,并设置录音category 需要在info.plist文件中添加Privacy M ...
分类:其他好文   时间:2020-04-28 00:09:11    阅读次数:77
nodejs 调用win32 api
"video" "教程文件" "win32 api" test.js const ffi = require("@saleae/ffi"); // Convert JSString to CString function TEXT(text) { return Buffer.from( , "ucs ...
分类:Windows程序   时间:2020-04-27 17:53:02    阅读次数:556
5511条   上一页 1 ... 25 26 27 28 29 ... 552 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!