Skip to content

Instantly share code, notes, and snippets.

@JohnBaek
JohnBaek / Program.cs
Created May 4, 2021 05:22
Magic Square
using System;
using System.Collections.Generic;
using System.Linq;
List<List<int>> problem = new List<List<int>>()
{
new List<int>(){ 4 ,8 ,2 },
new List<int>(){ 4 ,5 ,7 },
new List<int>(){ 6 ,1 ,6 },
@JohnBaek
JohnBaek / .gitignore
Created April 8, 2021 01:24
.gitignore , vue
.DS_Store
node_modules
/dist
/coverage
/tests/e2e/reports/
selenium-debug.log
# local env files
.env.local
import { Component, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
import { LayoutModule } from '@progress/kendo-angular-layout';
import { TranslateService } from '@ngx-translate/core';
import { WindowService, WindowRef, WindowCloseResult, DialogService, DialogRef, DialogCloseResult } from '@progress/kendo-angular-dialog';
// grid
import { GridDataResult, RowArgs } from '@progress/kendo-angular-grid';
import { GridColumn } from '../../../../../shared/models/common/grid-column.model';
import { EnumGridColumn } from '../../../../../shared/models/common/enum-grid-column.model';
import { CommonKendoGridComponent } from '../../../../../shared/components/kendo-grid/kendo-grid.component';
@JohnBaek
JohnBaek / TeamManagementController.js
Created July 7, 2017 02:23
//켄도 treeview 형식으로 파싱 * 재귀호출
//켄도 treeview 형식으로 파싱 * 재귀호출
$scope.parseForKendoTreeView = function(obj){
angular.forEach(obj, function (item, idx) {
if (item.SubTeams.length > 0) {
item["items"] = item.SubTeams;
item["isLastNode"] = false;
$scope.parseForKendoTreeView(item.SubTeams);
} else {
item["items"] = [];
using System;
using System.Collections.Generic;
using System.Threading;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
@JohnBaek
JohnBaek / JS#EnterKey_Detecting.js
Created August 17, 2016 01:11
JS#EnterKey_Detecting
<input type="text" onKeyDown="onKeyDown();">
// in JavaScript Code
function onKeyDown()
{
if(event.keyCode == 13)
{
//TODO : 실행시킬 코드
}
}
function setCookiemain(name, value, expiredays) {
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + 1);
document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";";
}
function toDays() {
if (confirm("오늘 하루 그만 보기를 적용 하시겠습니까?")) {
setCookiemain("wia_intro20141002", "ok");
location.href = "/Home/Home.aspx";
}
@JohnBaek
JohnBaek / C#_Repeater_Round_comma
Created July 18, 2016 05:30
C#_Repeater_Round_comma
<td><b>-</b> <%# string.Format("{0:###,###}", Eval("MN_CHARGE_REAL"))%></td>
@JohnBaek
JohnBaek / C#_OnClientClinto_BaseCode.cs
Last active July 12, 2016 02:36
C#_OnClientClinto_BaseCode.cs
//Javascript
$("#<%=this.CashDestroyPopup.ClientID%>").click();
//.cs
protected void CashDestroyPopup_Btn(object sender, EventArgs e)
{
}
@JohnBaek
JohnBaek / C#_Reflection_Plugin_Templete.cs
Created July 11, 2016 07:57
C#_Reflection_Plugin_Templete.cs
using System;
using System.IO;
using System.Reflection;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{