HTML
プロジェクトディレクトリ生成
copy
mkdir %userprofile%\Documents\MyProjects\project_name cd %userprofile%\Documents\MyProjects\project_name mkdir dest mkdir docs mkdir src cd src ##mkdir assets\_coffee ##mkdir assets\_ts ##mkdir assets\_sass ##mkdir assets\_sass\lib mkdir assets\vendor mkdir assets\js mkdir assets\css mkdir assets\css\img mkdir assets\img
Starter Html
copy
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- CSS -->
<!-- https://getbootstrap.com/docs/4.3/getting-started/introduction/ -->
<!-- CSS -->
<link rel="stylesheet" href="./assets/css/xxx.css">
<!-- CSS -->
<style type="text/css">
/*ここにCSSを記述*/
body {
padding-top: 70px;
}
</style>
</head>
<body>
<header></header>
<main role="main"></main>
<footer></footer>
<!-- Script CDN -->
<!-- http://code.jquery.com/ -->
<!-- https://getbootstrap.com/docs/4.3/getting-started/introduction/ -->
<!-- https://github.com/google/code-prettify -->
<!-- Script -->
<script src="./assets/js/xxx.js"></script>
<!-- Script -->
<script>
//ここにjavascriptを記述
</script>
</body>
</html>
javascript
jQuery
copy
$(function($){
// TODO:処理
})(jQuery);
非同期処理: $.ajax()
copy
const url = "";
$.ajax({
url: "",
type: "get",
dataType: "jsonp",
success: function(data){
//TODO:処理
}
});
Family Tree の探索
DOMへの操作
クラスの追加と削除
copy
$('.class').toggleClass('class2'); // 引数の class名にコンマ不要
$('.class').addClass('class2');
$('.class').removeClass('class2');
attribute: class, id, ...
copy
const value = $('.class').attr('name');
$('.class').attr('name', value);
DOM要素の追加
Markdown
markdown チートシートPlant UML
Starter Plant UML シーケンス図
copy
@startuml name
hide footbox
actor "ユーザー" as user
participant "Browser" as client
participant "サーバー" as server
participant "Web API" as api
participant "DB" as db
title:title
user->client:処理
activate client
client->server:処理
activate server
server->api:処理
activate api
api->db:処理
activate db
return response
return response
return response
deactivate client
@enduml
SQL Server
エンティティ定義
copy
declare @table_name as varchar(max) = '';
select TABLE_NAME from INFORMATION_SCHEMA.TABLES
where 1=1
and table_name = @table_name
;
select
--TABLE_NAME,
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
IS_NULLABLE
--,CONCAT('declare @',column_name,' as ',data_type,' = null;')
--,CONCAT('new { ', 'no=', ORDINAL_POSITION, ', ', 'name="', COLUMN_NAME, '", ', 'type="', DATA_TYPE, '" },')
from INFORMATION_SCHEMA.COLUMNS
where 1=1
and table_name = @table_name
order by ORDINAL_POSITION
;