The MusicID module is the GNSDK component that handles recognition of non-streaming music though a CD TOCTable of Contents. An area on CDs, DVDs, and Blu-ray discs that describes the unique track layout of the disc., audio source, fingerprint or search text. MusicID is implemented using the GnMusicId
class. The MusicID-File module is the GNSDK component that handles audio file recognition, implemented through the GnMusicIdFile
class. For information on identifying audio files and using the GnMusicIdFile
class, see "Identifying Audio Files (MusicID-File)".
The GnMusicId
class provides the following query methods:
FindAlbums
—Call this with an album or track identifier such as a CD TOC string, an audio source, a fingerprint, or identifying text (album title, track title, artist name, track artist name or composer name). This method returns a GnResponseAlbums
object for each matching album.
FindMatches
—Call this method with identifying text. The method returns a GnResponseDataMatches
object for each match, which could identify an album or a contributor.
Notes:
A GnMusicId
object's life time is scoped to a single recognition event and your application should create a new one for each event.
During a recognition event, status events can be received via a delegate object that implements IGnStatusEvents
(GnStatusEventsDelegate
in Objective-C).
A recognition event can be cancelled by the GnMusicId
cancel method or by the "canceller" provided in each events delegate method.
The GnMusicId::Options
class allows you to set the following options:
LookupData
—Set GnLookupData
options to enable what data can be returned, for example, classical data, mood and tempo data, playlist, external IDs, and so on.LookupMode
—Set a lookup option with one of the GnLookupMode
enums. These include ones for local only, online only, online nocache, and so on.PreferResultLanguage
—Use one of the GnLanguage
enums to set the preferred language for results.PreferResultExternalId
—Set external ID for results from external provider. External IDs are 3rd party IDs used to cross link this metadata to 3rd party services.PreferResultCoverart
—Specifies preference for results that have cover art associated.ResultSingle
—Specifies whether a response must return only the single best result. Default is true
.ResultRangeStart
— Specifies result range start value.ResultCount
— Specifies maximum number of returned results.MusicID-CD is the component of GNSDK that handles recognition of audio CDs and delivery of information including artist, title, and track names. The application provides GNSDK with the TOC from an audio CD and MusicID-CD will identify the CD and provide album and track information.
To identify music using a CD-TOC:
GnMusicId
object with your user handle.GnMusicId::FindAlbums
method with your TOC string.GnResponseAlbum
metadata result objects returned.The code samples below illustrates a simple TOC lookup for local and online systems. The code for the local and online lookups is the same, except for two areas. If you are performing a local lookup, you must initialize the SQLite and Local Lookup libraries, in addition to the other GNSDK libraries:
gnsdk_cstr_t toc= "150 14112 25007 41402 54705 69572 87335 98945<PHONE_NUMBER>02<PHONE_NUMBER>85<PHONE_NUMBER>60 203342"; GnMusicId music_id(user); music_id.Options().LookupData(kLookupDataContent); GnResponseAlbums response = music_id.FindAlbums(toc);
GnMusicId GnMusicId = new GnMusicId(user); String toc = "150 14112 25007 41402 54705 69572 87335 98945<PHONE_NUMBER>02<PHONE_NUMBER>85<PHONE_NUMBER>60 203342"; GnResponseAlbums responseAlbums = GnMusicId.findAlbums(toc);
Under construction
string toc = "150 14112 25007 41402 54705 69572 87335 98945<PHONE_NUMBER>02<PHONE_NUMBER>85<PHONE_NUMBER>60 203342"; try { using (GnStatusEventsDelegate midEvents = new MusicIdEvents()) { GnMusicId GnMusicId = new GnMusicId(user, midEvents); GnResponseAlbums gnResponse = GnMusicId.FindAlbums(toc); } }
Using the GNSDK's MusicID module, your application can identify music using a lookup based on text strings. Besides user-inputted text, text strings can be extracted from an audio track’s file path name and from text data embedded within a file, such as mp3 tags. You can provide the following types of input strings:
Text-based lookup attempts to match these attributes with known albums, artists, and composers. The text lookup first tries to match an album. If that is not possible, it next tries to match an artist. If that does not succeed, a composer match is tried. Adding as many input strings as possible to the lookup improves the results.
Text-based lookup returns “best-fit” objects, which means that depending on what your input text matched, you might get back album matches or contributor matches.
Identifying music using text is done using the GnMusicId
class that has numerous methods for finding albums, tracks, and matches
To identify music using text:
GnMusicId
object with your User object and events handler object. Note that the events handler is optional. GnMusicId::FindAlbums
method with your text search string(s)./* Set the input text as album title, artist name, track title and perform the query */ GnResponseAlbums response = music_id.FindAlbums("Supernatural", "Africa Bamba", "Santana", GNSDK_NULL, GNSDK_NULL);
GnMusicId musicId = new GnMusicId( gnUser, new StatusEvents() ); GnResponseAlbums result = musicId.findAlbums( album, track, artist, null, null );
musicId = [[GnMusicId alloc] initWithGnUser: self.gnUser statusEventsDelegate: self]; [self.cancellableObjects addObject: musicId]; [[musicId options] lookupData:kLookupDataContent bEnable:YES error:&error]; self.queryBeginTimeInterval = [[NSDate date] timeIntervalSince1970]; [self enableOrDisableControls:NO]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ NSError *textSearchOperationError = nil; GnResponseAlbums *responseAlbums = [musicId findAlbumsWithAlbumTitle: albumTitle trackTitle: trackTitle albumArtistName: artistName trackArtistName: artistName composerName: nil error: &textSearchOperationError]; }); }
/* Set the input text as album title, artist name, track title and perfor the query */ GnResponseAlbums gnResponse = musicID.FindAlbums("Supernatural", "Africa Bamba", "Santana");
You can identify music using an audio fingerprint. An audio fingerprint is data that uniquely identifies an audio track based on the audio waveform. You can use MusicID or MusicID-File to identify music using an audio fingerprint. The online Gracenote Media Service uses audio fingerprints to match the audio from a client application to the Gracenote Music Database. For more information, see FingerprintA unique representation of a sample of audio that can be used to identify a track.-Based Recognition.
GNSDK fingerprinting supports the following PCM audio formats:
Applications should use the highest quality audio possible to ensure the best results. Lower quality audio will result in less accurate fingerprint matches. Gracenote recommends at least 16-bit, stereo, 22050 Hz.
Do not resample or downsample audio to target these frequencies. Send the best quality audio that you have available.
The MusicID fingerprinting APIs give your application the ability to provide audio data as an identification mechanism. Note that if you want to do recognition using fingerprints and metadata together, and possibily have many files to do at once, then MusicID-File fingerprinting is probably the better solution. See "Identifying Audio Files (MusicID-File)"
There are four GnMusicId
fingerprinting methods:
FingerprintFromSource
—Generates a fingerprint from a provided audio source. Gracenote recommends using this, as it encapsulates the below three calls (and additionally required code) into one.FingerprintBegin
—Initialize fingerprint generation.FingerprintWrite
—Provides uncompressed audio data for fingerprint generation. You can call this after FingerprintBegin
to generate a native Gracenote Fingerprint Extraction (GNFPX) or Cantametrix (CMX) fingerprint.FingerprintEnd
—Finalizes fingerprint generation. Identifying music using MusicID fingerprinting examples:
Under construction
Under construction
Under construction
Under construction
/*----------------------------------------------------------------------------- * SetFingerprintBeginWriteEnd */ private static void SetFingerprintBeginWriteEnd(GnMusicId GnMusicId) { bool complete = false; FileInfo file = new FileInfo(@"..\..\..\data\05-Hummingbird-sample.wav"); using (BinaryReader b = new BinaryReader(File.Open(file.FullName, FileMode.Open, FileAccess.Read))) { b.BaseStream.Position = 0; /* skip the wave header (first 44 bytes). we know the format of our sample files*/ b.BaseStream.Seek(44, SeekOrigin.Begin); byte[] audioData = b.ReadBytes(2048); GnMusicId.FingerprintBegin(GnFingerprintType.kFingerprintTypeGNFPX, 44100, 16, 2); while (audioData.Length > 0) { complete = GnMusicId.FingerprintWrite(audioData, (uint)audioData.Length); if (true == complete) break; else audioData = b.ReadBytes(2048); } GnMusicId.FingerprintEnd(); if (false == complete) { /* Fingerprinter doesn't have enough data to generate a fingerprint. Note that the sample data does include one track that is too short to fingerprint. */ Console.WriteLine("\nWarning: input file does contain enough data to generate a fingerprint :" + file.FullName); } } } /*----------------------------------------------------------------------------- * MusicidFingerprintAlbum */ private static void MusicidFingerprintAlbum(GnUser user) { Console.WriteLine("\n*****Sample MID-Stream Query*****"); try { GnMusicId GnMusicId = new GnMusicId(user); /* Set the input fingerprint */ SetFingerprintBeginWriteEnd(GnMusicId); /* Perform the search */ GnResponseAlbums response = GnMusicId.FindAlbums(GnMusicId.FingerprintDataGet(), GnFingerprintType.kFingerprintTypeGNFPX); DisplayFindAlbumResutlsByFingerprint(response); } catch (GnException e) { } }
Under construction


1.
Diagram of the LangLearn (language-learning) Mind-Module
/^^^^^^^^^\Modules to be habituated into syntax /^^^^^^^^^\ / EYE \ | | | _____ _____ / EAR \ / \ | | | /Noun-\ /Verb-\ / \ | | | | | ( Phrase) ( Phrase) | | | _______ | | | | \_____/ \_____/ | | | /image \ | | | | ___ | | | / percept \---|-----+ | ____ /Ad-\ | auditory | | \ engram / | a| | | /Pro-\ ( verb) | memory | | \_______/ | b|c| | ( noun ) \___/ | channel | | | s|o|f| \____/ | where | | visual | t|n|i| | thoughts | | | r|c|b| _____________ | enter | | memory | a|e|e| ( Conjunction ) | and | | | c|p|r| \___________/ | reenter | | channel | t|t|s| ___ | the | | | | | | /Ad-\ ______ | conscious | | | | | | / jec-\ /Inter-\ | Mind | | | | | | \ tive/ ( jection) | _________ | | _______ | | | | \___/ \______/ | /"the" \ | | /fresh \ | |_|_| _____________ | / "more" \ | | / image \ | / \ ( Preposition ) | \ "the" / | | \ engram /---|--\ Psy / \___________/ | \"merrier"/ | | \_______/ | \___/ | \_______/ |
2. Purpose of the LangLearn Mind-Module
The purpose of the LangLearn language-learning module ranges from the small chore of mimicking a novel syntactic construction for comprehension and generatioon, up to the enormous task of learning an entire human language in the same trial-and-error way as a human baby learns.
3. Algorithm of the LangLearn Mind-Module
In the first of two implementations envisioned for the LangLearn module, the situation of encountering an unfamiliar chain of syntax will trigger a flag that calls the LangLearn module to mimick the novel syntax. For example, a phrase like "The more the merrier" might at first confuse and confound an AI Mind, but the LangLearn module could habituate a template of possible recognition of similar phrases in the future, such as "The bigger they are, the harder they fall." Such a habituated template may be used for both the comprehension and the generation of the novel syntax.
In the second of two potential implementations of the LangLearn module, an AI program such as the ghost.pl AI Mind could use the Spawn module to create a copy of itself enhanced with hardcoded syntax instead of merely weighted elements on a syntactic chain of mind-modules.
4. Code of LangLearn() from ghost.pl AI
source code in
Perl
pseudocode
In a syntactic habituand chain of up to seven nodes, all part-of-speech modules are candidates for possession of each node, but only the module with the highest numeric weight-value will be operative at the particular node. Thus a sentence-structure may be habituated with any target syntax, such as noun-verb-noun or noun-noun-verb.
node1 adjw1 advw1 cnjw1 nphw1 prpw1 vphw1 "some"
node2 adjw2 advw2 cnjw2 nphw2 prpw2 vphw2 "men"
node3 adjw3 advw3 cnjw3 nphw3 prpw3 vphw3 "always"
node4 adjw4 advw4 cnjw4 nphw4 prpw4 vphw4 "live"
node5 adjw5 advw5 cnjw5 nphw5 prpw5 vphw5 "in"
node6 adjw6 advw6 cnjw6 nphw6 prpw6 vphw6 "great"
node7 adjw7 advw7 cnjw7 nphw7 prpw7 vphw7 "fear"
5.
Variables for the LangLearn (language-learning) module
$adjw -- a proposed variable to hold the high or low weight that determines whether or not an adjectival mind-module is habituated into a particular position (node) in a syntactic chain of linguistic mind-modules. For adjectives, a typical position might be before a noun or after a noun.
$advw -- a proposed variable to hold the high or low weight that determines whether or not an adverbial module is habituated into a particular position in a syntactic chain of mind-modules. For adverbs, a typical position might be in advance of a verb or an adjective or another adverb.
$cnjw -- a proposed variable to hold the high or low weight that determines whether or not a conjunction module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For conjunctions, a typical position might occur in the middle between two other modules being joined.
$nphw -- a proposed variable to hold the high or low weight that determines whether or not a noun-phrase module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For nouns, a typical position might be at the syntactic start of a sentence.
$prpw -- a proposed variable to hold the high or low weight that determines whether or not a preposition module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For prepositions, a typical position might occur at the start of a prepositional phrase.
$vphw -- a proposed variable to hold the high or low weight that determines whether or not a verb-phrase module is habituated into a particular position in a syntactic chain of modules forming a complete sentence. For verbs, a typical position might occur between a subject-noun and the object of the verb, or at the syntactic end of a sentence.
6. Troubleshooting and Debugging for
AI Mind Maintainers
6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind
Maintainer devises solution.)
It may be possible to code a blank-slate AI Mind containing modules for all possible parts of speech but no particular syntax governing the order of appearance of the parts of speech in a sentence being generated. The LangLearn module of such an empty Mind could perhaps learn an entire human language through the same trial-and-error process by which a human baby presumably learns language.
Roadmap to Artificial Intelligence
9.
AiTree of Mind-Modules for
Natural Language Understanding


Hideo Kojima Presents Death Stranding Starring Hideo Kojima As Hideo Kojima
by Luke PlunkettHere, for your enjoyment this Thursday evening, is a Death Stranding trailer in which every single character is just Hideo Kojima.
Made using Deepfakes, it’s basically the animated version of:
It’s worth remembering that this tweet read differently in Japanese. It’s also worth remembering that this video is a joke, and a good one at that.


Convert an interval in days to hours, minutes, seconds
(single precision).
CALL:
CALL sla_CD2TF (NDP, DAYS, SIGN, IHMSF)
GIVEN:
NDP
I
number of decimal places of seconds
DAYS
R
interval in days
RETURNED:
SIGN
C
`+' or `-'
IHMSF
I(4)
hours, minutes, seconds, fraction
NOTES:
1.
NDP less than zero is interpreted as zero.
2.
The largest useful value for NDP is determined by the size of
DAYS, the format of REAL floating-point numbers on the target
machine, and the risk of overflowing IHMSF(4). For example,
on a VAX computer, for DAYS up to 1.0, the available floating-point
precision corresponds roughly to NDP=3. This is well below
the ultimate limit of NDP=9 set by the capacity of the 32-bit
integer IHMSF(4).
3.
The absolute value of DAYS may exceed 1.0. In cases where it
does not, it is up to the caller to test for and handle the
case where DAYS is very nearly 1.0 and rounds up to 24 hours,
by testing for IHMSF(1)=24 and setting IHMSF(1-4) to zero.


RMI generates a client-side file with a main() method that looks like the following example:
public static void main (String[] args) { System.setSecurityManager (new RMISecurityManager()); }
To complete your client class, you must add a lookup() call that returns a reference to the correct RMI server. You can use the reference to invoke server-side methods.
To add a lookup() call:
You need to know which RMI registry the server is registered with. In a large development effort, the server might be under control of a system administrator or another developer. If you are doing all the development work, you can start the server yourself.
A service node with the same name as the remote object appears under the registry node.
The main() method should resemble the code.
The object returned by the lookup is a proxy for the RMI server. You can invoke methods on it. Use code similar to the example:
obj.sayHello();
Your completed main method should look like this:
public static void main (String[] args) { System.setSecurityManager (new RMISecurityManager()); try { Hello obj = (Hello) Naming.lookup ("//localhost:1099/Remote"); obj.sayHello(); } catch (Exception ex) { ex.printStackTrace(); }
| See also | |
|---|---|
| Generating a Client-side File
Compiling and Running a Client-side File |


--- title: Norving on Economics date: '2015-07-09T19:00:12+05:30' tags: - ml tumblr_url: https://sureshshanmugam.com/post/123637512321/httpnbvieweripythonorgurlnorvigcomipython ---
http://nbviewer.ipython.org/url/norvig.com/ipython/Economics.ipynb—
Economics Simulations: key insight
Hypothesis - GST in India should benefit rich 1% than middleclass and poor as shown in this model.


Where is the King
问题描述 :
There is a King placed on an N * N chessboard. In each second, Bob must move the King to the next cell in one of the eight directions, but he can not move the King to the outside of the chessboard, and can not move the King to a damaged cell. Note: If and only if there is not any next cell that he can place the King on in the eight directions, the King will stay in the same cell.
Now your task is to calculate that, after T seconds, the number of the cells that the King could be on.
Now your task is to calculate that, after T seconds, the number of the cells that the King could be on.
输入:
There is an integer C (1 <= C <= 500) in the first line, indicates there are C test cases in total.
For each test case, there are four integers N (2 <= N <= 100), T (1 <= T <=<PHONE_NUMBER>), X (1 <= X <= N), Y (1 <= Y <= N). N and T have the same meaning as above, (X, Y) indicates the King’s initial location. Then there are N lines. In each line, there is a string with N characters include “#” and “.”, which indicates the states of the cells in this row. “#” means this cell is damaged, and “.” means this cell is ordinary. You can assume (X, Y) is an ordinary cell.
For the coordinate (x, y), it stands for the cell in row x and column y. The coordinate of the top-left cell is (1, 1), and the coordinate of the bottom-right cell is (N, N).
For each test case, there are four integers N (2 <= N <= 100), T (1 <= T <=<PHONE_NUMBER>), X (1 <= X <= N), Y (1 <= Y <= N). N and T have the same meaning as above, (X, Y) indicates the King’s initial location. Then there are N lines. In each line, there is a string with N characters include “#” and “.”, which indicates the states of the cells in this row. “#” means this cell is damaged, and “.” means this cell is ordinary. You can assume (X, Y) is an ordinary cell.
For the coordinate (x, y), it stands for the cell in row x and column y. The coordinate of the top-left cell is (1, 1), and the coordinate of the bottom-right cell is (N, N).
输出:
There is an integer C (1 <= C <= 500) in the first line, indicates there are C test cases in total.
For each test case, there are four integers N (2 <= N <= 100), T (1 <= T <=<PHONE_NUMBER>), X (1 <= X <= N), Y (1 <= Y <= N). N and T have the same meaning as above, (X, Y) indicates the King’s initial location. Then there are N lines. In each line, there is a string with N characters include “#” and “.”, which indicates the states of the cells in this row. “#” means this cell is damaged, and “.” means this cell is ordinary. You can assume (X, Y) is an ordinary cell.
For the coordinate (x, y), it stands for the cell in row x and column y. The coordinate of the top-left cell is (1, 1), and the coordinate of the bottom-right cell is (N, N).
For each test case, there are four integers N (2 <= N <= 100), T (1 <= T <=<PHONE_NUMBER>), X (1 <= X <= N), Y (1 <= Y <= N). N and T have the same meaning as above, (X, Y) indicates the King’s initial location. Then there are N lines. In each line, there is a string with N characters include “#” and “.”, which indicates the states of the cells in this row. “#” means this cell is damaged, and “.” means this cell is ordinary. You can assume (X, Y) is an ordinary cell.
For the coordinate (x, y), it stands for the cell in row x and column y. The coordinate of the top-left cell is (1, 1), and the coordinate of the bottom-right cell is (N, N).
样例输入:
3 3 1 3 3 ... ... ... 3 2 3 3 ... ..# .#. 3 4 1 3 .#. .## ...
样例输出:
3 6 1HintFor Sample 1, the blue cells in the left picture of the Figure 1 show the cells that the King could be on after 1 second. For Sample 2, the blue cells in the right picture of the Figure 1 show the cells that the King could be on after 2 seconds. The red cells stand for the damaged cells, and the yellow cells shows other ordinary cells.
要求的两个人每一步最优的博弈 那么再某种状态下 当前步人所能走到的最优值是可以确定的
这一题在暴搜中还用到了记忆化 也就是换手的时候 那么当前步能走的就变成了 前一状态下 的最优值的负数
题目真的很不错 可惜我太水了
#include<cstdio> #include<stack> #include<iostream> #include<algorithm> using namespace std; #define inf 99999999 int dp[(1<<21)+5],score[(1<<21)+5],g,b,s,x,y; int bag[25][20]; void cal(){ int sum[11]; for(int i=0;i<(1<<b);++i){ memset(sum,0,sizeof sum); for(int j=0;j<b;++j){ if(i>>j&1){ for(int k=1;k<=g;++k)sum[k]+=bag[j][k]; } } for(int j=1;j<=g;++j)score[i]+=sum[j]/s; } } int dfs(int cur){ if(dp[cur]!=-inf)return dp[cur]; for(int j=0;j<b;++j) if(!(cur&(1<<j))){ int res=score[cur|(1<<j)]-score[cur]; if(res>0){ dp[cur]=max(dp[cur],dfs(cur|(1<<j))+res); }else{ dp[cur]=max(-dfs(cur|(1<<j)),dp[cur]); } } return dp[cur]; } void solve(){ memset(bag,0,sizeof bag); memset(score,0,sizeof score); for(int i=0;i<b;++i){ scanf("%d",&x); while(x--){ scanf("%d",&y); bag[i][y]++; } } cal(); for(int i=0;i<(1<<b);++i)dp[i]=-inf; dp[(1<<b)-1]=0; printf("%d\n",dfs(0)); } int main(){ while(~scanf("%d%d%d",&g,&b,&s),g+b+s){ solve(); } return 0; }
版权声明：本文为博主原创文章，未经博主允许不得转载。
参考：http://blog.csdn.net/ahjkl007/article/details/41108419
(adsbygoogle = window.adsbygoogle || []).push({});
没错 就说的雾霾太大
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠
那里能看全集的煎饼侠


A passionate, hard-working and self-motivated IT undergraduate with proven leadership skill, seeking for an internship opportunity in the field of software engineering with the intension of contributing to the growth of the company while uplifting my professional experience.
Level 1 Semester 1 SGPA : 3.73
Level 1 Semester 2 SGPA : 3.24
GPA: 3.48
Combine Maths - A
Physics - B
Chemistry - B
Java
C
JavaScript
PHP
Python
HTML
CSS
Bootstrap
ReactJS
Laravel
Angular
React Native
MySQL
MS SQL
Visual Code
NetBeans
Android Studio
GIT
This is boiler-plate what is provided all navigation and basic login function who are developing native mobile application.
Web based application. Users can create account, create, edit and Delete Article.
Technologies used - Laravel , MySQL
Contribution - Full-Stack developer
This is web based Project for patients and channeling centers to inform about current patient Number
Technology used - ReactJS, Firebase
Contribution - Front-end Developer with integrate Firebase
This is A/L MCQ app to enhance subject knowledge of student.
Technologies used - ReactJS, Laravel, MySQL, Flutter
Contribution - Front-end Developer - ReactJS
Web-based Education Management System with mobile application for schools
Technologies used - Laravel, MySQL, React Native, Angular
Contribution - Mobile Developer
This is A/L MCQ app to enhance subject knowledge of student.
Technologies used - ReactJS, Laravel, MySQL, Flutter
Contribution - Front-end Developer - ReactJS
This is an automated Life Guard Jacket, when an emergency situation it is activated by Heart Beat Sensor and Pressure Sensor and informed to life guard using GSM module. Micro C programming, ATmega32A
Contribution – Team Leader, GSM and GPS Module


 It shows photo posts only, one image at a time, and lets you reblog/like/steal images you see.
(when you log in with Tumblr, it says, "This app can post" when you login with tumblr - don't freak out, it won't post unless you specifically reblog/steal something.)


Pulse-4.5.1
- Added Diagnostic view to main view page.
- Fixing updating plots to fast.
- In ViewDataDvlViewModel, fixed Display All data.
- Fixed Display All.
- Moved the copyright information to the text file Copyright.txt.
- Skip the Compass Calibration in the wizard. Added the compass calibration as a button in the Configuration screen.
- Added BTIC Installer.
- In LoadProjectsViewModel, improved the performance of loading a project in ScanProjectAsync().
- In DeployAdcpViewModel, added Zero Pressure sensor command.
- In PingModelViewModel, fixed the timing and display.
- In TimeSeriesPlotViewModel, added AddIncomingDataBulk to display all data.
- In ProjectReportText, removed the await in LoadData().
- In ProfilePlotViewModel, update the plot when selection changed in UpdateSeriesVisibility().
- In ProjectImage, added ProduceCompleteImage() to produce the image in a single pass.
- In PlaybackViewModel, fixed playback speed and divide by zero.
RTI-3.4.1
- Changed to ReadBytes to read in from the file to improve performance.
- In AdcpDatabaseWriter, added WriteFileToDatabase() to write all the ensembles at once.


...that are somehow supposed to describe your entire being. I saw the tag going around. No one has tagged me, but when has that ever stopped me?
This has proven to be much more difficult than I imagined, not because I don't have fictional characters that I can relate to, but because...
Well, see, this is the thing. There are parts of yourself, character traits, that you like to think define you. These are all great and noble things, the Gryffindor of character traits, all golden and perfect. The naked truth, though, is that that's what you want to be, not really who you are in reality. When you do, in the sober light of day, do an honest assessment of things, you do fall desperately short in quite a few departments.
Anyhoo, after days of thinking about this, I finally got my three:
1. Harrymort, Seventh Horcrux
Dear god, I really wanted to write about how much I absolutely LOVED this fanfic. And I despise fanfics as a rule.  Pliss.
Anyway, Harrymort is brilliant (and described by the author as "a series of bad decisions executed well"). He is remorseless and persistent, and did I mention brilliant? These are all character traits I tend to fanboy over, being so intelligent that even when you mess up, you've done such a good job of it that your failures are just as spectacular as when you win. They don't really describe me though.
"Evanesco troll," I murmured. The troll disappeared.
 "Wicked."
Hermione asked, "Where did it go?"
I shrugged. "Where does anything that's vanished go?"
We stood there for a few minutes, contemplating the nature of nonexistence. At least that's what I was doing. I don't know about the children.
Then, shortly after we all should have died horrible deaths via bludgeoning, the professors arrived.
Typical.
What I do relate to a lot is his constant paranoia, and seeing conspiracies and intrigue everywhere (because if you're doing it, everyone else must be too, right?).
Harrymort is so wrapped up in his lies that he starts to believe them, like his absolute assertion that Hermione is a dark witch, Ron's a werewolf, and that Muggle-born wizards and witches have been left behind by their magical parents with Muggles acting as childcare.
I absolutely adore him. GO READ, NOW.
2. Mark Brendanawicz, Parks and Rec
"Brendanawicz? More like Brendana-Quits!"
Why a character from the shows difficult beginnings? Why a really bland and unlovable character who didn't make an impact from a show full of strong and lovable characters?
After years of his life wasted in the city planning (a subject I deeply love) department, he finally quit to go work in the private sector. He makes silly decisions (Ann), breaks his legs, almost humiliates himself with by proposing to a woman who's about to break up with him, and leaves behind the people he really loved (Leslie). Despite all the crashing and burning, he was perhaps one of the most realistic characters in a show full of superhumans.
They even threw out his plans for the park and got someone from Eagleton (!!) to redraw the thing. Such is life.
3. Max Fischer, Rushmore
I, just like Max, like to think of myself as a grown-up and an intellectual.
And I, just like Max, am nothing of the sort. When you finally do meet an actual adult (like Rosemary - who Max sees as an equal and a potential partner), your embarrassing childishness shows, you are incapable of processing how to handle a real relationship, and your Latin is terrible (or rather, nonexistent, because you foolishly tried to get rid of it from the curriculum).

I think we've all been Max at a point in our lives. When we realize that even at our best, we're still not good enough.


Clears the content of the input.
See also the triggerQueryOnClear
option.
Return the debug info about this component.
Disable the component. Normally this means that the component will not execute handlers for the framework events (query events, for example). Component are enabled by default on creation.
Enable the component. Normally this means that the component will execute handlers for the framework events (query events, for example). Components are enabled by default on creation.
Return the bindings, or environment, for the current component.
Gets the current cursor position in the input.
The cursor position (index starts at 0).
Gets the displayed result from the input.
The displayed result.
Gets the result from the input.
The result.
Gets the content of the input.
The content of the input.
Gets the result at cursor position.
The match condition.
The result.
Sets the content of the input.
The string to set in the input.
Adds the current content of the input to the query and triggers a query if the current content of the input has changed since last submit.
Also logs the serachboxSubmit
event in the usage analytics.
Get the bound component to the given HTMLElement. Throws an assert if the HTMLElement has no component bound, unless using the noThrow argument.
If there is multiple component bound to the current HTMLElement, you must specify the component class.
HTMLElement for which to get the bound component.
Optional component class. If the HTMLElement has multiple components bound, you must specify which one you are targeting.
Boolean option to tell the method to not throw on error.
Allows the component to bind events and execute them only when it is enabled.
Contains the state of options for different components. Mainly used by ResultLink.
Contains the state of different components (enabled vs disabled). Allows to get/set values. Triggers component state event when modified. Each component can listen to those events.
A disabled component will not participate in the query, or listen to ComponentEvents.
Allows component to log in the dev console.
Contains the singleton that allows to trigger queries.
Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.
A reference to the root HTMLElement (the SearchInterface).
A reference to the root of every component, the SearchInterface.
The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton
A reference to the Analytics.client.
If the enableQuerySyntax
option is true
, specifies whether to
interpret the AND
, NOT
, OR
, and NEAR
keywords in the Querybox
as query operators in the query, even if
the end user types those keywords in lowercase.
This option applies to all query operators (see Coveo Query Syntax Reference).
Example:
If this option and the
enableQuerySyntax
option are bothtrue
, the Coveo Platform interprets thenear
keyword in a query such asservice center near me
as theNEAR
query operator (not as a query term).
Otherwise, if the
enableQuerySyntax
option istrue
and this option isfalse
, the end user has to type theNEAR
keyword in uppercase for the Coveo Platform to interpret it as a query operator.
Default value is false
.
data-enable-lowercase-operators='true' data-enable-lowercase-operators='false'
Whether to convert a basic expression containing at least a certain number of keywords (see the
partialMatchKeywords
option) to a partial match expression, so
that items containing at least a certain number of those keywords (see the
partialMatchThreshold
option) will match the expression.
Notes:
- Only the basic expression of the query (see
q
) can be converted to a partial match expression.- When the
enableQuerySyntax
option is set totrue
, this feature has no effect on a basic expression containing query syntax (field expressions, operators, etc.).
Example:
With the following markup configuration, if a basic expression contains at least 4 keywords, items containing at least 75% of those keywords (round up) will match the query.

For instance, if the basic expression is
Coveo custom component configuration help
, items containing all 5 of those keywords, or 4 of them (75% of 5 rounded up) will match the query.
Default value is false
, which implies that an item must contain all of the basic expression keywords to match
the query.
data-enable-partial-match='true' data-enable-partial-match='false'
Specifies whether to interpret special query syntax (e.g., @objecttype=message
) when the end user types
a query in the Querybox
(see
Coveo Query Syntax Reference). Setting this
option to true
also causes the Querybox
to highlight any query syntax.
Regardless of the value of this option, the Coveo Cloud REST Search API always interprets expressions surrounded
by double quotes ("
) as exact phrase match requests.
See also enableLowercaseOperators
.
Notes:
- End user preferences can override the value you specify for this option.
If the end user selects a value other than Automatic for the Enable query syntax setting (see the
enableQuerySyntax
option of theResultsPreferences
component), the end user preference takes precedence over this option.
- On-premises versions of the Coveo Search API require this option to be set to
true
in order to interpret expressions surrounded by double quotes ("
) as exact phrase match requests.
Default value is false
.
data-enable-query-syntax='true' data-enable-query-syntax='false'
If enableWildcards
is true
, specifies whether to expand basic
expression keywords containing question mark characters (?
) to the possible matching keywords in order to
broaden the query (see
Using Wildcards in Queries).
Note:
If you are using an on-premises version of the Coveo Search API, you also need to set the
enableQuerySyntax
option totrue
in order to be able to setenableQuestionMarks
totrue
.
Default value is false
.
data-enable-question-marks='true' data-enable-question-marks='false'
Whether to enable the search-as-you-type feature.
Default value is false
.
data-enable-search-as-you-type='true' data-enable-search-as-you-type='false'
Specifies whether to expand basic expression keywords containing wildcards characters (*
) to the possible
matching keywords in order to broaden the query (see
Using Wildcards in Queries).
See also enableQuestionMarks
.
Note:
If you are using an on-premises version of the Coveo Search API, you need to set the
enableQuerySyntax
option totrue
to be able to setenableWildcards
totrue
.
Default value is false
.
data-enable-wildcards='true' data-enable-wildcards='false'
The minimum number of keywords that need to be present in a basic expression to convert it to a partial match expression.
See also the partialMatchThreshold
option.
Notes:
- This option has no meaning unless the
enablePartialMatch
option is set totrue
.- Repeated keywords in a basic expression count as a single keyword.
- Thesaurus expansions in a basic expression count towards the
partialMatchKeywords
count.- Stemming expansions do not count towards the
partialMatchKeywords
count.
Example:
If the
partialMatchKeywords
value is7
, the basic expression will have to contain at least 7 keywords to be converted to a partial match expression.
Default value is 5
.
data-partial-match-keywords='10'
An absolute or relative value indicating the minimum number (rounded up) of partial match expression keywords an item must contain to match the expression.
See also the partialMatchKeywords
option.
Notes:
- This option has no meaning unless the
enablePartialMatch
option is set totrue
.- A keyword and its stemming expansions count as a single keyword when evaluating whether an item meets the
partialMatchThreshold
.
Examples:
If the
partialMatchThreshold
value is50%
and the partial match expression contains exactly 9 keywords, items will have to contain at least 5 of those keywords to match the query (50% of 9, rounded up).
With the same configuration, if the partial match expression contains exactly 12 keywords, items will have to contain at least 6 of those keywords to match the query (50% of 12).
If the
partialMatchThreshold
value is2
, items will always have to contain at least 2 of the partial match expression keywords to match the query, no matter how many keywords the partial match expression actually contains.
Default value is 50%
.
data-partial-match-threshold='foo'
If the enableSearchAsYouType
option is true
, specifies how
long to wait (in milliseconds) between each key press before triggering a new query.
Default value is 50
. Minimum value is 0
data-search-as-you-type-delay='10'
Specifies whether to trigger a query when clearing the Querybox
.
Default value is false
.
data-trigger-query-on-clear='true' data-trigger-query-on-clear='false'
Creates a new Querybox component
. Creates a new Coveo.Magicbox
instance and wraps the Magicbox methods
(onblur
, onsubmit
etc.). Binds event on buildingQuery
and before redirection (for standalone box).
The HTMLElement on which to instantiate the component. This cannot be an HTMLInputElement for technical reasons.
The options for the Querybox
component.
The bindings that the component requires to function normally. If not set, these will be automatically resolved (with a slower execution time).
The
Querybox
component renders an input which the end user can interact with to enter and submit queries.When the end user submits a search request, the
Querybox
component triggers a query and logs the corresponding usage analytics data.For technical reasons, it is necessary to instantiate this component on a
div
element rather than on aninput
element.See also the
Searchbox
component, which can automatically instantiate aQuerybox
along with an optionalSearchButton
component.


Hello
Table of Contents
## Table of Contents
- [Introduction](#Introduction)
- [Overview](#Overview)
- [IoT Suite Components](#IoT_Suite_Components)
- [Azure IoT Hub](#Azure_IoT_Hub)
- [Settings](#Settings)
- [Shared Access Policies](#Shared_Access_Policies)
- [Messaging](#Messaging)
- [Pricing & scale](#Pricing_amp_scale)
- [Users](#Users)
- [DocumentDb](#DocumentDb)
- [Azure Event Hubs](#Azure_Event_Hubs)
- [Events Hub](#Events_Hub)
- [Rule Alerts Hub](#Rule_Alerts_Hub)
- [Storage](#Storage)
- [Table Storage](#Table_Storage)
- [Blob Storage](#Blobs)
- [Container: actionmappings](#Container_actionmappings)
- [Container: devicerules](#blob-devicerules)
- [Container: devicetelemetry](#Container_devicetelemetry)
- [Container: thisisdemo-ehout](#blob-thisisdemo-ehout)
- [Container: rulesoutput](#blob-rulesoutput)
- [Stream Analytics](#Stream_Analytics)
- [#1 Name: ThisIsDemo-Telemetry](#Name_ThisIsDemo-Telemetry)
- [#2 Name: ThisIsDemo-DeviceInfo](#Name_ThisIsDemo-DeviceInfo)
- [#3 Name: ThisIsDemo-Rules](#Name_ThisIsDemo-Rules)
- [App Service Plan](#App_Service_Plan)
- [Web App](#Web_App)
- [Bing Maps Service](#Bing_Maps_Service)
- [Deleting Everything IoT Suite Created](#Deleting_Everything_IoT_Suite_Created)
- [See Also](#See_Also)
↑ [Back to top](#Top)
* * *
# Introduction
When you create a "Remote Monitoring" IoT Suite solution, what you actually get is a whole bunch of cool technology wrapped up in one bundle. Everything you need to configure and end-to-end solution for device data ingress, monitoring and control.
IoT Suite is an initial set-up wizard, to help your business take all the pain out of spinning up a proof-of-concept, or the initial architecture for your project. It will configure all the parts and wiring that you will need to create the whole solution.
This is great for spinning up "proof of concept" example, and even to lay the ground work for a final production solution You could just replace the dummy devices with real ones, and define your own rules. It is also great for generating dummy data, if you
are working on just a user interface tool.
Because [**the solutions are available on GitHub**](https://github.com/Azure/azure-iot-remote-monitoring), you can trace all the parts and wiring underlying the whole end-to-end solution and scenario.
This is just one example of how you can set up the system. Once you understand everything, you can chop and change as suits your needs with each project.
This article is a detailed checklist and breakdown of each component you get "out of the box" when you use the IoT Suite tool to create your IoT solution.
For a detailed description of adding devices to this solution, read **[IoT Suite - Remote Monitoring
- Adding Live and Simulated Devices](http://social.technet.microsoft.com/wiki/contents/articles/32975.iot-suite-remote-monitoring-adding-live-and-simulated-devices.aspx).**
↑ [Back to top](#Top)
* * *
# Overview
Below is the [to date] published diagram from Microsoft, which shows the basic configuration, as shown
[
here](https://azure.microsoft.com/en-us/documentation/articles/iot-suite-remote-monitoring-sample-walkthrough/):
> [![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/5040.remote_2D00_monitoring_2D00_architecture.png)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/5040.remote_2D00_monitoring_2D00_architecture.png)
Below is the actual list of what you get by default...
- Azure IoT Hub (1 high-frequency unit)
- Azure Stream Analytics (3 streaming units)
- Azure DocumentDB (1 S2 instance)
- Azure Storage (1 GRS standard, 1 LRS standard, 1 RA-GRS standard)
- Azure App Services (2 S1 instances, 2 P1 instances)
- Azure Event Hub (1 basic throughput unit)
> [![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/5153.solutionDetails.png)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/5153.solutionDetails.png)
Any resources created in "IoT Suite" will be grouped into a Resource Group named after the solution name you chose at the start of the process. All items of the group can therefore be easily found and maintained using the Azure Portal blades.
> [![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/3750.resourceGroup.png)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/3750.resourceGroup.png)
**Note: The main list does not show everything. You have to click the box header or the "..." to see the full list blade.**
↑ [Back to top](#Top)
* * *
# IoT Suite Components
I have matched and documented all these resources in this article.
The name of each feature of the solution above is highlighted below in **bold and red**.
Names of the actual parts or each resource are also highlighted in bold.
## Azure IoT Hub
Name: **ThisIsDemo**
Hostname – ThisIsDemo.azure-devices.net
This is the "public hub" (as opposed to the "internal" Event Hub detailed below) that devices connect to for data and return commands.
### Settings
#### Shared Access Policies
Five policies are created, below are the main three:
1. **iothubowner** – full permission
2. **service** – service connect permission
3. **device** – Device connect permission
#### Messaging
- Cloud-to-device (C2D) default TTL – 0
- Device-to-cloud (D2C) default retention – 1 day
- D2C partitions – 4
- Consumer groups – none specific, just default
#### Pricing & scale
- Default = S2 - standard
- Hub Units = 1
#### Users
1. Subscription admins – The Azure subscription admins and co-admins
## DocumentDb
Name: **ThisIsDemo-iotsuite**
This holds the master-list of registered devices and their differing properties. You can edit these directly in Azure Portal. Each device is a separate record in the database.
Storing "device provisioning" data in [
DocumentDb](https://azure.microsoft.com/en-gb/documentation/services/documentdb/)means all devices are in one place, but can have their own "schema" of different fields. So each document is device type dependent.
Below is an example of a device file (document) with a few **emboldened**
points of interest:
{
"DeviceProperties": {
"DeviceID": "SampleDevice003_278",
"HubEnabledState": true,
"CreatedTime": "2015-10-03T14:01:10.0018032Z",
"DeviceState": "normal",
"UpdatedTime": "2015-11-05T02:33:19.9573117Z",
"Manufacturer": "Contoso Inc.",
"ModelNumber": "MD-81",
"SerialNumber": "SER5553",
"FirmwareVersion": "1.30",
"Platform": "Plat-81",
"Processor": "i3-4792",
"InstalledRAM": "43 MB",
"Latitude": 47.659159,
"Longitude": -122.141515
},
"Commands": [
{
"Name": "PingDevice",
"Parameters": null
},
{
"Name": "StartTelemetry",
"Parameters": null
},
{
"Name": "StopTelemetry",
"Parameters": null
},
{
"Name": "ChangeSetPointTemp",
"Parameters": [
{
"Name": "SetPointTemp",
"Type": "double"
}
]},
{
"Name": "DiagnosticTelemetry",
"Parameters": [
{
"Name": "Active",
"Type": "boolean"
}
]},
{
"Name": "ChangeDeviceState",
"Parameters": [
{
"Name": "DeviceState",
"Type": "string"
}
]}
],
"CommandHistory": [],
"IsSimulatedDevice": 1,
"Version": "1.0",
"ObjectType": "DeviceInfo",
"id": "3ad1a488-17d7-48cf-bba1-de65dcd5dc08"
}
The "id" on the last line is the actual document name, IoT Suite creates this as a GUID so that every file is unique, even if device names are the same.
## Azure Event Hubs
Name: **ThisIsDemo-servicebus
**
Type = Messaging
Two Event Hubs are created beneath the IoT Hub, for splitting the device data into separate streams for active monitoring applications and acting on events. These "sub-hubs" take filtered sub-sets of data, without commands or rules.
This data streams are therefore cleaned up of unrelated data and the multi-traffic complexities of the two-way IoT Hub. This filted data tree structure also means IoT Hub itself is not overloaded with too many clients (listeners).
This solution also means it [critically] remains fast and responsive to the deluge of data. Nothing is lost, ignored, or unresponsive. Queues don't overflow.
Responsiveness is critical on the device/gateway side too, so it isn't locked up on a slow event hub call and missing a change or trigger on it's side.
### Events Hub
Name = **ThisIsDemo-ehout
**
This is the hub which monitoring applications connect to, for a live data feed. It is a sub-set of the messages from IoT Hub. Only messages that relate specifically to device data. It is populated from the
**[ThisIsDemo-DeviceInfo](#Name_ThisIsDemo-DeviceInfo)** Streaming Analytics job.
### Rule Alerts Hub
Name = **ThisIsDemo-ehruleout
**
This hub is where device data is copied to, from Streaming Analytics job **[ThisIsDemo-Rules](#Name_ThisIsDemo-Rules)** if it breaks any of the rules, which are defined in the
**[devicerules](#blob-devicerules)** blob. This provides a tidied and isolated data set, for a scalable number of clients (like web users) to connect to.
## Storage
Name: **thisisdemo
**
This is where history data and system configuration files are kept. This shows just one way you can configure your IoT solution. You could for example use SQL for provisioning, or stream your data into Table Storage, which is quick and cheap and has just
enough indexing (Partition Key and "compound" RowKey) to analyze for reporting tools.
In this default IoT Suite configuration, Microsoft use Blob Storage, with date-split directories and files defined in the Streaming Analytics "path/pattern" field.
### Table Storage
Name = **DeviceList**
This table holds a list of which devices are to be **simulated devices**.
It holds the basic information the back end simulator needs to act on behalf of the device.
Columns:
- PartitionKey – Device name
- RowKey - ThisIsDemo.azure-devices.net
- Timestamp – When the device data was created
- Properties
- "Key" - Unique key for the device to authenticate
Name = **DeviceRulesNormalizedTable**
Columns:
- Partition Key – Device name
- Row Key – A GUID
- Properties
- "DataField" = "Temperature"
- "Enabled" = true
- "RuleOutput" = "AlarmTemp"
- "Threshold" = 38
### Blob Storage
#### Container: **actionmappings
**
- Defines the rule to action mappings in **Mappings.json**
> [![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/8507.CaptureBlobActionMappings.PNG)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/8507.CaptureBlobActionMappings.PNG)
Below is the content:
[{"RuleOutput":"AlarmTemp","ActionId":"Send Message"},{"RuleOutput":"AlarmHumidity","ActionId":"Raise Alarm"}]
#### Container: **devicerules
**
- Directory [date] separated files
- Contains json of any device data that breaks the rules
> [![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/7077.CaptureBlobDeviceRules.PNG)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/7077.CaptureBlobDeviceRules.PNG)
Below is an example of the content:
[{"DeviceId":"SampleDevice001_278","Temperature":38.0,"Humidity":48.0,"TemperatureRuleOutput":"AlarmTemp","HumidityRuleOutput":"AlarmHumidity"},{"DeviceId":"SampleDevice001_510","Temperature":38.0,"Humidity":48.0,"TemperatureRuleOutput":"AlarmTemp","HumidityRuleOutput":"AlarmHumidity"}]
Note, the value shown above is the limit that breaks the rule.
#### Container: **devicetelemetry**
- **devicetelemetry-summary**
- Directory [date] separated files
- Contains the avg/min/max aggregated data as csv from streaming analytics
Below is an example of the first three rows
deviceid,averagehumidity,minimumhumidity,maxhumidity,timeframeminutes
SampleDevice002_510,30.806544133199651,20.0014513949869,49.867387465139473,5
SampleDevice002_510,30.662442867577607,20.0014513949869,49.867387465139473,5
- **devicetelemetry**
- Directory [date] separated files
- Contains the raw data in csv format from streaming analytics
Below is an example of the first three rows
DeviceId,Temperature,Humidity,ExternalTemperature,EventProcessedUtcTime,PartitionId,EventEnqueuedUtcTime
SampleDevice002_510,33.544336569190349,25.443365691901725,,2015-10-03T18:00:15.4907064Z,3,2015-10-03T16:58:13.8540000Z
SampleDevice001_278,33.955065882557506,29.550658825575642,,2015-10-03T18:00:05.7871002Z,0,2015-10-03T16:58:14.4620000Z
#### Container: **thisisdemo-ehout
**
- This container contains the config file that Event Hub thisisdemo-ehout uses to configure itself and folders for each consumer (only the default initially), containing status files for each partition (4 by default).
- You must not change files in this container. The content is created and changed by Event Hub as each partition is being processed.
#### Container: **rulesoutput
**
- Directory [date] separated files
- Contains the avg/min/max aggregated data as csv from streaming analytics
Below is an example of the first three rows:
deviceid,tempreading,tempthreshold,humidityreading,humiditythreshold,temperatureruleoutput,humidityruleoutput,time
SampleDevice001_510,35.849473366071265,38,48.494733660712456,48,AlarmTemp,AlarmHumidity,2015-11-01T00:00:07.7290000Z
SampleDevice001_278,35.849473366071265,38,48.494733660712456,48,AlarmTemp,AlarmHumidity,2015-11-01T00:00:13.5030000Z
## Stream Analytics
IoT Suite creates three SA jobs that take the data from IoT Hub into three streams of data:
1. **Device Telemetry** – Raw and normalized data stored straight into blob storage
2. **Device Info** – For monitoring clients like the Web App
3. **Device Rules** – Any data that breaks the rules you define in the rules blob file
### #1 Name: **ThisIsDemo-Telemetry
**
The input source is your IoT Hub.
This is a two way hub, so first only device ingress data is filtered, using a "WITH" statement to create a subset of traffic in a temporary table.
It then does two things with the remaining data:
1. Everything is passed straight into the history storage as raw data (output 1)
2. A sliding Window is used to aggregate the average, minimum and maximum values into five minute chunks. This provides a smaller normalized set of values, pre-crunched for quicker analysis. (output 2)
**Input = IoT Hub - "****IoTHubStream"**
Event hub name = **[ThisIsDemo](#iot-hub)**
Event hub policy name = iothubowner
Event hub consumer group = empty (default)
Event serialization format = JSON
Encoding = UTF-8
WITH
[StreamData]
AS (
SELECT
*
FROM
[IoTHubStream]
WHERE
[ObjectType] IS
NULL -- Filter out device info and command responses
)
SELECT
*
INTO
[Telemetry]
FROM
[StreamData]
SELECT
DeviceId,
AVG (Humidity)
AS [AverageHumidity],
MIN(Humidity)
AS [MinimumHumidity],
MAX(Humidity)
AS [MaxHumidity],
5.0 AS TimeframeMinutes
INTO
[TelemetrySummary]
FROM
[StreamData]
WHERE
[Humidity] IS
NOT NULL
GROUP
BY
DeviceId,
SlidingWindow (mi, 5)
**Output 1** : "**Telemetry**" :
Storage Account = **thisisdemo**
Container = **[DeviceTelemetry](#blob-devicetelemetry)**
Path/pattern = [**devicetelemetry/{date}/{time}**](#blob-devicetelemetry)
Date Format = YYYY/MM/DD
Time Format = HH
Serialization = CSV, Delimiter = comma, Encoding = UTF-8
**Output 2** : "**TelemetrySummary**"
Storage Account = **thisisdemo**
Container = **[DeviceTelemetry](#blob-devicetelemetry)**
Path/pattern = [**devicetelemetry-summary/{date}/{time}**](#blob-devicetelemetry-summary)
Date Format = YYYY/MM/DD
Time Format = HH
Serialization = CSV, Delimiter = comma, Encoding = UTF-8
### #2 Name: ThisIsDemo-DeviceInfo
The input source is your IoT Hub.
The query simply passes everything that is only device data into a "sub-hub", for other clients like the Web App to consume and monitor.
**Input = IoT Hub - "DeviceDataStream"**
Event hub name = [**ThisIsDemo**](#iot-hub)
Event hub policy name = iothubowner
Event hub consumer group = empty (default)
Event serialization format = JSON
Encoding = UTF-8
SELECT *
FROM DeviceDataStream Partition
By PartitionId WHERE ObjectType =
'DeviceInfo'
**Output** – Event Hub : **DeviceInfoEvents**
Event hub name = **[ThisIsDemo-ehout](#hub-ThisIsDemo-ehout)**
Event hub policy name = RootManageSharedAccessKey
Partition key column = PartitionId
Event serialization format = JSON
Encoding = UTF-8
Format = Array
### #3 Name: ThisIsDemo-Rules
The input source is your IoT Hub.
This query takes any device data that breaks any of the rules defined in the devicerules blob.
Two outputs save the data into blob storage for historical analysis, and the rules Event Hub ThisIsDemo-ehruleout for other clients to listen and act upon.
Stream Analytics supports for refreshing reference data using date/time on the blob file name,
[**described here**](https://azure.microsoft.com/en-us/documentation/articles/stream-analytics-use-reference-data/). Each time the rules are changed, we save a new blob with a near-future time stamp so the stream job picks it up dynamically.
**Input Reference data – blob storage – "DeviceRulesBlob"**
Storage Account = **thisisdemo**
Container = **[devicerules](#blob-devicerules)**
Path/pattern = {date}/{time}/devicerules.json
Date Format = YYYY/MM/DD
Serialization = JSON, Encodeing = UTF-8
**Input = IoT Hub - "****IotTelemetryStream"**
Event hub name = [**ThisIsDemo**](#iot-hub)
Event hub policy name = iothubowner
Event hub consumer group = empty (default)
Event serialization format = JSON
Encoding = UTF-8
WITH AlarmsData
AS
(
SELECT
Stream.DeviceID, Stream.Temperature
as TempReading,
Ref.Temperature as TempThreshold,
Stream.Humidity
as HumidityReading,
Ref.Humidity as HumidityThreshold,
Ref.TemperatureRuleOutput,
Ref.HumidityRuleOutput,
Stream.EventEnqueuedUtcTime
AS [Time]
FROM IoTTelemetryStream Stream
JOIN DeviceRulesBlob Ref
ON Stream.DeviceID = Ref.DeviceID
WHERE
(
Ref.Humidity
IS NOT null
AND
Stream.Humidity > Ref.Humidity) OR
(Ref.Temperature
IS NOT null
AND Stream.Temperature > Ref.Temperature)
)
SELECT *
INTO DeviceRulesMonitoring
FROM AlarmsData
SELECT *
INTO DeviceRulesHub
FROM AlarmsData
**Output 1 – Event Hub - "DeviceRulesHub"**
Event hub name = **[ThisIsDemo-ehruleout](#hub-ThisIsDemo-ehruleout)**
Event hub policy name = RootManageSharedAccessKey
Partition key column = PartitionId
Event serialization format = JSON
Encoding = UTF-8
Format = Array
**Output 2 – Blob Storage - DeviceRulesMonitoring**
Storage Account = **thisisdemo**
Container = **[rulesoutput](#blob-rulesoutput)**
path/pattern = {date}/{time}
Date Format = YYYY/MM/DD
Time Format = HH
Serialization = CSV, Delimiter = comma, Encoding = UTF-8
## App Service Plan
Name: **ThisIsDemo-plan
**
Pricing Tier : Standard - 2 small
Apps & Slots – 1
Lots of useful stats, snapshots, overviews and usage limits
## Web App
Name: **ThisIsDemo**
This is the default web app Microsoft provide to monitor your device data.
App Service plan/pricing tier - [**ThisIsDemo-plan**](#ThisIsDemo-plan) (Standard: 2 Small)
> [![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/4578.CaptureIoTWeb.PNG)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/4578.CaptureIoTWeb.PNG)
## Bing Maps Service
Name: **ThisIsDemo-map**
Provider = Microsoft.BingMaps
Offer = mapAPIs
Plan = internal1 (FREE)
This service is added to your IoT Solution by IoT Suite to show how well Bing Maps works for such a scenario. You can of course cancel this and replace with whatever you need, like a building floor plan view. However, Bing Maps does provide a lot for free,
potentially enough for an internal company system.
"Use up to 10,000 free internal website cumulative transactions of any type, including sessions within any one month period. If you run out, you can upgrade to a paid plan with an increased quota."
"Use up to 500,000 billable internal website cumulative transactions of any type, including sessions within any one month period. Need more than 500,000 transactions per month? Email<EMAIL_ADDRESS>for assistance in determining the Bing Maps service
and licensing program that’s best for your business."
↑ [Back to top](#Top)
* * *
# Deleting Everything IoT Suite Created
When you want to delete the complete solution, and everything that was created by IoT Suite initially and during the example, you simply have to click the delete solution button, as shown below.
[![ ](http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/3324.CaptureDeleteSolution.PNG)](http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/3324.CaptureDeleteSolution.PNG)
Everything that was created for that specific solution, which is everything in the Resource Group and the AAD service that was created for it is deleted.
You can also delete the Resource Group in Azure Portal, but this will not remove the AAD, as explained
[
here](https://azure.microsoft.com/en-us/documentation/articles/iot-suite-faq/).
↑ [Back to top](#Top)
* * *
# See Also
- [IoT Suite - Remote Monitoring -
**Adding Live and Simulated Devices**](http://social.technet.microsoft.com/wiki/contents/articles/32975.iot-suite-remote-monitoring-adding-live-and-simulated-devices.aspx)
- [What is Azure IoT Hub?](https://azure.microsoft.com/en-gb/documentation/articles/iot-hub-what-is-iot-hub/)
- [Azure IoT Suite](https://www.microsoft.com/en-gb/server-cloud/internet-of-things/azure-iot-suite.aspx)
- [Remote monitoring preconfigured solution walkthrough](https://azure.microsoft.com/en-us/documentation/articles/iot-suite-remote-monitoring-sample-walkthrough/)
Another important place to find an extensive amount of Cortana Intelligence Suite related articles is the TechNet Wiki itself. The best entry point is
[
Cortana Intelligence Suite Resources on the TechNet Wiki](https://social.technet.microsoft.com/wiki/contents/articles/36665.cortana-intelligence-suite-resources-on-the-technet-wiki.aspx).


Pimco Says a ‘Comprehensive’ U.S.-China Deal Is Still Far Off
by Sydney Maki(Bloomberg) -- Pacific Investment Management Co.’s Nicola Mai isn’t holding his breath for U.S. and Chinese officials to resolve their differences and pass a sweeping trade agreement.
While he expects a limited deal that stops a further escalation of trade tension, a more substantial truce doesn’t yet seem to be in the cards, Mai, a London-based sovereign credit analyst and portfolio manager, told Bloomberg TV on Thursday.
“To find a more comprehensive deal, you need to deal with more significant issues like technology transfer and intellectual property,” he said. “It looks like we’re still far from that.”
Trade woes are weighing on China’s already sluggish growth, which makes a deal in the nation’s best interest, according to Mai. Structural factors such as de-leveraging and a change of its economic model also put growth under pressure and may encourage the government to approach a pact with the U.S., he said.
In the U.S., meantime, data may also signal a weaker economy as the year’s end approaches, meaning the Federal Reserve may actually have further room to reduce rates, he said.
--With assistance from Tom Keene and Francine Lacqua.
To contact the reporter on this story: Sydney Maki in New York at<EMAIL_ADDRESS>To contact the editors responsible for this story: Carolina Wilson at<EMAIL_ADDRESS>Alec D.B. McCabe
For more articles like this, please visit us at bloomberg.com
©2019 Bloomberg L.P.


Top of the market data collection and analysis equipment
is put to use for the most accurate readings and meteorology data
Easy to donate, every dollar makes a difference!
Latest news and updates from danger zones
across the globe!
Easily understand the dangers in your area,
and receive notifications on recommended actions to take.
Want to contact us? Ask us your questions, or confirm documentation. We are all ears for ideas and the rest, so give us a call!
555-374-753
Earthquakes are patterns of seismic activity beneath the earths crust resulting in tremors,
and faults/cracks along the earths surface, displacing portions of land resulting in deaths and collateral damage
earthquakes are in the top 6 most donated to because they happen all the time, even if you don't hear about them because they're too small,
or in a country where media is restricted in certain areas
Bushfires are common in Australia, and can destroy up to 150 properties at a time, such as in the recent yarloop fires.
they can be sparked by arsonists in the hot dry summer months of Australia, or natural elements such as lightning.
bushfire recovery and victim rehab is donated to alot because of the growing economy of Australia, and because bushfires are common
equipment to extinguish fires or other services to rehabilitate post-fire are becoming cheaper.
famine is a shortage or clearence of all food in a certain area, they are usually caused by climate patterns preventing the successful growth
of food. they are common in African countries because of the extremely hot climate.
they are common to donate to as many charities make television advertisements for children in africa suffering from famine.
Floods are natural disasters in which water overflows from a body of water due to monsoonal rains or other elements. floods can also be caused by dam overflow
or collapse from poor architectural design. although floods are rather slow to become set in motion, once they reach their full effect,
many fatalities are common. floods are a popular choice of donation because Australia and the USA have many flodods between them, and because both of these countries
are relatively wealthy, they have the resources to prevent floods, and rehabilitate flood victims
Epidemics are widespread diseases that are commonly fatal. countries that do not have good health and sanitation services are likely to be hit py epidemics.
people commonly donate to epidemics because of the attention they have gotten after the Ebola outbreak of 2015 had people worried for their own safety,
convincing people to donate to cure research and sanitation services
Cyclones are caused by winds moving in opposite directions next to each other, which an air vortex that doubles the strength of the two winds, these cyclones
can pick up storm clouds, furthering their intensity. It is common for US citizens to donate to cyclone victims, since around 15% of them have been
effected by them before.


In response to Lawrence Crowl proposal C++
Binary Fixed-Point Arithmetic N3352, see a thread on the Boost
discussion list http://lists.boost.org/Archives/boost/2012/04/191987.php
on the Boost archives.
Vicente Botet Escriba produced a prototype at http://svn.boost.org/svn/boost/sandbox/fixed_point
asked a number of questions, and replies from the current author Christopher
Kormanyos (that provided the basis for the implementation here) were:
First up, one might want to consider some top-level requirements.
-
How might fixed-point fit with an extended complex class? - If Boost.Multiprecision
or a multiprecision type is ever specified, how might fixed-point fit with
it. - If a multiprecision integer type ever gets specified, should the
representation of fixed-point be allowed to use it for mantissa and decimal
parts?
-
Should integers and reals be represented by separated classes? I don't
see the need for integers in the first place. I'm wondering if the library
will be simpler as the operations are not the same. If we have only one
class, enable_if should be used to make the difference.
-
Should signed and unsigned be represented by separated classes? Yes, in
my opinion. I guess, perhaps, the separate sign information might be a
necessity. But I'm not sure. I think that when a single word is enough
to represent the fixed-point 2's complement is the bets choice. When more
than a word is needed, having the sing on all the word is a lost of space,
and as you say whether it is represented represented by left-most word/limb
or as a separated data should be an internal decision. In this case using
more space seems IMO to be a minor issue.
-
Should the library use a specific representation for signed numbers (separated
sign, 2-complement? Let the user choose?) Very good question. A separate
bool flag for sign slows down the library and increases storage requirements.
The sign of the left-most limb could be the sign. But this breaks down
for all-fractional types. I guess, perhaps, the separate sign information
might be a necessity. But I'm not sure.
-
Should the library provide arbitrary range and resolution and allocators?
Unfortunately, the allocator seems necessary for high digit counts. But
perhaps a hybrid container with compile-time width for low limb-count and
allocation for a (specifiable, zero allowed) higher limb count could be
used here. But be sure to make fixed-point fast for low digit counts, possibly
using template specialization when the fixed-point can be represented by
a built-in integer type (in assiciation with "get my int type"
compile-time helper templates). This is what I have done in the past. Low
digit counts is the key range for fixed.
-
Should the library be open to overflow and rounding or just implement some
of the possible policies? and in this case which ones? Where do you start,
where do you stop? This is like the sign bit. Do you want extra information
for the sub-normals or use some magic values?
-
Should fixed_point be convertible to/from integer/float/double? Yes, absolutely,
in my opinion. Implicit or explicit conversion?
-
Could the result of an arithmetic operation have more range and resolution
than his arguments? No. But copy construction and copy assign maybe, whereby
the LHS dictates the digit count.
-
Is there a need for a specific fixed_point I/O?
-
Is there a need for a specific I/O? Yes.
-
is there a need for radix other than 2 (binary)? Coming from a guy who
has written a lot of specialized number
classes... I have always been haunted by radix-10. Never again for me.
Radix-2 and don't look back (my opinion). I prefer also to concentrate
on Radix-2 and leave Radix-10 for another library.
-
Should the library implement the basic functions, or should it imperatively
implement the C++11 math functions? Could a first version just forward
to the c++11 math functions? It should fit in with Boost.Multiprecision,
if there ever is such a thing. Users like me who need a tiny set of trig
functions for, say, an 8-bit controller can roll-their-own via template
specialization. Don't even get started with Cordic, Chebyshev, polynomial
expansion, Don't even get started with cordic, Chebyshev, polynomial expansion,
Pade, Taylor, Newton-Raphson, FFT multiplication, AGM, etc., etc., etc.
and the rest. Just make the numbers! We will be happy for that because
it's really a lot. C++ should have the templated math functions and an
extended complex type elsewhere. You just need to make the number types.
-
Should the library support just one of the know ways to name a fixed-point,
a U(a,b), nQm, ...? Provide some ways to move from one to another?
-
Could expect the same/better performances respect to hand written code?
It's implementation-dependent. But if your 7.8 and 15.16 signed splits
are slower than single-precision float on an 8-bit core, you will get flack
for it.
-
What should be the size used by a fixed_point instance? _fast? _least?
Should the user be able to decide which approach is better for his needs?
It's implementation defined. For small digit counts, I would try to fit
it in a built-in type. For medium digit counts, a fixed, optionally fixed-hybrid
container of
std::uint_fast32_t
. For very high counts,
use an established fast integer representation with its own fast-multiply
(like a potential Boost.Multiprecision).
-
Which should be the namespace? boost? boost/fixed_point? boost/binary_fixed_point?
boost/bfp? For me, boost/fixed_point.
Phil Endecott observed on overflow:
"Some people conflate fixed point with features like saturation, which
I would prefer to decouple. Fixed-point arithmetic without saturation is useful,
as is integer arithmetic with saturation. So I'd prefer to make them orthogonal,
but compatible, concepts. "
Crowl's paper uses Crng
and
Crsl
(Crnd
and Covf
) but some believe
that Range
and Resolution
(Round
and Overflow
) are much more
reader-friendly and have been adopted.
Crowl's paper also uses negative values for Resolution
.
At present the sign of the resolution is required to be negative. Many do not
find this intuitive, or helpful. The rationale for this seems unconvincing.
Should it be positive?
Is it right that we don't get any more resolution for the unsigned version
nonnegative
even though we
are not using a bit for sign?
This is a tough design choice. It's a bit tricky for the following reason.
The negatable
class performs
all operations internally with unsigned
representations, keeping track of the sign of the result independently. This
allows us to utilize the sign bit for one additional left shift slot, thereby
providing one extra digit for rounding.
The nonnegative
class can and
does use the full width of its underlying unsigned data representation. Internal
operations, however, still require one extra bit for rounding. For this reason,
the key nonnegative examples use types such as nonnegative<15,
-16>
.
The type nonnegative<16, 16>
will fill the underlying 32-bit data field
entirely, but will require 65 bits for multiply, divide, etc. So as it turns
out using 31 bits provides for better optimization.
This could of course be solved better if a there was a more clever mul
and div
instead of the current lazy way. This might be improved later.


|
yLib
V0.0.9 beta
|
This is log-class based on log4cpp in yLib. More...
#include <ylog.hpp>
Public Member Functions | |
| yLog (yLog &log)=delete | |
| Copy constructor. More... | |
| yLog & | operator= (yLog &log)=delete |
| Assignment constructor. More... | |
| yLog (yLog &&log)=delete | |
| Move constructor. More... | |
| yLog && | operator= (yLog &&log)=delete |
| Assignment constructor. More... | |
| Public Member Functions inherited from yLib::yObject | |
| yObject () | |
| Default constructor. More... | |
| yObject (std::string object_name_) | |
| Override constructor. More... | |
| yObject (const yObject &object_)=delete | |
| Copy constructor. More... | |
| yObject & | operator= (const yObject &object_)=delete |
| Assignment constructor. More... | |
| yObject (const yObject &&object_)=delete | |
| Move constructor. More... | |
| yObject & | operator= (const yObject &&object_)=delete |
| Assignment constructor. More... | |
| ~yObject () | |
| Default destructor. More... | |
Static Public Member Functions | |
| static void | SetLog4cpp (bool enable_log4cpp=false, std::string log_path="log4cplus.properties") |
| Enable or disable log4cpp. More... | |
| static void | SetLog4cppSubCategory (std::string category_name) |
| Create a sub-category for log4cpp. More... | |
| static void | SetProcessSafetyFeature (bool enable_feature) |
| If you want to enable this feature,system must define _POSIX_SHARED_MEMORY_OBJECTS(getconf -a) More... | |
| static void | SetLog4cppLogLevel (uint16_t log_level) |
| set the log4cpp level More... | |
| static void | SetLog4cppLogLevel (std::string &category_name, uint16_t log_level) |
| set the log4cpp level(parity: debug < info < warn < error) More... | |
| static void | SetyLogLogLevel (uint16_t log_level) |
| set the ylog level More... | |
| static void | SetyLogLogLevel (std::string &category_name, uint16_t log_level) |
| set the ylog level(parity: debug < info < warn < error) More... | |
| static void | D (const std::string fmt,...) |
| the debug log More... | |
| static void | W (const std::string fmt,...) |
| the warn log More... | |
| static void | I (const std::string fmt,...) |
| the info log More... | |
| static void | E (const std::string fmt,...) |
| the error log More... | |
| static void | D (std::string &category_name, const std::string fmt,...) |
| the debug log More... | |
| static void | W (std::string &category_name, const std::string fmt,...) |
| the warn log More... | |
| static void | I (std::string &category_name, const std::string fmt,...) |
| the info log More... | |
| static void | E (std::string &category_name, const std::string fmt,...) |
| the error log More... | |
| static void | D (const char *fmt,...) |
| static void | W (const char *fmt,...) |
| static void | I (const char *fmt,...) |
| static void | E (const char *fmt,...) |
| static void | D (std::string &category_name, const char *fmt,...) |
| the debug log More... | |
| static void | W (std::string &category_name, const char *fmt,...) |
| the warn log More... | |
| static void | I (std::string &category_name, const char *fmt,...) |
| the info log More... | |
| static void | E (std::string &category_name, const char *fmt,...) |
| the error log More... | |
Protected Member Functions | |
| yLog () noexcept | |
| Default constructor. More... | |
| ~yLog () noexcept | |
Static Private Member Functions | |
| static void | _ylog_log_impl (uint16_t log_type, const char *fmt, va_list arg_list) |
| the basic-implement of D I W E More... | |
| static void | _ylog_log_impl (uint16_t log_type, const char *fmt, va_list arg_list, std::string &category_name) |
| the basic-implement of D I W E More... | |
Static Private Attributes | |
| static char | _c_ptr_msg_buf [4096] |
| property More... | |
| static log4cpp::Category * | _ptr_log4_category_root = nullptr |
| the handle of log4cpp::Category More... | |
| static TypeSubCategoryMap | _log4cpp_sub_category_map |
| the sub-category map More... | |
| static bool | _b_enable_log4cpp = false |
| if enable log4cpp More... | |
| static bool | _b_enable_feature_ps = false |
| if enable process-safety. More... | |
| static uint16_t | _c_log4cpp_log_level = yLib::yLogLevel::_ENABLE_ALL_LOG_LEVEL_ |
| current log4cpp log-level. More... | |
| static uint16_t | _c_ylog_log_level = yLib::yLogLevel::_ENABLE_ALL_LOG_LEVEL_ |
| current ylog log-level. More... | |
Additional Inherited Members | |
| Public Attributes inherited from yLib::yObject | |
| std::string | object_name |
| The object-name. More... | |
This is log-class based on log4cpp in yLib.
|
delete |
Copy constructor.
| log | exsited obj. |
|
delete |
Move constructor.
| log | exsited obj. |
|
protectednoexcept |
Default constructor.
|
protectednoexcept |
|
staticprivate |
the basic-implement of D I W E
| log_type | the sub-category name. |
| fmt | the format of info-string. |
| arg_list | the input arg-lists |
|
staticprivate |
the basic-implement of D I W E
| log_type | the sub-category name. |
| fmt | the format of info-string. |
| arg_list | the input arg-lists |
| category_name | the sub-category name |
|
static |
|
static |
the debug log
| fmt | the format of info-string. |
|
static |
the debug log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
|
static |
the debug log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
| fmt | the format of info-string. |
|
static |
|
static |
the error log
| fmt | the format of info-string. |
|
static |
the error log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
|
static |
the error log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
| fmt | the format of info-string. |
|
static |
|
static |
the info log
| fmt | the format of info-string. |
|
static |
the info log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
|
static |
the info log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
| fmt | the format of info-string. |
Assignment constructor.
| log | exsited obj. |
Assignment constructor.
| log | exsited obj. |
|
static |
Enable or disable log4cpp.
| enable_log4cpp | if enable log4cpp |
| log_path | log4cpp's cfg-file |
| throw | a anonymous exception if the log4cpp's cfg-file is invalid. |
|
static |
set the log4cpp level(parity: debug < info < warn < error)
| category_name | the sub-category name |
| log_level | enable log-level. |
|
static |
set the log4cpp level
| log_level | enable log-level. |
|
static |
Create a sub-category for log4cpp.
| category_name | the sub-category name |
|
static |
If you want to enable this feature,system must define _POSIX_SHARED_MEMORY_OBJECTS(getconf -a)
| enable_feature | enable or disable thread-satety. |
|
static |
set the ylog level(parity: debug < info < warn < error)
| category_name | the sub-category name |
| log_level | enable log-level. |
|
static |
set the ylog level
| log_level | enable log-level. |
|
static |
|
static |
the warn log
| fmt | the format of info-string. |
|
static |
the warn log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
|
static |
the warn log
| category_name | the sub-category name. |
| fmt | the format of info-string. |
| fmt | the format of info-string. |
|
staticprivate |
if enable process-safety.
|
staticprivate |
if enable log4cpp
|
staticprivate |
current log4cpp log-level.
|
staticprivate |
property
the buffer of the log-string
|
staticprivate |
current ylog log-level.
|
staticprivate |
the sub-category map
|
staticprivate |
the handle of log4cpp::Category


Clear screen
Write Hello World!
Write Hello World! with buffer
Write Hello World! with buffer (more complex)
Write Hello World! (escape string)


This section provides the steps required to assign a static IP address and host name to the probe.
Prerequisites
Procedure
From this prompt, use the netparam command to review the current network settings. The following example shows a DHCP (default) output:
core> netparam
ethernet_address = 00:04:9F:00:FF:65
bootconfig = dhcp:FSL00FF65 (<IP_ADDRESS>)
static_ip_address = <none>
static_dns_server = <none>
static_hosts = <none>
static_routes = <none>
H:\>ping <IP_ADDRESS>
Pinging <IP_ADDRESS> with 32 bytes of data:
Reply from <IP_ADDRESS>: Destination host unreachable.
Use the ipconfig command to display the information on a Windows machine that is on the same physical subnet as the probe you are configuring. The ipconfig command enumerates the network adapters on your system. You must determine which adapter information is for the physical network to which your probe is connected.
  : Yes
Autoconfiguration Enabled . . . .    : Enabled
core> netparam static_ip_address <static ip>:<subnet mask>
core> netparam add_route default <gateway> 1
core> netparam static_dns_server <dns server ip>
core> netparam bootconfig static
| Caution | |
|
The netparam utility copies its settings into non-volatile memory on the probe. Follow these rules while using netparam utility: |
|
core> reset
Results
core> netparam
ethernet_address = 00:04:9F:00:FF:65
bootconfig = static:FSL00FF65
static_ip_address = <IP_ADDRESS>:<IP_ADDRESS>
static_dns_server = <IP_ADDRESS>
static_hosts = <none>
static_routes = destination gateway metric
--------------- --------------- ------
default <IP_ADDRESS> 1


Open up the DevTools console
Click 'Choose File/Browse' below and select a .json Timeline trace
(one is included in the demo directory)
Awwh yeah. The trace breakdown should be shown in console!


{% extends "skeleton/_body_md.html" %}
{%hyde
title: "Coding Guidelines"
navname: "Coding Guidelines"
created: 2011-03-24
listing: false
%}
{% block content_md %}
We know that different people like different styles, but we also know that the
consistency is very important and that is why we enforce strict coding style.
Some of the rules are automatically enforced by
[jslint](/developer-information/jslint/) and other are manually checked when
doing code reviews.
Cast styling guide is largely based on the [Google JavaScript styling
guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml),
with a few extra rules to keep common patterns consistent across all of cast.
You are also advised to read [Felix's Node.js Style Guide](http://nodeguide.com/style.html),
because it contains some good advices.
### Documentation
* Use [JSDoc annotations](http://code.google.com/closure/compiler/docs/js-for-compiler.html#tags)
### Asynchronous Code
* Don't use Node's *Sync synchronous calls.
* Use [async](https://github.com/caolan/async) to alleviate excessive nesting
for parallel or serial operations.
* Always name callback arguments `callback`
* Always name error arguments to a callback `err`
**Example:**
{% syntax javascript %}
function onComplete(instance, callback) {
var name;
// These actions will be performed in series, until the last action completes
// or callback is fired with an error
async.series([
// Action #1
function(callback) {
instance.getName(function(err, _name) {
name = _name;
callback(err);
});
},
// Action #2 - async.apply() can be used when the function takes a callback
// with a signature matching that of an async.series() callback. Be
// careful, because the call to async.apply is evaluated *before* the call
// to async.series()
async.apply(registerInstance, instance)
],
// This handler will be called after the series completes or errors out
function(err) {
if (!err) {
log.info("Instance Registered: " + name);
}
callback(err);
});
}
{% endsyntax %}
### Naming Conventions
JSON files and our HTTP API use lower case names with words separated by
underscores in the style commonly used in C or Python. However for all other
names we stick to the camelCase convention more widely used in Javascript. To
keep this straight we have developed the following rules:
* Attribute names that will be written to files or network streams (for example
as JSON to a file or HTTP request, HTTP POST parameters, etc) should always use
underscore separated names `like_this` and should always appear in single
quotes in the code. This means quoting names when defining an object literal,
and using index notation (that is, `foo['bar']`) when accessing or assigning
attributes. See the example below.
* For everything else, stick to Google's [naming
rules](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml?showone=Naming#Naming)
for all variable names, **except** when object attribute names are used outside
of cast
* Use dot notation when accessing object attributes, unless the attribute names
must be in quotes in accordance with the rules above.
**Note:** A good way to think about this is that we should be able to use an
automated tool to change a name everywhere it appears outside of quotes in
cast. So if changing the name you are about to use would break existing network
protocols or on-disk formats, put it in quotes. Otherwise don't.
**Good:**
{% syntax javascript %}
// This will go in an HTTP POST, so we used single quoted underscored_names
var body = querystring.stringify({
'bundle_name': bundleName,
'bundle_version': bundleVersion
});
request.end(body);
// This is just a normal object, so we stick to Google's naming conventions
var curInstance = new Instance('bar');
curInstance.getBundleVersion(callback);
// This is a constant, so we use Google's naming conventions here as well
var DEFAULT_SECRET = 'password';
// This will be written to a JSON file so attribute names must appear in single
// quotes and be underscore_separated
var config = {
'secret': DEFAULT_SECRET,
'ssl_enabled': true
};
if (config['secret'] && config['ssl_enabled']) {
...
}
{% endsyntax %}
**Bad:**
{% syntax javascript %}
// The 'secret' attribute should appear in single quotes, but does not
var config = {
secret: 'password',
'ssl_enabled': true
}
// These should use index notation so the attributes can be in quotes
if (config.secret && config.ssl_enabled) {
...
}
{% endsyntax %}
### Import (require) conventions
When importing (requiring) a module, always do it in the following order:
1. System modules (sys, util, path, child_process, net, http, ...)
2. External modules and dependencies (async, sprintf, ...)
3. Cast modules (util/misc, lib/deployment/instances, ..)
Each group must be separated by a blank line.
**Example:**
{% syntax javascript %}
var sys = require('sys');
var path = require('path');
var async = require('async');
var sprintf = require('sprintf').sprintf;
var config = require('util/config');
var misc = require('util/misc');
{% endsyntax %}
### Export conventions
Always export constants, variables, functions and class definitions at the end of
the file.
This allows you to logically group related exports together and quickly find out
which values are exported just by jumping to the end of the file.
**Example:**
{% syntax javascript %}
var DEFAULT_RUN_INTERVAL = 5000;
var DEFAULT_TIMEOUT = 30000;
function HealthCheck(name, interval) {
...
}
function TCPCheck(name, interval) {
HealthCheck.call(this);
}
uitl.inherits(TCPCheck, HealthCheck);
function printCheckList() {
...
}
... more definitions ...
exports.DEFAULT_RUN_INTERVAL = DEFAULT_RUN_INTERVAL;
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
exports.HealthCheck = HealthCheck;
exports.TCPCheck = TCPCheck;
exports.printCheckList = printCheckList;
{% endsyntax %}
### Miscellaneous
* Always put return statement on their own line, unless an actual value is
being returned.
**Good:**
{% syntax javascript %}
function onResult(err, result) {
if (err) {
console.log('Error happened!');
return;
}
}
{% endsyntax %}
**Bad:**
{% syntax javascript %}
function onResult(err, result) {
if (err) {
return console.log('Error happened!');
}
}
{% endsyntax %}
* Always declare functions directly. Declaring an anonymous function and
assigning it to a variable makes debugging and reading stack traces harder.
**Good:**
{% syntax javascript %}
function onResult(err, result) {
if (err) {
console.log('Error happened!');
return;
}
}
{% endsyntax %}
**Bad:**
{% syntax javascript %}
var onResult = function(err, result) {
if (err) {
return console.log('Error happened!');
}
}
{% endsyntax %}
* If you want to re-define a variable which is passed to a function, add an
underscore to the end of the variable name.
**Example:**
{% syntax javascript %}
function runCheck(interval) {
var interval_ = interval || DEFAULT_RUN_INTERVAL;
// .. do something with interval_
};
{% endsyntax %}
* Don't manually concatenate strings and variables together to construct a new
string, use a sprintf function.
**Good:**
{% syntax javascript %}
var someString = 'Hello ' + name + '. Today is a ' + weather + 'day.';
{% endsyntax %}
**Bad:**
{% syntax javascript %}
var someString = sprintf('Hello %s. Today is a %s day.', name, weather);
{% endsyntax %}
{% endblock %}


This application uses the Django framework to demonstrate the use of OAuth to authenticate to the Evernote web service. OAuth support is implemented using the oauth2.
On this page, we demonstrate how OAuth authentication might work in the real world.
To see a step-by-step demonstration of how OAuth works, see EDAMTest.py
.
Click here to start over


| Product | Quantity | Price | Total | |
|---|---|---|---|---|
| £4.87 | £14.61 | |||
| £4.99 | £9.98 | |||
Subtotal |
£24.59 |
|||
Estimated shipping |
£6.94 |
|||
Total |
£31.53 |
|||
| Continue Shopping |


AP Top Political News at 3:45 a.m. EST
by EndPlayOusted ambassador to testify in Trump impeachment probe
For Obama and Patrick, a long friendship and political bond
Esper says S Korea wealthy enough to pay more for US troops
Partisan vote likely for Export-Import Bank measure
Diplomat built reputation as solid pro, but saw it sullied
Trump wants Supreme Court to block subpoena for his taxes
AP source: Second US official in Kyiv heard Trump call
Tactical edge will shift to GOP in Senate impeachment trial
Esper defends as fair Pentagon contract disputed by Amazon
Trump says impeachment probe has been ‘very hard' on family


Simple Request
Form Request
Enter the interval to calculate:
Click here to calculate the interval.
Dynamic AJAX Response


Paste in your text to find duplicates. You can paste in songs from Spotify, where they will appear as text.
Paste in a second list to compare.
When finished, you can press the "Copy" button to copy the list you want and paste it back somewhere, like Spotify.
List A
N/A
List with duplicates reduced
Duplicate items are reduced to just one entry.
List without duplicates and originals
All traces of the duplicate items are removed.
List of only duplicates
Only items that appeared more than once.
List B (Comparison)
N/A
List with only items from A
Items that are in A, but not B. Duplicates reduced.
List with only items from B
Items that are in B, but not A. Duplicates reduced.
List with common items from A and B.
Duplicates reduced.


In this notebook, we will use DBSCAN to cluster a couple of datasests. We will examine how changing its parameters (epsilon and min_samples) changes the resulting cluster structure.
import pandas as pd
dataset_1 = pd.read_csv('blobs.csv')[:80].values
This our first dataset. It looks like this:
%matplotlib inline
import dbscan_lab_helper as helper
helper.plot_dataset(dataset_1)
Let's cluster it using DBSCAN's default settings and see what happens. We are hoping for it to be able to assign each of the three "blobs" into its own cluster. Can it do that out of the box?
#TODO: Import sklearn's cluster module
from sklearn import cluster
#TODO: create an instance of DBSCAN
dbscan = cluster.DBSCAN()
#TODO: use DBSCAN's fit_predict to return clustering labels for dataset_1
clustering_labels_1 = dbscan.fit_predict(dataset_1)
# Plot clustering
helper.plot_clustered_dataset(dataset_1, clustering_labels_1)
Does that look okay? Was it able to group the dataset into the three clusters we were hoping for?
As you see, we will have to make some tweaks. Let's start by looking at Epsilon, the radius of each point's neighborhood. The default value in sklearn is 0.5.
# Plot clustering with neighborhoods
helper.plot_clustered_dataset(dataset_1, clustering_labels_1, neighborhood=True)
From the graph, we can see that an Epsilon value of 0.5 is too small for this dataset. We need to increase it so the points in a blob overlap each others' neighborhoods, but not to the degree where a single cluster would span two blobs.
Quiz: Change the value of Epsilon so that each blob is its own cluster (without any noise points). The graph shows the points in the datasets as well as the neighborhood of each point:
# TODO: increase the value of epsilon to allow DBSCAN to find three clusters in the dataset
epsilon=2
# Cluster
dbscan = cluster.DBSCAN(eps=epsilon)
clustering_labels_2 = dbscan.fit_predict(dataset_1)
# Plot
helper.plot_clustered_dataset(dataset_1, clustering_labels_2, neighborhood=True, epsilon=epsilon)
Were you able to do it? As you change the values, you can see that the points cluster into larger clusters and the number of noise points keeps on decreasing. Then at Epsilon values above 1.6 we get the clustering we're after. But once we increase it to above 5, we start to see two blobs joining together into one cluster. So the right Epsilon would be in the range between those values in this scenario.
Let's now look at a dataset that's a little more tricky
dataset_2 = pd.read_csv('varied.csv')[:300].values
# Plot
helper.plot_dataset(dataset_2, xlim=(-14, 5), ylim=(-12, 7))
What happens if we run DBSCAN with the default parameter values?
# Cluster with DBSCAN
# TODO: Create a new isntance of DBSCAN
dbscan = cluster.DBSCAN()
# TODO: use DBSCAN's fit_predict to return clustering labels for dataset_2
clustering_labels_3 = dbscan.fit_predict(dataset_2)
# Plot
helper.plot_clustered_dataset(dataset_2,
clustering_labels_3,
xlim=(-14, 5),
ylim=(-12, 7),
neighborhood=True,
epsilon=0.5)
This clustering could make sense in some scenarios, but it seems rather arbitrary. Looking at the dataset, we can imagine at least two scenarios for what we'd want to do:
What values for the DBSCAN parameters would allow us to satisfy each of those senarios? Try a number of parameters to see if you can find a clustering that makes more sense.
# TODO: Experiment with different values for eps and min_samples to find a suitable clustering for the dataset
eps=1.32
min_samples=50
# Cluster with DBSCAN
dbscan = cluster.DBSCAN(eps=eps, min_samples=min_samples)
clustering_labels_4 = dbscan.fit_predict(dataset_2)
# Plot
helper.plot_clustered_dataset(dataset_2,
clustering_labels_4,
xlim=(-14, 5),
ylim=(-12, 7),
neighborhood=True,
epsilon=0.5)
The following grid plots the DBSCAN clustering results of a range of parameter values. Epsilon varies horizontally, while vertically each row shows a different value of min_samples.
eps_values = [0.3, 0.5, 1, 1.3, 1.5]
min_samples_values = [2, 5, 10, 20, 80]
helper.plot_dbscan_grid(dataset_2, eps_values, min_samples_values)
Looking at this grid, we can guess at some general heuristics for tweaking the parameters of DBSCAN:
| Epsilon too low | Epsilon too high | |
|---|---|---|
| min_samples too low | Many small clusters. More than anticipated for the dataset. Action: increase min_samples and epsilon |
Most points belong to one cluster Action: decrease epsilon and increase min_samples |
| min_samples too high | Most/all data points are labeled as noise Action: increase epsilon and decrease min_sample |
Except for extremely dense regions, most/all data points are labeled as noise. (Or all points are labeled as noise). Action: decrease min_samples and epsilon. |