This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Net.Http; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace ConsoleApp1 | |
{ | |
// Install-Package Microsoft.Extensions.DependencyInjection | |
// Install-Package Microsoft.Extensions.Http | |
class HttpClientCoreSapmle | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomControllerFactory : DefaultControllerFactory | |
{ | |
protected override SessionStateBehavior GetControllerSessionBehavior(RequestContext requestContext, Type controllerType) | |
{ | |
if (requestContext.HttpContext.Request.IsAjaxRequest()) | |
{ | |
// ajax の場合はセッションを読み取り専用にする | |
return SessionStateBehavior.ReadOnly; | |
} | |
return base.GetControllerSessionBehavior(requestContext, controllerType); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if "%2" EQU "" ( | |
set PARAM1=HEAD | |
set PARAM2=%1 | |
) else ( | |
set PARAM1=%1 | |
set PARAM2=%2 | |
) | |
chcp 65001 | |
setlocal enabledelayedexpansion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim dictA = New Dictionary(Of String, String) From {{"hoge", "fuga"}} | |
Dim dictB = New Dictionary(Of String, String) From {{"foo", "bar"}} | |
Dim dictC = dictA.Concat(dictB).ToDictionary(Function(i) i.Key, Function(i) i.Value) | |
For Each item In dictC | |
Console.WriteLine($"{item.Key} {item.Value}") | |
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dao = new-object -comobject DAO.DBEngine.36 | |
$db = $dao.OpenDatabase("sample.mdb") | |
$db.Properties("AccessVersion") | |
#Version 02.00 for Access 2.0 | |
#Version 06.68 for Access 95 | |
#Version 07.53 for Access 97 (8.0) | |
#Version 08.50 for Access 2000 (9.0) | |
#Version 09.50 for Access 2002/2003 (10.0/11.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set dao = WScript.CreateObject("DAO.DBEngine.36") | |
Set db = dao.OpenDatabase("sample.mdb") | |
WScript.Echo db.Properties("AccessVersion") | |
'Version 02.00 for Access 2.0 | |
'Version 06.68 for Access 95 | |
'Version 07.53 for Access 97 (8.0) | |
'Version 08.50 for Access 2000 (9.0) | |
'Version 09.50 for Access 2002/2003 (10.0/11.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
#bg-player, #bg-pattern { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script> | |
var API_KEY = '__YOUR_API_KEY__'; | |
function requestUserUploadsPlaylistId() { | |
$.ajax({ | |
url: 'https://www.googleapis.com/youtube/v3/channels', | |
type: 'GET', | |
data: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script> | |
var API_KEY = '__YOUR_API_KEY__'; | |
function requestUserUploadsPlaylistId() { | |
var request = gapi.client.youtube.channels.list({ | |
part: 'contentDetails', | |
forUsername: 'GoogleDevelopers' | |
}); |
NewerOlder