This file contains hidden or 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
<cfscript> | |
component { | |
property struct requestContainer; | |
property struct sessionContainer; | |
property struct applicationContainer; | |
public any function init() { | |
if (isDefined("request.container")) { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> | |
</head> |
This file contains hidden or 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
//iframe ile eklenen map ın style özelliğine pointer-events:none eklemeyi unutmayın | |
$(function() { | |
$('.map-container').click(function(e) { | |
$(this).find('iframe').css('pointer-events', 'all'); | |
}).mouseleave(function(e) { | |
$(this).find('iframe').css('pointer-events', 'none'); | |
}); | |
}); |
This file contains hidden or 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
@ECHO OFF | |
Rem -- dizinler örnektir lütfen kendi mysql dizininizi belirtin burada wamp için örnekleme yaptım. Bu noktaya dikkat | |
C:\wamp\bin\mysql\mysql5.6.17\bin\mysqldump -u root --all-databases > "C:\mysqlbackups\tmp\alldb.sql" | |
Rem -- 7z indirip 7z.exe 7z.dll 7z-zip.dll 7z-zip32.dll yi de bu klasöre atın. ayrıca klasöre tmp adında bir klasör açmayı unutmayın | |
Rem -- ilk dizin adresi kaydedilecek yer ikincisi yukarıda dump sql i aktardığımız dosya adresi | |
7z a -tzip "C:\mysqlbackups\dest\mysql_alldatabase_%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4%_backup.zip" "C:\mysqlbackups\tmp\*.*" -mx5 | |
Rem -- forfiles ile -d 3 yaparak 3 gün öncesinde ki dosyaları bulmuş oluyoruz bununla 3 gün öncesinde ki yedekleri sileceğiz kendinize göre ayarlayabilirsiniz | |
forfiles -p "C:\mysqlbackups\dest" -s -m *.* -d 3 -c "cmd /c del @path" |
This file contains hidden or 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 DatetimeBinder: IModelBinder | |
{ | |
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) | |
{ | |
string data = ""; | |
if (controllerContext.Controller.ValidateRequest && bindingContext.ModelMetadata.RequestValidationEnabled) | |
{ | |
data = controllerContext.HttpContext.Request.Params[bindingContext.ModelName]; | |
} | |
else |
This file contains hidden or 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
UPDATE t1 | |
SET t1.CalculatedColumn = t2.[Calculated Column] | |
FROM dbo.Table1 AS t1 | |
INNER JOIN dbo.Table2 AS t2 | |
ON t1.CommonField = t2.[Common Field] | |
WHERE t1.BatchNo = '110'; |
This file contains hidden or 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
WITH CTE AS( | |
SELECT [col1], [col2], [col3], [col4], [col5], [col6], [col7], | |
RN = ROW_NUMBER()OVER(PARTITION BY col1 ORDER BY col1) | |
FROM dbo.Table1 | |
) | |
DELETE FROM CTE WHERE RN > 1 |
This file contains hidden or 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
void Application_BeginRequest(object sender, EventArgs e) | |
{ | |
HttpContextBase context = new HttpContextWrapper(HttpContext.Current); | |
RouteData rd = RouteTable.Routes.GetRouteData(context); | |
if (rd != null) | |
{ | |
string controllerName = rd.GetRequiredString("controller"); | |
string actionName = rd.GetRequiredString("action"); | |
Response.Write("c:" + controllerName + " a:" + actionName); |
NewerOlder