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
<?php | |
/** | |
* Created by PhpStorm. | |
* User: roboter | |
* Date: 10.10.2014 | |
* Time: 14:12 | |
*/ | |
date_default_timezone_set( 'UTC' ); | |
require_once( 'tooaeg.php' ); | |
define ( 'NEXTDAY', 24 * 60 * 60 ); |
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
/* | |
Blink | |
Turns on an LED on for one second, then off for one second, repeatedly. | |
This example code is in the public domain. | |
*/ | |
#define D1 3 // Направление вращение двигателя 1 | |
#define M1 4 // ШИМ вывод для управления двигателем 1 | |
#define D2 6 // Направление вращение двигателя 2 | |
#define M2 5 // ШИМ вывод для управления двигателем 2 |
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
/** | |
* dual-sidebar fixed columns | |
*/ | |
html { | |
background: #f06; | |
background: #dbd18d; | |
min-height: 100%; } | |
body { padding-top: 85px; } |
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
[Xdebug] | |
zend_extension="C:\Program Files (x86)\PHP\v5.6.5\php_xdebug-2.2.7-5.6-vc11-x86_64.dll" | |
xdebug.remote_enable=1 | |
xdebug.remote_host=localhost | |
xdebug.remote_port=9000 |
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
https://phpexcel.codeplex.com/releases/view/119187 |
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
<?php | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
$from = "emailtest@YOURDOMAIN"; | |
$to = "YOUREMAILADDRESS"; | |
$subject = "PHP Mail Test script"; | |
$message = "This is a test to check the PHP Mail functionality"; | |
$headers = "From:" . $from; | |
mail($to,$subject,$message, $headers); | |
echo "Test email sent"; |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace CodeGenerator | |
{ | |
class Program |
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
try | |
{ | |
// Your code... | |
// Could also be before try if you know the exception occurs in SaveChanges | |
context.SaveChanges(); | |
} | |
catch (DbEntityValidationException e) | |
{ | |
foreach (var eve in e.EntityValidationErrors) |
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 String RenderRazorViewToString(ControllerContext controllerContext, String viewName, Object model) | |
{ | |
controllerContext.Controller.ViewData.Model = model; | |
using (var sw = new StringWriter()) | |
{ | |
var viewResult = ViewEngines.Engines.FindPartialView(controllerContext, viewName); | |
var viewContext = new ViewContext(controllerContext, viewResult.View, controllerContext.Controller.ViewData, controllerContext.Controller.TempData, sw); | |
viewResult.View.Render(viewContext, sw); |