- Create Directory for your app
mkdir my-app
- get the sapper template
npx degit "sveltejs/sapper-template#rollup"
- Install the packages
npm i
- Install express server
npm i express
- Initialize Firebase
firebase init
This file contains 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/services.dart'; | |
import 'package:intl/intl.dart'; | |
class CurrencyPtBrInputFormatter extends TextInputFormatter { | |
TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) { | |
if(newValue.selection.baseOffset == 0){ | |
return newValue; | |
} |
This file contains 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
(defn component [] | |
(js/Reflect.construct js/HTMLElement #js [] component)) | |
(set! (.-prototype component) | |
(js/Object.create (.-prototype js/HTMLElement) | |
#js {:connectedCallback | |
#js {:configurable true | |
:value | |
(fn [] | |
(this-as this |
This file contains 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:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
This file contains 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
(ns api-server.file-io | |
(:use [clojure.tools.logging :only (info warn error)]) | |
(:import (java.nio.channels CompletionHandler AsynchronousFileChannel) | |
(java.nio ByteBuffer) | |
(java.nio.file.attribute FileAttribute) | |
(java.nio.file StandardOpenOption) | |
(java.util.concurrent Executors)) | |
(:require [clojure.core.async :as async :refer [chan go put! close!]] | |
[clojure.java.io :as io])) |
This file contains 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
(ns ussd.fsm-utils | |
(:require | |
[clojure.string :as str] | |
[clojure.edn :as edn] | |
[ussd.sms :as sms])) | |
(defn check-via | |
[via] | |
(let [choices (:choices (edn/read-string (slurp "../../ussd_fsm.edn")))] | |
(if (contains? choices via) |
This file contains 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package areacalculator; | |
import javax.swing.*; | |
/** | |
* |
This file contains 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
// We will be doing animation in OpenGL | |
// key concepts are: | |
// 1. the idle function - idle() will post a replaint and this will lead to activation of the display() function | |
// 2. Also we will be doing double buffering like this: glutInitDisplayMode(GLUT_DOUBLE); | |
// In addition we will be introducing other functions such as glPushMatrix, glPopMatrix and glSwapBuffers | |
#include <windows.h> | |
#include <GL/glut.h> | |
#include <GL/gl.h> |
This file contains 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
/** GL02Primitive.cpp: Vertex, Primitive and Color* Draw Simple 2D colored Shapes: quad, triangle and polygon.*/ | |
#include <windows.h> // for MS Windows | |
#include <GL/glut.h> // GLUT, include glu.h and gl.h/* Initialize OpenGL Graphics */ | |
void initGL() { | |
glMatrixMode(GL_PROJECTION); | |
glLoadIdentity(); | |
gluOrtho2D(0.0, 1000.0, 0.0, 1000.0); | |
glViewport(0,0,1000,1000); | |
glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // Black and opaque |