SChartCrosshairMultiValueTooltip Class Reference
| Inherits from | SChartCrosshairTooltip : UIView |
| Declared in | SChartCrosshairMultiValueTooltip.h |
| Availability | |
| Related samples |
Overview
A tooltip that can handle the display of multi-value data points.
To use a tooltip of this class type simply assign it to your chart’s crosshair like so:
chart.crosshair.tooltip = [[SChartCrosshairMultiValueTooltip new]autorelease]
;
A tooltip of this type handles the multi-values of a datapoint by building a dictionary of key-value strings to be displayed. For example, a crosshair (with a tooltip of this type) that is tracking an OHLC series will likely read from multi-value datapoints such that the following dictionary of strings is to be displayed { Open : value1, High : value2, Low : value3, Close: value4 }. This dictionary is constructed via the method keyValueDisplayPairsForDataPoint:onSeries:withXAxis:withYAxis:
(which can be overriden in a subclass if you wish to change the key-value pairs that the tooltip finally displays).
A tooltip of this type is made up from an array of labels (one label for each key or value) and a main label (inherited from SChartCrosshairTooltip) which will display any left over values that do not belong to the key-value pairs.
Tasks
Other Methods
-
labels
An array of labels that contains a label for each display key and each display value (as dictated by keyValueDisplayPairsForDataPoint:onSeries:withXAxis:withYAxis:).
property
Methods for Subclassing
-
– keyValueDisplayPairsForDataPoint:onSeries:withXAxis:withYAxis:
Returns a dictionary of key-value pairs that will be displayed in this tooltip.
-
– mainLabelStringForDataPoint:onSeries:withXAxis:withYAxis:
Returns the string that will be used as the main label on this tooltip.
Properties
labels
An array of labels that contains a label for each display key and each display value (as dictated by keyValueDisplayPairsForDataPoint:onSeries:withXAxis:withYAxis:).
@property (nonatomic, retain) NSMutableArray *labels
Declared In
SChartCrosshairMultiValueTooltip.h
Instance Methods
keyValueDisplayPairsForDataPoint:onSeries:withXAxis:withYAxis:
Returns a dictionary of key-value pairs that will be displayed in this tooltip.
- (NSDictionary *)keyValueDisplayPairsForDataPoint:(id<SChartData>)dataPoint onSeries:(SChartSeries *)series withXAxis:(SChartAxis *)xAxis withYAxis:(SChartAxis *)yAxis
Parameters
- dataPoint
The data point that the toolip is attempting to display values for.
- series
The series that dataPoint belongs to.
- xAxis
The x-axis that the series is linked to.
- yAxis
The y-axis that the series is linked to.
Return Value
A dictionary of NSString
objects that are to be displayed in this tooltip.
Discussion
For example an OHLC series with a multi-y data point will return a dictionary with four entries. The keys will be “Open”, “High”, “Low”, “Close” as returned by the series method [SChartSeries stringForKey:withDataPoint:], with corresponding values from the given data point.
The default behaviour is to use the methods [SChartSeries stringForKey:withDataPoint:]
and [SChartSeries stringForValueWithKey:withDataPoint:usingAxis:]
to retrieve the desired display strings for each key and each value. This means that if you only need to change the text that is displayed for each key or value it is likely less work to subclass your series and override these methods.
Declared In
SChartCrosshairMultiValueTooltip.h
mainLabelStringForDataPoint:onSeries:withXAxis:withYAxis:
Returns the string that will be used as the main label on this tooltip.
- (NSString *)mainLabelStringForDataPoint:(id<SChartData>)dataPoint onSeries:(SChartSeries *)series withXAxis:(SChartAxis *)xAxis withYAxis:(SChartAxis *)yAxis
Parameters
- dataPoint
The data point that the toolip requires the main label text for.
- series
The series that dataPoint belongs to.
- xAxis
The x-axis that the series is linked to.
- yAxis
The y-axis that the series is linked to.
Return Value
A string representing the text to be displayed in this tooltip’s main label.
Discussion
The default beahviour of this method is to return string representations of the x and y values, where no multi-values exist, as formatted by the appropriate axis.
Declared In
SChartCrosshairMultiValueTooltip.h


Example:
enum EnumConstants {
A(null), B, C;
EnumConstants(String... ss) {}
}
A quick-fix is available to replace a variable argument parameter with an equivalent array parameter. Relevant arguments in method calls are wrapped in an array initializer expression. After the quick-fix is applied:
enum EnumConstants {
A(null), B(new String[]{}), C(new String[]{});
EnumConstants(String[] ss) {}
}
Varargs method appeared in Java 5. This inspection can help to downgrade for backward compatibility with earlier Java versions.


Authors: Jeffrey Dean and Sanjay Ghemawat
Google
Presentation by Martin Bjeldbak Madsen
spMI e15, Aalborg University
map(k: str, v: str):
# k: document name
# v: document contents
for word in v:
EmitIntermediate(word, "1");
reduce(k: str, vs: Iterable):
# k: a word
# vs: list of counts
result = 0
for v in vs:
result += v
Emit(result)


Let's play a game.
How about roshambo!
"I found my first killing stone at the river."
"No sound better in the whole world than the crack of a man's skull."
"I never killed nobody with a piece o' paper before tho..."
"But scissors! The feeling as they slice through skin and muscle ..."
"... makes you realize our bodies are just bags of meat waiting to be opened!"
Pick a weapon
or
player information:
- lives: ♥ ♥ ♥ ♥ ♥
- Restart Level
- Restart Game
- save game


I have a total of
points on from Treehouse
Above is the break down of catagories where the points were earned
Call
.treehouseCharts("<your username>")
on any element to see yours.


Sign up/Login
Sign in with
social network
Log in with facebook
Log in with Twitter
Log in with Google
OR


Week 7 of Bootcamp - Survival of the Fittest
By Keisha Shepherd
Written 12/11/2019
I want to make an Alexa app. I’ve been asking since day one how do I do this but it hasn’t happened. But
with the project we were assigned I got my chance. I was too excited. I wanted a 30-minute workout app
that reads the exercises out loud and allows for voice prompt responses. I had a team of people to work
with and they all brought strengths to the team. We split the backend work between Jacob and myself. The
frontend work between Gregg and Mike. We were challenged to use API’s for this assignment.
-
-
Challenge 1 - Finding Exercises
So we found wger.de. This was great, 100s of exercises with names, descriptions, and images. One
problem...it was mostly in German. Solution, I just asked my cousin that is a pro-basketball player
to send me a workout that I could use in a JSON format. Yeah, it didn’t come in perfect JSON but he
tried. I had the exercises, so now we needed the gifs.
-
-
Challenge 2 - Finding Gifs of Exercises
I tried to use gifs and videos from the internet but they just weren’t what I was looking for. The
lateral slides exercise was terrible, it started with a 12 second commercial with John Cena, that no
one needed to see and I couldn’t skip it. And when you searched for gifs you only saw Spongebob
characters sliding down slides??? Then the YouTube video for body squats was soooo slow. She must
have stood there 15 seconds before she did the slowest squat ever. Then half of the YouTube videos
wouldn’t play for reasons I don’t know.
-
- Challenge 3 - Tough Love from the Tutor
I wrote a lot of the workout backend but had a lot of trouble with the timers. I had to learn how to
use promises and async function calls to get everything to work the way I wanted.  I read the API a lot, but eventually, I just started over from scratch. When
I got on the line with my tutor, he was very honest about what would happen if I did that in the
real world. You can’t refactor in the middle of coding, you’ll never finish and you’ll be fired. The
words hit home since that was the situation I was in currently. So we went back to the original code
base and because I was stuck, he went the extra mile and over the weekend figured out how I could
achieve what I wanted using a callback. He’s amazing and I thank him for that.
-
- Challenge 4 - Not Taking a Break
This was over the Thanksgiving holiday. I couldn’t stop working on this project because I couldn’t
get it to work. My Dad even commented you are spending a lot of time in front of the computer, I was
near to tears because right in that moment, I made a change that somehow broke everything. As I get
more into this, I know that I could spend 24/7 doing these projects and still never finish
everything I want to get done. It’s 2:30 am in the morning now and I am working on 3 weeks of blogs
I’ve missed. But I’m learning that stopping and taking a break can help me reset and start fresh.
Also, I’m noticing the effects of not having enough sleep because I’m hitting more curbs and seem to
merge without noticing the car next to me a lot more often.
-
- Challenge and Benefit - Working with a Team
Working with a team is both beneficial and challenging. They took a break over the holiday so it was
difficult to tell what they were going to work on. But cool stuff happened. Jacob produced all of
the original music for the app. And Gregg made an amazing Logo we added to the webpage with a JQuery
scale, that was pretty cool. Everyone had something special they could add so that was really cool.
One thing I’m going to do on the next project is listening more and use “Yes And” techniques when
people say their ideas. No and negative attitudes makes it difficult for people to do more. I think
the webpage could have been desktop friendlier if I hadn’t kept saying make it mobile-first from the
weather dashboard lessons learned. The feedback was it’s mobile-friendly but not desktop friendly.
So the lesson learned there is to just design for phone, then tablet, then phone as elements are
added to the page.


Originating in the Carribean region of Colombia in the late nineteenth century/early twentieth century, vallenato today has become one of Colombia's most popular music genres.
History
Especially in its earlier years, vallenato was considered a music of the lower classes and limited mostly to Colombia's Caribbean region. As a story-telling folk music genre, vallenato tended to focus a considerable amount on its lyrical content. Much like battle rap in hip-hop (like that featured in the movie "8 Mile"), vallenato singers would often engage in improvisational lyrical battles known as "piqueria."
Traditionally, the music genre was represented by three music instruments that, in turn, represent the three main populations who settled in that land:
The Accordion, which was contributed by the Europeans
The Guacharaca, which was contributed by the native American Indians


Legacy of Bodhidharma
Eighteen Hands of Lohan
Bone Marrow Cleansing
Sinew Metamorphosis
Zen
Coming Soon


?FAMILIA
JARDIN
BOTANICO
NACIONAL
DR.
RAFAEL
M.
MOSCOSO
SANTO
DOMINGO.
REPUBLICA
DOMINICANA
nnaffT-an«ao
NEW
YORK
BOTANICAL
GARDEN
01447528
yoa
BOTANIC,
.PARDEÉ
Ludwigia
&C
—
„
.
Determined
by
Elsa
Zardlni
1986
Missouri
Botanical
Garden
64S5
erecta
(L.)Hara
II,
yellow,
to
1
m,,
ed*e
of
pond,
R.
D.
Prov.
Monte
Cristi,
at
km.13
SE
of
Monte
Cristi,
at
Verde
on
Autopista
Duarte,
19
decree
49'N,
71
decrees
35'W,
alt.
60
m.,
N
side
of
road,
around
small
pond,
cattle
«razed,
May
22,
I960
M.
Mejia,
T.
Zanoni
01447528
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Prove the existence of your documents for free in the Bitcoin Blockchain.
Drag and drop here, or .
The file will NOT be uploaded. The cryptographic proof is calculated client-side
It is your responsibility to keep your document safe and unmodified.
It is also your responsibility to come back to docforever.com and download the Bitcoin-Merkle file for your document.
To stay within storage quotas, our servers will only retain the hash of your document and its associated Bitcoin-Merkle file for seven days after the proof of existence has been broadcast to the Bitcoin network.
The hash that represents your document was received by our servers on UTC. Its proof of existence will be broadcast to the Bitcoin network today, , at 23:59:59 UTC.
It is your responsibility to keep your document safe and unmodified.
It is also your responsibility to come back to docforever.com and download the Bitcoin-Merkle file for your document.
To stay within storage quotas, our servers will only retain the hash of your document and its associated Bitcoin-Merkle file for seven days after the proof of existence has been broadcast to the Bitcoin network.
You can now prove the existence of your document by accessing the Bitcoin Blockchain.


SLIDING DOORS
UK/USA. 1998. Director/Screenplay - Peter Howitt, Producers - Philippa Braithwaite, William Horberg & Sydney Pollack, Photography - Remi Adafarasian, Music - David Hirschfelder, Music Supervisor - Anita Camarata, Visual Effects - Cinesite, Production Design - Maria Djurkovic. Production Company - Intermedia Films/Miramax/Paramount/Mirage Enterprises. Gwyneth Paltrow (Helen Quilley), John Lynch (Gerry Flanagan), John Hannah (James Hammerton), Jeanne Tripplehorn (Lydia), Zara Turner (Anna), Douglas McFerran (Russell)
Plot: Helen Quilley is fired from her job with a London PR firm and returns home. Depending whether or not she bumps into a child on the tubeway steps she misses her train home. If she catches the tube she gets home in time to catch her boyfriend with another woman and from there walks out, finds and becomes involved with another man and successfully sets up her own business. But in an alternate scenario she misses the train, never discovers her layabout boyfriend's continuing deception and continues on in a low-paying waitressing job.
I was preparing to start this review with something like "`Sliding Doors' conducts a unique venture into the concept of alternate timelines, the wildly divergent sets of circumstances that may result from a different choice made at a crucial point ...". At least I would have thought it a more unique film had two weeks earlier, I not seen the Hong Kong gangster film `Too Many Ways to Be No. 1'. `Too Many Ways' was made a year prior to `Sliding Doors' and both films are remarkably similar. Both conduct two different divergent stories dependent on the central character making a crucial choice in a trivial matter at the start of the story. It is hard not to believe that `Too Many Ways' was not an influence over `Sliding Doors', especially considering the timing and the sudden emergence of the uniqueness of this theme. Of course both films choose to tell the story in very different milieus. `Too Many Ways' is almost a parody of the hard-boiled Hong Kong gangster film while `Sliding Doors' is a romantic comedy made in the shadow of `Four Weddings and a Funeral'. Of the two `Sliding Doors' is certainly the more conceptually audacious in that it tells its two stories concurrently, interweaving and allowing aspects of one story to mirror the other, while `Too Many Ways' settles less challengingly for merely telling its two stories consecutively.
But of the two `Sliding Doors' is invariably the lesser. It tries a little too hard to be another `Four Weddings' - yet another cosmopolitan London romantic comedy and cast with an eye toward international box-office (with the beautiful swan-necked Gwyneth Paltrow at least conducting a creditable British accent here). Howitt writes some occasionally quite amusing one-liners but the characters are one-dimensional. The depth they are given seems to come only in terms of catchphrase descriptions - Jeanne Tripplehorn is just The Bitch; John Hannah is Prince Charming - we never even find out what sort of businessman he is; and John Lynch is The Cheating Loser Boyfriend. Lynch's character is so one-dimensional and he given so little motivation in his cheating and indecision that one cannot help but wonder what it is that two women see in him.
It's just that one finds it hard to swallow the basic premise. Howitt asks us to believe that not only does whether Paltrow misses the train or not make the difference between two paths she leads (fair enough) but also the entire difference between whether she leads a successful life or not. One could maybe have bought it if the two pathways were not so categorically black-and-white - if she makes the train she gets Prince Charming, makes a success of herself in business, gets a new sharp image; whereas if she doesn't she ends up unhappy, stuck in a low-paid job as a waitress and never finds out the truth about her useless, unfaithful boyfriend. It even makes the difference, for goodness sake, whether she gets pregnant to Prince Charming or to the loser boyfriend. Underneath it all the film is really a rather bland Yuppie daydream - beneath all its romantic ambitions it buys into the fantasy that success in life equates with success in business, a good image and true love; and Hell in life is being caught in a dead-end relationship and a thankless, low-paying job in the service industry. Sadly the film buys into the whole Cinderella Complex - that a woman's success and happiness in life is dependent on success and happiness being delivered to her. What is says is that success, fulfilment and uncovering the truth about the world are things that only really occur by chance happenstance as opposed to being dependent upon one's own decisions and self-determination, and that happiness is a result of external consequence rather than an attitude of mind. Personally I don't buy it.
Copyright 1998 Richard Scheib
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Filter:
Org
Provider
Organization
Select
{{org.name}}
Business Group
Select
{{buss.name}}
Project
Select
{{proj.name}}
Environment
Select
{{env.name}}
Provider
Select
{{provider.providerName}}
Zone
Select
Region
Select
Type of Instance
Managed
Assigned
Unassigned
Resources
Search
Clear search
{{resource.platformId}}
Maximum 10 resources allowed.
Apply
{{stateItems.otherTab}}
Dashboard
Reports
Filter
DAY
WEEK
MONTH
Select Date
Select Week
{{w.l}}
Select Month
{{m}}
Select Year
{{y}}
Close
Ok
{{filt.title}}: {{filt.name}}


Instructions: Drag and drop the sites, secure notes, and form fills from the available column into the selected column to allow access for your new identity. Learn More.
Advanced Settings:


Includes all C++ primitive types. TODO typedef them or not?
Includes classes, structures, enumerations, unions, and typedefs. Use CamelCase with an initial upper-case letter.
Ex. class Vec2; class ComboBox; union BytePack;
All variables use camelCase with an initial lower-case letter. Global variables are prefixed with "g". Member variables are prefixed with "m". Parameters are prefixed with "p".
Ex. const int gAppVersion; float mRotation; Vec2 pPosition; int count;
All namespaces use camelCase with an initial lower-case letter. Note that namespaces should be kept as short as possible. Usually they are represented as an acronym or abbreviation.
Ex. namespace t3d { }
All macros use ALL_CAPS_SNAKE_CASE. Note that macros are only to be used for redundant tasks that can't easily be divided into a real routine. TODO move non-naming content elsewhere
All control structures have a space between the structure identifier and arguments.
All routines...


Maze generated with a
Recursive Backtracker
and then solved with the
A* Search Algorithm.
Based on Daniel Shiffman's Coding Train coding challenges.
Maze generated with a
Recursive Backtracker
and then solved with the
A* Search Algorithm.
Based on Daniel Shiffman's Coding Train coding challenges.


Allissa Hertz
Menu
Home
Publications and Awards
Blog
Contact
NaPoWriMo Day 24
Day twenty-two post for NaPoWrimo...
Posted April 24, 2019
Read More >
NaPoWriMo Day 8
Day eight post for NaPoWrimo...
Posted April 9, 2019
Read More >
NaPoWriMo Day 7
Day seven post for NaPoWrimo...
Posted April 9, 2019
Read More >
NaPoWriMo Day 6
Day six post for NaPoWrimo...
Posted April 9, 2019
Read More >
NaPoWriMo Day 4
Day four post for NaPoWrimo...
Posted April 4, 2019
Read More >
NaPoWriMo Day 3
Day three post for NaPoWrimo...
Posted April 3, 2019
Read More >
Currently Reading:
Share
book reviews
and ratings with Allissa, and even join a
book club
on Goodreads.
Recent Reads:
Share
book reviews
and ratings with Allissa, and even join a
book club
on Goodreads.


[t]Dear {$faq_admin},[/t]
[t]One of the visitors has submitted a new FAQ question. Please click on the link below to answer it.[/t]
[t]Question[/t]: {$question}
[t]Category[/t]: {$category}


Groin and pubic pain during pregnancy
This can be cause local tenderness over the pubic bone and can refer pain down the inside of the legs or it can be caused by back or pelvic pain. It is a good idea to have it assessed by an ostepath to establish the cause.
- Don't cross your legs.
- When getting out of bed or a car keeps your legs together.
- Sit well.
- In the evening a large sarong tied under your bump may help.
- Use a side-lying position for sex.


lwIP V.1.4.1 used
(see http://savannah.nongnu.org/projects/lwip/)
Copyright (c) 2001-2004 Swedish Institute of Computer Science. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
FreeRTOS V.7.3.0 used
(see http://www.freertos.org/)
The FreeRTOS.org source code is licensed by the *modified* GNU General Public License (GPL), text provided below. A special exception to the GPL is included to allow you to distribute a combined work that includes FreeRTOS without being obliged to provide the source code for any proprietary components. See the licensing section of http://www.FreeRTOS.org for full details. The exception text is also included at the bottom of this file. ---------------------------------------------------------------------------- The GPL license text follows. GNU GENERAL PUBLIC LICENSE, Version 2, June 1991, see http://www.gnu.org ---------------------------------------------------------------------------- The FreeRTOS GPL Exception Text: Any FreeRTOS source code, whether modified or in it's original release form, or whether in whole or in part, can only be distributed by you under the terms of the GNU General Public License plus this exception. An independent module is a module which is not derived from or based on FreeRTOS. Clause 1: Linking FreeRTOS statically or dynamically with other modules is making a combined work based on FreeRTOS. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holder of FreeRTOS gives you permission to link FreeRTOS with independent modules that communicate with FreeRTOS solely through the FreeRTOS API interface, regardless of the license terms of these independent modules, and to copy and distribute the resulting combined work under terms of your choice, provided that + Every copy of the combined work is accompanied by a written statement that details to the recipient the version of FreeRTOS used and an offer by yourself to provide the FreeRTOS source code (including any modifications you may have made) should the recipient request it. + The combined work is not itself an RTOS, scheduler, kernel or related product. + The independent modules add significant and primary functionality to FreeRTOS and do not merely extend the existing functionality already present in FreeRTOS. Clause 2: FreeRTOS may not be used for any competitive or comparative purpose, including the publication of any form of run time or compile time metric, without the express permission of Real Time Engineers Ltd. (this is the norm within the industry and is intended to ensure information accuracy).
(E)mbedded (dy)namic (ht)tp server Copyright (c) 2014-2017 Fabian Mink<EMAIL_ADDRESS>All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.


Super Galactic Age Calculator
Click here to see your life expectancy in Earth years
Click here to see your age in Mercury years
Click here to see your life expectancy in Mercury years
Click here to see your age in Venus Years
Click here to see your life expectancy in Venus years
Click here to see your age in Mars Years
Click here to see your life expectancy in Mars years
Click here to see your age in Jupiter Years
Click here to see your life expectancy in Jupiter years


Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped. Thanks Marcos for contributing this image!
Example:
Input: [0,1,0,2,1,0,1,3,2,1,2,1]
Output: 6
Well explained by Leetcode official: https://leetcode.com/articles/trapping-rain-water/ .
/**
* @param {number[]} height
* @return {number}
*/
var trap = function(height) {
let i = 0
let j = height.length - 1
let lMax = 0
let rMax = 0
let result = 0
while (i < j) {
const left = height[i]
const right = height[j]
if (left < right) {
if (left < lMax) {
result += lMax - left
} else {
lMax = left
}
i++
} else {
if (right < rMax) {
result += rMax - right
} else {
rMax = right
}
j--
}
}
return result
};
Template generated via Leetmark.


Part of #100DaysOfCode
Python Updates 5/2/17
- Youbot v1.1 released
- Youbot v1.1 BETA released
- Youbot v1.0 released
- Bug fixed
- Youbot v1.0 BETA released
- trending command updated
- remind command updated
- Youtube playlist downloader updated
- Bug fixed: Channel name searcher
- Interactive UI created
Website Updates 15/1/17
- Finalized website content
- Added features section
- Webpage created
Youtube contains so much of data that for specific purpose we can manipulate those data to give much better performance. Focusing on this concept Youbot is created which covers up all these main points and help user to interact to these data and saving loads of time. Its like your bot will work for you and all you need to do is to judge whether you want information related this or not
|
|
Youbot is your smart bot which will help you to access Youtube data in much interesting way. It is a Python based program which scrape data to get information and then manipulate those data so that it can be served in much better way.
git clone http://www.github.com/shashank-sharma/youbot
|
How it works
|
Features
- Download any video in video format or in audio format
- Download video/audio from any playlist
- Add channels to your favourites list
- Get reminders for your favourites channel
- Nothing to watch? Get Trending videos
To-Do
- Create own search portal for youtube ... Done
- Better use of searching filters for better use
- Random video generator for fun ... Done
- Personal download queue ... Done
- Sort list of videos by their views
- Comparing videos by their views,likes
- Show comments of any video link


Listners for test statistics are defined in this package. At the moment there is only one listener which writes all test statistics out to a CSV (comma seperated values) file which can be loaded by most spread sheets.


https://omarrhanyy.github.io/safe-movie-player/
Watch All Movies Safely
A family-friendly movie player which have
the ability to skip any unsuitable scenes in the movie.
How to use:
Create a new “.safe” file for your movie using
“Create Manual Cut File”
button
or use Auto Cut Scenes feature.
Watch your movie using the second button
“Play Movie”
.
Get some popcorn and Enjoy the movie with your family/friends!
Auto Cut Scenes
Sensitivity (1-15):
Create Manual Cut File
Play Movie


|
AbstractScopeTest
|
|
AcceptanceTest
|
|
BasicScopeFactoryTest
|
|
ClassScopeTest
|
|
DeclarationFinderTest
|
|
ImageFinderFunctionTest
|
|
LocalScopeTest
|
|
NameOccurrenceTest
|
|
NameOccurrencesTest
|
|
ScopeCreationVisitorTest
|
|
SymbolTableTests
|
|
TypeSetTest
|
|
VariableNameDeclarationTest
|


Welcome to What Happened Today
This program interfaces with Wikipedia's API to bring you articles about events, births, and deaths that have happened on this day in history.


--- layout: archive_en permalink: /dashboard_en/ title: "Dashboard" sidebar: nav: "dashboard_en" ---
for-each-line


No Ratings Recieved found
You have not recieved any ratings
Ratings Recieved
Rating:
= 1; else templateName">
= 2; else templateName">
= 3; else templateName">
= 4; else templateName">
Rater Username:
{{rater.raterUsername}}
Date:
{{rater.dateCreated}}
Comment:
{{rater.comment}}


For all platforms use wxWidgets 3.0 and higher. AStyleWx will NOT compile with wxWidgets 2.8.
AStyleWx expects a Unicode, non-Monolithic build. This is the default for WxWidgets 3.0 and higher and is usually the default for the Linux wxWidgets installation packages.
On Linux wxWidgets is available as installation packages. AStyleWx will work with the available packages if wxWidgets 3.0 or higher is used. You can install both versions 2.8 and 3.0 on the same system. Both the development packages and the run-time packages should be installed.
Use wxWidgets 3.0 or higher. Mac OS must be compiled and installed from the source code using either Xcode or the command line tools. Download the source for Linux and Mac OS. Do NOT use a Windows download. It will have the wrong line endings which will cause problems.
Build the library for cocoa. Install instructions are in wxWidgets docs/osx. The libraries are built with the default options macosx‑version‑min=10.5 and installs to /usr/local. Other possible configure flags are at http://wiki.wxwidgets.org/Possible_Configure_Flags_under_OS_X. Either Xcode or the command line tools may be used. The Xcode install did NOT do a complete install with the tested release. The command line tools were the better choice. The AStyleWx compiles are built with wxWidgets static libraries from the default install folders.
To build and install static libraries using the command line:
NOTE: For wxWidgets-3.0.2, make and install needed the additional option ignore‑errors. The project that does not compile is not needed.
cd wxWxdgets-3.0.2 mkdir build-release cd build-release ../configure --disable-shared make sudo make install
There are Visual Studio solution files for wxWidgets releases in the wxWidgets build\msw folder. All of the configurations and platforms in the wxWidgets solution files are supported by AStyleWx. Just open the appropriate solution file for your Visual Studio version and compile the configurations and platforms you want. The outputs will be in the various wxWidgets "lib" folders.
The wxWidgets website has binary DLLs available for download. These were not used because the wxWidgets static libraries are not included. The binary DLLs can be used for the DLL files if you want, but the AStyleWx properties will need to be changed to the correct directories. The binaries are apparently compiled with the options OFFICIAL_BUILD, COMPILER_VERSION, and TARGET_CPU (and possibly others) while the solution file compiles are not. The properties that require changing are "C/C++ > General > Additional Include Directories" and "Linker > General > Additional Library Directories". This may change, of course, with later versions.
Compiling wxWidgets 3.0.2 with Visual Studio 2015 requires making changes to the wxWidgets source files. A description of the solution is at https://forums.wxwidgets.org/viewtopic.php?f=19&t=40491. Use the reply by doublemax tagged as [SOLVED]. These changes are NOT needed for wxWidgets 3.1.0 and higher.
AStyleWx has a "static" build which is not available with the wxWidgets solutions. The Visual Studio wxWidgets project files can be modified by using the procedure described in the AStyleWx documentation Visual Studio Static Compile.
Other Windows compilers will need to use the makefiles in the wxWidgets build\msw folder. With wxWidgets 3 you can use the default options with the following exceptions. To build the wxWidgets static libraries no additional options are needed. To build the wxWidgets DLLs the option SHARED=1 should be used.
Some compilers require compiling wxWidgets with C++11. If you need to compile with C++11, there is an important note in wxWidgets docs\msw\install.txt. Use ‑std=gnu++11 instead of ‑std=c++11 because the latter disables some extensions that wxWidgets relies on. If this is not done the linker will fail with undefined references. ‑Wno-deprecated-declarations may also be needed to eliminate unwanted warning messages.
To build wxWidgets DLLs with the TDM GCC compiler:
cd build\msw mingw32-make -f makefile.gcc SHARED=1 CXXFLAGS="-std=gnu++11 -Wno-deprecated-declarations"
wxWidgets can usually be installed with the package manager. The development package is needed as well as the shared libraries. Artistic Style Wx needs release 3.0 or higher. You can install versions 2.8 and 3.0 on the same system.
The Linux makefiles use the wx-config script for information about wxWidgets. The DEFAULT release is used unless another is requested. Install locations as well as compiler and linker options are also obtained from the script.
To display the default release:
wx-config --release
To display a list of all installed releases:
wx-config --list
To get a list of other options:
wx-config --help
The build has no autoconf dependency. To build the AStyleWx configurations use the makefile located in the astylewx/build/gcc directory. The executables will be in the astylewx/build/gcc/bin directory. The Artistic Style source is included in the AStyleWx compile.
To build Artistic Style Wx change to the astylewx build/gcc directory. Before the first compile the deps.mak file should be regenerated to assure the correct version of wxWidgets headers is being used. It is regenerated using the "deps" target in the makefile. Wait for it to finish before doing the make.
cd astylewx/build/gcc make deps make
To build the other astylewx configurations you can enter the file name or a symbolic name. Entering "make astylewx" or "make release" will build the command line configuration. Following are the symbolic names and file names (in parens) of the various configurations:
More than one configuration can be built at the same time. For example, to build all the release configurations enter:
cd astyle/build/gcc make release shared
The Other Makefile Options and Other Makefile Targets sections contain additional compile and target options.
The build has no autoconf dependency. To build AStyleWx use the makefile located in the astyle/build/clang directory. The executables will be in the astyle/build/clang/bin directory. The Artistic Style source is included in the AStyleWx compile.
To build Artistic Style Wx change to the astylewx/build/clang directory. Before the first compile the deps.mak file should be regenerated to assure the correct version of wxWidgets headers is being used. It is regenerated using the "deps" target in the makefile. Wait for it to finish before doing the make.
cd astylewx/build/clang make deps make
The Other Makefile Options and Other Makefile Targets sections contain additional compile and target options.
These procedures and the makefile are for recent versions of the compiler. They may not work for earlier versions. Instructions for your compiler are in the compiler documentation file "get_started_lc.htm".
To compile the source there are environment variables that must be set by running the compiler environment script compilervars.sh (or compilervars.csh) with an argument that specifies the target architecture. If this has not been done already enter: "source <install-dir>/bin/compilervars.sh <arg>", where <install-dir> is the directory where the compiler is installed and <arg> is ia32 or intel64. If this is not done "make" will display an error message. On an Intel x64 platform installed in the default directory the instruction would be
source /opt/intel/bin/compilervars.sh intel64
The build has no autoconf dependency. To build AStyleWx use the makefile located in the astyle/build/intel directory. The executables will be in the astyle/build/intel/bin directory. The Artistic Style source is included in the AStyleWx compile.
To build Artistic Style Wx change to the astylewx/build/intel directory. Before the first compile the deps.mak file should be regenerated to assure the correct version of wxWidgets headers is being used. It is regenerated using the "deps" target in the makefile. Wait for it to finish before doing the make.
cd astylewx/build/intel make deps make
The Other Makefile Options and Other Makefile Targets sections contain additional compile and target options.
The following additional compile options are available for GCC, Clang, Intel, and Mac OS.
wx=3.0
To compile with a wxWidgets release other than the default use the "wx" option. For example, if both releases 3.0 and 3.1 are installed, using "wx=3.0" will compile with wxWidgets release 3.0. This option may be used with compile and install commands.
To add additional compiler options use CFLAGS. The options should be enclosed in quotes if spaces are included.
To add additional linker options use LDFLAGS. The options should be enclosed in quotes if spaces are included.
This is used in CFLAGS to bypass AStyleWx warning messages when changed files have not been saved. Its purpose is to make testing more convenient. It is not intended to be used in a release configuration. To use the option enter "CFLAGS=‑DTESTMODE1".
The following additional makefile targets are available.
Removes the object and executable files for all configurations.
To remove the files for all configurations:
make clean
Removes the object files for all configurations. The executables will not be removed.
To remove only the object files for all configurations:
make cleanobj
Installs the AStyleWx executable and documentation files. The default is /usr/bin for the executable and /usr/share/doc/astylewx for the documentation. You must have the appropriate permissions to use install.
To install AStyleWx to the default directories:
sudo make install
To install AStyleWx to a different directory, set a value for the macro $(prefix). For example, to install the executable to a user's home directory (/home/user/bin):
sudo make prefix=$HOME install
Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.
To uninstall AStyleWx from the default directories:
sudo make uninstall
To uninstall the files from a different directory set a value for the macro $(prefix). For example, to uninstall the files from a user's home directory (/home/user):
sudo make prefix=$HOME uninstall
NOTE: The uninstall option will NOT remove the ".astylewx" configuration files from the user's home directory. The files must be removed individually for each user.
NOTE: wxWidgets libraries are built with the standard C++ libraries, NOT the C++11 libraries. The AStyleWx files must be built with the standard libraries or you will get errors during linking.
AStyleWx and AStyleWxDy workspaces and project files for the Xcode development environment are available in the "build/xcode" directory. AStyleWx links AStyle as a static library, AStyleWxDy links AStyle as a dynamic library.
The project files have Debug and Release configurations. The following projects are available in the AStyleWx workspace.
The following projects are available in the AStyleWxDy workspace.
Build and run the program as usual from Xcode.
The following instructions are for the AStyleWx applications. The app will be installed in the Applications directory. You must have the appropriate permissions to use install.
To install the AStyleWx app to the Applications directory:
cd astylewx/build/xcode sudo xcodebuild install -project AStyleWx.xcodeproj -target AStyleWx
To uninstall remove AStyleWx.app from the Applications folder.
The build has no autoconf dependency. To build the AStyleWx configurations use the makefile located in the astylewx/build/mac directory. The executables will be in the astylewx/build/mac/bin directory. The Artistic Style source is included in the AStyleWx compile.
To build Artistic Style Wx change to the astylewx build mac directory. Before the first compile the deps.mak file should be regenerated to assure the correct version of wxWidgets headers is being used. It is regenerated using the "deps" target in the makefile. Wait for it to finish before doing the make.
cd astylewx/build/mac make deps make
To build the other astylewx configurations you can enter the file name or a symbolic name. Entering "make astylewx" or "make release" will build the command line configuration. Following are the symbolic names and file names (in parens) of the various configurations:
More than one configuration can be built at the same time. For example, to build all the release configurations enter:
cd astyle/build/mac make release shared
The Other Makefile Options and Other Makefile Targets sections contain additional compile and target options. They are the same as for Linux makefiles.
In addition to the source files, the Windows distribution package contains an Artistic Style Win32 executable (AStyle.exe). If you prefer to compile the executable yourself use the following instructions.
To compile AStyleWx the wxWidgetsMacros.props files must be changed. The files are located in the build\vs... folders. The easiest way to change them is to open the props files in a text editor. Then change the "WXWIN" field to the location of the wxWidgets directory on your system. The "wxVersion" field will need to be changed if it does not contain the correct wxWidgets version.
The "wxWidgetsMacros.props" files can also be changed from the "Properties Editor" in Visual Studio. An AStyleWx solution must be open. Open the "Property Manager" window from the View menu. Open a configuration in the Property Manager, right click on "wxWidgets Macros", and select "Properties". Under "Common Properties" select "User Macros". The "WXWIN" and "wxVersion" macros values will be displayed. They can be changed by double-clicking on the field name. Change the macro value to the correct value for your system and press OK. This will change the macros for all configurations. The properties file needs to be saved before closing the solution.
The following solution files are available.
All projects have the following configurations available for Win32 and x64 platforms.
To compile a configuration, the corresponding library files must be available in the wxWidgets directory. All library file compiles are available in the wxWidgets solution files except the Static compile. If the Static compile is not needed it can be removed from the configurations. If you want to try compiling it the procedure described in the AStyleWx documentation Visual Studio Static Compile.
To use other compilers a project file must be built using a development environment.
The AStyle source can also be compiled as a separate static library and linked to the AStyleWx compile.
To compile AStyle as a static or shared (dynamic) library define the macro ASTYLE_LIB. To compile a Java shared (dynamic) library define the macro ASTYLE_JNI. The option ASTYLE_NO_EXPORTS is sometimes needed for static libraries to prevent compiler error and warning messages. Use the appropriate compiler and linker options to compile the static or shared library. Add debug options to compile the debug versions.
Artistic Style is a small program and it is best to optimize for speed. The debug configurations are not usually optimized. To optimize for speed in the release configurations, use the macro NDEBUG to remove asserts. If necessary, use an option to activate the C++11 standards (--std=c++0x on GCC and MinGW). Use an option that allows inline function expansion. Runtime Type Information (RTTI) is NOT needed. Exceptions are not used. Use whole program optimization if your compiler supports it. There may be other options you can use depending on the compiler.


Workflow and functionality¶
Being a Bloggify application, the application configuration is kept in a
file: bloggify.js
.:
"use strict";
// Set the right MongoDB URI (depending on the environment).
const DB_URI = process.env.DB_URI
if (!DB_URI) {
Bloggify.log(new Error(">>>> Please provide the MongoDB URI. Set the DB_URI environment variable."));
}
module.exports = {
title: "IronHacks",
description: "Hack for inovation and join the open data movement.",
domain: process.env.DOMAIN || "http://www.ironhacks.com",
core_plugins: [
["github-login", {
githubClient: process.env.GITHUB_CLIENT,
githubSecret: process.env.GITHUB_SECRET,
}]
],
plugins: [
["sendgrid", {
key: process.env.SENDGRID_KEY
}]
],
styles: [ "app/assets/stylesheets/index.css" ],
bundles: {
publicHomepage: {
scripts: [ "app/assets/javascripts/homepage/index.js" ],
styles: [ "app/assets/stylesheets/homepage/index.css" ]
},
editor: {
styles: [ "app/assets/stylesheets/editor/index.css" ]
},
auth: {
scripts: [ "app/assets/javascripts/private-router.js" ],
styles: [ "app/assets/stylesheets/auth.css" ]
},
notAuth: {
scripts: [ "app/assets/javascripts/public-router.js" ]
},
main: {
scripts: [ "app/assets/javascripts/common-router.js" ]
}
}
};
The way how this Bloggify application is structured is explained below.

The routes may have associated controllers which are located in the
app/controllers
directory.
Qualtrics integration¶
All the quizzes created on the Qualtrics platform have a snippet of JavaScript which stores the user data in the response (as known as Embedded data).
We store the user_email
and the user_id
which are sent in the
url.
The code in the Qualtrics quizzes is set in the last block, last question (which may happen to be an empty question, used for tracking):
function getParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
var redirectUrl = getParameterByName("redirect_to");
var userEmail = getParameterByName("user_email");
var userId = getParameterByName("user_id");
if (userEmail) {
Qualtrics.SurveyEngine.setEmbeddedData("email", userEmail);
}
if (userId) {
Qualtrics.SurveyEngine.setEmbeddedData("user_id", userId);
}
if (redirectUrl) {
var interval = setInterval(function () {
if (Qualtrics.SurveyEngine.Page.isEndOfSurvey()) {
window.location = decodeURIComponent(redirectUrl);
clearInterval(interval);
}
}, 100);
}
This approach is being used for all the quizzes: the sign up survey and the other technical quizzes.
Surveys: -------> Qualtrics
d3.js | email, user_id
HTML & CSS | And after the survey we redirect back
JavaScript and jQuery |
^ |
+-----------------------------------+
Save in db
(that the user took the survey)
Login / Register Process¶
When the user is not authenticated, the main page displays two buttons: a login button and a Sign up button.
When the login button is clicked, the /login
url is opened. The
login url redirects to the GitHub authentication workflow (OAuth2) where
the user should accept access of our GitHub app in their GitHub account.
IronHack Platform GitHub.com
----------------- ----------
/login ----------------------------------------> Do you want to accept access of the app?
(the message won't appear if accept was already granted)
|
*------------ GitHub App: IronHack
|
___________/ \___________
/ \
Yes No
/login-callback <-------------------/ |
/ <------------------------------------------------/
The difference between the Sign in and Sign up buttons is that for the sign in, we assume that the user already has an account, therefore we make the redirection to GitHub APIs and authenticate them with their GitHub account. In case they do not have an account on the site, they will have to choose the hack type after the GitHub authentication.
In Sign up case we will assume that the user doesn’t have an account yet, therefore we ask them to choose the hack type and only then the GitHub authentication is made. Still, if an existing user clicks the Sign up button, they will log in into their account anyways.
This is the authentication workflow:
In the controllers/register.js
file, we create a new user or
authenticate an existing user. For the first-time users, we display the
selection of the hack type: Purdue, Bogota and Platzi, and then redirect
to the survey. At this moment, we start a session on the server side,
but we don’t write any data in the users’ database yet.
After the user completes the survey, they are redirected back, and the user account is created.
To redirect the users to the survey, we send the Location
header
from the server to the client. Additional data is added in the url
parameters to track the user:
email
: The email of the useruser_id
: The user idredirect_to
: The redirection url where they will arrive after answering the survey.
Using a JavaScript snippet in the survey page we store the email and the user id in the survey answer and we detect when the survey is done and redirect the users back to the app.
When they finish the survey, they are redirected to the main app and the account is created.
When creating a user account, we do not assign a hack_id
to the
user but we wait until the contest is started. The hack_id
is a
number between 0
and 2
based on which we create multiple forums
inside of the same hack type. The range can be configured in the admin
dashboard.
For Purdue, we have one forum (the hack_id
will be always 0
) and
for Bogota
and Platzi
, we have three forums for each (the
hack_id
can be 0
, 1
or 2
).
+--------------------+-------------+--------------+
| Purdue | Bogota | Plazi |
+--------------------+-------------+--------------+
| 0 | 0 | 1 | 2 | 0 | 1 | 2 |
+--------------------+-------------+--------------+
| | | | | | | |
...
If the user is already registered, they are authenticated based on the existing data.
The hack_id
values are assigned either when the user signs up (if
the contest is already started) or when the contest starts. The default
value for hack_id
is null
. This is changed automatically when
the contest starts.
The algorithm which assigns the hack ids is designed to create groups of an equal number of users. Specifically, the user will join in the hack id with the fewest users at that moment.
The database query is: find how many users we have in each hack id, for a given hack type. Then, join the current user in the hack id with the fewest users.
function generateGetHackId(hType, name) {
return cb => {
User.model.aggregate([{
$match: {
"profile.hack_id": { $ne: null },
"profile.hack_type": name
}
}, {
$group: {
_id: "$profile.hack_id",
total: { $sum: 1 }
}
}], (err, docs) => {
if (err) { return cb(0); }
const ids = Array(hType.subforums_count + 1).fill(0);
docs.forEach(c => {
ids[c._id] = c.total;
});
let minId = 0;
let min = ids[minId];
ids.forEach((count, index) => {
if (count < min) {
minId = index;
min = ids[minId];
}
});
cb(minId);
});
};
}
forEach(HACK_TYPES, (c, name) => {
c.getHackId = generateGetHackId(c, name);
});
The function which assigns the hack id values to the users is in the
HackTypes
controller (app/controllers/HackTypes.js
).
This function receives as input a hack type object and groups the users inside of the hack type.
const assignHackIdsToUsers = hType => {
const usersCursor = User.model.find({
"profile.hack_id": null,
"profile.hack_type": hType.name
}).cursor();
usersCursor.on("data", cDoc => {
usersCursor.pause();
hType.getHackId(uHackId => {
User.update({
_id: cDoc._id
}, {
profile: {
hack_id: uHackId
}
}, (err, data) => {
if (err) { Bloggify.log(err); }
usersCursor.resume();
});
});
});
usersCursor.on("error", err => {
Bloggify.log(err);
});
usersCursor.on("end", cDoc => {
Bloggify.log(`Grouped the studends from ${hType.name}.`);
});
};
The function above is called when the countdown finishes, being triggered by a scheduler:
const setScheduleForHackType = name => {
if (name.name) {
name = name.name;
}
let hackTypeObj = HACK_TYPES[name];
if (hackTypeObj.startSchedule) {
hackTypeObj.startSchedule.cancel();
}
hackTypeObj.startSchedule = schedule.scheduleJob(hackTypeObj.start_date, () => {
assignHackIdsToUsers(hackTypeObj);
});
};
Or, it may be triggered when we make changes in the admin dashboard, changing the start of the contest.
if (new Date() > thisHackType.start_date) {
if (thisHackType.startSchedule) {
thisHackType.startSchedule.cancel();
}
assignHackIdsToUsers(thisHackType);
} else {
setScheduleForHackType(thisHackType);
}
To catch the save
event, we add a hook using the addHook
method
defined by the
`bloggify-mongoose
<https://github.com/Bloggify/bloggify-mongoose>`__
plugin.
Settings.model.addHook("post", "save", update);
Quizzes¶
The quizzes page displays the quizzes that can be taken by the user. The user may answer the same quiz multiple times.
In the view file (app/routes/quizzes.ajs
) we have the part which
renders the links to each quiz:
<% include("../views/header", { title: "Quizzes" }) %>
<% include("../views/container/start") %>

Quizzes

<% quizzes.forEach(function (quiz) { %>
<a class="btn" href="<%= quiz.url %>"><%= quiz.label %>
<% }); %>
<% include("../views/container/end") %>
<% include("../views/footer") %>
The data associated with this view is storred in the controller
(app/controllers/quizzes.js
)–see below. The user can click the
generated link which contains information about the user (the email
address and the user id)–which are storred in the Qualtrics quiz
responses as embedded data, and also the redirect url. When the user
finishes the quiz, they are redirected back the application, on the
/quizzes
page and the application marks the quiz complete
internally. Even the quiz was completed, the user can take it again.
const Bloggify = require("bloggify")
, Session = require("./Session")
, User = require("./User")
, findValue = require("find-value")
;
// Define the quizzes list
const quizzes = [
["d3.js", "https://purdue.qualtrics.com/jfe/form/SV_71xEzp5vQ7rC817", "d3"]
, ["HTML & CSS", "https://purdue.qualtrics.com/jfe/form/SV_do6Sc9VJsAMmOih", "html_css"]
, ["JavaScript & jQuery", "https://purdue.qualtrics.com/jfe/form/SV_b8zyxX8wozQfNul", "javascript_jquery"]
];
// Map the quizzes labels to the data
const validQuizzes = {};
quizzes.forEach(c => {
validQuizzes[c[2]] = c;
});
module.exports = (lien, cb) => {
const user = Session.getUser(lien);
if (!user) { return lien.redirect("/"); }
// Set the quiz complete
const completed = lien.query.markComplete;
if (completed && validQuizzes[completed]) {
return User.update({
_id: user._id
}, {
profile: {
surveys: {
[completed]: {
ended_at: new Date()
}
}
}
}, (err, _user) => {
lien.redirect("/quizzes");
})
}
// Generate the redirect links
const completedSurveys = findValue(user, "profile.surveys") || {};
const userQuizzes = quizzes.map(c => {
const redirectTo = encodeURIComponent(`${Bloggify.options.metadata.domain}/quizzes?markComplete=${c[2]}`);
return {
label: c[0]
, url: `${c[1]}?redirect_to=${redirectTo}&user_email=${user.email}&user_id=${user._id}`
, is_complete: !!completedSurveys[c[2]]
};
});
// Send the quizzes array to the view
cb(null, {
quizzes: userQuizzes
});
};
Search¶
On the search page (/search
) we can search for content which appears
either in the post data or in the comments.
The view associated with this page is storred in the
app/routes/search.ajs
and it looks like this:
<% include("../views/header", { title: "Search" }) %>
<% include("../views/container/start") %>

Search

<% include("../views/search-form") %>

<% if (f("results")) { %>

Search results for ‘<%= lien.query.search %>’

<% if (results.length) { %>
<% results.forEach(function (cResult) { %>

<a href="<%= cResult.url %>">
<%= cResult.title %>

<% }) %>
<% } else { %>

There are no results. Maybe try a different query.

<% } %>

<% } %>
<% include("../views/container/end") %>
<% include("../views/footer") %>
This file requires the search-form
which appears in the
app/views/search-form.ajs
file, representing the search form itself:
<form>
<input type="text" name="search" value="<%= lien.query.search || "" %>" placeholder="Search for something..." />
</form>
When the user submits the query, the ?search=<query>
querystring
parameter is added in the url, triggering the search functionality in
the controller (located in app/controllers/search.js
). To increase
the search results accuracy we used the internal MongoDB text search
indexes like this: we created text indexes for the topic title and
content and comment content, using the text: true
in the model
configuration:
``app/models/Topic.js``:
module.exports = {
...
title: {
type: String,
text: true
},
...
body: {
type: String,
text: true
},
...
};
``app/models/Comment.js``:
module.exports = {
...
body: {
type: String,
text: true
},
...
};
Note: The admin users will see the search results from all the forums, while the simple users will see the search results from the forum they belong to.
The controller which takes care of searching looks like this:
const Session = require("./Session")
, Topic = require("./Topic")
, Comment = require("./Comment")
;
module.exports = (lien, cb) => {
const user = Session.getUser(lien);
if (!user) {
return lien.redirect("/");
}
const isAdmin = Session.isAdmin(user);
// Perform the search query
if (lien.query.search) {
// Use the $text index to search
const filters = {
$text: {
$search: lien.query.search
}
};
let results = {};
// Search in the topics and comments
Promise.all([
Topic.model.find(filters)
, Comment.model.find(filters)
]).then(data => {
results.topics = data[0];
results.comments = data[1].map(c => c.toObject());
return Promise.all(results.comments.map(cComment => {
return Topic.model.findOne({ _id: cComment.topic });
}));
}).then(topics => {
let uniqueTopics = {};
results.topics.concat(topics).forEach(c => {
if (!c) { return; }
// Let the admin see all the posts/comments in all the forums
if (!isAdmin) {
if (c.metadata.hack_type !== user.profile.hack_type ||
c.metadata.hack_id !== user.profile.hack_id) {
return;
}
}
uniqueTopics[c._id] = c;
c.url = Topic.getUrl(c);
});
cb(null, { results: Object.keys(uniqueTopics).map(k => uniqueTopics[k]) });
}).catch(e => {
cb(e);
});
} else {
cb();
}
};
Posts Page¶
For authenticated users, we display the posts on the first page, ordered by the date, but the sticky posts are always the first ones. Only the admin users can make create sticky posts (or edit a post and make it sticky).
Here, the users from a specific forum can see and upvote the posts from the same forum. They can click on the post urls and post comments.
Single post pages¶
The single post pages are accessible by authenticated users only. They display the post title, body, votes and comments.
In case somebody comments, the comments are updated in real-time, the votes too.
When a user opens a topic page, we collect stats about that event:
actor
: the user id who clicked the buttontopic_id
: the topic idphase
: the phase of the projectcreated_at
: the timestamp
Posting a new topic¶
By accessing the /new
endpoint, one can post a topic in their forum.
They have to write the title and the topic content.
The topic content can be styled with Markdown specific styles (bold, italic etc).
The scores page¶
We display the scores of the users, on the /scores
page. The users
see the anonymous name of the users in the table. The displayed items in
the table are shuffled each time.
If in the admin interface the scores are not provided, the scores collumns will not appear in the scores. In a similar way it happens for the urls: if we don’t enter the urls, the urls collumns will not appear in the scores page.
When the user clicks on the View scores button, we collect stats:
actor
: the user id who clicked the buttonhacker_id
: the user from the table which was clickedphase
: the phase of the projectcreated_at
: the timestamp
Similar things happen when one clicks the Project url or the GitHub repository url. We know what was clicked and who did it.
In the scores controller (the controllers/scores.js
file) a query to
fetch the users from a certain forum is made. Then we get the active
scores and urls for the current phase of the contest and create an array
which is passed to the scores view. To keep the users semi-anonymous, we
change the usernames into Hacker {1-...}
. Then the users array is
shuffled.
This is the code snippet which fetches the users, modifies the usernames and shuffles the array.
User.model.find({
"profile.hack_type": user.profile.hack_type,
"profile.hack_id": user.profile.hack_iand usls for the current phase of the contest and create an array which is passed to the scores view.
}, (err, users) => {
if (err) { return cb(err); }
Settings.get((err, options) => {
if (err) { return cb(err); }
const phase = options.settings.hack_types[user.profile.hack_type].phase;
users = users.map((u, i) => {
u = u.toObject();
u.username = `Hacker ${i + 1}`;
const phaseObj = Object(u.profile[phase]);
return {
_id: u._id,
username: u.username,
score_technical: phaseObj.score_technical,
score_info_viz: phaseObj.score_info_viz,
score_novelty: phaseObj.score_novelty,
score_total: phaseObj.score_total,
project_url: phaseObj.project_url,
github_repo_url: phaseObj.github_repo_url
};
});
shuffle(users);
cb(null, {
users: users,
phase: phase
});
});
});
The shuffle
function is a basic algorithm of shuffling the elements
from a given array:
function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
// And swap it with the current element.
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
}
Admin interface¶
An admin can access additional functionality (such as deleting and
editing any post). They have access to the dashboard (/admin
) where
they can make other users admins. If nobody is admin (say there are no
users), we can make somebody an admin (even if they don’t exist yet in
the database) by assiging the GitHub username of an eventual user to the
environment variable called ADMIN_USERNAME
.
The ADMIN_USERNAME
environment variable represents the GitHub
username of the user which should be an admin (this user cannot be a
simple user anymore, nobody being able to remove the admin rights from
them). When they are going to log in, they will be authenticated as
admin.
To set the ADMIN_USERNAME
variable, there are multiple ways, but the
easiest ones are:
If the application runs in a Heroku environment, the variable can be set from the browser interface:
https://dashboard.heroku.com/apps/<app-name>/settings
, by clicking theReveal Config Vars
button or in the command line using:heroku config:set ADMIN_USERNAME=hackpurdue
Note: after setting an enviroment variable on Heroku (either from the command line) or from the browser interface, the application will be restarted automatically.
When running locally, the environment variable can be set when starting the app:
ADMIN_USERNAME=hackpurdue npm run start:dev
In the admin interface, the admin can:
- Change the Phase.
- Download the CSV stats.
- Set the start dates for each hack type.
- See all the users and update the scores for each and eventually make them admins.
In case another user is made admin, they should log out (if they are authenticated) and log in back.
Custom database Filters for admin
For simple users, the database queries include the author
, being the
current authenticated user. When the user has admin permissions, we do
not append anymore the author
the queries, therefore making the
queries more liberal, giving more power to the admin.
For instance, when deleting a post, the user will create the following query:
delete the post with ``_id``=… and ``author=…``
Therefore, if the user tries to delete another post, having the id, that post will not be found because it is not created by the authenticated user.
Tho, if the user is an admin, the query is simpler, lacking the
author
field (we want to give them the power to delete any post):
*delete the post with _id=...
*
This is happening in the
app/controllers/posts/_topicId-_slug/delete.js
controller:
const Topic = require("../../Topic")
, Session = require("../../Session")
;
exports.post = (lien, cb) => {
const user = Session.getUser(lien);
if (!user) {
return lien.next();
}
const filters = {
_id: lien.params.topicId
};
if (!Session.isAdmin(user)) {
filters.author = user._id;
}
Topic.remove(filters, (err, count) => {
if (err) { return lien.apiError(err); }
lien.redirect("/");
})
};
Application structure¶
In the routes
folder, we have the page templates which are linked to
the controllers from the controllers
folder.
app/routes/
├── 404.ajs
├── 422.ajs
├── 500.ajs
├── _.ajs
├── _.js
├── admin
│ ├── _.ajs
│ ├── _.js
│ └── csv
│ ├── _.js
│ ├── export-users
│ │ └── _.js
│ ├── scores
│ │ └── _.js
│ └── topics
│ └── _.js
├── logout
│ ├── _.ajs
│ └── _.js
├── new
│ ├── _.ajs
│ └── _.js
├── posts
│ ├── _.ajs
│ └── _topicId-_slug
│ ├── _.ajs
│ ├── _.js
│ ├── comments
│ │ ├── _.ajs
│ │ └── _.js
│ ├── delete
│ │ └── _.js
│ ├── edit
│ │ ├── _.ajs
│ │ └── _.js
│ └── toggle-vote
│ └── _.js
├── preview
│ └── _user
│ └── _projectName
│ └── _filepath*
│ └── _.js
├── quizzes
│ ├── _.ajs
│ └── _.js
├── register
│ ├── _.ajs
│ └── _.js
├── scores
│ ├── _.ajs
│ └── _.js
├── search
│ ├── _.ajs
│ └── _.js
├── task
│ ├── _.ajs
│ └── _.js
├── timeline
│ ├── _.ajs
│ └── _.js
├── users
│ └── _user
│ ├── _.ajs
│ ├── _.js
│ ├── edit
│ │ ├── _.ajs
│ │ └── _.js
│ └── projects
│ ├── _.ajs
│ ├── _.js
│ ├── _projectName
│ │ ├── _.ajs
│ │ ├── _.js
│ │ ├── delete
│ │ │ ├── _.ajs
│ │ │ └── _.js
│ │ ├── edit
│ │ │ ├── _.ajs
│ │ │ └── _.js
│ │ └── preview
│ │ ├── _.ajs
│ │ └── _filepath*
│ │ └── _.js
│ └── new
│ ├── _.ajs
│ └── _.js
└── view-project
└── _projectHash
├── _.ajs
└── _.js
The _
character marks a dynamic route (such as a topic id/slug, or
user). The .js
files are the controlers.
Modules¶
In this application we use the following main modules:
Database Connection¶
To connect with the database the
`bloggify-mongoose
<https://github.com/Bloggify/bloggify-mongoose>`__
module was used. The database models are stored in the app/models
directory:
models/
├── Comment.js
├── Settings.js
├── Stats.js
├── Topic.js
└── User.js
To see the raw database collections and documents, we can connect directly using the MongoDB CLI:
mongo ....mlab.com:63758/heroku_... -u <dbuser> -p <dbpassword>
or we can see that in the browser:
Open the application Overview page
https://dashboard.heroku.com/apps/ironhackplatform
Clik the
mLab MongoDB
. This will redirect to an url like this:https://www.mlab.com/databases/heroku_...
On this page, we can see the collections and eventually the documents and edit them.
The models we interact with are:
Comment
Stores the comments in the comments
collection.
module.exports = {
author: "string",
body: {
type: String,
text: true
},
created_at: "date",
topic: "string",
votes: ["string"]
};
Settings
Stores the application settings.
module.exports = {
settings: "object"
};
Stats
Used to store the stats we collect.
module.exports = {
actor: "string",
metadata: "object",
event: "string",
created_at: "date"
};
In this collection we save the user events. See below what stats we collect.
Topic
Stores the topics in the topics
collection.
module.exports = {
author: "string",
title: {
type: String,
text: true
},
slug: "string",
body: {
type: String,
text: true
},
created_at: "date",
votes: ["string"],
sticky: "boolean",
metadata: "object"
};
User
Stores the users in the users
collection.
module.exports = {
username: "string",
email: "string",
password: "string",
profile: "object",
role: "string"
};
What stats we collect¶
We collect stats when the user:
- clicks the View scores button
- opens a topic page
The stats are collected by making HTTP requests to the server, using the
fetch
technology (it’s a new browser API, similar to
XHRHttpRequest
).
The code snippets that take care of this is located in
app/assets/javascripts/util/index.js
:
...
/**
* post
* Posts the data to the server.
*
* @name post
* @function
* @param {String} url The endpoint url.
* @param {Object} data The post data.
* @returns {Promise} The `fetch` promise.
*/
, post (url, data) {
data._csrf = data._csrf || _pageData.csrfToken;
return fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
credentials: "same-origin",
body: JSON.stringify(data)
});
}
/**
* getJSON
* Fetches from the server JSON data.
*
* @name getJSON
* @function
* @param {String} url The endpoint url.
* @returns {Promise} The `fetch` promise.
*/
, getJSON (url) {
return fetch(url, {
credentials: "same-origin"
}).then(c => c.json())
}
...
That’s the low-level side of sending/receiving any data to/from the
server using fetch
. Note: some browsers don’t have the fetch
technology, therefore we use a polyfill created by
GitHub to ensure the function is
there.
We collect three types of stats:
view-topic
Emitted when the user opens a topic.
Metadata:
topic_id
: The topic id.topic_author
: The user id of the topic author.
Code snippet:
util.post("/api/stats", { event: "view-topic", metadata: { topic_id: topic._id, topic_author: topic.author._id } });
score-click
Emitted when the user clicks the View scores button.
Metadata:
hacker_id
: The user that was clicked.
Code snippet:
util.post("/api/stats", { event: "score-click", metadata: { hacker_id: this.props.hacker._id } });
Clicks on the urls.
The following events are emitted:
click-project-url
: When clicking the project url.click-github-repo-url
: When clicking the GitHub repository url.
Metadata:
hacker_id
: The hacker id from the table.url
: The clicked url.
Code snippet:
util.post("/api/stats", { event: e.target.dataset.event, metadata: { hacker_id: this.props.hacker._id, url: e.target.href } });
The stats functionality on the server:
On the server, we create a custom endpoint at /api/stats
which
expects POST
data. We do not collect any stats from unauthenticated
users.
Along with the metadata we receive from the client side (see above) we add in the stat object the following information:
actor
: The current authenticated user id.event
: The event name.user_agent
: The user agent: this contains device and browser information.phase
: The phase of the contest.
The actor
is the authenticated user id, and it will always be
appended in the event object because we know there is an authenticated
user.
After we build the stats object, we call the Stats.record
which will
record the event in the database. The record
method is not anything
more than just a create query, after appending the created_at
field
in the event object.
Bloggify.server.addPage("/api/stats", "post", lien => {
const user = Session.getUser(lien);
if (!user) {
return lien.next();
}
const ev = {
actor: user._id,
event: lien.data.event,
metadata: lien.data.metadata || {}
};
ev.metadata.user_agent = lien.header("user-agent");
Settings.get((err, settings) => {
if (settings) {
ev.metadata.phase = settings.settings.hack_types[user.profile.hack_type].phase;
}
Stats.record(ev, (err, data) => {
if (err) {
return lien.apiError(err);
}
lien.apiMsg("success");
});
});
});
GitHub Login¶
We used
`bloggify-github-login
<https://github.com/Bloggify/github-login>`__
to handle the GitHub authentication.
By providing the GitHub application credentials, this module handles the OAuth2 workflow.
{
"githubClient": "45...7",
"githubSecret": "1f...2"
}
Email Notifications¶
To send emails, we use
`bloggify-sendgrid
<https://github.com/Bloggify/bloggify-sendgrid>`__.
{
"key": "SG.SmlHGA...ylY"
}
The notifications.js
file takes care of sending the emails using
this module. We send emails when:
Somebody creates a new topic
Emails are sent to all the users from the forum the author belongs to, except to the author.
Somebody posts a comment
Emails are sent to previous people involved in the conversation.


create-next-app
npx create-next-app --example with-styled-components my-app
Each JS file in the /pages
folder is a page.
pages/index.js
pages/about.js
pages/account/settings.js
HTML is generated at build time
Good for websites with static data, or with data that doesn't change often.
HTML is generated on each request
Good for websites with data that changes often, or web apps with authentication.
getStaticProps
getServerSideProps
pages/users/[id].js
pages/[username]/posts.js
Whatever is in []
will be passed to the data-fetching
functions.
For static generation, getStaticPaths
is also
necessary.
import Link from 'next/link';
import { useRouter } from 'next/router';
function SignIn() {
const router = useRouter();
function handleSignInSuccess() {
router.push('/dashboard');
}
// ...
}
Files in the /public
folder will be served as-is.
These files can be accessed in your code starting from the base
URL (/
).
// next.config.js
module.exports = {
i18n: {
locales: ['en', 'pt'],
defaultLocale: 'en'
}
};
function AboutPage() {
const { locale } = useRouter();
//...
}
A CSS-in-JS library
DocumentationA data-fetching library
Documentation


Perfumes, perfumed or eau de toilette?
What is actually on your table?
- June 17, 2020
- by Melissa Jones
- 114
- 35
The history of perfume is about 5,000 years old and dates back to ancient Egypt and Mesopotamia. The fragrances of those times differed significantly from modern ones in that they were very concentrated and were more often intended for religious ceremonies than for cosmetic purposes. Although the same Cleopatra had her own perfume factory and left behind a recipe for a fragrance of 16 ingredients - "kifi". It is difficult to call it a perfume in the modern sense - it is rather a mixture of oils and herbs. Modern perfumes can have a maximum of 30% aromatic component, everything else - an alcoholic solution. But do not be upset. If you do not need such extravagant appearances as in the queen of Egypt, when the fragrances of her ships spread throughout the coast, then 100% concentrate is unlikely to be needed.
About sustainability
It would seem that everything is clear here: the higher the concentration of aromatic components - the more stable the aroma. But not everything is so simple: even if in the laboratory the aroma stays calm for a day or more, in life it is influenced by humidity and temperature, skin condition and the aroma of your body. Therefore, experts advise to apply fragrances on a clean, moisturizing body lotion. But even this does not guarantee that super-concentrated perfumes will last longer than perfumed or eau de toilette. It all depends on the volatility of the ingredients themselves.
“Fruity notes are considered the lightest, but sandalwood and amber - the strongest. This does not mean that fruit flavors should be forgotten. First, they have a good plume, and secondly, history knows many cases where the aroma was much more stable than required by the situation.”
- Perfume Is the most expensive type of perfume, because it contains the highest concentration of aromatic composition - 20-30%. Therefore, they should be used only for special events.
- Perfumed water Is the most concentrated after perfumes mixture of perfume composition 12-15% with ethyl alcohol 85%.
- Cologne is the least concentrated type of perfume. Contains 5% aromatic substances dissolved in 80% ethyl alcohol. By the way, it was the most famous French emperor who introduced colognes into fashion and used 1-2 bottles a day
- Eau de toilette is what is most likely on your cosmetic table. The most common type of perfume. Contains 6-12% of the perfume composition. The term itself, by the way, was invented by Napoleon when he invented a bergamot-based fragrance recipe during a military campaign and called it "eau de toilette."
about aromas in more detail
In 1990, the French Perfume Committee approved the following classification:
- Citrus - based on essential oils of orange, tangerine and bergamot;
- Floral - based on the essence of fresh flowers: roses, jasmine, lilac and others;
- Woody - based on the essential oils of sandalwood, cedar, goldenrod;
- Oriental - based on musk, amber, cinnamon and coriander;
- Leather - fragrances based on animal skin;
- Shiprovi - contain incense, oakmoss, patchouli;
- Wine glasses - complex aromas with wood moss, lavender and coumarin.
Ea amet ex sunt culpa mollit. Aliquip proident ullamco do laboris eiusmod aute ullamco. Duis cupidatat magna excepteur laborum consectetur tempor nulla consectetur dolor consequat incididunt. Veniam ut ut aliquip voluptate fugiat velit laboris. Amet cupidatat nulla voluptate cillum sint nostrud amet aute duis labore minim ipsum. Adipisicing veniam laboris non irure in esse ex aliqua duis eiusmod anim ea. Nostrud consectetur veniam ea officia. Id eu cillum quis ullamco eiusmod in ullamco officia in incididunt sit amet. Anim ullamco excepteur in nisi irure in pariatur. Incididunt anim pariatur pariatur sunt mollit excepteur esse ea sint sit Lorem enim. Consectetur occaecat ut consequat tempor anim proident eu mollit exercitation mollit proident Lorem. Reprehenderit amet ipsum.
comments (3)


Welcome to httpsters.me
A collaboration made possible by:
David Nuon
Ryan Wilcox
Matthew Miller
Leo Postovoit
Join us on
Github


Sidenav Left
This sidenav is locked open on your device. To go back to the default behavior, narrow your display.
Home
Charts
☰
{{pageTitle}}


GDC
Basic Information:
Graphic Design Club is a club for people who like graphic design or would like to learn graphic design to meet up. At first, GDC will be a rendezvous for people who like graphic design, but later we aim to spread our arms to the wider community around us. In the future, once the club grows, we hope to be able to bring quality graphics to the community outside of ISB.
What GDC will provide to the community:
Students, and later people from the community, can come to the GDC to request for some design to be done. This can be either free, and possibly even paid.
Benefits of joining the GDC:
Members will be able to communicate with other graphic designers, share ideas, improve their skills, and most importantly have fun.


This library allows users to login to a given website through out the OpenId, OAuth1 or OAuth2 protocols. Users will be redirect to their provider account site (e.g. Facebook, Google, Twitter, etc), once they provide their user account and password will be redirect back to the given website.


How the Documentation System Works
The initial configuration starts with the docfx.json
file.
Basically this says what code it should pick up, where the .md
files are and where to put the output.
We've tried to make it very clear where we made relevant changes and smuggled comment-nodes into the file for clarity.
Layout
The layout is configured in the docfx.json
where it will
start with the default
template, extend it with statictoc
(generate real html menu-structures, not just JS)
and then apply the layout specified in layout\oqtane
.
It will also include images in layout\images
like logos etc. because this was configured in docfx.json
.
Site Navigation
The site navigation is cascaded through the toc.yml
files in each folder.
Tip
You may also find examples online which use toc.md
files
but you'll run into requirements that will force you to switch back to YAML.
So we recommend you stick to the yaml format everywhere.
What Code is included in the Docs
- The initial set is configured in the
docfx.json
with the base pathcwd
and include/filter files. - Then we have a few basic rules, which are all configured in the
filterConfig.yml
file.- Ignore all
Microsoft.*
,System.*
andOqtane.Test.*
namespaces
- Ignore all
Troubleshooting
Problems with MSBuild or .net SDK
Docfx runs MSBuild to compile the projects it finds. This can easily cause trouble if your Dev-PC has been through various versions of Visual-Studio. If you need to troubleshoot this, best contact iJungleboy on Github.
Problems with Old / Unexpected Results
MSBuild will compile everyting into the obj
folder of this docs-project.
This is used as a cache for the next builds. If you run into unexpected results, always clean out the obj
folder first.
Problems with Github links
Docfx automatically links all the auto-generated docs with the git-repo. So make sure that the oqtane.framework
is pulled from the official location https://github.com/oqtane/oqtane.framework
- otherwise the links will point to another repo.


Coverage report for
Generated at 30.11.2022 22:06:19 by DelphiCodeCoverage - an open source tool for Delphi Code Coverage.
Statistics for ..\..\Source\DECTypes.pas
| Number of lines covered | 3 | |
| Number of lines with code gen | 3 | |
| Line coverage | 100.0 % |
| 1 | {***************************************************************************** |
| 2 | The DEC team (see file NOTICE.txt) licenses this file |
| 3 | to you under the Apache License, Version 2.0 (the |
| 4 | "License"); you may not use this file except in compliance |
| 5 | with the License. A copy of this licence is found in the root directory |
| 6 | of this project in the file LICENCE.txt or alternatively at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, |
| 11 | software distributed under the License is distributed on an |
| 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 13 | KIND, either express or implied. See the License for the |
| 14 | specific language governing permissions and limitations |
| 15 | under the License. |
| 16 | *****************************************************************************} |
| 17 | |
| 18 | /// <summary> |
| 19 | /// Declarations of various datatypes, some of those have not been |
| 20 | /// declared for certain platforms but are used in DEC and some do change |
| 21 | /// meanings between platforms like PLongWord where LongWord is 32 bit on |
| 22 | /// Windows and Android but 64 bit on iOS for instance |
| 23 | /// </summary> |
| 24 | unit DECTypes; |
| 25 | |
| 26 | interface |
| 27 | |
| 28 | {$INCLUDE DECOptions.inc} |
| 29 | |
| 30 | uses |
| 31 | {$IFDEF FPC} |
| 32 | SysUtils; |
| 33 | {$ELSE} |
| 34 | System.SysUtils; |
| 35 | {$ENDIF} |
| 36 | |
| 37 | type |
| 38 | {$IFNDEF FPC} |
| 39 | {$IF CompilerVersion <= 20} |
| 40 | // In D2009 NativeInt was not properly treated by the compiler under certain |
| 41 | // conditions. See: http://qc.embarcadero.com/wc/qcmain.aspx?d=71292 |
| 42 | NativeInt = Integer; |
| 43 | {$IFEND} |
| 44 | {$ENDIF} |
| 45 | |
| 46 | PUInt32Array = ^TUInt32Array; |
| 47 | TUInt32Array = array[0..1023] of UInt32; |
| 48 | |
| 49 | /// <summary> |
| 50 | /// Replacement for PLongWord, as LongWord changes between platforms from |
| 51 | /// 32 to 64 bit |
| 52 | /// </summary> |
| 53 | PUInt32 = ^UINT32; |
| 54 | |
| 55 | PUInt64Array = ^TUInt64Array; |
| 56 | TUInt64Array = array[0..1023] of UInt64; |
| 57 | |
| 58 | /// <summary> |
| 59 | /// Declared here because it is used by Blowfish cipher and BCrypt hash |
| 60 | /// </summary> |
| 61 | PBlowfish = ^TBlowfishMatrix; |
| 62 | TBlowfishMatrix = array[0..3, 0..255] of UInt32; |
| 63 | TBlowfishKey = array[0..17] of UInt32; |
| 64 | |
| 65 | /// <summary> |
| 66 | /// List of standard bit lengths defined in the official standard for some |
| 67 | /// algorithm property which allows a variable bit length. |
| 68 | /// </summary> |
| 69 | TStandardBitLengths = array of UInt16; |
| 70 | |
| 71 | /// <summary> |
| 72 | /// Reason for calling the progress event |
| 73 | /// </summary> |
| 74 | TDECProgressState = (Started, Processing, Finished); |
| 75 | |
| 76 | /// <summary> |
| 77 | /// Event type used by several hash- and cipher methods to display their |
| 78 | /// progress. It can be implemented as regular method, procedure and as |
| 79 | /// anonymous method, means: in place. |
| 80 | /// </summary> |
| 81 | /// <param name="Size"> |
| 82 | /// Number of bytes to process. For files this is usually the file size. For |
| 83 | /// streams this can be less than the stream size if the stream is not being |
| 84 | /// processed from the beginning. |
| 85 | /// </param> |
| 86 | /// <param name="Pos"> |
| 87 | /// Position within size in byte. For streams this may be a position |
| 88 | /// relative to the starting position for processing. |
| 89 | /// </param> |
| 90 | TDECProgressEvent = reference to procedure(Size, Pos: Int64; State: TDECProgressState); |
| 91 | |
| 92 | // Exception Classes |
| 93 | |
| 94 | /// <summary> |
| 95 | /// Base exception class for all DEC specific exceptions, |
| 96 | /// </summary> |
| 97 | EDECException = class(Exception) |
| 98 | public |
| 99 | {$IFDEF FMXTranslateableExceptions} |
| 100 | /// <summary> |
| 101 | /// Creates the exception instance and makes the exception message translateable |
| 102 | /// via Firemonkey's TLang translation mechanism. Normal ressource strings |
| 103 | /// are not translated in the same way on mobile platforms as they are on |
| 104 | /// Win32/Win64. |
| 105 | /// </summary> |
| 106 | /// <param name="Msg"> |
| 107 | /// String with a failure message to be output or logged |
| 108 | /// </param> |
| 109 | constructor Create(const Msg: string); reintroduce; overload; |
| 110 | /// <summary> |
| 111 | /// Creates the exception instance and makes the exception message translateable |
| 112 | /// via Firemonkey's TLang translation mechanism. Normal ressource strings |
| 113 | /// are not translated in the same way on mobile platforms as they are on |
| 114 | /// Win32/Win64. |
| 115 | /// </summary> |
| 116 | /// <param name="Msg"> |
| 117 | /// String with a failure message to be output or logged |
| 118 | /// </param> |
| 119 | /// <param name="Args"> |
| 120 | /// Array with values for the parameters specified in the format string |
| 121 | /// </param> |
| 122 | constructor CreateFmt(const Msg: string; |
| 123 | const Args: array of const); reintroduce; overload; |
| 124 | {$ENDIF} |
| 125 | end; |
| 126 | |
| 127 | /// <summary> |
| 128 | /// Exception class used when reporting that a class searched in a list is |
| 129 | /// not contained in that list, e.g. when searching for a non existant |
| 130 | /// formatting class. |
| 131 | /// </summary> |
| 132 | EDECClassNotRegisteredException = class(EDECException); |
| 133 | /// <summary> |
| 134 | /// Exception class for reporting formatting related exceptions |
| 135 | /// </summary> |
| 136 | EDECFormatException = class(EDECException); |
| 137 | /// <summary> |
| 138 | /// Exception class for reporting exceptions related to hash functions |
| 139 | /// </summary> |
| 140 | EDECHashException = class(EDECException); |
| 141 | /// <summary> |
| 142 | /// Exception class for reporting encryption/decryption caused exceptions |
| 143 | /// </summary> |
| 144 | EDECCipherException = class(EDECException); |
| 145 | /// <summary> |
| 146 | /// Exception class for reporting calculation of a wrong authentication |
| 147 | /// value when decrypting using a cipher supporting authentication |
| 148 | /// </summary> |
| 149 | EDECCipherAuthenticationException = class(EDECException); |
| 150 | |
| 151 | /// <summary> |
| 152 | /// Exception class for reporting the use of abstract things which cannot |
| 153 | /// be called directly |
| 154 | /// </summary> |
| 155 | EDECAbstractError = class(EDECException) |
| 156 | /// <summary> |
| 157 | /// Create the exception using a meaningfull error message |
| 158 | /// </summary> |
| 159 | constructor Create(ClassName: string); overload; |
| 160 | end; |
| 161 | |
| 162 | const |
| 163 | { TODO : Check why this is a constant, which is immediately used by the |
| 164 | resource string. Is this because of the lack of resource string support |
| 165 | of FMX on some platforms?} |
| 166 | cAbstractError = 'Abstract Error: %s is not implemented'; |
| 167 | |
| 168 | resourcestring |
| 169 | sAbstractError = cAbstractError; |
| 170 | |
| 171 | implementation |
| 172 | |
| 173 | { EDECException } |
| 174 | |
| 175 | {$IFDEF FMXTranslateableExceptions} |
| 176 | constructor EDECException.Create(const Msg: string); |
| 177 | begin |
| 178 | inherited Create(Translate(msg)); |
| 179 | end; |
| 180 | |
| 181 | constructor EDECException.CreateFmt(const Msg: string; |
| 182 | const Args: array of const); |
| 183 | begin |
| 184 | inherited Create(Format(Translate(Msg), Args)); |
| 185 | end; |
| 186 | |
| 187 | constructor EDECAbstractError.Create(ClassName: string); |
| 188 | begin |
| 189 | inherited Create(Format(Translate(sAbstractError), [ClassName])); |
| 190 | end; |
| 191 | {$ELSE} |
| 192 | constructor EDECAbstractError.Create(ClassName: string); |
| 193 | begin |
| 194 | inherited CreateResFmt(@sAbstractError, [ClassName]); |
| 195 | end; |
| 196 | {$ENDIF} |
| 197 | |
| 198 | end. |


Demo application base class and 3D physics demos based on ammo.js. Support for several scenegraphs including Three.js and SceneJS.
Stefan Hedman<EMAIL_ADDRESS>Get the source code on GitHub : schteppe/ammo.js-demos
A chessboard with physics.
A car and two piles of.. letters?
A double pendulum.
This is Bob. Bob likes to play. Just make sure he doesn't get hurt...
Same Ragdoll demo, but rendered using Three.js
Use the arrow keys to control a little car.
25 boxes are stacked on each other to form a wall. Tear the wall down using the mouse or shoot spheres at it to see it fall.


Upgrade
These are the release notes and advice for upgrading Joda-Time from version 2.2 to version 2.3.
Joda-Time version 2.3 --------------------- Joda-Time is a date and time handling library that seeks to replace the JDK Date and Calendar classes. This release contains enhancements, bug fixes and a time zone update. The release runs on JDK 5 or later. Joda-Time is licensed under the business-friendly Apache License Version 2. This is the same license as all of Apache, plus other open source projects such as Spring. The intent is to make the code available to the Java community with the minimum of restrictions. If the license causes you problems please contact the mailing list. ** Please also check out our related projects ** ** https://www.joda.org/joda-time/related.html ** Enhancements since 2.2 ---------------------- - Interval/MutableInterval .isEqual() [#20] Add method to compare intervals ignoring the chronology https://github.com/JodaOrg/joda-time/issues/20 - Chronology classes now define equals methods [#36] Previously, the Chronology classes relied on caching in factory methods to guarantee instances were singletons Now, there are dedicated, normal, equals methods This will aid weird cases where deserialization or similar avoids the caches It will make no difference to most users - Maximum size for pattern cache [#49] Sets a maximum size for the cache to avoid memory issues - Add LocalDateTime.toDate(TimeZone) [#48] Provides an alternate way to create a java.util.Date that avoids some synchronization - Home page moved https://www.joda.org/joda-time Compatibility with 2.2 ---------------------- Build system - Yes Binary compatible - Yes Source compatible - Yes Serialization compatible - Yes Data compatible - Yes, except - DateTimeZone data updated to version 2013d Semantic compatible - Yes, except - DateTimeZone is now limited to offsets from -23:59:59.999 to +23:59:59.999 - BasicChronology now defines an equals method This which would affect you if you subclassed it (unlikely) - GJChronology now has a minimum cutover instant of 0001-01-01 (Gregorian) Its unlikely you have it set earlier than this If you did your code was broken anyway Deprecations since 2.2 ---------------------- - DateMidnight [#41] This class is flawed in concept The time of midnight occasionally does not occur in some time-zones This is a result of a daylight savings time from 00:00 to 01:00 DateMidnight is essentially a DateTime with a time locked to midnight Such a concept is more generally a poor one to use, given LocalDate Replace DateMidnight with LocalDate Or replace it with DateTime, perhaps using the withTimeAtStartOfDay() method Bug fixes since 2.2 ------------------- - ZoneInfoCompiler and DateTimeZoneBuilder multi-threading [#18] A thread local variable was previously only initialised in one thread causing NPE https://github.com/JodaOrg/joda-time/issues/18 - Short time-zone name parsing failed to match the longest name This affected two short names where one is a short form of the second such as "UT" and "UTC" - Days.daysBetween fails for MonthDay [#22] Incorrect calculation around leap years - DateTimeZone failed to validate offsets [#43] Previously, there was little validation, resulting in the ability to create large offsets Those offsets could fail in other parts of the library Now, it is limited to -23:59:59.999 to +23:59:59.999 - DateTimeZone.forOffsetHoursMinutes failed to allow offsets from -00:01 to -00:59 [#42] The forOffsetHoursMinutes() method could not create an offset from -00:01 to -00:59 This was due to an inappropriate design A backwards compatible change to the input handling has been made forOffsetHoursMinutes(0, -15) now creates -00:15 - DateTimeFormatter.parseInto [#21] Fix parseInto() where it obtains the default year for parsing from the ReadWritableInstant Previously, the wrong year could be obtained at the start or end of the year in non UTC zones Now obtains the year from the ReadWritableInstant using the chronology of the ReadWritableInstant - Better thread-safety in ISODateTimeFormat [#45] - Fix GJChronology.plus/minus across cutover and year zero [#28] When subtracting a number of years from a date in the GJChronology there are two considerations The cutover date might be crossed, and year zero might be crossed (there is no year zero in GJ) Previously, each were handled separately, but not together. Now it is fixed As part of this change, the minimum cutover instant was set to 0001-01-01 (Gregorian) Scala -------- Joda-Time uses annotations from Joda-Convert. In the Java programming language, this dependency is optional, however in Scala it is not. Scala users must manually add the Joda-Convert v1.2 dependency.


This calculator is based on a simple computer calculator which performs several tasks like addition,subtraction,multiplication and some other tasks. This is designed with assembly language.Functions of this calculator are given below with their proper description.
| Function | Description |
|---|---|
| Addition (+) | The addition function add two numbers and show the result. |
| Subtraction (-) | The subtraction function subtract two numbers and show the result.If we subract a greater number from a lower number the result will be in negative |
| Multiplication (*) | The multiplication function multiply two numbers and show the result. |
| Division (/) | The division function divide the divident by the divisor and show the result. |
| Mod (%) | The Mod function will show the remainder after any divison. |
| Square (^) | The Square Function will square the number entered |


{% extends "layout.html" %} {% block page_title %} Apprenticeships {% endblock %} {% block content %} BETA This is a new service – your feedback will help us to improve it. Red & White Holdings Ltd Ty Fairclough View accountlog out Home Finance Training More SFA contracts Manage team {% endblock %}
BETA This is a new service – your feedback will help us to improve it.


What would you like to do?
Adjust the slider to choose the number of meals to return.
{{ meal.meal_name }}
Category: {{ meal.category }}
Protein: {{ meal.sub_category }}
Estimated Cost: $ {{ meal.avg_price }}
Estimated Grocery Bill: $ {{ groceryBill }}
{{ recipe.label }}


This video is raw footage from the inside the Seattle Academy Campus. Our builders used this footage to accurately scale classrooms and buildings in minecraft.
View ProjectThis is a tutorial vidoe that one of the contributors used te build the lockers in the locker room. Attention to detail and scale has helped make this project realistic.
View ProjectWe followed this video tutorial to make the basketball court. The court is the center of our campus, and the Minecraft version is a perfect replica.
View Project


1 write to _disposed
Microsoft.Management.Infrastructure.CimCmdlets (1)
CimSessionOperations.cs (1)
309
this.
_disposed
= true;
1 reference to _disposed
Microsoft.Management.Infrastructure.CimCmdlets (1)
CimSessionOperations.cs (1)
303
if (!this.
_disposed
)