Last Updated: 2020-02-21
Author: Muhammad Fathy Rashad
Credit and References: Write your first flutter app, Flutter Movie App
Flutter is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.
In this codelab, you'll create a simple mobile Flutter app. If you're familiar with object-oriented code and basic programming concepts—such as variables, loops, and conditionals—then you can complete the codelab. You don't need previous experience with Dart or mobile programming.
In this codelab, you're going to build a simple movie app using Flutter and TMDB API. Your app will fetch the data of several movies from TMDB, and show it in a beautiful list on the app.
The following image shows the resulting app of this codelab:
You need two pieces of software—the Flutter SDK and an editor. (The codelab assumes that you're using Android Studio, but you can use your preferred editor.)
To install this you can follow the official installation guide or you can use our own guide (Windows only) for simpler setup with images or visual aid.
You can run the codelab by using any of the following devices:
If you want to compile your app to run on the web, you must enable this feature (which is currently in beta). To enable web support, use the following instructions:
$ flutter channel beta
$ flutter upgrade
$ flutter config --enable-web
You need only run the config command once. After enabling web support, every Flutter app you create also compiles for the web. In your IDE under the devices pulldown, or at the command line using flutter devices, you should now see Chrome and Web server listed. The Chrome device automatically starts Chrome. The Web server starts a server that hosts the app so that you can load it from any browser. Use the Chrome device during development so that you can use DevTools, and the web server when you want to test on other browsers. For more information, see Building a web application with Flutter and Write your first Flutter app on the web.
Create a simple, templated Flutter app by using the instructions in Create the app. Enter startup_namer (instead of myapp) as the project name. You'll modify the starter app to create the finished app.
Tip: If you don't see the ability to start a new Flutter project as an option in your IDE, then make sure that you have the plugins installed for Flutter and Dart.
You'll mostly edit lib/main.dart, where the Dart code lives.
Replace the contents of lib/main.dart.
Delete all of the code from lib/main.dart and replace it with the following code, which displays "Hello World" in the center of the screen.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(
title: const Text('Welcome to Flutter'),
),
body: const Center(
child: const Text('Hello World'),
),
),
);
}
}
Tip: When pasting code into your app, indentation can become skewed. You can fix it with the following Flutter tools:
Run the app. You should see either Android or iOS output, depending on your device.
Android | iOS |
Tip: The first time that you run on a physical device, it can take a while to load. Afterward, you can use hot reload for quick updates. In supported IDEs, Save also performs a hot reload if the app is running. When running an app directly from the console using flutter run, enter r to perform hot reload.
Observations
Before we start coding anything, we should plan how we want to layout the screen to achieve our target look.
From this image, you can infer what the widget tree looks like.
Replace the Scaffold body with a Column. Column widget has a children property where you can give a list of Widgets to it. Then, put a Text widget as our header inside the Column children.
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies', //Change title to ‘Movies'
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'), //Change title to ‘Movies'
),
body: Column( //Add from this line
children: <Widget>[
Text("Discovery")
],
) //Until this line
),
);
}
}
After you change this you will see the text shows on the screen. However it looks nothing like our desired look, which is why you will stylize it.
The Text widget has a style property, which expects a TextStyle widget. In TextStyle widget you can set the font size, weight, style and many others properties.
We will increase the font size and bold it.
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Text("Discover", //Edit from this line
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
) //To this line
],
)
),
);
}
}
The result should be like this.
It looks better now, but you will notice the text is too close to the edge and we want it to have some space. The solution for this is Padding. You can wrap the Text in a Padding or Container widget. Both have a padding property where it expects EdgeInsets widget.
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Padding( //Edit from this line
padding: const EdgeInsets.all(12.0),
child: Text("Discover",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
),
) //To this line
],
)
),
);
}
}
The results should be like this:
Congratulations! Finally, the header looks like what we want. Now we can move to the next step.
In this section we will create a movie card as shown in our final app image, but only one card and not a list of cards..
Flutter has a Card widget, which gives us a shadow effect. It has elevation properties which determine how heavy the shadow will be. However Card does not have a width or height property. So we add a Container widget inside the card to set its size.
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(12.0),
child: Text("Discover",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
),
),
Padding( // Add from this line
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: Container(
height: 200,
),
),
) // Until this line
],
)
),
);
}
}
The results should be like this:
Although we have a nice card now, the code has become bigger and looks messy. It is time for us to modularize the code to make it easier to manage and also reusable. We will create our own custom widget that will contain the movie card. As the movie card data will not change, it will be a stateless widget.
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(12.0),
child: Text("Discover",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
),
),
MovieCard() //Edit this line
],
)
),
);
}
}
class MovieCard extends StatelessWidget { //Add from this line
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: Container(
height: 200,
),
),
);
}
}
The resulting screen should have no changes from the previous one as we are not adding anything, but only improving our code to be better.
Now you have your own MovieCard widget that can be easily reused. For example, you can add another MovieCard inside the column so that you will have 2 cards.
Next, we will add the movie poster inside the card. Note that we will not put Image directly inside the card. Based on what we planned on the layout before, the card has two parts: the movie poster and the movie description. Hence, we need to use Row widget. Additionally we will also wrap the Image in a Container so we are able to set the size.
lib/main.dart
class MovieCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
)
],
),
),
);
}
}
Now the screen should look like this:
Next, you will add the description part.
The text component of the card consists of column of title and the description. We will also use SizedBox widget to quickly create some space between the title and description. This is easier than using padding in some cases.
class MovieCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
Expanded( // Add from this line
child: Container(
height: 180,
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Ip Man 4: The Finale',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold
)
),
SizedBox(height: 10),
Expanded(child: Text('Following the death of his wife, Ip Man travels to San Francisco to ease tensions between the local kung fu masters and his star student, Bruce Lee, while searching for a better future for his son.'))
],
),
),
) // To this line
],
),
),
);
}
}
Observation:
The resulting app should look like this:
In this section, we will now fetch the data from the TMDB API instead of hardcoding it and show it using ListView widget
ListView widget is the widget that you can use to show a list. It requires 2 properties that you need to give `itemCount` and `itemBuilder`. `itemBuilder` property expects a function that will be run x times based on the value of itemCount. So if `itemCount` is set to 5, the ListView will run the `itemBuilder` function 5 times.
Expanded widget is a similar widget to Container, however instead of needing us to specify the size, it will fill the rest of the empty space available. Hence, the ListView will be allocated the space from just below the ‘Discovery' text until the end of the screen. Alternatively, you can also use Container widget with the height set instead of Expanded widget.
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(12.0),
child: Text("Discover",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
),
),
Expanded( // Edit this line
child: ListView.builder(
itemCount: 6,
itemBuilder: (context, i) => MovieCard()),
), // Until this line
],
)
),
);
}
}
Result will be :
For the movie data, we will be getting it from TMDB as they provide a nice API for it. First we need to get an API key which is what TMDB uses to authorize API requests to their website.
TMDB required people to register to get an API key. Then, you can apply for an API key by clicking the "API" link from the left hand sidebar within your account settings page. TMDB will give you the API key immediately after you fill in the details. Feel free to read their FAQ page for more info.
Add the following code at the end of your code, this will get the data from TMDB. Make sure you replace the YOUR_API_KEY with your own TMDB API key that you obtained previously.
lib/main.dart
Future<Map> getJson() async {
var url =
'http://api.themoviedb.org/3/discover/movie?api_key=YOUR_API_KEY';
http.Response response = await http.get(url);
return json.decode(response.body);
}
Adding the code will give you an error as it requires you to have an http package. To add the http package, you need to edit the `pubspec.yaml` and add `http:` under dependencies.
Pubspec.yml is the file where you can configure a lot of settings such as the name and description of the app, library/packages dependencies that are required, and assets that you are using.
You need to add the http package under the dependencies, make sure the indentation is correct:
pubspec.yaml
dependencies:
flutter:
sdk: flutter
http: //Add this line
Then, press the `Packages get` or `Get Dependencies` button that appeared to install the required package near the top of android studio. Alternatively, you run `flutter pub get` on theterminal.
Afterwards add these imports on the top of you `main.dart` file.
lib/main.dart
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
You should not get an error after this.
As we are fetching data from the internet. The movie data are not constant anymore, since at the start the movies are empty until the moment the app finished getting the data from TMDB.
Type `stful` on your code and press enter. It will generate the code required to create a Stateful Widget. Name the widget `MovieList`.
After typing `stful` you should get a code like this:
lib/main.dart
class MovieList extends StatefulWidget {
@override
_MovieListState createState() => _MovieListState();
}
class _MovieListState extends State<MovieList> {
@override
Widget build(BuildContext context) {
return Container(); //Replace this with the Expanded ListView on MyApp
}
}
Then copy paste the ListView builder with the expanded as well into the Container in _MovieListState
You should get the following code:
lib/main.dart
class MovieList extends StatefulWidget {
@override
_MovieListState createState() => _MovieListState();
}
class _MovieListState extends State<MovieList> {
@override
Widget build(BuildContext context) {
return Expanded( //Replaced the previous Container
child: ListView.builder(
itemCount: 6,
itemBuilder: (context, i) => MovieCard()),
);
}
}
So now we have modularized/refactored the ListView code into our new MovieList Widget
Then, we can replace the Expanded(ListView) part with the MovieList widget.
Now our MyApp widget should look like this:
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Scaffold(
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(12.0),
child: Text("Discover",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
),
),
MovieList(), // Add this
// Expanded( // Remove this
// child: ListView.builder(
// itemCount: 6,
// itemBuilder: (context, i) => MovieCard()),
// ),
],
)
),
);
}
}
Our app now should still look like previou one but we are using stateful widget this time.
Now we want to show the movies data from the TMDB, so we create a `movies` variable so we can store the movies data that we get. And MovieList widget can access the data through the variable.
lib/main.dart
class _MovieListState extends State<MovieList> {
var movies; // Add this
void getData() async { //Add this function
var data = await getJson();
setState(() {
movies = data['results'];
});
} //Until here
@override
Widget build(BuildContext context) {
getData(); // Dont forget to call the function here, so it run the fetching code
return Expanded(
child: ListView.builder(
itemCount: 6,
itemBuilder: (context, i) => MovieCard()),
);
}
}
Change your MovieCard to receive a parameter which will be the movie data
lib/main.dart
class MovieCard extends StatelessWidget {
final movie; // Add this
MovieCard(this.movie); // Add this
// the rest of the code
Then edit your itemBuilder and ItemCount property in your ListView Widget.
lib/main.dart
class _MovieListState extends State<MovieList> {
var movies; // Add this
Future<void> getData() async { //Add this function
try {
var data = await getJson();
setState(() {
movies = data['results'];
});
}
catch (error) { print(error);}
} //Until here
@override
Widget build(BuildContext context) {
getData();
return Expanded(
child: ListView.builder(
itemCount: movies == null ? 0 : movies.length, // Edit this
itemBuilder: (context, i) => MovieCard(movies[i])), //Edit this
);
}
}
Then change your MovieCard title, image, and and description to use the `movie` variable.
lib/main.dart
class MovieCard extends StatelessWidget {
final movie;
MovieCard(this.movie);
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network("https://image.tmdb.org/t/p/w500/${movie[‘poster_path']}") // Edit this
),
Expanded(
child: Container(
height: 180,
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(movie['title'], // Edit this
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold
)
),
SizedBox(height: 10),
Expanded(child: Text(movie['overview'])) // Edit this
],
),
),
)
],
),
),
);
}
}
The final result should be
:
Flutter provides a lot of widgets that have a button's functionalities such as FlatButton, RaisedButton, GestureDetector and many others. Most of these Widgets have something in common, which is the `onPressed ` or `onTap` properties where you can specify the function that will be run when you click/tap on the button.
However, we will be using the InkWell widget for our app. The unique thing about InkWell is that they will show a ripple effect when you pressed the button.
In MovieCard class, wrap the Row widget just inside the Card widget with an InkWell widget.
lib/main.dart
class MovieCard extends StatelessWidget {
final movie; // Add this
MovieCard(this.movie); // Add this
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: InkWell( //Wrapped Row with InkWell
onTap: () {}, //Add this as well
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network('https://image.tmdb.org/t/p/w500/${movie['poster_path']}')
),
Expanded(
child: Ink(
height: 180,
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(movie['title'],
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold
)
),
SizedBox(height: 10),
Expanded(child: Text(movie['overview']))
],
),
),
)
],
),
),
),
);
}
}
Observation:
The MovieCard should be clickable after the changes:
In this section we will learn how to navigate between different screens.
When we have multiple screens for the app, the best practice is to separate each screen into different files to make managing it easier.
Create a folder inside `lib` and name it `screens`. This is where we will put all our screens file.
lib/screens/home.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
}
}
The final code should look like these:
lib/main.dart
import 'package:flutter/material.dart';
// Remove the unused import as we moved the getJson function to other file
//import 'dart:async';
//import 'dart:convert';
//import 'package:http/http.dart' as http;
import 'screens/home.dart'; // Import home.dart
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Home() // Replaced Scaffold with the imported home.dart
);
}
}
lib/screens/home.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold( // Replaced Container with Scaffold copied from main.dart
appBar: AppBar(
title: const Text('Movies'),
),
body: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(12.0),
child: Text("Discover",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold
)
),
),
MovieList(), // Add this
],
)
);
}
}
// Added code
class MovieList extends StatefulWidget {
@override
_MovieListState createState() => _MovieListState();
}
class _MovieListState extends State<MovieList> {
var movies; // Add this
Future<void> getData() async { //Add this function
try {
var data = await getJson();
setState(() {
movies = data['results'];
});
}
catch (error) { print(error);}
} //Until here
@override
Widget build(BuildContext context) {
getData();
return Expanded(
child: ListView.builder(
itemCount: movies == null ? 0 : movies.length, // Edit this
itemBuilder: (context, i) => MovieCard(movies[i])), //Edit this
);
}
}
class MovieCard extends StatelessWidget {
final movie; // Add this
MovieCard(this.movie); // Add this
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: InkWell(
onTap: () {},
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network('https://image.tmdb.org/t/p/w500/${movie['poster_path']}')
),
Expanded(
child: Ink(
height: 180,
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(movie['title'],
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold
)
),
SizedBox(height: 10),
Expanded(child: Text(movie['overview']))
],
),
),
)
],
),
),
),
);
}
}
Future<Map> getJson() async {
var url =
'http://api.themoviedb.org/3/discover/movie?api_key=20a3f47c1f9a22b518bf93d335169cca';
http.Response response = await http.get(url);
return json.decode(response.body);
}
In this section, we will create a new screen where we show a detailed info of the movie selected.
Preview of the detail screen:
From the image we can plan how we want to layout the app to achieve the desired look.
We can see the screen is based on column, a poster, title, the 3 boxes and finally the description.
Hence our widget tree will look similar to this:
Column
----Poster
----Title
----Row
--------Duration
--------Year
--------Rating
----Description
lib/screens/detail.dart
import 'package:flutter/material.dart';
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
}
}
Replace the container with Scaffold and add an App Bar. Use Column as the body.
lib/screens/detail.dart
import 'package:flutter/material.dart';
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: Column()
);
}
}
However, after you will notice that the app is still showing the home screen. So how do we show our Detail screen?
lib/screens/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
home: Detail() // Replaced Home with the imported detail.dart
);
}
}
Now our app should display the our newly created Detail screen.
Add Image widget inside the Column, wrap it with Container to set the height, and wrap it again with Center to center the widget.
lib/screens/detail.dart
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: Column(
children: <Widget>[
Center( // Added from this line
child: Container(
height: 400,
margin: EdgeInsets.all(40),
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
),
]
)
);
}
}
Now the movie poster will show up on the app.
Next, just add Text widget below the poster image, and stylize it accordingly.
lib/screens/detail.dart
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: Column(
children: <Widget>[
Center(
child: Container(
height: 400,
margin: EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
),
Text("Ip Man 4 The Finale", // Add Movie title
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24
),
)
]
)
);
}
}
The app should look like this now:
Next, we will create the three boxes showing the movie duration, year, and rating. However, we can see that the boxes have the same structure. Hence, instead of repeating the code 3 times, we can create a new InfoCard widget that we can reuse.
Create a new stateless widget named InfoCard that receives a string parameter to be shown as the inside the card.
lib/screens/detail.dart
class InfoCard extends StatelessWidget {
String text = "";
InfoCard(this.text);
@override
Widget build(BuildContext context) {
return Card(
elevation: 4,
child: Container(
height: 80,
width: 80,
padding: EdgeInsets.all(10),
child: Column(
children: <Widget>[
Text(text),
],
)
)
);
}
}
Then add the InfoCard widget below the Movie Title to see what the widget look like.
lib/screens/detail.dart
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: Column(
children: <Widget>[
Center(
child: Container(
height: 400,
margin: EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
),
Text("Ip Man 4 The Finale",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24
),
),
InfoCard("Some Info") // Added InfoCard
]
)
);
}
}
The app should look like this:
Add an Icon on the InfoCard and also SizedBox to create some space between the icon and the text.
lib/screens/detail.dart
class InfoCard extends StatelessWidget {
String text = "";
InfoCard(this.text);
@override
Widget build(BuildContext context) {
return Card(
elevation: 4,
child: Container(
height: 80,
width: 80,
padding: EdgeInsets.all(10),
child: Column(
children: <Widget>[
Icon(Icons.timer, // Added Icon
size: 35
),
SizedBox(height: 5), // Added SizeBox
Text(text),
],
)
)
);
}
}
Then the app will look like this:
However we do not want the icon for three boxes as the same, hence, we need to use the Icon as parameter instead of hardcoding it.
lib/screens/detail.dart
class InfoCard extends StatelessWidget {
String text = "";
IconData icon; // Add this
InfoCard(this.text, this.icon); // Edit this
@override
Widget build(BuildContext context) {
return Card(
elevation: 4,
child: Container(
height: 80,
width: 80,
padding: EdgeInsets.all(10),
child: Column(
children: <Widget>[
Icon(icon, // edit this
size: 35
),
SizedBox(height: 5),
Text(text),
],
)
)
);
}
}
Then do not forget to pass the new icon parameter to the InfoCard in Detail class.
lib/screens/detail.dart
InfoCard("Hello", Icons.timer)
Now finally, wrap the InfoCard in Row, and create the three boxes according to its icon and text. Additionally add a SizedBox between the Title and the info boxes.
lib/screens/detail.dart
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: Column(
children: <Widget>[
Center(
child: Container(
height: 400,
margin: EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
),
Text("Ip Man 4 The Finale",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24
),
),
SizedBox( // Added SizedBox
height: 20,
),
Row( // Edited this line
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
InfoCard('124 min', Icons.timer),
InfoCard('2018', Icons.calendar_today),
InfoCard('8.4/10', Icons.star)
],
)
]
)
);
}
}
Now your app will look like this:
Next we will at the movie description at the bottom.
lib/screens/detail.dart
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: Column(
children: <Widget>[
Center(
child: Container(
height: 350,
margin: EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
),
Text("Ip Man 4 The Finale",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24
),
),
SizedBox(
height: 20,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
InfoCard('124 min', Icons.timer),
InfoCard('2018', Icons.calendar_today),
InfoCard('8.4/10', Icons.star),
],
),
Padding( // Added from this line
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40.0),
child: Text('Following the death of his wife, Ip Man travels to San Francisco to ease tensions between the local kung fu masters and his star student, Bruce Lee, while searching for a better future for his son.',
style: TextStyle(fontSize: 18)
),
)
]
)
);
}
}
However, as you added the text, you will notice you will get an error because the text overflowed the screen. This is because flutter will not make your app scrollable automatically when your widget exceeds the screen height. To solve this, we need to use a scrolling widget which in this we will be using SingleChildScrollView widget.
Wrap your Top most column with a SingleChildScrollView.
lib/screens/detail.dart
class Detail extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Movie Title')
),
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Center(
child: Container(
height: 350,
margin: EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Image.network('https://image.tmdb.org/t/p/w500/yJdeWaVXa2se9agI6B4mQunVYkB.jpg')
),
),
Text("Ip Man 4 The Finale",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24
),
),
SizedBox(
height: 20,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
InfoCard('124 min', Icons.timer),
InfoCard('2018', Icons.calendar_today),
InfoCard('8.4/10', Icons.star),
],
),
Padding( // Added from this line
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40.0),
child: Text('Following the death of his wife, Ip Man travels to San Francisco to ease tensions between the local kung fu masters and his star student, Bruce Lee, while searching for a better future for his son.',
style: TextStyle(fontSize: 18)
),
)
]
),
)
);
}
}
Now your detail screen should be scrollable:
In Flutter, screens or pages are usually called routes. To start navigating between screens, you need to define all the screens available by setting the routes property in MaterialApp.
Add the Home and Detail routes to the MaterialApp in `main.dart`
lib/main.dart
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Movies',
//home: Home(), // Remove this
routes: { // Added routes
'/' : (context) => Home(),
'/detail': (context) => Detail()
}
);
}
}
Observation
To navigate to other screen, you just need to use the following code:
Navigator.pushNamed(context, ‘/routeName')
Now, we can implement the pressed function in the movie list. If any of the movie cards are tapped, the app should navigate to the movie detail screen.
Add the Navigation code on InkWell onTap property
lib/screens/home.dart
class MovieCard extends StatelessWidget {
final movie; // Add this
MovieCard(this.movie); // Add this
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: InkWell(
onTap: () {
Navigator.pushNamed(context, '/detail'); // Add this line
},
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network('https://image.tmdb.org/t/p/w500/${movie['poster_path']}')
),
Expanded(
child: Ink(
height: 180,
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(movie['title'],
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold
)
),
SizedBox(height: 10),
Expanded(child: Text(movie['overview']))
],
),
),
)
],
),
),
),
);
}
}
Now, the app should look like this
However, notice that the Movie data on detail screen are hardcoded and not following the tapped movie.
The Navigator provides the ability to navigate to a named route from any part of an app using a common identifier. In some cases, you might also need to pass arguments to a named route. In our case, we want to navigate to the /detail route and pass information about the movie to that route.
You can accomplish this task using the arguments parameter of the Navigator.pushNamed() method. Then extract the arguments using the ModalRoute.of() method inside the widget where we navigated to.
Pass the movie data as arguments when navigating
lib/screens/home.dart
class MovieCard extends StatelessWidget {
final movie; // Add this
MovieCard(this.movie); // Add this
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Card(
elevation: 5,
child: InkWell(
onTap: () {
Navigator.pushNamed(context, '/detail', arguments: { // Edit this line
'movie': movie
});
},
child: Row(
children: <Widget>[
Container(
height: 180,
child: Image.network('https://image.tmdb.org/t/p/w500/${movie['poster_path']}')
),
Expanded(
child: Ink(
height: 180,
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(movie['title'],
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold
)
),
SizedBox(height: 10),
Expanded(child: Text(movie['overview']))
],
),
),
)
],
),
),
),
);
}
}
Next, we need to extract the data on the next screen then replace the hardcoded value with the extracted movie data.
lib/screens/detail.dart
class Detail extends StatelessWidget {
var movie; // Added movie variable
@override
Widget build(BuildContext context) {
Map data = ModalRoute.of(context).settings.arguments; // Added this line
movie = data['movie']; // Added this line
return Scaffold(
appBar: AppBar(
title: Text('Movie Title') // Edited this line
),
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Center(
child: Container(
height: 350,
margin: EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Image.network("https://image.tmdb.org/t/p/w500/${movie['poster_path']}") // Edited this line
),
),
Text(movie['title'], // Edited this line
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24
),
),
SizedBox(
height: 20,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
InfoCard('~ min', Icons.timer), // Edited
InfoCard(movie['release_date'].substring(0, 4), Icons.calendar_today), // Edited
InfoCard('${movie['vote_average']}/10', Icons.star), // Edited
],
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 40.0),
child: Text(movie['overview'], // Edited
style: TextStyle(fontSize: 18)
),
)
]
),
)
);
}
}
Now your app should load the movie detail based on the one you selected.
Congratulations, you have successfully built a Movie App with Flutter!
Feel free to give a star to this workshop if you liked the tutorial.


Input components cover the functionality and styling of text boxes, password text boxes, text areas, select lists, radio buttons, checkboxes, and an integer-only text box.
Text fields with icons are popular for search fields and any other field which requires a pictorial differentiator. The icon field uses the same reference to the icon font as the ias-icon component.
Resizing text areas will grow and shrink based on the contents in the text area. When you add more contents the text area will grow to show all of the contents without scrolling. When you remove some contents the text area will shrink down to the right size.
Integer only input fields show an error style if the value isn't a valid number. The input field
also supports a min
and max
attribute to set the allowable minimum and
maximum values.


volvocars
Cars
Buy
Service
Why Volvo
Build Your Own
Test Drive
Find A Dealer
Used
OUR IDEA OF LUXURY
The new XC90
더 알아보기


NOTICE: The below statement is automatically generated, and will be voided if you amend your registration before payment, or if discounts or products contained in the statement become unavailable. The items and discounts are only reserved until the due time.
{% url "invoice_access" invoice.user.attendee.access_code as access_url %} {% url "invoice" invoice.id invoice.user.attendee.access_code as invoice_url %}You can send the following links to your accounts department to pay for your registration:


Waris Ahluwalia Unveils New Beverage Brand, Frame Gets In the Thanksgiving Spirit
by The Daily Front RowCheck out pics and recaps from all of the chicest fashion fêtes below! And make sure to email us at<EMAIL_ADDRESS>for editorial coverage consideration. Click here to read more party coverage from this month.
Wednesday, November 20
Waris Ahluwalia Unveils New Beverage Brand at Top of The Standard
Actor/designer/entrepreneur Waris Ahluwalia invited VIPs to the Top of The Standard to celebrate the launch of House of Waris Botanicals, a new line of organic teas and beverages. Guests enjoyed an exclusive tasting of the brand’s debut blends. Three distinct bars were set-up throughout the space, featuring the teas, zero-proof beverages, and cocktails made with premium Tanqueray No. TEN.
Guests — including Katie Holmes, Chloe Sevigny, Leigh Lezark, and Young Paris — danced to DJ sets by Paul Sevigny, Justin Miller, and Isaac Likes. Meanwhile, Caroline Vreeland serenaded the crowd, singing a belated happy birthday to Waris.
Frame Gets In the Thanksgiving Spirit
Frame founder Erik Torstensson hosted an intimate Thanksgiving Feast to celebrate friends and family at Morandi in New York. Guests included Nina Agdal, Halima Aden, and Sean O’Pry. As a way to give back this holiday season FRAME will be providing 1000 Thanksgiving meals for families in need with FeedingNYC.
Dree Hemingway Fêtes the Launch of Emilia Wickstead Nightwear
Dree Hemingway and MATCHESFASHION celebrated Emilia Wickstead’s nightwear collection at San Vicente Bungalows in West Hollywood. Guests enjoyed grilled vegetable salad, grilled salmon, cauliflower steak, french fries, orzo pilaf, and flourless chocolate fudge cake.


In 1989 Tim-Berners-Lee submitted a proposal to his boss at CERN which would lead to his initial development of the World Wide Web. This proposal contained a diagram outlining Berners-Lee ideas of how the disparate information systems of CERN could be integrated.
While the bottom-left of the diagram still works as a summary of the WWW as we know it, it also contains certain features that are key to Semantic Web technologies. The nodes in the diagram, things - “This document”, “Hypertext” etc, have different shapes. This suggests that those things are of different types (what those types are isn’t exactly clear…). The arcs in the diagrams, relationships - “describes”, “includes” etc, are directed from one thing to another, linking them. The Semantic Web is all about these notions of things and relationships put on the Web.
identification description follow your nose
In principle the ability to say anything about anything.
In recent years there has been a lot of promotion of Semantic HTML. This is generally about making Web documents more meaningful by choosing HTML tags that are most specific for the content. For example,
Some Text

tells the browser that Some Text is in a division or section of the containing document. While this might be useful for styling, it doesn’t tell you very much about Some Text. In contrast,
Some Text

tells the browser that Some Text is the most important header in that section of the Web page.
It’s perfectly reasonable to interpret Semantic HTML as Semantic Web data, but the scope of this data is limited to the document properties, it tells you nothing of what the document is about.
This isn’t intended to downplay the importance of using Semantic HTML. It can enhance accessibility, searchability, internationalization, and interoperability. All things that are good for the Web.
For many years the only official specification for Semantic Web data was RDF/XML. This format is notoriously difficult to interpret without dedicated tools. It is still in use and does have the advantage that it can be used with standard XML tools, but fortunately there are now many friendlier alternatives.
(As an aside, any XML document can be interpreted as RDF by means of GRDDL).
Metadata is data about data, and typically refers to document metadata, information like the author and publication date of the given document. While this is a hugely important aspect of the Semantic Web, it certainly isn’t everything. As mentioned above, a core idea is the ability to say anything about anything.
Finally, as hopefully will be demonstrated here, it is relatively straightforward both conceptually and in practice, and there will be something virtually every developer will find useful. More than this, a vast number of globally deployed systems use at least some aspects of Semantic Web technologies.
These points can easily be demonstrated by opening Google’s search page at https://www.google.com and viewing the page source.
Out of the 200,000+ characters visible, the vast majority is condensed Javascript. The functionality of this page may not be obvious from the simplicity of the view normally delivered to the browser. It is very sophisticated, and arguably rather difficult.
But the code is wrapped in a HTML page, the outer tag of which is:

The lang
attribute uses a simple piece of text from a well-known specification to say what human language the page is written in. The rest of the tag uses a more interesting approach.
The other parts are intended to be interpreted through the Microdata part of the HTML Specification. The itemscope
attribute says the thing being referred to is the current URL, https://www.google.com. The itemtype
refers to the URL http://schema.org/WebPage
, and the page there describes what a WebPage is.
schema.org vocabulary


--- # You don't need to edit this file, it's empty on purpose. # Edit theme's home layout instead if you wanna make some changes # See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults layout: default --- {% for entry in site.data.poems %}
{% for line in entry.poem %} {{line.line}} {% endfor %}


Circular scanning works just like the elevator to some extent. It begins its scan toward the nearest end and works it way all the way to the end of the system. Once it hits the bottom or top it jumps to the other end and moves in the same direction. Keep in mind that the huge jump doesn't count as a head movement. The total head movement for this algorithm is only 187 track, but still this isn't the mose sufficient.
AdvantagesEXAMPLE : Lets say we are given with the following queue ==> 95, 180, 34, 119, 11, 123, 62, 64 with the Read-write head initially at the track 50 and the tail track being at 199 let us now discuss the different algorithms.


Martin's Aquarium; Courtesy of Jutz'Kar
Toggle Tips
Toggle Quotes
Toggle Fish
Toggle Locations
Words of Wisdom:
Disciples of Jutz'kar:
Show All Fish
Holy Fish
Soldier Fish
Commoners
Destinations:
Tips:


06.Write a function that extracts the content of a html page given as text. The function should return anything that is in a tag, without the tags:"
<title>Sample site</title>
text
more text
and more...
in body
Result:
Sample sitetextmore textand more...in body


|
Robot
The embedded systems for UTRA's autonomous humanoid soccer-playing robot
|
Digital filtering data structures and functions, for IMU data. More...
Modules | |
| Private functions | |
| Functions used internally for writing inputs and initialization. | |
| Public functions | |
| Functions used outside the module. | |
Files | |
| file | MPUFilter.h |
| Header code for IMU filtering. | |
Classes | |
| struct | MPUFilterVel_t |
| Container for angular velocity filter. More... | |
Variables | |
| static const uint16_t | MPUFilter_numTapsVel = 11 |
| Number of filter taps (equal to number of coefficients here) for angular velocity filter. | |
| static const uint16_t | MPUFilter_blockSizeVel = 1 |
| Number of samples buffered before re-computing output. | |
| static const float | MPUFilter_coefficientsVel [11] |
| Filter coefficients for angular velocity filter. (11 - 1)/2 = 5 sample delay. More... | |
| static MPUFilterVel_t | vxFilter |
| Filter for angular velocity along x-axis. | |
| static MPUFilterVel_t | vyFilter |
| Filter for angular velocity along y-axis. | |
| static MPUFilterVel_t | vzFilter |
| Filter for angular velocity along z-axis. | |
Digital filtering data structures and functions, for IMU data.
|
static |
Filter coefficients for angular velocity filter. (11 - 1)/2 = 5 sample delay.
Definition at line 66 of file MPUFilter.cpp.


The Addons module allows admins to upload, install, and uninstall third-party modules.
New modules must be in a zip file and the folder must be named the same as the module. For example if you are uploading the 'forums' module the folder must be named 'forums' not 'test_forums'.
If you want to remove a module from the front-end and from the admin menus you may Disable the module. If you are completely done with it you may Uninstall it. Warning: Uninstalling a module deletes all source files, uploaded files, and database records associated with the module.


Across: 1. As 10 of great noise, rock drums test horn (13) 10. Groin is manipulated for roots (7) 11. Cain's camp perhaps returned somewhere to Israel's north (7) 12. Fix up mere bruise mostly with massage (9) 13. Figure damaged there (5) 14. see 20 15. Bill's follower, perhaps, in Mr Deer animation (8) 18. 8 earned many in the air - in flying sport he was ace (8) 20,14. Operation run by 8 for British amusement (6 6) 23. Voter upset with lack of secrecy (5) 25. Perhaps with the most horn stabs, sire in a bad way (9) 26. Before breaking clear, lie ready (7) 27. Less typical is king that is trapped by retreating rook (7) 28. They addle your senses ... can't her senses be addled? (13) Down: 2. Better protected from cold that is right after hot air (7) 3. Hurl basin about to find bathroom accessory (9) 4. Make reality right in follow-on (6) 5. Joined and battled, but I deserted (8) 6. Domain or section (5) 7,8. Fighter ace went off playing hand for "Merchant of Venice" (7 3 10) 9. Those given to questioning or to arresting suspect (13) 16. Scheme of son is null, just pipe dreams (9) 17. 8 ran bored operation (3 5) 19. Mostly nervous wandering, right in swamp (7) 21. Regularly list terms... in step? (7) 22. Flier, royal pilot, defeated by 8 (6) 24. Stoned after joint, proceeding from "hip" (5)


|
|
Sending BMP085 data to emonCMS using Adafruit library - solved |
6 |
3 years 1 week ago by GJPickard |
3 years 5 days ago by GJPickard |
|
|
Sensor network |
1 |
5 years 39 weeks ago by Guest |
5 years 17 weeks ago by glyn.hudson |
|
|
Seperate monitoring of two inverters in a solar PV array |
1 |
4 years 22 weeks ago by Guest |
4 years 22 weeks ago by glyn.hudson |
|
|
Serial data not getting to EmonCMS |
2 |
2 years 1 day ago by Lionel |
1 year 51 weeks ago by Lionel |
|
|
Setting emonbase post delay |
1 |
4 years 41 weeks ago by Guest |
4 years 41 weeks ago by glyn.hudson |
|
|
Setting up a emonpi - odd PV readings |
9 |
1 year 18 weeks ago by bearded_walker |
1 year 17 weeks ago by bearded_walker |
|
|
Setting up an RFM12 v2 on a Raspberry Pi |
10 |
3 years 12 weeks ago by Miko95 |
3 years 12 weeks ago by Robert Wall |
|
|
share interrupt concept for pulse counting more then two.... |
1 |
4 years 35 weeks ago by Guest |
4 years 35 weeks ago by Guest |
|
|
Shared bias circuit |
17 |
3 years 44 weeks ago by Guest |
3 years 43 weeks ago by dBC |
|
|
Sharing the voltage divider in emontx 3.4 schematics |
2 |
1 year 4 weeks ago by ck6186 |
1 year 3 weeks ago by Robert Wall |
|
|
shieldv2+emoncms says my apartment uses 50MW of power!? |
5 |
2 years 29 weeks ago by vputz |
2 years 29 weeks ago by vputz |
|
|
Short circuit issue on EmonTx2.2 board |
1 |
3 years 20 weeks ago by isep |
3 years 20 weeks ago by Robert Wall |
|
|
Simple Emontx over WIFI / OpenWRT - EmonWRT |
6 |
2 years 47 weeks ago by chacal |
2 years 19 weeks ago by Guest |
|
|
Simple invasive 3-phase energy monitor |
73 |
2 years 23 weeks ago by JBecker |
1 year 9 weeks ago by cosmopaco |
|
|
Simple Reverse Current Detection |
1 |
1 year 13 weeks ago by sidepipe |
1 year 13 weeks ago by calypso_rae |
|
|
Simple test rig for RFM12Bs |
8 |
3 years 50 weeks ago by calypso_rae |
3 years 50 weeks ago by calypso_rae |
|
|
single core mains wire |
3 |
2 years 51 weeks ago by calypso_rae |
2 years 51 weeks ago by cybergibbons |
|
|
SMA SB1600TL |
1 |
4 years 16 weeks ago by Guest |
4 years 16 weeks ago by alco |
|
|
Smaller current CT? |
88 |
4 years 9 weeks ago by jack_kelly |
2 years 2 days ago by bavitalsign |
|
|
SoftwareSerial problems |
5 |
4 years 25 weeks ago by Guest |
4 years 25 weeks ago by Guest |
|
|
Soil moisture measurements integration |
2 |
42 weeks 10 hours ago by marcelb13 |
41 weeks 6 days ago by Ian Eagland |
|
|
Solar Controller / PV Router code - working on 60Hz / 120V power systems |
1 |
3 years 27 weeks ago by Dan Woodie |
3 years 27 weeks ago by MartinR |
|
|
solar power diversion to immersion heater |
17 |
3 years 8 weeks ago by nigeldodd |
2 years 20 weeks ago by calypso_rae |
|
|
Solar PV History Page |
1 |
3 years 43 weeks ago by jagerp |
3 years 43 weeks ago by Robert Wall |
|
|
Solar PV Monitoring System |
5 |
4 years 45 weeks ago by Guest |
4 years 44 weeks ago by Guest |
|
|
Solar PV power diversion with emonTx V3 using a PLL and temperature measurement |
11 |
3 years 1 week ago by AllenConquest |
2 years 51 weeks ago by Robert Wall |
|
|
Solar/Wind micro-generation monitoring with two emonTXs |
2 |
4 years 17 weeks ago by markp |
4 years 17 weeks ago by markp |
|
|
Sold Out :( |
3 |
4 years 48 weeks ago by Guest |
4 years 47 weeks ago by glyn.hudson |
|
|
soldering |
4 |
3 years 24 weeks ago by Guest |
3 years 24 weeks ago by Guest |
|
|
Soldering Iron |
0 |
3 years 31 weeks ago by PaulOckenden |
n/a |
|
|
Solved - Unable to communicate [UNO+EmonTX Shield with Raspi+RFM12Pi] |
1 |
3 years 3 weeks ago by Guest |
3 years 3 weeks ago by Guest |
|
|
Solved - Problem with Nanode RF reaching personal Emoncms server - 403 Forbidden error |
17 |
3 years 32 weeks ago by Dan Woodie |
3 years 31 weeks ago by Dan Woodie |
|
|
Solved: DS18B20 sometimes no measurements? |
6 |
3 years 12 weeks ago by jb79 |
3 years 9 weeks ago by Robert Wall |
|
|
Solved: emonpi update fails with avrdude error : stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x10 |
6 |
49 weeks 4 days ago by jsroques |
48 weeks 2 days ago by jsroques |
|
|
SOLVED: GLCD display stops working after a short period |
2 |
3 years 7 weeks ago by mdbigg |
3 years 7 weeks ago by mdbigg |
|
|
Source for Australian AC-AC adapter for voltage monitoring? |
1 |
5 years 8 weeks ago by Guest |
5 years 6 weeks ago by Guest |
|
|
Speed of reading Dallas DS18B20 |
1 |
4 years 29 weeks ago by Lloyd |
4 years 22 weeks ago by Sergegsx |
|
|
Stacking emon tx shield |
2 |
3 years 4 weeks ago by Guest |
3 years 4 weeks ago by Guest |
|
|
Standardization of various Libraries? |
0 |
1 year 12 weeks ago by 321liftoff |
n/a |
|
|
Starter Kit |
5 |
2 years 49 weeks ago by Guest |
2 years 38 weeks ago by Robert Wall |
|
|
starting with the openEnergyMonitor |
2 |
3 years 5 weeks ago by davime |
3 years 5 weeks ago by davime |
|
|
Static IP EmonCMS Server - Still supported in the current code? |
5 |
4 years 46 weeks ago by nz.mike.christiansen |
4 years 45 weeks ago by Lloyd |
|
|
stm32f7-discovery |
0 |
1 year 10 weeks ago by janschmi |
n/a |
|
|
Strange Behaviour from EmonTX temperature node |
9 |
3 years 43 weeks ago by john.b |
3 years 42 weeks ago by john.b |
|
|
Strange network issue |
14 |
4 years 45 weeks ago by Lloyd |
4 years 44 weeks ago by Lloyd |
|
|
Strange results with 3-phase 400V input |
6 |
3 years 2 weeks ago by tocson |
3 years 6 days ago by Guest |
|
|
String to integer via rfmb12 |
2 |
2 years 45 weeks ago by jonrescca |
2 years 45 weeks ago by Robert Wall |
|
|
Stupid schoolboy error |
8 |
3 years 14 weeks ago by dod |
3 years 13 weeks ago by dod |
|
|
Success with monitoring a gas meter |
8 |
1 year 20 weeks ago by engeeaitch |
1 year 19 weeks ago by Robert Wall |
|
|
Success! |
2 |
3 years 46 weeks ago by Paul Reed |
3 years 46 weeks ago by Paul Reed |


https://w3id.org/landrs/def/ontologies/
This ontology is developed as part of the Sloan Funded LANDRS project to advance UxV data interoperability
http://www.w3.org/ns/dcat#
http://purl.org/dc/terms/
http://usefulinc.com/ns/doap#
https://w3id.org/landrs/def/ontologies/
https://w3id.org/landrs/def/ontologies/shapes/
https://w3id.org/landrs/def/ontologies/core/
https://w3id.org/landrs/def/ontologies/core/owlrl/
https://w3id.org/landrs/def/ontologies/patterns/
http://w3id.org/nkos/nkostype
http://www.w3.org/ns/org#
http://www.w3.org/2002/07/owl#
http://www.w3.org/ns/dx/prof/
http://www.w3.org/ns/prov#
http://www.w3.org/1999/02/22-rdf-syntax-ns#
http://www.w3.org/2000/01/rdf-schema#
http://www.w3.org/ns/dx/prof/role/
https://schema.org/
http://www.w3.org/ns/shacl#
http://www.w3.org/2004/02/skos/core#
http://purl.org/vocab/vann/
http://w3id.org/version/ontology
http://purl.org/vocommons/voaf#
http://www.w3.org/2001/XMLSchema#
| c | Classes |
| op | Object Properties |
| fp | Functional Properties |
| dp | Data Properties |
| dp | Annotation Properties |
| p | Properties |
| ni | Named Individuals |


“Kibana is an open source data visualization platform that allows you to interact with your data through stunning, powerful graphics. From histograms to geomaps, Kibana brings your data to life with visuals that can be combined into custom dashboards that help you share insights from your data far and wide.”
No particular installation required. Simply point your browser to http://kibana.yourdomain.com and login with the supplied credentials.
If used with Fluentd, the data will automatically be populated.


This week progress, focused in initializing website in production
environment. There is some problem surfaced. Below is the detail for
this week report.
Achievement :
- Init wordpress in production environment.
-
Init Stack (themes) and all the plugin needed in production
environment without any demo data. Why not import demo data?
Because its tiresome to clean up the mess made by demo data.
-
Added some necessary pages like front page, about page, portofolio
page, our team page, updates page, and lastly contact us page.
- Added portofolio - items individuals. (need further action)
- Added team members. (need further action)
- Added contact form. (need testing to see if it work)
- Added navbar and footer.
-
06/19/2021 front page changed to under construction (temporarily).
Problem :
-
Google Maps API error. In the tutorial, need to create project
with billing account. Reference:
click here
Thats the end of the report.


--- layout: doc title: "Authentication | Knowledge Base" header: "Authentication" ---
You authenticate to the FilePreviews API by providing your application's API Key in the request. You can create an application for a new API Key or get an API Key from an existing application.
If you're planning on making requests from a client-side application with your API Key, you should set your application's Origin whitelist setting which authorizes specific origin hostnames to make requests with your API Key. Remember, that should you never expose your Secret Key in any public website's client-side code.
We allow unauthenticated requests to some endpoints. These have a restrictive throttle of 20 requests per hour using the IP address of the incoming request. Throttled requests will return a 429 Too Many Requests response.
Authentication to the API occurs via a custom HTTP X-API-KEY
request header.
All API requests must be made over HTTPS.


On this page you can change your associated email address, password, or both; to change only one of the items, leave the other pair of fields blank. If you are changing your password, please remember to follow the security guidelines described below.


Preparation time
over 2 hours
Cooking time
1 to 2 hours
Serves
Serves 4-6
James Martin shows you how to home-smoke your own fish for a dinner-party reveal that is properly 'ta-dah!'
Equipment and preparation: for this recipe you will need a smoker and oak chips.
Mix the sugar and sea salt together in a bowl. Divide the mixture into four equal portions.
Place a large piece of cling film on a clean work surface. Place another piece on top. Sprinkle one portion of the salt and sugar mixture in a line across the centre of the cling film. Place one of the trout fillets, skin-side down, on the line of sugar and salt.
Sprinkle another portion of the salt and sugar mixture all over the fillet, then wrap in the cling film.
Repeat the process with the remaining trout fillet. Chill the fish in the fridge for 12-24 hours.
When the trout has cured, remove the cling film and brush off the salt and sugar mixture. Rinse the fish thoroughly under cold running water, then pat dry with kitchen paper.
Place a generous handful of oak chips in a smoker. Light the wood chips and drizzle with a little water.
When the wood chips are smouldering, lay the trout fillets, skin-side down, in the centre of the grate. Cover with the lid and smoke for 1-1½ hours, checking the chips regularly to make sure they are not burning. (CAUTION: Food-smoking generates a great deal of smoke. Cook in a well-ventilated place and open the windows.)
When the trout has smoked, remove from the smoker and set aside to cool.
Meanwhile, whisk the balsamic vinegar and olive oil together in a bowl. Season, to taste, with salt and freshly ground black pepper.
Arrange the shallot rings, beetroot and feta on a large serving platter. Flake the smoked trout over the top. Garnish with watercress leaves, then drizzle over the dressing.


You are not logged in! You cannot submit scores. Log in using a google account on the main menu.
Level: {{level}}Seed: {{board.initialSeed}}Release Version: {{version}}


|
ReactPhysics3D
0.7.1
Physics engine library
|
This class represents the broad-phase collision detection. More...
#include <BroadPhaseAlgorithm.h>
Public Member Functions | |
| BroadPhaseAlgorithm (CollisionDetection &collisionDetection) | |
| Constructor. | |
| ~BroadPhaseAlgorithm () | |
| Destructor. | |
| BroadPhaseAlgorithm (const BroadPhaseAlgorithm &algorithm)=delete | |
| Deleted copy-constructor. | |
| BroadPhaseAlgorithm & | operator= (const BroadPhaseAlgorithm &algorithm)=delete |
| Deleted assignment operator. | |
| void | addProxyCollisionShape (ProxyShape *proxyShape, const AABB &aabb) |
| Add a proxy collision shape into the broad-phase collision detection. | |
| void | removeProxyCollisionShape (ProxyShape *proxyShape) |
| Remove a proxy collision shape from the broad-phase collision detection. | |
| void | updateProxyCollisionShape (ProxyShape *proxyShape, const AABB &aabb, const Vector3 &displacement, bool forceReinsert=false) |
| Notify the broad-phase that a collision shape has moved and need to be updated. | |
| void | addMovedCollisionShape (int broadPhaseID) |
| Add a collision shape in the array of shapes that have moved in the last simulation step and that need to be tested again for broad-phase overlapping. More... | |
| void | removeMovedCollisionShape (int broadPhaseID) |
| Remove a collision shape from the array of shapes that have moved in the last simulation step and that need to be tested again for broad-phase overlapping. More... | |
| void | addOverlappingNodes (int broadPhaseId1, const LinkedList< int > &overlappingNodes) |
| Add potential overlapping pairs in the dynamic AABB tree. | |
| void | reportAllShapesOverlappingWithAABB (const AABB &aabb, LinkedList< int > &overlappingNodes) const |
| Report all the shapes that are overlapping with a given AABB. | |
| void | computeOverlappingPairs (MemoryManager &memoryManager) |
| Compute all the overlapping pairs of collision shapes. | |
| ProxyShape * | getProxyShapeForBroadPhaseId (int broadPhaseId) const |
| Return the proxy shape corresponding to the broad-phase node id in parameter. | |
| bool | testOverlappingShapes (const ProxyShape *shape1, const ProxyShape *shape2) const |
| Return true if the two broad-phase collision shapes are overlapping. | |
| const AABB & | getFatAABB (int broadPhaseId) const |
| Return the fat AABB of a given broad-phase shape. | |
| void | raycast (const Ray &ray, RaycastTest &raycastTest, unsigned short raycastWithCategoryMaskBits) const |
| Ray casting method. | |
Protected Attributes | |
| DynamicAABBTree | mDynamicAABBTree |
| Dynamic AABB tree. | |
| Set< int > | mMovedShapes |
| Set with the broad-phase IDs of all collision shapes that have moved (or have been created) during the last simulation step. More... | |
| BroadPhasePair * | mPotentialPairs |
| Temporary array of potential overlapping pairs (with potential duplicates) | |
| uint | mNbPotentialPairs |
| Number of potential overlapping pairs. | |
| uint | mNbAllocatedPotentialPairs |
| Number of allocated elements for the array of potential overlapping pairs. | |
| CollisionDetection & | mCollisionDetection |
| Reference to the collision detection object. | |
This class represents the broad-phase collision detection.
The goal of the broad-phase collision detection is to compute the pairs of proxy shapes that have their AABBs overlapping. Only those pairs of bodies will be tested later for collision during the narrow-phase collision detection. A dynamic AABB tree data structure is used for fast broad-phase collision detection.
|
inline |
Add a collision shape in the array of shapes that have moved in the last simulation step and that need to be tested again for broad-phase overlapping.
|
inline |
Remove a collision shape from the array of shapes that have moved in the last simulation step and that need to be tested again for broad-phase overlapping.
|
protected |
Set with the broad-phase IDs of all collision shapes that have moved (or have been created) during the last simulation step.
Those are the shapes that need to be tested for overlapping in the next simulation step.


OS Knowledge
And Project Management
Home
Login
Join the open source knowledge community
Username
Email address
Password
Repeat Password
Register
Loading..
Success!
An activation link for your account has been sent to your email address.


TODO¶
- Move all C/C++ code into dedicated folders such that include/lib can be single directories
- Add Cis aliases to C and Python interface
- Move all specialized strings to a file that is read in and passed as definitions during compilation for C/C++ (or loaded at import in python/matlab)
- Fix import order/build_api placement such that there is not a circular import if the api has not been built and the schema/metaschema needs to be generated
- Update conda to reflect name change
- Update docs to reflect name change
- Change client/server use of direction/serializer info to be more transparent
- Go through docs to strip out deprecated info
- Change “args” in drivers to more transparent wording (source_code, etc.)
- Alias input/output keyword arguments for connections to from/to for clarity
- Update docs to reflect changes to YAML spec
- Write docs on units (with reference to us of pint on Python 2.7)
- Docs on datatypes w/ example of user defined data type
- Update/replace io_drivers section of docs
- Remove IOInfo test class as no longer used
- Add example of each supported language (missing LPy, cmake, make)
- Replace nose with unittest/pytest
- Create template model drivers for compiled/interpretted langauges
- Update travis/appveyor to clone recursively to get rapidjson as git submodule
- Change verbose flag in GCCModelDriver to use logging levels
- Add map class for handling arbitrary objects in C/C++ and then update formatted_io 7, 8, and 9
- change gs_lesson/formatted_io series to have more descriptive names
- Docs on how nested data objects are represented in C/C++.
- Add docstrings to metaschema classes
- Preprocessor macro for dynamically determine message type?
- Try to setup comm/connection testing at class level so that comms only created once
- Fix circular dependency when determining if C/C++ models are supported via czmq
- Regenerate metaschema with $schema entry
- Refence metaschema on website in $id or $schema?
- Clean up dependencies if possible
- Test outside of conda on windows?
- Silence warnings from pint/pika on model processes


<private> new Extendable()
Extendable constructor.
- Source:
Methods
-
<private> _extendConstructor(p_constructor, p_prototype) → {Function}
-
Extends the constructor function with the current SuperClass. This function will be added as the Constructor's `extend` function.
Parameters:
Name Type Description p_constructor
Function Constructor function p_prototype
Object Prototype object - Source:
Returns:
Augmented p_constructor- Type
- Function
-
<private> _extendLiteral(p_props) → {Object}
-
Extends the literal object and set the current literal as the prototype.
Parameters:
Name Type Description p_props
Object Properties to add to the new object - Source:
Returns:
New object with set prototype and properties- Type
- Object
-
create() → {Object}
-
Create a new object from the current object (this). Calling this method is effectively the same as calling `extend()` with no arguments or calling Object.create(arg1) where `arg1` is the current object.
- Source:
Returns:
A new object with the current object as the prototype- Type
- Object
-
extend(p_props, p_prototype) → {Object}
-
Extend the object which holds this function and set the current object as it's prototype. The newly created object will contain the properties defined by p_props
Parameters:
Name Type Description p_props
Object | Function If it's an Object, it will forward the arguments to the Extendable._extendLiteral function. If it's a constructor function Extendable._extendConstructor. p_prototype
Object Properties to copy to the prototype or the newly created object - Source:
Throws:
-
If p_props is not an object nor a constructor function
- Type
- Error
Returns:
The newly created object- Type
- Object
-
override(p_methodName, p_newMethod) → {Object}
-
Overrides a method on an existing object with the ability to call the super method. The super parameter (overridden method) will then be added as the first argument to the list. Remember to always add the p_super argument as the first argument when defining a new method and after extending just call the method as you usually would (without the super argument). Also, you can't name the parameteras 'super' because it's a reserved keyword in JavaScript, use 'p_super' or something like that.
Parameters:
Name Type Description p_methodName
String The name of the method to override p_newMethod
Function A new method which overrides - Source:
Returns:
The same object instance (this)- Type
- Object


--- layout: default --- {% include nav.html %} {% include headerAbout.html %} {% include history.html %} {% include mission.html %} {% include team.html %}


 title="photo sharing">
 cooking action, originally uploaded by owt.

Managing the Worlds (Financial) Information
Great post by John Battelle about unconfirmed rumors that Google will offer something similar to eBay’s PayPal. Check it out: Google to Offer Payment Service
The first reaction would be "hÃ¤? what does that have to do with search?"… but then you notice, they are not about search. Never have been. Their mission "is to organize the world’s information and make it universally accessible and useful". And boy is my buying habits a big part of that. It might be a bit scary though knowing that Google is known to not really share what they do with all the information. They already know what I search for, where I go on the Net (at least where they have AdSense), how long I stay there (AdSense), what I am most interested in (click throughs on ads and organic results), and soon maybe what I buy or sell.
Hyped Hype
I have to fully agree with Fight the Bull, who posted a press release from SAP in their post entitled: We can’t make this stuff up:

100 industry-specific analytic applications that empower users with innovative new ways to drive core processes and business decisions based on actionable business insight. SAP Analytics are a new breed of model-driven composite applications that change the analytic application playing field across more than 25 industries.

I absolutely agree with Jon in that this really finally explains to us what analytical applications are. Companies seriously have to think about writing stuff in a language that other people can understand. Sadly that also means that they can’t build some products and have the PR and Marketing department build some meaning and reason around it.
Were Will MySpace Go?
Nice article about MySpace.com on AlwaysOn. Will MySpace.com keep its lead?. Just check out the Alexa Chart to see their growth rate. Based on Alexa they are now 29th biggest site on the net. Scary indeed. The article gives some details about why they have grown so well and includes some good ideas.
Loic About Design and CSS
Loic has a short report from reboot about a presentation from Doug Bowman who did redesigns like Blogger, Wired News and Cap Gemeni. The first name might be signs of some techy connections but Cap Gemeni is not something you redesign just because of connections (ok, the others aren’t either, but still :)). In the post Loic links to some fine CSS resources and all who know me know how much I stand behind CSS, having forces several people into using it … who are now all happier for it ;) See here: Loic Le Meur Blog: Design teach-in at Reboot by Doug Bowman.
Behind the Scenes Story on the GM Blog
Great writeup about how GM’s Fastlane blog was born. They seem to be really getting it and using this as a wonderful communication medium. I love seeing stuff like this happen.
Scary

 title="photo sharing">
 scary, originally uploaded by owt.

 I have never seen this thing before :)

Quazar Won

 title="photo sharing">
 quazar won, originally uploaded by owt.

 I feel like 18 :)

Design Management Vol 2
My wonderful strategy tutor Ralf Beucker has launched :: Vol. 2: the design management weblog :. I remember talking to him about blogging in the Strategy course 2 years ago and was very happy to see he took it up with full force. One day I will take one of his new courses, but for now, there are other matters that require my full attention. Check out his blog and subscribe. Great stuff coming in from him!
Intel Buys Apple
That’s what Cringly argues for in his latest post entitled Going for Broke. Good thoughts as always. I wondered why Apple didn’t announce they were going to the Cell processor and why they moved against the XBox (a friend argues MS chose that partly because games will be harder to crack) and PS3. Looking forward to seeing this unfold.


Generator
Power:
30kW
Status:
ON
Grid
Power:
30kW
Status:
ON
PV Array
Power:
30kW
Status:
ON
EV-BATT
SOC:
75 %
Mode:
Charging
Power:
30kW
Status:
ON
M2G-BATT
SOC:
65 %
Mode:
Discharging
Power:
-30kW
Status:
ON
Loads
Power:
30kW
Status:
ON
System Mode:
Auto
Total Power Out:
30kW
Total Power In:
31 kW
60kW Microgrid Module


--- layout: archive title: Zulip Chat Archive permalink: /stream/187764-Lean-for-teaching/topic/Papers.html ---
Somebody wrote up their experience using Coq to teach proof: https://arxiv.org/pdf/1803.01466.pdf
That's a very interesting paper. I wish I had it three months ago
It seems there are more people using proof assistants for teaching proofs than I thought, although there are all in CS department, so it's difficult to compare
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


I just published two little apps on the Mac AppStore. Both were successfully validated, and are available for purchase.
The first one, named «AutoPurge» is a UI agent, placed in the menu bar, that automatically frees unused memory based on a specific user-defined time interval.
It's useful for Macs with low memory capabilities, or for users that use a lot of huge programs, like VMWare, Adobe Creative Suite, Xcode, etc.
Mac OS X doesn't always reclaim the used memory immediately, when a program exits. So if you use a lot of software, your Mac may become slow, as the system will then have to use the hard disk as memory, when all the physical RAM is used.
AutoPurge helps the system to recover the unused memory, making it available again to applications.
AutoPurge is available for $0.99, from the Mac AppStore:
http://itunes.apple.com/us/app/autopurge/id480739949?mt=12
The second one, called «SOStatus», provides you with real-time informations from your StackOverflow account, from the menu bar.
It's available for $0.99 too, from the Mac AppStore:
http://itunes.apple.com/us/app/sostatus/id490656622?mt=12


Final Project Style Guide
Normal Colors
Dark Mode Colors
Fonts
I have chosen to use the following fonts for my site:
- RocknRoll One: Used for headlines.
- Open Sans: Used for the primary font.
Elevator Pitch
I am a website developer. I manage a whitewater rafting company. I create websites catered to outdoor recreation. I specialize in helping create user friendly experiences to booking customers for outdoor activities. Think about the last time you booked your family for an outdoor recreation activity? Was it easy, intuitive, easy to navigate? I promise what I can offer is a customizable, intuitive experience that removes the need for employees while bringing in more revenue.
Purpose Statement
The purpose of Oars Whitewater is to generate revenue through the selling of our services (whitewater rafting and scenic float trips) in order to fund our other ventures and philanthropic causes. Profits from these trips go toward many things such as scholarships, treatments centers, and other charitable endeavors. Along with this we are dedicated to providing well paying and enjoyable jobs that can sustain a healthy and happy lifestyle for all of our employees and their families. We want to be a functional contributing company to society and the economy.
Audience Statement
Our target audiences are first and foremost families and youth groups. We strive to be a family friendly environment where guides, office staff, drivers, and other employees emulate and exemplify family values. We are an equal opportunity provider and are excited to provide services and fun to aspiring adventurous families of all races, nationalities, ethnicities, religions, and orientations. Most customers can access and book trips through our user-friendly website or over the phone for those who are potentially disabled or unable to use the internet properly. These customers are either looking for a relaxing scenic river ride or an exciting whitewater experience.
Misson Statement
Our mission is to provide safe, exciting, educational, experiences to all adventure seekers whether they are new to the experience or long-time river runners. Our purpose would be to provide a new and stimulating experience to both the novice and the expert. Oars whitewater is dedicated to top tier customer service from the first time they land on our website, talk to a customer representative, book their trip, hop on the bus, all the way to when they get off the water weather that’s a scenic trip or a whitewater trip. Oars whitewater is committed to being the best outfitter to experience some of best river experiences on earth.
Persona and Scenario Ideas
A typical user of my whitewater rafting company might look like someone as follows: Name: Kandra Sopp Age: 38 Details: Kandra is a Mother of 4 boys, loving wife who mostly likes to be home to take care of her family but works part time occasionally to save up for family vacations. Motivations: Wants to be a good mother and provide her family with the best care. Goals: To try and find a family activity during their vacation where they can strengthen their relationships, work as a team, and most importantly be safe and have fun!
Oooga Booga


Timeline View
List View
Summary View
Export Selected Data
Trigger
Rule
Sequence
Action
Activation ID
Name
Type
Time
Rendered View
JSON view
Activation ID: 52c43f1a185d4b39bda8beb1def1dc3c
view code
Start time:
Duration: ms
Caused by:
Input data:
Invoke:
Output data: (compare input and output)


--- layout: post title: 'Netflix chews up bandwidth' date: 2010-10-27 07:23:38.000000000 -07:00 categories: [] tags: [] status: publish type: post published: true ---
Netflix grabs 20 percent of peak time U.S. traffic | The Digital Home - CNET News http://ping.fm/IQ2FB


About Me
Hello! My name is Jose Cahua, thank you for visiting my site.
I am currently a student at Seattle Central College, attending classes for Software Development and Testing. With the help of my mentors, I will be placed in an internship in one of the top technology companies for 6 months. After 6 months I will be looking for a job that will put my skills as a Software Developer to work.
I am an experienced Banker with a demonstrated history of working in the financial services industry. Skilled in Customer Service, Banking, Sales, Credit, and Management.
In my free time, I love to work on self-development by reading books and networking with entrepreneurs. I am interested in adding more positive to our community by public speaking and sharing my knowledge and experiences.
Thank you for your time, if you have any questions please feel free to conect with me via LinkedIn as I would love to expend my network.
Copyright [2014-2020] [Sara Newman]. Licensed under the Apache License, Version 2.0


1. Hold your phone such that edge is facing the screen and the face is pointing either left or right 2. Turn on your lightsaber 3. Deflect those blaster bolts like your life depends on it! * If your litghtsaber is turning the wrong way, press the "backwards" button


Coach's modularity makes adding an agent a simple and clean task, that involves the following steps:
-
Implement your algorithm in a new file under the agents directory. The agent can inherit base classes such as ValueOptimizationAgent or ActorCriticAgent, or the more generic Agent base class.
-
ValueOptimizationAgent, PolicyOptimizationAgent and Agent are abstract classes. learn_from_batch() should be overriden with the desired behavior for the algorithm being implemented. If deciding to inherit from Agent, also choose_action() should be overriden.
def learn_from_batch(self, batch): """ Given a batch of transitions, calculates their target values and updates the network. :param batch: A list of transitions :return: The loss of the training """ pass def choose_action(self, curr_state, phase=RunPhase.TRAIN): """ choose an action to act with in the current episode being played. Different behavior might be exhibited when training or testing. :param curr_state: the current state to act upon. :param phase: the current phase: training or testing. :return: chosen action, some action value describing the action (q-value, probability, etc) """ pass
-
Make sure to add your new agent to agents/__init__.py
-
-
Implement your agent's specific network head, if needed, at the implementation for the framework of your choice. For example architectures/neon_components/heads.py. The head will inherit the generic base class Head. A new output type should be added to configurations.py, and a mapping between the new head and output type should be defined in the get_output_head() function at architectures/neon_components/general_network.py
- Define a new configuration class at configurations.py, which includes the new agent name in the type field, the new output type in the output_types field, and assigning default values to hyperparameters.
- (Optional) Define a preset using the new agent type with a given environment, and the hyperparameters that should be used for training on that environment.


Differences from other programming languages¶
The Miller programming language is intended to be straightforward and familiar, as well as not overly complex. It doesn't try to break new ground in terms of syntax; there are no classes or closures, and so on.
While the Principle of Least Surprise is often held to, nonetheless the following may be surprising.
No ++ or --¶
There is no ++
or --
operator. To increment
x
, use x = x+1
or x += 1
, and similarly for decrement.
Semicolons as delimiters¶
You don't need a semicolon to end expressions, only to separate them. This
was done intentionally from the very start of Miller: you should be able to do
simple things like mlr put '$z = $x * $y' myfile.dat
without needing a
semicolon.
Note that since you also don't need a semicolon before or after closing curly
braces (such as begin
/end
blocks, if
-statements, for
-loops, etc.) it's
easy to key in a few semicolon-free statements, and then to forget a
semicolon where one is needed . The parser tries to remind you about semicolons
whenever there's a chance a missing semicolon might be involved in a parse
error.
mlr --csv --from example.csv put -q ' begin { @count = 0 # No semicolon required -- before closing curly brace } $x=1 # No semicolon required -- at end of expression '
mlr --csv --from example.csv put -q ' begin { @count = 0 # No semicolon required -- before closing curly brace } $x=1 # Needs a semicolon after it $y=2 # No semicolon required -- at end of expression '
mlr: cannot parse DSL expression. Parse error on token "$y" at line 6 column 3. Please check for missing semicolon. Expected one of: $ ; > >> | ? || ^^ && ?? ??? =~ !=~ == != <=> >= < <= ^ & << >>> + - .+ .- * / // % .* ./ .// . ** [ [[ [[[
elif¶
Miller has elif
, not else if
or elsif
.
If-statement variable scoping¶
Miller is simple-minded about scoping local variables to blocks. If you have
if (something) { x = 1 } else { x = 2 }
then there are two x
variable, each confined only to their enclosing curly
braces; there is no hoisting out of the if
and else
blocks.
A suggestion is
var x if (something) { x = 1 } else { x = 2 }
Required curly braces¶
Bodies for all compound statements must be enclosed in curly braces, even if the body is a single statement:
mlr ... put 'if ($x == 1) $y = 2' # Syntax error
mlr ... put 'if ($x == 1) { $y = 2 }' # This is OK
No autoconvert to boolean¶
I.e. ints/strings/etc are neither "truthy" nor "falsy".
Boolean tests in if
/while
/for
/etc must always take a boolean expression:
if (1) {...}
results in the parse error
Miller: conditional expression did not evaluate to boolean.
,
Likewise if (x) {...}
, unless x
is a variable of boolean type.
Please use if (x != 0) {...}
, etc.
Integer-preserving arithmetic¶
As discussed on the arithmetic page the sum, difference, and product of two integers is again an integer, unless overflow occurs -- in which case Miller tries to convert to float in the least obtrusive way possible.
Likewise, while quotient and remainder are generally pythonic, the quotient and exponentiation of two integers is an integer when possible.
$ mlr repl -q
[mlr] 6/2 3 [mlr] typeof(6/2) int [mlr] 6/5 1.2 [mlr] typeof(6/5) float [mlr] typeof(7**8) int [mlr] typeof(7**80) float
Print adds spaces around multiple arguments¶
As seen in the previous example,
print
with multiple
comma-delimited arguments fills in intervening spaces for you. If you want to
avoid this, use the dot operator for string-concatenation instead.
mlr -n put -q ' end { print "[", "a", "b", "c", "]"; print "[" . "a" . "b" . "c" . "]"; } '
[ a b c ] [abc]
Similarly, a final newline is printed for you; use printn
to avoid this.
String literals with double quotes only¶
In some languages, like Ruby and Bash, string literals can be in single quotes or double quotes,
where single quotes suppress \n
converting to a newline character and double quotes allowing it:
'a\nb'
prints as the four characters a
, \
, n
, and b
on one line; "a\nb"
prints as an
a
on one line and a b
on another.
In others, like Python and JavaScript, string literals can be in single quotes or double quotes,
interchangeably -- so you can have "don't"
or 'the "right" thing'
as you wish.
In yet others, such as C/C++ and Java, string literals are in double auotes, like "abc"
,
while single quotes are for character literals like 'a'
or '\n'
. In these, if s
is a non-empty string,
then s[0]
is its first character.
In the Miller programming language:
- String literals are always in double quotes, like
"abc"
. - String-indexing/slicing always results in strings (even of length 1):
"abc"[1:1]
is the string"a"
, and there is no notion in the Miller programming language of a character type. - The single-quote character plays no role whatsoever in the grammar of the Miller programming language.
- Single quotes are reserved for wrapping expressions at the system command line. For example, in
mlr put '$message = "hello"' ...
, theput
verb gets the string$message = "hello"
; the shell has consumed the outer single quotes by the time the Miller parser receives it. - Things are a little different on Windows, where
"""
sequences are sometimes necessary: see the Miller on Windows page.
Absent-null¶
Miller has a somewhat novel flavor of null data called absent: if a record
has a field x
then $y=$x
creates a field y
, but if it doesn't then the assignment
is skipped. See the null-data page for more
information.
Maps¶
See the maps page.
Arrays, including 1-up array indices¶
Arrays and strings are indexed starting with 1, not 0. This is discussed in detail on the arrays page and the strings page.
mlr --csv --from data/short.csv cat
word,value apple,37 ball,28 cat,54
mlr --csv --from data/short.csv put -q ' @records[NR] = $*; end { for (i = 1; i <= NR; i += 1) { print "Record", i, "has word", @records[i]["word"]; } } '
Record 1 has word apple Record 2 has word ball Record 3 has word cat
Also, slices for arrays and strings are doubly inclusive: x[3:5]
gets you
elements 3, 4, and 5 of the array or string named x
.
See the arrays page for more about arrays; see the strings page for more about strings.
Two-variable for-loops¶
Miller has a key-value loop flavor: whether x
is a map or array, in for (k,v in x) { ... }
the k
will be bound to successive map keys (for maps) or 1-up array indices (for arrays), and the v
will be bound to successive map values.
Semantics for one-variable for-loops¶
Miller also has a single-variable loop flavor. If x
is a map then for (e in x) { ... }
binds e
to successive map keys (not values as in PHP). But if x
is an array then for e in x) { ... }
binds e
to successive array values (not indices).
JSON parse, stringify, decode, and encode¶
Miller has the verbs
json-parse
and
json-stringify
, and the DSL functions
json_parse
and
json_stringify
.
In some other lannguages these are called json_decode
and json_encode
.


| Heritage | Culture | Ethos | Traditions | Language | Martial custom | Architecture | Fashion | Coat of Arms | Military Equipment | Origin |
|---|---|---|---|---|---|---|---|---|---|---|
| Arabic | Nabatean | Stoic | Caravaneers; Dryland Dwellers | Arabic | Male Only | Mediterranean | Abbasid | Arabic | Arabic | Original |
| Arabic | Adnanite | Stoic | Caravaneers; Desert Travellers | Arabic | Male Only | Arabic | Abbasid | Arabic | Arabic | Original |
| Arabic | Qahtanite | Communal | Mountaineers; Maritime Mercantilism | Arabic | Male Only | Arabic | Abbasid | Arabic | Arabic | Original |
| Brythonic | Brythonic | Stoic | Concubines; Hill Dwellers | Brythonic | Male Only | Continental European | Continental European | Breton | Continental European | Original |


ASSERT(expression, message) → retVal
The 2 functions evaluate an expression. In case the expression evaluates to true both functions will return true. If the expression evaluates to false ASSERT will throw an error and WARN will issue a warning and return false. This behavior allows the use of ASSERT and WARN in FILTER conditions.
FOR i IN 1..3 FILTER ASSERT(i > 0, "i is not greater 0") RETURN i
FOR i IN 1..3 FILTER WARN(i < 2, "i is not smaller 2") RETURN i


LED #0:
LED #1:
LED #2:
LED #3:
FADING FX:
var strip1 = new LEDStrip(); // set up a led strip strip1.setup( 1, // unit 1 10, // pin 10 4 // total LED number on the strip ); strip1.showRGB(0, 255, 0, 0); // led #0 color is set to red strip1.showRGB(1, 255, 255, 255); // led #1 color is set to white strip1.showRGB(2, 0, 0, 0); // led #2 is set to off strip1.setRGB(0, 255, 0, 0); // led #0 color is set to red, but not refresh instantly strip1.setRGB(1, 0, 255, 0); // led #1 color is set to green, but not refresh instantly strip1.setRGB(2, 0, 0, 255); // led #2 color is set to blue, but not refresh instantly strip1.show(); // refresh all led colors on the strip
The red, green or blue value can be set for changing the LED color. The allowed single red, green or blue value can range between 0 and 255. And a combination of these three can give 16,777,215 colors to RGB colored lights.
Function showRGB() will change the red-green-blue color setting of a specified LED on the strip and also refresh the LED representation instantly. When need to call showRGB() for couples of LEDs in a procedure, each showRGB() function call will bring a force LED display updating as long as modified the LED color setting. We noticed this method has to take some time for the duplicate refreshing. The alternative is using functions setRGB() and show() separately. We could call setRGB() for all LEDs whose colors need be modified first. And just call function show() one time after all LED color settings are modified using setRGB(). The new method is much more efficient to refresh LED strip display "frame by frame".
LEDStrip
setup(unit, pin, count, mode)
initialize a LED strip object with a specified pin on a specified unit.
optional parameter count is the total LED number on this strip.
optional parameter mode is the advanced configuration for the particular LED strip model with WS2812 chips
(the default value is LEDStripDataOrder.GRB + LEDStripDataStream.KHZ800).
return value: true if successful, otherwise false.
showRGB(index, red, green, blue)
set the RGB color value for a specified LED on the strip,
the light color will be refreshed instantly after the setting.
parameter index specifies the LED position on the strip.
parameters red, green, blue specify the LED color with three numbers between 0 to 255 for RGB channels.
return value: true if successful, otherwise false.
setRGB(index, red, green, blue)
set the RGB color value for a specified LED on the strip,
but the light color will not be refreshed until the function show() is called.
parameter index specifies the LED position on the strip.
parameters red, green, blue specify the LED color with three numbers between 0 to 255 for RGB channels.
return value: true if successful, otherwise false.
show()
refresh all LED colors on the strip after called function setRGB() for one or several LEDs.
return value: true if successful, otherwise false.
Return Value Note:
The function will return a value when your h5control program uses waitRsp mode, but no return value when uses nowaitRsp mode.
whenSetup(done)
receive the callback when setup done. parameter done is true if successful or false otherwise.
whenShowRGB(index, red, green, blue)
receive the callback after called function showRGB().
whenSetRGB(index, red, green, blue)
receive the callback after called function setRGB().
whenShow()
receive the callback after called function show().
LEDStripDataStream
KHZ800 handles 800Hz bit streams
KHZ400 handles 400Hz bit streams
a matched data stream setting is required for a particular model.
see Adafruit_NeoPixel.h for more details
LEDStripDataOrder
RGB
RBG
GRB
GBR
BRG
BGR
WRGB
WRBG
WGRB
WGBR
WBRG
WBGR
RWGB
RWBG
RGWB
RGBW
RBWG
RBGW
GWRB
GWBR
GRWB
GRBW
GBWR
GBRW
BWRG
BWGR
BRWG
BRGW
BGWR
BGRW
a matched data order setting is required for a particular model.
see Adafruit_NeoPixel.h for more details


SENSE AND SENSIBILITY A film review by Christopher Null Copyright 1995 Christopher Null
Finally, a film to make Jane Austen proud. The third adaptation of her work this year (the first being CLUELESS's modernization of "Emma;" the second, the dreadful PERSUASION), first-time screenwriter Emma Thompson and director Ang Lee have crafted a magnificent and exquisitely detailed piece of art which redeems the failures of the other two.
 The four Dashwood women, the mother and three daughters (Elinor [Emma Thompson], Marianne [Kate Winslet], and young Margaret), must find a way to make ends meet as the elder daughters face the daunting problems of love and romance.
Competing for the affections of Marianne are the dashing playboy Willoughby (newcomer Greg Wise) and the upright Colonel Brandon (Alan Rickman). Meanwhile, Elinor finds herself falling for Edward (Hugh Grant), who, without spoiling the plot, isn't completely forthright with Elinor about his availability. Throughout it all, the high society gossips make everyone squirm with their constant chatter.
Sound like a 19th century soap opera? It is, and an awfully good one at that. But on top of a nicely-crafted story, Thompson has enriched what could have been a dull period piece (see PERSUASION for a frightening example of this) with an unexpectedly hilarious series of vignettes that underscores the endless procession of romantic misunderstandings and entanglements that weave through the girls' lives. And oddly, though the romance and courtship of that bygone era is archaic, the scenes are equally relevant today. Of course, it's not all mirth and hilarity: judging from the bawling woman sitting next me, this film can really pull the tears out, too.
Thompson and especially Winslet (who was so exquisite in 1994's HEAVENLY CREATURES) are perfectly matched as near opposites who find some common ground as the film progresses. Grant and the other supporting cast members are also admirable. Taiwanese director Ang Lee infuses the film with some variety and cleverness, too. In all, the film really comes together as a whole.
While some of the overly talky scenes tend to drag on too long (thus pushing the film into 2 1/4 hours of length), making the mind often start to wander, we're still left with a memorable film that brings out everything we love about these kinds of stories. And best of all, it leaves us with the message that while nothing is ever as perfect as it seems, things have a funny way of working out for the best.
RATING: ****
\-------------------------------\ |* Unquestionably awful | |** Sub-par on many levels | |*** Average, hits and misses | |**** Good, memorable film | |***** Perfection | \-------------------------------\
-Christopher Null /<EMAIL_ADDRESS>-Movie Emporium (reviews) / http://www.notes.tpoint.net/emporium/ -Contributing Editor, FEEDBACK / http://www.eden.com/~feedback/ -E-mail requests to join the movie review mailing list
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- published: true layout: post description: Pirate Chat App date: '2021-05-18' background: /img/posts/wave-optics.jpg ---
Click on the link below to download the Pirate Chat App :
Download


| package |
Default |
|---|
__invoke(\Interop\Container\ContainerInterface $container, string $requestedName, array $options = null) : \Zend\Session\SessionManager
Will consume any combination (or zero) of the following services, when present, to construct the SessionManager instance:
The first two have corresponding factories inside this namespace. The last, however, does not, due to the differences in implementations, and the fact that save handlers will often be written in userland. As such if you wish to attach a save handler to the manager, you will need to write your own factory, and assign it to the service name "Zend\Session\SaveHandler\SaveHandlerInterface", (or alias that name to your own service).
You can configure limited behaviors via the "session_manager" key of the Config service. Currently, these include:
\Interop\Container\ContainerInterface
string
array
\Zend\Session\SessionManager
createService(\Zend\ServiceManager\ServiceLocatorInterface $services, null|string $canonicalName = null, string $requestedName = \Zend\Session\SessionManager::class) : \Zend\Session\SessionManager
defaultManagerConfig : array
| var |
|---|
array


{% extends "layout.html" %} {% block title %} RPi Face {% endblock %} {% block main %}
Face recognition is currently active
Face recognition is currently inactive


- Cyberbullying involves posting pictures and mean comments,
spreading rumors and lies, and humiliating or attacking someone
without their consent. If you want to stop this malicious behavior in it's tracks, don't forward hateful emails or content
to your friends.
- If you receive a hurtful and harassing form of electronic content toward another person, whether you know the person or not,
reply to them and let them know cyberbullying is hurtful. Explain to them that the person being attacked could easily be a
close friend or family member and that you're pretty sure their loved ones would be outraged; not to mention the person
being attacked. Some say it's best not to respond to the bully since that's exactly what they want. This may be true,
however if you respond only once to everyone receiving the email from the cyberbullying, reminding them they are causing
more harm by forwarding the hurtful email on, it might send a strong message.
- Block, report, and flag any and all content by a cyber bully. This sends a strong statement that you
won't condone this type of internet behavior, nor can your sense of right and wrong be penetrated by
feeding into it for the sake of a good laugh. Adults are just as vulnerable as teenagers when it comes to cyberbullying.
 No one is immune to the effects of
cyberbullying, not even adults.
- Somtimes if you are lucky, you might be able to click on the cyberbully's username
and find a link to some of their information. This information may include their website and even place of work.
If a bully feels they have a right to vicitimize and humiliate a perfectly good stranger, we don't see why that
perfectly good stranger can't write a letter to the cyberbully's place of work and let them
know what type of person they have employed at their business by informing them of their cruel cyberbully activities.