了解使用JavaScript進行面向對象編程的基礎(并增強您的編碼…

by Kris Baillargeon

通過克里斯·拜倫

學習使用JavaScript進行面向對象編程的基礎知識(并增強您的編碼能力!) (Learn the basics of object-oriented programming with JavaScript (and supercharge your coding abilities!))

As a moderator of the freeCodeCamp chat rooms, I spend a lot of time with new developers. Boy, are they eager to learn. For a lot us, this can be quite a challenging quality.

作為freeCodeCamp聊天室的主持人,我花了很多時間在新開發人員身上 。 男孩,他們渴望學習嗎? 對于我們很多人來說,這可能是一個具有挑戰性的品質。

In the case of object-oriented programming (OOP), this rings especially true. What the heck is a method and why is it so special? What’s the difference between a method and a property? Why do we even use object-oriented programming, and why is it essential to me as a developer? These are some questions I asked myself while learning OOP, and because you’re here, it’s safe to assume that you have, too.

在面向對象編程(OOP)的情況下,尤其如此。 什么是方法,為什么它如此特別? 方法和屬性有什么區別 為什么我們甚至使用面向對象的程序,為什么對于我作為開發人員來說這是必不可少的? 這些是我在學習OOP時問自己的一些問題,并且因為您在這里,所以可以肯定地假設您也有。

在JavaScript中使用面向對象的編程 (Using Object-Oriented Programming with JavaScript)

Almost everything in JavaScript is an object. Somewhere behind the scenes, every piece of code you write is either written or stored with OOP. That’s one of the reasons why it’s so important to understand it. If you don’t then you’ll most likely never be able to read other developers’ code. On top of that, your code will never reach its full potential!

JavaScript中的幾乎所有東西都是對象。 在幕后的某個地方,您編寫的每段代碼都是用OOP編寫或存儲的。 這就是理解它如此重要的原因之一。 如果您不這樣做,那么您極有可能永遠無法閱讀其他開發人員的代碼。 最重要的是,您的代碼將永遠無法發揮其全部潛能!

A new object is made in JavaScript by assigning a variable to two curly brackets, like this:

通過將變量分配給兩個大括號來在JavaScript中創建一個新對象,如下所示:

var myObject = {};
// var myObject = new Object();  // Non recommended version, but it works

It’s that simple! You now have an object that can store any type of data you would store in a variable. There are many ways of inserting data into an object, but we’ll stick to the easiest methods right now.

就這么簡單! 現在,您有了一個可以存儲將存儲在變量中的任何類型的數據的對象。 有多種方法可以將數據插入對象,但現在我們將堅持最簡單的方法。

快速語法課 (Quick Syntax Lesson)

To end a line in JavaScript, when making a variable like this:

在制作這樣的變量時,要在JavaScript中結束一行:

var a = 5;

var a = 5;

the “line” ends at the semicolon. When you’re making an object, the “line” will end with a comma, like so:

“行”以分號結尾。 制作對象時,“行”將以逗號結尾,如下所示:

myObject = { myProp: 5,  myOtherProp: 10,}
  • Property/Key: The name of an object variable. An example would be myProp in the above code. || Left hand side of assignments

    屬性/鍵:對象變量的名稱。 一個例子是myProp 在上面的代碼中。 || 作業的左側

  • Method : A function inside of an object, only available to that object. This is a type of property.

    方法:對象內部的函數,僅對該對象可用。 這是一種屬性。
  • Value: The value of an object variable. An example would be 10, which is the value of myOtherProp. This can be any valid JavaScript datatype.

    值:對象變量的值。 一個例子是10,這是myOtherProp.的值myOtherProp. 這可以是任何有效JavaScript數據類型。

Only the last property in an object may not use a comma.

只有在一個對象中的最后一個屬性可以不使用逗號。

Note: You may enclose your properties in single or double quotes. If there is a space in the property name, you must always use quotes. When using JSON, using quotes is not optional.

注意:您可以將屬性用單引號或雙引號引起來。 如果屬性名稱中有空格,則必須始終使用引號。 使用JSON時 ,使用引號不是可選的。

引用對象屬性 (Referencing Object Properties)

點表示法 (Dot notation)

There are two ways of referencing an object, both having a name as reference. The most commonly used, dot notation, is what is primarily used. It looks like this:

有兩種引用對象的方法,兩種方法都有一個名稱作為引用。 最常用的是點符號它是主要使用的符號。 看起來像這樣:

var myObject = {
otherObject: {            one: 1,        two: 2      },
addFunction: function(x,y){ return x+y }
}
var dot = myObject.otherObject;console.log(dot);//evaluates to otherObject: {..props:vals..}

The above code goes into myObject and adds another object to it, otherObject via dot notation. Any name that can be used as a variable is suitable for use in dot notation. Dot notation is best practice for referencing any property that doesn’t include spaces.

上面的代碼進入myObject 并向其中添加另一個對象otherObject 通過點表示法。 可以用作變量的任何名稱都適用于點表示法。 點表示法是引用任何不包含空格的屬性的最佳實踐。

括號符號 (Bracket Notation)

var myObject = {  "Other Obj": {          one: 1,      two: 2    }}
var bracket = myObject["Other Obj"];
bracket.newProperty = "This is a new property in myObject";
console.log(bracket.newProperty);
//evaluates to myObject["Other Obj"].newProperty

The other way to reference objects is via bracket notation. This is only recommended if the object’s property contains a space, such as the property myObject[“Other Object”]; . In this case, using bracket notation is a must. When naming methods, don’t use spaces — otherwise the function can’t be called. Additionally, you can use quotes to name any property.

引用對象的另一種方法是通過括號符號。 僅當對象的屬性包含空格時才建議這樣做,例如,屬性myObject[“Other Object”]; 。 在這種情況下,必須使用括號符號。 在命名方法時,請勿使用空格-否則無法調用該函數。 此外,您可以使用引號命名任何屬性。

使用JavaScript IRL (Using JavaScript IRL)

Constructor Functions are worth mentioning, as we will be making our own form of constructor functions later on in this article. To do this, we must first learn two JavaScript keywords — new and this. You use the new keyword when referring to the constructor function.

建設者 函數值得一提,因為我們將在本文的后面部分構造自己的構造函數。 要做到這一點,首先要學會兩個JavaScript關鍵字- 還有這個 。 引用構造函數時,請使用new關鍵字。

For the this keyword, it’s basically a fancy keyword for the last called function parent object. If it has no parent object, window will be its parent object. You can bind a function to this keyword using Function.bind(). Learn more here. But that’s a bit more advanced. Make any sense? Let’s look at some code:

對于this關鍵字,它基本上是最后一個調用函數的父對象的特殊關鍵字。 如果沒有父對象,則window將為其父對象。 您可以將功能綁定到此 使用Function.bind ()的關鍵字 在這里了解更多 但這有點高級。 有道理嗎? 讓我們看一些代碼:

var ConstructorForPerson = function(first, last, email) {  this.firstName = first;this.lastName = last;this.fullName = first + " " + last;this.eMail =  email;
}
var Bob = new ConstructorForPerson("bob", "brown", "bob122099@gmail.com");
console.log(Bob.eMail);
//evals "bob122099@gmail.com"

The above code will return a new object, Bob. That is the result of the constructor function, which will have the properties Bob.firstName, Bob.lastName, Bob.fullName, and Bob.eMail.

上面的代碼將返回一個新對象Bob. 那是構造函數的結果,它將具有屬性Bob.firstNameBob.lastName Bob.fullNameBob.eMail

Note that inside of a constructor function, instead of ending a line with a comma, it ends with a semicolon like you would expect inside a function. Optionally, to keep things simple, you can make your own constructor functions without using new or this. That’s what we’ll be doing today so we can see all the moving pieces better.

請注意,在構造函數內部,與其以逗號結尾,不如在函數內部以分號結尾。 (可選)為使事情簡單,您可以使用自己的構造函數而無需使用new 或者這個 這就是我們今天要做的,因此我們可以更好地看到所有運動部件。

簡單來說 (In Simple Terms)

Object-oriented programming is a way of structuring your code for optimal readability, use, and maintenance. With this in mind, let’s try coding a representation of Google as a business, including some functions of a normal company.

面向對象的編程是一種結構化代碼以實現最佳可讀性,使用和維護的方式。 考慮到這一點,讓我們嘗試編碼Google的業務代表形式,包括普通公司的某些功能。

  • The Object — The Building/Management. This will contain all the information about any kind of employee, anything that can be done to an employee, including making a new one.

    對象-建筑物/管理 這將包含有關任何類型雇員的所有信息,可以對雇員進行的所有操作,包括創建新雇員。

  • The Properties — The Employees. This can be a manager or a desk clerk. This can be a list of employees. This can be your gross profit for this year. Pretty much anything.

    屬性-員工 這可以是經理或辦公桌文員。 這可以是員工列表。 這可以是您今年的毛利。 幾乎任何東西。

  • The Methods — What Can Google Do? What Can The Employees Do? This is how new employees are made, as well as how they will “perform tasks”.

    方法-Google可以做什么? 員工可以做什么? 這就是新員工的培養方式以及他們“執行任務”的方式。

讓我們編碼! (Let’s Code!)

First, let’s look at our end result:

首先,讓我們看一下最終結果:

var google = { //create {google}
employees: {           management: {            },
developers: {                 },
maintenance: {            }   },      NewEmployee: function(name, role, phone, idNumber) {  //create NewExployee()            var newEmployeeData = {        name: name,        role: role,        phone: phone,        idNumber: idNumber,        working: false,        hours: [],       }     //make new object to append to google.employees[role]        google.employees[role][name] = newEmployeeData;    //assign object to google.employees[role][name]
return  google.employees[role][name];  //return the new object directly from google.employees[role][name]        } //end NewEmployee  } //end {google}
google.NewEmployee("james", "maintenance", "2035555555", "1234521"); //create {google:employees:maintenance["james"]} from NewEmployee()
google.employees["maintenance"]["james"].clockInOut = function() { //create clockInOut() - default false         if(this.working) {         this.hours[this.hours.length - 1].push(Date.now());         this.working = false;         return this.name + " clocked out at " + Date.now();        }       else{         this.hours.push([Date.now()]);         this.working = true;         return this.name + " clocked in at " + Date.now();        }
return "Error"     //if above doesn't work, "Error" }
google.employees["maintenance"]["james"].clockInOut(); //clock James in or out, returns a string w/ the time & state

Daunting?

令人生畏的?

Let’s break it down into smaller pieces. To start, we’ll make a global object called Google. It will contain another object for employees, which will contain more objects for each role and its individual employees.

讓我們將其分解為較小的部分。 首先,我們將創建一個名為Google的全局對象。 它將為員工包含另一個對象,該對象將為每個角色及其單個員工包含更多對象。

So what will this look like in code? For the sake of keeping things easy, we’re going to make a constructor using a normal function. It will have 7 properties: name, role, phone, idNumber, working, and hours.

那么這在代碼中會是什么樣? 為了使事情變得簡單,我們將構造一個構造函數 使用正常功能。 它將具有7個屬性: name role, phone idNumber working hours

In addition, it will have 1 method: clockInOut(), which will look at the working property to update hours.

此外,它將有1個方法: clockInOut(),它將查看working屬性以更新hours.

Let’s break it down.

讓我們分解一下。

First, we’re going to update our Google object with the NewEmployee() constructor function. Remember, instead of using the regular JavaScript constructor function, we’ll be using our own.

首先,我們將使用NewEmployee()構造函數更新Google對象。 請記住,我們將使用自己JavaScript而不是常規JavaScript構造函數。

Note: Pay attention to syntax as it will switch around a bit depending on what you’re doing

注意:請注意語法,因為語法會根據您的操作而有所變化

Also note: These examples will not run properly as they do not have the correct dependencies/properties/variables. Most if not all functionality from the final product will return an error. If you run the final product, however, everything should work fine.

另請注意:這些示例將不正確運行,因為它們沒有正確的依賴關系/屬性/變量。 最終產品的大多數功能(如果不是全部功能)將返回錯誤。 但是,如果您運行最終產品,則一切都會正常運行。

var google = { //create {google}
employees: {           management: {
},           developers: {
},
maintenance: {
}         }, //<--this comma is unnecessary right now but when we add more object properties it will be necessary}

employees holds other objects which are various roles in the company: management, developers, and maintenance. We will be adding an employee via the employee’s role, in this case, maintenance.

employees還擁有公司中其他各種角色: managementdevelopersmaintenance 。 我們將通過員工角色(在這種情況下為維護)來添加員工。

var google = {  NewEmployee: function(name, role, phone, idNumber) {    var newEmployeeData = {      name: name,      role: role,      phone: phone,      idNumber: idNumber,      working: false,      hours: [],     }     //make new object to append to google.employees[role]        google.employees[role][name] = newEmployeeData;    //assign object to google.employees[role][name]
return  google.employees[role][name];  //return the new object directly from google.employees[role][name]  }}

Our “constructor” function”. Pretty straightforward, it takes a new object and appends it to the corresponding role.

我們的“構造函數”。 非常簡單,它需要一個新對象并將其附加到相應的角色。

google.employees["maintenance"]["james"].clockInOut = function() { //create clockInOut() - default false         if(this.working) {         this.hours[this.hours.length - 1].push(Date.now());         this.working = false;         return this.name + " clocked out at " + Date.now();        }       else{         this.hours.push([Date.now()]);         this.working = true;         return this.name + " clocked in at " + Date.now();        }
return "Error" //if above doesn't work, "Error" }
google.employees["maintenance"]["james"].clockInOut(); //call clockInOut()

This is where it might get confusing. Remember that the keyword this is just a funny way to say the calling function’s parent object? In the above, we add the method clockInOut() to our code. We invoke it simply by calling it. If working is false, it will create a new array with a Unix timestamp at index 0. If you’re already working, it will just append a Unix timestamp to the last created array, creating an array that looks kind of like this: [1518491647421, 1518491668453] with the first timestamp being when the employee “clocks in”, the second being when the employee “clocks out”.

這可能會使您感到困惑。 請記住,關鍵字this 說調用函數的父對象只是一種有趣的方式? 在上面的代碼中,我們將方法clockInOut ()添加到了代碼中。 我們只需調用它即可調用它。 如果work為false,它將創建一個帶有Unix時間戳索引為0的新數組。如果您已經在工作,它將Unix時間戳附加到最后創建的數組,從而創建一個看起來像這樣的數組:[ 1518491647421、1518491668453],第一個時間戳是員工“進門”的時間,第二個時間戳是員工“進門”的時間。

Now we’ve seen how using OOP can be practical! Each individual employee can “clock in” and “clock out” with a simple function call, and all you have to know is their name and role!

現在我們已經看到了使用OOP的實用性! 每個員工都可以通過一個簡單的函數調用“撥入”和“撥出”,您只需要知道他們的名字和角色!

This can, of course, be optimized to do something like look at an ID number instead of their role and name, but let’s not over-complicate things. Below we bring everything back into one program. Slightly less scary, right?

當然,可以對此進行優化,以執行類似于查看ID號的操作,而不是查看其角色和名稱,但是我們不要使事情復雜化。 下面,我們將所有內容重新整合到一個程序中。 有點嚇人吧?

var google = { //create {google}
employees: {           management: {      },      developers: {      },
maintenance: {      }         },      NewEmployee: function(name, role, phone, idNumber) { //create NewExployee()            var newEmployeeData = {        name: name,        role: role,        phone: phone,        idNumber: idNumber,        working: false,        hours: [],       }     //make new object to append to google.employees[role]        google.employees[role][name] = newEmployeeData;    //assign object to google.employees[role][name]
return  google.employees[role][name];  //return the new object directly from google.employees[role][name]        }//end NewEmployee  } //end {google}
google.NewEmployee("james", "maintenance", "2035555555", "1234521"); //create {google:employees:maintenance["james"]} from NewEmployee()
google.employees["maintenance"]["james"].clockInOut = function() { //create clockInOut() - default false         if(this.working) {         this.hours[this.hours.length - 1].push(Date.now());         this.working = false;         return this.name + " clocked out at " + Date.now();        }       else{         this.hours.push([Date.now()]);         this.working = true;         return this.name + " clocked in at " + Date.now();        }
return "Error" //if above doesn't work, "Error" }
google.employees["maintenance"]["james"].clockInOut(); //call clockInOut()

Using Object Oriented Programming can not only make your code more powerful, but also much more readable to other developers. Feel free to contact me through Github for projects, Free Code Camp info, Javascript/HTML/CSS help, to encourage me to write a tutorial on using JSON and APIS, or to talk about cats!

使用面向對象的編程不僅可以使您的代碼更強大,而且對其他開發人員也更具可讀性。 請隨時通過Github與我聯系以獲取項目, 免費的代碼營信息,Javascript / HTML / CSS幫助,鼓勵我編寫有關使用JSON和APIS的教程或談論貓!

By the way, if you didn’t know, everything taught in this tutorial as well as ANYTHING you need to know about vanilla Javascript, HTML, CSS and more, you can count on MDN to have an extensive amount of knowledge on it. It’s basically Google for web developers! It’s also 1220% free and open source.

順便說一句,如果您不知道本教程中教授的所有內容以及有關原始Javascript,HTML,CSS等的任何知識,則可以依靠MDN來獲得大量的知識。 基本上是面向網絡開發人員的Google! 它還是1220%的免費開放源代碼。

Don’t forget to clap & follow if you enjoyed! More articles coming soon! :)

如果您喜歡的話,別忘了拍手跟著! 更多文章即將推出! :)

Keep up with me on Instagram @krux.io

跟我上Instagram @ krux.io

FURTHER LEARNING ON MDN:

關于MDN的進一步學習:

OOP FOR BEGINNERS

適合初學者

GLOBAL OBJECTS

全球對象

JSON TUTORIAL

JSON教程

USING JSON IN JAVASCRIPT — GLOBAL JSON OBJECT

在JAVASCRIPT中使用JSON —全局JSON對象

KEYWORD THIS

關鍵字this

CONSTRUCTOR FUNCTIONS

構造函數

翻譯自: https://www.freecodecamp.org/news/intro-to-object-oriented-programming-oop-with-javascript-made-easy-a317b87d6943/

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

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

相關文章

postgresql的別名要用雙引號才可以

postgresql的別名要用雙引號""才可以 轉載于:https://www.cnblogs.com/handsome1013/p/10443001.html

imx6 mac地址設置

imx6的mac地址總是固定的值&#xff0c;所以需要更改&#xff0c;采用的方法是在uboot中設置環境變量,之后在kernel中使用uboot中設置的mac地址的值。本文記錄更改的過程。 參考鏈接&#xff1a; http://www.cnblogs.com/zengjfgit/p/5711304.html uboot lib_arm/board.c …

java try catch陷阱_Java異常處理最佳實踐及陷阱防范

原標題&#xff1a;Java異常處理最佳實踐及陷阱防范出自《深夜里的程序猿》作者&#xff1a;wangzenghuang前言不管在我們的工作還是生活中&#xff0c;總會出現各種“錯誤”&#xff0c;各種突發的“異常”。無論我們做了多少準備&#xff0c;多少測試&#xff0c;這些異常總會…

vivo手機怎么投屏到電腦_投屏軟件電腦加手機投屏軟件投屏

優秀的資源工具可以讓你事半功倍&#xff01;本號文內資源已經手工轉存整理&#xff0c;安全起見&#xff0c;回復 “領取資源” 按提示自助領取。今天分享的是一家公司出品的投屏神器。為避免被舉報這里就不說出軟件名了。它可以在局域網內把手機的屏幕投到電腦上&#xff0c;…

How to upload windows Sysprep Files to VMware vCenter Server Appliance 6.5(vC

vCSA5.5中可以登錄到端口5480中去上傳&#xff0c;vCSA 6.0以后就不支持了。但是可以通過Enable “Pi Shell”來做。 首先確保vCSA的ssh可用&#xff1a; 0. Make sure that SSH in enabled on the VCSA. Home > Administration > System configuration (under Deploymen…

開源短地址_如何在短短5分鐘內完成您的第一個開源貢獻

開源短地址by Roshan Jossey羅珊喬西(Roshan Jossey) 如何在短短5分鐘內完成您的第一個開源貢獻 (How to make your first open source contribution in just 5 minutes) The best way to level up your programming skills it to code more. The second best thing is to rea…

【Qt開發】QT對話框去掉幫助和關閉按鈕 攔截QT關閉窗口的CloseEvent

建了一個對話框&#xff0c;我不想把邊框去掉&#xff0c;只想去掉關閉按鈕&#xff0c; setWindowFlags(windowFlags()&~Qt::WindowCloseButtonHint&~Qt::WindowContextHelpButtonHint); 結果那個問號的按鈕去掉了&#xff0c;但是關閉按鈕還在&#xff0c;求助啊 set…

Vivado Design Suite用戶指南之約束的使用第二部分(約束方法論)

Constraints Methodology&#xff08;約束方法論&#xff09; 關于約束方法論 設計約束定義了編譯流程必須滿足的要求&#xff0c;以使設計在板上起作用。 并非所有步驟都使用所有約束在編譯流程中。 例如&#xff0c;物理約束僅在實現步驟期間使用&#xff08;即&#xff0c;由…

eval函數 php_PHP的一句話木馬代碼和函數eval的簡介

大清早的剛從床上爬起來。雨落就跑來找我問我這段代碼是什么意思<?php eval($_POST[pp]);?>看了一下&#xff0c;post接收pp的值&#xff0c;抑制錯誤輸出。呵呵開個玩笑&#xff0c;其實不是這么簡單&#xff0c;這是一段PHP木馬代碼&#xff0c;也就是我們所說的后門…

linux安裝python_Python - 愛豆

Python下載Python最新源碼&#xff0c;二進制文檔&#xff0c;新聞資訊等可以在Python的官網查看到&#xff1a;Python官網&#xff1a;你可以在以下鏈接中下載 Python 的文檔&#xff0c;你可以下載 HTML、PDF 和 PostScript 等格式的文檔。Python文檔下載地址&#xff1a;doc…

如何將您的#100DaysOfCode登錄轉換為視覺體驗

by Joe Warren通過喬沃倫 如何將您的&#xff03;100DaysOfCode登錄轉換為視覺體驗 (How to Transform Your #100DaysOfCode Log Into a Visual Experience) Learning how to code is an unrivaled modern experience. As an aspiring developer, no matter what level you’r…

Python中集合(set)的操作及一些比較常見的用法

Python除了List、Tuple、Dict等常用數據類型外&#xff0c;還有一種數據類型叫做集合&#xff08;set&#xff09;&#xff0c;集合的最大特點是&#xff1a;集合里邊的元素是不可重復的并且集合內的元素還是無序的&#xff0c;所以一般情況下集合常用的兩個場景是&#xff1a;…

php中的圖像下載函數,PHP實現的下載遠程圖片自定義函數分享

/*** PHP下載遠程圖片到本地** param $url string 遠程文件地址* param $filename string 保存后的文件名(為空時則為隨機生成的文件名&#xff0c;否則為原文件名)* param $fileType array 允許的文件類型* param $dirName string 文件保存的路徑(路徑其余部分根據時間系統自動…

Linux 文件的壓縮與解壓

1. tar結尾壓縮命令 [roottest ~]# tar -cvf grub.tar /boot/grub/ 查看壓縮包文件 [roottest ~]# tar -vtf grub.tar 解壓文件 #tar -xvf grub.tar # tar -xvf grub.tar -C 解壓目錄 2. gz結尾壓縮命令 # tar -zcvf grub.tar.gz /boot/grub gz結尾解壓命令 #tar -zxvf gr…

深度學習筆記-卷積神經網絡CNN與循環神經網絡RNN有什么區別?

轉載 https://blog.csdn.net/weixin_35227692/article/details/79223536轉載于:https://www.cnblogs.com/USTBlxq/p/10445268.html

參考框架 系統 基準_帶有基準的前端框架的實際比較

參考框架 系統 基準by Jacek Schae由Jacek Schae 帶有基準的前端框架的實際比較 (A Real-World Comparison of Front-End Frameworks with Benchmarks) UPDATE: There is a newer version of this article更新&#xff1a;本文有較新的版本 A Real-World Comparison of Front…

ppt復制切片器_零基礎小白自學PPT快速入門到精通(上)

零基礎小白如何自學PPT快速入門到精通呢&#xff1f;40個保姆級小技巧助力你高效掌握PPT基礎操作&#xff01;PPT在學習與工作中的應用越來越廣泛&#xff1a;在學校時免不了要做畢業答辯、畢業論文&#xff0c;工作中時常要進行復盤總結、工作匯報、推廣方案&#xff0c;有時甚…

網絡安全初創公司SafeBreach獲1500萬美元A輪融資

今天&#xff0c;網絡安全初創公司 SafeBreach 宣布完成1500 萬美元 A 輪融資&#xff0c;新投資者德國電信、惠普公司、 Maverick Ventures 及現有投資者 Sequoia Capital 和 Shlomo Kramer 參投。公司計劃利用本輪融資加大研發力度&#xff0c;擴大銷售及營銷團隊&#xff0c…

php網站分區,PHP - Manual: 分區和分片 (官方文檔)

分區和分片數據庫群組是由于各種各樣的原因建立的&#xff0c;他可以提升處理能力、容忍錯誤&#xff0c;并且提升大量服務器同時工作的的性能。群組有時會組合分區和共享功能&#xff0c;來將大量復雜的任務分拆成更加簡單的任務&#xff0c;更加可控的單元。插件可以支持各種…

webBroser獲取cookie

//取當前webBrowser登錄后的Cookie值 [DllImport("wininet.dll", CharSet CharSet.Auto, SetLastError true)]static extern bool InternetGetCookieEx(string pchURL, string pchCookieName, StringBuilder pchCookieData, ref int pcchCookieData, int dwFlags…