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 {useEffect, useState} from 'react'; | |
export function useStateWithDep(defaultValue: any) { | |
const [value, setValue] = useState(defaultValue); | |
useEffect(() => { | |
setValue(defaultValue); | |
}, [defaultValue]); | |
return [value, setValue]; | |
} |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="VAD.test" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
<script src="Scripts/jquery-1.9.1.min.js"></script>//jquery dosyamız | |
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>//ckeditor dosyamız |
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
moment.lang("tr") | |
var mainElement = $("#ctl00_ctl60_g_86ee7db6_7073_42c5_9737_7005e352da4c .container" )[0] | |
var result = []; | |
$(mainElement.children).each(function(a,b){ | |
var row = [] | |
$(b.children).each(function(x,y){ | |
row.push(y.innerText) | |
}); | |
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
var domains = { | |
"wikipedia.org":1, | |
"spotify.com":1 | |
} | |
var proxy = "SOCKS5 127.0.0.1:1080; SOCKS 127.0.0.1:1080; DIRECT;"; | |
var direct = 'DIRECT;'; | |
function FindProxyForURL(url, host) { |
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
<div class="flex"> | |
<div class="kutu"> </div> | |
<div class="kutu"> </div> | |
</div> | |
<div class="flex"> | |
<div class="kutu"> </div> |
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
//Code Start | |
'use strict'; | |
var fs = require('fs'); | |
var content = fs.read('restoran.txt'); | |
//console.log('read data:', content); | |
var kontrol=false; | |
var page = require('webpage').create(); | |
page.settings.userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36'; |
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.Linq; | |
using System.Linq.Expressions; | |
using System.ServiceModel.Channels; | |
namespace KYGM.Framework.Core.Utilities.Helpers | |
{ | |
/// <summary> | |
/// Some useful extension methods for <see cref="IQueryable{T}"/>. | |
/// </summary> |
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; | |
namespace KYGM.Web.UI.Infrastructure | |
{ | |
//Kaynak: https://blog.tonysneed.com/2011/10/09/using-nlog-with-dependency-injection/ | |
//Amaç: Decouple from logger framework | |
public interface ILogService | |
{ | |
bool IsDebugEnabled { get; } | |
bool IsErrorEnabled { get; } |
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
<!-- Kullanıma Örnek --> | |
@Html.EditorFor(model => model.StartDate, "Datetime", new { @params = new { ng_model = "vm.startDate" } }) |
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 getDataFromPartialbyAjax(url, mainPanel, callbackFn) { | |
function getModalData(response) { | |
if (response.data != undefined) { | |
//it is json | |
callbackFn(response.data); | |
mainPanel.empty(); | |
} else { | |
//it is html | |
mainPanel.html(response); |
NewerOlder