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 <string.h> | |
#include <snappy-c.h> | |
// Fungsi C hanya menerima data input | |
char* compressData(const char* input) { | |
size_t inputLength = strlen(input); | |
size_t maxCompressedLength = snappy_max_compressed_length(inputLength); |
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 timer_glob_sec = 0, | |
timer_glob_sec_2 = 0, | |
prohod = 0, | |
timer_glob_sec_temp = 0, | |
okruglit = 0, | |
kotirovka = 0, | |
onetiksec_on = 0, | |
gorizontal_on = 0; | |
var gorizontmini; |
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
#!/usr/bin/python2 | |
# Copyright (C) 2016 Sixten Bergman | |
# License WTFPL | |
# | |
# This program is free software. It comes without any warranty, to the extent | |
# permitted by applicable law. | |
# You can redistribute it and/or modify it under the terms of the Do What The | |
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See |
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 cPickle | |
import bz2 | |
def save(filename, myobj): | |
""" | |
save object to file using pickle | |
@param filename: name of destination file | |
@type filename: str |
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
//Reference: https://www.youtube.com/watch?v=Dt0KQg52c6c | |
class RSIIndicator { | |
int n; | |
RSIIndicator([this.n = 14]); | |
List<double> calculate({List<double> close}) { | |
var res = <double>[]; | |
int firstBar = n + 1; | |
var gain = []; |
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'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
class RawKeyboardWidget extends StatefulWidget { | |
final Widget child; | |
RawKeyboardWidget({@required this.child}); | |
@override |
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 is a sample macOS-app-bundling program to demonstrate how to | |
// automate the process described in this tutorial: | |
// | |
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
// | |
// Bundling the .app is the first thing it does, and creating the DMG is the | |
// second. Making the DMG is optional, and is only done if you provide | |
// the template DMG file, which you have to create beforehand. | |
// | |
// Example use: |
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 'package:model/blocs/base_bloc.dart'; | |
/// Used to give [child] and all it's subsequent children access to [blocs]. | |
/// To get a reference to 'SomeBloc' from a child use: BlocsProvider.of<SomeBloc>(context) | |
class BlocsProvider extends StatefulWidget { | |
BlocsProvider({Key key, @required this.child, @required this.blocs}) | |
: super(key: key); | |
final Widget child; |
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/animation.dart'; | |
import 'package:flutter/material.dart'; | |
class AutoScrollText extends StatefulWidget { | |
final double height; | |
final List<Widget> items; | |
AutoScrollText({this.height = 24.0, this.items}); | |
@override | |
State<StatefulWidget> createState() => new _AutoScrollTextState(); |
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
Widget getErrorWidget(BuildContext context, FlutterErrorDetails error) { | |
return Center( | |
child: Text( | |
"Error appeared.", | |
style: Theme.of(context).textTheme.title.copyWith(color: Colors.white), | |
), | |
); | |
} | |
class MyApp extends StatelessWidget { |
NewerOlder