如何利用自動吸水的聰明盆栽產生新鮮空氣

通達人驛站: 如何利用自動吸水的聰明盆栽產生新鮮空氣

如何利用自動吸水的聰明盆栽產生新鮮空氣

我一直覺得辦公室的空氣不夠好,直到我看到TED和大人物介紹的內容後,我才發現個人其是有能力在個人空間做些改善的。

這篇文章就是融合了TED影片和一篇文章的結論後,身體力行的實際行動,希望可以促使大家也可以嘗試做些改變。


TED-如何產生新鮮空氣(How To Grow Fresh Air)

研究員 Kamal Meattle 講解如何在不同的空間利用不同的常見室內植物:在起居室種黃椰子(Areca Palm)、在臥室種虎尾蘭(Mother-in-law’s Tongue)、在辦公室黃金葛(Money Plant),以改善室內空氣品質。

How do I compare two images & recognize the pattern in an image?

c# – How do I compare two images & recognize the pattern in an image? – Stack Overflow

You might be looking for this

System.Drawing.Bitmap sourceImage = (Bitmap)Bitmap.FromFile(@"C:\SavedBMPs\1.jpg"); System.Drawing.Bitmap template = (Bitmap)Bitmap.FromFile(@"C:\SavedBMPs\2.jpg"); // create template matching algorithm’s instance // (set similarity threshold to 92.5%)

       ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching(0.921f);
            // find all matchings with specified above similarity

            TemplateMatch[] matchings = tm.ProcessImage(sourceImage, template);
            // highlight found matchings

       BitmapData data = sourceImage.LockBits(
            new Rectangle(0, 0, sourceImage.Width, sourceImage.Height),
            ImageLockMode.ReadWrite, sourceImage.PixelFormat);
        foreach (TemplateMatch m in matchings)
        {

                Drawing.Rectangle(data, m.Rectangle, Color.White);

            MessageBox.Show(m.Rectangle.Location.ToString());
            // do something else with matching
        }
        sourceImage.UnlockBits(data);

I warn you it is quite slow takes around 6 seconds to process image of 1024×768 finding in it pciture with the size of 50×50.enter code here

c# WebBrowser开发参考资料 – love_may555的专栏 – 博客频道 – CSDN.NET

其次,如果我们想执行一段Web页面中原本没有的脚本,该怎么做呢?这次.Net的类没有提供,看来还要依靠COM了。IHTMLWindow2可以将任意的字符

串作为脚本代码来执行。

string scriptline01 = @"function ShowPageInfo() {“;

string scriptline02 = @"      var numLinks = document.links.length; “;

string scriptline03 = @"      var numForms = document.forms.length; “;

string scriptline04 = @"      var numImages = document.images.length; “;

string scriptline05 = @"      var numScripts = document.scripts.length; “;

string scriptline06 = @"      alert(‘网页的统计结果:/r/n链接数:’ + numLinks + “;

string scriptline07 = @"         ‘/r/n表单数:’ + numForms + “;

string scriptline08 = @"         ‘/r/n图像数:’ + numImages + “;

string scriptline09 = @"         ‘/r/n脚本数:’ + numScripts);}";

string scriptline10 = @"ShowPageInfo();";

string strScript = scriptline01 + scriptline02 + scriptline03 + scriptline04 + scriptline05 +

                    scriptline06 + scriptline07 + scriptline08 + scriptline09 + scriptline10;

IHTMLWindow2 win = (IHTMLWindow2)webBrowser.Document.Window.DomWindow;

win.execScript(strScript, “Javascript");http://www.xmlasp.net/n1670c13.aspx

How do I compare two images & recognize the pattern in an image?

c# – How do I compare two images & recognize the pattern in an image? – Stack Overflow

You might be looking for this

System.Drawing.Bitmap sourceImage = (Bitmap)Bitmap.FromFile(@"C:\SavedBMPs\1.jpg"); System.Drawing.Bitmap template = (Bitmap)Bitmap.FromFile(@"C:\SavedBMPs\2.jpg"); // create template matching algorithm’s instance // (set similarity threshold to 92.5%)

       ExhaustiveTemplateMatching tm = new ExhaustiveTemplateMatching(0.921f);
            // find all matchings with specified above similarity

            TemplateMatch[] matchings = tm.ProcessImage(sourceImage, template);
            // highlight found matchings

       BitmapData data = sourceImage.LockBits(
            new Rectangle(0, 0, sourceImage.Width, sourceImage.Height),
            ImageLockMode.ReadWrite, sourceImage.PixelFormat);
        foreach (TemplateMatch m in matchings)
        {

                Drawing.Rectangle(data, m.Rectangle, Color.White);

            MessageBox.Show(m.Rectangle.Location.ToString());
            // do something else with matching
        }
        sourceImage.UnlockBits(data);

I warn you it is quite slow takes around 6 seconds to process image of 1024×768 finding in it pciture with the size of 50×50.enter code here