Headings
Heading Level 1
Heading Level 2
Heading Level 3
Heading Level 4
Heading Level 5
Subheadings
Subheading Level 1
Subheading Level 2
Subheading Level 3
Subheading Level 4
Subheading Level 5
Paragraph
So, setting about it as methodically as men might smoke out a wasps' nest, the Martians spread this strange stifling vapour over the Londonward country. The horns of the crescent slowly moved apart, until at last they formed a line from Hanwell to Coombe and Malden. All night through their destructive tubes advanced.
Blockquote
A block quotation (also known as a long quotation or extract) is a quotation in a written document, that is set off from the main text as a paragraph, or block of text, and typically distinguished visually using indentation and a different typeface or smaller size quotation.
Inline Elements
Strong is used to indicate strong importance
This text has added emphasis
The b element is stylistically different text from normal text, without any special importance
The i element is text that is set off from the normal text
The u element is text with an unarticulated, though explicitly rendered, non-textual annotation
This small text is small for for fine print, etc.
Abbreviation: HTML
This is a citation
Emphasis Colors
This is what error text looks like
This is what valid text looks like
This is what warning text looks like
This is what information text looks like.


Josep Prat / HTML5 Architect / @jlprat
You are the new architect of GameDuell and the management has a new task for you:
Deliver the best experience to all players
Let's introduce the GameDuell Team
The basic idea is developing in a single language, and then cross compile it to any platform you want
The game is coded only in HTML5 and reaches all the platforms via a Browser
You can build it the way you prefer, but you still need some common guidelines
Design your software with SECURITY in mind
Don't expose your internals
Obfuscation is not the solution
Konami Code
rule "Boss is killed"
when
$boss : Boss()
$total : Number( doubleValue >= $boss.maxLive )
from accumulate( Damage( target == $boss,
$value : value ), sum( $value ) )
then
/* boss is killed! */
end
Where the fun is
Loading, please wait
Live
@font-face {
font-family: 'League Gothic';
src: url("../../lib/font/league_gothic-webfont.eot");
src: url("../../lib/font/league_gothic-webfont.eot?#iefix") format("embedded-opentype"), url("../../lib/font/league_gothic-webfont.woff") format("woff"), url("../../lib/font/league_gothic-webfont.ttf") format("truetype"), url("../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular") format("svg");
font-weight: normal;
font-style: normal;
}
<svg id="swoosh" version="1.1" xmlns="http://www.w3.org/2000/svg">
</svg>
var websocket = new Websocket("ws://myserver.com/path/to/connect");
websocket.onopen = function (event) {
//Websocket is fully functional now
};
websocket.onmessage = function (event) {
//Called every time the server sends a message
};
websocket.onerror = function (event) {
//Called when there is an error communicating with the server
}
websocket.onclose = function (event) {
//Called when the connection to the server is closed
}
//to send messages
websocket.send("foo");
//end communication
websocket.close();
Keep in touch:
inside.gameduell.de
www.techtalk-berlin.de


Minecord
menu
Home
Commands
Help
INVITE
Home
Commands
Help
INVITE
Minecord
A robust, 24/7 open-source Discord bot for various Minecraft functions
GitHub
Invite Now
Commands
GitHub
Invite Now
Commands


| 011:112 Yusufali | : |
Therefore stand firm (in the straight Path) as thou art commanded,- thou and those who with thee turn (unto Allah); and transgress not (from the Path): for He seeth well all that ye do. |
| 011:113 Khan | : |
And incline not toward those who do wrong, lest the Fire should touch you, and you have no protectors other than Allah, nor you would then be helped. |
| 011:113 Maulana | : |
And incline not to those who do wrong, lest the fire touch you; and you have no protectors besides Allah, then you would not be helped. |
| 011:113 Pickthal | : |
And incline not toward those who do wrong lest the Fire touch you, and ye have no protecting friends against Allah, and afterward ye would not be helped. |
| 011:113 Rashad | : |
Do not lean towards those who have transgressed, lest you incur Hell, and find no allies to help you against GOD, then end up losers. |
| 011:113 Sarwar | : |
Do not be inclined towards the unjust ones lest you will be afflicted by the hell fire. Besides God, no one can be your protector nor will anyone be able to help you. |
| 011:113 Shakir | : |
And do not incline to those who are unjust, lest the fire touch you, and you have no guardians besides Allah, then you shall not be helped. |
| 011:113 Sherali | : |
And incline not toward those who do wrong, lest the Fire touch you; and you will have no friend other than ALLAH, nor shall you be helped. |
Concepts/Themes Covered: أركان الإسلام > التوحيد > المكذبون الظالمون > الإعراض عنهم Pillars of Islam> Islamic> The Oppressive Liars> Turning away from them
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Desktops
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ducimus, iure quibusdam fuga atque neque voluptas molestias possimus odio sequi debitis sint quia similique nesciunt, consectetur quidem sapiente obcaecati. Molestiae, suscipit.
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Ipsa harum qui officiis ad reiciendis commodi, natus consequuntur beatae accusamus voluptate aspernatur consequatur deserunt provident assumenda magni vero laboriosam placeat voluptates.


10 March 2009 - The Ministry of Health and Population of Egypt has reported a new confirmed human case of avian influenza. The new case is a two and a half year old male from Amaria District, Alexandria Governorate. His symptoms began on 3 March and he was hospitalized at Alexandria Fever Hospital where he remains in a stable condition. Infection with H5N1 avian influenza was confirmed by the Egyptian Central Public Health Laboratory on 4 March.
Investigations into the source of infection indicate a history of close contact with dead and sick poultry prior to becoming ill.
Of the 57 cases confirmed to date in Egypt, 23 have been fatal.


{% extends 'base.html'%} {% import 'macros.html' as macro%} {% block content%}
Get the latest news updates form around the World


{{'Advanced' | translate}}
{{'Use Unconfirmed Funds' | translate}}
If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays.
{{'Recent Transaction Card' | translate}}
If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the
Home tab.


---
layout: default
type: generalGuidelines
title: Dialog
source_visibility: hidden
---
Dialogs are used to communicate results of user actions and system events. Dialog can include error messages, warning messages, success messages, inline validation, and system status information.
Guidelines
- Deliver messages at the right time. Not every action needs a dialog.
- Don't say too much and just what is necessary. Don’t be too verbose.
- Avoid the word "please", except in situations in which the user is asked to do something inconvenient (such as waiting) or the software is to blame for the situation. Also note that using the word please can be interpreted to mean that the required action is optional.
- Only use the word "sorry" in error messages that end in critical problems for the user (like incapacity to use the system or data loss).


This post is a continuation of a series of posts about WebGL. The first started with fundamentals and the previous was about 3D perspective projection. If you haven't read those please view them first.
In the last post we had to move the F in front of the frustum because the makePerspective
function expects it sits at the origin (0, 0, 0) and that objects in the frustum are -zNear
to -zFar in front of it.
Moving stuff in front of the view doesn't seem the right way to go does it? In the real world you usually move your camera to take a picture of a building.
You don't usually move the buildings to be in front of the camera.
But in our last post we came up with projection that requires things to be in front of the origin on the -Z axis. To achieve this what we want to do is move the camera to the origin and move everything else the right amount so it's still in the same place relative to the camera.
We need to effectively move the world in front of the camera. The easiest way to do this is to use an "inverse" matrix. The math to compute an inverse matrix in the general case is complex but conceptually it's easy. The inverse is the value you'd use to negate some other value. For example, the inverse of 123 is -123. The inverse of a scale matrix that scaled by 5 would be 1/5th or 0.2. The inverse of a matrix that rotated 30° in X would be one that rotates -30° in X.
Up until this point we've used translation, rotation and scale to affect the position and orientation of our 'F'. After multiplying all the matrices together we have a single matrix that represents how to move the 'F' from the origin to the place, size and orientation we want it. We can do the same for a camera. Once we have the matrix that tells us how to move and rotate the camera from the origin to where we want it we can compute its inverse which will give us a matrix that tells us how to move and rotate everything else the opposite amount which will effectively make it so the camera is at (0, 0, 0) and we've moved everything in front of it.
Let's make a 3D scene with a circle of 'F's like the diagrams above.
Here's the code.
var numFs = 5; var radius = 200; // Compute the projection matrix var aspect = canvas.clientWidth / canvas.clientHeight; var projectionMatrix = makePerspective(fieldOfViewRadians, aspect, 1, 2000); // Draw 'F's in a circle for (var ii = 0; ii < numFs; ++ii) { var angle = ii * Math.PI * 2 / numFs; var x = Math.cos(angle) * radius; var z = Math.sin(angle) * radius; var translationMatrix = makeTranslation(x, 0, z); // Multiply the matrices. var matrix = translationMatrix; matrix = matrixMultiply(matrix, projectionMatrix); // Set the matrix. gl.uniformMatrix4fv(matrixLocation, false, matrix); // Draw the geometry. gl.drawArrays(gl.TRIANGLES, 0, 16 * 6); }
Just after we compute our projection matrix let's compute a camera that goes around the 'F's like in the diagram above.
// Compute the camera's matrix var cameraMatrix = makeTranslation(0, 0, radius * 1.5); cameraMatrix = matrixMultiply( cameraMatrix, makeYRotation(cameraAngleRadians));
We then compute a "view matrix" from the camera matrix. A "view matrix" is the matrix that moves everything the opposite of the camera effectively making everything relative to the camera as though the camera was at the origin (0,0,0)
// Make a view matrix from the camera matrix. var viewMatrix = makeInverse(cameraMatrix);
Finally we need to apply the view matrix when we compute the matrix for each 'F'
// Multiply the matrices. var matrix = translationMatrix; matrix = matrixMultiply(matrix, viewMatrix); // <=-- added matrix = matrixMultiply(matrix, projectionMatrix);
And wahlah! A camera that goes around the circle of 'F's. Drag the cameraAngle
slider
to move the camera around.
That's all fine but using rotate and translate to move a camera where you want it and point toward what you want to see is not always easy. For example if we wanted the camera to always point at a specific one of the 'F's it would take some pretty crazy math to compute how to rotate the camera to point at that 'F' while it goes around the circle of 'F's.
Fortunately there's an easier way. We can just decide where we want the camera and what we want it to point at and then compute a matrix that will put the camera there. Based on how matrices work this is surpurisingly easy.
First we need to know where we want the camera. We'll call this the
cameraPosition
. Then we need to know the positon of the thing we want
to look at or aim at. We'll call it the target
. If we subtract the
target
from the cameraPosition
we'll have a vector that points in the
direction we'd need to go from the camera to get to the target. Let's
call it zAxis
. Since we know the camera points in the -Z direction we
can subtract the other way cameraPosition - target
. We normalize the
results and copy it directly into the z
part matrix.
+----+----+----+----+ | | | | | +----+----+----+----+ | | | | | +----+----+----+----+ | Zx | Zy | Zz | | +----+----+----+----+ | | | | | +----+----+----+----+
This part of a matrix represents the Z axis. In this case the Z-axis of the camera. Normalizing a vector means making it a vector that represents 1.0. If you go back to the 2D rotation article where we talked about unit circles and how thosehelped with 2D rotation, in 3D we need unit spheres and a normalized vector represents a point on a unit sphere.
That's not enough info though. Just a single vector gives us a point on a unit sphere but which orientation from that point to orient things? We need to fill out the other parts of the matrix. Specificaly the X axis and Y axis parts. We know the in general these 3 parts are perpendicular to each other. We also know that "in general" we don't point the camera straight up. Given that, if we know which way is up, in this case (0,1,0), We can use that and something called a "cross product" to compute the X axis and Y axis for the matrix.
I have no idea what a cross product means in mathmatical terms. What I do know is that if you have 2 unit vectors and you compute the cross product of them you'll get a vector that is perpendicular to those 2 vectors. In other words, if you have a vector pointing south east, and a vector pointing up,and you compute the cross product you'll get a vector pointing either north west or north east since those are the 2 vectors that are purpendicular to south east and up. Depending on which order you compute the cross product you'll get the opposite answer.
In any case if we compute the cross product of our zAxis
and
up
we'll get the xAxis for the camera.
And now that we have the xAxis
we can cross the zAxis
and the xAxis
which will give us the camera's yAxis
Now all we have to do is plug in the 3 axes into a matrix. That gives as a
matrix that will orient something that points at the target
from the
cameraPosition
. We just need to add in the position
+----+----+----+----+ | Xx | Xy | Xz | 0 | <- x axis +----+----+----+----+ | Yx | Yy | Yz | 0 | <- y axis +----+----+----+----+ | Zx | Zy | Zz | 0 | <- z axis +----+----+----+----+ | Tx | Ty | Tz | 1 | <- camera position +----+----+----+----+
Here's the code to compute the cross product of 2 vectors.
function cross(a, b) { return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; }
Here's the code to subtract two vectors.
function subtractVectors(a, b) { return [a[0] - b[0], a[1] - b[1], a[2] - b[2]]; }
Here's the code to normalize a vector (make it into a unit vector).
function normalize(v) { var length = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); // make sure we don't divide by 0. if (length > 0.00001) { return [v[0] / length, v[1] / length, v[2] / length]; } else { return [0, 0, 0]; } }
Here's the code to compute a "lookAt" matrix.
function makeLookAt(cameraPosition, target, up) { var zAxis = normalize( subtractVectors(cameraPosition, target)); var xAxis = cross(up, zAxis); var yAxis = cross(zAxis, xAxis); return [ xAxis[0], xAxis[1], xAxis[2], 0, yAxis[0], yAxis[1], yAxis[2], 0, zAxis[0], zAxis[1], zAxis[2], 0, cameraPosition[0], cameraPosition[1], cameraPosition[2], 1]; }
And here is how we might use it to make the camera point at a specific 'F' as we move it.
... // Compute the position of the first F var fPosition = [radius, 0, 0]; // Use matrix math to compute a position on the circle. var cameraMatrix = makeTranslation(0, 50, radius * 1.5); cameraMatrix = matrixMultiply( cameraMatrix, makeYRotation(cameraAngleRadians)); // Get the camera's postion from the matrix we computed cameraPosition = [ cameraMatrix[12], cameraMatrix[13], cameraMatrix[14]]; var up = [0, 1, 0]; // Compute the camera's matrix using look at. var cameraMatrix = makeLookAt(cameraPosition, fPosition, up); // Make a view matrix from the camera matrix. var viewMatrix = makeInverse(cameraMatrix); ...
And here's the result.
Drag the slider and notice the camera tracks a single 'F'.
Note that you can use "lookAt" math for more than just cameras. Common uses are making a character's head follow someone. Making a turret aim at a target. Making an object follow a path. You compute where on the path the target is. Then you compute where on the path the target would be a few moments in the future. Plug those 2 values into your lookAt function and you'll get a matrix that makes your object follow the path and orient toward the path as well.
Let's learn about animation next.


usbutils-007
Introduction to USB Utils
The USB Utils package contains an
utility used to display information about USB buses in the system
and the devices connected to them.
This package is known to build and work properly using an LFS-7.5
platform.
Package Information
USB Utils Dependencies
Required
libusb-1.0.18
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/usbutils
Installation of USB Utils
Install USB Utils by running the
following commands:
./configure --prefix=/usr \
--disable-zlib \
--datadir=/usr/share/misc &&
make
This package does not come with a test suite.
Now, as the root
user:
make install &&
mv -v /usr/sbin/update-usbids.sh /usr/sbin/update-usbids
Command Explanations
--disable-zlib
: This stops USB Utils from installing a compressed
usb.ids
alongside the uncompressed
one.
Configuring USB Utils
The usb.ids
data file is constantly
being updated. To get a current version of this file, run
update-usbids as the
root
user. This program requires
the Which-2.20 script or program to
find Lynx-2.8.8 or Wget-1.15 which are
used to download the most current file, and replace the existing
file in /usr/share/misc
.
You may wish to add an entry to root
's (or any other user who has write
privilege to /usr/share/misc
) crontab
to automatically update the usb.ids
file periodically.
Contents
Installed Programs:
lsusb, update-usbids, usb-devices, and
usbhid-dump
Installed Libraries:
None
Installed Directories:
None
Short Descriptions
|
lsusb
|
is an utility for displaying information about all USB
buses in the system and all devices connected to them.
|
|
update-usbids
|
downloads the current version of the USB ID list.
Requires Lynx-2.8.8 or Wget-1.15.
|
|
usb-devices
|
is a shell script that displays details of USB buses and
devices connected to them. It is designed to be used if
/proc/bus/usb/devices is not available on your system.
|
|
usbhid-dump
|
is used to dump report descriptors and streams from HID
(human interface device) interfaces of USB devices.
|
Last updated on 2014-02-17 15:16:31 -0800


Search:
Total image in this page: {{length}}
{{photo.upload_date}}
{{photo.username}}
{{photo.description}}


Welcome Aamir
All systems are running smoothly! You have 3 unread alerts!
31C
Bangalore
India
Today’s Bookings
4006
10.00% (30 days)
Total Bookings
61344
22.00% (30 days)
Number of Meetings
34040
2.00% (30 days)
Number of Clients
47033
0.22% (30 days)
Order Details
The total number of sessions within the date range. It is the period time a user is actively engaged with your website, page or app, etc
Order value
12.3k
Orders
14k
Users
71.56%
Downloads
34040
Sales Report
View allThe total number of sessions within the date range. It is the period time a user is actively engaged with your website, page or app, etc
Top Products
| Product | Price | Date | Status |
|---|---|---|---|
| Search Engine Marketing | $362 | 21 Sep 2018 |
Completed
|
| Search Engine Optimization | $116 | 13 Jun 2018 |
Completed
|
| Display Advertising | $551 | 28 Sep 2018 |
Pending
|
| Pay Per Click Advertising | $523 | 30 Jun 2018 |
Pending
|
| E-Mail Marketing | $781 | 01 Nov 2018 |
Cancelled
|
| Referral Marketing | $283 | 20 Mar 2018 |
Pending
|
| Social media marketing | $897 | 26 Oct 2018 |
Completed
|
To Do Lists
Projects
| Places | Orders | Users |
|---|---|---|
| Kentucky |
65(2.15%) |
65 |
| Ohio |
54(3.25%) |
51 |
| Nevada |
22(2.22%) |
32 |
| North Carolina |
46(3.27%) |
15 |
| Montana |
17(1.25%) |
25 |
| Nevada |
52(3.11%) |
71 |
| Louisiana |
25(1.32%) |
14 |
Charts
Data 1
5k
Data 2
1k
Data 3
992
Data 4
687
Notifications
-
Isabella Becker
Sales dashboard have been created
9:30 am -
Adam Warren
You have done a great job #TW111
10:30 am -
Leonard Thornton
Sales dashboard have been created
11:30 am -
George Morrison
Sales dashboard have been created
8:50 am -
Ryan Cortez
Herbs are fun and easy to grow.
9:00 am
Advanced Table
| Quote# | Product | Business type | Policy holder | Premium | Status | Updated at |
|---|


Tip Calculator
How much was your bill?
$
How was your service
-- Choose an optioin --
30% - Outstanding
20% - Good
15% - It was okay
10% - Bad
5% - Terrible
Calculate
$
0.00


|
|
|
|
|
|
If you're visiting this website, maybe you want to know what other software developers say. Read
here some comments of happy PureBasic
users about this powerful language... ;-)
|
Ricardo Arias, Argentina
"I come from Visual Basic.
Then I was searching for something small, with no runtimes, speed and easy too.
Maybe PureBasic doesn't have that quantity of sourcecode available, but a great community that
always help each other."
|
|
|
|
Timo "Freak" Harter, Germany
"I've been programming QuickBasic some time ago.
 I learned HTML, CSS and JavaScript instead.  I only heard bad things
about Visual Basic, so that was never an option.
After I found PureBasic, It took me one day, to see, that it would be the right choice."
|
Denis, France
"I found PureBasic accidentally on a French
download site. Then I tried it and now, I like it.
Yes it's cheap, easy to understand, powerful
(Asm code inline, possibility to develop own libs in Asm or C,
Windows Api and a lot of structures), structured programming and many other tools. And a good community..."
|
|
|
|
CodeMeister
"I frequently need to create custom GUI apps for my clients. PB has the right mix of speed, ease of use
and features to satisfy my needs and my clients. The Visual Designer app is
truly a plus in my book..."
|
|
|
|
|
|


Hello!
I'm an Agile Coach who turns cat-herds into wolf-packs.
Compassionate Technical Leader, helping teams turn amorphous piles of to-do’s into a prioritized queue to deliver maximum value at a sustainable pace. Seasoned Project Manager, helping teams navigate through the Cone of Uncertainty common to projects that are just starting out. Trained in Agile, Scrum, PMP, Kanban, Lean, Earned Value Management (EVM). Office Emissary, breaking down silos through cross-team communication. Well-versed in verbal and written communication, comfortable public speaker. Prolific inventor with ten patents and ten published research papers.
See my LinkedIn Profile for work history and slide shares or my Github.io site for code repos!


---
layout: page
title: 'Build a Pinterest Clone'
description: 'This microservice displays file metadata at different stages of an upload.'
site-url: 'https://angular-pinterest.firebaseapp.com/ap/'
git-repo: 'angular-pinterest-app'
userStory:
- 'As an unauthenticated user, I can login with Twitter.'
- 'As an authenticated user, I can link to images.'
- 'As an authenticated user, I can delete images that Ive linked to.'
- 'As an authenticated user, I can see a Pinterest-style wall of all the images Ive linked to.'
- 'As an unauthenticated user, I can browse other users walls of images.'
- 'As an authenticated user, if I upload an image that is broken, it will be replaced by a placeholder image. (can use jQuery broken image detection)'
toDo:
- 'bug: investigate auth: null'
- 'apply linter to code in all projects'
- 'load pins automatically after clicking logout'
scrollNav: [
{h: 'project-title', v: 'Pinterest Clone', s: [
{h: 'try-it', v: 'In Action'}
]},
{h: 'more-information', v: 'Additional Info', s: [
{h: 'limitations', v: 'Limitations'},
{h: 'user-story', v: 'User Story'},
{h: 'to-do', v: 'To-Do'}
]},
]
---
{{page.description}}
Attach an image.
(External Link)
{{page.title}}
See It In Action
See the git repository for additional information.
This application makes use of Firebase free tier. Accordingly, the application is limited to:
Only links to images supported. Authentication required.


FriCAS :: DifferentialForms¶
Contents:
- 1 Theory
- 1.0 Introduction
- 1.1 Definitions
- 1.1.1 Inner product of differential forms (dot)
- 1.1.2. The volume form \(\eta\) (volumeForm)
- 1.1.3. Hodge dual (hodgeStar)
- 1.1.4 Interior product (interiorProduct)
- 1.1.5 The Lie derivative (lieDerivative)
- 1.1.6 The CoDifferential \(\delta\) (codifferential)
- 1.1.7 The sign of a metric \(s(g)\) (s)
- 1.1.8 The inverse Hodge star \(\star^{-1}\) (invHodgeStar)
- 1.1.9 The Hodge-Laplacian \(\Delta_g\) (hodgeLaplacian)
- Bibliography
- 2 Export
- 3 Implementation
- 4 Usage


 When recording a macro you can also use this to record a call to a nested macro.
The command brings up the Replay Macro dialog that allows you to use the current macro or select a saved macro (ie a macro previously saved using the Save Current Macro button of the Macro Options page) from the list. You can also set the number of times to play the macro.
Shortcuts
Toolbar:
Keys: F9


Play in an immersive environment with your friends
Play offline or online with our state of the art net system
Web-based player tracking system for keeping tally of your stats


//******************************
//Frequency smoothing
//******************************
// subtract the last reading:
total= total - readings[index];
// read from the sensor:
//readings[index] = analogRead(inputPin);
readings[index] = pulseIn(inputPin,HIGH);//HIGH gives best fit
// add the reading to the total:
total= total + readings[index];
// advance to the next position in the array:
index = index + 1;
// if we're at the end of the array...
if (index >= numReadings)
// ...wrap around to the beginning:
index = 0;
//************************************
//end smoothing Routine for Frequency
//************************************
// calculate the average:
val = total / numReadings; //Frequency raw counts
Serial.print(" Freq= ");
Serial.print((1000/((val*2/1000.0)-freqerror)),2); //frequency - freqerror is the calibration devised to setup
Any mistakes?? Please let me (and everyone else) know.
// emon_calc procedure
// Calculates realPower,apparentPower,powerFactor,Vrms,Irms,kwh increment
// From a sample window of the mains AC voltage and current.
// The Sample window length is defined by the number of wavelengths we choose to measure.
//--------------------------------------------------------------------------------------
void EnergyMonitor::calcVI(int wavelengths, int timeout)
{
int SUPPLYVOLTAGE = readVcc(); int crossCount = 0; //Used to measure number of times threshold is crossed.
int numberOfSamples = 0; //This is now incremented
//-------------------------------------------------------------------------------------------------------------------------
// 1) Waits for the waveform to be close to 'zero' (500 adc) part in sin curve.
//-------------------------------------------------------------------------------------------------------------------------
boolean st=false; //an indicator to exit the while loop
unsigned long start = millis(); //millis()-start makes sure it doesnt get stuck in the loop if there is an error.
while(st==false) //the while loop...
{
startV = analogRead(inPinV); //using the voltage waveform
if ((startV < 550) && (startV > 440)) st=true; //check its within range
if ((millis()-start)>timeout) st = true;
}
***************************************************************************************************
This might help anyone trying to use my frequency code
It goes in the sketch header (above setup()
//****Frequency setup**********************************
const int numReadings = 6;// Frequency samples # of half waves samples
int readings[numReadings]; // the readings from the analog input
int index = 0; // the index of the current reading
float total = 0; // the running total
float val = 0; // the average
//*****END FREQUENCY SETUP*****************************
»
Re: Adding Frequency
Submitted by Robert Wall on Mon, 03/06/2013 - 10:07.
Firstly, frequency is defined as the number of cycles in a unit of time. I can't see where you are measuring time, and I can't see where you are trying to relate time to the number of cycles. What is inputPin connected to? You need to check what PulseIn( ) actually does, and think what HIGH and LOW mean - especially in terms of an analogue signal. It doesn't do what you seem to think it does.
Secondly, you will most likely suffer a lack of accuracy if you stay with emonLib. The reason is, the time to execute the loop is dependent upon the ADC, so as the crossing is detected only once within the loop, and it is not synchronous to the mains frequency, there will be a large amount of jitter if you time the loop. Clearly, if you time many loops, the amount of jitter will decrease in proportion, but it will still be present.
MartinR's phase locked loop adjusts the divider for the clock frequency of the processor to synchronise itself exactly with the mains, so the jitter is very small - as you can see if you run the code, the voltage at the crossing (which should be zero if the loop is exactly synchonous) changes by only a few volts, representing less than 50 µs and typically about 10 µs jitter. Compare that to emonLib that typically takes around 400 µs per input pair (V & I) to execute the loop.
Submitted by Robert Wall on Thu, 06/06/2013 - 11:58.
Sorry, Platypus, but while your idea is good, the way you have converted it into code is wrong. Unless I am mistaken, you are taking part of the voltage wave and using pulseIn( ) to time the period when the input is high. That depends on the amplitude of the voltage wave and where the processor input decides that it will be "HIGH" and "LOW". Normally, "HIGH" is when the input is above 0.7 x Vcc and "LOW" is when the input is below 0.3 x Vcc. Both these points will move along the wave as voltage changes, and they also depend on the d.c level. They might not be symmetrical about the true midpoint of your input wave. Therefore, you are not timing a true half cycle. Also, there is no guarantee that your wave is truly symmetrical, so the two halves might not be exactly equal. PulseIn( ) is designed for timing pulses with square edges, not sine waves. I think that is the reason you need freqerror.
Ah, I see what Platypus is doing now Robert, using the digital pulse input as a crude zero crossing detector on the analogue voltage input. As you say, quite clever but not very reliable. I suppose it might work reasonably well if you only used one edge.
Instead of using a digital input to detect a point in the waveform, use the analogue comparator in the ATmega. By connecting one input to the band gap reference and the other to the a/c input pin you can get a very consistent sampling point in the waveform. The output of the comparator can be used to trigger the input compare register in timer 1 so you can get a direct reading of the cycle period.
bitClear(ADCSRA,ADEN); // disable ADC because we are using ADMUX
bitSet(ADCSRB,ACME); // enable ADMUX for comparator
ADMUX=pin; // select pin for comparator -ve i/p
ACSR = _BV(ACBG) | _BV(ACIC); // enable comparator to trigger timer 0, band gap is +ve i/p
TCCR1A=0; // timer 1 normal mode
TCCR1B = _BV(ICNC1) | _BV(CS11); // enable noise canceller, /8 prescaler
noInterrupts(); // so we don't get delayed by other interrupts
bitSet(TIFR1,ICF1); // clear i/p compare flag
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count=ICR1L | ((word)ICR1H<<8); // get start timer count
bitSet(TIFR1,ICF1); // clear flag for next comparison
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count = (ICR1L | ((word)ICR1H<<8)) - count; // get period of cycle
interrupts();
ADCSRA=oldADCSRA; // restore ADC state
ADCSRB=oldADCSRB;
ADMUX=oldADMUX;
return 2000000.0/count; // timer frequency is 2MHz
}
Call this function, passing the analogue pin you want to test, and it will return the frequency in Hertz measured over a single cycle.
The resolution is 500ns and it seems to work pretty well without any averaging, although you’d probably want some smoothing for display purposes.
We've solved Robert's problem with my code, it was due to noise and I think that it's unlikely you are having the same problem.
The rest of my sketch is just...
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(measureFrequency(2)); // 2 is the analogue pin for the a/c input, you may need to change this
delay(500);
}
For this sketch to work the a/c input needs to be referenced to Vcc/2, as it is in emonTx, and the amplitude of the a/c signal needs to be large enough for it to cross the 1.1V band gap reference value. Ideally this crossing should be during the steep part of the sine wave, so a large signal is better.
I suspect that the reason it doesn't work for you is that the 0.5V you are using isn't large enough for the signal to cross the 1.1V threshold. There are two things you could do to remedy this, either change your resistor divider values to get a larger signal or use a different reference voltage for the comparator.
The best reference voltage to use is the centre of the bias circuit that your a/c signal is connected to i.e. Vcc/2. This will then trigger the comparator at the true zero crossings. To do this you need to connect a wire from the ATmega328 AIN0 input (pin 12) to the centre of the resistor divider in your bias circuit.
You also need to change the sketch to stop using the band gap reference as follows:
change ACSR = _BV(ACBG) | _BV(ACIC); // enable comparator to trigger timer 0, band gap is +ve i/p
to ACSR = _BV(ACIC); // enable comparator to trigger timer 0, AIN0 is +ve i/p
This sketch just measures the period of a cycle, as yours does. The difference is that it measures a whole cycle rather than an indeterminate part of a cycle and so doesn't need freqerror to compensate for the unknown fraction of a cycle that you are measuring.
Or you could just use the PLL sketch as Roberts suggested....
Martin
»
Re: Adding Frequency
Submitted by Robert Wall on Fri, 07/06/2013 - 18:56.
My problem appears to have been noise pickup from my laptop's power supply (which is not earthed so the laptop floats at around 100 V a.c.) So it would be worth checking for noise on the a.c. voltage reference.
If I'm reading the data sheet correctly, the hysteresis of the comparator is about 0.33 mV with a 3.3 V supply (Figure 29-27) so without a low-pass filter of the hardware kind, I think this method could well be problematical. Putting that number into some kind of perspective, the noise only needs to be 0.01% of the signal and potentially you have a problem.
On the other hand, Martin's PLL is rock solid and faithfully follows mains frequency variations.
[Edit]
A 1 nF capacitor in parallel with the 10 k resistor of the voltage input divider suppresses the noise for me and gives steady readings, but introduces a small (< 0.2°) phase shift that can easily be corrected by adjusting the phase calibration.
Thanks Robert for the amplitude idea - will change my divider which is at about 0.5Vrms right now - how far above 1.1Vrms would you recommend - would 1.5Vrms do?
I am using the Vcc/2 on each of the voltage and CT dividers - my Vcc is 5V
Must be some confusion, but I had no problem running the emontx sketch, just Martins sketch - no output function..
I need a short form of the emontx sketch, just to measure frequency in a PLL - any ideas on how to extract just the frequency code?
»
Re: Adding Frequency
Submitted by Robert Wall on Sat, 08/06/2013 - 12:21.
If you are running your processor at 5 V, then you want your a.c. input voltage to swing to 5 V peak-peak at maximum supply voltage less an allowance for resistor tolerances. So about 1.4 V rms seems a good number to aim for. 1.5 V gives you 15% spare, 10% for voltage tolerance leaving 5% for 4 resistors. It should be OK with 1% resistors in both the divider and the bias, but it is close (see ACAC Component tolerances for more information on how tolerances affect the design).
(It was MartinR who saw that your voltage input was too small.)
Well nice work Martin and Robert - I will try this.
Up to now I had not needed to look into the ADCSRA and band gap as it is complicated, although obviously useful.
But as you said we probably don't need to reference to 1.1V but rather an aref of 2.5V might be fine.
emonlib does seem to use the 1.1V though as here in emonlib.cpp (at the end of the code)
long EnergyMonitor::readVcc() {
long result;
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2);
ADCSRA |= _BV(ADSC);
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result;
return result;
Will try your code Martin and hopefully there is no conflict with this code as above - would you have some description of this bit of code - yes its a good learning exercise.
Even though the emontx (for solar) sketch does give a nice PLL frequencythe sketch is way too large to use just for frequency. Will also look at your code link Martin.
You have both been quite helpful, thanks.
I think many others might have learned quite a bit from this so far.
I couldn't wait until morning so I ran your sketch, as is, Martin, just to see what would happen without making the adjustments.
Have yet to make the changes as per your post on 8-6-13, 3:07
Well at least its attempting to work.
Here is some data direct from the serial monitor
Frequency = 400000.00
Frequency 1000000.00
Frequency 400000.00
Frequency 666666.68
Frequency 49.98
Frequency 1000000.00
Frequency 1000000.00
Frequency 1000000.00
Frequency 1000000.00
Frequency 500000.00
Frequency 367.65
Frequency 50.20
Frequency 50.12
Frequency 1000000.00
This is the complete sketch - changes yet to be made:
/*
Frequency measurement
by Martin Roberts, 9 June 2013
*/
bitClear(ADCSRA,ADEN); // disable ADC because we are using ADMUX
bitSet(ADCSRB,ACME); // enable ADMUX for comparator
ADMUX=pin; // select pin for comparator -ve i/p
ACSR = _BV(ACBG) | _BV(ACIC); // enable comparator to trigger timer 0, band gap is +ve i/p
TCCR1A=0; // timer 1 normal mode
TCCR1B = _BV(ICNC1) | _BV(CS11); // enable noise canceller, /8 prescaler
noInterrupts(); // so we don't get delayed by other interrupts
bitSet(TIFR1,ICF1); // clear i/p compare flag
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count=ICR1L | ((word)ICR1H<<8); // get start timer count
bitSet(TIFR1,ICF1); // clear flag for next comparison
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count = (ICR1L | ((word)ICR1H<<8)) - count; // get period of cycle
interrupts();
ADCSRA=oldADCSRA; // restore ADC state
ADCSRB=oldADCSRB;
ADMUX=oldADMUX;
return 2000000.0/count; // timer frequency is 2MHz
}
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print(" Frequency = ");
Serial.println(measureFrequency(5)); // 2 is the analogue pin for the a/c input, you may need to change this
delay(1500);
}
»
Re: Adding Frequency
Submitted by Robert Wall on Sun, 09/06/2013 - 13:46.
Just a note about the internal reference. It is a band-gap reference, the tolerance is poor ( 1.1 V ± 0.1 V) but its long-term stability is good. On the other hand, the 3.3 V or 5 V regulator - MCP1702 - has a tolerance of ± 3% (and typically 0.4% - significantly better), but is subject to 50 ppm per °C temperature drift plus 0.3%/V line regulation plus 2.5% load regulation (1 - 250 mA) plus a PSRR of 0.6%.
The purpose of scaling the input using the internal band-gap reference (which is ultimately what that emonLib method does) is to allow battery operation, where the supply will clearly drop as the battery runs down. If the 3.3 V regulator in the emonTx has a pre-regulated 5 V input and a constant load and operates at a constant temperature, many of these variations will be much reduced, and the supply from the MCP1702 will be more precise, but possibly still not as stable. If you look up one of the original papers by the inventor of the band-gap reference, he claims that with on-chip thin film resistors, a temperature stability of less than 4 ppm/ °C is possible. I have not found any specific data for the reference in the Atmega328P.
and adding a wire from AIN0 to center of volt divider, I got this
Frequency PLL= 24691.36
Frequency PLL= 64516.13
Frequency PLL= 21978.02
Frequency PLL= 21505.38
Frequency PLL= 16000.00
Frequency PLL= 57142.85
Frequency PLL= 16000.00
Frequency PLL= 22222.22
Frequency PLL= 117647.07
Frequency PLL= 15873.02
Frequency PLL= 28169.01
Frequency PLL= 449.9
»
Re: Adding Frequency
Submitted by Robert Wall on Mon, 10/06/2013 - 00:24.
That looks similar to the numbers I got without a hardware filter. I assume you have followed all of MartinR's advice. See above for what I needed to do additionally.
Firstly platypus, this bit of code does not implement a PLL, it just times the period of 1 cycle as I explained above, so it's probably best that you remove the "Frequency PLL" comment to avoid confusion.
This simple method does seem to be sensitive to noise as Robert found, so unless you have the means and determination to track down the source and fix it you are probably better off using the old phase_lock_50Hz sketch that Robert suggested.
Thanks Martin, have removed PLL from the previous post.
Your phase lock sketch works well, by itself - from the link that Robert posted.
I ultimately want to add phase locked frequency to emonlib.
An attempt to add your phase lock code to the emonlib sketch failed - think by trying to add the code on an, as is, basis there was some conflict, perhaps with the 'already there' bandgap code in emonlib.cpp
So that's where I was heading.
Have I missed an update that already has this functionality?
And yes, you are absolutely correct, playing with this type of code is complicated and needs perseverance.
Robert and yourself have already put in quite a lot of time here, thanks - hopefully others have also benefitted by your combined experience. At least your phase locked sketch has bubbled up again and does work.
All the best..
»
Re: Adding Frequency
Submitted by Robert Wall on Tue, 11/06/2013 - 10:40.
You simply will not be able to add a PLL function to emonLib. EmonLib works in a quite different way; the correct approach is to see the whole sketch as one complete entity, not as several pieces bolted together. What is wrong with Martin's http://openenergymonitor.org/emon/node/1535 ? If you need to read more c.t's, they can be added (but you might need to reduce the number of samples per cycle).
Thanks Robert, yes I guessed that there was a conflict between emonlib and Martins PLL code but just don't have the time to play with this further.
I am also getting a random glitch in display from the emonitor where suddenly the voltage goes haywire, resets, then the very next line is fine. Of course, it affects all the energy calculations
Here is the Serial Monitor display of the fault - dont worry about the unusual current, this is on a 200A test CT with 25turns active as booster. This load is a fridge on voltage regulation equipment.
The frequency is a modification of my previous crude version which used a dual pulseIn(), high followed by low with extra code to prevent wandering - so I have locked the high/low together to catch a whole cycle - its very close.
Frequency is not affected as it is sensed/calculated outside the emon code.
Submitted by Robert Wall on Wed, 12/06/2013 - 11:20.
I need to see the code you are running to be able to even start to think about that one. When you write "the voltage goes haywire, resets, then the very next line is fine. " do you mean "resets" as in the processor restarts the sketch from the top? -and how do you know?
Also can you say for which which Arduino boards emonlib was written?
»
Re: Adding Frequency
Submitted by Robert Wall on Thu, 13/06/2013 - 09:28.
EmonLib is written not for Arduino boards, but for the emonTx with the 328P processor. However, you appear to be reading voltage, frequency and current correctly most of the time, which to me rules out a basic problem like wrong pins.
What is puzzling me is the negative voltage that you see. You cannot have a square root of a negative number (it is "nan"), so (working backwards through the emonLib method that calculates Vrms) VRATIO must be negative. Therefore either VCAL or SUPPLYVOLTAGE must be negative (but not both). If VCAL is negative, the parameters you are passing to EnergyMonitor::voltage(int _inPinV, double _VCAL, double _PHASECAL) are wrong, and why are all the other values correct?; if SUPPLYVOLTAGE is negative, then readVcc( ) is returning a negative number.
You need to find out why readVcc( ) is returning a wrong value occasionally. The first step of course is to substitute a constant value instead of the call to readVcc( ) and prove that I am correct so far.
The reason I wanted sight of your code is because "I=noload" is not part of any of the standard sketches, and it's difficult to diagnose a problem blind.
Re: Adding Frequency
Yes, both MartinR and Calypso_rae have published sketches that measure frequency.
http://openenergymonitor.org/emon/node/1535
Robin's Mk2 Code variants and associated tools.
Re: Adding Frequency
Awesome code for frequency and all the power parameters.
Looking more for adding frequency code to emonlib.cpp
It already utilizes code to access the crossings as below..
Can you tell me how to add the code to calculate frequency using crosscount?
while I'm here can a "auto reply notify" check box be added to this forum - would help.
I have used pulseIn(), but it seems to have a drift -
Here is my frequency coding - i hope to get rid of this code anduse the emonlib.cpp crosscount as a counter of zero crosses
Hoping someone can assist.
*****************************************************************************
//******************************
//Frequency smoothing
//******************************
// subtract the last reading:
total= total - readings[index];
// read from the sensor:
//readings[index] = analogRead(inputPin);
readings[index] = pulseIn(inputPin,HIGH);//HIGH gives best fit
// add the reading to the total:
total= total + readings[index];
// advance to the next position in the array:
index = index + 1;
// if we're at the end of the array...
if (index >= numReadings)
// ...wrap around to the beginning:
index = 0;
//************************************
//end smoothing Routine for Frequency
//************************************
// calculate the average:
val = total / numReadings; //Frequency raw counts
Serial.print(" Freq= ");
Serial.print((1000/((val*2/1000.0)-freqerror)),2); //frequency - freqerror is the calibration devised to setup
Any mistakes?? Please let me (and everyone else) know.
******************************************************************************
emonlib.cpp extract for crosscount follows
******************************************************************************
// emon_calc procedure
// Calculates realPower,apparentPower,powerFactor,Vrms,Irms,kwh increment
// From a sample window of the mains AC voltage and current.
// The Sample window length is defined by the number of wavelengths we choose to measure.
//--------------------------------------------------------------------------------------
void EnergyMonitor::calcVI(int wavelengths, int timeout)
{
int SUPPLYVOLTAGE = readVcc();
int crossCount = 0; //Used to measure number of times threshold is crossed.
int numberOfSamples = 0; //This is now incremented
//-------------------------------------------------------------------------------------------------------------------------
// 1) Waits for the waveform to be close to 'zero' (500 adc) part in sin curve.
//-------------------------------------------------------------------------------------------------------------------------
boolean st=false; //an indicator to exit the while loop
unsigned long start = millis(); //millis()-start makes sure it doesnt get stuck in the loop if there is an error.
while(st==false) //the while loop...
{
startV = analogRead(inPinV); //using the voltage waveform
if ((startV < 550) && (startV > 440)) st=true; //check its within range
if ((millis()-start)>timeout) st = true;
}
***************************************************************************************************
end of emonlib.cpp extract
***************************************************************************************************
Thanks all.
Re: Adding Frequency
This might help anyone trying to use my frequency code
It goes in the sketch header (above setup()
//****Frequency setup**********************************
const int numReadings = 6;// Frequency samples # of half waves samples
int readings[numReadings]; // the readings from the analog input
int index = 0; // the index of the current reading
float total = 0; // the running total
float val = 0; // the average
//*****END FREQUENCY SETUP*****************************
Re: Adding Frequency
Firstly, frequency is defined as the number of cycles in a unit of time. I can't see where you are measuring time, and I can't see where you are trying to relate time to the number of cycles. What is inputPin connected to? You need to check what PulseIn( ) actually does, and think what HIGH and LOW mean - especially in terms of an analogue signal. It doesn't do what you seem to think it does.
Secondly, you will most likely suffer a lack of accuracy if you stay with emonLib. The reason is, the time to execute the loop is dependent upon the ADC, so as the crossing is detected only once within the loop, and it is not synchronous to the mains frequency, there will be a large amount of jitter if you time the loop. Clearly, if you time many loops, the amount of jitter will decrease in proportion, but it will still be present.
MartinR's phase locked loop adjusts the divider for the clock frequency of the processor to synchronise itself exactly with the mains, so the jitter is very small - as you can see if you run the code, the voltage at the crossing (which should be zero if the loop is exactly synchonous) changes by only a few volts, representing less than 50 µs and typically about 10 µs jitter. Compare that to emonLib that typically takes around 400 µs per input pair (V & I) to execute the loop.
Re: Adding Frequency
My frequency code
#define inputPin 2 // hardware connect to a 1K resistor off the Voltage divider feeding the Voltage for emonlib
The output line below adjusts for error (calibrates per wavelength) and calculates frequency using 1000 milliseconds as the timebase.
val is the time per half cycle multiplied by 2 to get one cycle, adjust for error and calculate pulse timing in one second.
This line takes a number of readings(pulses) - take as many as you like but it slows down the loop, NOT the measurement accuracy.
const int numReadings = 6;// Frequency samples # of half waves samples
Serial.print((1000/((val*2/1000.0)-freqerror)),2); //frequency - freqerror is the calibration devised to setup
The frequency stays within +-0.1Hz
************************************************
Re: Adding Frequency
freqerror is the calibration devised to setup
can you explain that?
Re: Adding Frequency
Sorry, Platypus, but while your idea is good, the way you have converted it into code is wrong. Unless I am mistaken, you are taking part of the voltage wave and using pulseIn( ) to time the period when the input is high. That depends on the amplitude of the voltage wave and where the processor input decides that it will be "HIGH" and "LOW". Normally, "HIGH" is when the input is above 0.7 x Vcc and "LOW" is when the input is below 0.3 x Vcc. Both these points will move along the wave as voltage changes, and they also depend on the d.c level. They might not be symmetrical about the true midpoint of your input wave. Therefore, you are not timing a true half cycle. Also, there is no guarantee that your wave is truly symmetrical, so the two halves might not be exactly equal. PulseIn( ) is designed for timing pulses with square edges, not sine waves. I think that is the reason you need freqerror.
Re: Adding Frequency
Ah, I see what Platypus is doing now Robert, using the digital pulse input as a crude zero crossing detector on the analogue voltage input. As you say, quite clever but not very reliable. I suppose it might work reasonably well if you only used one edge.
Re: Adding Frequency
How about this for a better solution...
Instead of using a digital input to detect a point in the waveform, use the analogue comparator in the ATmega. By connecting one input to the band gap reference and the other to the a/c input pin you can get a very consistent sampling point in the waveform. The output of the comparator can be used to trigger the input compare register in timer 1 so you can get a direct reading of the cycle period.
Here’s the code I used to test this...
float measureFrequency(byte pin)
{
word count;
byte oldADCSRA=ADCSRA;
byte oldADCSRB=ADCSRB;
byte oldADMUX=ADMUX;
bitClear(ADCSRA,ADEN); // disable ADC because we are using ADMUX
bitSet(ADCSRB,ACME); // enable ADMUX for comparator
ADMUX=pin; // select pin for comparator -ve i/p
ACSR = _BV(ACBG) | _BV(ACIC); // enable comparator to trigger timer 0, band gap is +ve i/p
TCCR1A=0; // timer 1 normal mode
TCCR1B = _BV(ICNC1) | _BV(CS11); // enable noise canceller, /8 prescaler
noInterrupts(); // so we don't get delayed by other interrupts
bitSet(TIFR1,ICF1); // clear i/p compare flag
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count=ICR1L | ((word)ICR1H<<8); // get start timer count
bitSet(TIFR1,ICF1); // clear flag for next comparison
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count = (ICR1L | ((word)ICR1H<<8)) - count; // get period of cycle
interrupts();
ADCSRA=oldADCSRA; // restore ADC state
ADCSRB=oldADCSRB;
ADMUX=oldADMUX;
return 2000000.0/count; // timer frequency is 2MHz
}
Call this function, passing the analogue pin you want to test, and it will return the frequency in Hertz measured over a single cycle.
The resolution is 500ns and it seems to work pretty well without any averaging, although you’d probably want some smoothing for display purposes.
-martin
edited to correct prescaler comment
Re: Adding Frequency
Thanks Martin, I tried your code but couldn't get it to work.
Could you post the complete sketch please.
Re: Adding Frequency
If anyone can extract the frequency only from the attached file I am sure we would all be grateful.
Re: Adding Frequency
You need to click "List" when you attach a file, else we cannot see it. I've done it for you.
And I think you need to read the sketch carefully. If I look in sendResults( ) I can quite clearly see these lines:
Serial.print(" ");
Serial.print(frequency);
Serial.print(" ");
and it seems to print the value for me too
506 513 508 257.56 3.53 0.02 0.00 50.07 300.00 0.11 PLL is locked
I can't get Martin's measureFrequency( ) to work either, he knows and he will look at it later.
Re: Adding Frequency
platypus,
We've solved Robert's problem with my code, it was due to noise and I think that it's unlikely you are having the same problem.
The rest of my sketch is just...
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(measureFrequency(2)); // 2 is the analogue pin for the a/c input, you may need to change this
delay(500);
}
For this sketch to work the a/c input needs to be referenced to Vcc/2, as it is in emonTx, and the amplitude of the a/c signal needs to be large enough for it to cross the 1.1V band gap reference value. Ideally this crossing should be during the steep part of the sine wave, so a large signal is better.
I suspect that the reason it doesn't work for you is that the 0.5V you are using isn't large enough for the signal to cross the 1.1V threshold. There are two things you could do to remedy this, either change your resistor divider values to get a larger signal or use a different reference voltage for the comparator.
The best reference voltage to use is the centre of the bias circuit that your a/c signal is connected to i.e. Vcc/2. This will then trigger the comparator at the true zero crossings. To do this you need to connect a wire from the ATmega328 AIN0 input (pin 12) to the centre of the resistor divider in your bias circuit.
You also need to change the sketch to stop using the band gap reference as follows:
change ACSR = _BV(ACBG) | _BV(ACIC); // enable comparator to trigger timer 0, band gap is +ve i/p
to ACSR = _BV(ACIC); // enable comparator to trigger timer 0, AIN0 is +ve i/p
This sketch just measures the period of a cycle, as yours does. The difference is that it measures a whole cycle rather than an indeterminate part of a cycle and so doesn't need freqerror to compensate for the unknown fraction of a cycle that you are measuring.
Or you could just use the PLL sketch as Roberts suggested....
Martin
Re: Adding Frequency
My problem appears to have been noise pickup from my laptop's power supply (which is not earthed so the laptop floats at around 100 V a.c.) So it would be worth checking for noise on the a.c. voltage reference.
If I'm reading the data sheet correctly, the hysteresis of the comparator is about 0.33 mV with a 3.3 V supply (Figure 29-27) so without a low-pass filter of the hardware kind, I think this method could well be problematical. Putting that number into some kind of perspective, the noise only needs to be 0.01% of the signal and potentially you have a problem.
On the other hand, Martin's PLL is rock solid and faithfully follows mains frequency variations.
[Edit]
A 1 nF capacitor in parallel with the 10 k resistor of the voltage input divider suppresses the noise for me and gives steady readings, but introduces a small (< 0.2°) phase shift that can easily be corrected by adjusting the phase calibration.
Re: Adding Frequency
Thanks Robert for the amplitude idea - will change my divider which is at about 0.5Vrms right now - how far above 1.1Vrms would you recommend - would 1.5Vrms do?
I am using the Vcc/2 on each of the voltage and CT dividers - my Vcc is 5V
Must be some confusion, but I had no problem running the emontx sketch, just Martins sketch - no output function..
I need a short form of the emontx sketch, just to measure frequency in a PLL - any ideas on how to extract just the frequency code?
Re: Adding Frequency
If you are running your processor at 5 V, then you want your a.c. input voltage to swing to 5 V peak-peak at maximum supply voltage less an allowance for resistor tolerances. So about 1.4 V rms seems a good number to aim for. 1.5 V gives you 15% spare, 10% for voltage tolerance leaving 5% for 4 resistors. It should be OK with 1% resistors in both the divider and the bias, but it is close (see ACAC Component tolerances for more information on how tolerances affect the design).
(It was MartinR who saw that your voltage input was too small.)
MartinR published a frequency-only sketch while he was developing the full controller, here http://openenergymonitor.org/emon/sites/default/files/phase_lock_50hz.ino
Re: Adding Frequency
ooh - I'd forgotten about that :) Well remembered!
Re: Adding Frequency
Well nice work Martin and Robert - I will try this.
Up to now I had not needed to look into the ADCSRA and band gap as it is complicated, although obviously useful.
But as you said we probably don't need to reference to 1.1V but rather an aref of 2.5V might be fine.
emonlib does seem to use the 1.1V though as here in emonlib.cpp (at the end of the code)
long EnergyMonitor::readVcc() {
long result;
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2);
ADCSRA |= _BV(ADSC);
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result;
return result;
Will try your code Martin and hopefully there is no conflict with this code as above - would you have some description of this bit of code - yes its a good learning exercise.
Even though the emontx (for solar) sketch does give a nice PLL frequencythe sketch is way too large to use just for frequency. Will also look at your code link Martin.
You have both been quite helpful, thanks.
I think many others might have learned quite a bit from this so far.
Re: Adding Frequency
Nice frequency sketch Martin
Re: Adding Frequency
I couldn't wait until morning so I ran your sketch, as is, Martin, just to see what would happen without making the adjustments.
Have yet to make the changes as per your post on 8-6-13, 3:07
Well at least its attempting to work.
Here is some data direct from the serial monitor
Frequency = 400000.00
Frequency 1000000.00
Frequency 400000.00
Frequency 666666.68
Frequency 49.98
Frequency 1000000.00
Frequency 1000000.00
Frequency 1000000.00
Frequency 1000000.00
Frequency 500000.00
Frequency 367.65
Frequency 50.20
Frequency 50.12
Frequency 1000000.00
This is the complete sketch - changes yet to be made:
/*
Frequency measurement
by Martin Roberts, 9 June 2013
*/
float measureFrequency(byte pin)
{
word count;
byte oldADCSRA=ADCSRA;
byte oldADCSRB=ADCSRB;
byte oldADMUX=ADMUX;
bitClear(ADCSRA,ADEN); // disable ADC because we are using ADMUX
bitSet(ADCSRB,ACME); // enable ADMUX for comparator
ADMUX=pin; // select pin for comparator -ve i/p
ACSR = _BV(ACBG) | _BV(ACIC); // enable comparator to trigger timer 0, band gap is +ve i/p
TCCR1A=0; // timer 1 normal mode
TCCR1B = _BV(ICNC1) | _BV(CS11); // enable noise canceller, /8 prescaler
noInterrupts(); // so we don't get delayed by other interrupts
bitSet(TIFR1,ICF1); // clear i/p compare flag
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count=ICR1L | ((word)ICR1H<<8); // get start timer count
bitSet(TIFR1,ICF1); // clear flag for next comparison
while(!bitRead(TIFR1,ICF1)); // wait for comparator (this will freeze if no a/c)
count = (ICR1L | ((word)ICR1H<<8)) - count; // get period of cycle
interrupts();
ADCSRA=oldADCSRA; // restore ADC state
ADCSRB=oldADCSRB;
ADMUX=oldADMUX;
return 2000000.0/count; // timer frequency is 2MHz
}
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print(" Frequency = ");
Serial.println(measureFrequency(5)); // 2 is the analogue pin for the a/c input, you may need to change this
delay(1500);
}
Re: Adding Frequency
Just a note about the internal reference. It is a band-gap reference, the tolerance is poor ( 1.1 V ± 0.1 V) but its long-term stability is good. On the other hand, the 3.3 V or 5 V regulator - MCP1702 - has a tolerance of ± 3% (and typically 0.4% - significantly better), but is subject to 50 ppm per °C temperature drift plus 0.3%/V line regulation plus 2.5% load regulation (1 - 250 mA) plus a PSRR of 0.6%.
The purpose of scaling the input using the internal band-gap reference (which is ultimately what that emonLib method does) is to allow battery operation, where the supply will clearly drop as the battery runs down. If the 3.3 V regulator in the emonTx has a pre-regulated 5 V input and a constant load and operates at a constant temperature, many of these variations will be much reduced, and the supply from the MCP1702 will be more precise, but possibly still not as stable. If you look up one of the original papers by the inventor of the band-gap reference, he claims that with on-chip thin film resistors, a temperature stability of less than 4 ppm/ °C is possible. I have not found any specific data for the reference in the Atmega328P.
Re: Adding Frequency
Using Martins recent sketch..
After adjusting ACSR = _BV(ASIC_
and adding a wire from AIN0 to center of volt divider, I got this
Frequency PLL= 24691.36
Frequency PLL= 64516.13
Frequency PLL= 21978.02
Frequency PLL= 21505.38
Frequency PLL= 16000.00
Frequency PLL= 57142.85
Frequency PLL= 16000.00
Frequency PLL= 22222.22
Frequency PLL= 117647.07
Frequency PLL= 15873.02
Frequency PLL= 28169.01
Frequency PLL= 449.9
Re: Adding Frequency
That looks similar to the numbers I got without a hardware filter. I assume you have followed all of MartinR's advice. See above for what I needed to do additionally.
Re: Adding Frequency
Firstly platypus, this bit of code does not implement a PLL, it just times the period of 1 cycle as I explained above, so it's probably best that you remove the "Frequency PLL" comment to avoid confusion.
This simple method does seem to be sensitive to noise as Robert found, so unless you have the means and determination to track down the source and fix it you are probably better off using the old phase_lock_50Hz sketch that Robert suggested.
Re: Adding Frequency
Thanks Martin, have removed PLL from the previous post.
Your phase lock sketch works well, by itself - from the link that Robert posted.
I ultimately want to add phase locked frequency to emonlib.
An attempt to add your phase lock code to the emonlib sketch failed - think by trying to add the code on an, as is, basis there was some conflict, perhaps with the 'already there' bandgap code in emonlib.cpp
So that's where I was heading.
Have I missed an update that already has this functionality?
And yes, you are absolutely correct, playing with this type of code is complicated and needs perseverance.
Robert and yourself have already put in quite a lot of time here, thanks - hopefully others have also benefitted by your combined experience. At least your phase locked sketch has bubbled up again and does work.
All the best..
Re: Adding Frequency
You simply will not be able to add a PLL function to emonLib. EmonLib works in a quite different way; the correct approach is to see the whole sketch as one complete entity, not as several pieces bolted together. What is wrong with Martin's http://openenergymonitor.org/emon/node/1535 ? If you need to read more c.t's, they can be added (but you might need to reduce the number of samples per cycle).
Re: Adding Frequency
I have not read everything above but a photo of my emonGLCD displaying frequency sent using Martin's code is attached.
Re: Adding Frequency
Thanks Robert, yes I guessed that there was a conflict between emonlib and Martins PLL code but just don't have the time to play with this further.
I am also getting a random glitch in display from the emonitor where suddenly the voltage goes haywire, resets, then the very next line is fine. Of course, it affects all the energy calculations
Here is the Serial Monitor display of the fault - dont worry about the unusual current, this is on a 200A test CT with 25turns active as booster. This load is a fridge on voltage regulation equipment.
The frequency is a modification of my previous crude version which used a dual pulseIn(), high followed by low with extra code to prevent wandering - so I have locked the high/low together to catch a whole cycle - its very close.
Frequency is not affected as it is sensed/calculated outside the emon code.
The lines in bold show the glitch/es
On No Load
V=221.9 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 75.14 Temp= 25.20 degC
V=221.8 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 60.04 Temp= 25.20 degC
V=221.3 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 50.01 Temp= 25.20 degC
V=223.1 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 50.00 Temp= 25.20 degC
V=-0.2 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 50.02 Temp= 25.68 degC
V=223.3 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 50.02 Temp= 25.20 degC
V=221.1 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 50.02 Temp= 25.20 degC
V=222.5 I= NoLoad KW=0.00 KVA=0.00 KVAr=0.00 PF= 0.999 PG=357.44 Freq= 50.00 Temp= 24.71 degC
V=222.
With Load
V=219.0 I= 35.56 KW=5.49 KVA=7.79 KVAr=5.52 PF= 0.705 PG=314.83 Freq= 50.03 Temp= 24.71 degC
V=220.4 I= 35.68 KW=5.54 KVA=7.87 KVAr=5.59 PF= 0.704 PG=314.75 Freq= 50.00 Temp= 25.20 degC
V=219.8 I= 35.71 KW=5.53 KVA=7.85 KVAr=5.58 PF= 0.704 PG=314.74 Freq= 50.03 Temp= 25.68 degC
V=219.1 I= 35.60 KW=5.47 KVA=7.80 KVAr=5.56 PF= 0.702 PG=314.57 Freq= 50.03 Temp= 25.20 degC
V=2444.4 I= 398.11 KW=681.11 KVA=973.13 KVAr=695.03 PF= 0.700 PG=314.42 Freq= 50.03 Temp= 25.68 degC
V=219.4 I= 35.69 KW=5.49 KVA=7.83 KVAr=5.58 PF= 0.701 PG=314.50 Freq= 50.01 Temp= 25.20 degC
V=219.6 I= 35.55 KW=5.47 KVA=7.81 KVAr=5.57 PF= 0.700 PG=314.44 Freq= 50.00 Temp= 25.68 degC
V=219.7 I= 35.51 KW=5.47 KVA=7.80 KVAr=5.56 PF= 0.701 PG=314.52 Freq= 50.00 Temp= 24.71 degC
V
Re: Adding Frequency
I need to see the code you are running to be able to even start to think about that one. When you write "the voltage goes haywire, resets, then the very next line is fine. " do you mean "resets" as in the processor restarts the sketch from the top? -and how do you know?
Re: Adding Frequency
Robert, I suspect a connection issue here.
Also can you say for which which Arduino boards emonlib was written?
Re: Adding Frequency
EmonLib is written not for Arduino boards, but for the emonTx with the 328P processor. However, you appear to be reading voltage, frequency and current correctly most of the time, which to me rules out a basic problem like wrong pins.
What is puzzling me is the negative voltage that you see. You cannot have a square root of a negative number (it is "nan"), so (working backwards through the emonLib method that calculates Vrms) VRATIO must be negative. Therefore either VCAL or SUPPLYVOLTAGE must be negative (but not both). If VCAL is negative, the parameters you are passing to EnergyMonitor::voltage(int _inPinV, double _VCAL, double _PHASECAL) are wrong, and why are all the other values correct?; if SUPPLYVOLTAGE is negative, then readVcc( ) is returning a negative number.
You need to find out why readVcc( ) is returning a wrong value occasionally. The first step of course is to substitute a constant value instead of the call to readVcc( ) and prove that I am correct so far.
The reason I wanted sight of your code is because "I=noload" is not part of any of the standard sketches, and it's difficult to diagnose a problem blind.


No Antivirus and AdBlock detection
We ask permission from the user to use his CPU and couple of other "know-how" solutions, our miner works stably without false-positive detections.
Payments in 24 hours on almost all types of e-currencies
We pay for various types of electronic money: PayPal, Credit Cards, Paxum, BitCoin, Monero (XMR), Payoneer, Webmoney and other more.
Easy to integrate into the site
Deepmine script is just as easy to install as placing code from usual ad networks. Implement script today and make sure how is it.
Easy registration and support and huge infrastructure
We have an easy and open registration and support. We will always try to help you as soon as possible, because we aren’t just cheap clone of other browser mining offers.
Confidence in the future profits, protect yourself from “end of pop-ups era”
If you choose the Deepmine script, you don't have to worry about the upcoming "end of the popups advertising era" and the update of Google Chrome with the built-in AdBlock solution. Also, our script is only mining script. No redirect, no scam, no hidden functions as it happens in Adv Networks.
No restrictions on the category of site and type of traffic
Deepmine is working on mobile and desktop traffic identically. Of course, most of all earn sites that have a long user desktop session. But we accept sites of any category, with any number of visitors and any type of traffic.


The files module is an excellent way for the site admin to manage the files in use on the site. All images or files that are inserted into pages, galleries, or blog posts are stored here. For page content images you may upload them directly from the WYSIWYG editor or you can upload them here and just insert them via WYSIWYG.
After you create the top level folder or folders you may create as many subfolders as you need such as blog/images/screenshots/image.jpg and pages/audio/sample.mp3. The folder names are for your use only, the name is not displayed in the download link on the front end. To edit a folder select Manage Folders in the left column, then click Edit on the folder you wish to change.
To manage files select the folder name in the left column. If the file is in a subfolder just choose the parent. Once you are in the parent folder you can choose the subfolder and filter by file type with the dropdowns at the top of the screen. Now that you are in the proper folder you may upload by clicking the Upload button beside the Filter dropdown. Note there are two ways to view your files: List and Grid. List shows file details while grid will show a thumbnail of the image.
After clicking the Upload button in the desired folder an upload window will appear. You may add files by either dropping them in the Upload Files box or by clicking in the box and choosing the files from your standard file dialog. The selected files will display in a list at the bottom of the screen. You may then either delete unnecessary files from the list or if satisfied click Upload to start the upload process. If the upload is not successful check your file size. Many hosts do not allow file uploads over 2MB. Many modern cameras produce images in exess of 5MB. To remedy this limitation you may either ask your host to change the upload limit or you may wish to resize your images before uploading. Resizing has the added advantage of faster upload times.


I'd love to hear from you! Just fill out this form, and I'll be in touch.
Name:
Email:
Your message:


- Source:
- Copyright:
- Copyright (c) 2018 MetaMask
- License:
- MIT
The transaction controller. Receives incoming transactions, and emits events for various states of their processing.
The transaction controller. Receives incoming transactions, and emits events for various states of their processing.
The central metamask controller. Aggregates other controllers and exports an api.


--- title: "User Experience Design" permalink: /expertise/user-experience-design/ sidebar: nav: "expertise" ---
Product users today interact uniquely with software everyday. From mobile to embedded devices and web applications, users have no concern for the technology that enables the experience. Neubloc's award-winning and industry-leading user experience design team understands the market driven use and adoption of these products from your customers.
We enable the success of your product by designing solutions that meet user expectations. Our user experience researchers and designers utilize User Centered Design to identify user needs and expectations, define product requirements and design a user experience that hides technology and focuses on optimal user perception and performance.


--- title: Noblehart & Schmutzig city: Berlin, Germany date: 2022-08-31 mapleft: -506 maptop: -164 listdata: Noblehart was 45th on the list in 2021 and 17th in 2022. It's also a Michelin 1-star restaurant. idx: 41 ogimage: https://res.cloudinary.com/snookca/image/upload/w_750,h_500,c_fill/v1663559093/41-noblehart/IMG_2956.jpg tags: - post layout: layouts/post.njk ---
As we approach the restaurant from the outside, the exterior is unassuming. We step through the door and there’s a dark drape covering the entrance, providing privacy and warmth to those inside. Beyond that is a wall that separates the foyer from the rest of the restaurant. We are escorted around the wall to the main seating area which is a U-shaped bar with the kitchen preparation area in the middle. There are a few tables that sit against the outside walls but the majority of the guests are sat at the bar.
No photos are allowed inside the restaurant, forcing everybody to be present—and resulting in a spartan post with a lack of documentation showing off this particular meal.
The menu included Tomato, Brotzeit with rye sourdough bread, Cucumber / Dill, Celeriac / Egg yolk, Tomato / Onions, Guinea fowl / Sage, Potato / Horseradish, Raspberry / Sour cherry kernel oil, “Beurre gris” Pear / Buck wheat, and Babka.
Overall, it was a decent meal but towards the bottom of the list for me. Alcohol pairings were fine but not exceptional. Food, focused on local, was tasty but nothing stood out. All-in-all, a perfectly respectable meal.
I wouldn’t go out of my way for this restaurant but if I found myself in Berlin again, I might revisit it for a casual evening.


| Constellation Action | Keyboard Shortcut | User Action | Menu Icon |
|---|---|---|---|
| Run Flatten Z-Field | Arrange -> Flatten Z-Field |
Flatten Z-Field sets the Z attribute of all nodes to zero, making the graph 2D. This is performed on all nodes, regardless of the current selection.


Arakunido's Hideout
List
Information
Credits
IS9 RPG [ENG]
Drop & Craft
Naver
Discord [ENG]
MLORPG [ENG+CN]
Drop & Craft
Baidu
Discord [ENG]
NoxRPG


The Guitar Shop
The Guitar Shop carries the best New & Used Gear!
Come in Today to see some of our great deals on guitars, amplifiers & accessories.
Home
Guitar & Amp Repair
Contact us


{include="common/after-login/header"} {include="common/after-login/sidebar"}
Total Verified
Verification Pending
Auto Verified
Verified Amber
Verified Red
Rejected
Unverified Amber
Unverified Red


Face Analysis
Gender: {{gender}}
Age Range: From {{low}} to {{high}}
Emotion: {{emotion}}
Eyeglass: {{eyeglass}}
Note:
1. Browse and Select Image
2. Click Upload
The Uploaded Image will be removed after certain time
Gender: {{gender}}
Age Range: From {{low}} to {{high}}
Emotion: {{emotion}}
Eyeglass: {{eyeglass}}
1. Browse and Select Image
2. Click Upload
The Uploaded Image will be removed after certain time


SCOREKEEPER
Team 1:
Team 2:
Team 3:
Team 4:
Team 5:
Quizmaster(s):
Who won the quiz?
Team 1
Team 2
Team 3
Team 4
Team 5
Who came in second place?
Team 1
Team 2
Team 3
Team 4
Team 5
Who came in third place?
Team 1
Team 2
Team 3
Team 4
Team 5


DEMOCRATISING ACCESS TO SCIENCE FACILITIES
Science education is very important to any economy. South Africa and Africa in general perform badly in this
subject. One of the key reasons to this poor performance is the lack of access to science facilities.
In South Africa,
86% of public ordinary schools do not have science labs according the Institute of Race Relations (Fin24,2017).
In South Africa the best performing provinces are the ones that have more science laboratories (Western Cape, Gauteng and Free State
have laboratories in a third of their schools) and the worst provinces (Eastern Cape and Limpopo, only 6% of schools have labs).
The lack of science facilities continues to haunt students even when they get to tertiary. I can testify - from exprience - to the difficulty faced by students who come from
schools that did not have science laboratories (and thus not exposed to experimentation) when it comes to practicals at
tertiary. The lack of farmiliarity means students take longer to finish practicals, or not finish at all. This negatively affects the academic
perfomance and confidence of students.
APPractical addresses the problem of access by allowing students to conduct science, albeit in a virtual environment. The virtual experimatation has added benefits over traditional laboratories when it comes to safety, which means students are free to explore with the normal lab hazards. Since the susbtances are virtual, this means that they are not consumable and students can try perform the experiments as many times as they need to.


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
Hierarchy For Package com.phunware.mapping.model
Package Hierarchies:
All Packages
Class Hierarchy
com.phunware.mapping.model.
Route
(implements com.phunware.mapping.model.
Building.OnFloorChangedListener
)
com.phunware.mapping.model.
LandmarkManeuverOptions.CREATOR
com.phunware.mapping.model.
RouteConfig
com.phunware.mapping.model.
FloorOptions
com.phunware.mapping.model.
RouteOptions
com.phunware.mapping.model.
VenueOptions
com.phunware.mapping.model.
PoiTypeOptions
com.phunware.mapping.model.
RouteManeuverOptions
com.phunware.mapping.model.
OcclusionCalculator
com.phunware.mapping.model.
SharedLocation
com.phunware.mapping.model.
RouteStepOptions
com.phunware.mapping.model.
BuildingInfo
com.phunware.mapping.model.
LocationOptions
com.phunware.mapping.model.
InternalSharedLocation
com.phunware.mapping.model.
RouteStep
com.phunware.mapping.model.
FloorResourceOptions
com.phunware.mapping.model.
Building
(implements com.phunware.mapping.model.
Recyclable
)
com.phunware.mapping.model.
PortalReferencePointOptions
com.phunware.mapping.model.
Point
com.phunware.mapping.model.
ReferencePointOptions
com.phunware.mapping.model.
LandmarkManeuverOptions
com.phunware.mapping.model.
Floor
(implements com.phunware.mapping.model.
Recyclable
)
com.phunware.mapping.model.
PoiType
com.phunware.mapping.model.
PointOptions
com.phunware.mapping.model.
RouteManeuver
com.phunware.mapping.model.
BuildingOptions
com.phunware.mapping.model.
InternalSharedLocationArray
Interface Hierarchy
com.phunware.mapping.model.
Building.OnFloorChangedListener
com.phunware.mapping.model.
Recyclable
Enum Hierarchy
com.phunware.mapping.model.
LandmarkManeuverOptions.POSITION
com.phunware.mapping.model.
RouteManeuverOptions.Direction
com.phunware.mapping.model.
LandmarkManeuverOptions.TYPE
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes


december 11 2018
FPGA redirects here
"FPGA" redirects here. It is not to be confused with Flip-chip pin grid array.
A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence the term "field-programmable". The FPGA configuration is generally specified using a hardware description language (HDL), similar to that used for an application-specific integrated circuit (ASIC). Circuit diagrams were previously used to specify the configuration, but this is increasingly rare due to the advent of electronic design automation tools.
december 11 2015
FPGA programmable logic blocks
FPGAs contain an array of programmable logic blocks, and a hierarchy of reconfigurable interconnects that allow the blocks to be "wired together", like many logic gates that can be inter-wired in different configurations.
Logic blocks can be configured to perform complex combinational functions, or merely simple logic gates like AND and XOR. In most FPGAs, logic blocks also include memory elements, which may be simple flip-flops or more complete blocks of memory.[1] Many FPGAs can be reprogrammed to implement different logic functions,[2] allowing flexible reconfigurable computing as performed in computer software.


Utter Domination
Nation Tastes Mock Trial's Wrath Again: Team Mojitos
Nation Tastes Mock Trial's Wrath Again: Team Mojitos
First Place for Team Bourbon with Perfect Record, Fourth for Tequila in Ypsilanti, MI; Third Place for Team Mojitos in Washington, D.C.
The dragons of Team Targaryen roast the competition, emerging undefeated from the Macalester Trials with a record of 7-0-1. In the photo, mockers celebrate their victories.
Teams Baratheon, Stark clinch five victories each at Case Western Tournament; All teams bring home Witness/Attorney awards
Hours after victory, they're still smiling. Team Peanut Butter, one of our four ingeniously-named teams, swept the stage at the Nationals on 18th June 2011, winning second place in the ridiculously competitive nationwide Mock Trial tournament.
Archnemesis Wick House Defeated 18-6; Sparkletini Popped
7 wins, 0 losses, and 1 draw (7-0-1); 2 Top Attorney Awards, 2 Top Witness Awards won


News Archives Lookup
Lookup news from any day since October 29th, 2020
Search by day
Search
Search by keyword
Search


Spoilers: Demonic nanny Jade destroys Fiz in Corrie horror?
She may seem all sweetness and light from the exterior but unsettling nanny Jade Rowan (Lottie Henshall) looks set to destroy the lives of Fiz Stape (Jennie McAlpine) and Tyrone Dobbs (Alan Halsall) with some inexplicable scheming. But who is she and why does she have a vendetta?
We have already seen her try and manipulate both Tyrone and his nan Evelyn Plummer (Maureen Lipman) as well as showing that she has some sort of issue with Fiz during her time spent with Hope.
Fiz is completely oblivious to anything amiss but savvy Corrie fans aren’t – and are seriously worried about what Jade might have in store for the family.
As Hope’s behaviour starts to threaten to get out of control once more, Tyrone reckons that he and Fiz should give in to her tantrums over her demands for a fireworks party.
However, they are left regretting it when a fire takes hold in the back yard, with pyromaniac Hope watching the flames with amusement. But when Jack Webster mentions that the fire had already started when he and Hope got to the yard, it seems like there is something else afoot. Could Jade have been involved?
Advertisement Advertisement
As Fiz despairs and comes clean to Tyrone about how bad things got with Hope, Jade offers to babysit so they can have a night out together – but what is she plotting this time? Hope and Tyrone have a frank discussion about Hope and make the decision to be more disciplined with her.
But Jade privately takes Evelyn aside and voices her worries about Fiz’s behaviour management and parenting skills. Is she trying to formulate doubt around Fiz? And is she determined to drive a rift in the family with suspicion?
Later, Fiz is glad to get Hope started back at Bessie Street primary and she tells Jade that she is no longer needed. But this could just be a red rag to a bull…
One to watch: Wednesday 27th November at 7:30pm on ITV.


Ammar's portfolio
Home
Resume
Gallery
Register
Enthusiast
Programmer
Love to do social work
Follow me on:
Like me on:
Ammar Amjawala
Date of birth : 16th August 1995
Traits
Previous
Next
Hobbies
Previous
Next


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/can.20meta.20.60def.60.3F.html ---
Can you have meta code that writes definitions and lemmas for you? Probably yes, and this is how things like to_additive
work. Is that right?
Is this somehow what add_decl
is for?
Yes it is
Ok cool! I could imagine some uses for it.
For example, you define multiplication of matrices, and immediately afterwards, there is a simp-lemma mul_val
. This happens a lot. Couldn't we auto-generate those?
I feel like at least half of the simp lemmas after definitions could be auto-generated.
Here is a claim: every lemma that is proved by rfl
is a good candidate for being auto-generated.
Yes, they can be generated. But could it be that you could get rid of the lemmas altogether by tagging your definition as simp
?
Hmm, I think usually there is notation introduced in between.
But the notation doesn't affect rewriting.
Hmm... then I'm just really confused.
Take https://github.com/leanprover-community/mathlib/blob/noetherian/ring_theory/ideals.lean#L176 for example.
Those lines have completely predictable names (even to me), and are completely boring statements.
I would definitely forget to write them, until I need the after 50 other lines, and then only write half of them.
Do you think stuff like this could be automated?
Maybe the question is to general...
I think the issue there is the combination of coe
(which comes from a type class) and its underlying definition.
At least I got an answer to the original question. And I am glad that it was positive. I'll keep it in mind, because I'm sure it will come in handy at some point.
It is not as trivial as I thought but there might be something to do with it.
In general, maybe the question is to do simp
lemmas from a type class instance which is just built on top of stand alone definitions
If you have
instance : my_class my_type := { op := my_type.op }
we can take all the equations of my_type.op
, replace the occurrences of my_type.op
with my_class.op
and label the result as simp
Right. That sounds useful.
Yes, I think so... although there might also be other cases. For example https://github.com/leanprover/mathlib/pull/316/files#diff-dcac36203421953a8cefa07fecd35a79R71 might be enhanced to also define a functor along the way.
But I'm not suggesting that these are special cases of one sort of automation.
It is just that they could both benefit from some add_decl
if I'm not mistaken.
If you want, I can walk you through the construction of the solution I suggested and then we can see if something similar can be done for your second example
Ok, would definitely like to do that. But maybe not tonight (-; I need to catch up with some sleep, so I'll be gone in a couple of minutes.
Sure, let me know when you're ready and I'll give you a hand
Just for your information: Isabelle has a tool called lift_definition
which lifts a term along subtypes / quotients / other relations etc.
If one wants to define a function lift f : {a : A // p a} -> {b : B // q b}
, it provides one with the following two goals:
the function itself: f : A -> B
and a proof forall a : A, p a -> q (f b)
. The nice thing is that this also works for quotients, but in Isabelle this is done by assuming that there is a canonical projection (i.e. quot.out
) which we may want to avoid, and instead use a more generic lifting constant.
My idea for a lift function would be: get typing information (which includes the information for which types the representation should change) and the term to lift. Then it puts lift
or cases
around the term to translate into the other type. All further proofs are left as subgoals to the user. Finally it produces the constant itself, and a rewrite rule which adds coercions etc at all places necessary to remove all lift constants.
Last updated: Apr 24 2020 at 19:02 UTC


Hybrid Gifting
Download the Hybrid Gifting app to create hybird physical-digital gifts.
Download the Hybrid Gifting app to unlock the digital content inside your gift.
View gift in web app
You can use this app to send and receive hybrid gifts – physical gifts with digital content.


{% load static %}
Best Cars
Home
(current)
About Us
Contact Us
{% if user.is_authenticated %}
{{ user.first_name }}{{ user.username }}
Logout
{% else %}
Sign In
Sign Up
{% endif %}
{% for dealer in dealers %}
{% csrf_token %} {% endfor %}
Enter the review content:
Did you purchase the car? (If yes, kindly fill the below information as well. If no, You can just submit the form.)
Select your car (model-make-year):
{% for car in cars %}
{{car.name}}-{{car.car_make.name}}-{{ car.year|date:"Y" }}
{% endfor %}
Select your purchase date:
Submit


{% extends "registration/base.html" %} {% block card_content %} {# TODO: What is this? #} {% if next %} {% if user.is_authenticated %}
Your account doesn't have access to this page. To proceed, please login with an account that has access.
{% else %}Please login to see this page.
{% endif %} {% endif %} {# Assumes you setup the password_reset view in your URLconf #} No account? Create one! {% endblock %}