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
| package main | |
| import ( | |
| "log" | |
| "net/http" | |
| ) | |
| func handler(w http.ResponseWriter, r *http.Request) { | |
| http.ServeFile(w, r, "./build/index.html") |
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
| 2221 8276 2247 0362 2220 | |
| 1803 2971 2398 5334 5278 | |
| 5035 3788 0077 3951 5883 | |
| 3836 8566 4431 0052 8914 |
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
| import 'package:flutter/material.dart'; | |
| class Increment extends StatefulWidget { | |
| const Increment({Key? key}) : super(key: key); | |
| @override | |
| State<Increment> createState() => _IncrementState(); | |
| } | |
| class _IncrementState extends State<Increment> { |
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
| class MapsUtils{ | |
| static double calculatePolygonArea(List coordinates) { | |
| double area = 0; | |
| if (coordinates.length > 2) { | |
| for (var i = 0; i < coordinates.length - 1; i++) { | |
| var p1 = coordinates[i]; | |
| var p2 = coordinates[i + 1]; | |
| area += convertToRadian(p2.longitude - p1.longitude) * |
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
| import android.os.Bundle; | |
| import android.os.Handler; | |
| import android.os.Message; | |
| import androidx.annotation.NonNull; | |
| import com.rabbitmq.client.AMQP; | |
| import com.rabbitmq.client.Channel; | |
| import com.rabbitmq.client.Connection; | |
| import com.rabbitmq.client.ConnectionFactory; |
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
| import 'dart:math' as math; | |
| import 'package:flutter/material.dart'; | |
| class DashRectPainter extends CustomPainter { | |
| double strokeWidth; | |
| Color color; | |
| double gap; | |
| DashRectPainter( | |
| {this.strokeWidth = 5.0, this.color = Colors.red, this.gap = 5.0}); |
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
| /// extension on Row | |
| /// to add a space between each child | |
| extension RowExtension on Row { | |
| Row addSpaceBetweenChildren(double space) { | |
| final children = <Widget>[]; | |
| for (var i = 0; i < this.children.length; i++) { | |
| children.add(this.children[i]); | |
| if (i != this.children.length - 1) { | |
| children.add(SizedBox(width: space)); | |
| } |
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
| import 'dart:math'; | |
| // A set to store the generated names. | |
| final Set<String> generatedNames = Set(); | |
| String generateUniqueName() { | |
| // Generate a random first and last name. | |
| final firstName = generateRandomName(); | |
| final lastName = generateRandomName(); |
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
| server { | |
| server_name www.example.com; | |
| # return 301 https://google.com$request_uri; | |
| location / { | |
| proxy_pass http://localhost:PORT; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; |
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
| server { | |
| server_name localhost; | |
| listen 80; | |
| location ~ /users/[12][0-9]+ { | |
| proxy_pass http://localhost:8802; | |
| } | |
| location ~ /products/[12][0-9]+ { |