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
static Func<T, TResult> CreatePropertyAccessor<T, TResult>(string propertyName) | |
{ | |
var parameter = Expression.Parameter(typeof(T), "x"); | |
var property = Expression.Property(parameter, propertyName); | |
var lambda = Expression.Lambda<Func<T, TResult>>(property, parameter); | |
return lambda.Compile(); | |
} |
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
#!/bin/bash | |
# Hedef dizin | |
hedef_dizin="C:/Depo/gitbackup" | |
# Kaynak dosyaların yolu | |
kaynak_dosya1="Path/To/file1.txt" | |
kaynak_dosya2="Path/To/Another/file2.txt" | |
# Dizinleri oluştur (eğer yoksa) | |
mkdir -p "$hedef_dizin/$(dirname $kaynak_dosya1)" | |
mkdir -p "$hedef_dizin/$(dirname $kaynak_dosya2)" | |
# Dosyaları kopyala |
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
location / { | |
proxy_pass http://127.0.0.1:8443/; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_redirect off; |
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
PS D:\> Get-ChildItem -Path D:\LogTest\FTP-02\ -File -Recurse | Format-List FullName |
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
ko.bindingHandlers.select2multiValues = { | |
init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { | |
$(element).select2({multiple: true}); | |
$(element).val(valueAccessor()()).trigger('change'); | |
$(element).on('select2:select', function (e) { | |
valueAccessor()($(element).val()); | |
}); | |
$(element).on('select2:unselect', function (e) { | |
valueAccessor()($(element).val()); | |
}); |
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
SELECT (((CAST( ABS(CHECKSUM(NewId())) % 10 AS DECIMAL)+1)/10)+1), * FROM table1 |
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.Collections.Generic; | |
public static class PredicateBuilder | |
{ | |
public static Expression<Func<T, bool>> True<T> () { return f => true; } | |
public static Expression<Func<T, bool>> False<T> () { return f => false; } | |
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
select schema_name(t.schema_id) + '.' + | |
t.name as table_name, | |
t.create_date, | |
t.modify_date | |
from sys.tables t | |
where t.name IN ( | |
'ABC' | |
) | |
order by table_name; |
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
<?php | |
namespace App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
class recaptcha2 implements Rule | |
{ | |
/** | |
* Create a new rule instance. |
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
dir . -r | % { if ($_.Name -cne $_.Name.ToLower()) { ren $_.FullName $_.Name.ToLower() } } |
NewerOlder