Posts

Showing posts from November 19, 2018

461

Image
IV secolo  · V secolo  · VI secolo Anni 440  · Anni 450  · Anni 460  · Anni 470  · Anni 480 457  · 458  · 459  · 460  · 461  · 462  · 463  · 464  · 465 Il 461 (CDLXI in numeri romani) è un anno del V secolo. 461 negli altri calendari Calendario gregoriano 461 Ab Urbe condita 1214 (MCCXIV) Calendario armeno N.D. Calendario bengalese N.D. Calendario berbero 1411 Calendario bizantino 5969 — 5970 Calendario buddhista 1005 Calendario cinese 3157 — 3158 Calendario copto 177 — 178 Calendario ebraico 4220 — 4221 Calendario etiopico 453 — 454 Calendario induista Vikram Samvat Shaka Samvat Kali Yuga 516 — 517 383 — 384 3562 — 3563 Calendario islamico Jāhiliyya Calendario persiano N.D. Indice 1 Eventi 2 Nati 3 Morti 4 Calendario 5 Altri progetti Eventi | Flavio Severino e Flavio Dagalaifo consoli Il generale visigoto Sunieri...

LinQ to SQL - InsertOnSubmit without SubmitChanges

Image
up vote 0 down vote favorite Suppose that I inserted an entity to an entity set by calling the InsertOnSubmit method , like this : DBDataContext db = new DBDataContext(); Product product = new Product {ID = "1" , Name = "Chair"}; db.Products.InsertOnSubmit(product); // db.SubmitChanges(); I didnt call SubmitChanges intentionally . My question is , can i later find that product and delete it with DeleteOnSubmit method?: Product product = db.Products.Single(p => p.ID == "1"); db.Products.DeleteOnSubmit(product); If i cannot , then what the InsertOnSubmit method actually does ? Thank you in advance for your help. linq-to-sql share | improve this question ...

Simple single-file PHP login system

Image
up vote 2 down vote favorite 3 This is something that I initially came up with to protect a bunch of scripts on my personal webserver, but am now planning on using with a few public projects too. login.php : <?php session_start(); //log out if ?logout=true if($_GET["logout"]){ $_SESSION["loggedIn"]=false; session_destroy(); header('Location: '. $_SERVER['SCRIPT_NAME']); exit(); } $password = '8f434346648f6b96df89dda901c5176b10a6d83961dd3c1ac88b59b2dc327aa4'; if(empty($_SESSION["loggedIn"])){ if(isset($_POST["password"])){ if(hash('sha256', $_POST['password'])===$password){ session_regenerate_id(true); $_SESSION["loggedIn"]=true; } else{ ec...