China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten

China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten
China's 8 most excellent flour varieties have finally been sorted out, take a look, how many have you eaten

On a sunny weekend, my friend Xiao Li and I met up to drink tea and chat in a quaint teahouse. In the corner of the teahouse, a long wooden table is set up with a variety of delicate pastries. We sipped on sweet tea and snacks while talking about our dietary preferences.

Just as I was indulging in this relaxed atmosphere, Xiao Li suddenly approached me mysteriously and whispered, "You know what? There are eight particularly good varieties of flour in China, each with its own unique taste and use. I've always wanted to try making a variety of delicacies with this flour, but I never found the opportunity. ”

When I heard this, I was immediately interested. As someone who has a soft spot for pasta, I naturally have a very high desire for good flour. So, I asked curiously, "Oh? Tell me which eight kinds of flour they are. ”

Xiao Li smiled proudly, took out a sorted list from his pocket, and handed it to me. I took it and looked at it, and saw that the names and characteristics of the eight types of flour were listed on it:

  1. Hebei stone mill flour: This flour adopts the traditional stone grinding process, which retains the original taste of wheat and has a mellow taste, which is suitable for making all kinds of pasta.
  2. Henan high-gluten flour: Made from high-quality wheat, it has strong gluten, and is suitable for making pasta that needs to be stretched and elastic, such as noodles, dumpling wrappers, etc.
  3. Shandong all-purpose flour: The gluten is moderate, easy to knead and ferment, and is suitable for making fermented pasta such as steamed bread and steamed buns.
  4. Anhui rye flour: using rye as raw material, it is rich in nutrients and has a unique taste, which is suitable for making healthy foods such as whole wheat bread.
  5. Shaanxi buckwheat flour: Using buckwheat as raw material, it has a unique fragrance and taste, which is suitable for making special pasta such as buckwheat noodles.
  6. Sichuan rice flour special flour: specially developed for making rice noodles, the taste is delicate and smooth, is an essential raw material for making Sichuan rice noodles.
  7. Xinjiang wheat flour: produced in Xinjiang high-quality wheat, high protein content, strong gluten, suitable for making a variety of pasta and baked goods.
  8. Tibetan barley flour: made from highland barley, it is rich in dietary fiber and trace elements, and has a unique taste and nutritional value.

I looked at the list and felt the urge to try it. I raised my head and said to Xiao Li, "These flours sound very good, and I want to try using them to make delicious food." Still, do you know where to buy these flours? ”

Xiao Li smiled proudly and said, "Then you asked the right person." I made a special inquiry and found that the flour is available in souvenir shops and online shopping malls all over the country. We can shop some online together and come back and try it out. ”

So, we decided to buy these flours online and start our culinary adventure. In the days that followed, we tried to make a wide variety of pasta and baked goods from this flour. Each flour brings a different taste and experience that blows our minds.

In the process of making, I deeply appreciated the characteristics and uses of different flours. For example, the mellow taste of Hebei stone-ground flour gave me a deeper understanding of traditional pasta; The strong gluten of Xinjiang wheat flour makes me more comfortable when making bread. Every attempt has given us a deeper love and pursuit of food.

Over time, we have become lovers of flour delicacies. Not only do we try our hand at making a variety of delicacies at home, but we also invite friends to share our results. Whenever our friends taste the pasta we have made with our hearts, they are full of praise and want to try making food with these flours.

In the process, I gradually understood the meaning of "8 kinds of flour that are particularly good in China". These flours not only represent the characteristic food culture of various parts of China, but also show the love and pursuit of food by the Chinese people. By trying out the process of making delicious food from these flours, I not only gained knowledge and skills, but also gained endless pleasure and satisfaction.

Nowadays, whenever I walk into the kitchen to prepare pasta, I think of these eight particularly good flours. They have become one of my cooking secrets, allowing me to swim freely in the world of pasta. I believe that in the future, I will continue to explore more secrets of food and enjoy the joy of cooking.

China tidy up flour

HashMap的實作原理,以及在JDK1.7和1.8的差別

1.JDK1.7    

    HashMap是Java中大家最常用的一個map實作類,其為鍵值對也就是key-value的形式。他的資料結構則是采用的位桶和連結清單相結合的形式完成了,即拉鍊法。具體如下圖所示:

    HashMap裡面存儲的是靜态内部類Entry的對象,這個對象其實也是一個key-value的結構。以下是Entry的源碼:

static class Entry<K,V> implements Map.Entry<K,V> {             final K key;             V value;             /** 指向下一個元素的引用 */             Entry<K,V> next;             int hash;             /**              * 構造方法為Entry指派              */             Entry(int h, K k, V v, Entry<K,V> n) {                 value = v;                 next = n;                 key = k;                 hash = h;             }             ...             ...      }      

1.1、HashMap的存取過程

// 存儲時:

int hash = key.hashCode(); // 1個key對應一個固定的hash值

int index = hash % Entry[].length;

Entry[index] = value;

// 取值時:

int hash = key.hashCode();

return Entry[index];

    如果兩個key通過int index = hash % Entry[].length得到了相同的index,就會跟在之間那個entry連接配接在後面,也就是按照順序存儲在後面的連結清單中,也就是解決hash沖突的拉鍊法。

1.2、HashMap的get() 方法

    由于可能會出現的Hash沖突,是以java采用了鍊位址法來處理沖突,首先會通過hashcode來查到對應的Entry對象,如果找到了之後發現這個連結清單上連結了多個Entry對象,則再調用equals方法對value進行逐一比較。但是如果當連結清單過長後,HashMap就會自動将連結清單轉化為紅黑樹,以提高查找效率。

    當連結清單數組的容量超過初始長度的0.75之後,再散列就會将該連結清單再擴大2倍,建立一個新的2倍長的連結清單,然後再講資料逐個搬遷複制到新連結清單中去。

1.3、擴容時調用resize()

    其預設的大小是16,一旦>0.75*16之後,就會調用resize()進行擴容,擴容非常耗時,是以如果需要儲存較多的話,最好在建立一開始就制定好HashMap的初始容量。

2.JDK1.8

    采用的是位桶數組,其底層采用紅黑樹。

  1. transient Node<k,v>[] table;//存儲(位桶)的數組</k,v>  

    預設的加載因子是0.75,如果不擴容,連結清單就會越來越長,查找起來因為要逐一equals進行比對,是以會慢很多。當然現在因為又采用了紅黑樹,相對來說比jdk1.7要好一些。擴容之後,會将原本的連結清單數組中的每個連結清單分為奇偶兩個,分别挂在新連結清單的數組下的對應的散列位置。減少查找時間,提高效率。

2.1 jdk1.8的最大差別就在于底層的紅黑樹政策。

    相對于JDK1.7,

HashMap處理hash沖突時,會首先存放在連結清單中去,

但是一旦連結清單中的資料較多(即>8個)之後,就會轉用紅黑樹來進行存儲,優化存儲速度。

紅黑樹O(lgn)。如果是連結清單。一定是O(n)。

HashMap在jdk1.8之後引入了紅黑樹的概念,表示若桶中連結清單元素超過8時,會自動轉化成紅黑樹;若桶中元素小于等于6時,樹結構還原成連結清單形式。

原因:

紅黑樹的平均查找長度是log(n),長度為8,查找長度為log(8)=3,連結清單的平均查找長度為n/2,當長度為8時,平均查找長度為8/2=4,這才有轉換成樹的必要;連結清單長度如果是小于等于6,6/2=3,雖然速度也很快的,但是轉化為樹結構和生成樹的時間并不會太短。

還有選擇6和8的原因是:

中間有個內插補點7可以防止連結清單和樹之間頻繁的轉換。假設一下,如果設計成連結清單個數超過8則連結清單轉換成樹結構,連結清單個數小于8則樹結構轉換成連結清單,如果一個HashMap不停的插入、删除元素,連結清單個數在8左右徘徊,就會頻繁的發生樹轉連結清單、連結清單轉樹,效率會很低。