start new:
tmux
start new with session name:
tmux new -s myname
func PathExist(_path string) bool { | |
_, err := os.Stat(_path) | |
if err != nil && err.Error() == os.ErrNotExist.Error() { | |
return false | |
} | |
return true | |
} | |
// golang新版本的应该 | |
func PathExist(_path string) bool { |
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
// Turn XLS file into an array | |
require_once 'bundles/laravel-phpexcel/PHPExcel/IOFactory.php'; | |
$objPHPExcel = PHPExcel_IOFactory::load($file_path); | |
$rows = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); | |
// get the column names | |
$xls_fields = isset($rows[1]) ? $rows[1] : array(); | |
if (! empty($xls_fields)) | |
unset($rows[1]); |
/* | |
Serve is a very simple static file server in go | |
Usage: | |
-p="8100": port to serve on | |
-d=".": the directory of static files to host | |
Navigating to http://localhost:8100 will display the index.html or directory | |
listing file. | |
*/ | |
package main |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
package main | |
import ( | |
"bufio" | |
"compress/bzip2" | |
"fmt" | |
"io" | |
"os" | |
) |
// compile this like g++ go2.c -lgdi32 [if you're using mingw] | |
#include <windows.h> | |
#include <stdio.h> | |
// Helper function to retrieve current position of file pointer: | |
inline int GetFilePointer(HANDLE FileHandle){ | |
return SetFilePointer(FileHandle, 0, 0, FILE_CURRENT); | |
} | |
//--------------------------------------------------------------------------- |