小程序----Loading
<view class="body-show">
<loading hidden="{{hidden}}">Loading...
</loading>
<button type='default' bindtap='loadingClick'>弹出Loading</button>
</view&
小程序----视频播放
我们小程序的视频播放和弹幕微信团队已经帮我们封装的非常好了
<view class="section">
<video class="videoc" src="{{src}}"></video>
</view>
<button bindtap='chooseVideo'>选取视频</
canvas-----绘制平行不同样式线段+填充三角形的绘制
<canvas width="600" height="400"></canvas>
var myCanvas=document.querySelector('canvas');
//获取上下文
var ctx=myCanvas.getContext('2d');
ctx.beginPath();//每次画不同样式的直线都开始新的路径,这样才不...
相关状态码及宏函数列表
#ifndef STATUS_H
#define STATUS_H
/状态码/
#define TRUE 1 //真
#define FALSE 0 //假
#define YES 1 //是
#define NO 0 //否
#define OK 1 //通过
#define ERROP 0 //错误
#d...
数据结构c语言版 严蔚敏(抽象数据类型Triplet的表示和实现)
**
头文件:
**
c1.h (相关头文件及函数结果状态代码集合)
/* c1.h (程序名) */
#include<string.h>
#include<ctype.h>
#include<malloc.h> /* malloc()等 */
#include<limits.h> /* INT_MA
数据结构c语言版 严蔚敏 顺序线性表12个基本操作及算法的实现
头文件:
c1.h (相关头文件及函数结果状态代码集合)
/* c1.h (程序名) */
#include<string.h>
#include<ctype.h>
#include<malloc.h> /* malloc()等 */
#include<limits.h> /* INT_MAX等 */
#include<std...
数据结构c语言版 严蔚敏(算法2.1 将所有在Lb中但不在La中的元素插入到La中)
头文件:
c1.h (相关头文件及函数结果状态代码集合)
/* c1.h (程序名) */
#include<string.h>
#include<ctype.h>
#include<malloc.h> /* malloc()等 */
#include<limits.h> /* INT_MAX等 */
#include<std...
笨方法学Python 习题16
笨方法学Python 习题16
from sys import argv
script, filename = argv
print("We're going to erease {0}.".format(filename))
print("If you don't want that, hit CTRL-C (^C).")
print(
笨方法学Python习题15
from sys import argv #引入argv
script, filename = argv
txt = open(filename) #打开文本文件
print("Here's your file %r:" % filename)
print(txt.read())
print("Type the filename again:")
file_again = input('&g...
Python 文本的处理
先open, 并赋值给一个中间变量(当然这个中间变量可以省略).
对中间变量进行操作,操作的结果对原来文本依然有效.
举例: 将 from_file. txt 复制到 to_file. txt 中
借助中间变量
from sys import argv
script, from_file, to_file = argv
in_file = open(from_file) # 打开 from...
笨方法学Python 习题18
命名、变量、代码和函数
# this one is like your script with argv
def print_two(*argv):
arg1,arg2 = argv
print("arg1: {0}; arg2: {1}".format(arg1,arg2))
# arg1,arg2 都是局部变量;不是全局变量
# 单独定义的变量才是全局变量
# OK, this *a...
笨方法学Python 习题19
def cheese_and_crackers(cheese_count, boxes_of_crackers):
print("You have {0} cheeses!".format(cheese_count))
print("You have {0} boxes of crackers!".format(boxes_of_crackers))
print("Man
笨方法学Python 习题 20
from sys import argv # 依然调用 argv
script, file_name = argv # 解包变量 argv
def print_all(f): # 定义函数。
print(f.read()) # 函数功能:打印文本内容。
def rewind(f): # 定义函数。
f.seek(0) # 函数功能:回到文本的初始位置
def print_...
今日推荐
周排行