archivo .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
All generations.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
## References
- [Learn to Code HTML & CSS](http://learn.shayhowe.com/html-css/)
- [Learn to Code Advanced HTML & CSS](http://learn.shayhowe.com/advanced-html-css/)
- [jQuery Fundamentals](http://jqfundamentals.com/)
/[\w\s]/
console.log = function(){}
function actualizar() {
location.reload();
}
function multiselect(arr, s, e) {
var ret = [];
for (var i = s; i < e; i++) {
ret.push(arr[i]);
}
return ret;
}
multiselect([1, 2, 3, 4, 5], 2, 4)
<select multiple>
<option value="volvo" selected>Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
// Initialize Firebase
var config = {
apiKey: "AIzaSyC4zqKZQTJpJ9tM2w-Uvf2PnqJQW_ZN-Dw",
authDomain: "gabriel-examen-final.firebaseapp.com",
databaseURL: "https://gabriel-examen-final.firebaseio.com",
projectId: "gabriel-examen-final",
storageBucket: "gabriel-examen-final.appspot.com",
messagingSenderId: "633394448115"
};
firebase.initializeApp(config);
var database = firebase.database();
$("#checkbox").change(function(){
if($(this).is(":checked")){
$("#checkbox-description").text("Desbloqueado");
$(".input-admin").prop("disabled",false);
}else{
$("#checkbox-description").text
<?php
class Sum{
public $val1;
public $val2;
public function sumar($val1, $val2){
echo $val1 + $val2;
}
}
?>
document.getElementById('task-title').value = '';
while(true);
function dependientes(array, number) {
if(number >= 2) {
return array.dependientes;
} else {
return [];
}
}
@media only screen and (max-width: 768px) {
.header {
width: 100%;
height: 50px;
}
.header .menu {
width: 100%;
height: 50px;
}
.header .menu .ul {
width: 100%;
height: 50px;
}
.header .menu .ul .li {
width: 100%;
height: 50px;
text-align: center;
}
.header .menu .ul .li .a {
width: 100%;
height: 50px;
line-height: 50px;
display: block;
}
}
$("#pago-con-tarjeta").show();
$("#pago-con-efectivo").hide();
if($('input:checkbox[name=checkbox-1]').is(':checked')){
$("#pago-con-tarjeta").show();
$("#pago-con-efectivo").hide();
}else {
$("#pago-con-tarjeta").hide();
$("#pago-con-efectivo").show();
}
function resetForm(){
document.getElementById("myForm").reset();
}
<button type="button" onclick="resetForm()">Restablecer formulario</button>
function clean() {
document.getElementById("input1").value = ""
document.getElementById("input2").value = ""
document.getElementById("input3").value = ""
document.getElementById("input4").value = ""
}
/\d{2}\/\d{2}\/\d{4}/
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="../../img/img1.jpg" alt="Chania">
</div>
<div class="item">
<img src="../../img/img2.jpg" alt="Chania">
</div>
<div class="item">
<img src="../../img/img3.png" alt="Flower">
</div>
</div>
$('.select-one, .select-two').prop('selectedIndex',0);
bash
MAC Address
00:1E:90:0F:B6:36
function editarMultiselect(valor, multiselect, selector) {
$(multiselect).find('option').each(function (key, option) {
if (option.selected) {
$(multiselect).multiselect('deselect', option.value);
}
});
if (valor) {
$(multiselect).multiselect('select', valor);
}
$(multiselect).multiselect('rebuild');
$(selector).change();
}
var a = document.getElementById("a");
var b = document.getElementById("b");
a.onchange = function(){
b.disabled = !this.value;
}
$(".field_terms").change(function() {
if(this.checked) {
$('.field_time').removeAttr('disabled');
}else{
$('.field_time').attr('disabled', 'disabled');
}
});
/\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/
$('#restart').on('click', function () {
$('input').text('');
total = 0;
$('#total').text('$' + total)
})
$("#uncheck").click(function(){
$(".checkbox").attr("disabled", !this.checked);
});
function reset(selector) {
$(selector)
.val("")
.removeAttr("checked")
.removeAttr("selected");
}
/[a-zA-Z\d]+/
function setButtonEnabled(button, enabled) {
if (enabled) {
// enable button
} else {
// disable button
}
}
setButtonEnabled(button, true)
[a-zA-Z0-9]
.container {
width: 100px;
height: 100px;
}
<?php
function cookies($n){
$result = "";
if($n == 1){
$result = "Una cookie";
}else{
$result = "$n cookies";
}
return $result;
}
echo cookies(4);
?>
.container {
width: 800px;
height: 600px;
}
@media (min-width: 600px) {
.container {
width: 600px;
height: 400px;
}
}
@media (min-width: 400px) {
.container {
width: 400px;
height: 300px;
}
}
/^([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2})$/
<?php $bloqueado = $row->bloqueado; ?>
<input
type="checkbox"
data-toggle="toggle"
data-size="mini"
data-style="ios"
data-onstyle="success"
data-offstyle="danger"
data-on="Activo"
data-off="Inactivo"
data-width="100"
value="1"
<?php echo ($bloqueado==1)?'checked':'' ?>
/>
async function check_checkbox() {
const data = await $.ajax({
type: "GET",
url: "/check_checkbox",
data: {
'checkbox': $("#checkbox").is(':checked')
}
})
$("#input_1").prop('disabled', !data.checkbox)
$("#input_2").prop('disabled', !data.checkbox)
}
class Person {
public function greet() {
return "hello";
}
}
.card {
width: 100px;
height: 100px;
display: inline-block;
}
class Suma:
def __init__(self,x,y):
self.x = x
self.y = y
def sumar(self):
return self.x + self.y
function habilitar(form) {
if (form.checkeado.checked == true) {
form.nombre.disabled = false;
form.password.disabled = false;
} else {
form.nombre.disabled = true;
form.password.disabled = true;
}
}
Generate
More than just a code generator. A tool that helps you with a wide range of tasks. All in one place.
Function from Description
Text Description to SQL Command
Translate Languages
Generate HTML from Description
Code to Explanation
Fix invalid Code
Get Test for Code
Class from Description
Regex from Description
Regex to Explanation
Git Command from Description
Linux Command
Function from Docstring
Add typing to code
Get Language from Code
Time complexity
CSS from Description
Meta Tags from Description