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
Route::get('/', function () { | |
return view('welcome'); | |
}); | |
Route::get('myfirstpage', 'myfirstController@index'); |
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
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class myfirstController extends Controller | |
{ | |
public function index() | |
{ | |
//user php function | |
$user_agent = $_SERVER['HTTP_USER_AGENT']; | |
$user_ip = $_SERVER['REMOTE_ADDR']; |
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
<?php | |
namespace App\models; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Support\Facades\DB; | |
class mysqlModel extends Model | |
{ | |
//getMariaDBUserlist | |
public function getUsers() |
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
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>myfirstpage</title> | |
<!-- <meta name="description" content=""> --> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- <link rel="manifest" href="site.webmanifest"> --> | |
<!-- <link rel="apple-touch-icon" href="icon.png"> --> |
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
/*記事に紐づけられたタグ配列情報を取得*/ | |
$tags = get_the_tags(); | |
/*タグ情報が空かどうかを確認*/ | |
if ( !empty( $tags ) ) { | |
/*タグ情報が設定されている場合は、1つ目のタグ情報を読み取り、 | |
fontawsomeのタグを構成し、出力する */ | |
echo '<div><i class="' . $tags[0]->description . '"></i><div>' . $tags[0]->name . '</div></div>'; | |
}else{ |
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
import sys | |
import numpy as np | |
def numPrint(num): | |
print("numprint:" + str(num)) | |
if __name__ == '__main__': | |
args = sys.argv |
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
import React, { useCallback, useState, useContext } from 'react' | |
import { useDropzone } from 'react-dropzone' | |
import { Store } from '../store/index' | |
const dropAreaStyle = { | |
width: "100%", | |
height: "100px", | |
backgroundColor: "#eeeeee", | |
display: "flex", | |
alignItems: "center", |
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
class myFTPS(FTP): | |
def __init__(self, host='', user='', passwd='', acct='', | |
timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, | |
encoding='utf-8'): | |
super().__init__(host='', user='', passwd='', acct='', | |
timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, | |
encoding='utf-8') | |
def storbinary(self, cmd, fp, blocksize=8192, callback=None, rest=None): |