客户端
#!/usr/bin/env python3
#coding=utf-8
from socket import *
import sys
import getpass
def main():
if len(sys.argv) < 3:
print("argv is error")
return
......................
阅读全部
|
网贷小黑人
贴于 2018年9月28日 21:00
hide
bbsi
#include "stdafx.h"
#include "malloc.h"
#define STACK_INIT_SIZE 100;
#define STACKINCREMENT 10;
typedef struct{
int *base;
int *top;
int stacksize;
}sqstack;
void Initstack(sqstack &s)
{
s.base=(int *)malloc(STACK_INIT_SIZE * sizeof(int));//syntax error : missing ')' before ';'就是这老提示错误
......................
阅读全部
|
dlh1234
贴于 2018年9月23日 22:03
hide
bbsi
/*
给数的结点增加一个访问次数(visit)属性
遍历左子树,依次入栈
到底后出栈一个元素,判断访问次数是否为2
若不是,则访问次数为1,访问次数+1,再次入栈,T指向右子树(访问右子树),进入下次循环
若是,则输出,T指向空(左右子树都访问了),进入下次循环
*/
void PostOrderTraversal(BinTree BT)
{
BinTree T BT;
Stack S=CreatStack(Maxsize);
while(T||!IsEmpty(s)){
......................
阅读全部
|
Administraor
贴于 2018年9月22日 20:13
hide
bbsi
#include<iostream>
using namespace std;
#include<cmath>
double jud(double Y[],int n,double T[],int j,float c,float d);
void main()
{
int z;
float x;
double m,l;
float c,d;
double *T=new double[z];
double *Y=new double[z];
......................
阅读全部
|
川费
贴于 2018年9月12日 22:36
hide
bbsi
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import sys
import time
def get_remote_status():
l = os.popen('ssh root@remote.com "cd /var/www/mysite; git st"').readlines()
s = ''.join(l)
return s
......................
阅读全部
|
静夜思
贴于 2018年9月11日 10:29
hide
bbsi
#include <stdio.h>
void fun(int num1,int num2,int num3)
{
if(num1>num2&&num1>num3)
{
if(num2>num3)
{
printf("从大到小的顺序是:%d %d %d",num1,num2,num3);
}
else
printf("从大到小的顺序是:%d %d %d",num1,num3,num2);
}
......................
阅读全部
|
追梦者mxl
贴于 2018年9月6日 15:54
hide
bbsi
#include <stdio.h>
#include <string.h>
typedef struct{
int x,y;
}result;
result cal(char a[]){ //没有考虑一个是小数,一个是整数这种情况
int i,j;
result tmp;
for(i=0;a[i] != '.';i++);
......................
阅读全部
|
Administraor
贴于 2018年9月5日 15:59
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
int main()
{
int digit_seen[10] = {0}, a[10] = {0};
int digit, b = 0;
long int n;
printf("请输入数字:");
......................
阅读全部
|
de1et3
贴于 2018年9月5日 10:30
hide
bbsi
public class Bccn{
public static void main(String[] args){
int R = 10;
double PI = 3.14;
double Area = (int)(PI*R*R);
double Perimeter = (int)(2*PI*R);
System.out.println(Area);
System.out.println(Perimeter);
}
}
阅读全部
|
muncky
贴于 2018年8月26日 15:15
hide
bbsi
function [p3 min1 max1 min2 max2]=maxProfit(prices,n)
temp1 = 0;
temp2 = 0;
temp3 = 0;
l = 0;
p1 = 1;
p2 = 1;
p3 = 1;
maxa1 = 0;
maxa2 = 0 ;
mina1 = 0;
mina2 =0;
......................
阅读全部
|
ckl124578
贴于 2018年8月21日 11:02
hide
bbsi