I had the pleasure of being involved in a discussion on reddit -- which is not something a person usually says. But the gist of it was this -- comments are shortened, vote totals are approximate, and the names have been changed to protect the involved parties. To add context, this was a discussion on the topic of using unittest.mock to make testing easier.
/u/User1 [-1] "Don't mock what you don't own."
/u/User2 [+5] "You don't think mocking something like os.remove is a good move?"
/u/User1 [-6] "No, I think it's bad architecture."
/u/User2 [+7] "You're insane then. :)"
This exchange has lead me to conclude two things:
- The phrase "unit test" is meaningless.
- Mocks are poorly understood and abused.
I offered this case for not mocking something like os.remove, with a bit of a text dump -- something I'm often guilty of doing for better or worse.
Things like os.remove are rarely stand alone things, they're often paired with stuff like "Format this file name.", "Join this path." "Can I find the file?", "Do I have permission to remove the file."
As well as these code samples:
from abc import ABC, abstractmethod import os class ReportRemover(ABC): @abstractmethod def remove_report(self, name): pass class FileReportRemover(ReportRemover): def __init__(self, path, ext): self._path = path self._ext = ext def remove_report(self, name): filename = self._format(name) if self._is_removable(filename): os.remove(filename) return True return False def _format(self, name): filename = '{}.{}'.format(name, self._ext) return os.path.join(path, filename) def _is_removable(self, filename): return os.path.exists(filename) and os.path.isfile(filename)
And caveated that with I'd offer that rich class interface when I have multiple contexts to remove a "report" -- maybe it's generated from a database, maybe it's on S3, maybe I'm running a test and don't even have an actual report to remove. Conversely, I also offered this sample that I might use if I'm only going to have reports on the local filesystem:
from collections import namedtuple Settings = namedtuple('Settings', ['DEFAULT_REPORT_PATH', 'DEFAULT_REPORT_EXT']) SETTINGS = Settings('path/to/reports', 'html') def remove_report(name, path=SETTINGS.DEFAULT_REPORT_PATH, ext=SETTINGS.DEFAULT_REPORT_EXT): filename = os.path.join(path, '{}.{}'.format(name, ext)) if os.path.exists(filename) and os.path.isfile(filename): os.remove(filename) return True return False
Which was met with the question of, "Well how do you test that?" And this sort of astonished me. And maybe that's because of my growth as a developer. But the answer seemed obvious to me, "Create a directory, put a file named test.report in it, run remove_report, assert that the directory is empty."
import pytest from things.reports import remove_report def test_remove_report_deletes_file_report(tmpdir): report_dir = tmpdir.mkdir('delete_report') report = report_dir.join('test.report') report.write('') #needed to "create" the file remove_report(name='test', ext='report', path=report_dir.strpath) assert report_dir.listdir() == []
You can do the same thing with the class interface as well. Just import FileReportRemover and run FileReportRemove.remove_report with an instance of it instead. Maybe this person was under the impression that unit tests are the only type of test, or maybe the only valuable test. But what is the value of this test:
from unittest import mock @mock.patch('os.path') @mock.patch('os.remove') def test_remove_report_deletes_file_report(osremove, ospath): ospath.join.return_value = 'path/test.report' ospath.isfile.return_value = True ospath.exists = True remove_report('test', 'report', 'path') assert ospath.join.call_args == (('path', 'test.report'),) assert ospath.isfile.called assert ospath.exists.called assert osremove.call_args == (('path/test.report'), )
There's so much noise in this test. We're setting up mocks, there's strings all over, multiple asserts -- which isn't necessarily bad, but can be symptomatic of a poorly designed test. In fairness, there are three lines of setup in the other test, but I find that the setup is much clearer: We create a directory and put a file in it. In this one, we're setting up mock return values. And we need to mock an entire submodule of os.path, otherwise the test will explode.
More over, it doesn't get to the heart of the point of a test: are we actually removing a file from the file system. And it's fragile, if the interface of os changes -- unlikely, but that's besides the point -- the test will still pass. Using the autospec feature of mock will ease this pain, but I think that's an anti-pattern in this case.
And the worst part is this sets a precedence of mocking anything that's inconvenient. All of the tests will look like this. Meaning, you'll have to examine every piece of code under test to understand it. At that point, why even have tests? I'm being serious. I should be able to read the tests for some code and have a decent idea of what the implementation is.
Of course, I got asked, "When would you mock?" And the answer to that is, "Any time I need to test that remove_report did something but I don't actually need to remove a report." I offered the concept of a report sweeper:
def test_report_sweeper_ignores_os_error(): remover = mock.Mock(side_effect=OSError("You shouldn't see me")) reports = ['foo', 'bar', 'baz'] report_sweeper(reports, remover=remover) assert remover.call_args_list == [mock.call('foo'), mock.call('bar'), mock.call('baz')]
Because I own the interface to report_remover, I can comfortably mock that dependency. An alternative approach avoids mocking altogether:
def test_report_sweeper_ignores_os_error_oddly(): call_count = 0 reports = ['foo', 'bar', 'baz'] def remover(name, ext=None, path=None): nonlocal call_count call_count += 1 raise OSError("You shouldn't see me") report_sweeper(reports, remover=remover) assert call_count == 3
I'll be honest, I like the mock approach here more because it's less noise. There is the mental overhead of knowing what Mock.side_effect does, but it's such a useful thing to know that I'd rather someone look it up than understand the oddness that is the locally defined remover. But in either case, you can imagine what the implementation of report_sweeper looks like:
def report_sweeper(reports, remover=remove_report): for report in reports: try: remover(report) except OSError: pass
This is what a true unit test is. We want to assert that in the case of an OSError, report_sweeper ignores it. You don't bother with fiddly details like, add a file to the system but give it the wrong permissions or just don't add a file to your system, or whatever. Do we want an integration test? Maybe, but given an OSError is an OSError, maybe not.
Deeper Lessons
Going back to the original exchange that prompted this whole thing, I think there's more important lessons to learn -- or rather unlearn -- about testing.
Unit Tests Aren't The End All Be All
I love unit tests. I love being able to spin up a tiny portion of my application and make assertions about a laser focused behavior. "Given I want to remove some reports, when an OSError occures, then the sweeper ignores it." That says nothing about what a report is, where they live or even how I'm removing it.
But on the other end, I need to be able to test that I can actually remove a report. And you can't unit test this. It's inherently tied to an external system -- the file system, a database, the network. Maybe it's tied to several of these external systems -- we keep a list of reports in the database but they live in S3 buckets.
Indirection is Invaluable
Because I want to be able to unit test my report_sweeper, I don't want to tie that to these external systems. Instead I want to tie it to a contract with my report remover: If you give me a name of a report, I'll handle the orchestration of removing it and let you know if it succeeded.
The indirection is not directly calling into the os module, instead I call something that calls that for me.  If you use requests to get some information, don't call requests.get directly -- have an adapter that manages all of that for you. I know this sounds crazy, but which is more descriptive read:
def get_some_data(id): data = requests.get('http://somedatasource.com/things/{}'.format(id)) data.raise_for_status() serializer = SomeSerializer(data=data) serializer.is_valid(raise_exception=True) return serializer.data
Or:
def get_some_data(id): external = ExternalHelper(uri='https://somedatasource.com/things/{}', serializer=SomeSerializer) return external.fetch(id)
Even better is if get_some_data is actually a method on an object that lists ExternalHelper as a dependency.
 Why are you patching that? It could be because you've tightly coupled your logic to requests (or any other external package). In that case, you should wrap up that communication. If you're patching in that adapter, it could be because you're testing a specific failure that's hard to emulate -- and generally, I'm okay with that. But it's best to run that test as a live integration against that external system.
But if you find yourself patching parts of the object you're actively testing, you need to stop and find out what you need to do to ease that relationship. By patching that method, you're only going to bake in the badness and cause tremendous pain down the road.
Unit Test Logic
If there's logic, test it. Test it every way you can think, and then get the nearest child to give it input and fix any holes they find. This will generally involve using stubs and fakes for expensive collaborators -- things that do I/O, system calls and CPU warmers. But if you don't need to fake something, don't. Just use the real thing. It's okay.
Boundary Test Relationships
This makes the assumption you wrap up external dependencies. When you're testing relationships, you want to make sure Subject A talks to Subject B correctly, and vice versa. You're testing things like, "Given I want Frob 314, Then I ask FrobRepository to fetch with 314 as the argument." You want to test that the right arguments get to the right things and only add enough support code to get the test to finish.
Integration Test Wrappers
There's generally very little logic in something that only serves to translate inputs and outputs from Domain A to Domain B. It's usually things like this:
class Notifier(ABC): @abstractmethod def notify(self, recipient, message): pass class TwilioTexter(Notifier): def __init__(self, sender, client): self.client = client self.sender = sender def notify(self, recipient, message): self.client.messages.create(to=recipient.phone_number, from_=self.sender, body=message)
You'll recieve no value from all the mocking and patching in the world with this. You'll derive some value from boundary testing this by supplying a fake client that records its inputs. But the most value will come from actually sending a text message with a test.
Now, you'll not want to always send a text message when you run your test suite, especially if you're not poking something related to this wrapper. Luckily, py.test provides a very helpful marker module and a way to specify when to run these markers:
# tests/.../test_twilio_wrapper.py @pytest.mark.costs_money @pytest.mark.integration class TestTwilioWrapperSuite(object): pass
And on the command line, you can specify like this:
py.test -m "not integration or system"
to only run unit tests, or
py.test -m "integration and not costs_money"
To only run integrations that aren't also tagged with the costs_money tag. Or you could only tag it with costs_money to avoid accidentally running it with your integration tests. Another big helper here is tox, which goes a long way to setting up and executing tests for you. I love it so much, I've bound it to <F12> in normal mode for Vim. Alternatively, you can simply run !tox -e comma,separated,envs as well.
This allows you to run fast moving unit tests all the time and slow moving integration tests and system tests sometimes.
System Tests Are For The Big Picture
You don't want to do fine grained testing in your system tests. These are tests that integrate with things like frameworks, threads, asyncio, etc. And require specialized setup and the whole production application (though not necessarily the production data). These would be things like, "When I send a notification throught Twilio, the SMS sink shows the message as recieved".
Fin!
As usual, I'd like to end with some other content for you to consume that inspired me for this post:
- Mike Lin - Python Mocking 101: Fake It Before You Make It. This is the post that started the conversation. While it feel it gives bad advice -- encouraging patching of external dependencies -- it's a decent over view of the power of the mock library.
- Justin Searls - How To Stop Hating Your Test Suite. I really like Justin Searls. He's funny, informative, passionate and uses vim. By default I have to like him. He also gives really good talks about testing.
I spilled my brains, spill some of yours.


This post is the first of a three parts series of articles about manage development and CI/CD workflow with jgit-flow and Pipeline
- Part-1: Tools and Planning
- Part-2: Git workflow with JGit-Flow
- Part-3: Development and delivery process with Jenkins Pipeline
As the team grows bigger, and the projects become more complex, proper development conventions, workflow and CI/CD process become very important. In this series of posts I’ll describe such flow and process, from the Jira ticket to the delivery (and deployment), using a popular stack, including Jira, Git, Maven, and Jenkins.
Part 1 - Tools and Planning
Let’s start with a quick review of the tools we’ll use for the workflow implementation
Jira
Atlassian Jira is a popular proprietary issue tracking system.
We’ll manipulate Atlassian Jira feature tickets along the flow. This can be skipped if you don’t use Jira.
The project we’ll manage would be part of the Server team (ST) and the feature that we like to implement and deploy would be ST-145.
Its initial ticket status is ‘open’, the resolution is ‘unresolved’:
GitFlow
GitFlow is a branching model for Git, created by Vincent Driessen.
The GitFlow workflow defines a strict branching model designed around the project release. It uses the following branches:
-
Master: Stores the official release history. The origin/master is the main branch where the source code of HEAD always reflects a production-ready state.
-
Develop: Serves as an integration branch for features
-
Feature: Each new feature resides in its own branch. Feature branches use ‘develop’ as their parent branch. When a feature is complete, it gets merged back into ‘develop’
-
Release: Supports preparation of a new production release.
-
Hotfix: When a critical bug in a production version must be resolved immediately, a ‘hotfix’ branch may be branched off from the corresponding tag on the ‘master’ branch that marks the production version.
If you’re new to git-flow, please take some time to read about it in Driessen’s post or in Atlassian’s Guide.
Jgit-flow (Maven plugin)
JGit-Flow maven plugin is a Java implementation of GitFlow, and like Jira, it was published by Atlassian. It designs for releasing a maven-based project and includes many other useful features.
‘jGit-flow’ provides the following git-flow basic functionality:
-
jgitflow:feature-start Starts a feature branch
-
jgitflow:feature-finish Merges a feature branch
-
jgitflow:release-start Starts a release
-
jgitflow:release-finish Merges a release
-
jgitflow:hotfix-start Starts a hotfix
-
jgitflow:hotfix-finish Merges a hotfix
Each feature contains many attributes, providing very useful functionality (described in the links), that we’ll use later on.
Jgit-flow-jira
JGit-Flow-Jira is a fork that I made for ‘jgit-flow’, which uses a Jira client to change the state of a Jira ticket during the lifecycle of a feature. Unfortunately, jgit-flow is not bug-free, and currently maintained mostly by the users and not by Atlassian. It is, however, published as open source and written very clearly. Jgitflow-jira contains a fix for this open bug as well.
Jenkins(Pipeline)
Jenkins Pipeline (or simply “Pipeline”) is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins.
As opposed to the historic Gui-driven CI/CD tools for Jenkins jobs, the definition of a Pipeline is written into a text file (called a Jenkinsfile) as a code. This in turn can be committed to a project’s source control repository.
We will use Pipeline for build, tests and release.
The Pipeline script would be written in Groovy and would use Jenkins syntax and shell commands.
Complete development, release and deployment plan
The flow-chart below describes the entire workflow, from the Jira ticket to deployment, that we’ll learn how to implement in the following sections.
We’ll review a development flow of a feature that was assigned to the ‘server team’ called ‘ST-145’, and the process of releasing and deploying the next version: v 1.2.0, of an application called ‘volcano’.
There are many shapes and arrows in the graph, but there’s no need to make sense of them all right now, since we’re going to do exactly that in the following sections.


This game is played on a 8x8 square
board with the following setup:
SOLDIER - Moves and captures by
sliding orthogonally and diagonally thru any number of empty cells
until it meets another piece (i.e., like the chess Queen).
KING - Moves and captures to an
(orthogonal or diagonal) adjacent cell (i.e., like the chess King).
GOAL - A player wins when it
captures the opponent's King.
If there is no capture for 10 turns,
the game is a draw.
An example
This
position is a win for Black (the basic chess endgame) if he manages to
capture the King in 10 moves.


{{TITLE}}
This is the header
Global var: {{GLOBAL}}
This is the content
Column-1
Global
{{COL|html}}
{{GLOBAL}}
This is the footer
Global var: {{GLOBAL}}


paragraph 1
paragraph 2
x=3;
y=2;
z=x+y;
- list 1
- list 2
- list 3
paragraph 3
paragraph 4
x=3;
y=2;
z=x+y;
- list 4
- list 5
paragraph 5
paragraph 6
x=3;
y=2;
z=x+y;
paragraph 7
paragraph 8
x=3;
y=2;
z=x+y;
paragraph 9
paragraph 10
x=3;
y=2;
z=x+y;


Create Loop
*
Loop Language:
TypeScript
JavaScript
*
Project Path
Browse
*
Project Name
Aptitudes to Include
Clipboard
Filesystem
Keyboard
Network
Search
Window
Create Loop
*
Required


{% extends 'base.html' %} {% comment "License" %} % Copyright (c) 2018 ISP RAS (http://www.ispras.ru) % Ivannikov Institute for System Programming of the Russian Academy of Sciences % % Licensed under the Apache License, Version 2.0 (the "License"); % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % http://www.apache.org/licenses/LICENSE-2.0 % % Unless required by applicable law or agreed to in writing, software % distributed under the License is distributed on an "AS IS" BASIS, % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % See the License for the specific language governing permissions and % limitations under the License. {% endcomment %} {% load i18n %} {% load staticfiles %} {% block head_block %} {% endblock %} {% block title %} {% trans 'Job files comparison' %} {% endblock %} {% block body_block %}


Class: Aws::ACMPCA::Types::Validity
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-acmpca/lib/aws-sdk-acmpca/types.rb |
Overview
Validity
specifies the period of time during which a certificate is
valid. Validity
can be expressed as an explicit date and time when the
validity of a certificate starts or expires, or as a span of time
after issuance, stated in days, months, or years. For more
information, see Validity in RFC 5280.
Amazon Web Services Private CA API consumes the Validity
data type
differently in two distinct parameters of the IssueCertificate
action. The required parameter IssueCertificate
:Validity
specifies
the end of a certificate's validity period. The optional parameter
IssueCertificate
:ValidityNotBefore
specifies a customized starting
time for the validity period.
Constant Summary
Instance Attribute Summary
-
#type ⇒ String
rw
Determines how Amazon Web Services Private CA interprets the
Value
parameter, an integer. -
#value ⇒ Integer
rw
A long integer interpreted according to the value of
Type
, below.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#type ⇒ String
(rw)
Determines how Amazon Web Services Private CA interprets the
Value
parameter, an integer. Supported validity types include
those listed below. Type definitions with values include a sample
input value and the resulting output.
END_DATE
: The specific date and time when the certificate will
expire, expressed using UTCTime (YYMMDDHHMMSS) or GeneralizedTime
(YYYYMMDDHHMMSS) format. When UTCTime is used, if the year field
(YY) is greater than or equal to 50, the year is interpreted as
19YY. If the year field is less than 50, the year is interpreted as
20YY.
Sample input value:<PHONE_NUMBER>59 (UTCTime format)
Output expiration date/time: 12/31/2049 23:59:59
ABSOLUTE
: The specific date and time when the validity of a
certificate will start or expire, expressed in seconds since the
Unix Epoch.
Sample input value:<PHONE_NUMBER>
Output expiration date/time: 01/01/2050 00:00:00
DAYS
, MONTHS
, YEARS
: The relative time from the moment of
issuance until the certificate will expire, expressed in days,
months, or years.
Example if DAYS
, issued on 10/12/2020 at 12:34:54 UTC:
Sample input value: 90
Output expiration date: 01/10/2020 12:34:54 UTC
The minimum validity duration for a certificate using relative time
(DAYS
) is one day. The minimum validity for a certificate using
absolute time (ABSOLUTE
or END_DATE
) is one second.
#value ⇒ Integer
(rw)
A long integer interpreted according to the value of Type
, below.


Also known as Picosaurus
These can be arrived at from the definitions.
An "object" as per the Java Language Specification.
A "class" as per the Java Language Specification.
An object that does not use nor support any other kind of component/bean specification. It does not implement any lifecycle or marker interfaces, it does not provide any kind of metadata. Will usually follow the minimum requirements for classifying it as a JavaBean though.
An object that is a "valid java bean" according to the JavaBean Specification. That is, an object that has a public default constructor, and that supports setting and/or retrieving all or a part of its state using so-called setter and getter methods, which are named getXXX(), setXXX() or isXXX(), where XXX identifies part of its state. The JavaBean specification defines a metadata framework, an event framework, and some other things which are less relevant in this context. A JavaBean may represent both data and functionality.
An object that only represents data, but contains no 'logic' or any kind of other functionality (except for perhaps some utility methods that transform the data into some other form, like getXXXasString(). Will often override equals() and hashCode(); will often be serializable. Does not create threads, does not keep references to non-data objects.
An object that only represents functionality. It is a "unit of logic", that can "do work". In a well-designed application, the work that a component can do is specified in a work interface. Will usually not override equals() or hashCode(). It typically coexists with other components of the same language in the same application or server process.
One or more components that communicate with others over the wire. Services, laced together for some large stack, may be from different technologies or languages, and share only the specification of the wire protocol. Service implies remoteness and potential unavailability or outage.
A component that does not use threads (not even indirectly).
A component that uses threads (possibly indirectly through the use of a Thread Pool or Executor component).
A component that has a public default constructor and that usually has its state set up and/or modified through the use of some kind of framework-specific mechanism.
A component that has a public default constructor and that has its state set up through the use of setter methods.
A component that has one or more public constructors and that has its state set up through the arguments provided in one of these constructors.
A component that has a public constructor and that has its state set up through the arguments provided in that constructor and through the use of setter methods.
A component that does not implement any kind of logic to set up its own state, but completely depends on other parties to provide that state to it.
A component that implements some kind of logic to set up its own state. Examples: a component that reads an XML file; a component that looks up dependencies in JNDI; a component that queries system properties.
An object that implements a specification that is less generic than Java itself in its applicability. Example: EJB, Servlets.
An object that can be 'natively' used in the Spring Framework. Any JavaBean (with some extensions to that specification like "initialization completion" support), any object with a public default constructor that does not require any method calls to set up its state.
An object that can be 'natively' used in PicoContainer. Any Type-3 component.
An object that can be 'natively' used in the XWork Framework. Any object with a public default constructor that has its state set up through XXXAware interfaces.
An object that fails fast is an object that indicates as early as possible if it is in an inconsistent or unusable state (by throwing a fatal exception). The fastest possible way to FailFast is to do so during instantiation. This can be handled in an elegant way if the class is a GoodCitizen.


Video Game Data Set
|
Movies Data Set
|
Kickstarter Data Set
Video Game Sales
Top 100 Most Sold Video Games Grouped by Platform
Movie Sales
Top 100 Highest Grossing Movies Grouped By Genre
Kickstarter Pledges
Top 100 Most Pledged Kickstarter Campaigns Grouped By Category


Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 6 and above, brought to you by Google
Wiring up the application dependencies and handling all the dependency-related complexity, which comes in several flavors, as
boilerplate code in sense of maintainability
a strong upfront type checking for antecipating potential issues
as well as managing cross-cutting concerns (Transactions, Security, Performance...), scopes, etc
For solving these sort of problems there is Google Guice.
Binder
A Binding refers a mapping for an Interface to its corresponding Implementation.
Injector
Injectors take care of creating and maintaining objects that are used by the Clients.
Module
Modules are objects which will maintain the set of Bindings, which defines how dependencies are resolved. It is possible to have multiple Modules in an Application. Injectors, in turn, will interact with the Modules to get the possible Bindings. Module is represented by an interface with a method called Module.configure() which should be overridden by the Application to populate the Bindings.
Guice
Guice is a class which Clients directly depends upon to interact with other Objects.
Providers
Enables to lazily resolve dependencies, and get multiple instances of a certain type. Kind of factory.
Scopes
Unscoped: Create / Use / Drop.
@Singleton: One per application
@RequestScoped: One per web or RPC request
@SessionScoped: One per HTTP session (usefull for caching, etc)
Annotations
@ImplementedBy
This Annotation points to a Class object that provides Implementation to the interface.
@Inject
For injecting instances, we can use this Inject Annotation.
@ProvidedBy
Assuming that we want to customize the Object creation process for some interface type, then we would depend on Guice Provider mechanism. Let’s say, for Add interface we want AddProvider to create and return objects of type SimpleAdd.
@Singleton
If you want the dependency to be resolved in a single instance for all the application, you need to mark your class with a @Singleton annotation.
Examples
Message services
Sample implementation:
Let’s say we have another service implementation to send facebook messages.
Some application which requires the dependency:
The bindings (map types to their implementations):
Client application:
Injection: Constructor vs Method vs Field
Constructor injection combines instantiation with injection. Most constructors will then assign the parameters to final fields. Works nicely with unit testing.
On Method injection dependencies take the form of parameters, which the injector resolves before invoking the method.
Field injection: This is the most concise injection, but the least testable.


{% extends "layout.html" %} {% block body %} {% if session.logged_in %} {% endif %}
Upload a csv file containing the desired gain schedule.
The file must only have 4 columns.
The first column is the error cutoff for the gain (any error less than the last number gets all gains of zero).
The second column is the proportional gain (% on per deg F error).
The third column is the integral gain (% on per deg F error accumulated).
The fourth column is the derivative gain (% on per deg F measurement decrease).
The current file should be downloaded below to edit and upload (add csv extension to use).
{% endblock %}


Upgrade guideline
When detecting the upgrade information, please upgrade as follows:
- Login via ssh or VNC management terminal VM, switch to the root account, or sudo privileges.
- Close flexgw, execute the command: /etc/init.d/flexgw stop
- Upgrade, execute the command: /usr/local/flexgw/scripts/update --yes
- follow the prompts to finish the Upgrade.
- The upgrade is complete, start flexgw: /etc/init.d/flexgw start
Note: Before you upgrade, we recommend to backup files in /usr/local/flexgw/instance/


Survey: People Are More Likely To Think You’re Stupid If You Drink Bubble Tea A Lot
by Chee KinTap to listen to this article instead: 🔊 Listen to Post
While drinking milk tea may be a pretty popular trend that has swept across Asia by storm, you may want to reconsider your habit of chugging down another cup while reading this article. Don’t lie ah, we know many of you drink bubble tea while reading our page.
So you may be wondering why are we warning you against drinking bubble tea. Well, that’s because apparently according to a survey as reported by Sin Chew Daily, despite your level of education, intelligence, or other obvious factors, most people tend to judge and perceive you most typically through the things you say and the things you do.
Through a Japanese TV program broadcast by TBS, over 200 participants were interviewed, with the information they provided collected then sorted out to better identify the top 5 traits that only idiots have.
 Take for example, when someone breaks up with a boyfriend that had treated them badly, but winds up going back to him anyway, despite her friends telling her it’s a bad idea.
Meanwhile, 26 respondents say that people who are not sensitive to the moods of others are considered stupid.  They will insist on being correct, and deny all fault while showing off their wealth of knowledge.
 But also complying to the high demands of your own boss in the company is also another sign of stupidity.
While they did manage to interview over 200 people for the purposes of this survey, the results are pretty scattered in reality, so you should definitely take all of this with a grain of salt!
Also read: 27yo M’sian Woman Tried All Viral Food Trends, Gets Diabetes & Can’t Work Due to Loss of Sight


Anton Älgmyr
Twitter: @aalgmyr
make
cat prog.c | ./prog # Printing garbage might break your font
./prog <file1> <file2> > out.raw
./prog -d 2 0 out.raw # Decode the first (0th) channel out of two
./prog -h | ./prog -d 1 0
# Who needs cat?
./prog prog.c | ./prog -d 1 0
# Assuming ALSA
echo '<<<<<< /\_/\_/\ _-_-_-_ !!!!! :.:.:.: >>>>>> ****** ~~~~~~~' |
./prog | aplay -c1 -fFLOAT_LE -r44100
# Assuming sox
echo -n ' MENE MENE TEKEL UPHARSIN ' | ./prog |
sox -t raw -c 1 -r 44100 -L -e floating-point -b 32 - -n spectrogram -d 10 -X 300
Be warned, this is not your garden variety text-to-speech program! Earplugs are advised, or at least a handy and well-tested volume knob.
Pixels are numbered, amplitudes are weighed, frequencies are divided, and the message can be displayed in fiery letters, but don’t be alarmed.
How does decoding of the waveform work? Can you encode an arbitrary text in a sound sample?
To put it brief, this entry is akin to a sound based cat. It takes characters as input and outputs them into frequency space as audio. The entry also supports decoding the produced waveforms using the -d
flag. Usage instructions is output if run with the -h
flag, albeit not in an immediately legible format.
In normal operation, the entry reads characters from one or more sources. If the -h
flag is given, usage instructions is used as a source. Else if file paths are present as arguments those will be used. Else stdin is used.
If a character is part of the supported subset of ASCII {10, 32-126}
then that character is output into frequency space of an audio signal (44.1 kHz single precision float, endianness should depend on system endianness) through stdout. Any other character will be interpreted and outputted as a space.
Characters are printed using a (slightly modified) pixel font based on gohufont. Pixels are drawn using crosses in frequency space, achieved by simultaneous up and down chirps.
Each input source is designated its own channel in the output (one float per channel per time step in the output) so if you have a surround sound system you could listen to a cacophony of chirpy characters.
Interestingly, with training you might actually be able to tell characters just from hearing. But even without training you can easily read along with the printed characters and have the sound make sense with the look of the characters.
See image spoiler.png for an example spectrogram.
There is no error checking done when opening files, so expect segfaults if you provide the wrong path to a file.
This program is bound to misbehave if int is less than 32 bits.
Flags will only be interpreted correctly if they are the first argument. Reading a file named -d
or -h
is fully possible if it is not the first file provided, even though I am not sure why you would want to do that.
Providing invalid/unexpected arguments to the decode flag will result in odd behavior. Some erroneous arguments cause segfaults (negative number of channels, channel id outside valid range). One argument in particular causes an infinite loop printing whitespace.
A lot of the obfuscations done came naturally from trying to appease the size tool. To name some:
if
s#defines
, sadlyOn the intersection of size and obfuscation is the data encoding, which was quite fun to design.
Some additional obfuscation was done to mathematical formulas. Somewhat known expressions was transformed into equivalent but less recognizable counterparts.
I have tried to avoid intentional red herrings in the code, although fishy statements are plentiful.
The large string in the beginning of the source file contains font data, encoded in base64 using characters in the range ' '
to '_'
. The space was chosen as the zero because the data contains a lot of zeroes, and quite helpfully the size tool ignores whitespace even in strings. Without this fact the program would have been too large and the decoding feature would have had to go. Fortunately this hole in the size spec was readily available. :)
Characters in the font (5x8 pixels, 40 bits) is packed into 7 base64 digits (which was a pain to decode in minimal code).
Note that even though floats are used for the waveforms, the standard math library is not used at all! Most arithmetic is done purely on integers. The only major exception is generating a table of sine values which are interpolated to give high resolution waveforms. Can you see when the generation is triggered, and how it is done?
A critical issue encountered was that having abrupt starts and ends of signals cause a lot of problems with spectral leakage which makes spectrograms hard to read and audio painful to listen to. To reduce spectral leakage a windowing function was used. Although the one used is quite well known, it is not in a form that should be familiar to anyone. What looks like a polynomial and quacks like a polynomial might not actually be a polynomial, at least not deep inside.
The program was written to deal exclusively with file descriptors, so how would one go about printing a char array not from a file descriptor without adding additional logic? Answer: ungetc
into stdin, one char at a time (to be standards compliant). This is used to print the usage instructions.
Compiling using
gcc -Wall -Wextra -pedantic
gives only -Wmisleading-indentation
which is sensible considering the source code. While
clang -Wall -Wextra -pedantic
is a bit more pessimistic and gives -Wempty-body
(I like loops without bodies), -Wstring-plus-int
(since apparently some people think string+int is a concatenation) and one of the weirder warnings I have seen from me splitting a negative constant with whitespace. Compiling using
clang -Wall -Wextra -pedantic -Weverything
produces a few pagefuls of warnings and makes me feel generally bad about myself. :(
The reported size of the source code using the size tool is very intentionally 2018.
© Copyright 1984-2018,
Leo Broukhis, Simon Cooper, Landon Curt Noll
- All rights reserved |


Cycic (pronounced ‘psychic’) is a fuel cycle input generator. This tool is closely coupled to the data model of the discrete time nuclear fuel cycle code cyclus. Currently, cycic is implemented in pure JavaScript and is accessible from any modern web browser. This leverages a number of excellent libraries, such as jQuery and d3 for building interfaces and graphs.
Cycic’s design is broken up into two fundamental parts: the user-facing views and the backend model. Previous incarnations of cycic were called bright.ui and were written in Python using - at various times - VisTrails and the Enthought Tool Suite.
Cyclus uses RelaxNG (RNG) to create and validate fuel cycle components and the simulation as a whole. Cyclus has a multi-tiered modeling paradigm, including facilities, markets, regions, and institutions. Abstract schemas for each of these types of models are provided through associated RNG files to the underlying C++ code.
The cycic tool takes these RNG schema files and converts them to a JSON object representing the same information. These in-memory JSON objects are then used to generate facility, market, region, or institution specific forms for creating instances of these models. Once a new instance is created by the user, it is stored in a simulation object. These simulation objects may be persisted either as JSON objects themselves or converted to XML. This XML representation is valid input for the cyclus itself. See Figure 1 for a graphical display of this process.
The implementation of the views is separated from that of the models. This follows an MVC pattern, where cyclus itself is the controller and external to cycic. The basic views are forms for creating model instances based off of provided schemas. The model types are the same as in cycic:
However, the value added by cycic is that the user may build up from model instances a fuel cycle simulation. This is done by connecting concrete facilities, markets, etc to each other. This connections may be made in a variety of ways, including a drag-and-drop interface. To enable the GUI interactions, the fuel cycle itself is displayed in a node-edge or network view. Currently, this displays a market-centered rendering of the state of the fuel cycle. Additional representations are possible, including region-based (map, lat-long, etc), institution-centric, or a traditional mass flow diagram (using only the facilities from the market view). Further visualizations and interactions, such as the time line or the tables of existing model instance, also help the user interrogate and manipulate the state of the simulation.


Created by Rohit Musti and Sarah Bland
"GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly."
We're going to walk through the "Why?" and "How?" of this workflow.
At any given time in a project lifecycle, you're likely going to have multiple features or bugs to work on.
Some will be ready to go & some won't.
A "branch" is a "playground" version of the project... you get to explore without worrying that you'll damage the main project.
git checkout -b <\new local branch name>
git checkout <\desired local branch name>
git branch -a
Open a pull request to initiate discussion about commits
Discuss + review code
Deploy from branch to run tests before merge
Merge code into master branch (more on this later...)


Conratulations! You got C#! C# (pronounced see sharp) is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. For more information visit C#'s wikipedia page!
Congratulations! You got Python. Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. For more information visit Python's website!


Gigapixel videography, beyond the resolution of a single camera and human visual perception, aims to capture large-scale dynamic scenes with extremely high resolution. Benefiting from the high resolution and wide FoV, it leads to new challenges and opportunities for a large amount of computer vision tasks. Among them, object detection is a typical task to label the objects, especially humans and vehicles in an image or video. It is widely used in daily life and already changes the way industries work in many scenarios, e.g., counting the number of people attending an event, helping staffing allocation and resource allotment, monitoring high-traffic areas, etc.
However, accurate object detection in large-scale scenes is still difficult due to the low image-quality of the instances in the distance. Although the gigapixel videography can capture both the wide-FoV scene and the high-resolution local details, how to efficiently process such high-resolution data is still not well studied. It is an open question demanding prompt solutions. Thus, in this challenge, we present our unprecedented dataset “PANDA”, gigaPixel-level humAN-centric viDeo dAtaset (published in CVPR 2020), aiming for object detection research in large-scale gigapixel videography.
Lu Fang |
Tsinghua University |
Xiaoyun Yuan |
Tsinghua University |
Mengqi Ji |
Tsinghua University |
Feng Yang |
Google Research |


Changelog
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Breaking changes are marked inline.
- :sos: [breaking] marks changes to functionality.
- :o: [edge-case] marks bug-fixes that correct improper output. People depending on these bugs may have issues. In most cases, these changes will be versioned as minor releases.
- :unlock: [internal] marks changes to internal API methods that are marked
@private
. Users who override these methods might want to take these changes into account. In most cases, these changes will be versioned as minor releases. - :cool: [internal] points out new internal features that developers building on-top of sh2png should be aware of. A change might add access to variables that would otherwise need to be hardcoded, or add extra utility methods.
Unreleased
[1.1.0] - 2016-11-20
Added
.editorconfig
to enforce basic lint rules- CLI access via
sh2png
executable - :cool: [internal] The default color scheme and key-code mapping is now available as a class variable
Modified
- :o: [edge-case] Character widths were miscalculated. This has been fixed, but output is slightly different.


--- layout: v2Section title: Authentication Section: Authentication ---
Every call to a v2 API endpoint must include an access token in the header. Access tokens are acquired by calling the Authentication API, using your User Identifier and User Secret.
To obtain a User ID and User Secret:
(1) Navigate to the API section of the Dashboard, switch to the v2.0 tab, click Create Token and enter a name.
Account tokens provide access to any project in the account. Project tokens will only give access to a single project.
(2) Once the token is created, record your User ID and User Secret for use in Authentication requests. Note: The User Secret is only available when the token is first created so make sure you record it immediately.
Authentication header format is Authorization: Bearer {token}
Access tokens expire every 5 minutes, but you can get a new token by calling the Refresh Authentication API, using the refresh token returned by a successful Authentication. Refresh tokens are valid for 1 hour. You can refresh your Authentication for up to 24 hours before you need to log in again with an Authenticate request.
There are two main ways to handle Oauth authentication, depending on how you’re using Smartling’s API. The first way is to call the Authentication API before any other API call and pass the access token directly. This is best for intermittent API access.
If you’re integrating Smartling into an application or making a high number of calls, you may want to maintain a current access token as a variable, updating it regularly via the Refresh Authentication API.


The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
Whether the carousel should cycle continuously or have hard stops.
The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
Whether the carousel should cycle continuously or have hard stops.
The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
Whether the carousel should cycle continuously or have hard stops.
The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
Whether the carousel should cycle continuously or have hard stops.


DATALOGGER allows to log performance of functions and also save contents of their local variables into MAT-files.
More...
DATALOGGER allows to log performance of functions and also save contents of their local variables into MAT-files.
Definition at line 5 of file DataLogger.m.
◆ addPrefixToList()
| static function mxberry::log::DataLogger::addPrefixToList |
( |
in |
prefixStr | ) |
|
|
static |
ADDPREFIXTOLIST adds prefix to the end of the list with prefixes.
* Usage: addPrefixToList(prefixStr)
*
* input:
* regular:
* prefixStr: char [1,] - prefix to be added
*
◆ cell()
| static function mxberry::log::DataLogger::cell |
( |
in |
1, |
|
|
in |
0 |
|
) |
| |
|
static |
◆ configure()
| static function mxberry::log::DataLogger::configure |
( |
in |
varargin | ) |
|
|
static |
CONFIGURE determines configuration parameters for data logger.
* Usage: configure(varargin)
*
* input:
* properties:
* isEnabled: logical [1,1] - if true, then logging is
* switched on, otherwise it is switched off
* functionNameList: cell [1,nFunc] - list with names of
* functions for which logging is enabled
* storageLocationRoot: char [1,] - storage location
* nMaxDatesOnDisk: double [1,1] - maximal number of dates
* for which data logs may be on disk, data logs that
* are more than this number of dates on disk are
* deleted from the storage automatically; by default it
* equals to 5 days
*
- Author
- Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp<EMAIL_ADDRESS>- Copyright
- 2015-2016 Peter Gagarinov, PhD
2015 Moscow State University
Faculty of Computational Mathematics and Computer Science
System Analysis Department
◆ flush()
| static function mxberry::log::DataLogger::flush |
( |
| ) |
|
|
static |
FLUSH clears info set by configure within storage.
* Usage: flush()
*
◆ function()
| static mxberry::log::DataLogger::function |
( |
| ) |
|
|
static |
◆ getDataFileName()
| static function mxberry::log::DataLogger::getDataFileName |
( |
in |
shortFuncName, |
|
|
in |
fullFuncName |
|
) |
| |
|
staticprotected |
GETDATAFILENAME generates name for file with logged data.
* Usage: fileName=getDataFileName(shortFuncName,fullFuncName)
*
* input:
* regular:
* shortFuncName: char [1,] - short function name (see
* getFunctionProps method below for details)
* fullFuncName: char [1,] - full function name (see
* getFunctionProps method below for details)
* output:
* regular:
* fileName: char [1,] - full name of file with logged data
*
◆ getFunctionProps()
| static function mxberry::log::DataLogger::getFunctionProps |
( |
in |
indStack | ) |
|
|
staticprotected |
GETFUNCTIONPROPS returns short name of function as well as its full name including all necessary prefixes and information whether it is to be logged or not.
* Usage: [shortFuncName,fullFuncName,isLogged]=. . .
* getFunctionProps()
*
* input:
* optional:
* indStack: double [1,1] - index of function in stack
* (relative to this method, 1 corresponds to the
* immediate caller of this method); if not given
* we take the first function in the stack that is not
* method (or subfunction of method) of some descendant
* of this class
* output:
* regular:
* shortFuncName: char [1,] - short name of function to be
* logged (i.e. without name of class, prefixes, etc.)
* fullFuncName: char [1,] - full name of function with all
* necessary prefixes
* isLogged: logical [1,1] - if true, then given function is
* to be logged, otherwise false
*
◆ getIsEnabled()
| static function mxberry::log::DataLogger::getIsEnabled |
( |
| ) |
|
|
staticprotected |
GETISENABLED determines whether logging is enabled or not.
* Usage: isEnabled=getIsEnabled(className)
*
* output:
* regular:
* isEnabled: logical [1,1] - if true, then logging is
* enabled, otherwise falsr
*
◆ getPropInternal()
| static function mxberry::log::DataLogger::getPropInternal |
( |
in |
propName, |
|
|
in |
isPresenceChecked, |
|
|
in |
className |
|
) |
| |
|
staticprotected |
GETPROPINTERNAL gets corresponding property from storage.
* Usage: [propVal,isThere]=. . .
* getPropInternal(propName,isPresenceChecked)
*
* input:
* regular:
* propName: char [1,] - property name
* isPresenceChecked: logical [1,1] - if true, then presence
* of given property is checked before its value is
* retrieved from the storage, otherwise value is
* retrieved without any check (that may lead to error
* if property is not yet logged into the storage)
* optional:
* className: char [1,] - name of class, if not given
* name of current class is used
* output:
* regular:
* propVal: empty or matrix of some type - value of given
* property in the storage (if it is absent, empty is
* returned)
* optional:
* isThere: logical [1,1] - if true, then property is in the
* storage, otherwise false
*
◆ log()
| static function mxberry::log::DataLogger::log |
( |
| ) |
|
|
static |
LOG logs info on function only as text into special log-file.
* Usage: log()
*
◆ logData()
| static function mxberry::log::DataLogger::logData |
( |
| ) |
|
|
static |
LOG logs both info on function executed and data of local variables.
* Usage: logData()
*
◆ prop()
| static function mxberry::log::DataLogger::prop |
( |
| ) |
|
|
static |
◆ removePrefixFromList()
| static function mxberry::log::DataLogger::removePrefixFromList |
( |
| ) |
|
|
static |
REMOVEPREFIXFROMLIST removes prefix from the end of the list with prefixes.
* Usage: removePrefixFromList()
*
◆ reshape()
| static function mxberry::log::DataLogger::reshape |
( |
in |
functionNameList, |
|
|
in |
1, |
|
|
in |
|
|
) |
| |
|
static |
◆ setPropInternal()
| static function mxberry::log::DataLogger::setPropInternal |
( |
in |
propName, |
|
|
in |
propVal, |
|
|
in |
className |
|
) |
| |
|
staticprotected |
SETPROPINTERNAL sets value for corresponding property within storage.
* Usage: setPropInternal(propName,propVal)
*
* input:
* regular:
* propName: char - property name
* propVal: matrix of some type - value of given property to
* be set in the storage
* optional:
* className: char [1,] - name of class, if not given
* name of current class is used
*
◆ unique()
| static function mxberry::log::DataLogger::unique |
( |
in |
functionNameList | ) |
|
|
static |
The documentation for this class was generated from the following file:


So when I first went through the DBC handbook, frantically trying to soak in all the information I stumbled upon the concept of pair programming. My first thought was "oh god they're going to know I'm terrible and kick me out after the first time". Obviously that didn't happen. What actually happened was I went to the exact opposite side of town that I was supposed to meet my first pair and in a rush made it to a small cafe just before he got there. It turned out to be a great expereinece.  In no other situation would I tell someone the hardship of my day or the stupid sign I saw that made me laugh, but in the spirit of being fully aware and with your partner, you have to and it's great. It opens up the line for every idea coding wise and I think helps you get to the bottom of the problem faster. It's really tough getting all your thoughts out, I remember one challenge we were super stuck and there was so much silence. It's a weird habit inviting someone else into your center of thought, but the greatest thing is you get to find out just how different you are. In the silence and frustration you might come out with a solution, but sometimes if you think out loud your partner connects to something faster and suddenly Stypi lines are appearing out of nowhere and you're involuntarily throwing your hands up in cheer because you've solved it.
And then there's the part after pairing. FEEDBACK duh duh duh....Although seemingly meticulous, I feel feedback has a lot to offer. I like how Socrates has a part where you can write in your own feedback but then there's also a scale. This way you can explain and give constructive advice to the person, but also rate them on a scale. So far feedback has been very helpful and I think I've learned alot. In the beginning I'd get feedback about how I needed to talk more or feel free to share ideas and now I get more responses that say I was doing a pretty good job of that. I also happened to pair with someone quite frequently and so it was fun to see the development of responses I'd get over time. Initially things were good, but not necessarily specific and now that we've worked together a bunch I can see my pair and my improvements. On the flip side writing feedback is just as important. I think the hardest part was figuring out how to say a criticism in the best way so the other person could learn from it without thinking it was this huge deal. Also a lot of times I just didn't have criticisms for people. There are so many fantastic people in this program sometimes the hardest part was pin pointing something that could have gone better. Which I think is probably the best result we could hope for.


Enter your value:
Click the "get decision" button to get the decision from the smart contract. p> get decision
Calling the contract manually with hardcoded values, result logged in browser debug console:


{% extends "base.html" %} {% load assets %} {% block stylesheets %} {% assets "css_partners" %} {% endassets %} {% endblock %} {% block title %}Partners{% endblock %} {% block content %}
Here you can find a list of all our partners.
You can find instructions on how to link to our website on Link to use page.
no partners available
{% endif %}If you own or run a Stargate related website and would like to be our partner, contact us and we will send you a link to our banner and details how to link to our website (don't forget to attach your banner, image size should be 88x31px or 102x32px).
{% endblock %}


Welcome to our website about infosec. It's still under construction, but you can begin to browse some pages!
View code source of the file, to be sure we're secure!
Show our configurations


Hello World
Hello World
Hello World
Hello World你好啊
心里只有你一个请你相信我
请你不要去用假情折磨我
伤心时候忍不住说伤心话
夜里寂寞眼里就会滴滴嗒
心里只有你一个请你相信我
请你不要去用假情折磨我
伤心时候忍不住说伤心话
夜里寂寞眼里就会滴滴嗒
Hello World:欢迎欢迎光临
This line of text is meant to be treated as deleted text.
This line of text is meant to be treated as no longer accurate.
This line of text is meant to be treated as an addition to the document.


Image Recognition
ans.co.uk
Upload Image
Face Recognition
ans.co.uk
Upload Image
Text Recognition
ans.co.uk
Upload Image
×
An error has occured


|
AWS IoT Device SDK C++ v2 1.14.0
AWS IoT Device SDK C++ v2
|
#include <EventStreamClient.h>
A means to append headers or modify the payload of a message to be sent by the client.
Crt::Optional
. | Aws::Eventstreamrpc::MessageAmendment::MessageAmendment | ( | const MessageAmendment & | lhs | ) |
| Aws::Eventstreamrpc::MessageAmendment::MessageAmendment | ( | MessageAmendment && | rhs | ) |
|
noexcept |
|
explicitnoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| MessageAmendment & Aws::Eventstreamrpc::MessageAmendment::operator= | ( | const MessageAmendment & | lhs | ) |
|
noexcept |


ColourPop’s ‘Frozen II’ makeup collection is perfect gift for Frozen fans
by Treye GreenYour beauty looks can match the frigid fall temps now that ColourPop has dropped its gorgeous “Frozen II” Collection ahead of the film’s highly anticipated release.
The collection features gleaming eyeshadow palettes, high-shine lip glosses, and shimmering glitter gels inspired by Anna and Elsa from the film.
You can purchase the items solo or as the Elsa Collection kit and Anna Collection kit — which both include a pretty collectible box to store your products.
There’s also a Frozen II Collection set that includes all the products from launch, which’ll make an ideal gift for “Frozen” fans who want to pull some makeup inspiration from the fearless sisters. Plus, the items range from $8 to $76, so you won’t have to worry about blowing your whole budget on the “Frozen” lover in your life.
The countdown continues until the “Frozen II” release on November 22. But with this new makeup collection and the original “Frozen” now available on Disney+, fans have a few more things to keep them occupied as they patiently await the movie’s opening night.
Frozen II Collection Set
Price: $76
Elsa Collection Kit
Price: $38
Anna Collection Kit
Price: $38
Elsa Shadow Palette
Price: $15
Anna Shadow Palette
Price: $15
The Dark Sea Glitter Gel
Price: $9
Waterfall Glitter Gel
Price: $9
Mythic Journey Ultra Glossy Lip
Price: $9
Free Spirit Ultra Glossy Lip
Price: $9
Little Snow Creme Luck Lipstick
Price: $9
Going North Creme Lux Lipstick
Price: $9


Game Speed
Aww, your browser doesn't support HTML5!
doodle jump
using HTML5,
...by
Kushagra Agarwal
and
Rishabh
use
←
→
to move and space to (re) start...
Play
game over!
you scored 0 points
Restart
Tweet score
Post on FB
0


The New Survivalist
|
| . |
"Trust Yourself, Not the Government" Ron PaulTo survive the collapse, every family must take responsibility for their own disaster preparedness. Depending on whether a disaster is local, regional, national or global, you could be without essential services for a few days to many months. It is essential that you prepare now! In this web site "Survival Doc" will help you prepare for the worst, and live a more self-reliant and earth-sustaining lifestyle now, regardless of the magnitude or duration of the current crisis or any other impending emergency. Disaster Management Preparedness Introduction |
Preparedness is Peace of Mind!How to survive an economic crash depression: Think the worst is over? As of 2013 we have only seen the end of the beginning (or the beginning of the end!) We are on the verge of a contrived global economic disaster unlike any the world has ever known. In Chapter 15, Money, "Survival Doc" explains how you can protect yourself and even profit during this globalist-banker-government-engineered disaster, no matter how much nor how little you have now. But you must take action now! What Can You Do to Insure Your Economic Survival? |
Chapter 1:
|
Chapter 2:
|
Chapter 3:
|
Chapter 4:
|
Chapter 5:
|
Chapter 6:
|
Chapter 7:
|
Chapter 8:
|
Chapter 9:
|
Chapter 10:
|
Chapter 11:
|
Chapter 12:
|
Chapter 13:
|
Chapter 14:
|
Chapter 15:
|
Additional Resources
|
|
All information provided
on this web site is free. Donations are welcome to help get this information
into the hands of more people.
|


I DO - WEDDING APP
Overview
“I Do” is an app I designed to help solve the communication and organization problems prevalent in wedding planning. I went through several phases of iterations and user testing to create the final prototype. Come see my process.
PROBLEM: Weddings are a hard time for couples to stay in constant communication and organized with the entire wedding party. So what would allow a couple and their wedding party to stay organized and informed?
SOLUTION: This app caters to every couples’ unique wedding. This app eases the frustrations and helps make wedding planning seamless by breaking the barriers of miscommunication, unfamiliarity, and disorganization by keeping track of conversations, notes, links, and pins.
COMPETITIVE APPS: The Knot, Wiithyu, Appy Couple, Evernote, Pinterest, Google Calendar
Ideation
Flows: This is a flow I created to solve the problems without getting too wrapped up on the visuals.
Wireframes and User Testing
I created lo-fi wireframes from the flows then did several iterations of user testing before I created the mock ups.
USABILITY TESTING: I tested the wireframes on several users and made notes about what changes to make as you can see above. I went through several iterations of this testing.
Visuals
MOCKUPS: After knowing what styles I wanted, I began designing the final mockups. I went through several tweaks based on feedback.
Final Prototype
I brought in layers from Photoshop into After Effects to create quick animations. I brought the gifs into Invision to show how the app would interact. I also developed a website to advertise the app.


You can use this app to help you test out your onboarding/new hires app, by simulating new hire events.
Your onboarding app should produce the POST /applications/views/at/onboard/now/byID/{application}/pushes endpoint.
When a new hire occurs, the ATS (Applicant Tracking System) calls this endpoint, passing your app details about the new hire (name, email, etc.).
If you're reading this, you've probably managed to install this app successfully. You should now:
Install your own app (which produces the API)
Click to simulate the ATS telling all onboarding apps (including yours) about a new hire.
Look at the log below of this app's activity on the server as it calls the onboarding API on all onboarding apps
If your app is working, you should see it's shortcode in the results
You should also have received an incoming API call on your endpoint,
with this sort of information about the new hire.
Notes:
For test purposes, this app acts both as an ATS (i.e. consuming the onboarding API on onboarding apps to tell them about new hires)
and an onboarding app (i.e. producing the API itself). This means you'll see two apps in the results - this app and your app.
The actual data you receive in the API call is controlled by the customer's setup. Usually, this will at least include the candidate's
name and email, and details about the job they were hired into.


Would you like to help make the Tour de Temple activity a success? There are many ways to contribute!
See below for all the ways you can help serve.
"The best things are always worth finishing... Take advantage of every opportunity to learn and grow. Dream dreams and see visions. Work toward their realization. Wait patiently when you have no other choice. Lean on your sword and rest a while, but get up and fight again." - Elder Jeffrey R. Holland
Attend Temple
Complete initiatory, endowment and/or sealing work for all of the deceased individuals who were baptized and confirmed by the Young Men & Young Women the morning of 11/17 at the Gilbert Temple.
Transportation
Help transport youth from the Gilbert Temple to the Phoenix Temple on the day of the big ride! (6 AM on 11/17)
Pit Crew
Drive along in support vehicles to check on the cyclists, trade out bicycles as needed, pick up and drop off other cyclists, provide food, water, medical assistance, and cheer them on to the finish line.
Meal Prep
Help with meal preparation (cut fruit, toast buns, etc.) and serving to our ward and cyclists as they cross the finish line at Discovery Park.
Bike Equipment
If you have an extra bike and/or bike helmet available to be used by other participants.
Cycling
Ride a portion of or the entire route with our youth and other adults.


---
layout: base
---
{% include nav.html %}
{% include header-carousel.html height="50" unit="%" duration="7" %}
{% include carta.html %}
{{ content }}
{% include events.html %}
{% include image-gallery.html folder="/img/gallery" %}
{% include contact.html %}


|
TinyUSB C++ Extension
|
The configuration descriptor specifies values such as the amount of power this particular configuration uses, if the device is self or bus powered and the number of interfaces it has. When a device is enumerated, the host reads the device descriptors and can make a decision of which configuration to enable. It can only enable one configuration at a time. More...
#include <USBDescriptor.h>
Public Member Functions | |
| USBInterface * | createInterface () |
| USBInterface * | createInterface (tusb_desc_interface_t *data) |
| void | setConfigurationDescriptor (const uint8_t *desc, int len, bool parse=false) |
| USBConfiguration & | bMaxPower (uint8_t mAmp) |
| USBConfiguration & | bmAttributes (uint8_t value) |
| int | size () |
| int | totalSize () |
| USBDevice * | usbDevice () |
| int | usbInterfaceCount () |
| USBInterface * | usbInterface (int idx) |
| uint8_t * | configurationDescriptor () |
| uint8_t * | configurationDescriptorExt (int packetSizeHighSpeed=512) |
| uint8_t * | findDescriptor (uint8_t id, uint8_t idx) |
| Public Member Functions inherited from USBBase | |
| USBBase & | done (bool isDone) |
| bool | isDone () |
| uint8_t * | addDescriptor (uint8_t len,...) |
| uint8_t * | addDescriptor (const uint8_t *desc, int len) |
Protected Member Functions | |
| tusb_desc_configuration_t * | descriptor () |
| USBConfiguration (USBDevice *parent, int id) | |
| void | parseDescriptor (uint8_t *data, int data_len) |
Protected Attributes | |
| USBDevice * | parent |
| Vector< USBInterface * > | interfaces |
| tusb_desc_configuration_t * | descriptor_data |
| int | id |
| Protected Attributes inherited from USBBase | |
| bool | is_done |
Friends | |
| class | USBDevice |
The configuration descriptor specifies values such as the amount of power this particular configuration uses, if the device is self or bus powered and the number of interfaces it has. When a device is enumerated, the host reads the device descriptors and can make a decision of which configuration to enable. It can only enable one configuration at a time.
|
inlineprotected |
< Size of this descriptor in bytes
< CONFIGURATION Descriptor Type
< Index of string descriptor describing this configuration
< Configuration characteristics
D7: Reserved (set to one)
D6: Self-powered
D5: Remote Wakeup
D4...0: Reserved (reset to zero)
D7 is reserved and must be set to one for historical reasons.
A device configuration that uses power from the bus and a local source reports a non-zero value in bMaxPower to indicate the amount of bus power required and sets D6. The actual power source at runtime may be determined using the GetStatus(DEVICE) request (see USB 2.0 spec Section 9.4.5).
If a device configuration supports remote wakeup, D5 is set to one.
< Number of interfaces supported by this configuration


Market: DEX / BTC | Last Price: 0.00069011 BTC | Currency: BarterDEX | Base Currency: Bitcoin |
Join CoinExchange.io and start trading today!
1
But i didn't check it last time, so, i don't know if deposits / withdrawals are open or not.(edited)
mazyar_lp11-Feb-19 05:43 PM
In barterdex we can exchange it? Do you have tutorials?
mazyar_lp11-Feb-19 05:54 PM
I think the prices are too low
Tnx anyway for the puzzle
Decker11-Feb-19 06:22 PM
main prize in this puzzle was a ZILLA ...
2
1
but yes ... it's low amount (
mazyar_lp11-Feb-19 06:27 PM
It was fun
When new puzzle coming ?
Decker11-Feb-19 06:44 PM
From me? Probably this week. Can't promise any timeframes.(edited)
I have few ideas for easy puzzles and one for hard puzzle ) But all need some preparations.
I want my puzzles to be interesting and solveable in "one way" ... without random guesses, like "use capital letters or not", "use \n or not", etc )
3
Strob11-Feb-19 07:26 PM
For your puzzle @Decker, I tried with his address as a passphrase, stuff you could do while really drunk! And so the Wen Moon on twitter is that you?(edited)
mazyar_lp11-Feb-19 07:43 PM
@Decker yeah your puzzles too . Your type of puzzles without random things are perfect
cryptocat12-Feb-19 10:26 AM
I'll see if I can get time to create one in the next few days. We can fit it in between the other ones.
1
ca33312-Feb-19 11:09 AM
i will co-fund/sponsor every community driven/made cryptopuzzle
and other projects from the ecosys are also always happy to add some ARRR, LABS, etc. to the pot
2
1
CHMEX12-Feb-19 11:11 AM
is there already an Passphrase to Sapling key "converter"?
Gaming & Collectibles - it's been a great week for the @KomodoPlatform as development continues. To celebrate here's a #cryptopuzzle with 77.7 $KMD in a locked address. Got what it takes to solve it? The solution can be found in their latest article - https://t.co/C27S1NU...
2
1
Thanks to @ca333 for adding to the prize pool.
linuxcaptain14-Feb-19 08:50 PM
another cryptopuzzle with @cryptocat on the other side we have lost some of our solving power
cryptocat14-Feb-19 08:55 PM
It feels good to be on this side...I'll make you all suffer for weeks
1
linuxcaptain14-Feb-19 09:00 PM
come on... dont you remember?? you were one of us.. give us a second clue
i think i m on the right path @cryptocat . Because i think you had a motive to create this puzzle. you want the people who are trying to solve this puzzle to increase their knowledge in something. to learn ... But i ll wait for the next clue before i tell what i m thinking.
cryptocat15-Feb-19 12:02 PM
Also consider what you've learned so far for the previous 3 puzzles
1
linuxcaptain15-Feb-19 12:03 PM
ok. but i ll keep newline as an outsider.
cryptocat15-Feb-19 12:30 PM
I've tried to make it relatively "safe", so no issues with newline entries.
@KomodoPlatform Clue 4: What is "strong" in the article?
I don't want to give away too much, but I also don't want you to be frustrated
The solution is comprised of 3 steps -
Step 1: Get value(s)
Step 2: Convert value(s)
Step 3: Encrypt value(s)
I'll post this on twitter shortly, but you guys/gals can have a head-start with this.
The first clue contains everything you need for Step 1 and 2. Step 3 you should be familiar with by now
Ok now it's easy. I'll expect it to be solved within the next 12 hours haha
If no one solved it then I will create an address to solve step 1 solution, so you know you are on the right path. But I don't think it is needed.


If your problem is urgent, please call<PHONE_NUMBER>
If it's not, then fill out the form below to schedule an appoitment.
Thank you, ! Your appointment has been scheduled for , at . We're looking forward to seeing you then!


The Ada’s Team executive committee is elected every April. There are some descriptions of the positions below but for the actual responsibilities please see our constitution here. The following are the committee members for the 2019-20 academic year:
|
President: Responsible for managing the general executive and planning meetings |
Chelsea Hong |
|
VP Admin: Responsible for tutoring and room sitting hours as well as member attendance |
Lidia Ataupillco Ramos |
|
VP Finance: Responsible for any finances that are not related to conference |
Aysha Araien |
|
VP Events: Responsible for planning Autumn Feast, Clubs Fair and Coffee && Code events as well as bearsden submissions |
Vacant |
|
VP Promotions: Responsible for our social media, posters and this beautiful website |
JuSong Baek |
|
VP Outreach External: Responsible for working with WISEST to do a variety of kids outreach and network with other companies |
Eisha Ahmed |
|
VP Outreach Internal: Responsible for planning events with other students groups and organizing a diversity panel |
Rex Xiang |
|
VP Conference External: Responsible for planning flight and hotel in relation to conferences we go to |
Helen Gezahegn |
|
VP Conference Internal: Responsible for planning speeches and research posters at the conference we go to and preparing conference goers that we send |
Katherine Mae Patenio |
|
VP Conference Finance: Responsible for making a budget for the conference and allocating money to attendees |
Amy Xiang |
|
Mascot: Responsible for being adorable and lifting our spirits during midterms |
Ada Bot |


- IAddReceiverType - Interface in common
-
Common data type for adding receiver.
- IChatRoom - Interface in common
-
A generalized chat room interface that defines a set of operations of a chat room.
- IChatRoomAdapter - Interface in gp27_pg23.model.miniView
-
Mini model adapter
- IChatWindowAdapter - Interface in gp27_pg23.model.miniModel
-
Mini view adapter
- ICmd2ModelAdapter - Interface in common
-
This adapter is for the externally-sourced commands to interact with the local model
- ICmd2ModelAdapter - Interface in provided.datapacket.test
-
Dummy adapter to local model.
- IComponentFactory - Interface in common
-
A factory for creating desired GUI components.
- id - Variable in class provided.mixedData.MixedDataKey
-
Unique identifier for key
- idx - Variable in class provided.extvisitor.AExtVisitorHost
-
The index value that is associated with this host object
- IExceptionStatusType - Interface in common
-
IExceptionStatusType is a sub interface of IFailureStatusType,
defines a concrete failure status due to exception
- IExtVisitor<R,I,P,H extends IExtVisitorHost<I,? super H>> - Interface in provided.extvisitor
-
Interface that defines an extended visitor that has specific types for its
return value, R, its index value, I, its input parameters, P, and its
host, H.
- IExtVisitorCmd<R,I,P,H extends IExtVisitorHost<I,? super H>> - Interface in provided.extvisitor
-
Interface that defines a command used by AExtVisitor that has specific
types for its return value, R, its index value, I, its input parameters, P,
and its host, H.
- IExtVisitorHost<I,H extends IExtVisitorHost<I,? extends H>> - Interface in provided.extvisitor
-
An interface defining a host for an IExtVisitor who can visit this type of host.
- IFailureStatusType - Interface in common
-
Common data type for failure status.
- ii - Variable in class gp27_pg23.model.cmd.ImageType
-
The Image Icon
- IInstallCmdType - Interface in common
-
Common data type for transmitting command between remote peers.
- ImageType - Class in gp27_pg23.model.cmd
-
Image data type
- ImageType(ImageIcon) - Constructor for class gp27_pg23.model.cmd.ImageType
-
Construct with a ImageIcon
- IMixedDataDictionary - Interface in provided.mixedData
-
Abstract mixed data dictionary interface
A mixed data dictionary can hold multiple value types and retrieve those
values in a type-safe manner.
- IModelAdapter - Interface in gp27_pg23.view
-
Main model adapter
- info - Variable in class gp27_pg23.model.cmd.FailureStatusType
-
Failure Information
- infoMsgStrategy - Variable in class provided.rmiUtils.classServer.ClassServer
-
Strategy to display an informational message.
- infoMsgStrategy - Variable in class provided.rmiUtils.RMIUtils
-
Strategy to display an informational message.
- initC2MAdpt() - Method in class gp27_pg23.model.miniModel.ChatRoom
-
Initialize the command to model adapter
- initCmdMngr() - Method in class gp27_pg23.model.miniModel.ChatRoom
-
Initialize command manager
- initCR(ChatRoom) - Method in class gp27_pg23.model.ChatRoomManager
-
Initialize a chat room
- initGUI() - Method in class gp27_pg23.model.miniView.ChatWindow
-
- initGUI() - Method in class gp27_pg23.view.ChatView
-
Initialize GUI
- IPeerListCellRenderer - Class in gp27_pg23.view
-
Customized list cell render
- IPeerListCellRenderer() - Constructor for class gp27_pg23.view.IPeerListCellRenderer
-
- IReceiver - Interface in common
-
IReceiver defines a receiver in a chat room, which corresponds to a user (More accurately, a remote user's chat room) in the remote.
- IReceiverListCellRenderer - Class in gp27_pg23.model.miniView
-
Customized list cell render
- IReceiverListCellRenderer() - Constructor for class gp27_pg23.model.miniView.IReceiverListCellRenderer
-
- IRejectionStatusType - Interface in common
-
IRejectionStatusType is a sub interface of IFailureStatusType,
defines a concrete failure status due to rejection.
- IRemoveReceiverType - Interface in common
-
Common data type for removing receiver.
- IRequestCmdType - Interface in common
-
Common data type for sending a message that
a specific command is needed for processing a certain type of data packet.
- IRMI_Defs - Interface in provided.rmiUtils
-
Definitions for use in RMI programs
Note that "Client" and "Server" here do NOT refer to a client-server architecture,
rather they are just identifiers to differentiate one side from the other.
- IRMIUtils - Interface in provided.rmiUtils
-
Utility interface used to abstract and encapsulate the configuration,
initialization and shutdown of RMI as well as provide utilities for
accessing remote and local Registries and get the local IP address.
- ISender - Interface in provided.datapacket.test
-
Dummy sender.
- isStop - Variable in class provided.rmiUtils.classServer.ClassServer
-
Flag to used to stop the server
- IUser - Interface in common
-
IUser interface defines a set of operations of a user in our chatApp
IUser is NOT transmitted to anyone.
- IViewAdapter - Interface in gp27_pg23.model
-
Main view adapter for main model


Stream Spec
Synopsis
Titanium mobile needs support for stream IO operations on appropriate objects such as files, sockets and any other types we decide upon in the future. In order to support generic stream handling and the exchange of data between streams a common stream interface needs to be defined.
This document will outline the proposed additions for supporting stream operations within Titanium mobile, types that will support stream operations, API changes and source examples.
A separate spec exists that outlines encoding support for numeric and string values. The Encoding Spec enables the addition of reading and writing of numeric and string values along with support for specific encoding. In the future, we plan to support the ability for a developer to define their own stream types that can be used alongside the native Titanium streams.
Justification
Currently there isn't an easy or generic manner for reading or writing data from one complex type like xxx to another. By providing a Stream interface that these complex types can implement, we can allow developers to simplify the process of moving data between these complex types. In addition to the core stream interface which just allows these types to interact in a generic manner, convenience functions would be provided in a new Stream module that would allow many of the common operations on streams to be simplified further (IE: writing all data from one stream to another).
Ultimately, adding Stream support will enable our developers to simplify their source code and make IO operations for streaming types much more approachable.
Definitions
-
Stream - Generic input / output object that can be used for read / write operations with a variable frequency and amount.
-
Buffer - Generally represents temporary storage for data when moving from one location to another (such as reading data off a socket and then writing to a file). In our case, the buffer will be a container for binary data rather than being limited to only string data. Buffer Spec
Proposed Tasks
-
Create Stream interface
-
Create BufferStream object that implements Stream interface
-
Create BlobStream object that implements the Stream interface
-
Create FileStream object that implements Stream interface
-
Update Socket object to implement Stream interface
Proposed API
Stream objects below only list the methods that are applicable to the IO operations. More methods may exist already that are left out for the sake of focus on the stream operations.
Ti.Stream
Module
Stream module would expose generic Stream functionality outside of just the types that implement the Stream interface.
Properties:
int Ti.Stream.MODE_READ // constant representing a read only mode
int Ti.Stream.MODE_WRITE // constant representing a write mode
int Ti.Stream.MODE_APPEND // constant representing a append mode
Methods:
// wraps specified blob in a container that implements the Stream interface
BlobStream Ti.Stream.createStream({source:<Blob>, mode:<mode>})
// wraps the specified buffer in a container that implements the Stream interface
BufferStream Ti.Stream.createStream({source:<Blob>, mode:<mode>})
// Exceptions are throw for void return type methods when an error is encountered.
// callback argument for async read operations is an object with the following fields:
// 1) Stream source
// 2) int bytesProcessed
// 3) int errorState
// 4) String errorDescription
void read(Stream sourceStream, Buffer buffer, KrollCallback resultsCallback) // async version of read
// async version of read
void read(Stream sourceStream, Buffer buffer, int offset, int length, KrollCallback resultsCallback)
// should throw exception if there is an error reading from stream or if unable
// to write all data to buffer
Buffer readAll(Stream sourceStream)
void readAll(Stream sourceStream, Buffer buffer, KrollCallback resultsCallback) // async version of readAll
// callback argument for async write operations is an object with the following fields:
// 1) Stream source
// 2) int bytesProcessed
// 3) int errorState
// 4) String errorDescription
void write(Stream outputStream, Buffer buffer, KrollCallback resultsCallback) // async version of write
// async version of write
void write(Stream outputStream, Buffer buffer, int offset, int length, KrollCallback resultsCallback)
// writes all data from <inputStream> to <outputStream> in chunks of <maxChunkSize> bytes.
int writeStream(Stream inputStream, Stream outputStream, int maxChunkSize)
// resultsCallback argument for async writeStream operation is an object with
// the following fields:
// 1) Stream fromStream
// 2) Stream toStream
// 3) int bytesProcessed
// 4) int errorState
// 5) String errorDescription
// async version of writeStream. returns 0 and throws exception on error.
int writeStream(Stream inputStream, Stream outputStream, int maxChunkSize, KrollCallback resultsCallback)
// handler argument for pump operations is an object with the following fields:
// 1) Stream source
// 2) Buffer buffer
// 3) int bytesProcessed // -1 on end of stream
// 4) int totalBytesProcessed
// 5) int errorState
// 6) String errorDescription
// similar to writeStream, but instead of writing to another stream the
// chunks of data are handed off to <handler> in chunks of <maxChunkSize> bytes.
void pump(Stream inputStream, KrollCallback handler, int maxChunkSize) // sync pump operation
// variant that allows setting the pump operation to async or sync
void pump(Stream inputStream, KrollCallback handler, int maxChunkSize, boolean isAsync)
Interface
Common interface defines which methods all stream objects will need to support.
Methods:
// read / write operations that return an int will return the number of bytes actually
// written or read, -1 if no data is available and will throw an exception on error.
int read(Buffer buffer) // reads buffer.length amount of data from stream into <buffer>
// reads <length> number of bytes from stream into <buffer> starting at <offset>
int read(Buffer buffer, int offset, int length)
int write(Buffer buffer) // writes specified <buffer> to stream
// writes <length> number of bytes from <buffer> starting at <offset> to stream
int write(Buffer buffer, int offset, int length)
boolean isWriteable();
boolean isReadable();
void close() // closes file stream, exception is thrown on error
FileStream
File stream object used for IO operations on a physical file. Implements TiStream interface (not listing interface methods).
Creating file stream object:
// from existing file object
FileStream <Ti.Filesystem.File>.open(Ti.Filesystem.<MODE>)
// factory method for creating directly from path. filepath represents a variable length array of paths that will be combined into a full path
FileStream Ti.Filesystem.openStream(Ti.Filesystem.<MODE>, string[] filePath)
Socket
Socket object that supports IO operations. Implements Stream interface (not listing interface methods).
* refer to sockets spec for details on creating a socket
Methods:
// make sure the socket it actually in a connected state before trying to read or write data on socket
boolean isConnected()
Source examples
Reading data from file:
var messageBuffer = Ti.createBuffer()
var tempBuffer = Ti.createBuffer({length:1024}); // initialized with null characters
var bytesRead = 0;
while((bytesRead = fileStream.read(tempBuffer)) > -1) {
// buffer is expanded to contain the new data and the length is updated to reflect this
messageBuffer.append(tempBuffer, 0, bytesRead);
}
Reading data from file using readAll:
try {
var buffer = Ti.Stream.readAll(fileStream);
if(buffer.length <= 0) {
Ti.API.info('no data available');
} else {
Ti.API.info('received <' + buffer.length + '> bytes of data');
}
} catch(e) {
Ti.API.error('error when reading from file stream');
}
Writing data from one file to another
var inFileStream = Ti.Filesystem.getFile('infile.txt').open(Ti.Filesystem.MODE_READ);
var outBuffer = inFileStream.readAll();
var outFileStream = Ti.Filesystem.getFile('outfile.txt').open(Ti.Filesystem.MODE_APPEND);
outFileStream.write(outBuffer);
Write data from one stream to another. Useful for when writing large amounts of data that can not or should not be read into memory as a single chunk.
var outFileStream = Ti.Filesystem.getFile('outfile.txt').open(Ti.Filesystem.MODE_APPEND);
var inFileStream = Ti.Filesystem.getFile('infile.txt').open(Ti.Filesystem.MODE_READ);
// writes all data from inFileStream to outFileStream in chunks of 1024
var bytesWritten = Ti.Stream.writeStream(inFileStream, outFileStream, 1024);
Ti.API.info('<' + bytesWritten + '> byte written, closing both streams');
inFileStream.close();
outFileStream.close();
Reading data from one stream into a handler method:
var pumpCallback = function(e) {
Ti.API.info('Received data chunk of size <' + e.bytesPumped + '>');
// do stuff with data (e.data)
Ti.API.info('Total bytes received so far <' + e.totalBytesPumped + '>');
}
Ti.Stream.pump(inFileStream, pumpCallback, 1024);
var buffer = // acquire TiBuffer from some previous means
var outFileStream = Ti.Filesystem.getFile('outfile.txt').open(Ti.Filesystem.MODE_WRITE);
var inBufferStream = Ti.Stream.createStream({value:buffer, mode:Ti.Stream.MODE_READ});
// note that the means for writing the data from the buffer to the stream is
// identical to the previous example when writing one file to another. Both operations are
// identical from the view of writeStream since it only sees objects that
// implement the stream interface.
// writes all data from inBufferStream to outFileStream in chunks of 1024
var bytesWritten = Ti.Stream.writeStream(inBufferStream, outFileStream, 1024);Ti.API.info('<' + bytesWritten + '> byte written, closing both streams');
outFileStream.close();


These are the expressions ticktok.io currently supports
| Expression | Description |
|---|---|
| every.X.seconds | Tick every X seconds |
| every.X.minutes | Tick every X minutes |
| every.X.hours | Tick every X hours |
| @never | This clock will never invoke automatically and it's meant for manual invocation |
{% include docs/0.2.x/schedule_interval_java.html %}
{% include docs/0.2.x/schedule_interval_js.html %}
{% include docs/0.2.x/schedule_interval_clojure.html %}


Diagrams Charts Graphs and Illustrations
Using Adobe Photoshop and Illustrator I have created numerous diagrams, charts, graphs, and illustrations for various presentations. Here are some examples of the materials I created.
Display Materials
These are some examples of the display materials I have created. Each image was created using adobe Photoshop or Illustrator and later incorporated into Power Point.


Friday's weather: Cloudy with spells of rain; Top temperatures
by NewstalkTODAY
Mostly cloudy to begin today with showers or longer spells of rain in places.
Some brighter intervals will develop in the south this morning.
Brightening up elsewhere this afternoon but further showers or spells of rain will continue to occur, with some heavy falls, especially over the eastern half of the country.
Highs of 7C to 9C in light or moderate easterly breezes. Fresh at times on east and north coasts.
TONIGHT
Persistent and occasionally heavy rain near the east coast this evening and early tonight.
Elsewhere it will be largely dry at first with variable cloud and clear spells and the odd shower.
The rain in the east will spread westwards over the country overnight, producing spot flooding, mainly in eastern areas.
Lows of 1C to 5C with a risk of frost where clear spells prevail in the west and southwest.
Patches of mist and fog will form in the light to moderate mainly northerly winds, but winds will be easterly in direction near Irish Sea coasts.
Information supplied by Met Éireann