823年才一次的五個星期五,五個星期六,五個星期日?

剛在程式員小輝網站上看到的: 剛才在論壇裡看到一個朋友說:“這個月(2010.10)有五個星期五,五個星期六,五個星期日。聽說823年才能碰一次。”在 Google 中搜尋“五個星期五,五個星期六,五個星期日”,幾十頁的結果,都是說 823 年才有一次。猛一看,很稀奇。但一較真,就經不起推敲了。這個823年是怎麼算來的?為什麼不是 822 年或者 824 年而一定是 823 年?想想就知道:只要有一個月是大月份(31天),那麼必定有三個連續的星期單位,會被重複五次。因為: 31 = 4 x 7

【 學點VBA之EXCEL 】二

(1)在VBA中建立一個表單,初始化其位置,並調用之... Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Sub CallForm() UserForm1.Show '顯示表單 UserForm1.Left = 600 '顯示位置 UserForm1.Top = 180End SubPrivate Sub

zt:單片機常用輸出格式–Motorola S-records(S19檔案)

Motorola S-records 16進位檔案格式是嵌入式中除intel hex之外很常見的格式,下面是它的格式:+-------------------//------------------//-----------------------+| type(hex1) | count(hex 1) |  address | data | checksum(從count累加到checksum,總和為0xFF) |+-------------------//------------------

在QT4中使用類似QVBox類似功能

QVBox在Qt 3.0的是這樣子的: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/******************************************************************** Qt教程一 - 3*****************************************************

判斷shift,ctrl,alt鍵是否按下

 在組件的OnKeyDown、OnKeyUp 、OnMouseDown和OnMouseUp等事件的處理過程中,有一個TShiftState類型的變數Shift ,TShiftState類型定義如下: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 type TShiftState = set of (ssShift, ssAlt, ssCtrl,

List和string

在Python的List處理中,string好像被看成是由單個字元組成的List了。。。。請看下面代碼的lst4和lst6的操作代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#coding:gb2312lst1 = [1,2,3,4]lst1.append([5,6,7,8])print lst1 #列印結果:[1,

IFM控制器中關於支線長度的說明

 Spurs Ideally no spur should lead to the bus participants (node 1 ... node n) because reflections occurdepending on the total cable length and the time-related processes on the bus. To avoid systemerrors, spurs to a bus participant (e.g. I/O module)

截圖:截取當前程式的介面,並儲存到bmp圖片中。

直接上代碼: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,Clipbrd;type TForm1 =

利用替換字串的函數StringReplace刪除字串中指定的字元或字串

標題有點長,呵呵~利用StringReplace函數可以刪除字串中指定的字元(字串),下面是一個小例子: 刪除字串中的'bad'字串:Code highlighting produced by Actipro CodeHighlighter

zt:漸層色表單背景

我們看到有些安裝程式的背景色自上由下由藍變黑,我們可以通過下列程式實現雙擊表單的OnPaint事件,然後編寫如下程式:(delphi7下編譯通過) unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Mask;type TForm1 = class(TForm) medt1: TMaskEdit;

將四個BYTE數值轉換成IEEE754標準的浮點數

在工作中,經常使用到IEEE754格式的資料。IEEE754格式的資料佔四個位元組,好像Motorola格式和Intel格式的還不一樣。由於工作中很少和他打交道(使用的軟體內部已經處理),就沒太在意。今天在編程時發現需要把四個BYTE類型的資料轉換成IEEE754標準的資料,就編了一個函數處理一下。 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 

完美解決CTRL+空格不能切換中/英文IME的問題

首先工作列上的IME表徵圖上點右鍵選擇設定。 然後選擇鍵設定,雙擊第一個“在不同的輸入語言之間切換”先勾選“切換輸入語言”下面選擇左手ALT。取消右邊“切換鍵盤布局”前的勾。 然後進入“中文(簡體)IME - IME/非IME切換”,取消“啟用按鍵順序”前的勾。一路都確定後推出設定。 再次進入設定,進入“在不同的輸入語言之間切換”,把右邊那個打上勾。確定後退出。 哈哈,完美解決了無法使用ctrl+shift以及ctrl+space切換IME的問題。具體是什麼原理,我也不知道(⊙v⊙)

控制項的移動、改變大小(DELPHI實現)

unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls;type TForm1 = class(TForm) Panel1: TPanel; procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift:

虛擬機器安裝QNX

方法很簡單,直接從官網下載QNX的虛擬機器鏡像,然後下載虛擬機器軟體VMWare。安裝好VMWare之後,開啟QNX的虛擬機器鏡像即可。 虛擬機器:http://xx2.gd.xdowns.com:8081/x/0912/VMware_Workstation_7_CN.exe綠色軟體,下載後解壓出來即可使用。 QNX虛擬機器鏡像檔案:http://fusion.qnx.com/9/21189/QNX_Eval_RT-201007091524.zip?tid=3833410_dY_08100814

zt:16進位Motorola S-records 檔案格式

好東西,收藏一下--------------------------------------------------------------------------------------------------------------------------Motorola S-records 16進位檔案的另一種常見格式,Fujitsu平台的Softune編譯出來就是這種格式這篇文章介紹了一下各個資料記錄的意義。The following fairly complete

【 學點VBA之EXCEL 】一

(1)儲存格的顯示及隱藏代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Private Sub CommandButton1_Click()If CommandButton1.Caption = "顯示OD Entery" Then CommandButton1.Caption = "不顯示OD Entery"

擷取郵箱中的使用者名稱

有一個E-mail地址:username@***.com,編一個程式,讀出username. Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 {------------------------------------------------------} 2 {               從 ****@###.##中提取出****      

CoDeSys v2.3.9.16 發布

3S公司在2009-10-08日發布了CoDeSys v2.3.9.16版本。這個版本支援32位的windows vista/windows.但是還不支援64位的windows vista/windows7.看來windows7是潮流啊,大家都在往這上邊靠...下載時需要使用者名稱和密碼,可以在官網上註冊一下,他們會將使用者名稱和密碼發至您指定的郵箱。 已經在windows7環境下安裝成功。來自3S公司網站的說明:-----------------------------------------

COB-ID,Can-ID,Node-ID的不同

"Addresses" in CANopen In CANopen there are different types of addresses (IDs): • COB ID The CAN Object Identifier addresses the message (= the CAN object) in the list of devices.Identical messages have the same COB ID. The COB ID entries in the

隨機產生一個10位的數字(來自大富翁)

Code highlighting produced by Actipro CodeHighlighter

總頁數: 61357 1 .... 12279 12280 12281 12282 12283 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.