Skip to content

Instantly share code, notes, and snippets.

@Mhorino1
Mhorino1 / GoogleSearchTest.cs
Created April 26, 2020 05:13
google検索テスト
private void startButton_Click(object sender, EventArgs e)
{
this.webDriver.Navigate().GoToUrl("https://google.co.jp/");
IWebElement searchBox = webDriver.FindElement(By.Name("q"));
searchBox.SendKeys(keywordTextBox.Text);
IWebElement searchBtn = webDriver.FindElement(By.Name("btnK"));
searchBtn.Click();
}
@Mhorino1
Mhorino1 / GoogleSearchTestFix.cs
Created April 26, 2020 05:08
google検索テスト改修版
private void startButton_Click(object sender, EventArgs e)
{
this.webDriver.Navigate().GoToUrl("https://google.co.jp/");
IWebElement searchBox = webDriver.FindElement(By.Name("q"));
searchBox.SendKeys(keywordTextBox.Text);
searchBox.SendKeys(OpenQA.Selenium.Keys.Return);
}
@Mhorino1
Mhorino1 / ConvertForm.cs
Created February 11, 2020 00:40
Convertメソッド使用法例
using System;
using System.Windows.Forms;
namespace StringConvertToValue
{
/// <summary>
/// 文字列→数値変換ウィンドウ
/// </summary>
public partial class ConvertForm : Form
{
@Mhorino1
Mhorino1 / ParseConvertForm.cs
Last active February 9, 2020 10:04
Parseメソッド使用法例
using System;
using System.Globalization;
using System.Windows.Forms;
namespace StringConvertToValue
{
/// <summary>
/// 文字列→数値変換ウィンドウ
/// </summary>
public partial class ParseConvertForm : Form
@Mhorino1
Mhorino1 / Invoke.cs
Created February 8, 2020 10:05
Invokeメソッド使用例
delegate void UpdateLabelDelegate(string labelStr);
public void UpdateFormLabel(string labelStr)
{
if (this.InvokeRequired)
{
this.Invoke(new UpdateLabelDelegate(this.LabelUpdate), labelStr);
return;
}
this.LabelUpdate(labelStr);
@Mhorino1
Mhorino1 / main.cpp
Created February 1, 2020 07:16
Cmake用ファイル3
#include <iostream>
#include "Calculation.hpp"
int main()
{
Calculation* calc = new Calculation();
std::cout << calc->Add(1, 3) << std::endl;
std::cout << calc->Multiple(1, 3) << std::endl;
return 0;
}
@Mhorino1
Mhorino1 / Calculation.cpp
Created February 1, 2020 07:15
Cmake用ファイル2
#include "Calculation.hpp"
Calculation::Calculation()
{
}
Calculation::~Calculation()
{
}
@Mhorino1
Mhorino1 / Calculation.hpp
Created February 1, 2020 07:13
Cmake用ファイル
class Calculation
{
public :
Calculation();
virtual ~Calculation();
int Add(int, int);
int Multiple(int, int);
};
@Mhorino1
Mhorino1 / profiles.json
Created January 26, 2020 04:40
WindowsTerminal背景画像変更
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyOnSelect": true,
"defaultProfile": "{6e9fa4d2-a4aa-562d-b1fa-0789dc1f83d7}",
"initialCols": 80,
"initialRows": 33,
@Mhorino1
Mhorino1 / RikunaviNextForm.cs
Created January 24, 2020 03:51
リクナビNEXTスクレイピングフォーム
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;