主頁 >  其他 > 深入理解MapReduce

深入理解MapReduce

2021-09-24 08:45:57 其他

目錄

  • MapReduce概述(是一個做計算的程式)
  • MapReduce原理
  • Shuffle程序
  • MapReduce執行程序-map階段
  • MapReduce執行程序-reduce階段
  • shell端實作mapreduce
    • 準備資料
    • 實作mapreduce
      • 開始執行
      • 查看結果
  • Java操作mapreduce
  • Java操作mapreduce,指定reduce任務數
  • mapreduce程式關聯兩張表(實作join操作)
  • 介于map端與reduce端之間的Combine
    • mapreduce程式實作combinue預聚合

MapReduce概述(是一個做計算的程式)

  • MapReduce是一種分布式(一個計算邏輯,多個機器去實作)計算模型,由Google提出,主要用于搜索領域,解決海量資料的計算問題.
  • MapReduce是分布式運行的,由兩個階段組成:Map和Reduce,Map階段是一個獨立的程式,有很多個節點同時運行,每個節點處理一部分資料,Reduce階段是一個獨立的程式,有很多個節點同時運行,每個節點處理一部分資料【在這先把reduce理解為一個單獨的聚合程式即可】,
  • MapReduce框架都有默認實作,用戶只需要覆寫(重寫)map()和reduce()兩個函式,即可實作分布式計算,非常簡單,
  • 這兩個函式的形參和回傳值都是<key、value>,使用的時候一定要注意構造<k,v>,

MapReduce原理

這里map階段和reduce階段的資料格式都有四個
map的前兩個保證了資料進來的格式,后兩個保證了資料出去的格式(也就是進到reduce的格式)
reduce的前兩個保證了資料進來的格式,后兩個保證了資料出去的格式(出去到hdfs中)
block塊的切分是hdfs切分的
split是mapreduce切分的(默認情況下,兩個的大小一致,都是128MB允許溢位1.1
一個split就對應這一個Mapper Task
在這里插入圖片描述
先拋開中間的shuffle不看,程序大致是這樣的:(這里面讀取資料用的是偏移量,是因為從hdfs讀取的是檔案,文本形式存盤的,key指的就是變數,value指的就是一行一行的資料)
先切分,
再傳到map階段,一個block塊對應一個map,
map里面先做一個簡單的計算,給需要做計數的單詞打上標記
在這里插入圖片描述

Shuffle程序

在這里插入圖片描述
在記憶體中做計算
map階段的shuffle
1.先從hdfs上讀取資料(hdfs自動切分,mapreduce切分獲取資料
每一個切片對應一個map task)
在這里插入圖片描述

2.生成map task
在這里插入圖片描述

3.記憶體環形緩沖區(記憶體不可能都給用完,所以有一個默認大小100MB
100MB有一個溢位比例,達到閾值0.8,會溢寫到磁盤,會把80MB寫入
到磁盤,剩下的20MB在記憶體中做計算;剩下的20也不會一致在記憶體中;
當達到閾值0.8,或者map task計算完畢之后(計算完畢也沒必要在記憶體了)
都會溢寫到磁盤)
在這里插入圖片描述

4.三個就是 磁區(達到閾值之后會再進行一個劃分)、
排序(按照當前資料某一類放在一起)、溢寫到磁盤
在這里插入圖片描述

5.三個箭頭匯總了:對第四步的小磁區檔案進行整合
在這里插入圖片描述
比方說這里有許多小磁區的資料,對這些小磁區的資料做一個聚合,方便后面的計算
在這里插入圖片描述
6.發送,資料發送到reduce
在這里插入圖片描述
reduce階段的shuffle
7.合并(將多個map task上的資料進行一個合并)
(可能有相同資料分發到同一個reduce,
合并之后再發送到reduce task,
資料來源可能在記憶體,可能在磁盤)(這時候的資料格式是hadoop 1)
在這里插入圖片描述

8.同一個key進入到同一個reduce;map階段有的資料可能在記憶體可能在磁盤,先做一個合并再發送
在這里插入圖片描述

在這里插入圖片描述

9.reduce合并計算結果(同一個key進入到一個reduce結果就出來了)
在這里插入圖片描述

10.合并結果放到hdfs
在這里插入圖片描述
匯總
在這里插入圖片描述

MapReduce執行程序-map階段

  • 1.1 框架使用InputFormat類的子類把輸入檔案(夾)劃分為很多InputSplit,默認,每個HDFS的block對應一個InputSplit,通過RecordReader類,把每個InputSplit決議成一個個<k1,v1>,默認,框架對每個InputSplit中的每一行,決議成一個<k1,v1>,
  • 1.2 框架呼叫Mapper類中的map(…)函式,map函式的形參是<k1,v1>對,輸出是<k2,v2>對,一個InputSplit對應一個map task,程式員可以覆寫map函式,實作自己的邏輯,
  • 1.3(假設reduce存在)框架對map輸出的<k2,v2>進行磁區,不同的磁區中的<k2,v2>由不同的reduce task處理,默認只有1個磁區,
    (假設reduce不存在)框架對map結果直接輸出到HDFS中,
  • 1.4 (假設reduce存在)框架對每個磁區中的資料,按照k2進行排序、分組,分組指的是相同k2的v2分成一個組,注意:分組不會減少<k2,v2>數量,
  • 1.5 (假設reduce存在,可選)在map節點,框架可以執行reduce歸約,
  • 1.6 (假設reduce存在)框架會對map task輸出的<k2,v2>寫入到linux 的磁盤檔案中,
    至此,整個map階段結束

MapReduce執行程序-reduce階段

  • 2.1 框架對多個map任務的輸出,按照不同的磁區,通過網路copy到不同的reduce節點,這個程序稱作shuffle,
  • 2.2 框架對reduce端接收的[map任務輸出的]相同磁區的<k2,v2>資料進行合并、排序、分組,
  • 2.3 框架呼叫Reducer類中的reduce方法,reduce方法的形參是<k2,{v2…}>,輸出是<k3,v3>,一個<k2,{v2…}>呼叫一次reduce函式,程式員可以覆寫reduce函式,實作自己的邏輯,
  • 2.4 框架把reduce的輸出保存到HDFS中,

shell端實作mapreduce

準備資料

在這里插入圖片描述
由于mapreduce處理的資料應該來源于hdfs,所以在hdfs上創建資料傳入的路徑,也就是將剛才的資料傳到hdfs中
在這里插入圖片描述

實作mapreduce

在這里插入圖片描述
在這里插入圖片描述

值得注意的是這里的wordcount是自己取的名字,/word是hdfs已經存在的路徑,/output是hdfs中不存在的路徑

開始執行

在這里插入圖片描述

查看結果

在這里插入圖片描述

Java操作mapreduce

package com.shujia.hadoop;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

import java.io.IOException;

public class Demo01WordCount {

    //統計檔案中單詞的個數
//重寫(覆寫)mapreduce中的map()和reduce()方法
//map類;第一對kv是決定資料輸入的格式,第二對kv決定資料輸出的格式
//第一個引數指的是偏移量,第二個引數指的是String型別,用的是文本形式
//后面兩個引數就是(hadoop,1)這樣的形式,最后一個引數用Integer也行
    public static class WCMapper extends Mapper<LongWritable,Text,Text,LongWritable> {
        /*
        map階段資料是一行一行過來的
        每一行資料都需要執行代碼
         */
        @Override
        //這里面三個引數,前面兩個引數可以理解為輸入的格式,第三個引數是輸出的資料(出去和進來的格式一模一樣)
        protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
            //通過context輸出Text  格式:(一整行資料,1)
            String line = value.toString();
            context.write(new Text(line),new LongWritable(1));
        }
    }

    //前兩個引數是map階段傳入的資料格式,后面兩個引數是輸出的格式
    public static class WCReduce extends Reducer<Text,LongWritable,Text,LongWritable>{
        //這里面的值變成了一個迭代器(因為資料傳來的時候是【hadoop,1】,【hadoop,1】這樣的形式,但是只要一個hadoop就行了)
        //迭代器里面就是傳入的所有v的值
    /*
        reduce  聚合程式(有幾個key就跑幾次,意思就是檔案里面假如有一個hadoop,一個java,一個spark,那就需要跑三次)
        默認是一個節點
        key:每一個單詞
        values:map端 當前k所對應的所有v
         */
        //這里面要做的就是整合最后的結果(將迭代器中的資料相加)
        @Override
        protected void reduce(Text key, Iterable<LongWritable> values, Context context) throws IOException, InterruptedException {
            long sum = 0L;
            for (LongWritable value : values) {
                sum+=value.get();
            }
            //把計算結果輸出到hdfs
            context.write(key,new LongWritable(sum));
        }
    }


    /*
    是當前mapreduce的入口
    用來構建mapreduce程式(資料從哪來等等)
     */
    public static void main(String[] args) throws Exception {
        Job job = Job.getInstance();
        //指定job名稱
        job.setJobName("單詞統計");
        //構建mr,指定當前main所在類名(識別具體的類)
        job.setJarByClass(Demo01WordCount.class);

        //指定map端類
        job.setMapperClass(WCMapper.class);
        //指定輸出的kv型別
        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(LongWritable.class);

        //指定reduce端類
        job.setReducerClass(WCReduce.class);
        //指定輸出的kv型別
        job.setReducerClass(WCReduce.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(LongWritable.class);

        //指定輸入路徑
        Path in = new Path("/word");
        FileInputFormat.addInputPath(job,in);
        //指定輸出路徑
        Path out = new Path("/output");
        //如果路徑存在,洗掉
        FileSystem fs = FileSystem.get(new Configuration());
        if(fs.exists(out)){
            fs.delete(out,true);
        }
        FileOutputFormat.setOutputPath(job,out);

        //啟動任務
        job.waitForCompletion(true);
        System.out.println("mr正在執行");

        //hadoop jar hadoop-1.0-SNAPSHOT.jar com/shujia/hadoop/Demo01WordCount /word /output
    }
}

執行并獲得結果
在這里插入圖片描述
在這里插入圖片描述

Java操作mapreduce,指定reduce任務數

在運行mr任務的時候,默認reduce執行一個,可以通過引數進行修改
job.setNumReduceTasks(2)

package com.shujia.hadoop;

import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat;

import javax.security.auth.login.Configuration;
import java.io.FilterOutputStream;
import java.io.IOException;

public class Demo03SexSum {

    public static class WCMapper extends Mapper<LongWritable,Text,Text,LongWritable>{
        @Override
        protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
            String line = value.toString();
            String[] split = line.split(",");
            String sex = split[3];
            context.write(new Text(sex),new LongWritable(1));
        }
    }

    public static class WCReduce extends Reducer<Text,LongWritable,Text,LongWritable>{
        @Override
        protected void reduce(Text key, Iterable<LongWritable> values, Context context) throws IOException, InterruptedException {
            long sum=0L;
            for (LongWritable value : values) {
                sum+=value.get();
            }
            context.write(key,new LongWritable(sum));
        }
    }


    public static void main(String[] args) throws Exception{

        Job job = Job.getInstance();
        job.setNumReduceTasks(2);

        job.setJobName("統計不同性別人數");
        job.setJarByClass(Demo03SexSum.class);

        job.setMapperClass(WCMapper.class);
        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(LongWritable.class);

        job.setReducerClass(WCReduce.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(LongWritable.class);

        FileInputFormat.addInputPath(job,new Path("/word"));
        Path out = new Path("/out");
        FileSystem fs = FileSystem.get(new org.apache.hadoop.conf.Configuration());
        if(fs.exists(out)){
            fs.delete(out,true);
        }
        FileOutputFormat.setOutputPath(job,out);

        job.waitForCompletion(true);

        //com.shujia.hadoop.Demo03SexSum
    }
}

mapreduce程式關聯兩張表(實作join操作)

package com.shujia.hadoop;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;

import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.FileSplit;
//import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

import java.io.IOException;
import java.util.ArrayList;

/*
students.txt
1500100001,施笑槐,22,女,文科六班
1500100002,呂金鵬,24,男,文科六班
1500100003,單樂蕊,22,女,理科六班
1500100004,葛德曜,24,男,理科三班
1500100005,宣谷芹,22,女,理科五班

score.txt
1500100001,1000001,98
1500100001,1000002,5
1500100001,1000003,137
1500100001,1000004,29
1500100001,1000005,85
 */
public class Demo05Join {

    public static class JoinMapper extends Mapper<LongWritable,Text,Text,Text>{
        @Override
        protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
            //1.獲取資料的路徑InputSplit
            //context上面是hdfs,下面如果有reduce就是reduce,沒有就是hdfs
            InputSplit inputSplit = context.getInputSplit();
            FileSplit fs = (FileSplit)inputSplit;
            String url = fs.getPath().toString();
            //2.判斷
            if (url.contains("students")){//true:當前的資料為students.txt
                String id = value.toString().split(",")[0];
                //為了方便reduce資料的操作,針對不同的資料 打上一個標簽
                String line = "*"+value.toString();
                context.write(new Text(id),new Text(line));
            }else {
                //學號作為key,是兩張表的關聯條件
                String id = value.toString().split(",")[0];
                String line = "#"+value.toString();
                context.write(new Text(id),new Text(line));
            }
        }
    }

    public static class JoinReduce extends Reducer<Text,Text,Text,NullWritable>{
        @Override
        protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {

            ArrayList<String> scores = new ArrayList<String>();
            String stuinfo = "";
            for (Text value : values) {
                String line = value.toString();
                if (line.startsWith("*")){
                    stuinfo = line.substring(1);
                }else {
                    scores.add(line.substring(1));
                }
            }

            //資料拼接,兩張表的拼接
//            for (String score : scores) {
//                String subject = score.split(",")[1];
//                String sc = score.split(",")[2];
//                String info = stuinfo+","+subject+","+sc;
//                context.write(new Text(info),NullWritable.get());
//            }

            //成績求和,兩張表的拼接
            long sum = 0L;
            for (String score : scores) {
                Integer sc = Integer.parseInt(score.split(",")[2]);
                sum+=sc;
            }
            String end=stuinfo+","+sum;
            context.write(new Text(end),NullWritable.get());

        }
    }


    public static void main(String[] args) throws Exception{

        Job job = Job.getInstance();
        job.setJarByClass(Demo05Join.class);
        job.setJobName("Join操作");

        job.setMapperClass(JoinMapper.class);
        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(Text.class);

        job.setReducerClass(JoinReduce.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(NullWritable.class);

        //路徑
        FileInputFormat.addInputPath(job,new Path("/word"));
        Path out = new Path("/out");
        FileSystem fs = FileSystem.get(new Configuration());
        if (fs.exists(out)){
            fs.delete(out,true);
        }
        FileOutputFormat.setOutputPath(job,out);
        job.waitForCompletion(true);
        System.out.println("程式正在執行");

    }
}

介于map端與reduce端之間的Combine

  • combiner發生在map端的reduce操作,
    作用是減少map端的輸出,減少shuffle程序中網路傳輸的資料量,提高作業的執行效率,
  • combiner僅僅是單個map task的reduce,沒有對全部map的輸出做reduce,
    如果不用combiner,那么,所有的結果都是reduce完成,效率會相對低下,使用combiner,先完成的map會在本地聚合,提升速度,
    注意:Combiner的輸出是Reducer的輸入,Combiner絕不能改變最終的計算結果,所以,Combine適合于等冪操作,比如累加,最大值等,求平均數不適合

如圖,中間的這一部分就是combine,提高效率一眼可見
在這里插入圖片描述

mapreduce程式實作combinue預聚合

package com.shujia.hadoop;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;

import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

import java.io.IOException;

//LongWritable 偏移量 long,表示該行在檔案中的位置
public class Demo06Combine {
    public static class CombineMapper extends Mapper<LongWritable,Text,Text,IntWritable>{
        @Override
        protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
            String line = value.toString();
            String sex = line.split(",")[3];
            context.write(new Text(sex),new IntWritable(1));
        }
    }

    //預聚合在reduce之前 map端之后
    public static class Combine extends Reducer<Text,IntWritable,Text,IntWritable>{
        @Override
        protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
            Integer sum=0;
            for (IntWritable value : values) {
                sum+=value.get();
            }
            context.write(key,new IntWritable(sum));
        }
    }

    public static class CombineReduce extends Reducer<Text,IntWritable,Text,IntWritable>{
        @Override
        protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
            Integer sum=0;
            for (IntWritable value : values) {
                sum+=value.get();
            }
            context.write(key,new IntWritable(sum));
        }
    }

    public static void main(String[] args) throws Exception{
        Job job = Job.getInstance();
        job.setNumReduceTasks(2);
        job.setJobName("假如Combine做性別統計");
        job.setJarByClass(Demo06Combine.class);
        job.setMapperClass(CombineMapper.class);
        job.setMapOutputKeyClass(Text.class);
        job.setMapOutputValueClass(IntWritable.class);

        job.setReducerClass(CombineReduce.class);
        job.setOutputKeyClass(Text.class);
        job.setOutputValueClass(IntWritable.class);

        FileInputFormat.addInputPath(job,new Path("/word"));
        Path path = new Path("/out");
        FileSystem fs = FileSystem.get(new Configuration());
        if (fs.exists(path)){
            fs.delete(path,true);
        }
        FileOutputFormat.setOutputPath(job,path);
        job.waitForCompletion(true);


    }
}

感謝閱讀,我是啊帥和和,一位大資料專業大四學生,祝你快樂,

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/302461.html

標籤:其他

上一篇:基于Echarts+HTML5可視化資料大屏展示—電子商務公共服務平臺大資料中心

下一篇:一篇入門分布式事務

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • 網閘典型架構簡述

    網閘架構一般分為兩種:三主機的三系統架構網閘和雙主機的2+1架構網閘。 三主機架構分別為內端機、外端機和仲裁機。三機無論從軟體和硬體上均各自獨立。首先從硬體上來看,三機都用各自獨立的主板、記憶體及存盤設備。從軟體上來看,三機有各自獨立的作業系統。這樣能達到完全的三機獨立。對于“2+1”系統,“2”分為 ......

    uj5u.com 2020-09-10 02:00:44 more
  • 如何從xshell上傳檔案到centos linux虛擬機里

    如何從xshell上傳檔案到centos linux虛擬機里及:虛擬機CentOs下執行 yum -y install lrzsz命令,出現錯誤:鏡像無法找到軟體包 前言 一、安裝lrzsz步驟 二、上傳檔案 三、遇到的問題及解決方案 總結 前言 提示:其實很簡單,往虛擬機上安裝一個上傳檔案的工具 ......

    uj5u.com 2020-09-10 02:00:47 more
  • 一、SQLMAP入門

    一、SQLMAP入門 1、判斷是否存在注入 sqlmap.py -u 網址/id=1 id=1不可缺少。當注入點后面的引數大于兩個時。需要加雙引號, sqlmap.py -u "網址/id=1&uid=1" 2、判斷文本中的請求是否存在注入 從文本中加載http請求,SQLMAP可以從一個文本檔案中 ......

    uj5u.com 2020-09-10 02:00:50 more
  • Metasploit 簡單使用教程

    metasploit 簡單使用教程 浩先生, 2020-08-28 16:18:25 分類專欄: kail 網路安全 linux 文章標簽: linux資訊安全 編輯 著作權 metasploit 使用教程 前言 一、Metasploit是什么? 二、準備作業 三、具體步驟 前言 Msfconsole ......

    uj5u.com 2020-09-10 02:00:53 more
  • 游戲逆向之驅動層與用戶層通訊

    驅動層代碼: #pragma once #include <ntifs.h> #define add_code CTL_CODE(FILE_DEVICE_UNKNOWN,0x800,METHOD_BUFFERED,FILE_ANY_ACCESS) /* 更多游戲逆向視頻www.yxfzedu.com ......

    uj5u.com 2020-09-10 02:00:56 more
  • 北斗電力時鐘(北斗授時服務器)讓網路資料更精準

    北斗電力時鐘(北斗授時服務器)讓網路資料更精準 北斗電力時鐘(北斗授時服務器)讓網路資料更精準 京準電子科技官微——ahjzsz 近幾年,資訊技術的得了快速發展,互聯網在逐漸普及,其在人們生活和生產中都得到了廣泛應用,并且取得了不錯的應用效果。計算機網路資訊在電力系統中的應用,一方面使電力系統的運行 ......

    uj5u.com 2020-09-10 02:01:03 more
  • 【CTF】CTFHub 技能樹 彩蛋 writeup

    ?碎碎念 CTFHub:https://www.ctfhub.com/ 筆者入門CTF時時剛開始刷的是bugku的舊平臺,后來才有了CTFHub。 感覺不論是網頁UI設計,還是題目質量,賽事跟蹤,工具軟體都做得很不錯。 而且因為獨到的金幣制度的確讓人有一種想去刷題賺金幣的感覺。 個人還是非常喜歡這個 ......

    uj5u.com 2020-09-10 02:04:05 more
  • 02windows基礎操作

    我學到了一下幾點 Windows系統目錄結構與滲透的作用 常見Windows的服務詳解 Windows埠詳解 常用的Windows注冊表詳解 hacker DOS命令詳解(net user / type /md /rd/ dir /cd /net use copy、批處理 等) 利用dos命令制作 ......

    uj5u.com 2020-09-10 02:04:18 more
  • 03.Linux基礎操作

    我學到了以下幾點 01Linux系統介紹02系統安裝,密碼啊破解03Linux常用命令04LAMP 01LINUX windows: win03 8 12 16 19 配置不繁瑣 Linux:redhat,centos(紅帽社區版),Ubuntu server,suse unix:金融機構,證券,銀 ......

    uj5u.com 2020-09-10 02:04:30 more
  • 05HTML

    01HTML介紹 02頭部標簽講解03基礎標簽講解04表單標簽講解 HTML前段語言 js1.了解代碼2.根據代碼 懂得挖掘漏洞 (POST注入/XSS漏洞上傳)3.黑帽seo 白帽seo 客戶網站被黑帽植入劫持代碼如何處理4.熟悉html表單 <html><head><title>TDK標題,描述 ......

    uj5u.com 2020-09-10 02:04:36 more
最新发布
  • 2023年最新微信小程式抓包教程

    01 開門見山 隔一個月發一篇文章,不過分。 首先回顧一下《微信系結手機號資料庫被脫庫事件》,我也是第一時間得知了這個訊息,然后跟蹤了整件事情的經過。下面是這起事件的相關截圖以及近日流出的一萬條資料樣本: 個人認為這件事也沒什么,還不如關注一下之前45億快遞資料查詢渠道疑似在近日復活的訊息。 訊息是 ......

    uj5u.com 2023-04-20 08:48:24 more
  • web3 產品介紹:metamask 錢包 使用最多的瀏覽器插件錢包

    Metamask錢包是一種基于區塊鏈技術的數字貨幣錢包,它允許用戶在安全、便捷的環境下管理自己的加密資產。Metamask錢包是以太坊生態系統中最流行的錢包之一,它具有易于使用、安全性高和功能強大等優點。 本文將詳細介紹Metamask錢包的功能和使用方法。 一、 Metamask錢包的功能 數字資 ......

    uj5u.com 2023-04-20 08:47:46 more
  • vulnhub_Earth

    前言 靶機地址->>>vulnhub_Earth 攻擊機ip:192.168.20.121 靶機ip:192.168.20.122 參考文章 https://www.cnblogs.com/Jing-X/archive/2022/04/03/16097695.html https://www.cnb ......

    uj5u.com 2023-04-20 07:46:20 more
  • 從4k到42k,軟體測驗工程師的漲薪史,給我看哭了

    清明節一過,盲猜大家已經無心上班,在數著日子準備過五一,但一想到銀行卡里的余額……瞬間心情就不美麗了。最近,2023年高校畢業生就業調查顯示,本科畢業月平均起薪為5825元。調查一出,便有很多同學表示自己又被平均了。看著這一資料,不免讓人想到前不久中國青年報的一項調查:近六成大學生認為畢業10年內會 ......

    uj5u.com 2023-04-20 07:44:00 more
  • 最新版本 Stable Diffusion 開源 AI 繪畫工具之中文自動提詞篇

    🎈 標簽生成器 由于輸入正向提示詞 prompt 和反向提示詞 negative prompt 都是使用英文,所以對學習母語的我們非常不友好 使用網址:https://tinygeeker.github.io/p/ai-prompt-generator 這個網址是為了讓大家在使用 AI 繪畫的時候 ......

    uj5u.com 2023-04-20 07:43:36 more
  • 漫談前端自動化測驗演進之路及測驗工具分析

    隨著前端技術的不斷發展和應用程式的日益復雜,前端自動化測驗也在不斷演進。隨著 Web 應用程式變得越來越復雜,自動化測驗的需求也越來越高。如今,自動化測驗已經成為 Web 應用程式開發程序中不可或缺的一部分,它們可以幫助開發人員更快地發現和修復錯誤,提高應用程式的性能和可靠性。 ......

    uj5u.com 2023-04-20 07:43:16 more
  • CANN開發實踐:4個DVPP記憶體問題的典型案例解讀

    摘要:由于DVPP媒體資料處理功能對存放輸入、輸出資料的記憶體有更高的要求(例如,記憶體首地址128位元組對齊),因此需呼叫專用的記憶體申請介面,那么本期就分享幾個關于DVPP記憶體問題的典型案例,并給出原因分析及解決方法。 本文分享自華為云社區《FAQ_DVPP記憶體問題案例》,作者:昇騰CANN。 DVPP ......

    uj5u.com 2023-04-20 07:43:03 more
  • msf學習

    msf學習 以kali自帶的msf為例 一、msf核心模塊與功能 msf模塊都放在/usr/share/metasploit-framework/modules目錄下 1、auxiliary 輔助模塊,輔助滲透(埠掃描、登錄密碼爆破、漏洞驗證等) 2、encoders 編碼器模塊,主要包含各種編碼 ......

    uj5u.com 2023-04-20 07:42:59 more
  • Halcon軟體安裝與界面簡介

    1. 下載Halcon17版本到到本地 2. 雙擊安裝包后 3. 步驟如下 1.2 Halcon軟體安裝 界面分為四大塊 1. Halcon的五個助手 1) 影像采集助手:與相機連接,設定相機引數,采集影像 2) 標定助手:九點標定或是其它的標定,生成標定檔案及內參外參,可以將像素單位轉換為長度單位 ......

    uj5u.com 2023-04-20 07:42:17 more
  • 在MacOS下使用Unity3D開發游戲

    第一次發博客,先發一下我的游戲開發環境吧。 去年2月份買了一臺MacBookPro2021 M1pro(以下簡稱mbp),這一年來一直在用mbp開發游戲。我大致分享一下我的開發工具以及使用體驗。 1、Unity 官網鏈接: https://unity.cn/releases 我一般使用的Apple ......

    uj5u.com 2023-04-20 07:40:19 more