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
function convertSheet2Json(sheet) { | |
// first line(title) | |
var firstRange = sheet.getRange(1, 1, 1, sheet.getLastColumn()); | |
var firstRowValues = firstRange.getValues(); | |
var titleColumns = firstRowValues[0]; | |
// after the second line(data) | |
var lastRow = sheet.getLastRow(); | |
var rowValues = []; | |
for(var rowIndex=2; rowIndex<=lastRow; rowIndex++) { |
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
// server_express/api/line.ts | |
import { ClientConfig, Client, middleware, MiddlewareConfig, WebhookEvent, TextMessage, } from '@line/bot-sdk' | |
const channelAccessToken = process.env.CHANNEL_ACCESS_TOKEN || '' | |
const channelSecret = process.env.CHANNEL_SECRET || '' | |
const clientConfig: ClientConfig = { | |
channelAccessToken, | |
channelSecret, | |
} | |
const middlewareConfig: MiddlewareConfig = { | |
channelAccessToken, |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="daichan4649.lockoverlay" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="15" | |
android:targetSdkVersion="17" /> |
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
const URL_BOOK = 'Spread Sheet URL (public)'; | |
const SHEETNAME = 'Sheet Name'; | |
const CALENDAR_ID = 'xxxxx@group.calendar.google.com'; | |
function main() { | |
register2Calendar(); | |
} | |
function register2Calendar() { | |
// create JSON (from SpreadSheet) |
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 { Injectable } from '@nestjs/common'; | |
import { ConfigService as NestConfigService } from '@nestjs/config'; | |
// Notion | |
import { Client as NotionClient } from '@notionhq/client'; | |
@Injectable() | |
export class ConfigService { | |
private readonly config = this.createConfig(); |
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
// middleware/auth.js | |
export default async ({ store, redirect }) => { | |
const loggedIn = await store.dispatch('isLoggedIn') | |
if (!loggedIn) { | |
redirect('/login') | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="daichan4649.notification" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="15" | |
android:targetSdkVersion="20" /> |
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.Drawing; | |
using System.Windows.Forms; | |
namespace crosshair | |
{ | |
class CrosshairForm : Form | |
{ | |
public CrosshairForm() | |
{ | |
// Form 設定 |
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 java.io.IOException; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
public class InitServlet extends HttpServlet { | |
private static final long serialVersionUID = 1L; | |
protected void doGet(HttpServletRequest request, HttpServletResponse response) |
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
private static final int REQ_CODE_MIC = 0; | |
private static final int REQ_CODE_MOVIE = 1; | |
private void startAudioRecorder() { | |
Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); | |
try { | |
startActivityForResult(intent, REQ_CODE_MIC); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} |
NewerOlder