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 express = require('express'); | |
var app = express (); | |
app.get('/', function(req, res) { | |
var number = 200; | |
res.status(number).send("hello World"); | |
}); | |
app.listen(3000); |
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
app.get('/texts', function (req, res) { | |
connection.query('SELECT * FROM texts', function (error, results, fields) { | |
if (error) throw error; | |
return res.send({error: false, data: results, message: 'Texts list'}) | |
}) | |
}); |
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 > | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>Using MySQL and PHP with Google Maps</title> | |
<style> | |
/* Always set the map height explicitly to define the size of the div | |
* element that contains the map. */ | |
#map { | |
height: 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
for (var i = 0, max = markers.length; i < max; i++) { | |
var miejscowosc = markers[i].getAttribute("miejscowosc"), | |
point = new google.maps.LatLng( | |
parseFloat(markers[i].getAttribute("lat")), | |
parseFloat(markers[i].getAttribute("lgt")) | |
), | |
marker = new google.maps.Marker({ | |
map: map, | |
position: point, |
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
angular.module('my-app', []) | |
.controller('myCtrl', function ($scope, $http) { | |
$scope.myFunc = function () { | |
console.log($scope.boxes); | |
// $http.post('index.php', JSON.stringify($scope.boxes)); | |
var request = $http({ | |
method: "post", | |
url: window.location.href + "index.php", | |
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
app.get('/api/texts', function (req, res) { | |
connection.query('ALTER TABLE texts MODIFY COLUMN * TEXT CHARACTER SET utf8', function (error, results, fields) { | |
connection.query('SELECT * FROM texts', function (error, results, fields) { | |
if (error) throw error; | |
return res.send({error: false, data: results, message: 'Texts list'}) | |
}) | |
}) | |
}); |
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 $myquery = new WP_Query( 'category_name=menu-items' ); ?> | |
<?php while ( $myquery->have_posts() ) : $myquery->the_post(); ?> | |
<li> | |
<?php the_post_thumbnail(); ?> | |
<a href="#<?php the_permalink() ?>"> | |
<?php the_title(); ?> | |
<?php the_content(); ?> | |
</a> | |
</li> |
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
it('should accept values in the constructor', () => { | |
let todo = new Todo({ | |
title: 'hello', | |
complete: true | |
}); | |
expect(todo.title).toEqual('hello'); | |
expect(todo.complete).toEqual(true); | |
}); |
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
#o-nexio:before { | |
content: ""; | |
display: block; | |
height: 90px; | |
margin-top: -90px; | |
} |
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
.text-variables > .col-md-4 { | |
&:nth-child(3n + 1) { | |
clear: both; | |
} | |
} |