Skip to content

Instantly share code, notes, and snippets.

View soundmasteraj's full-sized avatar

AJW soundmasteraj

  • Orbiting a virtual particle
View GitHub Profile
public class DemoPresenter extends DemoBasePresenter<DemoContract.View> implements DemoContract.Presenter {
@Inject
public DemoPresenter(DemoContract.View view) {
super(view);
}
@Override
public void unSubscribe() {
public interface DemoContract {
interface View extends DemoBaseContract.ActivityView {
}
interface Presenter extends DemoBaseContract.Presenter {
}
}
@nikhilym
nikhilym / elicit_slot_handler_example.py
Last active September 6, 2018 11:19
Adding ElicitSlotDirective through ASK Python SDK
## Example directive, from https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html#elicitslot
from ask_sdk_model.dialog import ElicitSlotDirective
from ask_sdk_model import (
Intent, IntentConfirmationStatus, Slot, SlotConfirmationStatus)
directive = ElicitSlotDirective(
slot_to_elicit="fromCity",
updated_intent=Intent(
name="planMyTrip",
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
Part of the Processing project - http://processing.org
Copyright (c) 2012-15 The Processing Foundation
Copyright (c) 2004-12 Ben Fry and Casey Reas
Copyright (c) 2001-04 Massachusetts Institute of Technology
This library is free software; you can redistribute it and/or
@nhancv
nhancv / demo3.dart
Last active April 6, 2018 02:32
Simple particle motion
import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/animation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
class DemoPage extends StatefulWidget {
@override
_DemoPageState createState() => new _DemoPageState();
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
int numFrames = 100;
PVector field(float x,float y){
float amount = 2.5;
float scale = 0.03;
float radius = 0.45;
double value1 = 400.0*noise.eval(scale*x,scale*y,radius*cos(TWO_PI*1.0*(frameCount-1)/numFrames),radius*sin(TWO_PI*1.0*(frameCount-1)/numFrames));
double value2 = 400.0*noise.eval(1000+scale*x,scale*y,radius*cos(TWO_PI*1.0*(frameCount-1)/numFrames),radius*sin(TWO_PI*1.0*(frameCount-1)/numFrames));
//int value2 = (int) Math.round(value);
float parameter1 = (int) Math.round(value1)/100.0;