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; | |
namespace CefakarConsoleApp | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//deneysel abu kodlar yazmak için. Eski dostumuz consoleApp |
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
string userName = "kullaniciAdi"; | |
string userPassword = "password"; | |
string webJobName = "webJobName"; | |
var unEncodedString = String.Format($"{userName}:{ userPassword}"); | |
var encodedString = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(unEncodedString)); | |
string URL = "https://?.scm.azurewebsites.net/api/triggeredwebjobs/" + webJobName + "/run"; | |
System.Net.WebRequest request = System.Net.WebRequest.Create(URL); | |
request.Method = "POST"; | |
request.ContentLength = 0; | |
request.Headers["Authorization"] = "Basic " +encodedString; |
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 projectName = Assembly.GetExecutingAssembly().FullName.Split(',')[0]; | |
Assembly asmx = Assembly.GetAssembly(typeof(MvcApplication)); | |
var model = asmx.GetTypes(). | |
SelectMany(t => t.GetMethods(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public)) | |
.Where(d => d.ReturnType.Name == "ActionResult").Select(n => new | |
{ | |
Controller = n.DeclaringType?.Name.Replace("Controller", ""), | |
Action = n.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
//Extensiyonumuz | |
public static class HtmlExtensions | |
{ | |
public static MvcHtmlString Script(this HtmlHelper htmlHelper, Func<object, HelperResult> template) | |
{ | |
htmlHelper.ViewContext.HttpContext.Items["_script_" + Guid.NewGuid()] = template; | |
return MvcHtmlString.Empty; | |
} |
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 formData = {}; | |
$(".form-secici").serializeArray().map(function (x) { formData[x.name] = x.value; }); | |
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 formData = {}; | |
$(".form-secici").serializeArray().map(function (x) { formData[x.name] = x.value; }); | |
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
DROP FUNCTION IF EXISTS slugify; | |
DELIMITER ;; | |
CREATE DEFINER='root'@'localhost' | |
FUNCTION slugify (temp_string VARCHAR(200) CHARSET utf8) | |
RETURNS VARCHAR(200) | |
DETERMINISTIC | |
BEGIN | |
DECLARE x, y , z Int; | |
DECLARE new_string VARCHAR(200); | |
DECLARE is_allowed Bool; |
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="container"> | |
<div class="row"> | |
<div class="col-sm-6 col-md-4 col-md-offset-4"> | |
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1> | |
<div class="account-wall"> | |
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120" | |
alt=""> | |
<form class="form-signin"> | |
<input type="text" class="form-control" placeholder="Email" required autofocus> | |
<input type="password" class="form-control" placeholder="Password" required> |
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
CREATE PROCEDURE [dbo].[deleteAllDataFromAllTables] AS | |
SET NOCOUNT ON | |
DECLARE @dropAndCreateConstraintsTable TABLE ( DropStmt varchar(max) , CreateStmt varchar(max) ) | |
insert @dropAndCreateConstraintsTable select | |
DropStmt = 'ALTER TABLE [' + ForeignKeys.ForeignTableSchema + | |
'].[' + ForeignKeys.ForeignTableName + | |
'] DROP CONSTRAINT [' + ForeignKeys.ForeignKeyName + ']; ' | |
, CreateStmt = 'ALTER TABLE [' + ForeignKeys.ForeignTableSchema + |
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
<asp:DataPager ID="DataPagerProducts" runat="server" PagedControlID="LvCategoryItems" PageSize="10" OnPreRender="PagerCategoryItems_PreRender" class="btn-group pager-buttons"> | |
<Fields> | |
<asp:NextPreviousPagerField ShowLastPageButton="False" ShowNextPageButton="False" ButtonType="Button" ButtonCssClass="btn" RenderNonBreakingSpacesBetweenControls="false" /> | |
<asp:NumericPagerField ButtonType="Button" RenderNonBreakingSpacesBetweenControls="false" NumericButtonCssClass="btn" CurrentPageLabelCssClass="btn disabled" NextPreviousButtonCssClass="btn" /> | |
<asp:NextPreviousPagerField ShowFirstPageButton="False" ShowPreviousPageButton="False" ButtonType="Button" ButtonCssClass="btn" RenderNonBreakingSpacesBetweenControls="false" /> | |
</Fields> | |
</asp:DataPager> |