This file contains hidden or 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
jsonData = $('#formularz').serializeArray().map(function(x){this[x.name] = x.value; return this;}.bind({}))[0] | |
$.ajax({ | |
type: "POST", | |
url: "", | |
data: JSON.stringify(jsonData), | |
success: function(data){ | |
if (data.error == "") { | |
$('#formWrapper').html("<p>Dziekujemy za wysłanie wiadomości</p>"); | |
} else { |
This file contains hidden or 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 | |
function array_insert (&$array, $position, $insert_array) { | |
$first_array = array_splice ($array, 0, $position); | |
$array = array_merge ($first_array, $insert_array, $array); | |
} |
This file contains hidden or 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 <ESP8266WiFi.h> | |
#include <ESP8266HTTPClient.h> | |
#include <ArduinoJson.h> | |
#define trigPin 14 // d5 | |
#define echoPin 12 // d6 | |
#define SERVER_IP "10.0.0.55" | |
const int analogInPin = A0; |
This file contains hidden or 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 | |
$builder->select('id, email, name, phone, created_at, status'); | |
$groupSelect = '(SELECT GROUP_CONCAT(ag.name) FROM auth_groups_users gu LEFT JOIN auth_groups ag ON ag.id=gu.group_id WHERE gu.user_id=users.id) AS groups'; | |
$builder->select($groupSelect); | |
$builder->where('deleted_at', NULL); | |
$builder->limit($limit, $offset); | |
// get select, for calc filtered | |
$compiledSelect = $builder->getCompiledSelect(FALSE); | |
$compiledSelect = str_replace($groupSelect, '', $compiledSelect); |
This file contains hidden or 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
SELECT id, email, (SELECT GROUP_CONCAT(ag.name) FROM auth_groups_users gu LEFT JOIN auth_groups ag ON ag.id=gu.group_id WHERE gu.user_id=u.id ) FROM users u |
This file contains hidden or 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
<?xml version="1.0" standalone="yes"?> | |
<MaterialDB xmlns="http://tempuri.org/MaterialDB.xsd"> | |
<Materials> | |
<id>3d3e2cff-f117-4df7-a7c3-09e4fd62ce44</id> | |
<Visible>true</Visible> | |
<Model>Ortur LU7W (1.5W)</Model> | |
<Material>Plywood</Material> | |
<Thickness>-</Thickness> | |
<Action>Engrave</Action> | |
<Power>100</Power> |
This file contains hidden or 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
(6371 * acos ( cos ( radians(' . $address['latitude'] . ') ) * cos( radians( clients.latitude ) ) * cos( radians( clients.longitude ) - radians(' . $address['longitude'] . ') ) + sin ( radians(' . $address['latitude'] . ') ) * sin( radians( clients.latitude ) ) ) ) AS distance_adv' |
This file contains hidden or 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
DELIMITER // | |
CREATE FUNCTION `GCDistDeg`( | |
_lat1 DOUBLE, | |
_lon1 DOUBLE, | |
_lat2 DOUBLE, | |
_lon2 DOUBLE | |
) RETURNS double | |
DETERMINISTIC | |
SQL SECURITY INVOKER | |
COMMENT 'Degrees in, Degrees out. For conversion: 69.172 mi/deg or 111.325 km/deg' |
This file contains hidden or 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 | |
class Solution { | |
/** | |
* @param Integer[] $nums | |
* @return Integer[][] | |
*/ | |
function threeSum($nums) { | |
$results = []; | |
$max = count($nums); |
This file contains hidden or 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 | |
function threeSum($nums) { | |
$results = []; | |
$max=count($nums); | |
sort($nums); | |
print_r($nums); | |
for ($a = 0;$a < $max;$a++) { |