Prerequisites
Before starting this module, you don't need any previous HTML knowledge, but you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it and consuming content). You should have a basic work environment set up (as detailed in Installing basic software), and understand how to create and manage files (as detailed in Dealing with files). Both are parts of our Getting started with the web complete beginner's module.
Guides
This module contains the following articles, which will take you through all the basic theory of HTML and provide ample opportunity for you to test out some skills.
Getting started with HTML
Covers the absolute basics of HTML, to get you started — we define elements, attributes, and other important terms, and show where they fit in the language. We also show how a typical HTML page is structured and how an HTML element is structured, and explain other important basic language features. Along the way, we'll play with some HTML to get you interested!
What is in the head? Metadata in HTML
The head of an HTML document is the part that is not displayed in the web browser when the page is loaded.
It contains information such as the page
<title>
, links to CSS (if you want to style your HTML content with CSS), links to custom favicons, and metadata
(data about the HTML, such as who wrote it, and important keywords that describe the document).
HTML text fundamentals
One of HTML's main jobs is to give text meaning (also known as semantics), so that the browser knows how to display it correctly. This article looks at how to use HTML to break up a block of text into a structure of headings and paragraphs, add emphasis/importance to words, create lists, and more.
Reference
Details on where the information on this page was sourced.
In this article we cover the absolute basics of HTML, to get you started. We define elements, attributes, and all the other important terms you may have heard, and where they fit into the language. We also show how an HTML element is structured, how a typical HTML page is structured, and explain other important basic language features. Along the way, we'll play with some HTML to get you interested!
What is HTML?
HTML (Hypertext Markup Language) is not a programming language; it is a markup language used to tell your browser how to structure the web pages you visit. It can be as complicated or as simple as the web developer wishes it to be. HTML consists of a series of elements, which you use to enclose, wrap, or mark up different parts of the content to make it appear or act a certain way. The enclosing tags can make a bit of content into a hyperlink to link to another page on the web, italicize words, and so on. For example, take the following line of content:
My cat is very grumpy
If we wanted the line to stand by itself, we could specify that it is a paragraph by enclosing it in
a paragraph (

) element:

My cat is very grumpy

Anatomy of an HTML element
Let's explore our paragraph element a bit further:

My cat is very grumpy

The main parts of our element are:
- The opening tag: This consists of the name of the element (in this case, p), wrapped in opening and closing angle brackets. This states where the element begins or starts to take effect — in this case where the start of the paragraph is.
- The closing tag: This is the same as the opening tag, except that it includes a forward slash before the element name. This states where the element ends — in this case where the end of the paragraph is. Failing to include a closing tag is a common beginner error and can lead to strange results.
- The content: This is the content of the element, which in this case is just text.
- The element: The opening tag plus the closing tag plus the content equals the element.
Nesting elements
You can put elements inside other elements too — this is called
nesting. If we wanted to state that our cat is
very grumpy, we could wrap the word "very" in a

> element, which means that the word is to be strongly emphasized:

My cat is very grumpy.

You do however need to make sure that your elements are properly nested: in the example above, we opened
the
p
element first, then the
strong
> element, therefore we have to close the strong element first, then the
p
. The following is incorrect:

My cat is very grumpy.

The elements have to open and close correctly, so they are clearly inside or outside one another. If they overlap like above, then your web browser will try to make a best guess at what you were trying to say, and you may well get unexpected results. So don't do it!
Block versus inline elements
There are two important categories of elements in HTML which you should know about. They are block-level elements and inline elements.
- Block-level elements form a visible block on a page — they will appear on a new line from whatever content went before it, and any content that goes after it will also appear on a new line. Block-level elements tend to be structural elements on the page that represent, for example, paragraphs, lists, navigation menus, footers, etc. A block-level element wouldn't be nested inside an inline element, but it might be nested inside another block-level element.
- Inline elements are those that are contained within block-level elements and surround only small
parts of the document’s content, not entire paragraphs and groupings of content. An inline element
will not cause a new line to appear in the document; they would normally appear inside a paragraph
of text, for example an

element (hyperlink) or emphasis elements such as
or
.
Take the following example:
firstsecondthird

fourth

fifth

sixth

is an inline element, so as you can see below, the first three elements sit on the same line as
one another with no space in between. On the other hand,

is a block-level element, so each element appears on a new line, with space above and below each
(the spacing is due to default CSS styling that the browser applies to paragraphs).
Empty elements
Not all elements follow the above pattern of opening tag, content, closing tag. Some elements consist
only of a single tag, which is usually used to insert/embed something in the document at the place
it is included. For example, the

element embeds an image file onto a page in the position it is included in:
Attributes
Elements can also have attributes, which look like this:

My cat is very grumpy

Attributes contain extra information about the element which you don't want to appear in the actual content.
In this case, the
class
attribute allows you to give the element an identifying name that can be later used to target the
element with style information and other things.
An attribute should have:
- A space between it and the element name (or the previous attribute, if the element already has one or more attributes.)
- The attribute name, followed by an equals sign.
- An attribute value, with opening and closing quote marks wrapped around it.
Boolean attributes
You'll sometimes see attributes written without values — this is perfectly allowed. These are called
boolean attributes, and they can only have one value, which is generally the same as the attribute
name. As an example, take the
disabled
attribute, which you can assign to form input elements if you want them to be disabled (greyed out)
so the user can't enter any data in them.
<input type="text" disabled="disabled">
As shorthand, it is perfectly allowable to write this as follows:
<input type="text" disabled>
<input type="text">
Omitting quotes around attribute values
When you look around the World Wide Web, you'll come across all kind of strange markup styles, including attribute values without quotes. This is allowable in certain circumstances, but will break your markup in others. For example, if we revisit our link example from earlier, we could write a basic version with only the href attribute, like this:
favorite website
However, as soon as we add the title attribute in this style, things will go wrong:
favorite website
Single or double quotes?
In this article you'll notice that the attributes are all wrapped in double quotes. You might however see single quotes in some people's HTML. This is purely a matter of style, and you can feel free to choose which one you prefer. Both the following lines are equivalent:
A link to my example.
A link to my example.
You should however make sure you don't mix them together. The following will go wrong!
A link to my example.
If you've used one type of quote in your HTML, you can include the other type of quote without causing any problems:
A link to my example.
However if you want to include a quote within the quotes where both the quotes are of the same type(single quote or double quote), you'll have to use HTML entities for the quotes.
At its heart, HTML is a fairly simple language made up of elements, which can be applied to pieces of text to give them different meaning in a document (Is it a paragraph? Is it a bulleted list? Is it part of a table?), structure a document into logical sections (Does it have a header? Three columns of content? A navigation menu?), and embed content such as images and videos into a page. This module will introduce the first two of these, and introduce fundamental concepts and syntax you need to know to understand HTML.
What is the HTML head?
Let's revisit the simple HTML document we covered in the previous article:
<!DOCTYPE html>

<meta charset="utf-8">
<title>My test page</title>

This is my page

The HTML head is the contents of the

element — unlike the contents of the

element (which are displayed on the page when loaded in a browser), the head's content is not displayed
on the page. Instead, the head's job is to contain metadata about the document. In the above example,
the head is quite small:

<meta charset="utf-8">
<title>My test page</title>

In larger pages however, the head can get quite full. Try going to some of your favorite websites and use the developer tools to check out their head contents. Our aim here is not to show you how to use everything that can possibly be put in the head, but rather to teach you how to use the major elements that you'll want to include in the head, and give you some familiarity. Let's get started.
Adding a title
We've already seen the
<title>
element in action — this can be used to add a title to the document. This however can get confused with
the

element, which is used to add a top level heading to your body content — this is also sometimes referred
to as the page title. But they are different things!
- The

element appears on the page when loaded in the browser — generally this should be used once per page, to mark up the title of your page content (the story title, or news headline, or whatever is appropriate to your usage.) - The
<title>
element is metadata that represents the title of the overall HTML document (not the document's content.)
One of HTML's main jobs is to give text structure and meaning (also known as semantics) so that a browser can display it correctly. This article explains the way HTML can be used to structure a page of text by adding headings and paragraphs, emphasizing words, creating lists, and more.
The basics: Headings and Paragraphs
Most structured text is comprised of headings and paragraphs, irrespective of whether you are reading a story, a newspaper, a college textbook, a magazine, etc. Structured content makes the reading experience easier and more enjoyable.
In HTML, each paragraph has to be wrapped in a

element, like so:

I am a paragraph, oh yes I am.

Each heading has to be wrapped in a heading element:

I am the title of the story.

There are six heading elements —

,

,

,

,

, and

. Each element represents a different level of content in the document;

represents the main heading,

represents subheadings,

represents sub-subheadings, and so on.
Implementing structural hierarchy
As an example, in a story,

would represent the title of the story,

s would represent the title of each chapter and

s would represent sub-sections of each chapter, and so on.

The Crushing Bore

By Chris Mills

Chapter 1: The dark night

It was a dark night. Somewhere, an owl hooted. The rain lashed down on the ...

Chapter 2: The eternal silence

Our protagonist could not so much as a whisper out of the shadowy figure ...

The specter speaks

Several more hours had passed, when all of a sudden the specter sat bolt upright and exclaimed, "Please have mercy on my soul!"

It's really up to you what exactly the elements involved represent, as long as the hierarchy makes sense. You just need to bear in mind a few best practices as you create such structures:
- Preferably you should just use a single

per page — this is the top level heading, and all others sit below this in the hierarchy. - Make sure you use the headings in the correct order in the hierarchy. Don't use

s to represent subheadings, followed by

s to represent sub-subheadings — that doesn't make sense and will lead to weird results. - Of the six heading levels available, you should aim to use no more than three per page, unless you feel it is necessary. Documents with many levels (i.e. a deep heading hierarchy) become unwieldy and difficult to navigate. On such occasions, it is advisable to spread the content over multiple pages if possible.
Why do we need structure?
To answer this question, let's take a look at text-start.html — the starting point of our running example for this article (a nice hummus recipe.) You should save a copy of this file on your local machine, as you'll need it for the exercises later on. This document's body currently contains multiple pieces of content — they aren't marked up in any way, but they are separated with linebreaks (Enter/Return pressed to go onto the next line.)
However, when you open the document in your browser, you'll see that the text appears as a big chunk!
This is because there are no elements to give the content structure, so the browser does not know what is a heading and what is a paragraph. Furthermore:
- Users looking at a web page tend to scan quickly to find relevant content, often just reading the headings to begin with (we usually spend a very short time on a web page). If they can't see anything useful within a few seconds, they'll likely get frustrated and go somewhere else.
- Search engines indexing your page consider the contents of headings as important keywords for influencing the page's search rankings. Without headings, your page will perform poorly in terms of SEO (Search Engine Optimization).
- Severely visually impaired people often don't read web pages; they listen to them instead. This is done with software called a screen reader. This software provides ways to get fast access to given text content. Among the various techniques used, they provide an outline of the document by reading out the headings, allowing their users to find the information they need quickly. If headings are not available, they will be forced to listen to the whole document read out loud.
- To style content with CSS, or make it do interesting things with JavaScript, you need to have elements wrapping the relevant content, so CSS/JavaScript can effectively target it.
We therefore need to give our content structural markup.
Documentation for this page is sourced from the Introduction to HTML section on MDN web docs


Preparation time
over 2 hours
Cooking time
10 to 30 mins
Serves
Serves 6
Dietary
Layers of light, golden pastry, creamy vanilla custard and home-made strawberry jam all topped with simple glacé icing. This cream slice makes a very special tea-time treat and is much easier to prepare than you might think.
To prepare the pastry, preheat the oven to 210C/400F/Gas 6½ . Cut a piece of baking parchment into a 40 x 30cm/16 x 12in rectangle and sift one tablespoon of the icing sugar lightly over the top.
Place the block of puff pastry in the middle of the baking parchment and, using a rolling pin dusted with more icing sugar, roll out so that the pastry is around 2cm/¾in larger than the parchment on all sides. Turn the paper rather than the pastry as you roll and it shouldn’t stick.
Lift the pastry on its baking parchment onto a large baking tray. It doesn’t matter if the pastry overlaps the edges slightly as it will shrink back as it cooks. Dust with another tablespoon of sifted icing sugar. Prick the pastry with a fork all over and place a second baking tray on top. This will stop it rising too much and helps it keep a nice even shape. Bake the pastry for 25-30 minutes, or until golden-brown and crisp.
Take the trays out of the oven and leave to cool for five minutes before removing the top tray. While the pastry is still warm, trim the edges with a sharp knife to neaten. Cut the pastry into three identical rectangles, each approximately 11 x 24cm/4¼ x9½in. Leave to cool completely. This shouldn’t take more than 30-40 minutes.
To make the jam, put the strawberries and lemon juice in a small non-stick saucepan and place over a medium heat for two minutes, stirring until the strawberries begin to soften. Add the jam sugar and stir constantly for about 30 seconds, or until the sugar has dissolved.
Increase the heat and boil for 4-5 minutes, stirring occasionally, until the jam reaches setting point.
To check whether the jam is ready, remove the pan from the heat and spoon half a teaspoon of the jam onto a cold plate. Leave it to cool for one minute. If it wrinkles when you push it with your finger it has reached setting point. Transfer the jam to a small heat-proof bowl and leave to cool. If it hasn’t reached setting point, continue to simmer and test again.
To make the crème pâtissière, put the egg yolks and caster sugar in a bowl and whisk with electric beaters until pale and creamy. Whisk in the flour and cornflour until smooth. Put the milk into a medium non-stick saucepan. Scrape the vanilla seeds out of the pod into the milk and bring to a simmer. (Watch carefully so it doesn’t get a chance to boil over.)
Remove the milk from the heat and gradually add to the egg mixture, whisking constantly with a large metal whisk until it is thoroughly incorporated. Tip back into the saucepan and cook for 8-10 minutes over a low heat, stirring constantly with a wooden spoon until very thick and smooth. There shouldn’t be any floury taste remaining.
Spoon or pour the custard into a medium heat-proof bowl and cover the surface with clingfilm to prevent a skin forming. Leave to cool for 45-60 minutes. Lightly whip the cream until soft peaks form when the whisk is removed in a clean bowl. Stir the custard to loosen it and fold in the cream.
When you are ready to assemble the millefeuille, place one of the pastry pieces onto a board or platter and spread over half of the jam, leaving a 1cm/½in border of pastry around the edge. Using a large spoon, dot half of the crème patissiere over the jam and smooth evenly with a metal palate knife. Place a second piece of pastry on top and repeat the process. Top with the final pastry rectangle, with the flatter side facing upwards.
To make the glacé icing, sift 200g/7oz of the icing sugar into a large mixing bowl and stir in the lemon juice and one tablespoon water. Mix until smooth and set aside. The icing should have a soft dropping consistency without being too runny.
Into another mixing bowl, sift the remaining icing sugar and the cocoa powder. Stir in two teaspoons of cold water to form a smooth paste. Transfer the chocolate icing to a small disposable piping bag or polythene sandwich bag.
Using a palate knife spread the white icing over the top of the pastry, going right to the edges. Tap the board holding the millefeuille gently on the work surface a few times to help the icing settle smoothly. Working quickly, snip off just the very end of the piping bag and pipe four thin lines of chocolate icing, evenly spaced apart, down the length of the mille feuille. (You can also do this with a piping bag fitted with a very small plain writing nozzle.)
Starting roughly 2cm/¾in in from one end of the rectangle, drag a skewer towards you through the icing from one short side to the other, to create a simple feather effect with the icing. Repeat the skewer lines a further 10 times, spacing 2cm/¾in apart, across the millefeuille until the top is decorated with a delicate feathery chocolate icing.
Chill the assembled millefeuille for several hours or overnight in the fridge. When you are ready to serve, use a very sharp knife to cut into six slices, holding each side of the millefeuille lightly to prevent the layers separating.


Shop By
- processus
- Manufacturer
-
- Calvin Klein (2)
- Diesel (1)
- Polo (1)
- Tommy Hilfiger (1)
- Versace (1)
- Color
Carrello
You have no items in your shopping cart.
Compare Products
You have no items to compare.


We match independant social ventures to companies active CSR programs based on several factors such as mission, geography, industry, stage, cash flow, exit potential etc.
Startups who are looking for funding get registered here alongside with Investors, past registration we ask to fill general information, so that we run our recommendation based on that.
Our match making and recommendation algorithms have the best accuracy with 90% success rate. We match and recommend for both the investors and startups based on thier interests and preferences to avoid conflicts.
Once both startup and investor or company accept the match which we provide, then that's it congratulations.
Amazing people who made it happen.
Computer Science Junior
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro eius suscipit delectus enim iusto tempora, adipisci at provident.
Computer Science Sophomore
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro eius suscipit delectus enim iusto tempora, adipisci at provident.
Startup Semester
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro eius suscipit delectus enim iusto tempora, adipisci at provident.
Startup Semester
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro eius suscipit delectus enim iusto tempora, adipisci at provident.
Startup Semester
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro eius suscipit delectus enim iusto tempora, adipisci at provident.
Want to talk to us! Please let us know.


Volume
-
volume_mute_fill volume_mutevolume_fill volume_up
Brightness
-
circle brightness_lowcircle_half brightness_high
Price Filter ${{priceMin}} - ${{priceMax}}
-
money_dollar attach_moneymoney_dollar_fill monetization_on


Greeting! Complement of the season!! My Name is Derek Alexandra, the Regional Manager of UBS Investment Bank in London and would like to strike a business deal with you prior to your approval and consideration. There was a Non Resident Account opened in my Branch and for the past 6 years, this account was dormant without operation and at the same time nobody has come to claim the account with its closing balance of £35.7million.This has made be to trace the source and origin of the funds and the beneficiary starting since the year 2005 and today I have gathered every report confirming that the Beneficiary was a Top Government Official in his country and now have passed away six years ago leaving no legal inheritance instructions on the account. The families have no idea that such funds exist because the account was opened with a different name in order to maintain the privacy of the account in question. On this note, this account will be converted into the bank treasury by the end of first quarter of the year if no one has come for the claiming of the funds.Therefore,I come to you to know if you will endorse this offer so that I will present you as the Next of Kin to claim the funds while official documents will be prepared to support our claims. This is a straight forward deal without any risk attached. Our sharing ratio will be 50:50 should incase if you are interested. Please forward me your direct telephone numbers for discussion of this offer in further details or call me on +44 703 1956 130. Yours Sincerely, Derek Alexandra +44 703 1956 130 Email:dealexandra@laposte.net


| Overview | Module | Use | Devguide | Index |
| Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details |
| interface XDrawPages | ||
|
||
|
| Methods' Summary | |
| insertNewByIndex | creates and inserts a new DrawPage or MasterPage into this container |
| remove | removes a DrawPage or MasterPage from this container. |
| Methods' Details | |||||||
insertNewByIndex
|
|||||||
remove
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Choose the type of service you want to create *
API
FUNCTION
WEBSITE
Choose what platform you would like to use*
AWS
Azure
Google Cloud
Choose your runtime*
SUCCESS!
{{resMessage}}
You can find more details on next steps here.
Oops!
{{errMessage}}
If the issue persists, please contact us


TDD
-
Author: Carlos Domínguez García
-
Email<EMAIL_ADDRESS>About the project
This is a task for the subject “Lenguajes y Paradigmas de Programación” of “University of La Laguna”, the goal is to get familiar with Test Driven Environment. For that we had to implemented a class that handles food nutrients.
Update [Assignment 7]
We added a Double Linked List class to our project. For the nodes we used Ruby Struct. We also implemented some Food child classes to work with inheritance in Ruby.
Update [Assignment 8]
We made Food intances comparable and Dll enumerable to work with modules mixins. We also documented the code using yard.
Update [Assignment 9]
We added methods to the Food class to calculate the glycemic index of the food. Trying to do what we could with functional programming.
Update [Assignment 10]
Changed how foods are compared, now they are compared by energetic value. Also added 2 sorting methods to the Array class and we did a benchmark of those and the sort method.


Selected Unit: PLACEHOLDER_UNIT_ID
PLACEHOLDER_PLAYLIST
PLACEHOLDER_UNIT_DETAILS
PLACEHOLDER_CLASS_LEGEND


JS Validation form
×
Info!
Please register here first! *Fields are required
Registration form
Username:
Email:
Password:
×
Info!
Please login here after registration completed!
Login form
Username:
Password:


In this section, we'll do some exploratory analysis to understand the nature of our data and the underlying distribution.
# Import libraries necessary for this project
import numpy as np
import pandas as pd
from time import time
from IPython.display import display # Allows the use of display() for displaying DataFrames
import matplotlib.pyplot as plt
import seaborn as sns
# Import supplementary visualization code visuals.py from project root folder
import visuals as vs
# Pretty display for notebooks
%matplotlib inline
# Load the Red Wines dataset
data = pd.read_csv("data/winequality-red.csv", sep=';')
# Display the first five records
display(data.head(n=5))
data.isnull().any()
data.info()
n_wines = data.shape[0]
# Number of wines with quality rating above 6
quality_above_6 = data.loc[(data['quality'] > 6)]
n_above_6 = quality_above_6.shape[0]
# Number of wines with quality rating below 5
quality_below_5 = data.loc[(data['quality'] < 5)]
n_below_5 = quality_below_5.shape[0]
# Number of wines with quality rating between 5 to 6
quality_between_5 = data.loc[(data['quality']) >= 5 & (data['quality'] <= 6)]
n_between_5 = quality_between_5.shape[0]
# Percentage of wines with quality rating above 6
greater_percent = n_above_6*100/n_wines
# Print the results
print("Total number of wine data: {}".format(n_wines))
print("Wines with rating 7 and above: {}".format(n_above_6))
print("Wines with rating less than 5: {}".format(n_below_5))
print("Wines with rating 5 and 6: {}".format(n_between_5))
print("Percentage of wines with quality 7 and above: {:.2f}%".format(greater_percent))
# Some more additional data analysis
display(np.round(data.describe()))
# Visualize skewed continuous features of original data
vs.distribution(data, "quality")
As we can see, most fines fall under average quality (between 5 and 6). Wines which were rated high are in the lower hundreds, whereas there are very few wines that aren't tasty enough (low ratings).
Next, since our aim is to predict the quality of wines, we’ll now extract the last column and store it separately.
pd.plotting.scatter_matrix(data, alpha = 0.3, figsize = (40,40), diagonal = 'kde');
correlation = data.corr()
#display(correlation)
plt.figure(figsize=(14, 12))
heatmap = sns.heatmap(correlation, annot=True, linewidths=0, vmin=-1, cmap="RdBu_r")
#Create a new dataframe containing only pH and fixed acidity columns to visualize their co-relations
fixedAcidity_pH = data[['pH', 'fixed acidity']]
#Initialize a joint-grid with the dataframe, using seaborn library
gridA = sns.JointGrid(x="fixed acidity", y="pH", data=fixedAcidity_pH, size=6)
#Draws a regression plot in the grid
gridA = gridA.plot_joint(sns.regplot, scatter_kws={"s": 10})
#Draws a distribution plot in the same grid
gridA = gridA.plot_marginals(sns.distplot)
fixedAcidity_citricAcid = data[['citric acid', 'fixed acidity']]
g = sns.JointGrid(x="fixed acidity", y="citric acid", data=fixedAcidity_citricAcid, size=6)
g = g.plot_joint(sns.regplot, scatter_kws={"s": 10})
g = g.plot_marginals(sns.distplot)
fixedAcidity_density = data[['density', 'fixed acidity']]
gridB = sns.JointGrid(x="fixed acidity", y="density", data=fixedAcidity_density, size=6)
gridB = gridB.plot_joint(sns.regplot, scatter_kws={"s": 10})
gridB = gridB.plot_marginals(sns.distplot)
volatileAcidity_quality = data[['quality', 'volatile acidity']]
g = sns.JointGrid(x="volatile acidity", y="quality", data=volatileAcidity_quality, size=6)
g = g.plot_joint(sns.regplot, scatter_kws={"s": 10})
g = g.plot_marginals(sns.distplot)
#We can visualize relationships of discreet values better with a bar plot
fig, axs = plt.subplots(ncols=1,figsize=(10,6))
sns.barplot(x='quality', y='volatile acidity', data=volatileAcidity_quality, ax=axs)
plt.title('quality VS volatile acidity')
plt.tight_layout()
plt.show()
plt.gcf().clear()
quality_alcohol = data[['alcohol', 'quality']]
g = sns.JointGrid(x="alcohol", y="quality", data=quality_alcohol, size=6)
g = g.plot_joint(sns.regplot, scatter_kws={"s": 10})
g = g.plot_marginals(sns.distplot)
fig, axs = plt.subplots(ncols=1,figsize=(10,6))
sns.barplot(x='quality', y='alcohol', data=quality_alcohol, ax=axs)
plt.title('quality VS alcohol')
plt.tight_layout()
plt.show()
plt.gcf().clear()
# TODO: Select any two features of your choice and view their relationship
# featureA = 'pH'
# featureB = 'alcohol'
# featureA_featureB = data[[featureA, featureB]]
# g = sns.JointGrid(x=featureA, y=featureB, data=featureA_featureB, size=6)
# g = g.plot_joint(sns.regplot, scatter_kws={"s": 10})
# g = g.plot_marginals(sns.distplot)
# fig, axs = plt.subplots(ncols=1,figsize=(10,6))
# sns.barplot(x=featureA, y=featureB, data=featureA_featureB, ax=axs)
# plt.title('quality VS alcohol')
# plt.tight_layout()
# plt.show()
# plt.gcf().clear()
Detecting outliers in the data is extremely important in the data preprocessing step of any analysis. The presence of outliers can often skew results which take into consideration these data points. There are many "rules of thumb" for what constitutes an outlier in a dataset. Here, we will use Tukey's Method for identfying outliers: An outlier step is calculated as 1.5 times the interquartile range (IQR). A data point with a feature that is beyond an outlier step outside of the IQR for that feature is considered abnormal.
In the code block below:
NOTE: If you choose to remove any outliers, ensure that the sample data does not contain any of these points! Once you have performed this implementation, the dataset will be stored in the variable good_data.
# For each feature find the data points with extreme high or low values
for feature in data.keys():
# TODO: Calculate Q1 (25th percentile of the data) for the given feature
Q1 = np.percentile(data[feature], q=25)
# TODO: Calculate Q3 (75th percentile of the data) for the given feature
Q3 = np.percentile(data[feature], q=75)
# TODO: Use the interquartile range to calculate an outlier step (1.5 times the interquartile range)
interquartile_range = Q3 - Q1
step = 1.5 * interquartile_range
# Display the outliers
print("Data points considered outliers for the feature '{}':".format(feature))
display(data[~((data[feature] >= Q1 - step) & (data[feature] <= Q3 + step))])
# OPTIONAL: Select the indices for data points you wish to remove
outliers = []
# Remove the outliers, if any were specified
good_data = data.drop(data.index[outliers]).reset_index(drop = True)
#Defining the splits for categories. 1-4 will be poor quality, 5-6 will be average, 7-10 will be great
bins = [1,4,6,10]
#0 for low quality, 1 for average, 2 for great quality
quality_labels=[0,1,2]
data['quality_categorical'] = pd.cut(data['quality'], bins=bins, labels=quality_labels, include_lowest=True)
#Displays the first 2 columns
display(data.head(n=2))
# Split the data into features and target label
quality_raw = data['quality_categorical']
features_raw = data.drop(['quality', 'quality_categorical'], axis = 1)
# Import train_test_split
from sklearn.model_selection import train_test_split
# Split the 'features' and 'income' data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(features_raw,
quality_raw,
test_size = 0.2,
random_state = 0)
# Show the results of the split
print("Training set has {} samples.".format(X_train.shape[0]))
print("Testing set has {} samples.".format(X_test.shape[0]))
The following are some of the supervised learning models that are currently available in scikit-learn
that you may choose from:
To properly evaluate the performance of each model you've chosen, it's important that you create a training and predicting pipeline that allows you to quickly and effectively train models using various sizes of training data and perform predictions on the testing data. Your implementation here will be used in the following section. In the code block below, you will need to implement the following:
fbeta_score
and accuracy_score
from sklearn.metrics
.X_test
, and also on the first 300 training points X_train[:300]
.beta
parameter!# Import two classification metrics from sklearn - fbeta_score and accuracy_score
from sklearn.metrics import fbeta_score
from sklearn.metrics import accuracy_score
def train_predict_evaluate(learner, sample_size, X_train, y_train, X_test, y_test):
'''
inputs:
- learner: the learning algorithm to be trained and predicted on
- sample_size: the size of samples (number) to be drawn from training set
- X_train: features training set
- y_train: quality training set
- X_test: features testing set
- y_test: quality testing set
'''
results = {}
"""
Fit/train the learner to the training data using slicing with 'sample_size'
using .fit(training_features[:], training_labels[:])
"""
start = time() # Get start time of training
learner = learner.fit(X_train[:sample_size], y_train[:sample_size]) #Train the model
end = time() # Get end time of training
# Calculate the training time
results['train_time'] = end - start
"""
Get the predictions on the first 300 training samples(X_train),
and also predictions on the test set(X_test) using .predict()
"""
start = time() # Get start time
predictions_train = learner.predict(X_train[:300])
predictions_test = learner.predict(X_test)
end = time() # Get end time
# Calculate the total prediction time
results['pred_time'] = end - start
# Compute accuracy on the first 300 training samples which is y_train[:300]
results['acc_train'] = accuracy_score(y_train[:300], predictions_train)
# Compute accuracy on test set using accuracy_score()
results['acc_test'] = accuracy_score(y_test, predictions_test)
# Compute F1-score on the the first 300 training samples using fbeta_score()
results['f_train'] = fbeta_score(y_train[:300], predictions_train, beta=0.5, average='micro')
# Compute F1-score on the test set which is y_test
results['f_test'] = fbeta_score(y_test, predictions_test, beta=0.5, average='micro')
# Success
print("{} trained on {} samples.".format(learner.__class__.__name__, sample_size))
# Return the results
return results
In the code cell, you will need to implement the following:
'clf_A'
, 'clf_B'
, and 'clf_C'
.'random_state'
for each model you use, if provided.'samples_1'
, 'samples_10'
, and 'samples_100'
respectively.Note: Depending on which algorithms you chose, the following implementation may take some time to run!
Further reading: https://stackoverflow.com/questions/31421413/how-to-compute-precision-recall-accuracy-and-f1-score-for-the-multiclass-case
# Import any three supervised learning classification models from sklearn
from sklearn.naive_bayes import GaussianNB
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
#from sklearn.linear_model import LogisticRegression
# Initialize the three models
clf_A = GaussianNB()
clf_B = DecisionTreeClassifier(max_depth=None, random_state=None)
clf_C = RandomForestClassifier(max_depth=None, random_state=None)
# Calculate the number of samples for 1%, 10%, and 100% of the training data
# HINT: samples_100 is the entire training set i.e. len(y_train)
# HINT: samples_10 is 10% of samples_100
# HINT: samples_1 is 1% of samples_100
samples_100 = len(y_train)
samples_10 = int(len(y_train)*10/100)
samples_1 = int(len(y_train)*1/100)
# Collect results on the learners
results = {}
for clf in [clf_A, clf_B, clf_C]:
clf_name = clf.__class__.__name__
results[clf_name] = {}
for i, samples in enumerate([samples_1, samples_10, samples_100]):
results[clf_name][i] = \
train_predict_evaluate(clf, samples, X_train, y_train, X_test, y_test)
#print(results)
# Run metrics visualization for the three supervised learning models chosen
vs.visualize_classification_performance(results)
An important task when performing supervised learning on a dataset like the census data we study here is determining which features provide the most predictive power. By focusing on the relationship between only a few crucial features and the target label we simplify our understanding of the phenomenon, which is most always a useful thing to do. In the case of this project, that means we wish to identify a small number of features that most strongly predict the quality of wines.
Choose a scikit-learn classifier (e.g., adaboost, random forests) that has a feature_importance_
attribute, which is a function that ranks the importance of features according to the chosen classifier. In the next python cell fit this classifier to training set and use this attribute to determine the top 5 most important features for the wines dataset.
Choose a scikit-learn
supervised learning algorithm that has a feature_importance_
attribute availble for it. This attribute is a function that ranks the importance of each feature when making predictions based on the chosen algorithm.
In the code cell below, you will need to implement the following:
'.feature_importances_'
.# Import a supervised learning model that has 'feature_importances_'
model = RandomForestClassifier(max_depth=None, random_state=None)
# Train the supervised model on the training set using .fit(X_train, y_train)
model = model.fit(X_train, y_train)
# Extract the feature importances using .feature_importances_
importances = model.feature_importances_
print(X_train.columns)
print(importances)
# Plot
vs.feature_plot(importances, X_train, y_train)
# TODO: Import 'GridSearchCV', 'make_scorer', and any other necessary libraries
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import make_scorer
# TODO: Initialize the classifier
clf = RandomForestClassifier(max_depth=None, random_state=None)
# Create the parameters or base_estimators list you wish to tune, using a dictionary if needed.
# Example: parameters = {'parameter_1': [value1, value2], 'parameter_2': [value1, value2]}
"""
n_estimators: Number of trees in the forest
max_features: The number of features to consider when looking for the best split
max_depth: The maximum depth of the tree
"""
parameters = {'n_estimators': [10, 20, 30], 'max_features':[3,4,5, None], 'max_depth': [5,6,7, None]}
# TODO: Make an fbeta_score scoring object using make_scorer()
scorer = make_scorer(fbeta_score, beta=0.5, average="micro")
# TODO: Perform grid search on the claszsifier using 'scorer' as the scoring method using GridSearchCV()
grid_obj = GridSearchCV(clf, parameters, scoring=scorer)
# TODO: Fit the grid search object to the training data and find the optimal parameters using fit()
grid_fit = grid_obj.fit(X_train, y_train)
# Get the estimator
best_clf = grid_fit.best_estimator_
# Make predictions using the unoptimized and model
predictions = (clf.fit(X_train, y_train)).predict(X_test)
best_predictions = best_clf.predict(X_test)
# Report the before-and-afterscores
print("Unoptimized model\n------")
print("Accuracy score on testing data: {:.4f}".format(accuracy_score(y_test, predictions)))
print("F-score on testing data: {:.4f}".format(fbeta_score(y_test, predictions, beta = 0.5, average="micro")))
print("\nOptimized Model\n------")
print(best_clf)
print("\nFinal accuracy score on the testing data: {:.4f}".format(accuracy_score(y_test, best_predictions)))
print("Final F-score on the testing data: {:.4f}".format(fbeta_score(y_test, best_predictions, beta = 0.5, average="micro")))
"""Give inputs in this order: fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free sulfur dioxide,
total sulfur dioxide, density, pH, sulphates, alcohol
"""
wine_data = [[8, 0.2, 0.16, 1.8, 0.065, 3, 16, 0.9962, 3.42, 0.92, 9.5],
[8, 0, 0.16, 1.8, 0.065, 3, 16, 0.9962, 3.42, 0.92, 1 ],
[7.4, 2, 0.00, 1.9, 0.076, 11.0, 34.0, 0.9978, 3.51, 0.56, 0.6]]
# Show predictions
for i, quality in enumerate(best_clf.predict(wine_data)):
print("Predicted quality for Wine {} is: {}".format(i+1, quality))
Try solving this exercise again as a regression problem. Some of the common algorithms you can try from sklearn are DecisionTreeRegressor, RandomForestRegressor, and using AdaBoostRegressor with DecisionTreeRegressor. Some of the performance metrics that you might need to use in place of Accuracy and f1score are Mean Squared Error and R2Score
Try using the White Wines data-set in place of the Red Wines


public static class AccessoryConfig.Builder
extends java.lang.Object
| ��������˵�� |
|---|
Builder() |
| ���������� | ������˵�� |
|---|---|
AccessoryConfig |
build() |
AccessoryConfig.Builder |
cachePolicy(CachePolicy cachePolicy) |
AccessoryConfig.Builder |
debugLevel(int debugLevel) |
AccessoryConfig.Builder |
loadingThreads(int nLoadingThreads) |
AccessoryConfig.Builder |
networkPolicy(NetworkPolicy networkPolicy) |
AccessoryConfig.Builder |
queuePolicy(QueuePolicy queuePolicy)
�ѹ�ʱ��
Do not call anymore, FIFO is preferred by force.
|
public AccessoryConfig.Builder cachePolicy(@NonNull CachePolicy cachePolicy)
cachePolicy
- The CachePolicy
using to cache.CachePolicy
public AccessoryConfig.Builder networkPolicy(@NonNull NetworkPolicy networkPolicy)
networkPolicy
- The NetworkPolicy
using to download images.CachePolicy
public AccessoryConfig.Builder queuePolicy(@NonNull QueuePolicy queuePolicy)
queuePolicy
- The QueuePolicy
using for queue.QueuePolicy
public AccessoryConfig.Builder loadingThreads(@MinSize(value=1) int nLoadingThreads)
nLoadingThreads
- Number of threads when loading.public AccessoryConfig.Builder debugLevel(@MinSize(value=0) int debugLevel)
debugLevel
- Debug level of Loader.public AccessoryConfig build()


Xmla.Rowset Class
This class implements an XML/A Rowset object.
You do not need to instantiate objects of this class yourself.
Rather, the Xmla
class will instantiate this class to convey the result of any of the various discoverXXX()
methods
(see discover()
).
In addition, this class is also used to instantiate a Resultset for the
execute()
method in case the
Format
property is set to Tabular
(see OPTION_FORMAT
and OPTION_FORMAT_TABULAR
).
The request()
method itself will also return an instance of this class in case the method
is used to do a
Discover
request, or in case it is used to do a Execute
request and the Format
property is set to Tabular
.
An instance of the Xmla.Rowset
class is returned immediately as return value from the disoverXXX()
or execute()
method when doing a synchronous request.
In addition, the rowset is available in the eventdata passed to any registered listeners
(see addListener()
).
Note that for asynchronous requests, the only way to obtain the returned Rowset
instance is through the listeners.
Constructor
Xmla.Rowset
-
node
-
requestTtype
-
xmla
Parameters:
-
node
DOMDocumentThe responseXML result returned by server in response to a
Discover
request. -
requestTtype
StringThe requestType identifying the particular schema rowset to construct. This facilitates implementing field getters for a few complex types.
-
xmla
XmlaThe Xmla instance that created this Rowset. This is mainly used to allow the Rowset to access the options passed to the Xmla constructor.
Item Index
Methods
Properties
- MD_DIMTYPE_ACCOUNTS static
- MD_DIMTYPE_BILL_OF_MATERIALS static
- MD_DIMTYPE_CHANNEL static
- MD_DIMTYPE_CURRENCY static
- MD_DIMTYPE_CUSTOMERS static
- MD_DIMTYPE_GEOGRAPHY static
- MD_DIMTYPE_MEASURE static
- MD_DIMTYPE_ORGANIZATION static
- MD_DIMTYPE_OTHER static
- MD_DIMTYPE_PRODUCTS static
- MD_DIMTYPE_PROMOTION static
- MD_DIMTYPE_QUANTITATIVE static
- MD_DIMTYPE_RATES static
- MD_DIMTYPE_SCENARIO static
- MD_DIMTYPE_TIME static
- MD_DIMTYPE_UNKNOWN static
- MD_DIMTYPE_UTILIY static
- MD_STRUCTURE_FULLYBALANCED static
- MD_STRUCTURE_NETWORK static
- MD_STRUCTURE_RAGGEDBALANCED static
- MD_STRUCTURE_UNBALANCED static
- MD_SYSTEM_ENABLED static
- MD_SYSTEM_INTERNAL static
- MD_USER_DEFINED static
- MDMEASURE_AGGR_AVG static
- MDMEASURE_AGGR_AVGCHILDREN static
- MDMEASURE_AGGR_BYACCOUNT static
- MDMEASURE_AGGR_CALCULATED static
- MDMEASURE_AGGR_COUNT static
- MDMEASURE_AGGR_DST static
- MDMEASURE_AGGR_FIRSTCHILD static
- MDMEASURE_AGGR_FIRSTNONEMPTY static
- MDMEASURE_AGGR_LASTCHILD static
- MDMEASURE_AGGR_LASTNONEMPTY static
- MDMEASURE_AGGR_MAX static
- MDMEASURE_AGGR_MIN static
- MDMEASURE_AGGR_NONE static
- MDMEASURE_AGGR_STD static
- MDMEASURE_AGGR_SUM static
- MDMEASURE_AGGR_UNKNOWN static
- MDMEASURE_AGGR_VAR static
- MDMEMBER_TYPE_ALL static
- MDMEMBER_TYPE_FORMULA static
- MDMEMBER_TYPE_MEASURE static
- MDMEMBER_TYPE_REGULAR static
- MDMEMBER_TYPE_UNKNOWN static
Methods
close
()
Releases references to the DomDocument passed to the Rowset constructor. This should facilitate automatic garbage collection by the browser.
curr
()
Gets the value of the internal row index.
Note that no check is performed to ensure this points to a valid row:
you should call this function only when it is safe to do so.
This can be determined by calling hasMoreRows()
.
Returns:
int
eachRow
-
callback
-
scope
-
args
Walks through all rows, and calls the callback function for each row.
The callback function gets passed an object that represents the row. The keys of the row object are the column names, and the values are the respective column values.
The scope for calling the callback can be passed as the second argument to this method.
If the scope is not defined (or if it is null
), the Rowset's this
pointer is used instead.
You can pass additional data to the callback by passing in a third argument. This is then passed as is as second argument to the callback.
The eachRow
method will iterate untill the callback returns false
, or until all rows have been traversed.
If the callback returns false
, iteration is aborted and eachRow
as a whole returns false
too.
If iteration is not aborted, then eachRow returns true
.
Parameters:
-
callback
Function()Function to be called for each row.
-
scope
ObjectOptional. Scope in which the callback is called. Defaults to this, that is, the Rowset.
-
args
ObjectOptional. Object that is passed as extra argument to the callback.
Returns:
true if all rows were itereated. If the callback returns false, iteration stops and false is returned.
fetchAllAsArray
-
rows
Fetch all values from all fields from all rows, and return it as an array of arrays.
See fetchAsArray()
.
Parameters:
-
rows
ArrayOPTIONAL. An array to append the rows to. If not specified, a new array is created
Returns:
fetchAllAsObject
-
rows
Fetch all values from all fields from all rows, and return it as an array of objects.
See fetchAsObject()
.
Parameters:
-
rows
ArrayOPTIONAL. An array to append the rows to. If not specified, a new array is created
Returns:
fetchAllCustom
-
rows
-
func
-
args
Fetch all rows using a custom function, and return the return values as an array.
See fetchCustom()
.
Parameters:
-
rows
ArrayOPTIONAL. An array to append the rows to. If not specified, a new array is created
-
func
Functiona callback function to extract the fields.
-
args
Objectan object to pass data to the callback.
Returns:
fetchAsArray
()
Array
Fetch all values from all fields from the current row, and return it in an array. The position of the values in the array corresponds to the column order of the rowset. The internal row pointer is also increased so the next call will read the next row. The method returns false when there are no more rows to traverse. You can use this method to drive a loop to travere all rows in the Rowset:
while (rowArray = rowset.fetchAsArray()){ ...process array... }
Returns:
fetchAsObject
()
Object | Boolean
Fetch all values from all fields from the current row, and return it in an Object literal. The property names of the returned object correspond to the fieldName (actually the fieldLabel), and the field value is assigned to its respective property. The internal row pointer is also increased so the next call will read the next row. The method returns false when there are no more rows to traverse. You can use this method to drive a loop to travere all rows in the Rowset:
while (rowObject = rowset.fetchAsObject()){ ...process object... }
Returns:
fetchCustom
-
func
-
args
Fetch the values using a custom callback function.
If there are rows to fetch, the custom function is called in scope of the rowset, so you can use this
inside the custom function to refer to the rowset object.
Then, the internal row pointer is increased so the next call will read the next row.
The method returns whatever object or value is returned by the custom function, or false when there are no more rows to traverse.
Parameters:
-
func
Functiona custom function to extract and return the data from the current row of the xml result.
-
args
Objectan object that will be passed to the function. Useful to hold any data required in addition to the rowset itself (which can be referred to as this inside the function).
Returns:
fieldCount
()
Int
Returns the number of fields in this rowset.
Returns:
The number of fields in this rowset.
fieldDef
-
name
Retrieves a fieldDef
object by name.
A fieldDef describes a field (column). It has the following properties:
- label
- string. This is the human readable name for this field. You should use this name for display purposes and for building restrictions. This is also the name used for matching againstt the
name
argument passed to thefieldDef()
method. - name
- string. This is the (possibly escaped) name of the field as it appears in the XML document
- index
- int. The ordinal position of this field. Fields are numbered starting from 0.
- type
- string. The name of the XML data type for the values that appear in this column
- minOccurs
- string. The minimal number of occurrences of a value. "0" means the field is optional.
- maxOccurs
- string. If this is parseable as an integer, that integer specifies the number of times a value can appear in this column. "unbounded" means there is no declared limit.
- getter
- function. This function is used to extract a value from the XML document for this field.
Parameters:
-
name
StringThe name of the field to retrieve.
Returns:
The fieldDef
object that matches the argument.
fieldIndex
-
name
Retrieves the index of a field by name. Field indexes start at 0.
Parameters:
-
name
StringThe name of the field for which you want to retrieve the index.
Returns:
The ordinal position (starting at 0) of the field that matches the argument.
fieldName
-
name
Retrieves the name of a field by field Index. Field indexes start at 0.
Parameters:
-
name
StringThe name of the field for which you want to retrieve the index.
Returns:
The ordinal position (starting at 0) of the field that matches the argument.
fieldVal
-
name
Retrieves a value from the current row for the field having the name specified by the argument.
Parameters:
-
name
String | intThe name or the index of the field for which you want to retrieve the value.
Returns:
From the current row, the value of the field that matches the argument.
getFieldNames
()
string
Retrieve an array of field names. The position of the names in the array corresponds to the column order of the rowset.
Returns:
An (ordered) array of field names.
getFields
()
fieldDef
Retrieve an array of fieldDef
objects that describes the fields of the rows in this rowset.
The position of the fieldDef
objects in the array corresponds to the column order of the rowset.
For a description of the fieldDef
object, see the
fieldDef()
method.
Returns:
An (ordered) array of field definition objects.
getType
()
Indicates the type of rowset. In most cases, this will be identical to the requestType
value that was used in the
Discover
request
Returns:
int
One of the DISCOVER_XXX
, DBSCHEMA_XXX
or MDSCHEMA_XXX
constants
hasMoreRows
()
Bool
Indicates wheter the rowset can still be traversed.
You can use this method together with the
nextRow()
method
to drive a while
loop to traverse all rows in the rowset, like so:
while(rowset.hasMoreRows()){ ...process row... rowsete.nextRow(); }
Returns:
true in case there are more rows to traverse. false if all rows have been traversed.
mapAllAsObject
-
key
-
map
Fetch all rows as an object, store them as proprties in an object (which acts as map).
Parameters:
-
key
String | ArrayOPTIONAL. A column name or an array of column names that will be used to generate property names for the map. If not specified, the default key is used. If there is no default key, all column names will be used.
-
map
ObjectOPTIONAL. The object that is used as map. Rows are added as properties to this map. If not specified, a new object is created
Returns:
mapAsObject
-
map
-
key
-
row
Fetch all row as an object, store it in nested objects according to values in the column identified by the key argument.
This method should typically not be called directly, rather it is a helper method for mapAllAsObject()
.
Parameters:
-
map
Object -
key
Object -
row
Object
Returns:
a tree using column values as branch names, and storing a row or an array of rows at the leaves.
nextRow
()
Moves the internal row index to the next row.
You can use this method together with the
hasMoreRows()
method
to drive a while
loop to traverse all rows in the rowset.
readAsArray
()
Array
Reads the current row and returns the result as a new array.
This method does not advance the internal row pointer, and does not check if there is a valid row.
This method exists mainly as a convience in case you want to use a custom way to extract data from the resultset using the
fetchCustom()
method.
If you just want to obtain the results as arrays, see
fetchAsArray()
and
fetchAllAsArray()
.
Returns:
readAsObject
()
Object
Reads the current row and returns the result as a new object.
This method does not advance the internal row pointer, and does not check if there is a valid row.
This method exists mainly as a convience in case you want to use a custom way to extract data from the resultset using the
fetchCustom()
method.
If you just want to obtain the results as objects, see
fetchAsObject()
and
fetchAllAsObject()
.
Returns:
reset
()
Resets the internal row pointer so the resultset can be traversed again.
rowCount
()
Returns the number of rows in the set.
Returns:
int
Properties
MD_DIMTYPE_ACCOUNTS
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 6
MD_DIMTYPE_BILL_OF_MATERIALS
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 16
MD_DIMTYPE_CHANNEL
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 13
MD_DIMTYPE_CURRENCY
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 11
MD_DIMTYPE_CUSTOMERS
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 7
MD_DIMTYPE_GEOGRAPHY
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 17
MD_DIMTYPE_MEASURE
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 2
MD_DIMTYPE_ORGANIZATION
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 15
MD_DIMTYPE_OTHER
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 3
MD_DIMTYPE_PRODUCTS
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 8
MD_DIMTYPE_PROMOTION
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 14
MD_DIMTYPE_QUANTITATIVE
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 5
MD_DIMTYPE_RATES
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 12
MD_DIMTYPE_SCENARIO
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 9
MD_DIMTYPE_TIME
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 1
MD_DIMTYPE_UNKNOWN
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 0
MD_DIMTYPE_UTILIY
Int
final
static
A possible value for the DIMENSION_TYPE
column that appears in the
MDSCHEMA_DIMENSIONS
(See: discoverMDDimensions()
) and
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowsets.
Default: 10
MD_STRUCTURE_FULLYBALANCED
Int
final
static
A possible value for the STRUCTURE
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
Default: 0
MD_STRUCTURE_NETWORK
Int
final
static
A possible value for the STRUCTURE
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
Default: 3
MD_STRUCTURE_RAGGEDBALANCED
Int
final
static
A possible value for the STRUCTURE
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
Default: 1
MD_STRUCTURE_UNBALANCED
Int
final
static
A possible value for the STRUCTURE
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
Default: 2
MD_SYSTEM_ENABLED
Int
final
static
A bitmap value for the HIERARCHY_ORIGIN
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
identifies attribute hierarchies.
Default: 2
MD_SYSTEM_INTERNAL
Int
final
static
A bitmap value for the HIERARCHY_ORIGIN
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
identifies attributes with no attribute hierarchies.
Default: 4
MD_USER_DEFINED
Int
final
static
A bitmap value for the HIERARCHY_ORIGIN
column of the
MDSCHEMA_HIERARCHIES
(See: discoverMDHierarchies()
)rowset.
Identifies user defined hierarchies.
Default: 1
MDMEASURE_AGGR_AVG
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from AVG.
Default: 5
MDMEASURE_AGGR_AVGCHILDREN
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from AVERAGEOFCHILDREN.
Default: 10
MDMEASURE_AGGR_BYACCOUNT
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from BYACCOUNT.
Default: 15
MDMEASURE_AGGR_CALCULATED
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure was derived from a formula that was not any single function above.
Default: 127
MDMEASURE_AGGR_COUNT
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from COUNT.
Default: 2
MDMEASURE_AGGR_DST
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from DISTINCT COUNT.
Default: 8
MDMEASURE_AGGR_FIRSTCHILD
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from FIRSTCHILD.
Default: 11
MDMEASURE_AGGR_FIRSTNONEMPTY
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from FIRSTNONEMPTY.
Default: 13
MDMEASURE_AGGR_LASTCHILD
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from LASTCHILD.
Default: 12
MDMEASURE_AGGR_LASTNONEMPTY
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from LASTNONEMPTY.
Default: 14
MDMEASURE_AGGR_MAX
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from MAX.
Default: 4
MDMEASURE_AGGR_MIN
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from MIN.
Default: 3
MDMEASURE_AGGR_NONE
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from NONE.
Default: 9
MDMEASURE_AGGR_STD
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from STDEV.
Default: 7
MDMEASURE_AGGR_SUM
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from SUM.
Default: 1
MDMEASURE_AGGR_UNKNOWN
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure was derived from an unknown aggregation function or formula.
Default: 0
MDMEASURE_AGGR_VAR
Int
final
static
A possible value for the MEASURE_AGGREGATOR
column of the
MDSCHEMA_MEASURES
rowset (see: discoverMDMeasures()
),
identifies that the measure aggregates from VAR.
Default: 6
MDMEMBER_TYPE_ALL
Int
final
static
A possible value for the MEMBER_TYPE
column of the
MDSCHEMA_MEMBERS
rowset (see: discoverMDMembers()
),
indicating an all member.
Default: 2
MDMEMBER_TYPE_FORMULA
Int
final
static
A possible value for the MEMBER_TYPE
column of the
MDSCHEMA_MEMBERS
rowset (see: discoverMDMembers()
),
indicating a formula member.
Default: 3
MDMEMBER_TYPE_MEASURE
Int
final
static
A possible value for the MEMBER_TYPE
column of the
MDSCHEMA_MEMBERS
rowset (see: discoverMDMembers()
),
indicating a measure member.
Default: 4
MDMEMBER_TYPE_REGULAR
Int
final
static
A possible value for the MEMBER_TYPE
column of the
MDSCHEMA_MEMBERS
rowset (see: discoverMDMembers()
),
indicating a regular member.
Default: 1
MDMEMBER_TYPE_UNKNOWN
Int
final
static
A possible value for the MEMBER_TYPE
column of the
MDSCHEMA_MEMBERS
rowset (see: discoverMDMembers()
),
indicating a member of unknown type
Default: 0


--- layout: page status: publish published: true title: Resource author: display_name: Jace login: admin email<EMAIL_ADDRESS>url: http://blog.scalingworld.com/jace author_login: admin author_email<EMAIL_ADDRESS>author_url: http://blog.scalingworld.com/jace wordpress_id: 2 wordpress_url: http://blog.futureme.info/?page_id=2 date: '2012-02-02 13:26:57 +0800' date_gmt: '2012-02-02 13:26:57 +0800' categories: [] tags: [] comments: - id: 171 author: buy clomid no prescription author_email<EMAIL_ADDRESS>author_url: http://clomidnoprescription.overblog.com/ date: '2013-03-01 08:29:03 +0800' date_gmt: '2013-03-01 08:29:03 +0800' content: g37yDF Really enjoyed this blog.Really thank you! ---
Have been used vim for years in school,I collected some useful plugins,configurations etc. Hope this may help some newbie who is tring to use vim.

vim-ultimate(contains color theme,source code,.vimrc...)
preview:


Deep Learning Concept 4: Mini Batch
What is mini batch
To understand what is mini batch, let’s first take a look at batch gradient descent. For batch gradient descent, in each iteration you go through all the training data. You expect the cost to go down on every single iteration.
In mini batch gradient descent, each iteration has slower batch size and it takes many iteration to finish one epoch. For each iteration, you do forward prop on training data, compute cost using loss function, compute gradient descent of cost, back prop and update weights. Therefore, you are doing all the steps we do for batch gradient descent in each mini batch iteration.
Two extremes of mini batch:
mini batch size = M (# of training examples): Batch gradient descent; will converge steadily but take too long per iteration.
minibatch size = 1 is stochastic gradient descent; will not converge, will see cost change every single training example, but lose the speed up from vectorization.
How do you choose mini batch size?
Small training set: e.g. less than 2000, use batch gradient descent.
Large training set: possibly use mini-batch size range from 64 to 512. Make sure your minibatch fit in CPU/GPU memory


Updating an Old Node.js Project
Intro
My first "serious" NodeJS application, NextQ, a site to search for upcoming Dog Agility Trials, has been sputtering along for several years. Not much used, but it's been reasonably reliable. It was hosted on OpenShift Online 2, which hosted both the Node code and the MongoDB. In September I started getting emails that OpenShift 2 was in "sunset" mode and I should upgrade to OpenShift 3. While I was at it, may as well update the application. That part proved to be fairly simple.
Updating the Application
NPM has a nice command, npm outdated
, to see how up to date are your current modules in package.json. My results were:
> npm outdated
Package Current Wanted Latest Location
body-parser 1.15.0 1.15.2 1.17.2 nextq.info
cheerio 0.20.0 0.20.0 1.0.0-rc.2 nextq.info
compression 1.6.1 1.6.2 1.7.0 nextq.info
errorhandler 1.4.3 1.4.3 1.5.0 nextq.info
express 4.13.4 4.13.4 4.15.4 nextq.info
express-session 1.13.0 1.13.0 1.15.5 nextq.info
method-override 2.3.5 2.3.9 2.3.9 nextq.info
mocha 1.14.0 1.14.0 3.5.0 nextq.info
mongodb 2.1.16 2.1.21 2.2.31 nextq.info
morgan 1.7.0 1.7.0 1.8.2 nextq.info
multer 1.1.0 1.1.0 1.3.0 nextq.info
request 2.71.0 2.71.0 2.81.0 nextq.info
serve-favicon 2.3.0 2.3.2 2.4.3 nextq.info
xmldoc 0.4.0 0.4.0 1.1.0 nextq.info
As you can see, many were way out of date. The above list doesn't include Jade, which was at 1.11.0. It's successor, renamed to pug, was at 2.0.0-rc.4 I decided not to update Jade nor cheerio to "release candidate" versions, especially of major semantic revisions. I'm not using any fancy features of most of these packages, but let'snot push it.
Not sure if there is an automatic way to tell npm to update most but not all of package.json, and it was simplest
to do some manual editing of package.json. Then run npm update
and everything looks good.
As a relative newbie to JavaScript and Node, I use the WebStorm IDE for much of the development. Did a minor update of it from 2016.3.3 to 2016.3.4. There's newer versions but they require a new download, not a patch, so ignored them. Somewhat to my surprise, everything ran fine with WebStorm on localhost. There were three deprecation warnings, all in the same file in nearby lines.
...express deprecated req.param(name, default): Use req.params, req.body, or req.query instead at orgs\UKI.js:108:64
I liked having the "default" parameter in the function call, but easy enough to change to req.params.something || ''
.
Everything continued to run fine. In "local" mode, the app connects to a small mLab copy of my small MongoDB DB.
Updating OpenShift to V3
This part had more hassles. First you login to OpenShift Online 3 Starter (starter == free). Since I already had a RedHat account, no hassle. Had to add my Name and Location, then select a server location (California). It took quite a while while "Your account is being provisioned". I had to hit refresh and login again to get to the console.
Your new project has a "name" and a "display name". Seems like overkill to me, and at this stage who knows where there is any difference? Picked same name, nextq, for both, and gave a brief description.


Grateful thanks to Bruce Schneier for creating the Twofish and Blowfish
algorithms and for releasing Password Safe to the public; and
to SourceForge.net for hosting
the project and supporting the Open Source community.
Password Safe version 3.12 and later uses an algorithm created
by Tom Van Vleck, Morrie Gasser, and Dan Edwards to generate
pronounceable passwords.
Password Safe version 3.29 and later use pugixml
for parsing the application's configuration file. The code for pugixml is provided under the
MIT license.
The wxWidgets build of Password Safe from version 1.12 and later use graphics from
PNG Repo provided
under the Creative Commons 4.0 license.
The links that follow lead to various pages on the SourceForge web site related
to the Password Safe project:
Password Safe Home Page: Information and news about Password Safe as well as announcements about project status and new releases. The home page is maintained by Brad Chance - Thanks Brad!
Development Team: Just some of the folks that have helped develop and keep Password Safe going.


STRENGTHS: Characteristics of the organization that can contribute to its success.
WEAKNESSES: Characteristics of the organization that needs to improve or compensated for.
OPPORTUNITIES: Characteristics of the environment that can be (positively) exploited by the organization.
THREATS: Characteristics of the environment that can lead to negative results for the organization.
Have a look at the following video:
Video not showing:
Copy and paste the following link in your browser: https://www.youtube.com/watch?v=NVwQNOIu808
Click on NEXT to continue.


sizga hozirgi kunda tafsiya etamiza
Learn from examples.
Read about video_mantaj.
Read about 3D Rending.


|
| | SI4735 () |
| | Construct a new SI4735::SI4735.
|
| |
| void | reset (void) |
| | Reset the SI473X.
|
| |
| void | waitToSend (void) |
| | Wait for the si473x is ready (Clear to Send (CTS) status bit have to be 1).
|
| |
| void | setGpioCtl (uint8_t GPO1OEN, uint8_t GPO2OEN, uint8_t GPO3OEN) |
| | Enables output for GPO1, 2, and 3.
|
| |
| void | setGpio (uint8_t GPO1LEVEL, uint8_t GPO2LEVEL, uint8_t GPO3LEVEL) |
| | Sets the output level (high or low) for GPO1, 2, and 3.
|
| |
| void | setGpioIen (uint8_t STCIEN, uint8_t RSQIEN, uint8_t ERRIEN, uint8_t CTSIEN, uint8_t STCREP, uint8_t RSQREP) |
| | Configures the sources for the GPO2/INT interrupt pin.
|
| |
| void | setup (uint8_t resetPin, uint8_t defaultFunction) |
| | Starts the Si473X device.
|
| |
| void | setup (uint8_t resetPin, uint8_t ctsIntEnable, uint8_t defaultFunction, uint8_t audioMode=SI473X_ANALOG_AUDIO, uint8_t clockType=XOSCEN_CRYSTAL, uint8_t gpo2Enable=0) |
| | Starts the Si473X device.
|
| |
| void | setRefClock (uint16_t refclk) |
| | Sets the frequency of the REFCLK from the output of the prescaler.
|
| |
| void | setRefClockPrescaler (uint16_t prescale, uint8_t rclk_sel=0) |
| | Sets the number used by the prescaler to divide the external RCLK down to the internal REFCLK.
|
| |
| int32_t | getProperty (uint16_t propertyValue) |
| | Gets a given property from the SI47XX.
|
| |
| void | setProperty (uint16_t propertyNumber, uint16_t param) |
| | Sets a given SI47XX device property.
|
| |
| void | sendCommand (uint8_t cmd, int parameter_size, const uint8_t *parameter) |
| | Sends a given command to the SI47XX devices.
|
| |
| void | getCommandResponse (int num_of_bytes, uint8_t *response) |
| | Returns with the command response.
|
| |
| si47x_status | getStatusResponse () |
| | Gets the first byte response.
|
| |
| void | setPowerUp (uint8_t CTSIEN, uint8_t GPO2OEN, uint8_t PATCH, uint8_t XOSCEN, uint8_t FUNC, uint8_t OPMODE) |
| | Set the Power Up parameters for si473X.
|
| |
| void | radioPowerUp (void) |
| | Powerup the Si47XX.
|
| |
| void | analogPowerUp (void) |
| | You have to call setPowerUp method before.
|
| |
| void | powerDown (void) |
| | Moves the device from powerup to powerdown mode.
|
| |
| void | setFrequency (uint16_t) |
| | Set the frequency to the corrent function of the Si4735 (FM, AM or SSB)
|
| |
| void | getStatus (uint8_t, uint8_t) |
| | Gets the current status of the Si4735 (AM or FM)
|
| |
| uint16_t | getFrequency (void) |
| | Gets the current frequency of the Si4735 (AM or FM)
|
| |
| bool | getSignalQualityInterrupt () |
| | Get the Signal Quality Interrupt status.
|
| |
| bool | getRadioDataSystemInterrupt () |
| | Get the Radio Data System (RDS) Interrupt status.
|
| |
| bool | getTuneCompleteTriggered () |
| | Get the Tune Complete status.
|
| |
| bool | getStatusError () |
| | Get the Status Error.
|
| |
| bool | getStatusCTS () |
| | Gets the Error flag Clear to Send.
|
| |
| bool | getACFIndicator () |
| | Returns true if the AFC rails (AFC Rail Indicator).
|
| |
| bool | getBandLimit () |
| | Returns true if a seek hit the band limit.
|
| |
| bool | getStatusValid () |
| | Gets the channel status.
|
| |
| uint8_t | getReceivedSignalStrengthIndicator () |
| | Returns the value of Received Signal Strength Indicator (dBμV).
|
| |
| uint8_t | getStatusSNR () |
| | Gets the SNR metric when tune is complete (dB)
|
| |
| uint8_t | getStatusMULT () |
| | Get the Status the M U L T.
|
| |
| uint16_t | getAntennaTuningCapacitor () |
| | Get the Antenna Tuning Capacitor value.
|
| |
| void | getAutomaticGainControl () |
| | Queries Automatic Gain Control STATUS.
|
| |
| void | setAvcAmMaxGain () |
| | Sets the Avc Am Max Gain to maximum gain (0x7800)
|
| |
| void | setAvcAmMinGain () |
| | Sets the Avc Am Max Gain to minimal gain (0x1000)
|
| |
| void | setAvcAmDefaultGain () |
| | Sets the Avc Am Max Gain to default gain (0x2A80)
|
| |
| void | setAvcAmMaxGain (uint8_t gain=90) |
| | Sets the maximum gain for automatic volume control.
|
| |
| uint8_t | getCurrentAvcAmMaxGain () |
| | Get the current Avc Am Max Gain.
|
| |
| void | setAmSoftMuteMaxAttenuation (uint8_t smattn=0) |
| | Sets the Am Soft Mute Max Attenuation.
|
| |
| void | setSsbSoftMuteMaxAttenuation (uint8_t smattn=0) |
| | Sets the SSB Soft Mute Max Attenuation object.
|
| |
| void | setSsbIfAgcReleaseRate (uint8_t param=140) |
| | Sets the number of milliseconds the low IF peak detector.
|
| |
| void | setSsbIfAgcAttackRate (uint8_t param=4) |
| | Sets the IF AGC attack rate.
|
| |
| bool | isAgcEnabled () |
| | Checks if the AGC is enabled.
|
| |
| uint8_t | getAgcGainIndex () |
| | Gets the current AGC gain index.
|
| |
| void | setAutomaticGainControl (uint8_t AGCDIS, uint8_t AGCIDX) |
| | Automatic Gain Control setup.
|
| |
| void | setAGC (uint8_t AGCDIS, uint8_t AGCIDX) |
| | Automatic Gain Control setup (alternative name for setAutomaticGainControl )
|
| |
| void | setSsbAgcOverrite (uint8_t SSBAGCDIS, uint8_t SSBAGCNDX, uint8_t reserved=0) |
| | Automatic Gain Control setup.
|
| |
| void | getCurrentReceivedSignalQuality (uint8_t INTACK) |
| | Queries the status of the Received Signal Quality (RSQ) of the current channel.
|
| |
| void | getCurrentReceivedSignalQuality (void) |
| | Queries the status of the Received Signal Quality (RSQ) of the current channel (FM_RSQ_STATUS)
|
| |
| uint8_t | getCurrentRSSI () |
| | Get the current receive signal strength (0–127 dBμV)
|
| |
| uint8_t | getCurrentSNR () |
| | Gets the current SNR metric (0–127 dB).
|
| |
| bool | getCurrentRssiDetectLow () |
| | Checks if RSSI detected is LOW.
|
| |
| bool | getCurrentRssiDetectHigh () |
| | Checks if RSSI detected is high.
|
| |
| bool | getCurrentSnrDetectLow () |
| | Checks if SNR detect is low.
|
| |
| bool | getCurrentSnrDetectHigh () |
| | Checks if SNR detect is high.
|
| |
| bool | getCurrentValidChannel () |
| | Checks if the current channel is valid.
|
| |
| bool | getCurrentAfcRailIndicator () |
| | AFC Rail Indicator.
|
| |
| bool | getCurrentSoftMuteIndicator () |
| | Soft Mute Indicator.
|
| |
| uint8_t | getCurrentStereoBlend () |
| | Gets the value of the amount of stereo blend in % (100 = full stereo, 0 = full mono).
|
| |
| bool | getCurrentPilot () |
| | Checks the current pilot.
|
| |
| uint8_t | getCurrentMultipath () |
| | Gets the current Multipath.
|
| |
| uint8_t | getCurrentSignedFrequencyOffset () |
| | Gets the Signed frequency offset (kHz).
|
| |
| bool | getCurrentMultipathDetectLow () |
| | Get Multipath Detect Low.
|
| |
| bool | getCurrentMultipathDetectHigh () |
| | Gets the Current Multipath Detect High.
|
| |
| bool | getCurrentBlendDetectInterrupt () |
| | Gets the Current Blend Detect Interrupt.
|
| |
| uint8_t | getFirmwarePN () |
| | Returns the Firmware Part Number.
|
| |
| uint8_t | getFirmwareFWMAJOR () |
| | Returns the Firmware F W M A J O R.
|
| |
| uint8_t | getFirmwareFWMINOR () |
| | Returns the Firmware F W M I N O R.
|
| |
| uint8_t | getFirmwarePATCHH () |
| | Returns the Firmware P A T C H HIGH.
|
| |
| uint8_t | getFirmwarePATCHL () |
| | Returns the Firmware P A T C H LOW.
|
| |
| uint8_t | getFirmwareCMPMAJOR () |
| | Get the Firmware C M P M A J O R object.
|
| |
| uint8_t | getFirmwareCMPMINOR () |
| | RESP6 - Returns the Component Major Revision (ASCII).
|
| |
| uint8_t | getFirmwareCHIPREV () |
| | RESP8 - Returns the Chip Revision (ASCII)
|
| |
| void | setVolume (uint8_t volume) |
| | Sets volume level (0 to 63)
|
| |
| uint8_t | getVolume () |
| | Gets the current volume level.
|
| |
| void | volumeDown () |
| | Set sound volume level Down.
|
| |
| void | volumeUp () |
| | Set sound volume level Up.
|
| |
| uint8_t | getCurrentVolume () |
| | Get the Current Volume.
|
| |
| void | setVolumeUp () |
| | Set the Volume Up.
|
| |
| void | setVolumeDown () |
| | Set the Volume Down.
|
| |
| void | setAudioMode (uint8_t audioMode) |
| | Sets the Audio Mode. See table below.
|
| |
| void | setAmDelayNB (uint16_t value) |
| | Sets the delay before applying impulse blanking.
|
| |
| void | digitalOutputFormat (uint8_t OSIZE, uint8_t OMONO, uint8_t OMODE, uint8_t OFALL) |
| | Configures the digital audio output format.
|
| |
| void | digitalOutputSampleRate (uint16_t DOSR) |
| | Enables digital audio output and configures digital audio output sample rate in samples per second (sps).
|
| |
| void | setAudioMute (bool off) |
| | Sets the audio on or off.
|
| |
| void | setAM () |
| | Sets the radio to AM function. It means: LW MW and SW.
|
| |
| void | setFM () |
| | Sets the radio to FM function.
|
| |
| void | setAM (uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step) |
| | Sets the radio to AM (LW/MW/SW) function.
|
| |
| void | setFM (uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step) |
| | Sets the radio to FM function.
|
| |
| void | setFMDeEmphasis (uint8_t parameter) |
| | Sets the FM Receive de-emphasis to 50 or 75 μs.
|
| |
| void | setFmSoftMuteMaxAttenuation (uint8_t smattn=0) |
| | Sets the Fm Soft Mute Max Attenuation.
|
| |
| void | setFmNoiseBlankThreshold (uint16_t parameter) |
| | Set the Fm Noise Blank Threshold.
|
| |
| void | setFmNoiseBlank (uint16_t nb_rate=64, uint16_t nb_interval=55, uint16_t nb_irr_filter=300) |
| | Set the Fm Noise Blank.
|
| |
| void | setFmNoiseBlankInterval (uint16_t parameter) |
| | Set the Fm Noise Blank Interval.
|
| |
| void | setFmNoiseBlankRate (uint16_t parameter) |
| | Set the Fm Noise Blank Rate.
|
| |
| void | setFmNoiseBlankDelay (uint16_t parameter) |
| | Set the Fm Noise Blank Delay.
|
| |
| void | setFmNoiseBlank_IIR_Filter (uint16_t parameter) |
| | Set the FmNoiseBlank IIR Filter.
|
| |
| void | setAMDeEmphasis (uint8_t parameter) |
| | Sets the AM Receive de-emphasis to 50 or disable.
|
| |
| void | setAMSoftMuteSlop (uint8_t parameter) |
| | Sets the AM attenuation slope during soft mute.
|
| |
| void | setAMSoftMuteRate (uint8_t parameter) |
| | Sets the attack and decay rates when entering or leaving soft mute.
|
| |
| void | setAMSoftMuteSnrThreshold (uint8_t parameter) |
| | Sets the SNR threshold to engage soft mute.
|
| |
| void | setAMSoftMuteReleaseRate (uint8_t parameter) |
| | Sets the soft mute release rate.
|
| |
| void | setAMSoftMuteAttackRate (uint16_t parameter) |
| | Sets the soft mute attack rate.
|
| |
| void | setAmAgcAttackRate (uint16_t parameter) |
| | Sets the AGC attack rate.
|
| |
| void | setAmAgcReleaseRate (uint16_t parameter) |
| | Sets the AGC release rate.
|
| |
| void | setSsbAgcAttackRate (uint16_t parameter) |
| | Sets the AGC attack rate on SSB mode.
|
| |
| void | setSsbAgcReleaseRate (uint16_t parameter) |
| | Sets the AGC Release rate on SSB mode.
|
| |
| void | setAMFrontEndAgcControl (uint8_t MIN_GAIN_INDEX, uint8_t ATTN_BACKUP) |
| | Adjusts the AM AGC for external front-end attenuator and external front-end cascode LNA.
|
| |
| void | setAmNoiseBlank (uint16_t nb_rate=64, uint16_t nb_interval=55, uint16_t nb_irr_filter=300) |
| | Set the Am Noise Blank.
|
| |
| bool | isCurrentTuneFM () |
| |
| bool | isCurrentTuneAM () |
| | Returns true if the current function is AM (AM_TUNE_FREQ).
|
| |
| bool | isCurrentTuneSSB () |
| | Returns true if the current function is SSB (SSB_TUNE_FREQ).
|
| |
| void | setBandwidth (uint8_t AMCHFLT, uint8_t AMPLFLT) |
| | Selects the bandwidth of the channel filter for AM reception.
|
| |
| void | setFmBandwidth (uint8_t filter_value=0) |
| | Sets the Bandwith on FM mode.
|
| |
| uint8_t | getTuneFrequecyFast () |
| | Returns the FAST tuning status.
|
| |
| void | setTuneFrequencyFast (uint8_t FAST) |
| | Sets the FAST Tuning.
|
| |
| uint8_t | getTuneFrequecyFreeze () |
| | Returns the FREEZE status.
|
| |
| void | setTuneFrequencyFreze (uint8_t FREEZE) |
| | Sets Freeze Metrics During Alternate Frequency Jum.
|
| |
| void | setTuneFrequencyAntennaCapacitor (uint16_t capacitor) |
| | Selects the tuning capacitor value.
|
| |
| void | frequencyUp () |
| | Increments the current frequency on current band/function by using the current step.
|
| |
| void | frequencyDown () |
| | Decrements the current frequency on current band/function by using the current step.
|
| |
| void | setFrequencyUp () |
| | Set the FrequencyUp.
|
| |
| void | setFrequencyDown () |
| | Set the Frequency Down.
|
| |
| void | getFirmware (void) |
| | Gets firmware information.
|
| |
| void | seekStation (uint8_t SEEKUP, uint8_t WRAP) |
| | Look for a station (Automatic tune)
|
| |
| void | setMaxSeekTime (long time_in_ms) |
| | Sets the maximum time in milliseconds for seeking. The default value is 8000ms (8s).
|
| |
| void | seekStationUp () |
| | Search for the next station.
|
| |
| void | seekStationDown () |
| | Search the previous station.
|
| |
| void | seekNextStation () |
| | Search for the next station.
|
| |
| void | seekPreviousStation () |
| | Search the previous station.
|
| |
| void | seekStationProgress (void(*showFunc)(uint16_t f), uint8_t up_down) |
| | Seeks a station up or down.
|
| |
| void | seekStationProgress (void(*showFunc)(uint16_t f), bool(*stopSeking)(), uint8_t up_down) |
| | Seeks a station up or down.
|
| |
| void | setSeekAmLimits (uint16_t bottom, uint16_t top) |
| | Sets the bottom frequency and top frequency of the AM band for seek. Default is 520 to 1710.
|
| |
| void | setSeekAmSpacing (uint16_t spacing) |
| | Selects frequency spacingfor AM seek. Default is 10 kHz spacing.
|
| |
| void | setSeekAmSrnThreshold (uint16_t value) |
| | Set the Seek Am Srn Threshold object.
|
| |
| void | setSeekAmSNRThreshold (uint16_t value) |
| | Sets the SNR threshold for a valid AM Seek/Tune.
|
| |
| void | setSeekAmRssiThreshold (uint16_t value) |
| | Sets the RSSI threshold for a valid AM Seek/Tune.
|
| |
| void | setSeekFmLimits (uint16_t bottom, uint16_t top) |
| | Sets the bottom frequency and top frequency of the FM band for seek. Default is 8750 to 10790.
|
| |
| void | setSeekFmSpacing (uint16_t spacing) |
| | Selects frequency spacingfor FM seek. Default is 100 kHz (value 10) spacing. There are only 3 valid values: 5, 10, and 20.
|
| |
| void | setSeekFmSrnThreshold (uint16_t value) |
| | Set the Seek Fm Srn Threshold object.
|
| |
| void | setSeekFmSNRThreshold (uint16_t value) |
| | Sets the SNR threshold for a valid FM Seek/Tune.
|
| |
| void | setSeekFmRssiThreshold (uint16_t value) |
| | Sets the RSSI threshold for a valid FM Seek/Tune.
|
| |
| void | setFmBlendStereoThreshold (uint8_t parameter) |
| | Sets RSSI threshold for stereo blend (Full stereo above threshold, blend below threshold).
|
| |
| void | setFmBlendMonoThreshold (uint8_t parameter) |
| | Sets RSSI threshold for mono blend (Full mono below threshold, blend above threshold).
|
| |
| void | setFmBlendRssiStereoThreshold (uint8_t parameter) |
| | Sets RSSI threshold for stereo blend. (Full stereo above threshold, blend below threshold.)
|
| |
| void | setFmBLendRssiMonoThreshold (uint8_t parameter) |
| | Sets RSSI threshold for mono blend (Full mono below threshold, blend above threshold).
|
| |
| void | setFmBlendSnrStereoThreshold (uint8_t parameter) |
| | Sets SNR threshold for stereo blend (Full stereo above threshold, blend below threshold).
|
| |
| void | setFmBLendSnrMonoThreshold (uint8_t parameter) |
| | Sets SNR threshold for mono blend (Full mono below threshold, blend above threshold).
|
| |
| void | setFmBlendMultiPathStereoThreshold (uint8_t parameter) |
| | Sets multipath threshold for stereo blend (Full stereo below threshold, blend above threshold).
|
| |
| void | setFmBlendMultiPathMonoThreshold (uint8_t parameter) |
| | Sets Multipath threshold for mono blend (Full mono above threshold, blend below threshold).
|
| |
| void | setFmStereoOn () |
| | Turn Off Stereo operation.
|
| |
| void | setFmStereoOff () |
| | Turn Off Stereo operation.
|
| |
| void | RdsInit () |
| | Starts the control member variables for RDS.
|
| |
| void | clearRdsBuffer () |
| | Starts the control member variables for RDS. It is an alias to RdsInit (a better name to RdsInit)
|
| |
| void | setRdsIntSource (uint8_t RDSRECV, uint8_t RDSSYNCLOST, uint8_t RDSSYNCFOUND, uint8_t RDSNEWBLOCKA, uint8_t RDSNEWBLOCKB) |
| | Configures interrupt related to RDS.
|
| |
| void | getRdsStatus (uint8_t INTACK, uint8_t MTFIFO, uint8_t STATUSONLY) |
| | Gets the RDS status. Store the status in currentRdsStatus member. RDS COMMAND FM_RDS_STATUS.
|
| |
| void | rdsBeginQuery () |
| | Retrieves the current RDS data to be utilized by other RDS functions.
|
| |
| bool | getRdsReceived () |
| | Get the Rds Received FIFO.
|
| |
| bool | getRdsSyncLost () |
| | Get the Rds Sync Lost object.
|
| |
| bool | getRdsSyncFound () |
| | Get the Rds Sync Found.
|
| |
| bool | getRdsNewBlockA () |
| | Get the Rds New Block A.
|
| |
| bool | getRdsNewBlockB () |
| | Get the Rds New Block B.
|
| |
| bool | getRdsSync () |
| | Get the Rds Sync.
|
| |
| bool | getGroupLost () |
| | Get the Group Lost.
|
| |
| uint8_t | getNumRdsFifoUsed () |
| | Get the Num Rds Fifo Used.
|
| |
| void | setFifoCount (uint16_t value) |
| | Sets the minimum number of RDS groups stored in the RDS FIFO before RDSRECV is set.
|
| |
| bool | getEndIndicatorGroupA () |
| | Check if 0xD or 0xA special characters were received for group A.
|
| |
| void | resetEndIndicatorGroupA () |
| | Resets 0xD or 0xA special characters condition (makes it false)
|
| |
| bool | getEndIndicatorGroupB () |
| | Check if 0xD or 0xA special characters were received for group B.
|
| |
| void | resetEndIndicatorGroupB () |
| | Resets 0xD or 0xA special characters condition (makes it false)
|
| |
| void | getRdsStatus () |
| | Gets RDS Status.
|
| |
| void | rdsClearFifo () |
| | Empty FIFO.
|
| |
| void | rdsClearInterrupt () |
| | Clears RDSINT.
|
| |
| void | setRdsConfig (uint8_t RDSEN, uint8_t BLETHA, uint8_t BLETHB, uint8_t BLETHC, uint8_t BLETHD) |
| | Sets RDS property.
|
| |
| uint16_t | getRdsPI (void) |
| | Returns the programa type.
|
| |
| uint8_t | getRdsGroupType (void) |
| | Returns the Group Type (extracted from the Block B)
|
| |
| uint8_t | getRdsFlagAB (void) |
| | Returns the current Text Flag A/B
|
| |
| uint8_t | getRdsVersionCode (void) |
| | Gets the version code (extracted from the Block B)
|
| |
| uint8_t | getRdsProgramType (void) |
| | Returns the Program Type (extracted from the Block B)
|
| |
| uint8_t | getRdsTextSegmentAddress (void) |
| | Returns the address of the text segment.
|
| |
| char * | getRdsText (void) |
| | Gets the RDS Text when the message is of the Group Type 2 version A.
|
| |
| char * | getRdsText0A (void) |
| | Gets the station name and other messages.
|
| |
| char * | getRdsText2A (void) |
| | Gets the Text processed for the 2A group.
|
| |
| char * | getRdsText2B (void) |
| | Gets the Text processed for the 2B group.
|
| |
| bool | getRdsAllData (char **stationName, char **stationInformation, char **programInformation, char **utcTime) |
| | Gets Station Name, Station Information, Program Information and utcTime.
|
| |
| char * | getRdsStationName (void) |
| | Gets the Station Name.
|
| |
| char * | getRdsProgramInformation (void) |
| | Gets the Program Information (RT - Radio Text)
|
| |
| char * | getRdsStationInformation (void) |
| | Gets the Station Information.
|
| |
| void | mjdConverter (uint32_t mjd, uint32_t *year, uint32_t *month, uint32_t *day) |
| | Converts the MJD number to integers Year, month and day.
|
| |
| char * | getRdsTime (void) |
| | Gets the RDS time and date when the Group type is 4.
|
| |
| char * | getRdsDateTime (void) |
| | Gets the RDS the Time and Date when the Group type is 4.
|
| |
| bool | getRdsDateTime (uint16_t *year, uint16_t *month, uint16_t *day, uint16_t *hour, uint16_t *minute) |
| | Decodes the RDS time to LOCAL Julian Day and time.
|
| |
| void | getNext2Block (char *) |
| | Process data received from group 2B.
|
| |
| void | getNext4Block (char *) |
| | Process data received from group 2A.
|
| |
| void | setSSBBfo (int offset) |
| | Sets the SSB Beat Frequency Offset (BFO).
|
| |
| void | setSSBConfig (uint8_t AUDIOBW, uint8_t SBCUTFLT, uint8_t AVC_DIVIDER, uint8_t AVCEN, uint8_t SMUTESEL, uint8_t DSP_AFCDIS) |
| | Sets the SSB receiver mode.
|
| |
| void | setSSB (uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step, uint8_t usblsb) |
| |
| void | setSSB (uint8_t usblsb) |
| | Set the radio to AM function.
|
| |
| void | setSSBAudioBandwidth (uint8_t AUDIOBW) |
| | SSB Audio Bandwidth for SSB mode.
|
| |
| void | setSSBAutomaticVolumeControl (uint8_t AVCEN) |
| | Sets SSB Automatic Volume Control (AVC) for SSB mode.
|
| |
| void | setSSBSidebandCutoffFilter (uint8_t SBCUTFLT) |
| | Sets SBB Sideband Cutoff Filter for band pass and low pass filters.
|
| |
| void | setSBBSidebandCutoffFilter (uint8_t SBCUTFLT) |
| |
| void | setSSBAvcDivider (uint8_t AVC_DIVIDER) |
| | Sets AVC Divider.
|
| |
| void | setSSBDspAfc (uint8_t DSP_AFCDIS) |
| | Sets DSP AFC disable or enable.
|
| |
| void | setSSBSoftMute (uint8_t SMUTESEL) |
| | Sets SSB Soft-mute Based on RSSI or SNR Selection:
|
| |
| void | setNBFM () |
| | Set the radio to FM function.
|
| |
| void | setNBFM (uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step) |
| |
| void | patchPowerUpNBFM () |
| | This method can be used to prepare the device to apply NBFM patch.
|
| |
| void | loadPatchNBFM (const uint8_t *patch_content, const uint16_t patch_content_size) |
| | Loads a given NBFM patch content.
|
| |
| void | setFrequencyNBFM (uint16_t freq) |
| | Set the frequency to the corrent function of the Si4735 on NBFM mode.
|
| |
| si47x_firmware_query_library | queryLibraryId () |
| | Query the library information of the Si47XX device.
|
| |
| void | patchPowerUp () |
| | This method can be used to prepare the device to apply SSBRX patch.
|
| |
| bool | downloadPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size) |
| | Transfers the content of a patch stored in a array of bytes to the SI4735 device.
|
| |
| bool | downloadCompressedPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, const uint16_t *cmd_0x15, const int16_t cmd_0x15_size) |
| | Deal with compressed SSB patch.
|
| |
| void | loadPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, uint8_t ssb_audiobw=1) |
| | Loads a given SSB patch content.
|
| |
| void | loadCompressedPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, const uint16_t *cmd_0x15, const int16_t cmd_0x15_size, uint8_t ssb_audiobw=1) |
| | Loads the SSB compressed patch content.
|
| |
| si4735_eeprom_patch_header | downloadPatchFromEeprom (int eeprom_i2c_address) |
| | Transfers the content of a patch stored in an eeprom to the SI4735 device.
|
| |
| void | ssbPowerUp () |
| | This function can be useful for debug and test.
|
| |
| void | setMaxDelayPowerUp (uint16_t ms) |
| | Set the Max Delay Power Up.
|
| |
| void | setMaxDelaySetFrequency (uint16_t ms) |
| | Set the Max Delay after Set Frequency.
|
| |
| void | setFrequencyStep (uint16_t step) |
| | Sets the current step value.
|
| |
| uint16_t | getCurrentFrequency () |
| | Gets the current frequency saved in memory.
|
| |
| void | getStatus () |
| | Gets the current status of the Si47XX (AM, FM or SSB)
|
| |
| void | setDeviceI2CAddress (uint8_t senPin) |
| | Sets the I2C Bus Address.
|
| |
| int16_t | getDeviceI2CAddress (uint8_t resetPin) |
| | I2C bus address setup.
|
| |
| void | setDeviceOtherI2CAddress (uint8_t i2cAddr) |
| | Sets the other I2C Bus Address (for Si470X)
|
| |
| void | setI2CLowSpeedMode (void) |
| | Sets I2C bus to 10kHz.
|
| |
| void | setI2CStandardMode (void) |
| | Sets I2C bus to 100kHz.
|
| |
| void | setI2CFastMode (void) |
| | Sets I2C bus to 400kHz.
|
| |
| void | setI2CFastModeCustom (long value=500000) |
| | Sets the I2C bus to a given value. ATTENTION: use this function with caution.
|
| |
| void | setAudioMuteMcuPin (int8_t pin) |
| | Sets the Audio Mute Mcu Pin.
|
| |
| void | setHardwareAudioMute (bool on) |
| | Sets the Hardware Audio Mute.
|
| |
| void | convertToChar (uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true) |
| | Converts a number to a char array.
|
| |
| void | removeUnwantedChar (char *str, int size) |
| | Removes unwanted character from char array.
|
| |