自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(42)
  • 收藏
  • 关注

转载 微型技术博客-安卓应用权限设置

1. 如何自定义权限Android允许我们使用permission标签,在Manifest文件中定义属于自己的权限:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example....

2018-06-22 13:53:22 404

转载 微型技术博客-对文件的管理

对读写权限的处理[java] view plain copypublic class AppUtil {      // Storage Permissions      private static final int REQUEST_EXTERNAL_STORAGE = 1;      private static String[] PERMISSIONS_STORAGE = {       ...

2018-06-22 13:43:29 301

转载 微型技术博客—安卓应用在线更新

处理流程:首先需要在服务器端配置版本文件<update> <version>2</version> <name>baidu_xinwen_1.1.0</name> <url>http://gdown.baidu.com/data/wisegame/f98d235e39e29031/baiduxinwen...

2018-06-22 13:20:39 335

转载 微型技术博客-HttpUrlconnection基础。

HttpUrlconnection简介:            HttpURLconnection是基于http协议的,支持get,post,put,delete等各种请求方式;1.get请求:从指定资源请求数据;public void httpUrlConnetionGet() { try { //创建URL对象 URL url =...

2018-06-22 13:04:05 181

转载 微型技术博客-SWing界面跳转。

假如有两个frame,分别为frame1,frame2,frame1加个按钮实现跳转.frame1代码如下import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JFrame;public class fram

2017-06-10 15:31:36 791

转载 微型技术博客—javaswing的简单用法

一.图形界面       图形界面(Graphic User Interface)简称GUI,是用图形的方式,借助菜单、按钮等标准界面元素和鼠标操作,帮助用户方便地向计算 机系统发出指令、启动操作,并将系统的运行结果同样以图形方式显示给用户的技术。图形用户界面与字符界面相比,操作简单,画面生动 ,深受广大用户的欢迎,已经成为目前几乎所有应用软

2017-06-10 15:19:54 494

转载 微型技术博客-Qt实现简单界面.

要利用Qt实现界面首先必备的工具:Qt Creator,我下载的是基于MingW的版本。下载完安装之后,打开Qt Creator,点击New Project,选择Qt Widgets Application,新建好了之后,会生成主要的3个文件夹,头文件,源文件已经Ui文件。Ui:打开Ui文件,我们就可以再里面画我们的控件,画好之后,Qt会同步帮我们生成一个叫ui的的类,我们可以

2017-06-10 15:17:12 407

转载 微型技术博客-探究connect()函数。

1.作用connect()用于建立与指定socket的连接。头文件: #include 函数原型: int connect(int s, const struct sockaddr * name, int namelen);参数:s:标识一个未连接socketname:指向要连接套接字的sockaddr结构体的指针namelen:sock

2017-06-10 14:59:32 314

原创 96-100.个人练习

#include using namespace std;template void insertSort(T A[], int n){ int i, j; T temp; // 将下标为1~n-1的元素逐个插入到已排序序列中适当的位置 for (i = 1; i < n; i++) { //从A[i-1]开始向A[0]方向扫描各元素,寻找适当位置插入A[i]

2017-06-10 14:53:52 216

转载 91-95.c个人练习。

#include#include#define MaxSize 100typedef char ElemType;typedef struct { ElemType elem[MaxSize]; int top;/*栈指针*/}SqStack;void InitStack(SqStack * &s)/*[初始化栈s*/{ s=(SqStack *)malloc(sizeof(

2017-06-10 14:50:53 355

原创 86-90.c++个人练习.

1.#include using namespace std;class Boat;class Car {private: int weight;public: Car(int j) { weight = j; } friend int getTotalWeight(Car &aCar, Boat &aBoat);};class Boat {private:

2017-06-10 14:46:56 213

原创 81-85.c++个人练习。

1.class Cat {public: Cat(int age) : itsAge(age) { numOfCats++; } virtual ~Cat() { numOfCats--; } virtual int getAge() { return itsAge; } virtual void setAge(int age) { itsAge = age

2017-06-10 14:41:11 275

原创 76-80.c++个人练习。

1#include #include #include "array.h"using namespace std;int main(){ int n; double average,total = 0; cout << "请输入学生人数:"; cin >> n; Array score(n); for (int i=0; i<n; i++) { cout <<

2017-06-10 14:36:04 247

原创 71-75.个人练习。

c++个人练习#include using namespace std;class Exception{public: Exception(){} virtual ~Exception(){} virtual void PrintError() = 0;};class OutOfMemory : public Exception{public: O

2017-06-10 14:32:56 176

转载 66-70.数据结构复习

#include"stdio.h" #include"malloc.h" #define MaxSize 50 typedef struct{ char data[MaxSize]; int length; }SqList; void InitList(SqList *&L) { L=(SqList *)malloc(sizeof(SqL

2017-06-10 14:25:43 203

转载 61-65.java线程基础。

创建线程class RunnableDemo implements Runnable { private Thread t; private String threadName; RunnableDemo( String name) { threadName = name; System.out.println("Creating " + t

2017-06-10 14:12:17 281

转载 58-60.分支结构java

public class Test { public static void main(String args[]){ int x = 10; if( x < 20 ){ System.out.print("这是 if 语句"); } } } public class Test {

2017-06-10 14:09:45 171

转载 53-57.一些经典程序

1.//9*9乘法口诀表 void Table99() { int i,j; for(i = 1; i <= 9; i++) //外层循环控制行 { for(j = 1; j <= i; j++) //内层循环控制列 { printf("%d*%d=%-4d",i,j,i*

2017-06-10 14:05:46 250

原创 46-52.个人练习。

import java.io.*;import java.net.*;public class SingleTalkClient{ public static void main(String[] args) throws IOException { Socket client = null; PrintWriter out = null;

2017-06-10 13:48:16 260

转载 44-45.java变量类型

package com.runoob.test; public class Test{ public void pupAge(){ int age = 0; age = age + 7; System.out.println("小狗的年龄是: " + age); } public static void main(String a

2017-06-10 11:14:32 341

转载 41-43.java基础。

类的定义public class Dog{ String breed; int age; String color; void barking(){ } void hungry(){ } void sleeping(){ }}构造方法public class Puppy{ public Puppy(){ } publ

2017-06-10 10:47:08 611

原创 36-40.个人练习

#include void greedy(int d[],int n,int k) { int num = 0; int i,s; for( i = 0;i <= k;i++) { if(d[i] > n) { printf("no solution\n"); return; } }

2017-06-10 10:40:44 173

原创 31-35.个人练习

#include #include int F(int n,int m){ if (n<=2) return 1; if(m==1||n==m) return 1; else return F(n-1,m-1)+m*F(n-1,m);}int main(){ int n; int m; int a; scanf("%d %d",&n,&

2017-06-10 10:38:25 192

转载 30.命名空间的相关

1.定义命名空间#include using namespace std; // 第一个命名空间namespace first_space{ void func(){ cout << "Inside first_space" << endl; }}// 第二个命名空间namespace second_space{ void func(){

2017-06-09 17:07:50 192

原创 28-29.个人练习。

#include#includeusing namespace std;struct Equipment{ char weapon[10]; char helmet[10]; char armor[10]; char pants[10]; char boots[10]; string extraItem;};int main(){

2017-06-09 16:58:50 156

原创 27.new与delete的用法

new用以开辟空间#includeusing namespace std;int main(){ int *a=new int(5); int *b=new int[2]; cout<<*a<<endl; b[0]=1; b[1]=2; b[2]=3; for(int i=0;i<=2;i++) { co

2017-06-09 16:17:44 196

转载 25-26.多态的相关。

#include using namespace std; class Shape { protected: int width, height; public: Shape( int a=0, int b=0) { width = a; height = b; } virtual

2017-06-09 14:58:54 215

转载 23-24.重载运算符,重载函数。

重载函数,让一个函数名可以有多种作用。#include using namespace std; class printData { public: void print(int i) { cout << "Printing int: " << i << endl; } void print(double f) {

2017-06-09 14:41:38 171

转载 21-22.关于类的继承与派生

#include using namespace std; // 基类class Shape { public: void setWidth(int w) { width = w; } void setHeight(int h) { height = h; } pr

2017-06-09 09:54:52 292

原创 16-20.类的基本与练习。

1.类的定义class Box{ public: double length; // 盒子的长度 double breadth; // 盒子的宽度 double height; // 盒子的高度};定义一个类相当于创造了一个新的物品,而我们可以在其基础上产生单独的个体,就是对象。2.定义对象与访问数据成员#include

2017-06-08 17:17:22 198

转载 15.数据结构的使用。

类似数组,但数组变量类型相同,数据结构则可以自由定义数据类型。#include #include using namespace std; // 声明一个结构体类型 Books struct Books{ char title[50]; char author[50]; char subject[100]; int book_id;};

2017-06-08 17:11:28 255

转载 14.c++输入cin,cerr,clog。

cin#include using namespace std; int main( ){ char name[50]; cout << "请输入您的名称: "; cin >> name; cout << "您的名称是: " << name << endl; }cerr#include using namespace std; in

2017-06-08 17:04:02 281

原创 13.引用的用法

#include using namespace std; int main (){ // 声明简单的变量 int i; double d; // 声明引用变量 int& r = i; double& s = d; i = 5; cout << "Value of i : " << i << endl; co

2017-06-08 16:58:09 368

转载 10-12关于指针的一些知识

1.指针的普通用法#include using namespace std; int main (){ int var = 20; // 实际变量的声明 int *ip; // 指针变量的声明 ip = &var; // 在指针变量中存储 var 的地址 cout << "Value of var variable:

2017-06-08 16:50:42 203

原创 9.字符串的一些简单操作

#include#include#include using namespace std;int main(){ char str1[10]="Cyclone"; char str2[10]="Joker"; char str3[15]="Kaman Knight"; int len; cout<<str1<<"!"<<endl;

2017-06-08 15:53:15 206

转载 8.数组练习

#include using namespace std; #include using std::setw; int main (){ int n[ 10 ]; // n 是一个包含 10 个整数的数组 for ( int i = 0; i < 10; i++ ) { n[ i ] = i + 100; // 设置元素 i

2017-06-08 15:23:05 259

转载 7.关于参数默认值。

#include using namespace std; int sum(int a, int b=20){ int result; result = a + b; return (result);} int main (){ // 局部变量声明 int a = 100; int b = 200; int result; /

2017-06-07 16:15:29 269

原创 5-6.枚举enum练习。

1.#include using namespace std;int main(){ enum types{A,B,C}type; type=C; switch(type) { case(A): { cout<<"you selected FREEDOM GUNDAM"<<endl;

2017-06-07 16:02:10 517

原创 4.extern存储类练习。

main.cpp#include using namespace std;int count;extern void display();int main(){ count=5; display();}support.cpp#includeusing namespace std;extern int count;void displ

2017-06-07 15:18:37 410

原创 c++个人练习

(1)前置声明的练习头文件#ifndef FRONT_H#define FRONT_H#include using namespace std;class B;             // 这是前置声明(Forward declaration)class A{private:         B* b;public:  

2017-03-13 17:28:44 206

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除