Skip to content

Instantly share code, notes, and snippets.

View ertugrulozcan's full-sized avatar

Ahmet Ertuğrul Özcan ertugrulozcan

View GitHub Profile
using System.Net.Http;
using System.Threading.Tasks;
using CmsMigration.LeagueAndTeamMigrationAPI.Helpers;
using CmsMigration.LeagueAndTeamMigrationAPI.Models.Net;
namespace CmsMigration.LeagueAndTeamMigrationAPI.Services
{
public abstract class BaseRestService
{
#region Fields
@using System.Linq
@using Raven.Component.Extensions.DateTimeExtensions
@using Raven.Core.CommonWeb
@using Raven.Core.CommonWeb.Helpers
@using Raven.Core.CommonWeb.ActionFilters.MetaTagsModels
@model Raven.UI.FanatikWeb.Models.ViewModels.TextNews.TextNewsDetailViewModel
@using Raven.Core.CommonWeb.Extensions
@using Raven.Data.Core.Model.Shared
@using Raven.UI.FanatikWeb.Helpers
public class Solution
{
public int Reverse(int number)
{
try
{
int[] digitArray = GetDigitArray(number);
return ConvertDigitArrayToInteger(digitArray.Reverse().ToArray());
}
catch (OverflowException)
{
"matchId": 1181715,
"comments": [
{
"MatchId": 1181715,
"CommentaryType": 17,
"TeamSide": 0,
"Minute": 1,
"Commentary": "Hakemin düdüğüyle maç başlıyor.",
"IsDeleted": false,
{
"code":75615,
"matchDate":"2020-04-01T20:30:00",
"tournamentName":"Hazırlık Karşılaşmaları",
"homeTeam":"FF Sodertalje",
"awayTeam":"",
"matchName":"FF Sodertalje - ",
"matchResultOdd":[
{
"id":1032223,
@ertugrulozcan
ertugrulozcan / PerfectNumber.cs
Created February 15, 2020 09:58
PerfectNumbers
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace ObssConsoleApp
{
public static class PerfectNumber
{
@ertugrulozcan
ertugrulozcan / sqlserver_on_docker.md
Last active December 22, 2019 14:11
Sql Server on Docker

Sql Server on Docker

Install

sudo docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<PASSWORD>' -p 1433:1433 --name <IMAGE_NAME> -d mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
Verify Installation
> Connection 1 Establishment - TCP Three-Way Handshake
> Connected to 0.0.0.0
--Request--
GET /project.html HTTP/1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
--Response--
HTTP/1.0 200 OK
Content-Type: text/html
Content-Length: 171672
Expires: Thu, 01 Dec 1997 16:00:00 GMT
$ telnet info.cern.ch 80
> Connection 1 Establishment - TCP Three-Way Handshake
> Connected to 0.0.0.0
--Request--
GET /project.html
--Response--
<html>
A very simple HTML page
</html>
> Connection 1 Closed - TCP Teardown
@ertugrulozcan
ertugrulozcan / osi.csv
Created August 26, 2019 19:48
osi.csv
OSI Layer Protocol
Application Layer (Uygulama Katmanı) HTTP, DNS, SMTP, FTP, TFTP, UUCP, NNTP, SSL, SSH, IRC, SNMP, SIP, RTP, Telnet, ...
Presentation Layer (Sunum Katmanı) ISO 8822, ISO 8823, ISO 8824, ITU-T T.73, ITU-T X.409, ...
Session Layer (Oturum Katmanı) NFS, SMB, ISO 8326, ISO 8327, ITU-T T.6299, ...
Transportation Layer (Ulaşım Katmanı) TCP, UDP, SCTP, DCCP, ...
Network Layer (Ağ Katmanı) IP, IPv4, IPv6, ICMP, ARP, IGMP, IPX,...
Data Link Layer (Veri Bağlantısı Katmanı) Ethernet, HDLC, Wi-Fi, Token ring, FDDI, PPP, L2TP...
Physical Layer (Donanım Katmanı) ISDN, RS-232, EIA-422, RS-449, EIA-485, ...