image

 1: static void Main(string[] args)
 2: {
 3: var v1 = f1();
 4: var avg1 = v1 / 3;
 5: Console.WriteLine($"{avg1.GetType().Name}, avg: {avg1}");
 6:  
 7: var v2 = f2();
 8: var avg2 = v2 / 3;
 9: Console.WriteLine($"{avg2.GetType().Name}, avg: {avg2}");
 10:  
 11: var v3 = f3();
 12: var avg3 = v3 / 3;
 13: Console.WriteLine($"{avg3.GetType().Name}, avg: {avg3}");
 14:  
 15: var v4 = f4();
 16: var avg4 = v4 / 3;
 17: Console.WriteLine($"{avg4.GetType().Name}, avg: {avg4}");
 18:  
 19: var v5 = f5();
 20: var avg5 = v5 / 3;
 21: Console.WriteLine($"{avg5.GetType().Name}, avg: {avg5}");
 22: Console.ReadKey();
 23: }
 24: static double f1()
 25: {
 26: double x = 100;
 27: return x;
 28: }
 29: static float f2()
 30: {
 31: float x = 100;
 32: return x;
 33: }
 34: static decimal f3()
 35: {
 36: decimal x = 100;
 37: return x;
 38: }
 39: static long f4()
 40: {
 41: long x = 100;
 42: return x;
 43: }
 44: static Int32 f5()
 45: {
 46: Int32 x = 100;
 47: return x;
 48: }

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
OpenCL Error: Unknown error waiting for idle on GeForce GTX 1080 Ti (Device
I have a GTX 1080 but was having the same problem. Crashing within 20mins of use or less when I clicked on a nurbs curve/animation controller. The outliner getting spammed with that message.I changed a few settings, and it seems to have mitigated the crashing. These are the settings I changed in the preferences window:Display -> Viewport 2.0Rendering engine: DirectX 11 (I have a feeling this one isn't necessary, but I've kept it on)Animation -> Evaluation

me1237guy 發表在 痞客邦 留言(0) 人氣()

image
  • Youtube Tutorial PART 1 - Docker 基本教學 - 從無到有 Docker-Beginners-GuideYoutube Tutorial PART 2 - 用 Docker 實戰 Django 以及 PostgreYoutube Tutorial PART 3 - Docker 基本教學 - 透過 portainer 管理 Docker
  • Youtube Tutorial PART 4 - Docker push image to Docker Hub 教學
  • me1237guy 發表在 痞客邦 留言(0) 人氣()

    image
    以下為PAPAYA電腦教室的投影片教學,有興趣的人可以去訂閱學習。目前列出幾個還蠻厲害的特效功能,剩下等之後有機會再去研究,學完幾個招式就感覺功力大增。
    如何設計一個簡單且質感指數破表的時間軸?
    如何製作一個讓老闆跪著看的沉浸式簡報?

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    image
    Labeled Faces in the WildLabeled Faces in the Wild dataset, converted to fuel
    FDDB: Face Detection Data Set and Benchmark

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    C# call a c++ method, which is called GetSourceImage(…)The following is the way how we get the bitmap data by copying srcBmpData to dstBmpdata, and showing them on a pictureBox.The copy sequence is just the same as OpenCV BGR, it looks as though we create a Format32bppArgb image. ,
     1: this.Invoke((MethodInvoker)delegate
     2: {
     3: int width, height, channel, step;
     4: unsafe
     5: {
     6: byte* srcBmpData = cVideo.GetSourceImage(&width, &height, &channel, &step);
     7: Result_lbl.Text = $"{width},{height},{channel},{step}";
     8: Bitmap bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
     9: var data = bmp.LockBits(new Rectangle(0, 0, width, height),
     10: System.Drawing.Imaging.ImageLockMode.WriteOnly,
     11: System.Drawing.Imaging.PixelFormat.Format32bppRgb);
     12: byte* dstBmpData = (byte*)data.Scan0.ToPointer();
     13: int hei = height;
     14: int wid = width;
     15: int stepsize = step;
     16: 
     17:  
     18: for (int y = 0; y < height; y++)
     19: {
     20: for (int x = 0; x < width; x++)
     21: {
     22: dstBmpData[y * width * 4 + 4 * x] = srcBmpData[y * step + channel * x];
     23: dstBmpData[y * width * 4 + 4 * x + 1] = srcBmpData[y * step + channel * x + 1];
     24: dstBmpData[y * width * 4 + 4 * x + 2] = srcBmpData[y * step + channel * x + 2];
     25: }
     26: }
     27: bmp.UnlockBits(data);
     28: pictureBox1.Image = bmp;
     29: }

    30: });


    me1237guy 發表在 痞客邦 留言(0) 人氣()

    以下根據 DKTD-WinFormThreading 文章節錄重點
    1.自己建立thread優點: 精確管理thread生命週期缺點: 執行緒數目過多時
    ,CPU會耗費太多的資源處理Context Switching

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    最常使用的快捷鍵

  • 複製:Command + C

  • 貼上:Command + V

  • 剪下:Command + X

  • 擷取螢幕/錄影:Command+Shift+5

  • 全螢幕截圖:「Command + shift + 3」

  • 自定地區螢幕截圖:「Command + shift + 4」


  •  

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    image

    MainWindow.xaml
     1: <Window x:Class="WpfDispatcherApp.MainWindow"
     2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     3: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     4: xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     5: xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     6: xmlns:local="clr-namespace:WpfDispatcherApp"
     7: mc:Ignorable="d"
     8: Title="MainWindow" Height="137" Width="554">
     9: <UniformGrid Rows="3" Columns="2">
     10: <Label Content="Input a number:" Height="28" HorizontalAlignment="Center" Name="label1" VerticalAlignment="Center" />
     11: <TextBox Height="23" HorizontalAlignment="Center" Name="textBox1" VerticalAlignment="Center" Width="100" Text="1000000000"/>
     12:  
     13: <Label Content="Result:" Height="28" HorizontalAlignment="Center" Name="label2" VerticalAlignment="Center" />
     14: <TextBox Height="23" HorizontalAlignment="Center" Name="textBox2" VerticalAlignment="Center" Width="100"/>
     15: <Button Content="synchronization" Height="23" HorizontalAlignment="Center" Name="button1" VerticalAlignment="Center" Width="100" Click="button1_Click" />
     16: <Button Content="asynchronization" Height="23" HorizontalAlignment="Center" Name="button2" VerticalAlignment="Center" Width="100" Click="button2_Click" />
     17: </UniformGrid>
     18: </Window>

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    image
    如果你想要直接修改ComboBox背景顏色為自訂義漸層顏色,你應該會跟我遇到一樣的狀況,怎麼改都沒有作用@@
     1: <ComboBox Background="Yellow">
     2: <ComboBox.Resources>
     3: <!-- color of ComboBoxItem -->
     4: <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="Yellow" />
     5: <!-- Mouse over color of ComboBoxItem -->
     6: <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Red" />
     7: </ComboBox.Resources>
     8: <ComboBoxItem>One</ComboBoxItem>
     9: <ComboBoxItem>Two</ComboBoxItem>
     10: <ComboBoxItem>Three</ComboBoxItem>
     11: </ComboBox>

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    image

    一上二下排列,基本上可以先定義兩列兩行,然後針對第一列(Grid.Row=0)特別定義跨兩行,也就是Grid.ColumnSpan=”2”第二列因為沒有跨行所以不用另外定義Grid.ColumnSpan
     1: <Grid>
     2: <Grid.RowDefinitions >
     3: <RowDefinition Height="100" />
     4: <RowDefinition />
     5: </Grid.RowDefinitions>
     6: <Grid.ColumnDefinitions >
     7: <ColumnDefinition Width="200" />
     8: <ColumnDefinition />
     9: </Grid.ColumnDefinitions>
     10:  
     11: <!--Panel-->
     12: <Border Grid.Row="0" Grid.Column="0" Background="Blue" Grid.ColumnSpan="2" />
     13: <!--<Border Grid.Row="0" Grid.Column="1" Background="LightSalmon" />-->
     14: <Border Grid.Row="1" Grid.Column="0" Background="Green" />
     15: <Border Grid.Row="1" Grid.Column="1" Background="Red" />
     16: </Grid>

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    image
    Markup Extensions and WPF XAML
    新增一個類別 SaySomething.cs
    定義兩個靜態屬性English和Chinese
     1: namespace WpfApp7
     2: {
     3: public class SaySomething
     4: {
     5: public static string English
     6: {
     7: get { return "Hello, how are you today?"; }
     8: }
     9: public static string Chinese
     10: {
     11: get { return "哈囉!今天好嗎?"; }
     12: }
     13: }
     14: }

    me1237guy 發表在 痞客邦 留言(0) 人氣()

    Blog Stats
    ⚠️

    成人內容提醒

    本部落格內容僅限年滿十八歲者瀏覽。
    若您未滿十八歲,請立即離開。

    已滿十八歲者,亦請勿將內容提供給未成年人士。