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 | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = 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
| <!-- Clickable and selectableItemBackground are optional --> | |
| <RelativeLayout | |
| android:id="@+id/two_line_item" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:background="?selectableItemBackground" | |
| android:clickable="true" | |
| android:minHeight="72dp" | |
| android:paddingEnd="?listPreferredItemPaddingRight" | |
| android:paddingLeft="?listPreferredItemPaddingLeft" |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #define t 3 | |
| void imprimir(int vet[t][t]){ | |
| int i,j,k; | |
| for (i = 0; i < t; i++){ | |
| for (j = 0; j < t; j++){ |
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
| #!/bin/sh | |
| # | |
| # @author: Jabran Rafique <hello@jabran.me> | |
| # @link: http://jabran.me/articles/automatic-database-backup-using-git-hosting/ | |
| # Set variables | |
| FULLDATE = $(date +"%Y-%d-%m %H:%M") | |
| NOW = $(date +"%Y-%m-%d-%H-%M") | |
| MYSQL_DUMP = `which mysqldump` | |
| GIT = `which git` |
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
| typedef elemento el; | |
| struct elemento { | |
| int valor; | |
| el *esquerda; | |
| el *direito; | |
| } | |
| el* criaArvore(); | |
| el* insere (el* raiz, el* elemento); | |
| void imprimir(el* raiz); |
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 Beer { | |
| final int id; | |
| final String name; | |
| final String tagline; | |
| final String description; | |
| final String image_url; | |
| Beer.fromJSON(Map<String, dynamic> jsonMap) : | |
| id = jsonMap['id'], | |
| name = jsonMap['name'], |
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
| dependencies: | |
| flutter: | |
| sdk: flutter | |
| cupertino_icons: ^0.1.2 | |
| http: ^0.12.0 | |
| dev_dependencies: | |
| flutter_test: | |
| sdk: flutter | |
| flutter: |
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:http/http.dart' as http; | |
| import 'dart:convert'; | |
| import '../models/beer.dart'; | |
| Future<Stream<Beer>> getBeers() async { | |
| final String url = 'https://api.punkapi.com/v2/beers'; | |
| final client = new http.Client(); | |
| final streamedRest = await client.send( | |
| http.Request('get', Uri.parse(url)) |
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'; | |
| import 'screens/home.dart'; | |
| class BeerListApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) => MaterialApp( | |
| title: 'Beer List App', | |
| debugShowCheckedModeBanner: false, | |
| theme: ThemeData( | |
| primaryColor: Colors.black, |
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 '../repository/beer_repository.dart'; | |
| import '../models/beer.dart'; | |
| ... | |
| class _HomeState extends State<Home> { | |
| List<Beer> _beers = <Beer>[]; | |
| @override | |
| void initState() { |
OlderNewer