node 大寫_大寫Node.js模塊

node 大寫

Today, let's see a third party module that helps us in working with upper-case letters without necessarily typing them in upper-case in our source code.

今天,讓我們看一個第三方模塊,它可以幫助我們處理大寫字母,而不必在源代碼中以大寫字母鍵入它們。

You may find it useless! But it's very important.

您可能會發現它沒有用! 但這很重要。

For example, you may have a form where you require your users to fill in upper-case letters only. You may wish to add a function where any typed in the letter appears in upper-case even though typed in lower-case from the keyboard.

例如,您可能有一個表單,要求您的用戶僅填寫大寫字母。 您可能希望添加一個功能,即使從鍵盤輸入小寫字母,字母中的任何字母都以大寫形式顯示。

Like said before, Node modules are like libraries which help us perform specific tasks. Node.JS is always considered powerful because it has a very large ecosystem of third-party modules.

如前所述,Node模塊就像是可以幫助我們執行特定任務的庫。 Node.JS一直被認為是功能強大的,因為它具有非常龐大的第三方模塊生態系統。

The upper-case module is a third-party module built by some experts to help us.

大寫模塊是一些專家構建的第三方模塊,可以幫助我們。

Take Note! You should have Node.js installed in your PC.

做記錄! 您應該在PC中安裝了Node.js。

With Node.js already up and running, let's get started.

在Node.js已經啟動并運行的情況下,讓我們開始吧。

Now, let's get started.

現在,讓我們開始吧。

First of all, install the upper-case module by typing npm install upper-case via the command line.

首先,通過在命令行中鍵入npm install upper-case來安裝大寫 模塊

upper-case module in Node.js

Wait for a while as it downloads.
NB: Internet required!

等待下載。
注意:需要互聯網!

Take note that only third party modules are installed via command line unlike built in modules which comes along with the node.js environment when downloaded...

請注意,不同于第三方模塊在下載時隨Node.js環境一起提供的內置模塊,僅通過命令行安裝了第三方模塊。

Let's look at a basic use of the upper-case module.

讓我們看一下大寫模塊的基本用法。

We'll create an http server that will output hello world in capital letters but written in small letters in the source code.

我們將創建一個http服務器,該服務器將以大寫字母輸出問候世界,但在源代碼中以小寫字母書寫。

Open a text editor and type the following code and save it with the file name app.js:

打開一個文本編輯器,輸入以下代碼,并將其保存為文件名app.js

var http = require('http');  // includes the http module
var uc = require('upper-case'); // include the upper-case module
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(uc("hello world!")); // assign the upper-case module
res.end();
}).listen(8080); // port number

Note: The file should be saved in your default Node.js directory.

注意:該文件應保存在默認的Node.js目錄中。

Initiate the JavaScript file at the console by typing node app.js

通過鍵入節點app.js在控制臺上啟動JavaScript文件

Take Note! : Your command line directory should be same with Node.js module directory.

做記錄! :您的命令行目錄應與Node.js模塊目錄相同。

Finally, open your browser and navigate to http://localhost:8080

最后,打開瀏覽器并導航到http:// localhost:8080

upper-case module in Node.js

Thanks for coding with me. Your comments are most welcome.

感謝您與我一起編碼。 非常歡迎您發表評論。

翻譯自: https://www.includehelp.com/node-js/upper-case-node-js-module.aspx

node 大寫

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/377500.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/377500.shtml
英文地址,請注明出處:http://en.pswp.cn/news/377500.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

1704:baoge的洗漱難題[黃]

baoge的洗漱難題[黃] Time Limit: 5000 ms Memory Limit: 65536 KB Total Submit: 79 Accepted: 21 Description眾所周知,地大19樓的盥洗室非常小,所以經常會非常擁擠,很多時候去洗漱的時候不得不排很長的隊。有時候baoge會排上半小時…

HDU嵌入式實驗課程大作業分析報告

目錄作業要求設計原理與思路擴展任務說明課程感受友情鏈接工程鏈接作業要求 體能測試記錄儀設計 基于課程發放的實驗板,設計一個帶有計時和數據采集功能的體能測試記錄儀。 基本設計內容 功能1:對應1000米體測場景,使用充電寶供電&#x…

COJ 1030 素數槽

http://acm.csu.edu.cn/OnlineJudge/problem.php?id1030 用線性篩素數果然快多了。 #include<cstdio> #include<cstring> #include<cstdlib> #define MAXN 1300000 bool is_p[MAXN];void calc() {for( int i 1; i < MAXN; i )is_p[i] true;is_p[1] fa…

html注釋引用公共頭部_HTML注釋和引用

html注釋引用公共頭部HTML注釋 (HTML Comments) To insert a comment in an HTML document, the comment tags are used. The comments are used to provide some information that could be useful for anyone who views the code of the webpage. The comments can be insert…

java連接oracle數據庫 -- jdbc連接

a. 倒入oracle的jar包 b. 編寫java文件 package com.sp; import java.sql.*; //使用jdbc連接oracle public class MyOra2 {/*** param args*/public static void main(String[] args) {// TODO Auto-generated method stubtry {Class.forName("oracle.jdbc.dri…

HDB3碼的編碼

編碼規則 1、源碼是1時&#xff0c;暫時不變&#xff1b; 2、連0不超過3個時不變&#xff0c;有4個或以上連0時把每4個0換為取代節&#xff0c;即B00V&#xff1b; 3、確定B是0還是1&#xff1a;第一個B一般取0&#xff0c;若兩個取代節之間1的個數為偶&#xff0c;易推得后者…

地圖加載(安全沙箱問題及解決方案)

基于Flash開發的軟件瀏覽器插件會受到應用沙盒限制&#xff0c;譬如說在本機發布了地圖服務&#xff0c;在flex中使用localhost獲取地圖時一切正常&#xff0c;但改成IP地址后就會報安全沙箱錯誤。 Flash Player對訪問外部資源有比較嚴格的限制&#xff0c;因此如果需要訪問…

批量去除文件空格

import osfilepath r"G:\picture" # 文件目錄名 allfilepath os.listdir(filepath)for file in allfilepath: # 改目錄下的文件名oldpath filepath \\ filenewname file.replace( , ) # 在原先文件名中去除空格&#xff0c;也就是用null替代空格newpath fil…

python 初始化 元組_在Python中重新初始化元組

python 初始化 元組Python | 重新初始化元組 (Python | Reinitializing tuple) In this tutorial, we will learn how can we reinitialize a tuple with a new set of elements/objects? 在本教程中&#xff0c;我們將學習如何使用一組新的元素/對象重新初始化元組&#xff1…

【DSP復習主要知識點】(大概)

目錄第一章1、數字系統對比模擬系統2、馮諾依曼、哈佛架構3、CISC、RISC4、DSP特點5、cpu流水線作用6、DSP芯片優點第二章&#xff1a;DSP芯片結構原理1、ALU&#xff08;算數邏輯運算單元&#xff09;2、累加器A和B3、桶形移位器的功能4、乘法/加法單元5、CPU狀態與控制寄存器…

PHP CURL POST無法獲取響應內容的問題

現象&#xff1a; 使用PHP的CURL相關函數進行POST&#xff0c;當要POST的參數內容長度超過1024時&#xff0c;將無法獲得response的數據。 即&#xff1a; [php] view plaincopyprint?curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS,…

每天自動給自己發天氣預報的腳本

需求&#xff1a; 每天早上起來可以看看天氣預報&#xff0c;然后順便當個鬧鐘使 思路是這樣的&#xff1a; 模塊一&#xff1a;采用yahoo weather api獲取北京的天氣 模塊二&#xff1a;通過網頁版飛信&#xff0c;模擬飛信登陸&#xff0c;給自己發短信 模塊三&#xff1a;發…

YYSSW的完整格式是什么?

YYSSW&#xff1a;是的&#xff0c;肯定的&#xff0c;無論如何 (YYSSW: Yeah Yeah Sure Sure Whatever) YYSSW is an abbreviation of "Yeah Yeah Sure Sure Whatever". YYSSW的縮寫是“ Yeah Yeah Sure Sure Whatever” 。 It is an expression, which is commonl…

Json轉二值圖像

Json文件通過labelme進行標識 image路徑 G:\PyCharm\workspace\unet_42-master\datasets\label_bz\test\image label路徑 G:\PyCharm\workspace\unet_42-master\datasets\label_bz\test\label 待轉換路徑 G:\PyCharm\workspace\unet_42-master\datasets\label_bz\test\mask …

矩形波傅里葉變換對以及三角波傅里葉變換

時域矩形波->頻域sinc 時域三角波->頻域sinc^2:

關于蘋果IPhone/Ipad(IOS)開發者證書申請及安裝、真機調試、發布的參考文章

這是我在申請、安裝IOS開發者證書&#xff0c;真機調試時候參考的文章&#xff0c;非常有用。 1、開發證書與發布證書申請和安裝步驟 http://blog.csdn.net/zougangx/article/details/6074313 2、申請IDP/真機調試/GameCenter 指南/OpenFeint指南&#xff1a; http://xiaomingh…

scrollTop

chrome 不支持 document.documentElement.scrollTopfirefox 不支持 document.body.scrollTop 解決辦法var sTopdocument.body.scrollTopdocument.documentElement.scrollTop; var nowScrollTop document.body.scrollTopdocument.documentElement.scrollTop; document.body.scr…

INTERNET的完整形式是什么?

互聯網&#xff1a;互聯網絡 (INTERNET: Interconnected Network) INTERNET is an abbreviation of Interconnected Network of all the Web Servers Worldwide. It is also known as the World Wide Web or in simple terms the Web. INTERNET是全球所有Web服務器的互連網絡的…

DMA三種方式以及DMA特點

博主聯系方式&#xff1a; QQ:1540984562 QQ交流群&#xff1a;892023501 群里會有往屆的smarters和電賽選手&#xff0c;群里也會不時分享一些有用的資料&#xff0c;有問題可以在群里多問問。 DMA三種方式&#xff1a;數據塊傳送方式、周期挪用方式、交替訪存方式 數據塊傳送…

進程通信

進程間通信就是在不同進程之間傳播或交換信息&#xff0c;進程間控制信息的交換稱為低級通信&#xff0c;進程間大批量數據的交換稱為高級通信。 進程通信分為3種&#xff1a; 1&#xff0e;共享存儲器系統&#xff1a;為了傳送大量數據&#xff0c;在存儲器中劃出一塊共享存儲…