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 trie | |
| // TrieNode represents each node in the Trie | |
| type TrieNode struct { | |
| children map[rune]*TrieNode | |
| isEnd bool | |
| } | |
| // Trie is the main data structure | |
| type Trie struct { |
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
| from rest_framework.decorators import api_view, authentication_classes, permission_classes | |
| from rest_framework.authentication import SessionAuthentication, TokenAuthentication | |
| from rest_framework.permissions import IsAuthenticated | |
| from rest_framework.response import Response | |
| from rest_framework import status | |
| from django.shortcuts import get_object_or_404 | |
| from django.contrib.auth.models import User | |
| from rest_framework.authtoken.models import Token |
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:firebase_auth/firebase_auth.dart'; | |
| import 'package:google_sign_in/google_sign_in.dart'; | |
| class Auth{ | |
| final FirebaseAuth auth = FirebaseAuth.instance; | |
| // create user with email and password | |
| Future<User?> createUserWithEmailAndPassword({required String email, required String password}) async{ | |
| final UserCredential userCredential = await auth.createUserWithEmailAndPassword(email: email, password: password); | |
| final User? user = userCredential.user; | |
| return user; |
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 | |
| // in this file, the callback is request body is received from safaricom and saves the logs in a file. this response executes the querys inside the if statement. as simple as that! or was it.. | |
| include 'connection.php'; | |
| header("Content-Type: application/json"); | |
| $response = '{ | |
| "requestBodyReceived": 0, | |
| "ResultDesc": "Confirmation Received Successfully" | |
| }'; | |
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
| const express = require('express'); | |
| const app = express(); | |
| const bodyParser = require('body-parser'); | |
| const request = require('request'); | |
| app.use(bodyParser.json()); | |
| app.listen(3000, () => { | |
| console.log('Server started on port 3000'); | |
| }); |