admin管理员组

文章数量:1623598

                             ##  英语文本的单词统计 排序并输出前5%
/*
      统计英语文本英语个数及150%*****************************************************
*/

/*
/*#include<iostream>
#include<string>
#include<fstream>
using namespace std;

struct L//创建结构体L
{
	string s;//存储字符串(单词)
	int data;//单词在文本中出现的次数
	int flag;//状态标志
};

int main()
{
	char s1;//字符操作
	
	string s;//字符串操作
	
	L *p,l1;
	p=new L[1000];//创建字符串组
	int f,i=0,l,i1;
	ifstream in("C:\\Users\\admin\\Desktop\\data.txt");  //文本输出
    ofstream out("C:\\Users\\admin\\Desktop\\data1.txt");//文本输入
	if(!in) {cout<<"不能打开文件";}
	in>>noskipws;//输出空白符 保持data文本中的状态
	
	while(in>>s1)//单个字符输出
	{
        if(s1<='z'&&s1>='a'||s1==' ') out<<s1;     //除字母和空白符都不输入data1,且将大写字母转化为小写
		else if(s1<='Z'&&s1>='A') s1=s1+32,out<<s1;//(将字母和空白输入data1),排除data中标点符号和其他字符的干扰
		
	}
	
	in.close();                          //关闭文本data
	out.close();                         //关闭文本data1
    
	ifstream ini("C:\\Users\\admin\\Desktop\\data1.txt");//文本输出对data1进行操作
	while(ini>>s)                                        //单个字符串输出(单个单词输出)
	{   
		p[i].s=s;p[i].flag=1;p[i].data=1;//p[i]初始化,通过文件输出流获取单词赋给p[i].s, 没有访问过的标志符设为1,data为1;
		//a[i]=l;
		i++;
	}
	
    for(int j=0;j<i-1;j++)//查询各单词个数
	{
		for( l=j+1;l<i;l++)//每次取一个单词与后面单词进行比较,若相同则打data加1,且将相同单词flag置0,(算法原理与选择排序相似)
		{
			if(p[l].flag==0) l++;
			//i1=p[j].spare(p[l].s);
			if(p[j].s==p[l].s) p[j].data+=1,p[l].flag=0;
		}
		if(p[j].flag==0) j++;
	}

	for(j=0,l=0;j<i-1;j++)//选择排序进行排序
	{
		for(l=j+1;l<i;l++)
		{
			if(p[l].flag==0) l++;
			if(p[j].data<p[l].data) l1=p[j],p[j]=p[l],p[l]=l1;
		}
        if(p[j].flag==0) j++;
	}
    ofstream out1("C:\\Users\\admin\\Desktop\\data9.txt");
	out1<<"输出英语文本中前5%英语单词及个数为:"<<endl;

	for(j=0,l=0,f=0;j<i&&f<i*0.05;j++)//将排好序的单词及个数输入文本文档
	{
		
		if(p[j].flag==1&&p[j].data>=2)
		l+=p[j].data, out1<<p[j].s<<'\t'<<p[j].data<<'\t'<<endl,f++;
	}

	out1<<"U= "<<l<<endl;

	in.close();
	delete []p;
    return 0;
}*/

导入文本data

Motivation is a skill that we all possess but few of us ever really use. There are times in our lives when we are able to motivate ourselves to overcome almost any difficulty. However, there are also times when it seems like we can’t even motivate ourselves to overcome even the smallest difficulty. What is the secret for mastering your own motivation?First, find out what makes you want to achieve anything in life. When you have a firm understanding of what drives you to accomplish your goals, you will know how to motivate yourself. Whether the drive comes from finding comfort or from feeling like you have control over your life, it is wise to have a firm understanding of yourself and your values.We each have our own ideas about what is important in our lives. Some people think that money is the answer to everything, so they live their lives and make their decisions based on money. Other people may want to become an important part of their society, so this drives them to achieve whatever they want in their lives.In my dual profession as an educator and health care provider, I have worked with numerous children infected with the virus that causes AIDS. The relationships that I have had with these special kids have been gifts in my life. They have taught me so many things, but I have especially learned that great courage can be found in the smallest of packages. Let me tell you about Tyler.

Tyler was born infected with HIV: his mother was also infected. From the very beginning of his life, he was dependent on medications to enable him to survive. When he was five, he had a tube surgically inserted in a vein in his chest. This tube was connected to a pump, which he carried in a small backpack on his back. Medications were hooked up to this pump and were continuously supplied through this tube to his bloodstream. At times, he also needed supplemented oxygen to support his breathing.

Tyler wasn’t willing to give up one single moment of his childhood to this deadly disease. It was not unusual to find him playing and racing around his backyard, wearing his medicine-laden backpack and dragging his tank of oxygen behind him in his little wagon. All of us who knew Tyler marveled at his pure joy in being alive and the energy it gave him. Tyler’s mom often teased him by telling him that he moved so fast she needed to dress him in red. That way, when she peered through the window to check on him playing in the yard, she could quickly spot him.

This dreaded disease eventually wore down even the likes of a little dynamo like Tyler. He grew quite ill and, unfortunately, so did his HIV-infected mother. When it became apparent that he wasn’t going to survive, Tyler’s mom talked to him about death. She comforted him by telling Tyler that she was dying too, and that she would be with him soon in heaven.

A few days before his death, Tyler beckoned me over to his hospital bed and whispered, “I might die soon. I’m not scared. When I die, please dress me in red. Mom promised she’s coming to heaven, too. I’ll be playing when she gets there, and I want to make sure she can find me.”

导出文本data1

motivation is a skill that we all possess but few of us ever really use there are times in our lives when we are able to motivate ourselves to overcome almost any difficulty however there are also times when it seems like we cant even motivate ourselves to overcome even the smallest difficulty what is the secret for mastering your own motivationfirst find out what makes you want to achieve anything in life when you have a firm understanding of what drives you to accomplish your goals you will know how to motivate yourself whether the drive comes from finding comfort or from feeling like you have control over your life it is wise to have a firm understanding of yourself and your valueswe each have our own ideas about what is important in our lives some people think that money is the answer to everything so they live their lives and make their decisions based on money other people may want to become an important part of their society so this drives them to achieve whatever they want in their livesin my dual profession as an educator and health care provider i have worked with numerous children infected with the virus that causes aids the relationships that i have had with these special kids have been gifts in my life they have taught me so many things but i have especially learned that great courage can be found in the smallest of packages let me tell you about tylertyler was born infected with hiv his mother was also infected from the very beginning of his life he was dependent on medications to enable him to survive when he was five he had a tube surgically inserted in a vein in his chest this tube was connected to a pump which he carried in a small backpack on his back medications were hooked up to this pump and were continuously supplied through this tube to his bloodstream at times he also needed supplemented oxygen to support his breathingtyler wasnt willing to give up one single moment of his childhood to this deadly disease it was not unusual to find him playing and racing around his backyard wearing his medicineladen backpack and dragging his tank of oxygen behind him in his little wagon all of us who knew tyler marveled at his pure joy in being alive and the energy it gave him tylers mom often teased him by telling him that he moved so fast she needed to dress him in red that way when she peered through the window to check on him playing in the yard she could quickly spot himthis dreaded disease eventually wore down even the likes of a little dynamo like tyler he grew quite ill and unfortunately so did his hivinfected mother when it became apparent that he wasnt going to survive tylers mom talked to him about death she comforted him by telling tyler that she was dying too and that she would be with him soon in heavena few days before his death tyler beckoned me over to his hospital bed and whispered i might die soon im not scared when i die please dress me in red mom promised shes coming to heaven too ill be playing when she gets there and i want to make sure she can find me

导出文本data9

输出英语文本中前5%英语单词及个数为:
to 26
in 15
his 15
him 11
the 10
that 10
of 10
have 9
and 9
a 8
when 8
she 8
was 7
you 6
he 6
i 6
so 5
it 5
is 5
with 5
me 5
your 4
their 4
on 4
this 4
tyler 4
want 4
motivate 3
U= 216
关闭了的SQL Server服务如何打开

                                                                                                                                                            2015-02-18 21:21:00
                weixin_34248118
                阅读数 54
                                                    
            
                                
        
    


    
            
             
                                
         
         
        
                                    
            
                                        在cmd里输入如下:

net start mssqlserver

本文标签: 英语单词文本