{% include 'head.html' %}
Settings
< back
Name:
Delay
None
1 Minute
2 Minutes
5 Minutes
15 Minutes
Maximum Room Occupancy:
Show Solved Problems Alongside Current Problems
Create Room


So today was an exceptional day for me, both at and after work. At work, we had our sprint retrospective meeting, in which we discussed the effect of certain goal-setting processes that our company was planning on the culture of the tech team. Outside of work, in my general mentorship call, one of my mentees, Vivek Singh, was talking about hacking his ability to receive rejection and abuse. Where we discussed a two-pronged process. First, analyse, and interrogate anything that you do not understand. Second, if there is nothing new any step in the above process, stopping give any more importance to the situation. Another thing that happened, which was the most interesting, and the inspiration to this blog, is an article shared by one of my colleagues, Anuj Jain, regarding "The Role of Metacognition in explaining decision-making styles".
This was a really interesting read for me, because this was the first time I was introduced to the concept of meta-cognition. So the paper defines metacognition as "the higher-order cognitive skills that help people monitor and control their information processing". Two components of metacognition have been widely recognised:
Now, I didn't want to read another research paper to understand the different decision-making styles (but I would have if I had to). Thankfully, this blog by Udemy exists, which very cleanly summarizes the different types of decision making. I urge you to read the blog itself - it explains these concepts really well. Although, I will anyway provide the high-level categorization of the decision making styles here as well, along with my own super-short descriptions of the same. Please do not rely on these definitions. Read the original article, which is barely a 10-minute read and very well structured.
So there are four main styles of decision making:
But even more interestingly, the blog also mentions "Group decision making styles". I think this is more interesting because depending on the group that you are a part of, having an understanding of these different types of decision-making styles can come in handy. If you remember these group decision making styles, you will be better equipped to analyse the kind of group you are working with, and use a style that would work best in a given situation! And if this is going to be your group for an extended period of time, and if you have a preference among the different group decision making styles, you can make everyone in your group aware of these styles and try to mould the group behaviour so that it suits your favourite decision-making style. Okay, the last statement might be controversial, but I will go ahead and describe the different types of group decision making styles below, and you can let me know based on that, whether you agree with me or not.
From a first reading, I can already recognise the type of group decision making styles that I would like to apply in different situations. For example, it is obvious to go for the autocratic style in times of emergency. Whereas, when working as a part of the founding team, or as part of the board of directors for a company, the consensus style might be the best way forward. When leading an execution team, the collective style resonates with me the most. And I would use the democratic style only when I have no idea and opinion regarding the situation, and the stakes of the decision are not high enough for me to invest myself into gaining the required knowledge.
What do you think? How would you use these different decision-making styles? Do you see any caveats in the methodology that I have proposed? I understand that I might have missed out on a tonne of different situations in my assessment. And I would love to know your perspective on them.


By Andre Medeiros at DjangoCon Finland 2013
Andre Medeiros
Founder at Iroquote.com
Next generation discussion forums
Brazilian that doesn't play soccer
M.Sc. from Aalto University
fooman = {"name" : "Foo", "age" : 25};
db.users.save(fooman);
# Python
person = {
'name': "John Doe",
'skills': ["Javascript", "CSS", "HTML"],
'work': None
}
// Javascript
person = {
"name" : "John Doe",
"skills" : ["Javascript", "CSS", "HTML"],
"work" : null
};
Writing Python is fun, and keeping everything in Python limits the number of times your brain has to do a "context switch." It helps productivity if you keep yourself in a single programming environment/mentality for as long as possible.—Djangobook.com
If MongoDB had existed 10 years ago the vast majority of data used to drive modern web applications would be stored in MongoDB and not a relational database.—Will Shulman, CEO & Co-founder of MongoLab
{
"_id" : ObjectId("5500165de50c050005e4b29f"),
"title" : "Using MongoDB as your primary Django database",
"message" : "This presentation introduces MongoDB to Django de...",
"author" : ObjectId("5182953ba50c051575e4b29c"),
"creation_date" : ISODate("2013-05-21T12:44:31.408Z"),
"tags" : ["django","python","mongodb","mongoengine","nosql"],
"comments" : [
{
"author" : ObjectId("50c90b3128650a004200961a"),
"message" : "Nice, I didn't know this was possible."
}
],
}
At the core of Django is its ORM
MongoEngine
is an Object-Document Mapper made for MongoDB, following Django's ORM style.
pip install mongoengine==0.8.0
from mongoengine import *
class Choice(EmbeddedDocument):
choice_text = StringField(max_length=200)
votes = IntField(default=0)
class Poll(Document):
question = StringField(max_length=200)
pub_date = DateTimeField(help_text='date published')
choices = ListField(EmbeddedDocumentField(Choice))
{
"_id" : ObjectId("5483165de50c050005e4b29f"),
"question" : "What's up?",
"pub_date" : ISODate("2013-04-14T11:06:21.922Z"),
"choices" : [
{
"choice_text" : "Not much",
"votes" : 0
},
{
"choice_text" : "Just hacking again",
"votes" : 1
}
],
}
from yourproject.models import Poll, Choice
poll = Poll.objects(question__contains="What").first()
choice = Choice(choice_text="I'm at DjangoCon.fi", votes=23)
poll.choices.append(choice)
poll.save()
print poll.question
class Poll(Document):
question = StringField(max_length=200)
pub_date = DateTimeField(help_text='date published')
choices = ListField(EmbeddedDocumentField(Choice))
meta = {
'indexes': [
'question',
('pub_date', '+question')
]
}
python manage.py syncdb
import mongoengine
DATABASES = {
'default': {
'ENGINE': '',
},
}
SESSION_ENGINE = 'mongoengine.django.sessions' # optional
_MONGODB_USER = 'mongouser'
_MONGODB_PASSWD = 'password'
_MONGODB_HOST = 'thehost'
_MONGODB_NAME = 'thedb'
_MONGODB_DATABASE_HOST = \
'mongodb://%s:%s@%s/%s' \
% (_MONGODB_USER, _MONGODB_PASSWD, _MONGODB_HOST, _MONGODB_NAME)
mongoengine.connect(_MONGODB_NAME, host=_MONGODB_DATABASE_HOST)
AUTHENTICATION_BACKENDS = (
'mongoengine.django.auth.MongoEngineBackend',
)
import mongoengine
# ...
user = authenticate(username=username, password=password)
assert isinstance(user, mongoengine.django.auth.User)
from django.test.simple import DjangoTestSuiteRunner
from django.test import TestCase
class NoSQLTestRunner(DjangoTestSuiteRunner):
def setup_databases(self):
pass
def teardown_databases(self, *args):
pass
class NoSQLTestCase(TestCase):
def _fixture_setup(self):
pass
def _fixture_teardown(self):
pass
TEST_RUNNER = 'yourproject.tests.NoSQLTestRunner'


--- layout: post title: no title date: '2017-08-19T11:30:11+02:00' categories: - Sketches - Sketchbooks picture_url: https://film-Storyboards.tumblr.com/post/164371420565 ---


GameVersion
–
+
×
Current Game Version:
Click
here
to change Game Version
Settings Info
–
+
×
Key (
)
Value (
)
English Version (
)
Arabic Version (
)
Save
Publish Development
Version Load Balancers
–
+
×
Key (
)
Value (
)
Save
Publish Development
Version Smartfox
–
+
×
From Version
To Version
Update Type
Description
iOS New Version URL
Android New Version URL
Add Version SFS
Tournament Duration
–
+
×
Key (
)
Value (
)
Save
Publish Server
Dagger Search Ranges
–
+
×
Key (
)
Value (
)
Save
Publish Server
Match Limit
–
+
×
Key (
)
Value (
)
Save
Publish Server
Purchases
–
+
×
Key (
)
Value (
)
Save
Publish Server
Delete Unuse Version
–
+
×
Unuse Version
Delete Unuse Version
Change Game Sub Version
–
+
×
Change to game Sub_Version
Change Game Sub-version


mongoc_client_read_command_with_opts()¶
Synopsis¶
bool
mongoc_client_read_command_with_opts (mongoc_client_t *client,
const char *db_name,
const bson_t *command,
const mongoc_read_prefs_t *read_prefs,
const bson_t *opts,
bson_t *reply,
bson_error_t *error);
Execute a command on the server, applying logic that is specific to commands that read, and taking the MongoDB server version into account. To send a raw command to the server without any of this logic, use mongoc_client_command_simple().
Use this function for commands that read such as “count” or “distinct”. Read concern is applied from opts
or else from client
. Collation is applied from opts
(see example below). Read concern and collation both require MongoDB 3.2 or later, otherwise an error is returned. Read preferences are applied from read_prefs
or else from client
. No write concern is applied.
To target a specific server, include an integer “serverId” field in opts
with an id obtained first by calling mongoc_client_select_server(), then mongoc_server_description_id() on its return value.
reply
is always initialized, and must be freed with bson_destroy()
.
Parameters¶
client
: A mongoc_client_t.db_name
: The name of the database to run the command on.command
: Abson_t
containing the command specification.read_prefs
: An optional mongoc_read_prefs_t.opts
: Abson_t
containing additional options.reply
: A location for the resulting document.error
: An optional location for a bson_error_t orNULL
.
Errors¶
Errors are propagated via the error
parameter.
Returns¶
Returns true
if successful. Returns false
and sets error
if there are invalid arguments or a server or network error.
Example¶
/*
Demonstrates how to prepare options for mongoc_client_read_command_with_opts and
mongoc_client_write_command_with_opts. First it calls "cloneCollectionAsCapped"
command with "writeConcern" option, then "distinct" command with "collation" and
"readConcern" options,
Start a MongoDB 3.4 replica set with --enableMajorityReadConcern and insert two
documents:
$ mongo
MongoDB Enterprise replset:PRIMARY> db.my_collection.insert({x: 1, y: "One"})
WriteResult({ "nInserted" : 1 })
MongoDB Enterprise replset:PRIMARY> db.my_collection.insert({x: 2, y: "Two"})
WriteResult({ "nInserted" : 1 })
Build and run the example:
gcc example-command-with-opts.c -o example-command-with-opts $(pkg-config
--cflags --libs libmongoc-1.0)
./example-command-with-opts [CONNECTION_STRING]
cloneCollectionAsCapped: { "ok" : 1 }
distinct: { "values" : [ 1, 2 ], "ok" : 1 }
*/
#include <mongoc.h>
#include <stdio.h>
#include <stdlib.h>
int
main (int argc, char *argv[])
{
mongoc_client_t *client;
const char *uristr = "mongodb://<IP_ADDRESS>/?appname=client-example";
bson_t *cmd;
bson_t *opts;
mongoc_write_concern_t *write_concern;
mongoc_read_prefs_t *read_prefs;
mongoc_read_concern_t *read_concern;
bson_t reply;
bson_error_t error;
char *json;
mongoc_init ();
if (argc > 1) {
uristr = argv[1];
}
client = mongoc_client_new (uristr);
if (!client) {
fprintf (stderr, "Failed to parse URI.\n");
return EXIT_FAILURE;
}
mongoc_client_set_error_api (client, 2);
cmd = BCON_NEW ("cloneCollectionAsCapped",
BCON_UTF8 ("my_collection"),
"toCollection",
BCON_UTF8 ("my_capped_collection"),
"size",
BCON_INT64 (1024 * 1024));
/* include write concern "majority" in command options */
write_concern = mongoc_write_concern_new ();
mongoc_write_concern_set_wmajority (write_concern, 10000 /* wtimeoutMS */);
opts = bson_new ();
mongoc_write_concern_append (write_concern, opts);
if (mongoc_client_write_command_with_opts (
client, "test", cmd, opts, &reply, &error)) {
json = bson_as_canonical_extended_json (&reply, NULL);
printf ("cloneCollectionAsCapped: %s\n", json);
bson_free (json);
} else {
fprintf (stderr, "cloneCollectionAsCapped: %s\n", error.message);
}
bson_free (cmd);
bson_free (opts);
/* distinct values of "x" in "my_collection" where "y" sorts after "one" */
cmd = BCON_NEW ("distinct",
BCON_UTF8 ("my_collection"),
"key",
BCON_UTF8 ("x"),
"query",
"{",
"y",
"{",
"$gt",
BCON_UTF8 ("one"),
"}",
"}");
read_prefs = mongoc_read_prefs_new (MONGOC_READ_SECONDARY);
/* "One" normally sorts before "one"; make "One" sort after "one" */
opts = BCON_NEW ("collation",
"{",
"locale",
BCON_UTF8 ("en_US"),
"caseFirst",
BCON_UTF8 ("lower"),
"}");
/* add a read concern to "opts" */
read_concern = mongoc_read_concern_new ();
mongoc_read_concern_set_level (read_concern,
MONGOC_READ_CONCERN_LEVEL_MAJORITY);
mongoc_read_concern_append (read_concern, opts);
if (mongoc_client_read_command_with_opts (
client, "test", cmd, read_prefs, opts, &reply, &error)) {
json = bson_as_canonical_extended_json (&reply, NULL);
printf ("distinct: %s\n", json);
bson_free (json);
} else {
fprintf (stderr, "distinct: %s\n", error.message);
}
bson_destroy (cmd);
bson_destroy (opts);
bson_destroy (&reply);
mongoc_read_prefs_destroy (read_prefs);
mongoc_read_concern_destroy (read_concern);
mongoc_write_concern_destroy (write_concern);
mongoc_client_destroy (client);
mongoc_cleanup ();
return EXIT_SUCCESS;
}


Communication Engineering graduate, Student of Global Software Development program at University of Applied Science, Fulda
Always eager to learn and try new stuff. Responsible for Back-end development in Project :)


public class CTM
extends java.lang.Object
implements java.io.Serializable
| Modifier | Constructor and Description |
|---|---|
|
CTM()
Create the identity matrix
|
|
CTM(java.awt.geom.AffineTransform at)
Initialize a CTM with the values of an AffineTransform.
|
protected |
CTM(CTM ctm)
Initialize a CTM with the values of another CTM.
|
|
CTM(double x,
double y)
Initialize a CTM to the identity matrix with a translation
specified by x and y
|
|
CTM(double a,
double b,
double c,
double d,
double e,
double f)
Initialize a CTM from the passed arguments.
|
| Modifier and Type | Method and Description |
|---|---|
static CTM |
getCTMandRelDims(int absRefOrient,
WritingMode writingMode,
java.awt.geom.Rectangle2D absVPrect,
FODimension reldims)
Construct a coordinate transformation matrix (CTM).
|
static CTM |
getWMctm(WritingMode wm,
int ipd,
int bpd)
Return a CTM which will transform coordinates for a particular writing-mode
into normalized first quandrant coordinates.
|
CTM |
multiply(CTM premult)
Multiply new passed CTM with this one and generate a new result CTM.
|
CTM |
rotate(double angle)
Rotate this CTM by "angle" radians and return a new result CTM.
|
CTM |
scale(double x,
double y)
Scale this CTM by the passed x and y values and return a new result CTM.
|
java.awt.geom.AffineTransform |
toAffineTransform()
Returns this CTM as an AffineTransform object.
|
double[] |
toArray()
Get an array containing the values of this transform.
|
java.lang.String |
toString()
Get string for this transform.
|
java.awt.geom.Rectangle2D |
transform(java.awt.geom.Rectangle2D inRect)
Transform a rectangle by the CTM to produce a rectangle in the transformed
coordinate system.
|
CTM |
translate(double x,
double y)
Translate this CTM by the passed x and y values and return a new result CTM.
|
public CTM()
public CTM(double a, double b, double c, double d, double e, double f)
a
- the x scaleb
- the x shearc
- the y sheard
- the y scalee
- the x shiftf
- the y shiftpublic CTM(double x, double y)
x
- the x shifty
- the y shift.protected CTM(CTM ctm)
ctm
- another CTMpublic CTM(java.awt.geom.AffineTransform at)
at
- the transformation matrixpublic static CTM getWMctm(WritingMode wm, int ipd, int bpd)
wm
- A writing mode constant from fo.properties.WritingMode, ie.
one of LR_TB, RL_TB, TB_RL, TB_LR.ipd
- The inline-progression dimension of the reference area whose
CTM is being set..bpd
- The block-progression dimension of the reference area whose
CTM is being set.public CTM multiply(CTM premult)
premult
- The CTM to multiply with this one. The new one will be
the first multiplicand.public CTM rotate(double angle)
angle
- The angle in radians. Positive angles are measured counter-
clockwise.public CTM translate(double x, double y)
x
- The amount to translate along the x axis.y
- The amount to translate along the y axis.public CTM scale(double x, double y)
x
- The amount to scale along the x axis.y
- The amount to scale along the y axis.public java.awt.geom.Rectangle2D transform(java.awt.geom.Rectangle2D inRect)
inRect
- The rectangle in the original coordinate systempublic java.lang.String toString()
toString
in class java.lang.Object
public double[] toArray()
public java.awt.geom.AffineTransform toAffineTransform()
public static CTM getCTMandRelDims(int absRefOrient, WritingMode writingMode, java.awt.geom.Rectangle2D absVPrect, FODimension reldims)
absRefOrient
- absolute reference orientationwritingMode
- the writing modeabsVPrect
- absolute viewpoint rectanglereldims
- relative dimensionsCopyright 1999-2020 The Apache Software Foundation. All Rights Reserved.


Premier League rivals linked with move for Aston Villa target - report
Aston Villa transfer news | The top flight's transfer window re-opens in January with Dean Smith's side able to strengthen for their survival mission in the New Year
by Richard CusackNorwich City have been linked with a move for Aston Villa summer target Jack Butland.
Villa were believed to be vying with AFC Bournemouth for the England international's services, but both sides ended up going a different route.
Bournemouth promoted Aaron Ramsdale - signed from Sheffield United in 2017 - to number one and Villa signed Tom Heaton from Burnley in an £8 million deal.
Jed Steer stepped up from deputy to Orjan Nyland - who got injured last season - to help guide Dean Smith 's side back to the Premier League through the Championship's play-offs.
Aston Villa latest
This is your round up of all things Villa; the one-stop shop that will keep you updated on the latest goings on at the club and beyond.
Transfers, injuries, match-days and managers, we’ve got you covered.
We’ll be bringing the very latest on the Villains throughout the week and around the clock.
Make sure you keep yourself updated with our handy daily catch up...
Must reads...
- Director reveals John McGinn's reaction to failed transfer
- Martin Keown fires puzzling criticism at Tyrone Mings
- What Jarrad Branthwaite has said about Villa interest
- Dean Smith urged to have a 'quiet word' with Frederic Guilbert
For all your latest AVFC news, opinion, analysis and transfer gossip, click here
You can follow our Villa reporter Ashley Preece on Twitter, and his email address is<EMAIL_ADDRESS>But Smith wanted a new stopper for his side's first campaign back in the top flight after three seasons in the Championship.
In the end he plumped for Heaton, balking at Stoke City's asking price of north of £20 million for Butland .
Butland is now set to be offered an escape route from the bet365 Stadium, report StokeonTrentLive , with the 26-year-old enduring a torrid few seasons with Mark Hughes, Paul Lambert, Gary Rowett, Nathan Jones and now Michael O'Neill all taking charge of Stoke since the 2017-18 season.


Magnolia: chubby rain
Traditionally, a commercial movie, no matter how experimental it pretends to be, will nevertheless cling to at least one dramatic requirement: the introduction, early on, of a problem, a question to be answered, something to be solved. It's important to get the audience's interest piqued early on, after all, else they won't pay attention. And the rules are simple: if it's a detective movie, start moments after the crime; if it's action, blow something up in the opening frames; if it's romance, start with heartbreak; if it's horror, kill somebody mysteriously; if it's drama, say Rosebud. Give us a starting point, something by which to gauge the progression of whatever narrative arc follows, lest we won't be engaged with the thing, will pay more attention to our popcorn/coke ratio. Or, in a movie better than three hours long, like Magnolia, we'll start paying attention to bladder elasticity, especially since Magnolia doesn't give us that initial problem to be solved.
Thing is, though, it does something better, something unexpected. Instead of involving us dramatically from the get-go, it offers a little narrated preface--the ostensible 'author' speaking directly to us, documenting what he calls 'matters of chance,' which comes to a handful of those ultra-coincidental stories we see anthologized in all those Strange Stories/Amazing Facts types books (if you're familiar with the Darwin Awards, you'll recognize some of them). What the narrator's doing is trying to extract meaning from those coincidental events, trying to make sense of a jumbled set of 'accidents' that, for one beautiful moment, all came together as something much greater than themselves, make the death they all conspired in a work of art.
And now, after allowing us a few moments to swallow this, to agree with him that strange forces are at work/play behind the curtains, the 'movie' starts, and, coincidentally enough, it's all just jumbled stuff going on, about as directionless as can be. Think Slacker, or--as we do have a cast so large--Shortcuts. Lots of scene-hopping, simultaneity (contiguity), more characters than you can initially remember names for, much less relationships between. Yet, all the same, you're not only interested, you're likely watching closer than you've watched any of those movies with 'traditional' hook-openings. Why? Because of the preface, because the narrator has properly prepped us for Magnolia, has intimated not only that mixed-up stuff can all come together into something wonderful, sometimes, but that it's going to happen here. What the preface does is function as a seductive admonition to pay attention, to not dismiss each scene as it fades from the screen but to keep it in mind with all the others, to weigh them the same until you know where and how they go, to hold them in some buffer portion of your mind until they can all be applied, at once. That'll be the rush (incidentally, this kind of rush also qualifies for the strict definition of 'catharsis'--letting out all the emotions at once, only here, those emotions are fabricated within the movie, by the movie, not something you bring to the theater yourself). Magnolia quietly promises such a rush, promises that all these random goings-on will eventually gel. Which puts us into the position to attempt to anticipate when where and how they'll come together.
Before it comes, though, that cathartic rush, those are the three of the better hours in moviedom, simply because, as we've been allowing everything the same weight, the same charge, the same level of meaning, and we suspect that there is a lot of meaning here, it's just temporarily unapplied, everything thus has the full meaning of Magnolia within it, in a potential state. We don't know if Frank T.J. Mackey's (Tom Cruise) motivational seminar is the key, if Officer Curring (John C. Reilly) losing his gun is the key, if a dog eating a dying man's pills is the key, or what, so we treat all of them as equally important, until we know better. And it's refreshing to traffic in a reality like that, where everything's magic, where everything means something, it's all interconnected. To see how it all fits we just have to, as American Beauty suggests, look closer.
As close as you look, however, still, just when you think you've got it all figured out, you don't. And you couldn't have. Really. Seriously. Part of you might feel it's unfair, but then the other part of you's caught up in the thrill of it. The nearest approximation would have to be in Fisher King, when all the train-station people lock arms and start dancing, but this is better, has that same meaningful feel as the cafe-robbery in Pulp Fiction, only everything's in sequence here, and nobody's screaming and shooting etc. I would say Magnolia is the most original movie in a long time, only we're just coming off American Beauty, Being John Malkovich. Suffice it to say that, as American Beauty and Being John Malkovich do, Magnolia also raises the standard, and raises it quite a bit. It's to cinema as Sixth Sense was to horror. And, like it or not, you do take that same mode of perception it requires with you, out of the theater, if only for a while. You don't look at something for three hours and then just look away, after all. And, in Magnolia's case, you don't really even want to look away in the first place.
(c)2000 Stephen Graham Jones, http://www.cinemuck.com
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


< root
TSLR - Components Guide
Product Offering
Undergraduate and graduate
Thrivent Private Student Loan
- Unordered list item
- Unordered list item
- Unordered list item
-
Unordered list item:
- Unordered list item inside of an unordered list
- Unordered list item inside of an unordered list
- Unordered list item inside of an unordered list
this is a button


| System | Type | Category | Function |
|---|---|---|---|
| Sharepoint | Document Mgt Systems | Core | Departmental |
| Sharepoint | Document Mgt Systems | Core | Departmental |
| Sharepoint | Document Mgt Systems | Core | Departmental |
| Sharepoint | Document Mgt Systems | Core | Departmental |
| Sharepoint | Document Mgt Systems | Core | Departmental |
| Sharepoint | Document Mgt Systems | Core | Departmental |
© Vistech 2019


Fake product!
Wu tang
Ideagoras
Culture blogs
Reflect
Time
EI.Q.
Meditation
Mindfulness
Confidence
Control.
Motivation.
Connecting.
leadership.
technical blogs
html.css.pt1
html.css.pt2
Design2web
Java script basics
Problem solving
Js.Language
Scope
Looks like you did it on a commadore 64 !
This is where I excuse myself for spending all my allotted time on the navbar


PharmaNet Site Registration
Ensures the location adheres to the requirements of applicable privacy and security legislation and responds on
the location’s behalf to privacy and information management concerns. May also be the Signing Authority and/or
Administrator of PharmaNet Onboarding.


list of partials matching "**/*.md"
md1 examples/partials/md1.md
Hello Markdown 1
- this comes from above:
- this is local: 12345
- this is lodash: dist
- 12345
md2 examples/partials/md2.md
Hello again, Markdown
- this comes from above:
- this is local: 67890
- 67890
md3 examples/partials/md3.md
Markdown 3
- this comes from above:
- this is local: 33333
override me: 33333
- 33333
single partial with given context
Markdown 3
- this comes from above:
- this is local: [44444]
override me: [44444]
- [44444]
this is a secret
======
Top Secret!
this is rendered from inside another partial
======


Jesse R. Larsen
About
Portfolio
Contact
(current)
Contact me here!
Your first Name
Last Name
Subject


Me and my son are beginning to plan out his 5th grade science experiment: Can we replace our old P4 Shuttle system with a Solar Powered Raspberry Pi? Presently this Pentium4 system is operating as a DHCP server and Squid proxy for our home network. We want to use small prefab solar panels and enough battery power to keep the Rpi running 24/7.
Most of the documentation on this site revolves around measuring AC current. I am hoping that I can do this project on entirely DC current. I would like to monitor the solar provided power throughout the day and the also graph the power used by the Rpi (so the power draw off the battery) through the day.
What good ideas do you all have for where I should go next?
Re: Small Photovoltiac + Rpi Science Experiment
If its your son's 5th grade science project, shouldn't he be asking the question?
Paul
Re: Small Photovoltiac + Rpi Science Experiment
I'd start reading this:
http://openenergymonitor.org/emon/buildingblocks/dc-shunt
Re: Small Photovoltiac + Rpi Science Experiment
"If its your son's 5th grade science project, shouldn't he be asking the question?"
I second that. Agreed, there's a fine line between helping and "helping", but if you're the professional, you don't need to pass his exam, he needs to earn his pass for himself. Steer him by all means, but a major part of learning is finding out what you need to ask and how and where to ask it.
Sometimes, it would be a lot easier for me to write or modify a sketch or design a circuit for someone who's asked a question in these forums, but I always try to steer them towards finding the answer for themselves rather than spoon-feeding them. It's a variation on "Give a man a fish, and you feed him for a day; teach him to fish..."
Re: Small Photovoltiac + Rpi Science Experiment
+1 on what Robert said. He has done that for me quite a lot of times!
its funny to read "your sons project" yet...
Clearly, its not your son's project any more haha
I find its a little bit over a 5th grade project, no way the teacher is going to pass him knowing the complexity and therefore external help he must had received.
Re: Small Photovoltiac + Rpi Science Experiment
You guys are harsh! Why not just answer the technical questions and leave the commentary unsaid? Not everyone wants their pre-teen child interacting with anonymous adults in a public forum, and your attitudes are exactly one good reason why.
Re: Small Photovoltiac + Rpi Science Experiment
Hello!
Dc monitoring is no problem, I've 2 modified EmonTX doing dc measurements at solar systems at the moment, both measuring voltage via resistance divider and current via a current sensor chip. One of the systems also has got an inverter so I measure the ac current there too. The other one has two current sensors for monitoring both: the current from the solar panel to the battery and from the battery to a load.
As current sensor I use ACS712 with different current values (5A & 20A), a 30A chip is also available.
If you want to know more about it I can give you the schematic.
Re: Small Photovoltiac + Rpi Science Experiment
This is all very good feedback. Thank you for your coaching. After reading up on many areas of this for over a week now, I realize how much more difficult this is just for me than when I started looking into it. Clearly, I'm very eager to persue this project, but it would make sense for me to go back to basics and see what my son could accomplish at his own pace.
Re: Small Photovoltiac + Rpi Science Experiment
I'm relieved to read that. Until I looked it up, I didn't realise that what you call "5th Grade" is actually the final year of what we call Junior School. I think you are probably right that a project like yours will be too much. Building and understanding the basic emonTx might stretch him a bit, but he should be fine with some guidance and explanation. But taking it further to include other components and assemblies and interfacing those will need research into manufacturers' data sheets and an understanding of electrical engineering probably beyond a 10 - 11 year old.
Fronius: I think you might be speaking for yourself when you mention "anonymous adults". I am using my proper name, and so is another contributor to this thread. I am a Chartered Electrical Engineer and if you feel so inclined you can check on the Engineering Council or the IET website what that means. I believe another of the moderators here is a retired policeman. Rest assured that if any improper conduct comes to our attention, it will be dealt with very quickly.
Re: Small Photovoltiac + Rpi Science Experiment
Hello!
If you only want to measure the dc voltage and current of a solar panel you can use the standard EmonTX, add two resistors as voltage divider for the voltage measurement and add a ready to go module with the ACS712 with a second voltage divider (ACS712 works with 5V, the arduino with 3,3V).
I buy my ACS712 (modules and single ics) from chinese ebayer's, the 5A module costs about 2,50 Euros, less than the single ic.


public interface RunListener
| Modifier and Type | Method and Description |
|---|---|
void |
testAssumptionFailure(ReportEntry report)
Event fired when a test assumption failure was encountered.
|
void |
testError(ReportEntry report)
Event fired when a test ended with an error (non anticipated problem)
|
void |
testExecutionSkippedByUser()
Event fired skipping an execution of remaining test-set in other fork(s); or does nothing if no forks.
|
void |
testFailed(ReportEntry report)
Event fired when a test ended with a failure (anticipated problem)
|
void |
testSetCompleted(ReportEntry report)
Indicates end of a given test-set
|
void |
testSetStarting(ReportEntry report)
Indicates the start of a given test-set
|
void |
testSkipped(ReportEntry report)
Event fired when a test is skipped
|
void |
testStarting(ReportEntry report)
Event fired when a test is about to start
|
void |
testSucceeded(ReportEntry report)
Event fired when a test ended successfully
|
void testSetStarting(ReportEntry report)
report
- the report entry describing the testsetReporterException
- When reporting failsvoid testSetCompleted(ReportEntry report)
report
- the report entry describing the testsetReporterException
- When reporting failsvoid testStarting(ReportEntry report)
report
- The report entry to log forvoid testSucceeded(ReportEntry report)
report
- The report entry to log forvoid testAssumptionFailure(ReportEntry report)
report
- The report entry to log forvoid testError(ReportEntry report)
report
- The report entry to log forvoid testFailed(ReportEntry report)
report
- The report entry to log forvoid testSkipped(ReportEntry report)
report
- The report entry to log forvoid testExecutionSkippedByUser()
SurefireProvider
.(The event is fired after the Nth test failed to signal skipping the rest of test-set.)
Copyright © 2004–2015 The Apache Software Foundation. All rights reserved.


freestyle
ALFREE
rating
heart
Description: fizzy white head, medium carbonation, taste lager, faint skunky smell, overall light, visible carbonation, clean feel.
rating
heart
Description: smell, caramel malt, semi-sweet malt base, bready caramel malt, malt backbone, moderate carbonation, light floral hops, moderate malt notes, moderate malt balance.
rating
heart
Description: oh so subtle beer taste, fizzy white head, slight taste, pretty poor beer, light malt, Fizzy Yellow Beer, light sweetness, light malt character.
rating
heart
Description: toasty malt, pils malt, traditional kolsch, classy pilsner, light bready malt, crisp taste, summer beer, initial taste.


Enter a username
Instructions
uh... don't die
Controls
mouse / WASD - movement
left click / J - primary weapon
right click / K - secondary weapon
O - toggle mouse controls
P - toggle first person mode


This key is not valid. Please contact the system administrator to provide you with a valid registration key.
|
|
|
|
|
|
|
|
|
|
|
HINT: Use at least seven characters and include at least one number, one uppercase and one lowercase letter
|
|
|
|
Before you get started, please confirm your e-mail address by
clicking the link in email that was sent to your email. After
your email is confirmed, you can login at
If you already have a ProSolo account, please


| Package | Description |
|---|---|
| com.ibm.team.scm.client.events | |
| com.ibm.team.scm.common |
| Modifier and Type | Method and Description |
|---|---|
IFlowNodeHandle |
IChangeHistoryEvent.getDeliverTarget()
For events of type
IChangeHistoryEvent.DELIVER , returns the flow node target which
has been successfully delivered into; otherwise null |
| Modifier and Type | Interface and Description |
|---|---|
interface |
IWorkspace
Represents a workspace qua auditable item.
|
interface |
IWorkspaceHandle
Represents a handle to a workspace qua auditable item.
|
| Modifier and Type | Method and Description |
|---|---|
IFlowNodeHandle |
IFlowEntry.getFlowNode()
Returns the primary target of this flow entry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
IFlowTable.addAcceptFlow(IFlowNodeHandle source,
UUID remoteRepoIdentifier,
java.lang.String remoteRepoURI,
java.util.Collection componentScopes,
java.lang.String description)
Creates a flow entry (with description) adding the given workspace as an accept source, and declaring a list of component filters (can be empty) to be used when determining which change sets to be accepted.
|
void |
IFlowTable.addDeliverFlow(IFlowNodeHandle target,
UUID remoteRepoIdentifier,
java.lang.String remoteRepoURI,
java.util.Collection componentSyncs,
java.lang.String description)
Creates a flow entry (with description) adding the given workspace as a deliver target.
|
IFlowEntry |
IFlowTable.getAcceptFlow(IFlowNodeHandle source)
Get the accept flow entry which has the specified flow node as
an accept source.
|
IFlowEntry |
IFlowTable.getAcceptFlow(IFlowNodeHandle source,
java.util.Collection componentScopes)
Get the accept flow entry which has the specified workspace & component scopes as
an accept source.
|
java.util.Collection |
IFlowTable.getComponentScopes(IFlowNodeHandle node)
Returns the component scopes for the given flow node.
|
IFlowEntry |
IFlowTable.getDeliverFlow(IFlowNodeHandle target)
Get the deliver flow entry which has the specified flow node as
a deliver target.
|
IFlowEntry |
IFlowTable.getDeliverFlow(IFlowNodeHandle target,
java.util.Collection componentScopes)
Get the deliver flow entry which has the specified workspace & component scopes as
a deliver target.
|
void |
IFlowTable.removeAcceptFlow(IFlowNodeHandle source)
Removes flow entries that have the given node as an accept source.
|
void |
IFlowTable.removeAll(IFlowNodeHandle target)
Removes all flow entries that have the given node as a deliver target or as an accept source.
|
void |
IFlowTable.removeDeliverFlow(IFlowNodeHandle target)
Removes flow entries that have the given node as a deliver target.
|
void |
IFlowTable.setComponentScopes(IFlowNodeHandle node,
java.util.Collection componentScopes)
Sets the component scopes for the given flow node.
|


Saxonwold Manor, 22 Eastwold Way, Randburg, Johannesburg
+27 72 O79 2117
CONTACT FORM
Send us a message using this quick and easy form. We'll contact you as soon as possible!
SEND
For any property matters in the Gauteng area
Mark Otto
Call 072 O79 2117
Email:
<EMAIL_ADDRESS>BUILT BY BITLAB.IO


--- layout: post title: The Natures's Co Jasmine Natural Incense - Atmosphere tags: - Nature’s Co status: publish type: post published: true meta: _edit_last: '2' wp_plus_one_redirect: '' _graphene_slider_img: global _graphene_slider_imgurl: '' _graphene_show_addthis: global _graphene_post_date_display: global al2fb_facebook_image_id: '2569' _aioseop_title: The Natures's Co Jasmine Natural Incense - Atmosphere al2fb_facebook_link_id: '218440691518395_356612501034546' al2fb_facebook_link_time: '2012-01-29T19:21:01+00:00' al2fb_facebook_link_picture: meta=http://missenchanted.com/wp-content/uploads/2012/01/IMG_2860-150x99.jpg _aioseop_keywords: The Natures's Co Jasmine Natural Incense - Atmosphere _yoast_wpseo_linkdex: '0' _thumbnail_id: '2568' --- Nothing feels better than an early morning, initiated with thankfulness to god and good thoughts for the future. We remember to say thanks and ask for more(Greedy me)... in various ways, but the most common of all would have to be a diya bati and incense sticks. I recently started using Nature's Co Jasmine Natural Incense, and it totally lives upto its expectations. Price: Rs. 75 for 32gm (30 sticks) Natures's co says: My Experience: These incense sticks smell great (Can't exactly trace Jasmine fragrance though), and make up my day in the morning :). Although I feel these are a bit highly priced, for the quantity provided and aren't so easily available. What I like:


With much love and respect for Gapminder World, where you'll find more comprehensive data, full attributions, legends, tooltips, animation trails and much more.
It's easy to overlook the amount of work that goes into making something look simple. Wow.
Made by Tom Carden<EMAIL_ADDRESS>March 2011.


Usual Disclaimer: This was by no means safe. I tried to take risks manageably, but I don't recommend this kind of stuff.
tl;dr: Really fun. Also long lasting as hell, very visual, not much body load or mindfuck at 1mg level. I've been told constriction is an issue at ~5mg but the most I'd ever do of this is 2mg, personally. Social, aural, cognitive, not really that dissociative. Be safe, this is unknown territory.
---
I happened to be in possession of 1mg of Bromo-DragonFLY. This was from the same batch that was mislabeled as 2C-B-Fly and resulted in several deaths. It was later found to also contain 'significant synthesis impurities'. Luckily, I received it as Br-DFly and in a dosage approate for this. 1mg was reported to be a moderate dose, and I was not expecting a super strong trip. I actually had some worries that it wouldn't be enough, but it was.
This is a recount of the trip, which lasted a solid two days, plus residual visuals for a few more:
4:30p Tuesday [T=0]: I take a cap of Br-DFly on an empty stomach. I sit down to do some work (programming), as I figure this will take a rather long time to kick in. I smoke a bowl out of my vape - this happens throughout the night.
T+1h: I feel slight effects, and notice slight visuals - patterns of light and shadow that aren't really there. I am surprised, as I thought it would take longer to come on. I am still clear-headed and can function well, but I decide to abandon work for the rest of the trip.
T+1.5h: I IM 50mg of ketamine, as I love doing this on the come-up of psychedelics (especially long ones like DO* and Br-DFly).
T+2h: I go outside for a cigarette, and marvel at the visuals. Br-DFly has visuals unlike anything I've ever done (LSD, shrooms, mescaline, 2C-(B,E,I,P,T-2), DO(B, C), 4-AcO-DMT, DMT, MIPT, LSA, K). It looks like a high dose of mescaline with four hits of good acid thrown in, for me. The headspace is wonderfully clear - no panic, tension, anxiety, any of it. There is some body tremor, but it is not overwhelming at this level.
T+2:30h: I've just been listening to music, and it sounds wonderful, enveloping, rich, and compelling. This reminds me of mescaline, and to a lesser extent 2C-*/DO*... which makes sense, given the chemical similarity.
T+3h: I inject another 50mg of ketamine, and the intensity of my trip, which was already increasing, spikes. I collect my essentials, lock the apartment, and get on my bike. I'm going to a show my friend is playing at a house about a mile away. I listen to music while I ride (Jesu - Heartache EP), and it is one of the most intense and beautiful rides of my life. The visuals at this point are insane, and I feel wonderful.  All colors are intensified, and lights glow much more brightly than normal. Edges are accentuated, and I feel like I'm on 10 hits of acid visually... but with the presence of mind of most phenethylamines.
T+3:10: I run into my friend biking to the same show I am, and we bike together. We lock our bikes and get to the house, only to find that the show hasn't begun and that our friends (the band, and others) are just hanging out, jamming and talking and drinking. I had originally planned not to drink, since Br-DFly is enough for one night, but someone handed me a beer and from then on I was drinking pretty heavily.
T+5:00: I've been here for a while, socializing and catching up with a lot of people who are in town (it's SXSW week, and spring break). I have had lots of good conversations, and I feel totally comfortable, although some of my perceptions are obviously off (not recognizing people at first, and so on). The visuals are at their peak, I think, and have been for an hour or so. Color intensification and form outlines are the most distinct aspect.
T+7:00: Still drinking and smoking pot and partying with friends at the house show. Br-DFly is a social drug, at least at this level. I feel positive and motivated to talk to people. Body tremor, or what there was of it, seems to have subsided.
T+8:30: We go back to my friend's apartment to drink more, listen to music, smoke pot, and generally hang out. On the way, I fall off my bike, which I attribute to being drunker than I thought - while Br-DFly definitely overpowers alcohol subjectively, my co-ordination was shit, as my body was still drunk. We chill for several hours, and I have great time. The visuals are still going strong.  He needs a place to crash and is very drunk. I am as well, but know sleep is impossible. We come home and hang out, smoking pot and talking about music. He eventually realizes I'm going to be awake and active all night, and leaves to sleep at his friend's place
T+11:00: I inject 50mg more ketamine. I do this every hour and a half for a few of hours, enojying the trip and smoking cigarettes and listening to music. I don't mind being alone at all, and am enjoying the fact that my apartment is very clean (I cleaned it two days prior).
T+16:00: I decide to stop using ketamine, because I'm binging like an addict, and being on Br-DFly isn't an excuse. I lay on my beanbag, wide awake and tripping hard but in a relaxed fashion, listening to music. My friend calls and she says she'll be over later.
T+18:00: It's now 10:00a Wednesday, and my friend comes over for a bit. We smoke a couple of bowls and talk, and I am glad for the company. While tripping alone is fun, conversation is more engaging, and I enjoy it.  The visuals are still going as strong as they were 12 hours ago, and it's already a beautiful sunny day. I feel really positive due to the combination.
T+20:00: I go over to my friend's place, where I was last night, as we had planned today to be a day of relaxation, tripping, and friendship. He and a couple of my other friends take 2C-E (25mg oral, 12 and 12mg snorted). I think that my Br-DFly will wear off soon, so I take two hits of good acid, just to make sure I'm tripping all day. In retrospect, this was probably a complete waste. The Br-DFly didn't change noticeably in character or strength - it was still just 'strong' and 'unique' and didn't really feel like acid. Anyway, we hang out, listening to music - mostly death metal, as we all love it - and smoking pot. I brought over the very last of my powdered ketamine and shared it freely, since it goes well with everything and today has been decreed a day of self-indulgence.
T+22:00: We decide to rent a couple of movies, and so we get 'Moon' and 'Paprika'. We decide to watch 'Moon', as it had been strongly recommended. We watch it and are absolutely blown away, considering it one of the best movies we've ever seen. It mirrored the surreality that I was experiencing, and did so in an aethetically pleasing fashion. This seems suited to Br-DFly, which is a very aesthetic chemical, based on this experience.
T+24:00: We're still hanging out, occasionally snorting some K (even though this barely does anything to me, given my tolerance), talking, and just generally having a good trip. We re-watch 'Moon' to understand it and catch layers we missed the first time. Despite the fact that there are many free shows going on, and that I could easily bike to them, I choose to take it easy. Br-DFly seems like a chemical that is malleable - you can take it easy or do something intense, and it'll pretty much let you without getting in the way.
T+28:00: I go home briefly to meet a friend, smoke some pot, and listen to music.  I go back to my friend's with another couple of clonazepam, one for him and the other for me.
T+30:00: We go back to the house where my friend played, as there is more music there. We stay awhile, chat and socialze, and then leave to listen to our friend's radio show. Despite the fact that I've been tripping for what feels like forever, I find socializing easy and fun.
 My friend walks me home, as he wants something from my place and I am quite out of it, and I go to sleep.
T+48:00: My girlfriend, who I live with and who was out of town the entire time I was on Br-DFly, wakes me up at 4:30pm. I feel tired/fried/exhausted as shit, but alright. I smoke a lot of pot, and go outside, and find myself with visuals as strong as the mid-to-late parts of the trip.
T+48:00-T+72:00+: This whole day and a bit after felt off-basiline. I smoked pot and drank a lot and did a lot (too much) ketamine. I had visuals.
I know pot brings back visuals, but I feel like the Br-DFly was still in my system a fair bit - four or five days. These visuals definitely persisted for days, though to be fair I was stoned constantly.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Summary. In this mini article we demonstrate the editing markup in DocOnce. This allows highlighting of corrections in a text.
The text above is typeset as
__Summary.__ In this mini article we demonstrate the editing
markup in DocOnce. This allows highlighting of corrections in
a text.
======= A math story =======
Given $f(x)$. We seek the roots of $f$ i.e. the $x$ values for which
$f(x)=0$. The most famous method is Newton's method:
!bt
\[ x_{k+1} = x_k - \frac{f'(x_k)}{f(x_k)},\quad k=0,1,\ldots \]
!et
It needs $x_0$. In theory this method has quadratic convergence,
however it requires $x_0$ to be close to a root.
We now want to annotate this text with markup for our edits. Such markup has the syntax of inline comments, which are comments inside square brackets with an identifier and the comment text:
[identifier: some text]
The identifier can be a name (to recognize the reader who provided
the comment), but in edit markup it is usually either add
, del
,
or edit
. The markup for editing consists of
[add: ,]
[add: .]
[add: ;]
[del: ,]
[del: ,]
[del: .]
[del: ;]
[add: some text]
[del: some text]
[edit: some text -> some replacement for text]
In addition, one may provide an ordinary inline comment a la
[edit: change the title to *Root finding*.]
Below is the text with edits, followed by the rendering of how such edits look like in the present format (html).
Summary. In this (edit 1:) mini article, (edit 2: add comma) we demonstrate
the editing markup in DocOnce (edit 3:) . This which allows
highlighting of corrections (edit 4:) via colors in a text.
Given (edit 6:) a function \( f(x) \). We seek the roots of \( f \), (edit 2: add comma)
i.e., (edit 2: add comma) the \( x \) values for which \( f(x)=0 \). (edit 9:) The most A famous (edit 10:) iterative solution method is Newton's method:
$$ x_{k+1} = x_k - \frac{f'(x_k)}{f(x_k)},\quad k=0,1,\ldots $$
(edit 11: error in right-hand side, the fraction \( \frac{f'(x_k)}{f(x_k)} \) must be \( \frac{f(x_k)}{f'(x_k)} \).)
(edit 12:) It needs \( x_0 \) A start value \( x_0 \) is required.
In theory, (edit 2: add comma) this method has quadratic
convergence (edit 14: delete comma). (edit 15: add period) (edit 16:) h However, (edit 2: add comma)
(edit 18:) it the result requires \( x_0 \) to be close to a root.
To remove the edit markup and implement their implications, run
Terminal> doconce apply_edit_comments mydoc.do.txt
if the name of the DocOnce source file is mydoc.do.txt
.


The optional HDU location specifier defines which HDU (Header-Data Unit, also known as an `extension') within the FITS file to initially open. It must immediately follow the base file name (or the output file name if present). If it is not specified then the first HDU (the primary array) is opened. The HDU location specifier is required if the colFilter, rowFilter, or binSpec specifiers are present, because the primary array is not a valid HDU for these operations. The HDU may be specified either by absolute position number, starting with 0 for the primary array, or by reference to the HDU name, and optionally, the version number and the HDU type of the desired extension. The location of an image within a single cell of a binary table may also be specified, as described below.
The absolute position of the extension is specified either by enclosed the number in square brackets (e.g., `[1]' = the first extension following the primary array) or by preceded the number with a plus sign (`+1'). To specify the HDU by name, give the name of the desired HDU (the value of the EXTNAME or HDUNAME keyword) and optionally the extension version number (value of the EXTVER keyword) and the extension type (value of the XTENSION keyword: IMAGE, ASCII or TABLE, or BINTABLE), separated by commas and all enclosed in square brackets. If the value of EXTVER and XTENSION are not specified, then the first extension with the correct value of EXTNAME is opened. The extension name and type are not case sensitive, and the extension type may be abbreviated to a single letter (e.g., I = IMAGE extension or primary array, A or T = ASCII table extension, and B = binary table BINTABLE extension). If the HDU location specifier is equal to `[PRIMARY]' or `[P]', then the primary array (the first HDU) will be opened.
An optional pound sign character ("#") may be appended to the extension name or number to signify that any other extensions in the file should be ignored during any subsequent file filtering operations. For example, when doing row filtering operations on a table extension, CFITSIO normally creates a copy of the filtered table in memory, along with a verbatim copy of all the other extensions in the input FITS file. If the pound sign is appended to the table extension name, then only that extension, and none of the other extensions in the file, will by copied to memory, as in the following example:
myfile.fit[events#][TIME > 10000]
FITS images are most commonly stored in the primary array or an image extension, but images can also be stored as a vector in a single cell of a binary table (i.e. each row of the vector column contains a different image). Such an image can be opened with CFITSIO by specifying the desired column name and the row number after the binary table HDU specifier as shown in the following examples. The column name is separated from the HDU specifier by a semicolon and the row number is enclosed in parentheses. In this case CFITSIO copies the image from the table cell into a temporary primary array before it is opened. The application program then just sees the image in the primary array, without any extensions. The particular row to be opened may be specified either by giving an absolute integer row number (starting with 1 for the first row), or by specifying a boolean expression that evaluates to TRUE for the desired row. The first row that satisfies the expression will be used. The row selection expression has the same syntax as described in the Row Filter Specifier section, below.
Examples:
myfile.fits[3] - open the 3rd HDU following the primary array myfile.fits+3 - same as above, but using the FTOOLS-style notation myfile.fits[EVENTS] - open the extension that has EXTNAME = 'EVENTS' myfile.fits[EVENTS, 2] - same as above, but also requires EXTVER = 2 myfile.fits[events,2,b] - same, but also requires XTENSION = 'BINTABLE' myfile.fits[3; images(17)] - opens the image in row 17 of the 'images' column in the 3rd extension of the file. myfile.fits[3; images(exposure > 100)] - as above, but opens the image in the first row that has an 'exposure' column value greater than 100.


P1-E005¶
In this exercise, you will learn about reading from files, writing into files, operations with the numpy library and visualising data with the matplotlib library.
Information¶
Learning goals |
|
|---|---|
Concepts |
|
Skills |
|
What to Submit
Submit your script(s), output file(s) and figure(s) for the final task of this exercise. These script should be named [your surname]_e005.[ext], where [ext] is the file extension, the input/output file should be named [your surname]_[input/output]_e005.asc, and the figure should be named [your surname]_e005.jpg.
NumPy and Matplotlib¶
NumPy is a very commonly used Python library for numerical computing. Many other Python libraries use NumPy. Matplotlib, on the other hand, is one of the most commonly used Python libraries for plotting scientific data and results. In this excercise, we make heavy use of those two libraries, because (a) they are very commonly used, (b) they have fewer dependencies than many alternatives, and (c) there are comparable libraries for other programming languages you may prefer using. In fact, Matplotlib’s pyplot is similar to plotting with Matlab.
Input/Output¶
In exercises E001 - E004, we have covered the basics of practical programming, procedural and object-oriented programming and let the computer perform various tasks for us. However, so far, we created data within our scripts, and the results of our calculations were lost once we ended our coding session. In this exercise, we will learn how to read data from a simple text file and write your results into another. Reading and writing into files of a specific formats, such as netCDF, requires the use of specific libraries. In some cases, different libraries allow you to perform the same input/output actions; in other cases, you may not even need to load any libraries to read and write into simple files. To reduce the number of libraries we use in this excercise, we will only deal with simple text(ascii) files read and write data with NumPy.
RNG Testing¶
Imagine we have written a Fortran module rnd, a random number generator (RNG) that creates random numbers from a specific distribution. We want to test this module now and created two time series: One for random normally distributed data, and one for random data from an exponential distribution. We now want to quickly plot the test series to check if they look reasonable. Our Fortran programme generated two text files for the series:
Let’s download the files above and use NumPy to read those files and store the data in dat_nrm and dat_exp respectively. The reading is done by using NumPy’s genfromtxt() function, a general function for reading data separated by common separators, such as spaces and commas.
# import module
import numpy as np
# read files
dat_nrm = np.genfromtxt('test_rnd_normal.asc')
dat_exp = np.genfromtxt('test_rnd_exponential.asc')
# display data
print(dat_nrm)
print(dat_exp)
Note
There are different way in which text files can be read even with NumPy. loadtxt() is another option.
Notice how we have two values per line: The first we interpret as a time step, the second is the data of interest. Unless we have magical statistics-vision (Stat-Woman to the rescue!), we won’t be able to tell from this data dump how the data is distributed. We use matplotlib to visualise our data. Let’s start with the random numbers from a normal distribution. Examine and execute the code below:
# import module
import numpy as np
import matplotlib.pyplot as plt
# read files
dat_nrm = np.genfromtxt('test_rnd_normal.asc')
dat_exp = np.genfromtxt('test_rnd_exponential.asc')
# pass data from normal distribution to x and y vectors
x=dat_nrm[:,0]
y=dat_nrm[:,1]
# create simple x-y plot
plt.figure(0) # number your figures
plt.plot(x, y) # create a simple x-y plot
plt.title('rnd: normal distribution') # set a title
plt.xlabel('time steps') # label the x axis
plt.ylabel('random number') # label the y axis
plt.axis([0, 100, -3, 6]) # give x and y bounds
We should now be looking at a figure like this:
Once you think you know what’s going on here, expand the script to include code that plots the data from the exponential distribution. Feel free to browse the web for plot options and choose the type of plot you regard as most fitting for exponentially distributed data. Think about the type of data visualisation that will most easily allow you to get a sense of the frequency distribution of random numbers.
Ask the instructor(s) for help if needed.
Creating a histogram from your vectors may be one option to better visualise the randomly generated numbers. If you haven’t already, generate a histogram from one of your y vectors and save it into a text file as such:
# create a histogram from y, use 10 bins
y_hist=np.histogram(y,bins=10)
# write frequency in file
np.savetxt('histogram.asc', y_hist[1], fmt='%1.3f')
Note that we only write the frequency of y_hist using savetxt(), and we specify a format (fmt). Is this the best way to go about it? If not, what would you do differently?
Your Task¶
We’re finally sufficiently equipped to do something useful. For the final task in phase 1 of this course, create one or several scripts that make use of the following:
arrays
functions
classes
reading/writing data
data visualisation
You are given complete creative freedom here. The only requirement is that the type of tasks you instruct the computer to do are warranted. In case you need some inspiration, here is one way you can build on your work of previous exercises:
create a class for students, and create several objects for this class
for different semesters, read the grades of students from a text file
using a class-specific function, calculate the average and semester average grades for each object (student)
write the average grades into a text file
plot the grades in a way that allows you to get a sense of the distribution of grades or the progress of individual students
When you are happy with your code, data and plots, name your files as described above and submit them via ILIAS.
Warning
Late submissions won’t be accepted!


Many\ school accounts require that you connect to the Internet using the Chrome browser before the account can be set up. An IT person can do this quickly as follows:


Gateway
BOT
25-Aug-19 12:46 PM
[dscrd-hush] <dukeleto> !tip @iceyballz 25 hush
[dscrd-hush] <Discordtip> @dukeleto sent @iceyballz 25.00 HUSH (≈ $0.76).
[dscrd-hush] <iceyballz> Im richhhhhhh
[dscrd-hush] <dukeleto> @iceyballz if you open the SD git repo with QT creator, it has a wysiwyg GUI editor thing, and you can open open each window/modal/etc of SD and edit it, or create new ones. I have only barely played with it, but it's the easiest way to do GUI stuff for SD: https://en.wikipedia.org/wiki/Qt_Creator
Qt Creator is a cross-platform C++, JavaScript and QML integrated development environment which is part of the SDK for the Qt GUI application development framework. It includes a visual debugger and an integrated GUI layout and forms designer. The editor's features include sy...
[dscrd-hush] <dukeleto> you can do it all by hand
[dscrd-hush] <iceyballz> @dukeleto this is where it hangs for me and takes for ever
[dscrd-hush] <dukeleto> but it's manually creating a bunch of XML/etc
[dscrd-hush] <iceyballz> Gotya, will clone and see what I can do for messaging interface
[dscrd-hush] <dukeleto> you downloaded the Hush binary and using that komodod ?
[dscrd-hush] <dukeleto> or you using a custom/different komodod ?
[dscrd-hush] <dukeleto> also, take a look at the end of debug.log . I don't actually see any error output, it looks like it's trying to sync
[dscrd-hush] <iceyballz> downloaded, I manually run hushd batch that starts komodod
[dscrd-hush] <dukeleto> @iceyballz debug.log will tell you if you have any peers and syncing, or failing to start syncing
[dscrd-hush] <dukeleto> the fact that you have a space in your pathname, and if your firewall blocks some ports, could also be related
[dscrd-hush] <iceyballz> Im showing this as last line
[dscrd-hush] <dukeleto> nothing in debug.log is sensitive, fyi. No privkeys or anything like that
[dscrd-hush] <dukeleto> obscure any IP's if you want
[dscrd-hush] <iceyballz> 2019-08-25 12:50:52 UpdateTip: new best=000000089540179f752c890fc3f04d38177ae3c690bff9c5f25de32852319b3e height=9861 log2_work=41.83909 log2_stake=-inf tx=24299 date=2019-04-30 13:46:19 progress=1.000000 cache=7.6MiB(16056tx)
[dscrd-hush] <dukeleto> oh shizzle
[dscrd-hush] <dukeleto> hmmm
[dscrd-hush] <iceyballz> Meanwhile, komodod is using 24% cpu
[dscrd-hush] <dukeleto> something is weird there, it's synced 100%, but only to April 30th
[dscrd-hush] <dukeleto> what happens if you stop SD GUI, and restart?
[dscrd-hush] <dukeleto> there is a bug, where it doesn't retry enough
[dscrd-hush] <dukeleto> leave the full node running
[dscrd-hush] <dukeleto> just restart the GUI
[dscrd-hush] <iceyballz> so it will eventually move past activating and SD will show fully synced
[dscrd-hush] <dukeleto> I have seen a bug, where if for some reason syncing takes too long, it doesn't keep retrying and update the GUI. So the user thinks things are stuck, but restarting GUI wallet fixes it
[dscrd-hush] <iceyballz> just restarted to same issue
[dscrd-hush] <dukeleto> if you can paste hush-cli getinfo to a github gist, that might help
[dscrd-hush] <dukeleto> oooooh
[dscrd-hush] <dukeleto> maybe you are on your own fork, but that would mean you are mining, and that is off by default
[dscrd-hush] <iceyballz> I am just running whatever comes default from the SD binary download
[dscrd-hush] <dukeleto> that block hash is not a valid Hush block
[dscrd-hush] <iceyballz> It cannot active it's built-in node so I have been manually starting
[dscrd-hush] <dukeleto> so you are on a fork, somehow
[dscrd-hush] <iceyballz> ok take a look at the included bat then
[dscrd-hush] <iceyballz> 1sec
[dscrd-hush] <iceyballz> @call :GET_CURRENT_DIR
@cd %THIS_DIR%
komodod.exe -ac_name=HUSH3 -ac_sapling=1 -ac_reward=0,1125000000,562500000 -ac_halving=129,340000,840000 -ac_end=128,340000,5422111 -ac_eras=3 -ac_blocktime=150 -ac_cc=2 -ac_ccenable=228,234,235,236,241 -ac_founders=1 -ac_supply=6178674 -ac_perc=11111111 -clientname=GoldenSandtrout -addnode=<IP_ADDRESS> -ac_cclib=hush3 -ac_script=76a9145eb10cf64f2bab1b457f1f25e658526155928fac88ac -daemon %1 %2 %3 %4 %5 %6 %7 %8 %9
@goto :EOF
:GET_CURRENT_DIR
@pushd %~dp0
@set THIS_DIR=%CD%
@popd
@goto :EOF
[dscrd-hush] <dukeleto> I suggest deleting your datadir stuff, I will give you a unix command you can translate to win
[dscrd-hush] <iceyballz> Sounds good, wiping now
[dscrd-hush] <dukeleto> cd ~/.komodo/HUSH3; rm -rf chainstate/ blocks/ database/ komodostate
[dscrd-hush] <dukeleto> the directory will be different on windows, but you get the idea
[dscrd-hush] <dukeleto> leave the wallet.dat, delete everything else basically. There are a few other files, but they are not important to delete
[dscrd-hush] <iceyballz> I have a custom datadir


If you fill in "Good input" the application will go to another state. All other input is disregarded.


Los Angeles loses $36 billion a year from housing crunch, McKinsey says
Los Angeles County loses out on as much as $36 billion in economic growth every year because people are paying too much to keep a roof over their heads.
That’s the analysis of McKinsey & Co., which tallied how much residents are paying for housing beyond 30% of their income, a level that’s widely used to determine whether someone is "cost-burdened.”
Los Angeles is emblematic of the challenges that mark California’s worst-in-the-nation housing shortage. Since 2010, the city has been producing more housing relative to its population growth than almost anywhere else in the state. But very little of it has been accessible to lower- and middle-income workers.
"You can’t say L.A. doesn’t build,” said Jonathan Woetzel, director of the McKinsey Global Institute. "It just doesn’t build affordable.”
Fixing the affordable housing shortage is going to be costly, despite the clear economic benefits. McKinsey, which released a report on the topic Thursday, estimates it’ll take around $130 billion of public money to meet new regional goals for housing production through 2029.
The report -- which was prepared in collaboration with the Los Angeles Business Council Institute, the Los Angeles Coalition for the Economy & Jobs, and the United Way of Greater Los Angeles -- advocates for a range of policy solutions from adopting cost-saving building techniques to streamlining the permitting for new projects.
If these strategies are put into place, McKinsey estimates that almost half of the needed investment could come from the private sector.
Read also
Read More
In America’s most unequal city, top households rake in $663,000
Atlanta is the capital of U.S. inequality for the second year in a row, according to a Bloomberg analysis of large American cities with a population of at least a quarter-million.
Read More
Homes, land destroyed as desperate Zimbabweans turn to illegal gold mining
Under the blazing sun, a group of men use picks and shovels to dig up a bushy patch of land outside Zimbabwe's second-largest city, stopping every few seconds to scan the soil for signs of gold.
Read More
Indian homemaker wins bake off competition in Qatar
Indian homemaker Shamila Yousef recently won the bake off competition conducted at Lulu Oasis.
Read More
Cuba cries foul as doctors head home from Bolivia
The first of around 700 Cuban doctors were scheduled to fly home from strife-torn Bolivia on Saturday as officials railed against what they charged was slander and mistreatment by Bolivia's conservative interim government.
Read More
The voyage home: Japan's Hayabusa-2 probe to head for Earth
Japan's Hayabusa-2 probe will leave its orbit around a distant asteroid and head for Earth on Wednesday after an unprecedented mission, carrying samples that could shed light on the origins of the Solar System.
Read More
From a gravel pitch to glory: world champion Kolisi comes home
Rugby World Cup-winning captain Siya Kolisi returned to his South African roots Sunday, holding the trophy as an open-top bus crawled through the streets of a Port Elizabeth township.


2 Corinthians 9:6
But this I say, He which soweth sparingly shall reap also sparingly; and he which soweth bountifully shall reap also bountifully.


--- layout: post status: publish published: true title: will post on machines from now on author: display_name: vishvendra login: vishvendra email<EMAIL_ADDRESS>url: '' author_login: vishvendra author_email<EMAIL_ADDRESS>wordpress_id: 490 wordpress_url: https://vishvendrasingh.com/?p=490 date: '2017-02-28 10:34:17 +0530' date_gmt: '2017-02-28 10:34:17 +0530' categories: - Common tags: [] comments: [] ---
Hi friends,
Thank you guys for reading my blog, I received some requests for posting about machines and other topics. I was li'l busy so couldn't respond. Will start posting on them from now on.


The merge settings tab allows you to configure the merge output path and merge integrations.
| Setting | Description |
|---|---|
| Merge output path | The path to the folder where you want zMerge to output merges and relinked scripts. Separate folders will be created at the merge output path for each merge built. |
| Disable plugins | If checked, merged plugins will be automatically disabled in plugins.txt once a merge is successfully built. |
| Disable mods | If checked, mods will be disabled in your mod manager once a merge with copy general assets enabled is successfully built. This integration is only available when using Mod Organizer or Mod Organizer 2 currently. |


Earth's imagery is displayed on a digital globe, which displays the planet's surface using different layers images from different services. After zooming in far enough, the imagery transitions into different imagery of the same area with finer detail.
Google Chrome and Microsoft Edge browsers are supported.
The 1Globe is a three-dimensional (3D) software model representation of the Earth wich provides the user with the ability to freely move around in the virtual environment by changing the viewing angle and position.
1Globe geo-browser is a free, virtual globe for Web. The geo-browser provides a convenient interface for interacting with maps, imagery and geospatial data in the context of a 3D globe.
The virtual globe have the capability of representing many different view-layers on the surface of the Earth. You can change order, visibility and opacity for every layer.
1Globe Terrain Engine fuses several data sources into a single set optimized for 3D map visualization.
Also separate using CGIAR CSI SRTM DEM. The SRTM 90m digital elevation data, produced by NASA originally, covering all of the countries of the world.
Caching component stores data so that future requests for that data can be served faster. A cache hit occurs when the requested data can be found in a cache.
1Globe geo-browser uses PWA technologe. A progressive web application is a type of application software delivered through the web.
This mode allows to run the application locally on the device and doesn't require anything else to be functional. It's will allow you to view the globe without having an active connection to internet. It uses previously loaded CGIAR CSI SRTM elevation data and caching imagery.
The device's IP address use to determine the country, city, and ZIP code, determining its geographical location.
The Search allows you to look up a location from a textual name, description, address or geo-coordinates.
Application uses seivices such as Bing Maps Locations, Nominatim (OpenStreetMap data) and Yandex.Search seivice. The Services supports structured and free-form search queries.
Layers: toggles the display of the layer list where you control the content displayed on the globe.
Settings: opens dialog of the settings where you configure the geo-browser.
Infopanel: information panel that displays data for the currently position on the globe.
The Bing Maps aerial imagery web mapping service offers worldwide orthographic aerial and satellite imagery. Coverage varies by region, with the most detailed coverage in the USA and United Kingdom. Coverage in different areas within a country also varies in detail based on the availability of imagery for that region. Bing Maps is continuously adding imagery in new areas and updating coverage in areas of existing coverage.
World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community.
This map portrays surface elevation as shaded relief. This map is used as a basemap layer to add shaded relief to other GIS maps, such as the ArcGIS Online World Street Map. It is especially useful in maps that do not contain orthoimagery. The shaded relief imagery was developed by Esri using GTOPO30, Shuttle Radar Topography Mission (SRTM), and National Elevation Data (NED) data from the USGS.
This component tile layer displays Ecological Land Units (ELU) and bathymetry fused with multi-directional hillshade and undersea relief at small to mid scales. It is designed for use as a component base layer in the National Geographic Style Map. It is not intended for stand-alone use.
This map is designed to be used as a general reference map for informational and educational purposes as well as a base map by GIS professionals and other users for creating web maps and web mapping applications. The map was developed by National Geographic and Esri and reflects the distinctive National Geographic cartographic style in a multi-scale reference map of the world.
This map is designed to be used as a basemap by GIS professionals and as a reference map by anyone. The map includes administrative boundaries, cities, water features, physiographic features, parks, landmarks, highways, roads, railways, and airports overlaid on land cover and shaded relief imagery for added context. This basemap was compiled from a variety of best available sources from several data providers, including USGS, U.S. EPA, U.S. NPS, FAO of the United Nations, Department of NRCAN, GeoBase, Agriculture and Agri-Food Canada, Garmin, HERE, Esri, OpenStreetMap contributors, and the GIS User Community.
OpenStreetMap is a collaborative project to create a free editable map of the world. The geodata underlying the map is considered the primary output of the project. The creation and growth of OSM has been motivated by restrictions on use or availability of map data across much of the world, and the advent of inexpensive portable satellite navigation devices.
The Bing Maps aerial imagery web mapping service offers worldwide orthographic aerial and satellite imagery. Coverage varies by region, with the most detailed coverage in the USA and United Kingdom. Coverage in different areas within a country also varies in detail based on the availability of imagery for that region. Bing Maps is continuously adding imagery in new areas and updating coverage in areas of existing coverage.
Yandex Maps is a Russian web mapping service developed by Yandex. The service provides detailed maps of the whole world. It includes a search, information about traffic jams, routing and street panoramas. Yandex.Maps is the most popular cartographic service in Russia. Maps are available in four versions: maps, satellite images, satellite images with captions, and legend (hybrid).
The Bing Maps aerial imagery web mapping service offers worldwide orthographic aerial and satellite imagery. Coverage varies by region, with the most detailed coverage in the USA and United Kingdom. Coverage in different areas within a country also varies in detail based on the availability of imagery for that region. Bing Maps is continuously adding imagery in new areas and updating coverage in areas of existing coverage.
Yandex Maps is a Russian web mapping service developed by Yandex. The service provides detailed maps of the whole world. It includes a search, information about traffic jams, routing and street panoramas. Yandex.Maps is the most popular cartographic service in Russia. Maps are available in four versions: maps, satellite images, satellite images with captions, and legend (hybrid).
© GK 1Globe LLC, 2020–2021. All Rights Reserved.
The Terms of Use include the specific 1Globe Application Terms of Use:
Any part of contents or code may not be copied or used except under the terms described in the Terms of Use or by a separate written agreement with GK 1Globe LLC.
You may not copy, store, or redistribute any portion of the data or code for use in an offline, disconnected, or local environment. Client-side and proxy-based caching are allowed as long as it is a general caching mechanism caching other internet traffic.
You agree that 1Globe Application is provided as-is and at-will, and will not hold GK 1Globe LLC responsible for anything bad that happens as a result of your use of the data set or code or your inability to use data o code.
You agree that these terms of use may change at any time, and that your continued use of the data set or code constitutes acceptance of the new terms.
Project management -<EMAIL_ADDRESS>Please, be free to offer collaboration ideas and commercial suggestions.
Support team -<EMAIL_ADDRESS>If you have questions or any problems with application, please contact our support team.
DevOps department -<EMAIL_ADDRESS>Please, use this email address for suggestions for improvements.


University of Ruhuna, Galle, Sri Lanka
To become an outstanding, well-recognized academic center of excellence in Civil and Environmental Engineering in the country.
To be a remarkable center of excellence in education and research in the area of Electrical, Electronic, Telecommunication and Information Engineering .
Is to be an innovative leader in undergraduate and graduate education, high quality research, and expert technical services; essential for sustainable social, economic, and technological development of the society .
Department of Interdisciplinary Studies is the Department, which cater for the managerial skill development while supporting the major steams by providing the necessary background knowledge in Mathematical areas.
ACEPS – 2018 Symposium will be organized and hosted by Department of Civil and Environmental Engineering, University of Ruhuna in collaboration with Saitama University, Japan and Asia Pacific Network for Global Change Research. ACEPS-2018 will be held at the Faculty of Engineering, University of Ruhuna on 15th March 2018. -More
Annual Research Symposium (ARS) of the Faculty of Engineering, University of Ruhuna will be held on January 2018 at the Faculty premises in Galle, -More
Professor Shinichiro Sakikawa, Director-International Relations Center, Kochi University of Technology (KUT), Japan visited the Department on 11/12/2017 to discuss about postgraduate research opportunities. -More
The closing ceremony of Inter-faculty sports meet of University of Ruhuna for 2017 was successfully held on 29th October, 2017 at the university playground, University of Ruhuna, Matara. -More
Inter University Games 2017 concluded on 30th of September. According to the final points table, University of Ruhuna got 8th place with 152 total points. -More
Copyright © 2013 - All Rights Reserved -<EMAIL_ADDRESS>By Faculty of Engineering


a) Anisotropic absorption and emission from a single core‐shell CdSe/CdS QR, with its long axis ( c‐axis) parallel to the x‐axis in the xyz coordinates, b) Relative emission intensities of CdSe/CdS QRs aligned in xy plane at θ = 0°, 45°, and 90° with regard to the polarization azimuth of the impinging light. Reproduced with permission. 57 Copyright 2018, Wiley‐VCH.


class Sass::Script::Value::Number
A SassScript object representing a number. SassScript numbers can have decimal values, and can also have units. For example, `12`, `1px`, and `10.45em` are all valid values.
Numbers can also have more complex units, such as `1px*em/in`. These cannot be inputted directly in Sass code at the moment.
Constants
- CONVERSION_TABLE
in cm pc mm pt px
- CONVERTABLE_UNITS
A hash of unit names to their index in the conversion table
- NO_UNITS
Used so we don’t allocate two new arrays for each new number.
- OPERATIONS
Attributes
A list of units in the denominator of the number. For example, `1px*em/in*cm` would return `[“in”, “cm”]` @return [Array<String>]
A list of units in the numerator of the number. For example, `1px*em/in*cm` would return `[“px”, “em”]` @return [Array<String>]
The original representation of this number. For example, although the result of `1px/2px` is `0.5`, the value of `#original` is `“1px/2px”`.
This is only non-nil when the original value should be used as the CSS value, as in `font: 1px/2px`.
@return [Boolean, nil]
The Ruby value of the number.
@return [Numeric]
Public Class Methods
@param value [Numeric] The value of the number @param #numerator_units [::String, Array<::String>] See {#numerator_units} @param #denominator_units [::String, Array<::String>] See {#denominator_units}
# File lib/sass/script/value/number.rb, line 60 def initialize(value, numerator_units = NO_UNITS, denominator_units = NO_UNITS) numerator_units = [numerator_units] if numerator_units.is_a?(::String) denominator_units = [denominator_units] if denominator_units.is_a?(::String) super(value) @numerator_units = numerator_units @denominator_units = denominator_units normalize! end
# File lib/sass/script/value/number.rb, line 36 def self.precision @precision ||= 5 end
Sets the number of digits of precision For example, if this is `3`, `3.1415926` will be printed as `3.142`.
# File lib/sass/script/value/number.rb, line 43 def self.precision=(digits) @precision = digits.round @precision_factor = 10.0**@precision end
the precision factor used in numeric output it is derived from the `precision` method.
# File lib/sass/script/value/number.rb, line 50 def self.precision_factor @precision_factor ||= 10.0**precision end
Private Class Methods
@private
# File lib/sass/script/value/number.rb, line 379 def self.round(num) if num.is_a?(Float) && (num.infinite? || num.nan?) num elsif num % 1 == 0.0 num.to_i else ((num * precision_factor).round / precision_factor).to_f end end
Public Instance Methods
Returns this number converted to other units. The conversion takes into account the relationship between e.g. mm and cm, as well as between e.g. in and cm.
If this number has no units, it will simply return itself with the given units.
An incompatible coercion, e.g. between px and cm, will raise an error.
@param num_units [Array<String>] The numerator units to coerce this number into.
See {\#numerator\_units}
@param den_units [Array<String>] The denominator units to coerce this number into.
See {\#denominator\_units}
@return [Number] The number with the new units @raise [Sass::UnitConversionError] if the given units are incompatible with the number’s
current units
# File lib/sass/script/value/number.rb, line 345 def coerce(num_units, den_units) Number.new(if unitless? value else value * coercion_factor(@numerator_units, num_units) / coercion_factor(@denominator_units, den_units) end, num_units, den_units) end
@param other [Number] A number to decide if it can be compared with this number. @return [Boolean] Whether or not this number can be compared with the other.
# File lib/sass/script/value/number.rb, line 356 def comparable_to?(other) operate(other, :+) true rescue Sass::UnitConversionError false end
The SassScript `/` operation. Its functionality depends on the type of its argument:
{Number} : Divides this number by the other, converting units appropriately.
{Value} : See {Value::Base#div}.
@param other [Value] The right-hand side of the operator @return [Value] The result of the operation
# File lib/sass/script/value/number.rb, line 161 def div(other) if other.is_a? Number res = operate(other, :/) if original && other.original res.original = "#{original}/#{other.original}" end res else super end end
The SassScript `==` operation.
@param other [Value] The right-hand side of the operator @return [Boolean] Whether this number is equal to the other object
# File lib/sass/script/value/number.rb, line 191 def eq(other) return Bool::FALSE unless other.is_a?(Sass::Script::Value::Number) this = self begin if unitless? this = this.coerce(other.numerator_units, other.denominator_units) else other = other.coerce(@numerator_units, @denominator_units) end rescue Sass::UnitConversionError return Bool::FALSE end Bool.new(this.value == other.value) end
Hash-equality works differently than `==` equality for numbers. Hash-equality must be transitive, so it just compares the exact value, numerator units, and denominator units.
# File lib/sass/script/value/number.rb, line 213 def eql?(other) value == other.value && numerator_units == other.numerator_units && denominator_units == other.denominator_units end
The SassScript `>` operation.
@param other [Number] The right-hand side of the operator @return [Boolean] Whether this number is greater than the other @raise [NoMethodError] if `other` is an invalid type
# File lib/sass/script/value/number.rb, line 223 def gt(other) raise NoMethodError.new(nil, :gt) unless other.is_a?(Number) operate(other, :>) end
The SassScript `>=` operation.
@param other [Number] The right-hand side of the operator @return [Boolean] Whether this number is greater than or equal to the other @raise [NoMethodError] if `other` is an invalid type
# File lib/sass/script/value/number.rb, line 233 def gte(other) raise NoMethodError.new(nil, :gte) unless other.is_a?(Number) operate(other, :>=) end
# File lib/sass/script/value/number.rb, line 206 def hash [value, numerator_units, denominator_units].hash end
Returns a readable representation of this number.
This representation is valid CSS (and valid SassScript) as long as there is only one unit.
@return [String] The representation
# File lib/sass/script/value/number.rb, line 273 def inspect(opts = {}) return original if original value = self.class.round(self.value) str = value.to_s # Ruby will occasionally print in scientific notation if the number is # small enough. That's technically valid CSS, but it's not well-supported # and confusing. str = ("%0.#{self.class.precision}f" % value).gsub(/0*$/, '') if str.include?('e') unitless? ? str : "#{str}#{unit_str}" end
@return [Boolean] Whether or not this number is an integer.
# File lib/sass/script/value/number.rb, line 296 def int? value % 1 == 0.0 end
Checks whether the number has the numerator unit specified.
@example
number = Sass::Script::Value::Number.new(10, "px") number.is_unit?("px") => true number.is_unit?(nil) => false
@param unit [::String, nil] The unit the number should have or nil if the number
should be unitless.
@see #unitless? The unitless? method may be more readable.
# File lib/sass/script/value/number.rb, line 315 def is_unit?(unit) if unit denominator_units.size == 0 && numerator_units.size == 1 && numerator_units.first == unit else unitless? end end
@return [Boolean] Whether or not this number has units that can be represented in CSS
(that is, zero or one \{#numerator\_units}).
# File lib/sass/script/value/number.rb, line 325 def legal_units? (@numerator_units.empty? || @numerator_units.size == 1) && @denominator_units.empty? end
The SassScript `<` operation.
@param other [Number] The right-hand side of the operator @return [Boolean] Whether this number is less than the other @raise [NoMethodError] if `other` is an invalid type
# File lib/sass/script/value/number.rb, line 243 def lt(other) raise NoMethodError.new(nil, :lt) unless other.is_a?(Number) operate(other, :<) end
The SassScript `<=` operation.
@param other [Number] The right-hand side of the operator @return [Boolean] Whether this number is less than or equal to the other @raise [NoMethodError] if `other` is an invalid type
# File lib/sass/script/value/number.rb, line 253 def lte(other) raise NoMethodError.new(nil, :lte) unless other.is_a?(Number) operate(other, :<=) end
The SassScript binary `-` operation (e.g. `$a - $b`). Its functionality depends on the type of its argument:
{Number} : Subtracts this number from the other, converting units if possible.
{Value} : See {Value::Base#minus}.
@param other [Value] The right-hand side of the operator @return [Value] The result of the operation @raise [Sass::UnitConversionError] if `other` is a number with incompatible units
# File lib/sass/script/value/number.rb, line 106 def minus(other) if other.is_a? Number operate(other, :-) else super end end
The SassScript `%` operation.
@param other [Number] The right-hand side of the operator @return [Number] This number modulo the other @raise [NoMethodError] if `other` is an invalid type @raise [Sass::UnitConversionError] if `other` has incompatible units
# File lib/sass/script/value/number.rb, line 179 def mod(other) if other.is_a?(Number) operate(other, :%) else raise NoMethodError.new(nil, :mod) end end
The SassScript `+` operation. Its functionality depends on the type of its argument:
{Number} : Adds the two numbers together, converting units if possible.
{Color} : Adds this number to each of the RGB color channels.
{Value} : See {Value::Base#plus}.
@param other [Value] The right-hand side of the operator @return [Value] The result of the operation @raise [Sass::UnitConversionError] if `other` is a number with incompatible units
# File lib/sass/script/value/number.rb, line 84 def plus(other) if other.is_a? Number operate(other, :+) elsif other.is_a?(Color) other.plus(self) else super end end
The SassScript `*` operation. Its functionality depends on the type of its argument:
{Number} : Multiplies the two numbers together, converting units appropriately.
{Color} : Multiplies each of the RGB color channels by this number.
@param other [Number, Color] The right-hand side of the operator @return [Number, Color] The result of the operation @raise [NoMethodError] if `other` is an invalid type
# File lib/sass/script/value/number.rb, line 140 def times(other) if other.is_a? Number operate(other, :*) elsif other.is_a? Color other.times(self) else raise NoMethodError.new(nil, :times) end end
@return [Fixnum] The integer value of the number @raise [Sass::SyntaxError] if the number isn’t an integer
# File lib/sass/script/value/number.rb, line 290 def to_i super unless int? value end
@return [String] The CSS representation of this number @raise [Sass::SyntaxError] if this number has units that can’t be used in CSS
(e.g. `px*in`)
# File lib/sass/script/value/number.rb, line 261 def to_s(opts = {}) return original if original raise Sass::SyntaxError.new("#{inspect} isn't a valid CSS value.") unless legal_units? inspect end
The SassScript unary `-` operation (e.g. `-$a`).
@return [Number] The negative value of this number
# File lib/sass/script/value/number.rb, line 124 def unary_minus Number.new(-value, @numerator_units, @denominator_units) end
The SassScript unary `+` operation (e.g. `+$a`).
@return [Number] The value of this number
# File lib/sass/script/value/number.rb, line 117 def unary_plus self end
Returns a human readable representation of the units in this number. For complex units this takes the form of: numerator_unit1 * numerator_unit2 / denominator_unit1 * denominator_unit2 @return [String] a string that represents the units in this number
# File lib/sass/script/value/number.rb, line 367 def unit_str rv = @numerator_units.sort.join("*") if @denominator_units.any? rv << "/" rv << @denominator_units.sort.join("*") end rv end
@return [Boolean] Whether or not this number has no units.
# File lib/sass/script/value/number.rb, line 301 def unitless? @numerator_units.empty? && @denominator_units.empty? end
Private Instance Methods
# File lib/sass/script/value/number.rb, line 411 def coercion_factor(from_units, to_units) # get a list of unmatched units from_units, to_units = sans_common_units(from_units, to_units) if from_units.size != to_units.size || !convertable?(from_units | to_units) raise Sass::UnitConversionError.new( "Incompatible units: '#{from_units.join('*')}' and '#{to_units.join('*')}'.") end from_units.zip(to_units).inject(1) {|m, p| m * conversion_factor(p[0], p[1])} end
# File lib/sass/script/value/number.rb, line 423 def compute_units(this, other, operation) case operation when :* [this.numerator_units + other.numerator_units, this.denominator_units + other.denominator_units] when :/ [this.numerator_units + other.denominator_units, this.denominator_units + other.numerator_units] else [this.numerator_units, this.denominator_units] end end
# File lib/sass/script/value/number.rb, line 461 def conversion_factor(from_unit, to_unit) res = CONVERSION_TABLE[CONVERTABLE_UNITS[from_unit]][CONVERTABLE_UNITS[to_unit]] return 1.0 / conversion_factor(to_unit, from_unit) if res.nil? res end
# File lib/sass/script/value/number.rb, line 467 def convertable?(units) Array(units).all? {|u| CONVERTABLE_UNITS.include?(u)} end
# File lib/sass/script/value/number.rb, line 436 def normalize! return if unitless? @numerator_units, @denominator_units = sans_common_units(@numerator_units, @denominator_units) @denominator_units.each_with_index do |d, i| if convertable?(d) && (u = @numerator_units.find(&method(:convertable?))) @value /= conversion_factor(d, u) @denominator_units.delete_at(i) @numerator_units.delete_at(@numerator_units.index(u)) end end end
# File lib/sass/script/value/number.rb, line 391 def operate(other, operation) this = self if OPERATIONS.include?(operation) if unitless? this = this.coerce(other.numerator_units, other.denominator_units) else other = other.coerce(@numerator_units, @denominator_units) end end # avoid integer division value = :/ == operation ? this.value.to_f : this.value result = value.send(operation, other.value) if result.is_a?(Numeric) Number.new(result, *compute_units(this, other, operation)) else # Boolean op Bool.new(result) end end
# File lib/sass/script/value/number.rb, line 471 def sans_common_units(units1, units2) units2 = units2.dup # Can't just use -, because we want px*px to coerce properly to px*mm units1 = units1.map do |u| j = units2.index(u) next u unless j units2.delete_at(j) nil end units1.compact! return units1, units2 end


--- layout: page title: "Contact Me" description: "Got questions or just want to get in touch with me?" header-img: "img/contact-bg.jpg" ---
Tell me or ask anything you're curious about. Fill out the form below to send me a message and I will try to get back to you as soon as I can.


Sort
Rating
Location
Price
Instructors
Michael Scarn
Computer Engineer | 0.1 Miles
Contact
Marc Isaia
Political Science | 1.2 Miles
Contact
Roger Federer
Computer Science | 0.7 Miles
Contact