C#-高血压生活习惯数据模拟
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; namespace testtest
{
class PersonHabit
{
private int userid; public int Userid
{
get { return userid; }
set { userid = value; }
} private int age; public int Age
{
get { return age; }
set { age = value; }
}
private int sex; public int Sex //0为男,1为女,2为不男不女
{
get { return sex; }
set { sex = value; }
} private DateTime LHSetTime; public DateTime LHSetTime1
{
get { return LHSetTime; }
set { LHSetTime = value; }
}
private int dietHabit; public int DietHabit
{
get { return dietHabit; }
set { dietHabit = value; }
}
private int drinkHabit; public int DrinkHabit
{
get { return drinkHabit; }
set { drinkHabit = value; }
}
private int sportHabit; public int SportHabit
{
get { return sportHabit; }
set { sportHabit = value; }
}
private int smokeHabit; public int SmokeHabit
{
get { return smokeHabit; }
set { smokeHabit = value; }
}
private int sleepHabit; public int SleepHabit
{
get { return sleepHabit; }
set { sleepHabit = value; }
} public PersonHabit()
{
Random rd = new Random();
//LHSetTime = new DateTime(System.DateTime.Now.Millisecond);
Random random = new Random((int)(DateTime.Now.Ticks));
int hour = random.Next(2, 5);
int minute = random.Next(0, 60);
int second = random.Next(0, 60);
string tempStr = string.Format("{0} {1}:{2}:{3}", DateTime.Now.ToString("yyyy-MM-dd"), hour, minute, second);
LHSetTime = Convert.ToDateTime(tempStr);
//Console.WriteLine(rTime.ToString()); dietHabit = rd.Next(0, 4);
drinkHabit = rd.Next(0, 4);
sportHabit = rd.Next(0, 4);
smokeHabit = rd.Next(0, 4);
sleepHabit = rd.Next(0, 4);
} public PersonHabit(int nAge, int nSex)
{ age = nAge;
sex = nSex; //LHSetTime = new DateTime(System.DateTime.Now.Millisecond);
Random random = new Random((int)(DateTime.Now.Ticks));
int hour = random.Next(2, 5);
int minute = random.Next(0, 60);
int second = random.Next(0, 60);
string tempStr = string.Format("{0} {1}:{2}:{3}", DateTime.Now.ToString("yyyy-MM-dd"), hour, minute, second);
LHSetTime = Convert.ToDateTime(tempStr);
//Console.WriteLine(rTime.ToString());
//造时间数据
// int flag = 4; if (1 <= nAge && nAge <= 18)
{ // flag = 2; int[] data={0,0,0,0,0};
data = makeDataOneEighteen();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (19 <= nAge && nAge <= 35 && nSex == 0)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataNinteenThirtyFiveMale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (19 <= nAge && nAge <= 35 && nSex == 1)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataNinteenThirtyFiveFemale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (36 <= nAge && nAge <= 50 && nSex == 0)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataThirtySixFiftyMale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (36 <= nAge && nAge <= 50 && nSex == 1)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataThirtySixFiftyFemale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (51 <= nAge && nAge <= 75 && nSex == 0)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataFiftyOneSeventyFiveMale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
if (51 <= nAge && nAge <= 75 && nSex == 1)
{ // flag = 2; int[] data = { 0, 0, 0, 0, 0 };
data = makeDataFiftyOneSeventyFiveFemale();
dietHabit = data[0];
drinkHabit = data[1];
sportHabit = data[2];
smokeHabit = data[3];
sleepHabit = data[4];
}
} public static int[] makeDataOneEighteen() //1-18年龄段划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照14:4:1:1的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 13)
index1 = 0;
else if (flag1 >= 14 && flag1 <= 17)
index1 = 1;
else if (flag1 == 18)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照8:8:2:2的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 7)
index2 = 0;
else if (flag2 >= 8 && flag2 <= 15)
index2 = 1;
else if (flag2 == 16 || flag2 == 17)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照5:8:5:2的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 4)
index3 = 0;
else if (flag3 >= 5 && flag3 <= 12)
index3 = 1;
else if (flag3 >= 13 && flag3 <= 17)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照8:5:3:4的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 7)
index4 = 0;
else if (flag4 >= 8 && flag4 <= 12)
index4 = 1;
else if (flag4 == 13 || flag4 == 15)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将1-18岁年龄段按照8:6:4:2的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 7)
index5 = 0;
else if (flag5 >= 8 && flag5 <= 13)
index5 = 1;
else if (flag5 >= 14 && flag5 <= 17)
index5 = 2;
else
index5 = 3; int[] data = {0,0,0,0,0};
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataNinteenThirtyFiveMale() //19-35年龄段男性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照2:6:8:4的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 1)
index1 = 0;
else if (flag1 >= 2 && flag1 <= 7)
index1 = 1;
else if (flag1 >= 8 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照10:6:2:2的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 9)
index2 = 0;
else if (flag2 >= 10 && flag2 <= 15)
index2 = 1;
else if (flag2 >= 16 && flag2 <= 17)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照4:6:6:6的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 3)
index3 = 0;
else if (flag3 >= 4 && flag3 <= 9)
index3 = 1;
else if (flag3 >= 10 && flag3 <= 15)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照4:2:4:10的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 3)
index4 = 0;
else if (flag4 >= 4 && flag4 <= 5)
index4 = 1;
else if (flag4 >= 6 && flag4 <= 9)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照6:4:4:6的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 5)
index5 = 0;
else if (flag5 >= 6 && flag5 <= 9)
index5 = 1;
else if (flag5 >= 10 && flag5 <= 13)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataNinteenThirtyFiveFemale() //19-35年龄段女性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照3:8:7:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 2)
index1 = 0;
else if (flag1 >= 3 && flag1 <= 10)
index1 = 1;
else if (flag1 >= 11 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照12:6:1:1的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 11)
index2 = 0;
else if (flag2 >= 12 && flag2 <= 17)
index2 = 1;
else if (flag2 >= 18 && flag2 <= 18)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照4:5:7:4的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 3)
index3 = 0;
else if (flag3 >= 4 && flag3 <= 8)
index3 = 1;
else if (flag3 >= 9 && flag3 <= 15)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照8:6:4:2的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 7)
index4 = 0;
else if (flag4 >= 8 && flag4 <= 13)
index4 = 1;
else if (flag4 >= 14 && flag4 <= 17)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将19-35岁年龄段按照10:6:2:2的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 9)
index5 = 0;
else if (flag5 >= 10 && flag5 <= 15)
index5 = 1;
else if (flag5 >= 16 && flag5 <= 17)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataThirtySixFiftyMale() //36-50年龄段男性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照4:8:6:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 3)
index1 = 0;
else if (flag1 >= 4 && flag1 <= 11)
index1 = 1;
else if (flag1 >= 12 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照6:6:4:4的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 0)
index2 = 0;
else if (flag2 >= 1 && flag2 <= 3)
index2 = 1;
else if (flag2 >= 4 && flag2 <= 11)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照2:6:4:8的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 1)
index3 = 0;
else if (flag3 >= 2 && flag3 <= 7)
index3 = 1;
else if (flag3 >= 8 && flag3 <= 11)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照2:2:10:6的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 2)
index4 = 0;
else if (flag4 >= 3 && flag4 <= 4)
index4 = 1;
else if (flag4 >= 5 && flag4 <= 14)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照3:5:4:8的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 2)
index5 = 0;
else if (flag5 >= 3 && flag5 <= 7)
index5 = 1;
else if (flag5 >= 8 && flag5 <= 11)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataThirtySixFiftyFemale() //36-50年龄段女性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照6:8:4:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 5)
index1 = 0;
else if (flag1 >= 6 && flag1 <= 13)
index1 = 1;
else if (flag1 >= 14 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照7:6:6:1的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 6)
index2 = 0;
else if (flag2 >= 7 && flag2 <= 12)
index2 = 1;
else if (flag2 >= 13 && flag2 <= 18)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照3:3:4:10的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 2)
index3 = 0;
else if (flag3 >= 3 && flag3 <= 5)
index3 = 1;
else if (flag3 >= 6 && flag3 <= 9)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照7:6:5:2的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 6)
index4 = 0;
else if (flag4 >= 7 && flag4 <= 12)
index4 = 1;
else if (flag4 >= 13 && flag4 <= 17)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将36-50岁年龄段按照12:4:3:1的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 11)
index5 = 0;
else if (flag5 >= 12 && flag5 <= 15)
index5 = 1;
else if (flag5 >= 16 && flag5 <= 18)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataFiftyOneSeventyFiveMale() //51-75年龄段男性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照2:6:6:6的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 1)
index1 = 0;
else if (flag1 >= 2 && flag1 <= 7)
index1 = 1;
else if (flag1 >= 8 && flag1 <= 13)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:3:8:8的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 0)
index2 = 0;
else if (flag2 >= 1 && flag2 <= 3)
index2 = 1;
else if (flag2 >= 4 && flag2 <= 11)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:3:4:12的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 0)
index3 = 0;
else if (flag3 >= 1 && flag3 <= 3)
index3 = 1;
else if (flag3 >= 4 && flag3 <= 7)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:4:8:7的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 0)
index4 = 0;
else if (flag4 >= 1 && flag4 <= 4)
index4 = 1;
else if (flag4 >= 5 && flag4 <= 12)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照2:2:6:10的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 1)
index5 = 0;
else if (flag5 >= 2 && flag5 <= 3)
index5 = 1;
else if (flag5 >= 4 && flag5 <= 9)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public static int[] makeDataFiftyOneSeventyFiveFemale() //51-75年龄段女性划分
{
Random rd = new Random();
int index1 = 0, index2 = 0, index3 = 0, index4 = 0, index5 = 0;
int flag1 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照6:4:8:2的比例划分diet习惯;
if (flag1 >= 0 && flag1 <= 5)
index1 = 0;
else if (flag1 >= 6 && flag1 <= 9)
index1 = 1;
else if (flag1 >= 10 && flag1 <= 17)
index1 = 2;
else
index1 = 3; int flag2 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照4:4:10:2的比例划分drink习惯;
if (flag2 >= 0 && flag2 <= 3)
index2 = 0;
else if (flag2 >= 4 && flag2 <= 7)
index2 = 1;
else if (flag2 >= 8 && flag2 <= 17)
index2 = 2;
else
index2 = 3; int flag3 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照1:3:8:8的比例划分sport习惯;
if (flag3 >= 0 && flag3 <= 0)
index3 = 0;
else if (flag3 >= 1 && flag3 <= 3)
index3 = 1;
else if (flag3 >= 4 && flag3 <= 11)
index3 = 2;
else
index3 = 3; int flag4 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照2:8:6:4的比例划分smoke习惯;
if (flag4 >= 0 && flag4 <= 1)
index4 = 0;
else if (flag4 >= 2 && flag4 <= 9)
index4 = 1;
else if (flag4 >= 10 && flag4 <= 15)
index4 = 2;
else
index4 = 3; int flag5 = rd.Next(0, 20); //算法依据,将51-75岁年龄段按照14:4:1:1的比例划分sleep习惯;
if (flag5 >= 0 && flag5 <= 13)
index5 = 0;
else if (flag5 >= 14 && flag5 <= 17)
index5 = 1;
else if (flag5 >= 18 && flag5 <= 18)
index5 = 2;
else
index5 = 3; int[] data = { 0, 0, 0, 0, 0 };
data[0] = index1;
data[1] = index2;
data[2] = index3;
data[3] = index4;
data[4] = index5; return data;
} public void print()
{
Console.WriteLine("当前时间段:" + LHSetTime);
Console.WriteLine("饮食习惯 :" + change(dietHabit));
Console.WriteLine("饮酒习惯 :" + change(drinkHabit));
Console.WriteLine("运动习惯 :" + change(sportHabit));
Console.WriteLine("抽烟习惯 :" + change(smokeHabit));
Console.WriteLine("睡眠习惯 :" + change(sleepHabit));
}
public String change(int value)
{
String flag = "异类";
switch (value)
{
case 0:
flag = "优";break;
case 1:
flag = "良";break;
case 2:
flag = "中";break;
case 3:
flag = "差";break;
}
return flag;
}
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data.Sql; namespace testtest
{
class Program
{ public static void sqlExcute(String sql)
{
string connectionString = "Server = 10.255.97.137;" + "Database = Diseasemonitor;" + "User ID = sa;" +
"Password = 123456;";
SqlConnection conn = new SqlConnection(connectionString);
try
{
conn.Open();
SqlCommand comm = new SqlCommand(sql, conn);
comm.ExecuteReader();
}
catch (Exception e)
{ //出现异常显示
Console.WriteLine("模拟数据插入发生错误...");
}
finally
{ //关闭数据库连接,避免占用
conn.Close();
} } public static int querySqlExcute(String sql)
{
int flag;
string connectionString = "Server = 10.255.97.137;" + "Database = Diseasemonitor;" + "User ID = sa;" +
"Password = 123456;";
SqlConnection conn = new SqlConnection(connectionString);
try
{
conn.Open();
SqlCommand comm = new SqlCommand(sql, conn);
SqlDataReader dataReader = comm.ExecuteReader(); // 判断数据是否读到尾.
// while (dataReader.Read())
flag = int.Parse(dataReader[0].ToString());
return flag;
}
catch (Exception e)
{ //出现异常显示
Console.WriteLine("数据查询发生错误...");
}
finally
{ //关闭数据库连接,避免占用
conn.Close();
}
return 999999;
} public static String change(int value)
{
String flag = "异类";
switch (value)
{
case 0:
flag = "优"; break;
case 1:
flag = "良"; break;
case 2:
flag = "中"; break;
case 3:
flag = "差"; break;
}
return flag;
} //高血压病态模拟生成数据 public static String changeSex(int value)
{
String flag = "男";
//flag = (value==0):"男"?"女";
if (value == 0)
flag = "男";
else
flag = "女";
return flag; } // public static void static void Main(string[] args)
{
Console.WriteLine("请输入你需要生成多少人的数据以及年龄最大值(75以内):");
int flag,end,maxAge;
flag = int.Parse(Console.ReadLine());
maxAge = int.Parse(Console.ReadLine()); Random rd = new Random();
Random rdd = new Random();
//数据生成
for (int i = 0; i < flag; i++)
{ int age = rd.Next(1, maxAge+1);
int sex = rdd.Next(0, 2);
PersonHabit ph = new PersonHabit(age,sex);//这里随机构造出年龄和性别 Console.WriteLine("年龄:"+age+" 性别:"+((sex==0)?"男":"女"));
//ph.Userid = i + 1;
string sql =
"insert into LiftHabit(LHSetTime, age, sex, dietHabit, drinkHabit,sportHabit,smokeHabit,sleepHabit) values ('"
+ ph.LHSetTime1 + "', '" + ph.Age + "', '" + changeSex(ph.Sex) + "', '" + change(ph.DietHabit) + "', '" + change(ph.DrinkHabit) + "', '" +
change(ph.SportHabit) + "', '" + change(ph.SmokeHabit) + "', '" + change(ph.SleepHabit) + "')";
sqlExcute(sql);
Console.WriteLine("正在生成数据中... 当前为第"+(i+1)+"个人");
//System.Threading.Thread.Sleep(2000);
if (i == flag)
break;
//ph.print();
}
Console.WriteLine("数据生成完毕...\n***************按0键直接退出,按3键删除生成数据退出...***************");
end = int.Parse(Console.ReadLine());
if (end == 3)
{
//拼装sql
String sql = "delete from LiftHabit";
sqlExcute(sql);
Console.WriteLine("数据删除完毕...");
} for (int i = 1; i <= 75; i++)
Console.WriteLine(i); return;
}
}
}
C#的大作业,一个大项目,分成很多小块,自己做的小块内容,代码分享给大家
代码写的有点乱,相关的文件(源码以及数据库脚本)我已经上传了,大家可以下载测试下,本程序仅供做测试用途
C#-高血压生活习惯数据模拟的更多相关文章
- 推荐一款健康App 多喝水,引领全民时尚喝水生活习惯
推荐一款健康App 多喝水,引领全民时尚喝水生活习惯 1 介绍 多喝水,一款鼓励大众喝水的APP.我们倡导大众健康生活,培养人们爱喝水的习惯,让每一次喝水,都能产生价值,让人们在喝水的同时,可享受赚钱 ...
- MacOS下的生活——RescueTime,时间规划利器
前段时间Yxj同学给我推荐了一款可以记录电脑及手机使用时间分类的软件,据说Mac平台下也支持,当时就有了兴趣,但是好像因为什么事给耽搁了,知道今天下午看到Yxj在看这个软件记录的自己的时间表,才觉得这 ...
- Be Better:遇见更好的自己-2016年记
其实并不能找到好的词语来形容过去的一年,感觉就如此平淡的过了!没有了毕业的稚气,看事情淡了,少了一丝浮躁,多了一分认真.2016也许就是那句话-多读书,多看报,少吃零食多睡觉,而我更愿意说--Be B ...
- [网站性能1]对.net系统架构改造的一点经验和教训
文章来源:http://www.admin10000.com/document/2111.html 在互联网行业,基于Unix/Linux的网站系统架构毫无疑问是当今主流的架构解决方案,这不仅仅是因为 ...
- 谈初学Java历程
学习Java一个月左右,本来很早就想好好静下心来写一点东西了.但由于不想手写,文档写了不知道放在哪好,所以一直拖着.最近注册了博客园,还是挺方便的. 即将大学毕业了,则面临了所以大学生所面临的问题,就 ...
- u3d_Shader_effects笔记6 第四章 使用cubeMap简单的反射读取
一:前面心情: 1.今天开了个小会,该看的继续要看,不要堕落. 2.还有就是丽的生活习惯不太好.慢慢改变. 3.哎,公司人员争夺吗?哎,不知道,不了解,不去想,提升自己,内心明净 二.主要内容和参考 ...
- one_person年轻的程序员
回顾大学三年,通过良师的教导和自身的刻苦学习,我已初步掌握如何运用计算机编程,也养成了认真对待学习和工作的好习惯! 在思想品德上,本人有良好道德修养,并有坚定的政治方向.我热爱祖国,热爱人民,遵纪守法 ...
- 论文 查重 知网 万方 paperpass
相信各个即将毕业的学生或在岗需要评职称.发论文的职场人士,论文检测都是必不可少的一道程序.面对市场上五花八门的检测软件,到底该如何选择?选择查重后到底该如何修改?现在就做一个知识的普及.其中对于中国的 ...
- 医院管理者必须知道的医院客户关系管理(CRM)
客户关系管理(customer relationship management,CRM)是在二战之后首先由美国IBM.道氏.通用等大型企业提出并运用的一种以有效销售为目的的市场营销思想,其理论基础就是 ...
随机推荐
- uboot总结:uboot配置和启动过程2(mkconfig分析)
说明:文件位置:在uboot的目录下,文件名为:mkconfig.本身是一个脚本文件. 它的主要作用的是: (1)创建一个重要的符号链接 (2)创建一个config.mk文件(在include目录下) ...
- how to optimize javascript performance
https://developers.google.com/speed/articles/optimizing-javascript http://developer.yahoo.com/perfor ...
- Javascript 层次
1. HTML5, Tool, Framework ---------------------------UI: Liger UI, jQuery UI, jQuery Mobile -------- ...
- AT24C512与AT24C512B的区别
前几日公司采购人员说现在AT24C512要停产了,替代型号为AT24C512B,因为公司产品中使用该器件较多,因此专门又研究了一下这两个芯片,发现还是有很多地方不同的. (1)AT24C512输入电压 ...
- 延长FLASH和EEPROM芯片写入次数的小方法
开发电子产品时,常常需要断电后保存某些数据,这就需要使用 FLASH或EEPROM芯片,这两种芯片,可擦除的次数是有限制的,通常FLASH为10万次,EEPROM要多一点,为100万甚至1000万次. ...
- Hibernate中的事务隔离
在我们的项目中,老发现程序报告sesssion is closed或者因数据已经被其他事务修改而导致当前事务无法提交,由于系统的运行用户最多也就几十个人,所以考虑使用严格的事务隔离来防止这种类型的问题 ...
- 【HDOJ】1601 Galactic Import
Dijkstra. /* 1601 */ #include <cstdio> #include <cstring> #include <cstdlib> #defi ...
- java学习面向对象之封装
在以往几节当中我们讲到了什么是类,类就是对一类事物的描述,比如现在我们有一个人类 class Person { /** *这里我们分别在name和age上加上了元素的访问权限 *这里的private是 ...
- NodeJS制作爬虫全过程
这篇文章主要介绍了NodeJS制作爬虫的全过程,包括项目建立,目标网站分析.使用superagent获取源数据.使用cheerio解析.使用eventproxy来并发抓取每个主题的内容等方面,有需要的 ...
- WPF之插件开发
一:解决方案管理器截图 效果图: 二:简单功能说明 IMsg定义了一个接口,MYPlugin1实现接口功能,”插件式开发“实现程序运行时再调用非本身引用的dll文件,调用该dll的方法实现功能 三:I ...