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
<html> | |
<head> | |
<title>.NET Core Web API</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="container" style="margin-top:50px;"> | |
<div class="row"> | |
<div class="col-md-4"> |
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="avatar"> | |
#if((speaker.image)){ | |
<img src="#(speaker.image)" alt="#(speaker.fullname)">}else{ | |
<img src="https://pbs.twimg.com/profile_images/1080082434337722368/tVp-GkU6_400x400.jpg" alt="#(speaker.fullname)">} | |
</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
function setup() { | |
let video = document.getElementById("video"); | |
let canvas = document.getElementById("canvas"); | |
let pre = document.getElementById("tahminler"); | |
let model = null; | |
async function startCamera() { | |
let stream = await navigator.mediaDevices.getUserMedia({ video: true }); //kamera izni isteyelim | |
video.srcObject = stream; //<video> tag'i içerisine kaynağımızı kamera olarak tanımladık | |
await video.play(); //asenkron olarak kameramızın görüntüsünü bu tag içerisinde görüntüleyelim |
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
<html> | |
<head> | |
<title>Bu nedir?</title> | |
<meta charset="UTF-8" /> | |
<!-- TensorFlow.js yukleyelim. --> | |
<script src="https://unpkg.com/@tensorflow/tfjs@0.10.3"></script> | |
<!-- MobileNet yukleyelim --> | |
<script src="https://unpkg.com/@tensorflow-models/mobilenet@0.0.1"></script> | |
<-- Kendi dosyamızı yükleyelim --> |
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 | |
@model IndexModel | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Sohbet - SignalRExample</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> |
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
"use strict"; | |
var connection = new signalR.HubConnectionBuilder().withUrl("/chatHub").build(); | |
//Disable send button until connection is established | |
document.getElementById("sendButton").disabled = true; | |
connection.on("ReceiveMessage", function (user, message) { | |
var msg = message.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"); | |
if (user == $("#userInput").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
@model FileViewModel; | |
<div class="container" style="margin-top:100px"> | |
<br/> | |
@{ | |
if(Model != null) | |
{ | |
<a href="@Url.Action("DownloadFile", new { fileName = Model.FileName })">@Model.FileName indir</a> | |
} | |
} |
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
public class HomeController : Controller | |
{ | |
public IActionResult Index() | |
{ | |
return View(); | |
} | |
[HttpPost] | |
public IActionResult Index(IFormFile file) | |
{ |
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
[HttpPost] | |
public async Task<IActionResult> Index(IFormFile file) | |
{ | |
FileViewModel viewModel = new FileViewModel(); | |
//Yüklenen dosyanın MemoryStream nesnesini oluşturalım | |
MemoryStream stream = new MemoryStream(); | |
file.CopyTo(stream); | |
stream.Position = 0; |