首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看全站
export const exportImg = function (imgsrc,name) { /* url图片地址,name图片名称 */
    // 不跨域
    // let alink = document.createElement('a');
    // alink.href = url;
    // alink.download = name || '图片下载'; //图片名
    // window.open(alink);
    let image = new Image();
    // 跨域,解决跨域 Canvas 污染问题
    image.setAttribute('crossOrigin', 'anonymous');
    image.onload = function() {
        let canvas = document.createElement('canvas');
        canvas.width = image.width;
......................
阅读全部 | xjjbczg 贴于 2019年11月21日 15:35     hide bbsi
#include<iostream>
using namespace std;
func(int a, int b)
{
static int m, i = 2;
i += m + 1;
m = i + a + b;
return(m);
}
int main()
{
int k = 4, m = 1, p;
......................
阅读全部 | 莫说 贴于 2019年11月16日 19:02     hide bbsi
class Untitled {
    /**
     * 分析:三角阵的起点可模拟坐标系实现,简化代码
     * */
    public static void main(String[] args) {
        for(int i=-9;i<=9;i++){
            for(int j=-9;j<=9;j++){
                if((i>j&&i+j>0)||(j>i&&i+j<0)){
                    int r = Math.abs(i);
                    int c = Math.abs(j);
                    System.out.print(r>c?r-c:c-r);
                }
......................
阅读全部 | asjiayong 贴于 2019年11月12日 17:11     hide bbsi
public class HelloWorld {
public static void main(String[] args) {

for (int i=1;i<9 ;i++ ){
    for (int j=1;j<=i ;j++ ){
        System.out.print(j+"*"+i+"="+(j*i)+" ");
    } 
    System.out.println();

}
}
阅读全部 | asjiayong 贴于 2019年11月12日 17:06     hide bbsi
#include<stdio.h>
#include<stdlib.h>

/**
*简单地创建一棵树
*三个函数:1.先序遍历创建树,-1作为空指针标志
*    2.输出先序遍历序列
*    3.计算所有结点data域的和
*在main函数中声明指向根结点的指针变量
*并输出和sum
*/

......................
阅读全部 | 三尺冰 贴于 2019年11月11日 23:40     hide bbsi
public class HelloWorld {
public static void main(String[] args) {
System.out.println("我在编程中国学JAVA");
System.out.println();
System.out.println("abc"=="ab"+"c");
String s="      asfjhajsdhjsdgajgjnbdjd   ";
String[] sp2=s.split("a");//返回的是副本是字符串数组
// String sp=s.split('a');//返回的是副本
String st=s.trim();
System.out.println(s+"________________"+st);
System.out.println(sp2);//[Ljava.lang.String;@2f2c9b19
String ss=s.substring(22);//
......................
阅读全部 | 昨日的风 贴于 2019年11月10日 13:42     hide bbsi
#include <stdio.h>

int main() {
printf("我在编程中国学C语言\n\n");

// 练习一下循环的使用
int i;
for (i=1; i<=20; i++) {
printf("我爱编程中国 %d 次\n", i);
}

printf("\n\n编程中国送我一颗小心心:");
......................
阅读全部 | 昨日的风 贴于 2019年11月10日 10:47     hide bbsi
#include <iostream>
using namespace std;

int function(int n){
    int m;
    if(n<0){
    cout<<"输入错误"<<endl;
    return 0;
}
else if(n==1){
    m=1;
 }
......................
阅读全部 | 徐二爷 贴于 2019年11月7日 12:25     hide bbsi
#include<stdio.h>
void main()
{
int score;
printf("请输入您的成绩:");
scanf("%d",&score);
if(score>=60){
printf("您及格了\n");
printf("请继续努力!\n");
}
}
阅读全部 | baihaohao 贴于 2019年11月2日 21:56     hide bbsi
#include <stdio.h>

int main()
{
    printf("Hello, world!");
    return 0;
}
阅读全部 | fangslearn 贴于 2019年11月2日 10:34     hide bbsi
上一页 110 111 112 113 114 115 116 117 118 119 下一页