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
| kill -9 $(lsof -i TCP:8000 | grep LISTEN | awk '{print $2}') |
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
| var db = firebase.firestore(); | |
| var content = require("./sourceData.json"); | |
| content && | |
| Object.keys(content).forEach(contentKey => { | |
| const nestedContent = content[contentKey]; | |
| if (typeof nestedContent === "object") { | |
| Object.keys(nestedContent).forEach(docTitle => { | |
| firebase | |
| .firestore() |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>My Web Page</title> | |
| <style> | |
| .sizeb { | |
| font-size: 50px; | |
| } | |
| .colory { |
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
| { | |
| "AbiaNorth":[ | |
| "Umonneochi", | |
| "Isukwuato", | |
| "Ohafia", | |
| "Arochukwu", | |
| "Bende" | |
| ], | |
| "AbiaCentral":[ | |
| "Umuahia North", |
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 'dart:async'; | |
| import 'package:http/http.dart' as http; | |
| import 'dart:convert'; | |
| void main() { | |
| runApp(new MaterialApp( | |
| home: new MyGetHttpData(), | |
| )); | |
| } |
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 | |
| $rss = new DOMDocument(); | |
| $rss->load('https://glamdfaces.wordpress.com/feed'); | |
| $feed = array(); | |
| foreach ($rss->getElementsByTagName('item') as $node) { | |
| $item = array ( | |
| 'title' => $node->getElementsByTagName('title'), | |
| 'desc' => $node->getElementsByTagName('description'), | |
| 'link' => $node->getElementsByTagName('link'), |
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
| def LongestWord(sen): | |
| sen = sen.split() | |
| sen = max(sen, key=len) | |
| # code goes here | |
| return sen | |
| # keep this function call here | |
| print LongestWord(raw_input()) |
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
| def timeConversion(s): | |
| time = s | |
| if time[-2:] == "AM" and time[:2] == "12": | |
| return "00"+time[2:-2] | |
| elif time[-2:] == "AM": | |
| return time[:-2] | |
| elif time[-2:] == "PM" and time[:2] == "12": | |
| return time[:-2] | |
| else: | |
| return str(int(time[:2]) + 12) + time[2:8] |
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
| //1. Can be used in Navbar/base filr | |
| import firebase from 'firebase'; | |
| export default { | |
| name: 'navbar', | |
| data() { | |
| return { | |
| isLoggedIn: false, | |
| currentUser: false | |
| }; | |
| }, |
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
| web: gunicorn <project_name.wsgi> |