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 | |
use Doctrine\Common\Collections\Criteria; | |
class Classy | |
{ | |
public function index() | |
{ | |
$criteria = new Criteria(); | |
$criteria->where(Criteria::expr()->neq('roles', 'ROLE_USER')); |
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
#include <stdio.h> | |
int main() | |
{ | |
int n[3]; | |
int a, max, min1, min2, index, num1, num2, num3; | |
printf("enter three numbers:\n"); | |
scanf("%d%d%d", &num1, &num2, &num3); | |
n[0] = num1; |
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
### Form builder ### | |
public function form(Request $request) | |
{ | |
if("POST" == $request->getMethod()) { | |
if ($form->isValid()) { | |
$data = $form->getData(); | |
echo $data->getTitle(); | |
} | |
} |
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 void setRandomOptions() | |
{ | |
String[] answers = {}; | |
String[] options = {"PH", "USA", "NK", "SK"}; | |
Integer opt = 0; | |
while (2 > opt) { | |
String randomOption = options[new Random().nextInt(options.length)]; | |
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 () { | |
var tordaFunctions = { | |
sayHi: function(name) { | |
console.log('Hi ' + name); | |
}, | |
navFix: function() { | |
return $(document).on("scroll", function () { | |
var $nav = $(".navbar-fixed-top"); | |
$nav.toggleClass('scrolled', $(this).scrollTop() > $nav.height()); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.red { | |
background-color: red; | |
height: 150px; | |
width: 150px; | |
} | |
.red.active { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body, html { | |
margin: 0; | |
padding: 0; | |
} | |
#wrapper { | |
width: 100%; |
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 | |
$host = "localhost"; | |
$database = "mydb"; | |
$username = "root"; | |
$password = ""; | |
try { | |
$connection = new PDO("mysql:host=$host;dbname=$database;charset=utf8", $username, $password); | |
} catch(PDOException $e) { |
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 | |
$servername = "localhost"; | |
$database = "exercise"; | |
$username = "root"; | |
$password = "root"; | |
$connection = new PDO ("mysql:host=$servername;dbname=$database;charset=utf8mb4", $username, $password); | |
/* End of file */ |
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 | |
$servername = "localhost"; | |
$database = "exercise"; | |
$username = "root"; | |
$password = ""; | |
$conn = new PDO("mysql:host=$servername;dbname=$database;charset=utf8mb4", $username, $password); | |
$fullname = 'Jaylord Ferrer'; |