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
angCtlTable.factory("facYeniDonemAc", ["$http", function ($http) { | |
var fac = {}; | |
fac.YeniDonemAc = function (kullaniciAdi, ay, yil, ctladi) { | |
return $http({ | |
method: "POST", | |
url: "CTL_CRUDOperations.asmx/YeniDonemOlustur", | |
data: { | |
kullaniciAdi: kullaniciAdi, | |
ay: ay, | |
yil: yil, |
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 static DataTable ToDataTable<T>(IList<T> data) | |
{ | |
PropertyDescriptorCollection props = TypeDescriptor.GetProperties(typeof(T)); | |
DataTable table = new DataTable(); | |
for (int i = 0; i < props.Count; i++) | |
{ | |
PropertyDescriptor prop = props[i]; | |
table.Columns.Add(prop.Name, prop.PropertyType); | |
} | |
object[] values = new object[props.Count]; |
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 elment = document.getElementById("idOfMyDiv"); | |
elment.addEventListener('mousedown', function (e) { | |
isDown = true; | |
offset = [ | |
elment.offsetLeft - e.clientX, | |
elment.offsetTop - e.clientY | |
]; | |
}, true); | |
document.addEventListener('mouseup', function () { | |
isDown = 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
isAuthenticated() { | |
const promise = new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(this.loggedIn); | |
}, 700) | |
}); | |
return promise; | |
} |
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
import express from "express"; | |
import data from "../data"; | |
import bodyParser from "body-parser"; | |
const postRouter = express.Router(); | |
postRouter.use(bodyParser.json()); // to use body object in requests | |
postRouter.get("/", (req, res) => { | |
res.send(data); | |
}); |
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
const options = { | |
definition: { | |
openapi: "3.0.0", | |
info: { | |
title: "Library API", | |
version: "1.0.0", | |
description: "A simple Express Library API", | |
termsOfService: "http://example.com/terms/", | |
contact: { | |
name: "API Support", |
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
/** | |
* @swagger | |
* components: | |
* schemas: | |
* Post: | |
* type: object | |
* required: | |
* - userId | |
* - title | |
* - body |
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
/** | |
* @swagger | |
* /posts: | |
* get: | |
* summary: Returns all posts | |
* tags: [Posts] | |
* responses: | |
* 200: | |
* description: the list of the posts | |
* content: |
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
/** | |
* @swagger | |
* /posts/{id}: | |
* get: | |
* summary: gets posts by id | |
* tags: [Posts] | |
* parameters: | |
* - in : path | |
* name: id | |
* description: id of post |
OlderNewer