Antes de esto, instalar librerías redistributable by Microsoft
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
//Generar los campos en las entidades | |
//Actualizar la BD | |
php app/console doctrine:schema:update --force | |
//Genera o actualiza las entidades php en AppBundle/Entity, genera los getters & setters dependiendo de los campos existentes en la entidad | |
php app/console doctrine:generate:entities AppBundle | |
//En la carpeta Form | |
//En EmployeeType.php, se agregan campos |
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 truncate(str, num) { | |
// Clear out that junk in your trunk | |
//If the num is less than or equal to 3, then the length of the three dots is not added to the string length. | |
if (num <= 3) | |
return str.slice(str, num) + "..."; | |
//Truncate a string if it is longer than the given maximum string length | |
else if(str.length > num) | |
return str.slice(str, num-3) + "..."; | |
else if (str.length <= 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
function repeat(str, num) { | |
// repeat after me | |
//return str; | |
var array = []; | |
for(i=0 ; i < num; i++) | |
{ | |
array.push(str); | |
} |
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 end(str, target) { | |
// "Never give up and good luck will find you." | |
// -- Falcor | |
//obtain the number of characters from str that will be compared | |
subLength = target.length; | |
//gets the substring from the end of str | |
//'-' operator is used to get a substring from the end of the original string | |
sub = str.substr(-subLength); |
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 titleCase(str) { | |
//split the string into an array of strings | |
var tempArray = str.split(' '); | |
//for each string in the array... | |
for(var i=0;i<tempArray.length;i++) | |
{ | |
//change all words to lower case | |
tempArray[i] = tempArray[i].toLowerCase(); | |
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 findLongestWord(str) { | |
//Splits the string into an array | |
var countArray = str.split(' '); | |
//int variable to store the longest character count. | |
var max = 0; | |
//loops through the array | |
//countArray.length obtains the number of elements in the array |
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 palindrome(str) { | |
//converts everything to lower case | |
str = str.toLowerCase(); | |
//eliminates spaces from string | |
str = str.replace(/ /g,''); | |
//removes: '/', '_', '\', '(', ')', '.', ',', '-' from the string | |
//'-' must be declared at the end of the string |
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
_ |
##GUI to CLI single boot.
When you are at the GRUB menu where you select which OS to boot (if this menu don’t appear, press ESC while you get the “Booting CentOS in X seconds”), press e to edit your boot commands. You should see a screen like this: (parameters may vary)
##GUI to CLI permanent boot.
Look for the line that begins with kernel. Choose it and then press e again. You will be at a simple editor, add 3 to the end of this line. This means booting in runlevel 3, which is text-mode only.
NewerOlder