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; | |
namespace CSharpBeginner | |
{ | |
public class VariablesClass | |
{ | |
public VariablesClass () | |
{ | |
} |
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; | |
namespace CSharpBeginner | |
{ | |
public class ConditionalStatementClass | |
{ | |
public ConditionalStatementClass () | |
{ | |
} |
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; | |
namespace CSharpBeginner | |
{ | |
public class InheritanceClass | |
{ | |
public InheritanceClass () | |
{ | |
} | |
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
//Pull an element from array by its name | |
//Eliminar un elemento desde un array por el nombre | |
function pullByName(name,array){ | |
var i = array.indexOf(name); | |
if(i != -1) { | |
array.splice(i, 1); | |
} | |
} |
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 sNum = "12314"; | |
var num = parseInt(sNum.match(/\d+/)[0]); | |
console.log(num); |
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 text = 'Hello {first_name} {last_name}'; | |
var firstName = 'Felipe'; | |
var lastName = 'Trujillo'; | |
console.log(text.replace(/{first_name}/g, firstName).replace(/{last_name}/g),lastName); |
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
header('Content-Type: application/json; charset=utf-8', true, 500); | |
print json_encode(array('hasErrorCreate' => true, 'data' => 1)); |
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 | |
namespace app\lib; | |
use app\lib\Log; | |
/** | |
* @author Andres Felipe Trujillo | |
*/ | |
class AuditActiveRecord extends \yii\db\ActiveRecord | |
{ |
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 Project.Models.PictureModel | |
@{ | |
ViewBag.Title = "PictureUpload"; | |
} | |
<h2>PictureUpload</h2> | |
@using (Html.BeginForm("PictureUpload", "Controller", FormMethod.Post, new { enctype = "multipart/form-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
<?php | |
include_once 'google-api-php-client/vendor/autoload.php'; | |
$client = new Google_Client(); | |
$application_creds = 'service-account-credentials.json'; | |
$credentials_file = file_exists($application_creds) ? $application_creds : false; | |
define("SCOPE",Google_Service_Calendar::CALENDAR); | |
define("APP_NAME","Google Calendar API PHP"); |
OlderNewer