Steps to deploy Node.js to VPS using PM2 and Github Actions
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
COPY src/*/*.csproj ./ | |
RUN for file in $(ls *.csproj); do mkdir -p ${file%.*}/ && mv $file ${file%.*}/; done |
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 Result | |
{ | |
protected internal Result(bool isSuccess, Error error) | |
{ | |
if (isSuccess && error != Error.None) | |
{ | |
throw new InvalidOperationException(); | |
} | |
if (!isSuccess && error == Error.None) |
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
/* | |
https://leetcode.com/problems/longest-common-prefix/ | |
Write a function to find the longest common prefix string amongst an array of strings. | |
If there is no common prefix, return an empty string "". | |
Example 1: |
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
#include <stdio.h> | |
#include <stdarg.h> | |
#define STRCOPY(destination, num, ...) strcopy(destination, num, __VA_ARGS__, NULL) | |
char* strcopy(char*, size_t, ...); | |
int main(void) | |
{ | |
char dest[10 + 1]; | |
printf("%s\n", STRCOPY(dest, sizeof dest, "Hello", "World")); |
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.Text; | |
using System.Threading.Tasks; | |
namespace ExampleEvent | |
{ | |
public class PlayerConnectedEventArgs : EventArgs | |
{ |
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.IO; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string[] files = Directory.GetFiles("rawdata"); | |
foreach(string file in files) | |
{ |
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
<template> | |
<input type="datetime-local" v-bind:value="decode" v-on:input="encode" /> | |
</template> | |
<script> | |
export default { | |
name: 'DateTime', | |
props:{ | |
value: String |
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
#include <stdio.h> | |
int main(void) | |
{ | |
int array[] = {1, 5, 8, 0, 12, 13, 1, 2, 10, 7}; | |
int len = sizeof array / sizeof *array; | |
const int mayor = array[5]; | |
for(int line_current = 1; line_current <= mayor; ++line_current) | |
{ | |
for(int j = 0; j < len; ++j) |
NewerOlder