Skip to content

Instantly share code, notes, and snippets.

View jisungbin's full-sized avatar
🌴
언어의 정원사

Ji Sungbin jisungbin

🌴
언어의 정원사
  • 여의도 (South Korea)
  • South Korea, Seoul
  • 19:45 (UTC +09:00)
View GitHub Profile
@jisungbin
jisungbin / hyeong.md
Created January 15, 2019 05:33 — forked from xnuk/hyeong.md
난해한 혀엉.... 언어

난해한 혀엉... 언어 v0.4.5

  • (U+2026), (U+22EF), (U+22EE)는 모두 .(U+002E)가 3번 연속으로 나열된 것과 같은 것으로 봅니다.
  • "한글 음절 문자"는 가(U+AC00) 이상 힣(U+D7A3) 이하의 유니코드 문자들을 의미합니다.

스택

  • 스택의 모든 원소는 유리수 또는 NaN으로 이루어져 있습니다. 분모가 1인 유리수를 편의상 정수라고 칭합니다.
  • NaN은 특수한 숫자처럼 취급됩니다. 어떠한 연산을 하더라도 그 연산에 NaN이 있을 경우 그 연산의 값은 NaN이 됩니다.

[공통] 마크다운 markdown 작성법

1. 마크다운에 관하여

1.1. 마크다운이란?

Markdown은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.

1.2. 마크다운의 장-단점

1.2.1. 장점

package com.sungbin.autoreply.bot.three.service
import org.mozilla.javascript.Context
import org.mozilla.javascript.Scriptable
class RhinoService {
fun runJs(source: String): String{
val rhino: Context = Context.enter()
rhino.languageVersion = Context.VERSION_ES6
package com.sungbin.autoreply.bot.three.utils
import android.util.Base64
import java.lang.Exception
import java.security.spec.AlgorithmParameterSpec
import javax.crypto.Cipher
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
object AES256Encryption {
package com.sungbin.autoreply.bot.three.utils.ui
import android.content.Context
import android.content.res.Resources
import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DecodeFormat
import com.bumptech.glide.load.engine.DiskCacheStrategy
package com.sungbin.autoreply.bot.three.utils
import android.content.Context
import android.os.AsyncTask
import android.widget.ImageView
import com.sungbin.autoreply.bot.three.utils.ui.Glide
import com.sungbin.sungbintool.StorageUtils
import com.sungbin.sungbintool.ToastUtils
import java.io.File
import java.io.FileOutputStream
@jisungbin
jisungbin / MyEditText.java
Created May 7, 2020 19:10 — forked from lifeparticle/LICENSE
Custom Edittext with Line Number
package rupantor.cusedittext;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.widget.EditText;
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
importPackage(android.content);
importPackage(android.app);
importClass(android.widget.Toast);
const CHANNEL_ID = "call_owner";
const ignoreActionName = "msgbot.call_owner.ignore";//그냥 시스템 전반적으로 유니크하게 하시면 됩니다.
const replyActionName="msgbot.call_owner.reply";
const replyKey="key_reply";
const bot = BotManager.getCurrentBot();
let repliers={};
@jisungbin
jisungbin / ImagePath.kt
Created July 25, 2020 23:57
getAllImagePaths
fun getAllShownImagesPath(activity: Activity): MutableList<Uri> {
val uriExternal: Uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI
val cursor: Cursor?
val columnIndexID: Int
val listOfAllImages: MutableList<Uri> = mutableListOf()
val projection = arrayOf(MediaStore.Images.Media._ID)
var imageId: Long
cursor = activity.contentResolver.query(uriExternal, projection, null, null, null)
if (cursor != null) {
columnIndexID = cursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID)