少走弯路的十条忠告




如何在涉世之初少走弯路,有一个好的开端,开始一番成功的事业?以下是一些先行者积累的10条有益的涉世忠告。好好地遵循、把握这些忠告和建议吧,比起所学的课堂课程来,它毫不逊色!

1. 买个闹钟,以便按时叫醒你。

贪睡和不守时,都将成为你工作和事业上的绊脚石,任何时候都一样。不仅要学会准时,更要学会提前。就如你坐车去某地,沿途的风景很美,你忍不住下车看一看,后来虽然你还是赶到了某地,却不是准时到达。“闹钟”只是一种简单的标志和提示,真正灵活、实用的时间,掌握在每个人的心中。


2. 如果你不喜欢现在的工作,要么辞职不干,要么就闭嘴不言。

初出茅庐,往往眼高手低,心高气傲,大事做不了,小事不愿做。不要养成挑三拣四的习惯。不要雨天烦打伞,不带伞又怕淋雨,处处表现出不满的情绪。记住,不做则已,要做就要做好。

3. 每个人都有孤独的时候。

要学会忍受孤独,这样才会成熟起来。年轻人嘻嘻哈哈、打打闹闹惯了,到了一个陌生的环境,面对形形色色的人和事,一下子不知所措起来,有时连一个可以倾心说话的地方也没有。这时,千万别浮躁,学会静心,学会忍受孤独。在孤独中思考,在思考中成熟,在成熟中升华。不要因为寂寞而乱了方寸,而去做无聊无益的事情,白白浪费了宝贵的时间。


4. 走运时要做好倒霉的准备。

有一天,一只狐狸走到一个葡萄园外,看见里面水灵灵的葡萄垂涎欲滴。可是外面有栅栏挡着,无法进去。于是它一狠心绝食三日,减肥之后,终于钻进葡萄园内饱餐一顿。当它心满意足地想离开葡萄园时,发觉自己吃得太饱,怎么也钻不出栅栏了。相信任何人都不愿做这样的狐狸。退路同样重要。饱带干粮,晴带雨伞,点滴积累,水到渠成。有的东西今天似乎一文不值,但有朝一日也许就会身价百倍。

5. 不要像玻璃那样脆弱。

有的人眼睛总盯着自己,所以长不高看不远;总是喜欢怨天尤人,也使别人无比厌烦。没有苦中苦,哪来甜中甜?不要像玻璃那样脆弱,而应像水晶一样透明,太阳一样辉煌,腊梅一样坚强。既然睁开眼睛享受风的清凉,就不要埋怨风中细小的沙粒。


6. 管住自己的嘴巴。

不要谈论自己,更不要议论别人。谈论自己往往会自大虚伪,在名不副实中失去自己。议论别人往往陷入鸡毛蒜皮的是非口舌中纠缠不清。每天下班后和你的那些同事朋友喝酒聊天可不是件好事,因为,这中间往往会把议论同事、朋友当做话题。背后议论人总是不好的,尤其是议论别人的短处,这些会降低你的人格。
7. 机会从不会“失掉”,你失掉了,自有别人会得到。

不要凡事在天,守株待兔,更不要寄希望于“机会”。机会只不过是相对于充分准备而又善于创造机会的人而言的。也许,你正为失去一个机会而懊悔、埋怨的时候,机会正被你对面那个同样的“倒霉鬼”给抓住了。没有机会,就要创造机会,有了机会,就要巧妙地抓住。


8. 若电话老是不响,你该打出去。

很多时候,电话会给你带来意想不到的收获,它不是花瓶,仅仅成为一种摆设。交了新朋友,别忘了老朋友,朋友多了路好走。交际的一大诀窍就是主动。好的人缘好的口碑,往往助你的事业更上一个台阶。
9. 千万不要因为自己已经到了结婚年龄而草率结婚。

想结婚,就要找一个能和你心心相印、相辅相携的伴侣。不要因为放纵和游戏而恋爱,不要因为恋爱而影响工作和事业,更不要因一桩草率而失败的婚姻而使人生受阻。感情用事往往会因小失大。


10. 写出你一生要做的事情,把单子放在皮夹里,经常拿出来看。

人生要有目标,要有计划,要有提醒,要有紧迫感。一个又一个小目标串起来,就成了你一生的大目标。生活富足了,环境改善了,不要忘了皮夹里那张看似薄薄的单子。

posted @ 2010-09-19 20:08 傅先生 阅读(155) | 评论 (0)编辑 收藏

     摘要: CString 成员函数用法大全  Posted on 2009-02-16 00:17 蔡清华 阅读(6995) 评论(2) 编辑 收藏       CString的构造函数 CString( ); 例:CString csS...  阅读全文

posted @ 2010-09-14 22:27 傅先生 阅读(741) | 评论 (0)编辑 收藏


UpdateData
(FALSE)与UpdateData(TRUE)是相反的过程     
UpdateData
(FALSE)是把程序中改变的值更新到控件中去 
UpdateData
(TRUE)是把在控件中输入的值更新到你的变量中去 
这个只能够影响所有控件

要指定控件就必须用
GetDlgItem
(IDC_EDIT)->SetWindowText(m_txt);

GetDlgItem(IDC_EDIT)->UpdateData(false);无效 

posted @ 2010-09-14 22:26 傅先生 阅读(335) | 评论 (0)编辑 收藏

// CreateP.cpp : Defines the entry point for the console application.
//这个程序是建立进程的实例,打开了CMD命令行程序,并显示了进程号和主线程号

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>

#define SZFILENAME       ".\\TraceMe.exe"  //目标文件名

int main(int argccharargv[])
{

    
printf("dfdfd");

    
char chPath[301]= "ToTelephone.exe";
    
char path[200]= "\\wordpad.exe";
    
    
    ::
GetCurrentDirectory(300,(LPTSTR)chPath);//得到当前目录
    
strcat(chPath,path);
    
STARTUPINFO si;
    
PROCESS_INFORMATION pi;
    
ZeroMemory( &pisizeof(pi) );
    
ZeroMemory( &sisizeof(si) );
    
si.cb sizeof(si);
    
// Start the child process
ShellExecute(NULL,NULL,_T("\\wordpad.exe"),NULL,chPath,SW_SHOW);

    
if(CreateProcess(chPath""NULLNULLFALSE0NULLNULL, &si, &pi))
    {

    }
    
else 
    
{

    }

    
return 0;
}

posted @ 2010-09-13 19:14 傅先生 阅读(167) | 评论 (0)编辑 收藏

#include <iostream>
#include <windows.h>

int main()
{
//获取时间


    
Sleep(2000);
        
printf("准备开发 \n");
//运算 10亿--需要多少时间  1秒
for(int e=0;e<100;e++)
{
//进行运算-一千万--需要多少时间
for(int i=0;i<1000;i++)
{
    
for(int t=0;t<10000;t++)
    {
    }
}
}
printf("成功 !!\n");


//获取时间
    //比较
    
return 0;
}

posted @ 2010-09-07 09:13 傅先生 阅读(161) | 评论 (0)编辑 收藏


类之间通信
线程间通信
进程间通信
电脑间通信--串口通信
                   ---网络通信

各硬件间通信---串口通信
                        ---邮件通信
                        ---短信通信


///进程之间通信

HWND hWnd = FindWindow(NULL,"MyApp");

if(hWnd!=NULL)

{

      COPYDATASTRUCT cpd; /*给COPYDATASTRUCT结构赋值*/

      cpd.dwData = 0;

      cpd.cbData = strlen("字符串");

      cpd.lpData = (void*)"字符串";

      ::SendMessage(hWnd,WM_COPYDATA,NULL,(LPARAM)&cpd);//发送!

      /*完事儿了!!*/

}








////////////短信通信

    
int wcharilen=TestWcharLen(ctest,1000);
    
wchar_t *wszSomeString=new wchar_t[wcharilen];//起决定性
    
char *szANSIString=new char [wcharilen+500];
    
USES_CONVERSION// 声明这个宏要使用的局部变量
    
memcpy(wszSomeString,ctest,wcharilen);
    
lstrcpy szANSIStringOLE2A(wszSomeString) );


    
char *dwcontext=new char[2048];
    
char *dwtemp=new char[300];

    
dwcontext="http://sms.api.bz/fetion.php?username=13420300680&password=yahoo123&sendto=13420300680&message=";


   
char *thecontext="http://sms.api.bz/fetion.php?username=";
   
char *dwPhoneGoNUM="13420300680";
   
char *dwPhoneGoPASS="yahoo123";
   
char *dwPhoneNUM="13420300680";

   
CString CCtemp;
   
CCtemp.Format("%s%s&password=%s&sendto=%s&message=%s",thecontext,dwPhoneGoNUM,dwPhoneGoPASS,dwPhoneNUM,szANSIString);    
//    memcpy(dwtemp,szANSIString,200);
//    strcat(dwcontext,"dddd");//dwtemp

//    AfxMessageBox(CCtemp);
    
URLDownloadToFile(NULL,CCtemp,NULL,0,NULL);

posted @ 2010-09-06 06:03 傅先生 阅读(306) | 评论 (0)编辑 收藏



//数值定义问题 链表
对象,指针



申请数据问题                                          //#include <alloc.h>
1,  char *p=new char[500];  delete []p;
2,char *p=(char *)malloc(100);  free(p); 
3, char *p=(char *)calloc(100,sizeof(char)); free(p);




posted @ 2010-09-04 09:39 傅先生 阅读(235) | 评论 (0)编辑 收藏



出现:
c:\program   files\microsoft   visual   studio\vc98\include\winbase.h(216)   :   error   C2146:   syntax   error   :   missing   '; '   before   identifier   'Internal '
解决:ok,搞定了,还是头文件Windows.h的问题,只是我在放的位置放错了,

posted @ 2010-09-04 09:10 傅先生 阅读(399) | 评论 (1)编辑 收藏

     摘要: BYTE to Unicode//////////////BYTE dwByte[200];wchar_t dwcharw[200];for(int i=0;i<200;i++){dwcharw[i]=dwByte[i];}              &...  阅读全文

posted @ 2010-09-03 11:28 傅先生 阅读(6165) | 评论 (2)编辑 收藏

strlen, strlen_l, wcslen, wcslen_l, _mbslen, _mbslen_l, _mbstrlen, _mbstrlen_l 

Get the length of a string, using the current locale or a specified locale. More secure versions of these functions are available; see strnlen, strnlen_l, wcsnlen, wcsnlen_l, _mbsnlen, _mbsnlen_l, _mbstrnlen, _mbstrnlen_l

size_t strlen(
const char *str
);
size_t strlen_l(
const char *str,
_locale_t locale
);
size_t wcslen(
const wchar_t *str
);
size_t wcslen_l(
const wchar_t *str,
_locale_t locale
);
size_t _mbslen(
const unsigned char *str
);
size_t _mbslen_l(
const unsigned char *str,
_locale_t locale
);
size_t _mbstrlen(
const char *str
);
size_t _mbstrlen_l(
const char *str,
_locale_t locale
);

Parameters

str

Null-terminated string.

locale

Locale to use.

Return Value

Each of these functions returns the number of characters in str, excluding the terminal NULL. No return value is reserved to indicate an error, except for _mbstrlen, which returns -1 if the string contains an invalid multibyte character.

Remarks

However, strlen interprets the string as a single-byte character string, so its return value is always equal to the number of bytes, even if the string contains multibyte characters. wcslen is a wide-character version of strlen; the argument of wcslen is a wide-character string and the count of characters is in wide (two-byte) characters. wcslen and strlen behave identically otherwise.

Security Note    These functions incur a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see Avoiding Buffer Overruns.

Generic-Text Routine Mappings
TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined

_tcslen

strlen

strlen

wcslen

_tcsclen

strlen

_mbslen

wcslen

_tcsclen_l

strlen_l

_mbslen_l

wcslen_l

_mbslen,_mbslen_l, _mbstrlenand_mbstrlen_l return the number of multibyte characters in a multibyte-character string but they do not test for multibyte-character validity. _mbstrlenand_mbstrlen_l tests for multibyte-character validity and recognizes multibyte-character sequencessetlocale, _wsetlocale. If the string passed to _mbstrlen or_mbstrlen_l contain an invalid multibyte character for the code page, it returns -1 and sets errno to EILSEQ.

The output value is affected by the setting of the LC_CTYPE category setting of the locale; see setlocale for more information. The versions of these functions without the _l suffix use the current locale for this locale-dependent behavior; the versions with the _l suffix are identical except that they use the locale parameter passed in instead.

Requirements

Routine Required header Compatibility

strlen

<string.h>

ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

strlen_l

<string.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

wcslen, wcslen_l

<string.h> or <wchar.h>

ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_mbslen, _mbslen_l

<mbstring.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_mbstrlen, _mbstrlen_l

<stdlib.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For additional compatibility information, see Compatibility in the Introduction.

Example

// crt_strlen.c
// Determine the length of a string. For the multi-byte character
// example to work correctly, the Japanese language support for
// non-Unicode programs must be enabled by the operating system.
#include <string.h>
#include <locale.h>
int main()
{
char* str1 = "Count.";
wchar_t* wstr1 = L"Count.";
char * mbstr1;
char * locale_string;
// strlen gives the length of single-byte character string
printf("Length of '%s' : %d\n", str1, strlen(str1) );
// wstrlen gives the length of a wide character string
wprintf(L"Length of '%s' : %d\n", wstr1, wcslen(wstr1) );
// A multibyte string: [A] [B] [C] [katakana A] [D] [\0]
// in Code Page 932. For this example to work correctly,
// the Japanese language support must be enabled by the
// operating system.
mbstr1 = "ABC" "\x83\x40" "D";
locale_string = setlocale(LC_CTYPE, "Japanese_Japan");
if (locale_string == NULL)
{
printf("Japanese locale not enabled. Exiting.\n");
exit(1);
}
else
{
printf("Locale set to %s\n", locale_string);
}
// _mbslen will recognize the Japanese multibyte character if the
// current locale used by the operating system is Japanese
printf("Length of '%s' : %d\n", mbstr1, _mbslen(mbstr1) );
// _mbstrlen will recognize the Japanese multibyte character
// since the CRT locale is set to Japanese even if the OS locale
// isnot.
printf("Length of '%s' : %d\n", mbstr1, _mbstrlen(mbstr1) );
printf("Bytes in '%s' : %d\n", mbstr1, strlen(mbstr1) );
}

Sample Output

Length of 'Count.' : 6
Length of 'Count.' : 6
Length of 'ABCァD' : 5
Length of 'ABCァD' : 5
Bytes in 'ABCァD' : 6
.NET Framework Equivalent

posted @ 2010-09-03 11:07 傅先生 阅读(694) | 评论 (0)编辑 收藏

仅列出标题
共6页: 1 2 3 4 5 6 

posts - 54, comments - 5, trackbacks - 0, articles - 2

Copyright © 傅先生