Preparation time
overnight
Cooking time
30 mins to 1 hour
Serves
Makes 4
Dietary
These are very sophisticated puds with the sweetness of the custard balanced by the flavour of coffee and a touch of bitterness from the caramel. You need to make these a day in advance so they can sit in the fridge, where the caramel will gradually melt into the coffee custard.
Equipment and preparation: you will need four ovenproof ramekins.
Heat the oven to 150C/300F/Gas 2. Have ready four ovenproof ramekins.
Put the coffee, caster sugar and milk in a saucepan and bring gently up to simmering point, stirring occasionally to dissolve the coffee. Do not boil. Remove from the heat and set aside while you make the caramel.
For the caramel, put the sugar and 50ml/2fl oz of water in a heavy based-pan. Heat gently until the sugar has dissolved, then bring to the boil. Boil for a few minutes, or until the syrup has turned to a dark golden-brown caramel.
As soon as the caramel has reached the right colour, pour it into the ramekins. Take care because it will be extremely hot. Leave to set (but do not put it in the fridge).
Beat the eggs and egg yolks together in a bowl. Gently pour on the coffee-flavoured milk and whisk until well combined. Strain into a jug. Pour this mixture into the ramekins. Put the ramekins in a large, deep oven tray. Pour hot water into the tray so that it comes three-quarters of the way up the ramekins. Cover the tray with foil and place in the oven. Bake for 40-45 minutes, or until the custards are just set but still have a bit of wobble.
Remove from the oven dish and leave to cool completely, then refrigerate for 24 hours.
To turn out, first run a thin-bladed knife around the outside of the custard then put a plate over the top and invert the ramekin so that the custard and its lovely caramel juices come out onto the dish. Serve straight away.


Hello, folks, we are having difficulty with the hosting, so moved to Github. Don't worry! Will be coming shortly. In the mean time you can check the hall of fame page


I love to cook and work with children. I have previously been a Big Brother for Big Brothers and Big Sisters.


Guidance
Information for employers considering offering traineeships to young people, including the benefits of traineeships for your business.
PDF , 175KB , 2 pages
If you use assistive technology (such as a screen reader) and need a version of this document in a more accessible format, please email<EMAIL_ADDRESS>. Please tell us what format you need. It will help us if you say what assistive technology you use.
A traineeship is an education and training programme with work experience that is focused on giving young people the skills and experience that employers are looking for.
Traineeships can last up to a maximum of 6 months and will include:
work preparation training provided by the training organisation
English and maths support if required, provided by the training organisation
a high-quality work experience placement with an employer
In addition to these basic elements, you and the training provider can add flexible additional content to meet the needs of your business and the local labour market.
At the end of their traineeship, each young person will be guaranteed a job interview if a role becomes available or an exit interview together with meaningful written feedback to help them secure an apprenticeship or employment with another employer.
If you are interested in finding out more about employing trainees or offering traineeships and the benefits they can bring to a business please contact the National Apprenticeship Service .
For more information, please refer to the employer guide to apprenticeships and traineeships .
Published: 21 February 2014
Updated: 12 December 2016
From: Skills Funding Agency


Interlock architecture
Estimated reading time: 6 minutesThis document covers the following considerations:
- Interlock default architecture
- Single Interlock deployment (default) A single interlock deployment creates a /24 ingress network to be used by all applications in a Docker Enterprise cluster
- Service clusters An interlock Service Cluster creates separate interlock proxies that are assigned to specific applications.
- Application optimization for Interlock Interlock has several configuration options so that it can be deployed in a manner that best matches the application and infrastructure requirements of a deployment.
A good understanding of this content is necessary for the successful deployment and use of Interlock.
Interlock default architecture
Single Interlock deployment
When an application image is updated, the following actions occur:
- The service is updated with a new version of the application.
- The default “stop-first” policy stops the first replica before scheduling the second. The interlock proxies remove ip1.0 out of the backend pool as the app.1 task is removed.
- The first application task is rescheduled with the new image after the first task stops.
The interlock proxy.1 is then rescheduled with the new nginx configuration that contains the update for the new app.1 task.
After proxy.1 is complete, proxy.2 redeploys with the updated ngnix configuration for the app.1 task.
In this scenario, the amount of time that the service is unavailable is less than 30 seconds.
Service clusters
Optimizing Interlock for applications
Application update order
Swarm provides control over the order in which old tasks are removed while new ones are created. This is controlled on the service-level with --update-order
.
stop-first
(default)- Configures the currently updating task to stop before the new task is scheduled.start-first
- Configures the current task to stop after the new task has scheduled. This guarantees that the new task is running before the old task has shut down.
Use start-first
if …
- You have a single application replica and you cannot have service interruption. Both the old and new tasks run simultaneously during the update, but this ensurse that there is no gap in service during the update.
Use stop-first
if …
- Old and new tasks of your service cannot serve clients simultaneously.
- You do not have enough cluster resourcing to run old and new replicas simultaneously.
In most cases, start-first
is the best choice because it optimizes for high availability during updates.
Application update delay
Swarm services use update-delay
to control the speed at which a service is updated. This adds a timed delay between application tasks as they are updated. The delay controls the time from when the first task of a service transitions to healthy state and the time that the second task begins its update. The default is 0 seconds, which means that a replica task begins updating as soon as the previous updated task transitions in to a healthy state.
Use update-delay
if …
- You are optimizing for the least number of dropped connections and a longer update cycle as an acceptable tradeoff.
- Interlock update convergence takes a long time in your environment (can occur when having large amount of overlay networks).
Do not use update-delay
if …
- Service updates must occur rapidly.
- Old and new tasks of your service cannot serve clients simultaneously.
Use application health checks
Swarm uses application health checks extensively to ensure that its updates do not cause service interruption. health-cmd
can be configured in a Dockerfile or compose file to define a method for health checking an application. Without health checks, Swarm cannot determine when an application is truly ready to service traffic and will mark it as healthy as soon as the container process is running. This can potentially send traffic to an application before it is capable of serving clients, leading to dropped connections.
Application stop grace period
stop-grace-period
configures a time period for which the task will continue to run but will not accept new connections. This allows connections to drain before the task is stopped, reducing the possibility of terminating requests in-flight. The default value is 10 seconds. This means that a task continues to run for 10 seconds after starting its shutdown cycle, which also removes it from the load balancer to prevent it from accepting new connections. Applications that receive long-lived connections can benefit from longer shut down cycles so that connections can terminate normally.
Interlock optimizations
Use service clusters for Interlock segmentation
Interlock service clusters allow Interlock to be segmented into multiple logical instances called “service clusters”, which have independently managed proxies. Application traffic only uses the proxies for a specific service cluster, allowing the full segmentation of traffic. Each service cluster only connects to the networks using that specific service cluster, which reduces the number of overlay networks to which proxies connect. Because service clusters also deploy separate proxies, this also reduces the amount of churn in LB configs when there are service updates.
Minimizing number of overlay networks
Interlock proxy containers connect to the overlay network of every Swarm service. Having many networks connected to Interlock adds incremental delay when Interlock updates its load balancer configuration. Each network connected to Interlock generally adds 1-2 seconds of update delay. With many networks, the Interlock update delay causes the LB config to be out of date for too long, which can cause traffic to be dropped.
Minimizing the number of overlay networks that Interlock connects to can be accomplished in two ways:
- Reduce the number of networks. If the architecture permits it, applications can be grouped together to use the same networks.
- Use Interlock service clusters. By segmenting Interlock, service clusters also segment which networks are connected to Interlock, reducing the number of networks to which each proxy is connected.
- Use admin-defined networks and limit the number of networks per service cluster.
Use Interlock VIP Mode
VIP Mode can be used to reduce the impact of application updates on the Interlock proxies. It utilizes the Swarm L4 load balancing VIPs instead of individual task IPs to load balance traffic to a more stable internal endpoint. This prevents the proxy LB configs from changing for most kinds of app service updates reducing churn for Interlock. The following features are not supported in VIP mode:
- Sticky sessions
- Websockets
- Canary deployments
The following features are supported in VIP mode:
- Host & context routing
- Context root rewrites
- Interlock TLS termination
- TLS passthrough
- Service clusters


Man sparks Twitter debate after buying flowers for girlfriend's best friend
by Janine PuhakThree might not be a crowd for one Indiana college student — and her boyfriend, and her best friend — after the woman recently praised her beau on social media for buying flowers for her gal pal after she was cheated on.
In the days since the young woman shared the news to Twitter, the collegian has admitted she’s “shocked” that her boyfriend’s good deed has gone viral, especially after commenters began debating whether or not the well-intentioned gesture crossed the boundary of friendship into romance.
 “He knows if he’s dating me, he’s dating my friends.”
The Ball State University student's tweet quickly received over 3,000 shares, 22,000 likes and more than 1,200 comments — some from folks sharing their very heated reactions.
 CHEST TATTOO
One user told Gibson that it was her own duty to cheer up her best friend after her heartbreak, while another agreed that it would only be OK for someone to “maybe” give flowers to their significant other’s mother.
"Your boyfriend is also dating YOUR FRIENDS," one wrote, using the author's own wording against her.
CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER
In defense of the good deed, fans of Gibson’s beau said the man was a “gentleman” and insisted that the thoughtful gesture was totally innocent.
Other Twittizens, meanwhile, seized the moment to poke fun at the chatter, declaring that the trio was officially in a “love triangle.” One commenter asked Gibson, for example, if she’d mind if her boyfriend and best friend split a bottle of wine (instead of exchanging flowers) to discuss the incident.
Commenting on the overnight hype, Gibson told BuzzFeed News she was “shocked” by the backlash her story has since received.
The 21-year-old explained that her boyfriend, Max Kupfer, was recently inspired to surprise Gibson’s friend Stephanie with flowers after her boyfriend cheated on her, in hopes of cheering her up.
"I didn’t think it would come off creepy or overstepping, especially since they’re close friends," Gibson said of Kupfer and Stephanie’s friendship, insisting that social media commenters “misinterpreted” her words.
FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS
"I meant it more as a metaphor...my friends are his friends," she told BuzzFeed of her initially writing that her beau was "dating my friends."
"I wanted to cheer her up and do something nice for her,” Kupfer, 21, echoed in agreement.
According to Stephanie, the sweet surprise was so overwhelming and unexpected, the flowers “almost made [her] cry."
"It made my day better knowing I had people around me who cared for, and supported, me so much," she said of the kind act. "I really appreciated the gesture."
CLICK HERE TO GET THE FOX NEWS APP
Gibson added that her boyfriend’s “heart of gold” is what makes him so special to her in the first place.
"Max has a heart of gold and he cares about the people I keep close to me, which is everything I could ask for in a boyfriend,” she said.


Plato on Github
Report Home
observe/delegate/delegate.js
Maintainability
51.63
Lines of code
271
Difficulty
60.61
Estimated Errors
1.40
Function weight
By Complexity
By SLOC
steal('can/util', 'can/observe', function(can) { // ** - 'this' will be the deepest item changed // * - 'this' will be any changes within *, but * will be the // this returned // tells if the parts part of a delegate matches the broken up props of the event // gives the prop to use as 'this' // - parts - the attribute name of the delegate split in parts ['foo','*'] // - props - the split props of the event that happened ['foo','bar','0'] // - returns - the attribute to delegate too ('foo.bar'), or null if not a match var delegateMatches = function(parts, props){ //check props parts are the same or var len = parts.length, i =0, // keeps the matched props we will use matchedProps = [], prop; // if the event matches for(i; i< len; i++){ prop = props[i] // if no more props (but we should be matching them) // return null if( typeof prop !== 'string' ) { return null; } else // if we have a "**", match everything if( parts[i] == "**" ) { return props.join("."); } else // a match, but we want to delegate to "*" if (parts[i] == "*"){ // only do this if there is nothing after ... matchedProps.push(prop); } else if( prop === parts[i] ) { matchedProps.push(prop); } else { return null; } } return matchedProps.join("."); }, // gets a change event and tries to figure out which // delegates to call delegateHandler = function(event, prop, how, newVal, oldVal){ // pre-split properties to save some regexp time var props = prop.split("."), delegates = (this._observe_delegates || []).slice(0), delegate, attr, matchedAttr, hasMatch, valuesEqual; event.attr = prop; event.lastAttr = props[props.length -1 ]; // for each delegate for(var i =0; delegate = delegates[i++];){ // if there is a batchNum, this means that this // event is part of a series of events caused by a single // attrs call. We don't want to issue the same event // multiple times // setting the batchNum happens later if((event.batchNum && delegate.batchNum === event.batchNum) || delegate.undelegated ){ continue; } // reset match and values tests hasMatch = undefined; valuesEqual = true; // yeah, all this under here has to be redone v // for each attr in a delegate for(var a =0 ; a < delegate.attrs.length; a++){ attr = delegate.attrs[a]; // check if it is a match if(matchedAttr = delegateMatches(attr.parts, props)){ hasMatch = matchedAttr; } // if it has a value, make sure it's the right value // if it's set, we should probably check that it has a // value no matter what if(attr.value && valuesEqual /* || delegate.hasValues */){ valuesEqual = attr.value === ""+this.attr(attr.attr) } else if (valuesEqual && delegate.attrs.length > 1){ // if there are multiple attributes, each has to at // least have some value valuesEqual = this.attr(attr.attr) !== undefined } } // if there is a match and valuesEqual ... call back if(hasMatch && valuesEqual) { // how to get to the changed property from the delegate var from = prop.replace(hasMatch+".",""); // if this event is part of a batch, set it on the delegate // to only send one event if(event.batchNum ){ delegate.batchNum = event.batchNum } // if we listen to change, fire those with the same attrs // TODO: the attrs should probably be using from if( delegate.event === 'change' ){ arguments[1] = from; event.curAttr = hasMatch; delegate.callback.apply(this.attr(hasMatch), can.makeArray( arguments)); } else if(delegate.event === how ){ // if it's a match, callback with the location of the match delegate.callback.apply(this.attr(hasMatch), [event,newVal, oldVal, from]); } else if(delegate.event === 'set' && how == 'add' ) { // if we are listening to set, we should also listen to add delegate.callback.apply(this.attr(hasMatch), [event,newVal, oldVal, from]); } } } }; can.extend(can.Observe.prototype,{ /** * @function can.Observe.prototype.delegate delegate * @parent can.Observe.delegate * @plugin can/observe/delegate * @signature `observe.delegate( selector, event, handler )` * * `delegate( selector, event, handler(ev,newVal,oldVal,from) )` listen for changes * in a child attribute from the parent. The child attribute * does not have to exist. * * * // create an observable * var observe = new can.Observe({ * foo : { * bar : "Hello World" * } * }) * * //listen to changes on a property * observe.delegate("foo.bar","change", function(ev, prop, how, newVal, oldVal){ * // foo.bar has been added, set, or removed * this //-> * }); * * // change the property * observe.attr('foo.bar',"Goodbye Cruel World") * * @param {String} selector The attributes you want to listen for changes in. * * Selector should be the property or * property names of the element you are searching. Examples: * * "name" - listens to the "name" property changing * "name, address" - listens to "name" or "address" changing * "name address" - listens to "name" or "address" changing * "address.*" - listens to property directly in address * "address.**" - listens to any property change in address * "foo=bar" - listens when foo is "bar" * * @param {String} event The event name. One of ("set","add","remove","change") * @param {Function} handler(ev,newVal,oldVal,prop) The callback handler * called with: * * - newVal - the new value set on the observe * - oldVal - the old value set on the observe * - prop - the prop name that was changed * * @return {can.Observe} the observe for chaining */ delegate : function(selector, event, handler){ selector = can.trim(selector); var delegates = this._observe_delegates || (this._observe_delegates = []), attrs = [], selectorRegex = /([^\s=,]+)(?:=("[^",]*"|'[^',]*'|[^\s"',]*))?(,?)\s*/g, matches; // parse each property in the selector while(matches = selectorRegex.exec(selector)) { // we need to do a little doctoring to make up for the quotes. if(matches[2] && can.inArray(matches[2].substr(0, 1), ['"', "'"]) >= 0) { matches[2] = matches[2].substr(1, -1); } attrs.push({ // the attribute name attr: matches[1], // the attribute name, pre-split for speed parts: matches[1].split('.'), // the value associated with this property (if there was one given) value: matches[2], // whether this selector combines with the one after it with AND or OR or: matches[3] === ',' }); } // delegates has pre-processed info about the event delegates.push({ // the attrs name for unbinding selector : selector, // an object of attribute names and values {type: 'recipe',id: undefined} // undefined means a value was not defined attrs : attrs, callback : handler, event: event }); if(delegates.length === 1){ this.bind("change",delegateHandler) } return this; }, /** * @function can.Observe.prototype.undelegate undelegate * @parent can.Observe.delegate * @plugin can/observe/delegate * * @signature `observe.undelegate( selector, event, handler )` * `undelegate( selector, event, handler )` removes a delegated event handler from an observe. * * observe.undelegate("name","set", handler ) * * @param {String} selector the attribute name of the object you want to undelegate from. * @param {String} event the event name * @param {Function} handler the callback handler * @return {can.Observe} the observe for chaining */ undelegate : function(selector, event, handler){ selector = selector && can.trim(selector); var i =0, delegates = this._observe_delegates || [], delegateOb; if(selector){ while(i < delegates.length){ delegateOb = delegates[i]; if( delegateOb.callback === handler || (!handler && delegateOb.selector === selector) ){ delegateOb.undelegated = true; delegates.splice(i,1) } else { i++; } } } else { // remove all delegates delegates = []; } if(!delegates.length){ //can.removeData(this, "_observe_delegates"); this.unbind("change",delegateHandler) } return this; } }); // add helpers for testing .. can.Observe.prototype.delegate.matches = delegateMatches; return can.Observe; })


Mark P Simmons
Democrat
I develop projects and programs for solar PV and energy efficiency systems. This includes economic modeling, sales, marketing, and sales rep management. I work from my home in Denver, for Electriq Power, Inc. based in San Leandro, California.
2.5 years at University of Colorado, Boulder. Did not complete my degree. Started a company instead. Have started 18 companies.
80224
Volunteered to be a neighborhood HQ and knock on doors in our neighborhood during the 2008 Obama campaign. I attended Denver demonstrations after the 2016 election, for Science and the Womens March. I have attended a few smaller demonstrations at the state capitol, advocating for solar.
I have regularly donated to individual candidates, max amount $50, except for one couple fundraiser, for Carey Kennedy where, if I recall correctly, I donated $250.
Cook Park Community Garden, the Colorado Democratic Party, the Colorado Solar Energy Industries Association.
I heard on Colorado Public Radio you need volunteers. I decided I can devote the time to it. I firmly believe in non-partisan districting, so that every Coloradan has as equal a voice in government as possible.
I am skilled at working with groups, have a lot of experience with various sized groups- from amateur clubs to professional groups. During my career I have been Executive Director of a professional trade association, where part of my duties were to "keep the peace" between fiercely competing members. I was quite successful at this, increasing memberships and income for the seven years I served in this professional capacity. I firmly believe in non-partisan congressional districting, so that Americans of any political philosophy can be equally represented.
I am a relentlessly logical problem solver. Though my education major was creative writing I have ended up , during the 13 years in my second career in solar, working with numbers more than words. As an economic modeler I have built formulas and spreadsheets to combine different, disparate technologies, utility tariffs, billing analyses and numerous other factors into combined models. This is to optimize the economics of a project, and optimization of any project or program is vital to its success. First one must determine facts. Then recognize conflicts, predict future conflicts, and recognize the potential for negative ramifications for any particular solution, to get to the best way to move forward.
Male


Let's ponder into something other than Python. Let's go back to C.
Have you heard of C++? Why was it created when you already have a "beautiful" language like C?
Did you know that the industry uses the Object Oriented paradigm for Programming?
It is a bit more to learn, but in the long run, it's helpful :)
Classes and Abstraction
Encapsulation
Inheritance
Polymorphism
Let's see how to code classes.. then we will see those topics
"class" is the keyword used to define classes
class shape:
statement 1
statement 2
....
It's as simple as that :P
And you define the methods, the same way you define the functions except that you do it inside the class definition.
class shape:
statement 1
statement 2
....
def area(parameter):
statement 3
statement 4
def perimeter(parameter):
statement 5
....
Again, its simple
Let's define an object
square = shape()
rectangle = shape()
Objects are instances of a class.
When you instantiate an object, the function that is called implicitly ...
This kind of function is called a constructor.
class shape:
def __init__(self):
#some statements
The function __init__() is optional. You may or may not have it.
But this is probably where you would want to define __init__() function...
class shape:
def __init__(self, l, b):
self.length = l
self.breadth = b
self is used to address the object you're currently in. And the variables declared/accessed of this kind are called instance variables
Instance variables are only used after an object is declared.
class shape:
count = 0
def __init__(self, l, b):
self.length = l
self.breadth = b
shape.count += 1
Class variables are available to all the objects of that class. When you modify a class variable in one object, the change is visible to all the objects of that class.
square = shape(2, 2)
rectangle = shape(4, 5)
print shape.count #Should give 2
Let's complete this class now:)
class shape:
count = 0
def __init__(self, l, b):
self.length = l
self.breadth = b
shape.count += 1
def area(self):
statement(s)
return self.area
def perimeter(self):
statement(s)
return self.perimeter
Dont forget the indentation and colon (:) where required
Let's write some code to create objects and use member functions.
square = shape(2,2)
rectange = shape(4,5)
print square.area()
print rectangle.perimeter()
The code should print the area of square and perimeter of the rectangle defined.
One more thing before we move ahead...
Let's see how we can simulate function overloading in Python...
Kind of function overloading...
def add(a, b, c=0)
return a+b+c
print (add(2,3))
print (add(2,3,4))
Here, c has a default value of 0, but when passed as an argument, it will use the latest argument.

Now what if I wanted to find the number of circles whose radius is less than 10 units. Give me the answer in simple 1 line.
You can make minimal changes in the class code.
Now's lets see the terms we used previously...
square = shape()
print square.area()
I don't need to worry about how the area is being calculated. Its none of my business and shouldn't be yours :P
In fact, in the industry you don't have to write code for everything. Somebody else defines a class for you and every class has some functions.
A collection of such classes will form, what is called, library.
Simply put your code inside a capsule
So, writing a class is encapsulation.
Putting all the procedures that access or modify related data in one place, rather than having procedures spread all over the system
Let's go a bit into Inheritance and polymorphism now...
In Python, there is only the diseases 'wala' inheritance.
(No wonder python is slow. pun intended.)
class DistinctList(list):
Sum = 0
def __init__(self):
list.__init__(self)
def append(self,a):
if a not in self:
list.append(self,a)
self.Sum+=a
def Print(self):
print (self)
L = DistinctList()
L.append(1)
L.append(2)
L.append(1)
L.append(4)
print L.Sum
print L[0]
L.Print()
Function append() is overridden
class MessengerUser():
def __init__(self,userName,passWord):
self.userName=userName
self.passWord=passWord
def Login(self):
# LogIn
def Text(self,text,friendID):
# send text to the friend
class WhatsAppUser():
def __init__(self,phoneNumber):
self.phoneNumber=phoneNumber
def Login(self,accessToken):
# LogIn
def Text(self,text,friend):
# send text to the friend
class Texter(MessengerUser,WhatsAppUser):
def __init__(self,phoneNumber,fbName,fbPass):
# set all data member
def WhatsApp(self,text,friend):
WhatsAppUser.Text(self,text,friend)
def Messenger(self,text,friend):
Messenger.Text(self,text,friend)
The concept used when you have two functions with the exact same function name, but different functions
Let's see an example for better clarity...
I will use it in context with inheritance...
class whatsapp_msg:
def __init__(self, message):
self.message = message
def send(self, to):
#send message to only person
class group_msg(whatsapp_msg):
def __init__(self, message):
whatsapp_msg(message)
def send(self, to_list):
#here to is a list, so in implementation
#we will iterate over the list and send to all
message=whatsapp_msg("Hey beautiful! :)")
message.send("Rose")
group_message = group_msg("Hey girls :)")
girls = ["Rose", "Mary", "Emma"]
group_message.send(girls)
Function overriding can also be called as polymorphism.
That's it from the Python World. You can call yourself a Python Expert if you program using classes and objects and if you understood the contents of this presentation properly :)
We will now move onto the Selenium part. You will write a Selenium script yourself.
For the next session, Click here


The International Conference on Learning Representations (ICLR) 2020 is being hosted virtually from April 26th - May 1st. We’re excited to share all the work from SAIL that’s being presented, and you’ll find links to papers, videos and blogs below. Feel free to reach out to the contact authors directly to learn more about the work that’s happening at Stanford!
List of Accepted Papers
Hierarchical Foresight: Self-Supervised Learning of Long-Horizon Tasks via Visual Subgoal Generation
paper
Suraj Nair, Chelsea Finn | contact<EMAIL_ADDRESS>keywords: visual planning; reinforcement learning; robotics
Active World Model Learning with Progress Curiosity
paper
Kuno Kim, Megumi Sano, Julian De Freitas, Nick Haber, Dan Yamins | contact<EMAIL_ADDRESS>keywords: curiosity, reinforcement learning, cognitive science
Kaleidoscope: An Efficient, Learnable Representation For All Structured Linear Maps
paper | blog post
Tri Dao, Nimit Sohoni, Albert Gu, Matthew Eichhorn, Amit Blonder, Megan Leszczynski, Atri Rudra, Christopher Ré | contact<EMAIL_ADDRESS>keywords: structured matrices, efficient ml, algorithms, butterfly matrices, arithmetic circuits
Weakly Supervised Disentanglement with Guarantees
paper
Rui Shu, Yining Chen, Abhishek Kumar, Stefano Ermon, Ben Poole | contact<EMAIL_ADDRESS>keywords: disentanglement, generative models, weak supervision, representation learning, theory
Depth width tradeoffs for Relu networks via Sharkovsky’s theorem
paper
Vaggos Chatziafratis, Sai Ganesh Nagarajan, Ioannis Panageas, Xiao Wang | contact<EMAIL_ADDRESS>keywords: dynamical systems, benefits of depth, expressivity
Watch, Try, Learn: Meta-Learning from Demonstrations and Reward
paper
Allan Zhou, Eric Jang, Daniel Kappler, Alex Herzog, Mohi Khansari, Paul Wohlhart, Yunfei Bai, Mrinal Kalakrishnan, Sergey Levine, Chelsea Finn | contact<EMAIL_ADDRESS>keywords: imitation learning, meta-learning, reinforcement learning
Assessing robustness to noise: low-cost head CT triage
paper
Sarah Hooper, Jared Dunnmon, Matthew Lungren, Sanjiv Sam Gambhir, Christopher Ré, Adam Wang, Bhavik Patel | contact<EMAIL_ADDRESS>keywords: ai for affordable healthcare workshop, medical imaging, sinogram, ct, image noise
Learning transport cost from subset correspondence
paper
Ruishan Liu, Akshay Balsubramani, James Zou | contact<EMAIL_ADDRESS>keywords: optimal transport, data alignment, metric learning
Generalization through Memorization: Nearest Neighbor Language Models
paper
Urvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer, Mike Lewis | contact<EMAIL_ADDRESS>keywords: language models, k-nearest neighbors
Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalization
paper
Shiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, Percy Liang | contact<EMAIL_ADDRESS>keywords: distributionally robust optimization, deep learning, robustness, generalization, regularization
Phase Transitions for the Information Bottleneck in Representation Learning
paper
Tailin Wu, Ian Fischer | contact<EMAIL_ADDRESS>keywords: information theory, representation learning, phase transition
Improving Neural Language Generation with Spectrum Control
paper
Lingxiao Wang, Jing Huang, Kevin Huang, Ziniu Hu, Guangtao Wang, Quanquan Gu | contact<EMAIL_ADDRESS>keywords: neural language generation, pre-trained language model, spectrum control
Understanding and Improving Information Transfer in Multi-Task Learning
paper | blog post
Sen Wu, Hongyang Zhang, Christopher Ré | contact<EMAIL_ADDRESS>keywords: multi-task learning
Strategies for Pre-training Graph Neural Networks
paper | blog post
Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, Jure Leskovec | contact<EMAIL_ADDRESS>keywords: pre-training, transfer learning, graph neural networks
Query2box: Reasoning over Knowledge Graphs in Vector Space using Box Embeddings
paper
Hongyu Ren, Weihua Hu, Jure Leskovec | contact<EMAIL_ADDRESS>keywords: knowledge graph embeddings
Learning Self-Correctable Policies and Value Functions from Demonstrations with Negative Sampling
paper
Yuping Luo, Huazhe Xu, Tengyu Ma | contact<EMAIL_ADDRESS>keywords: imitation learning, model-based imitation learning, model-based rl, behavior cloning, covariate shift
Improved Sample Complexities for Deep Neural Networks and Robust Classification via an All-Layer Margin
paper
Colin Wei, Tengyu Ma | contact<EMAIL_ADDRESS>keywords: deep learning theory, generalization bounds, adversarially robust generalization, data-dependent generalization bounds
Selection via Proxy: Efficient Data Selection for Deep Learning
paper | blog post | code
Cody Coleman, Christopher Yeh, Stephen Mussmann, Baharan Mirzasoleiman, Peter Bailis, Percy Liang, Jure Leskovec, Matei Zaharia | contact<EMAIL_ADDRESS>keywords: active learning, data selection, deep learning
We look forward to seeing you at ICLR!


28 Dec 2015
Ruby Classes
The first example that comes to mind when thinking about how to explain classes and methods in ruby is a microwave. A microwave has many different functions. Most microwaves can cook food, defrost, tell time, and countdown from a given time. Some microwaves even have other completely different functions like over the range microwaves can exhaust steam from cooking on the stove! This is very similar to how classes and methods work.
You can think of the class as the microwave. It is the main body that everything else revolves around. The methods are like the functions of the microwave (cook, defrost, etc.)
Classes have variables that can represent just about anything. These are called instance variables. Keeping with our microwave analogy, an instance variable that a microwave would have is the time. When you want to cook something in the microwave you enter a time and then press cook. When you want to defrost something you enter the time and then hit defrost. The common variable is time. A lot of the microwave functions can do something with the time input. This is just like the methods in a class. Methods in the class can use the instance variable when running their code.
Methods also have their own personal variables that can only be used inside that method. This would be like selecting the specific power setting on the microwave. The microwave power function could have low medium or high. The cook and defrost functions can't use these variables. They can only use a time input. Below is what the code for a microwave class would look like
class Microwave def initialize @time = 4 end def power (setting) @current_power = setting end def cook @time + @current_power end def defrost frost_power = @current_power - 4 end def timer while @time > 0 @time -= 1 end end


Let's see...I love everything that is code! I also love everything that is tech!
I enjoy learning HTML & CSS. I would like to be proficient in Javascript!
You can contact me through my Twitter page! Don't be shy!


Larkhall teen represented her hometown in Miss Junior Teen Great Britain final
Nicole Baird headed to Blackpool last month to compete n the final.
by Shirley Bartynek, https://www.dailyrecord.co.uk/authors/shirley-bartynek/A Larkhall teen was delighted to represent her town in a national competition.
Nicole Baird headed to Blackpool last month to compete in the final of Miss Junior Teen Great Britain.
The 13-year-old was at the seaside town’s The Globe to compete against other youngsters for the title.
Miss Junior Teen Great Britain do not hold beauty contests, instead it is a competition celebrating teenagers, their achievements and their goals.
It is about empowering teens, having fun, making friends and incredible memories.
A spokesperson for the competition said: “We intend for the girls to make new friends and aim to make each and every contestant feel like a queen.
“Most importantly, we open the doors to fun and exciting, confidence-building opportunities for our finalists and winners.

Despite not winning, Nicole had an amazing time.
Her mum Angela explained: “She represented Larkhall with pride and, despite not winning, she loved the whole experience.
“She made friends and to be picked from thousands to reach the top 42 girls in Great Britain, in our eyes she is a winner.
“We are so proud of her achievements and would like to say thanks to everyone who has supported her.
“These include Larkhall Councillor Jackie Burns, Lesley Rundell from Larkhall Post Office and Harry Boyd of Fernaigair Church.
“We would like to thank her sponsor too, R&L Roofing and L’Perfection in Larkhall, who did her hair, and we would like to thank her high school, Larkhall Academy, who also supported her.”


You've navigated to this page from backForward.html. Press the "Go back" link below to return, or your browser's back button, and check that the editors' values were restored to the test data you entered.
Note that pressing the link above will not work, since the browser doesn't consider it as "returning" to the previous page.
Go Back


fall into sin; we willfully throw ourselves headlong into it. Each generation has its own experience of disappointing God. And in each generation God responds with grace. He reaches out, offering Himself again and again. Even when He knows we will grieve His heart again, God still shows up full of grace.
What do these verses teach us about God’s grace?
Ephesians 2:8-9
Hebrews 4:16
Romans 5:1-2
No one needed God’s grace more than Peter. We’ve already seen Peter’s pattern of ups and downs throughout his walk with Jesus. Now let’s look at how Jesus responded—how He handled disappointment.
The order that events are shared in a specific Gospel often has meaning. We’ve seen how quickly Peter’s high point in Matthew 16:17-18 was followed by his low point in Matthew 16:23. What would we expect to happen next? For Peter to be kicked out of the group? Demoted from the position of leader?
What happened next according to Matthew 17:1-3?
Who was present?
It’s clear that Jesus didn’t give up on Peter; instead, He continued to invite him into His inner circle, even bringing Peter with Him in the select group of disciples who had the amazing privilege of witnessing what we have come to call the Transfiguration, a moment of Jesus’ heavenly glory on earth.
Now let’s look more closely at Peter’s “double Simon” moment, when Jesus admonished him by using his old name not once, but twice.
Read Luke 22:31-34. What did Jesus tell Peter that Satan had asked to do (v. 31)?


{% extends "base_ibms.html" %} {% block page_content_inner %}
The Integrated Business Management System (IBMS) is designed to improve the integration of the Department’s strategic planning and budget management functions.
This is achieved by creating a link between financial and strategic business information; establishing a cohesive structure for strategic planning, priority setting and operational work plans; and developing an effective knowledge management framework that provides a single source of information.
A key objective of the IBMS is to improve the end-to-end accountability to the Department’s Services, in terms of assessing work programs and the alignment of work to service priorities, reporting on financial expenditure against this information and reviewing actions and achievements.
For more information about this application, please contact:


--- layout: index-material-sidebar-left title: 404 Error ---
Something seems to have gone wrong here. Sorry about that
Feel free to contact me to solve the issue.


This role has no users to display. {{ AdminManagementCtrl.selectedRole.lookup === 'banned' ? '' : 'To add users to this role click the "Add Users" button in the top-right corner.' }}
{{AdminManagementCtrl.selectedRole.name}}
{{AdminManagementCtrl.selectedRole.message}}
Confirm Role Removal
Are you sure you want to remove the role named {{AdminManagementCtrl.roleToRemove.name}}? This will permanently delete the role and all users who have this role will be affected.


A small frog wants to get to the other side of a river. The frog is initially located on one bank of the river (position 0) and wants to get to the opposite bank (position X+1). Leaves fall from a tree onto the surface of the river.
You are given a zero-indexed array A consisting of N integers representing the falling leaves. A[K] represents the position where one leaf falls at time K, measured in seconds.
The goal is to find the earliest time when the frog can jump to the other side of the river. The frog can cross only when leaves appear at every position across the river from 1 to X (that is, we want to find the earliest moment when all the positions from 1 to X are covered by leaves). You may assume that the speed of the current in the river is negligibly small, i.e. the leaves do not change their positions once they fall in the river.
For example, you are given integer X = 5 and array A such that:
A[0] = 1 A[1] = 3 A[2] = 1 A[3] = 4 A[4] = 2 A[5] = 3 A[6] = 5 A[7] = 4In second 6, a leaf falls into position 5. This is the earliest time when leaves appear in every position across the river.
Write a function:
def solution(X, A)
that, given a non-empty zero-indexed array A consisting of N integers and integer X, returns the earliest time when the frog can jump to the other side of the river.
If the frog is never able to jump to the other side of the river, the function should return −1.
For example, given X = 5 and array A such that:
A[0] = 1 A[1] = 3 A[2] = 1 A[3] = 4 A[4] = 2 A[5] = 3 A[6] = 5 A[7] = 4the function should return 6, as explained above.
Assume that:
- N and X are integers within the range [1..100,000];
- each element of array A is an integer within the range [1..X].
Complexity:
- expected worst-case time complexity is O(N);
- expected worst-case space complexity is O(X), beyond input storage (not counting the storage required for input arguments).


MergeFunctions pass, how it works¶
Introduction¶
Sometimes code contains equal functions, or functions that does exactly the same thing even though they are non-equal on the IR level (e.g.: multiplication on 2 and ‘shl 1’). It could happen due to several reasons: mainly, the usage of templates and automatic code generators. Though, sometimes user itself could write the same thing twice :-)
The main purpose of this pass is to recognize such functions and merge them.
Why would I want to read this document?¶
Document is the extension to pass comments and describes the pass logic. It describes algorithm that is used in order to compare functions, it also explains how we could combine equal functions correctly, keeping module valid.
Material is brought in top-down form, so reader could start learn pass from ideas and end up with low-level algorithm details, thus preparing him for reading the sources.
So main goal is do describe algorithm and logic here; the concept. This document is good for you, if you don’t want to read the source code, but want to understand pass algorithms. Author tried not to repeat the source-code and cover only common cases, and thus avoid cases when after minor code changes we need to update this document.
What should I know to be able to follow along with this document?¶
Reader should be familiar with common compile-engineering principles and LLVM code fundamentals. In this article we suppose reader is familiar with Single Static Assingment concepts. Understanding of IR structure is also important.
We will use such terms as “module”, “function”, “basic block”, “user”, “value”, “instruction”.
As a good start point, Kaleidoscope tutorial could be used:
LLVM Tutorial: Table of Contents
Especially it’s important to understand chapter 3 of tutorial:
Kaleidoscope: Code generation to LLVM IR
Reader also should know how passes work in LLVM, they could use next article as a reference and start point here:
What else? Well perhaps reader also should have some experience in LLVM pass debugging and bug-fixing.
What I gain by reading this document?¶
Main purpose is to provide reader with comfortable form of algorithms description, namely the human reading text. Since it could be hard to understand algorithm straight from the source code: pass uses some principles that have to be explained first.
Author wishes to everybody to avoid case, when you read code from top to bottom again and again, and yet you don’t understand why we implemented it that way.
We hope that after this article reader could easily debug and improve MergeFunctions pass and thus help LLVM project.
Narrative structure¶
Article consists of three parts. First part explains pass functionality on the top-level. Second part describes the comparison procedure itself. The third part describes the merging process.
In every part author also tried to put the contents into the top-down form. First, the top-level methods will be described, while the terminal ones will be at the end, in the tail of each part. If reader will see the reference to the method that wasn’t described yet, they will find its description a bit below.
Basics¶
How to do it?¶
Do we need to merge functions? Obvious thing is: yes that’s a quite possible case, since usually we do have duplicates. And it would be good to get rid of them. But how to detect such a duplicates? The idea is next: we split functions onto small bricks (parts), then we compare “bricks” amount, and if it equal, compare “bricks” themselves, and then do our conclusions about functions themselves.
What the difference it could be? For example, on machine with 64-bit pointers
(let’s assume we have only one address space), one function stores 64-bit
integer, while another one stores a pointer. So if the target is a machine
mentioned above, and if functions are identical, except the parameter type (we
could consider it as a part of function type), then we can treat uint64_t
and“void*“ as equal.
It was just an example; possible details are described a bit below.
As another example reader may imagine two more functions. First function performs multiplication on 2, while the second one performs arithmetic right shift on 1.
Possible solutions¶
Let’s briefly consider possible options about how and what we have to implement in order to create full-featured functions merging, and also what it would meant for us.
Equal functions detection, obviously supposes “detector” method to be implemented, latter should answer the question “whether functions are equal”. This “detector” method consists of tiny “sub-detectors”, each of them answers exactly the same question, but for function parts.
As the second step, we should merge equal functions. So it should be a “merger” method. “Merger” accepts two functions F1 and F2, and produces F1F2 function, the result of merging.
Having such a routines in our hands, we can process whole module, and merge all equal functions.
In this case, we have to compare every function with every another function. As reader could notice, this way seems to be quite expensive. Of course we could introduce hashing and other helpers, but it is still just an optimization, and thus the level of O(N*N) complexity.
Can we reach another level? Could we introduce logarithmical search, or random access lookup? The answer is: “yes”.
Random-access¶
How it could be done? Just convert each function to number, and gather all of them in special hash-table. Functions with equal hash are equal. Good hashing means, that every function part must be taken into account. That means we have to convert every function part into some number, and then add it into hash. Lookup-up time would be small, but such approach adds some delay due to hashing routine.
Logarithmical search¶
We could introduce total ordering among the functions set, once we had it we could then implement a logarithmical search. Lookup time still depends on N, but adds a little of delay (log(N)).
Present state¶
Both of approaches (random-access and logarithmical) has been implemented and tested. And both of them gave a very good improvement. And what was most surprising, logarithmical search was faster; sometimes up to 15%. Hashing needs some extra CPU time, and it is the main reason why it works slower; in most of cases total “hashing” time was greater than total “logarithmical-search” time.
So, preference has been granted to the “logarithmical search”.
Though in the case of need, logarithmical-search (read “total-ordering”) could be used as a milestone on our way to the random-access implementation.
Every comparison is based either on the numbers or on flags comparison. In random-access approach we could use the same comparison algorithm. During comparison we exit once we find the difference, but here we might have to scan whole function body every time (note, it could be slower). Like in “total-ordering”, we will track every numbers and flags, but instead of comparison, we should get numbers sequence and then create the hash number. So, once again, total-ordering could be considered as a milestone for even faster (in theory) random-access approach.
MergeFunctions, main fields and runOnModule¶
There are two most important fields in class:
FnTree
– the set of all unique functions. It keeps items that couldn’t be
merged with each other. It is defined as:
std::set<FunctionNode> FnTree;
Here FunctionNode
is a wrapper for llvm::Function
class, with
implemented “<” operator among the functions set (below we explain how it works
exactly; this is a key point in fast functions comparison).
Deferred
– merging process can affect bodies of functions that are in
FnTree
already. Obviously such functions should be rechecked again. In this
case we remove them from FnTree
, and mark them as to be rescanned, namely
put them into Deferred
list.
runOnModule¶
The algorithm is pretty simple:
- Put all module’s functions into the worklist.
2. Scan worklist’s functions twice: first enumerate only strong functions and then only weak ones:
2.1. Loop body: take function from worklist (call it FCur) and try to insert it into FnTree: check whether FCur is equal to one of functions in FnTree. If there is equal function in FnTree (call it FExists): merge function FCur with FExists. Otherwise add function from worklist to FnTree.
3. Once worklist scanning and merging operations is complete, check Deferred list. If it is not empty: refill worklist contents with Deferred list and do step 2 again, if Deferred is empty, then exit from method.
Comparison and logarithmical search¶
Let’s recall our task: for every function F from module M, we have to find equal functions F` in shortest time, and merge them into the single function.
Defining total ordering among the functions set allows to organize functions into the binary tree. The lookup procedure complexity would be estimated as O(log(N)) in this case. But how to define total-ordering?
We have to introduce a single rule applicable to every pair of functions, and following this rule then evaluate which of them is greater. What kind of rule it could be? Let’s declare it as “compare” method, that returns one of 3 possible values:
-1, left is less than right,
0, left and right are equal,
1, left is greater than right.
Of course it means, that we have to maintain strict and non-strict order relation properties:
- reflexivity (
a <= a
,a == a
,a >= a
), - antisymmetry (if
a <= b
andb <= a
thena == b
), - transitivity (
a <= b
andb <= c
, thena <= c
) - asymmetry (if
a < b
, thena > b
ora == b
).
As it was mentioned before, comparison routine consists of “sub-comparison-routines”, each of them also consists “sub-comparison-routines”, and so on, finally it ends up with a primitives comparison.
Below, we will use the next operations:
cmpNumbers(number1, number2)
is method that returns -1 if left is less than right; 0, if left and right are equal; and 1 otherwise.cmpFlags(flag1, flag2)
is hypothetical method that compares two flags. The logic is the same as incmpNumbers
, wheretrue
is 1, andfalse
is 0.
The rest of article is based on MergeFunctions.cpp source code (<llvm_dir>/lib/Transforms/IPO/MergeFunctions.cpp). We would like to ask reader to keep this file open nearby, so we could use it as a reference for further explanations.
Now we’re ready to proceed to the next chapter and see how it works.
Functions comparison¶
At first, let’s define how exactly we compare complex objects.
Complex objects comparison (function, basic-block, etc) is mostly based on its sub-objects comparison results. So it is similar to the next “tree” objects comparison:
- For two trees T1 and T2 we perform depth-first-traversal and have two sequences as a product: “T1Items” and “T2Items”.
- Then compare chains “T1Items” and “T2Items” in most-significant-item-first order. Result of items comparison would be the result of T1 and T2 comparison itself.
FunctionComparator::compare(void)¶
Brief look at the source code tells us, that comparison starts in
“int FunctionComparator::compare(void)
” method.
1. First parts to be compared are function’s attributes and some properties that
outsides “attributes” term, but still could make function different without
changing its body. This part of comparison is usually done within simple
cmpNumbers or cmpFlags operations (e.g.
cmpFlags(F1->hasGC(), F2->hasGC())
). Below is full list of function’s
properties to be compared on this stage:
- Attributes (those are returned by
Function::getAttributes()
method).- GC, for equivalence, RHS and LHS should be both either without GC or with the same one.
- Section, just like a GC: RHS and LHS should be defined in the same section.
- Variable arguments. LHS and RHS should be both either with or without var-args.
- Calling convention should be the same.
2. Function type. Checked by FunctionComparator::cmpType(Type*, Type*)
method. It checks return type and parameters type; the method itself will be
described later.
3. Associate function formal parameters with each other. Then comparing function
bodies, if we see the usage of LHS’s i-th argument in LHS’s body, then,
we want to see usage of RHS’s i-th argument at the same place in RHS’s
body, otherwise functions are different. On this stage we grant the preference
to those we met later in function body (value we met first would be less).
This is done by “FunctionComparator::cmpValues(const Value*, const Value*)
”
method (will be described a bit later).
- Function body comparison. As it written in method comments:
“We do a CFG-ordered walk since the actual ordering of the blocks in the linked list is immaterial. Our walk starts at the entry block for both functions, then takes each block from each terminator in order. As an artifact, this also means that unreachable blocks are ignored.”
So, using this walk we get BBs from left and right in the same order, and
compare them by “FunctionComparator::compare(const BasicBlock*, const
BasicBlock*)
” method.
We also associate BBs with each other, like we did it with function formal
arguments (see cmpValues
method below).
FunctionComparator::cmpType¶
Consider how types comparison works.
1. Coerce pointer to integer. If left type is a pointer, try to coerce it to the integer type. It could be done if its address space is 0, or if address spaces are ignored at all. Do the same thing for the right type.
2. If left and right types are equal, return 0. Otherwise we need to give preference to one of them. So proceed to the next step.
3. If types are of different kind (different type IDs). Return result of type
IDs comparison, treating them as a numbers (use cmpNumbers
operation).
4. If types are vectors or integers, return result of their pointers comparison, comparing them as numbers.
Check whether type ID belongs to the next group (call it equivalent-group):
- Void
- Float
- Double
- X86_FP80
- FP128
- PPC_FP128
- Label
- Metadata.
If ID belongs to group above, return 0. Since it’s enough to see that types has the same
TypeID
. No additional information is required.
6. Left and right are pointers. Return result of address space comparison (numbers comparison).
7. Complex types (structures, arrays, etc.). Follow complex objects comparison technique (see the very first paragraph of this chapter). Both left and right are to be expanded and their element types will be checked the same way. If we get -1 or 1 on some stage, return it. Otherwise return 0.
8. Steps 1-6 describe all the possible cases, if we passed steps 1-6 and didn’t
get any conclusions, then invoke llvm_unreachable
, since it’s quite
unexpectable case.
cmpValues(const Value*, const Value*)¶
Method that compares local values.
This method gives us an answer on a very curious quesion: whether we could treat local values as equal, and which value is greater otherwise. It’s better to start from example:
Consider situation when we’re looking at the same place in left function “FL” and in right function “FR”. And every part of left place is equal to the corresponding part of right place, and (!) both parts use Value instances, for example:
instr0 i32 %LV ; left side, function FL
instr0 i32 %RV ; right side, function FR
So, now our conclusion depends on Value instances comparison.
Main purpose of this method is to determine relation between such values.
What we expect from equal functions? At the same place, in functions “FL” and “FR” we expect to see equal values, or values defined at the same place in “FL” and “FR”.
Consider small example here:
define void %f(i32 %pf0, i32 %pf1) {
instr0 i32 %pf0 instr1 i32 %pf1 instr2 i32 123
}
define void %g(i32 %pg0, i32 %pg1) {
instr0 i32 %pg0 instr1 i32 %pg0 instr2 i32 123
}
In this example, pf0 is associated with pg0, pf1 is associated with pg1, and we also declare that pf0 < pf1, and thus pg0 < pf1.
Instructions with opcode “instr0” would be equal, since their types and opcodes are equal, and values are associated.
Instruction with opcode “instr1” from f is greater than instruction with opcode “instr1” from g; here we have equal types and opcodes, but “pf1 is greater than “pg0”.
And instructions with opcode “instr2” are equal, because their opcodes and types are equal, and the same constant is used as a value.
What we assiciate in cmpValues?¶
- Function arguments. i-th argument from left function associated with i-th argument from right function.
- BasicBlock instances. In basic-block enumeration loop we associate i-th BasicBlock from the left function with i-th BasicBlock from the right function.
- Instructions.
- Instruction operands. Note, we can meet Value here we have never seen before. In this case it is not a function argument, nor BasicBlock, nor Instruction. It is global value. It is constant, since its the only supposed global here. Method also compares:
- Constants that are of the same type.
- If right constant could be losslessly bit-casted to the left one, then we also compare them.
How to implement cmpValues?¶
Association is a case of equality for us. We just treat such values as equal. But, in general, we need to implement antisymmetric relation. As it was mentioned above, to understand what is less, we can use order in which we meet values. If both of values has the same order in function (met at the same time), then treat values as associated. Otherwise – it depends on who was first.
Every time we run top-level compare method, we initialize two identical maps (one for the left side, another one for the right side):
map<Value, int> sn_mapL, sn_mapR;
The key of the map is the Value itself, the value – is its order (call it serial number).
To add value V we need to perform the next procedure:
sn_map.insert(std::make_pair(V, sn_map.size()));
For the first Value, map will return 0, for second Value map will return 1, and so on.
Then we can check whether left and right values met at the same time with simple comparison:
cmpNumbers(sn_mapL[Left], sn_mapR[Right]);
Of course, we can combine insertion and comparison:
std::pair<iterator, bool>
LeftRes = sn_mapL.insert(std::make_pair(Left, sn_mapL.size())), RightRes
= sn_mapR.insert(std::make_pair(Right, sn_mapR.size()));
return cmpNumbers(LeftRes.first->second, RightRes.first->second);
Let’s look, how whole method could be implemented.
1. we have to start from the bad news. Consider function self and cross-referencing cases:
// self-reference unsigned fact0(unsigned n) { return n > 1 ? n
* fact0(n-1) : 1; } unsigned fact1(unsigned n) { return n > 1 ? n *
fact1(n-1) : 1; }
// cross-reference unsigned ping(unsigned n) { return n!= 0 ? pong(n-1) : 0;
} unsigned pong(unsigned n) { return n!= 0 ? ping(n-1) : 0; }
This comparison has been implemented in initial MergeFunctions pass version. But, unfortunately, it is not transitive. And this is the only case we can’t convert to less-equal-greater comparison. It is a seldom case, 4-5 functions of 10000 (checked on test-suite), and, we hope, reader would forgive us for such a sacrifice in order to get the O(log(N)) pass time.
2. If left/right Value is a constant, we have to compare them. Return 0 if it
is the same constant, or use cmpConstants
method otherwise.
3. If left/right is InlineAsm instance. Return result of Value pointers comparison.
4. Explicit association of L (left value) and R (right value). We need to find out whether values met at the same time, and thus are associated. Or we need to put the rule: when we treat L < R. Now it is easy: just return result of numbers comparison:
std::pair<iterator, bool>
LeftRes = sn_mapL.insert(std::make_pair(Left, sn_mapL.size())),
RightRes = sn_mapR.insert(std::make_pair(Right, sn_mapR.size()));
if (LeftRes.first->second == RightRes.first->second) return 0;
if (LeftRes.first->second < RightRes.first->second) return -1;
return 1;
Now when cmpValues returns 0, we can proceed comparison procedure. Otherwise, if we get (-1 or 1), we need to pass this result to the top level, and finish comparison procedure.
cmpConstants¶
Performs constants comparison as follows:
1. Compare constant types using cmpType
method. If result is -1 or 1, goto
step 2, otherwise proceed to step 3.
2. If types are different, we still can check whether constants could be
losslessly bitcasted to each other. The further explanation is modification of
canLosslesslyBitCastTo
method.
2.1 Check whether constants are of the first class types (
isFirstClassType
check):2.1.1. If both constants are not of the first class type: return result of
cmpType
.2.1.2. Otherwise, if left type is not of the first class, return -1. If right type is not of the first class, return 1.
2.1.3. If both types are of the first class type, proceed to the next step (<IP_ADDRESS>).
<IP_ADDRESS>. If types are vectors, compare their bitwidth using the cmpNumbers. If result is not 0, return it.
<IP_ADDRESS>. Different types, but not a vectors:
- if both of them are pointers, good for us, we can proceed to step 3.
- if one of types is pointer, return result of isPointer flags comparison (cmpFlags operation).
- otherwise we have no methods to prove bitcastability, and thus return result of types comparison (-1 or 1).
Steps below are for the case when types are equal, or case when constants are bitcastable:
3. One of constants is a “null” value. Return the result of
cmpFlags(L->isNullValue, R->isNullValue)
comparison.
- Compare value IDs, and return result if it is not 0:
if (int Res = cmpNumbers(L->getValueID(), R->getValueID()))
return Res;
5. Compare the contents of constants. The comparison depends on kind of constants, but on this stage it is just a lexicographical comparison. Just see how it was described in the beginning of “Functions comparison” paragraph. Mathematically it is equal to the next case: we encode left constant and right constant (with similar way bitcode-writer does). Then compare left code sequence and right code sequence.
compare(const BasicBlock*, const BasicBlock*)¶
Compares two BasicBlock instances.
It enumerates instructions from left BB and right BB.
1. It assigns serial numbers to the left and right instructions, using
cmpValues
method.
2. If one of left or right is GEP (GetElementPtr
), then treat GEP as
greater than other instructions, if both instructions are GEPs use cmpGEP
method for comparison. If result is -1 or 1, pass it to the top-level
comparison (return it).
3.1. Compare operations. Call
cmpOperation
method. If result is -1 or 1, return it.3.2. Compare number of operands, if result is -1 or 1, return it.
3.3. Compare operands themselves, use
cmpValues
method. Return result if it is -1 or 1.3.4. Compare type of operands, using
cmpType
method. Return result if it is -1 or 1.3.5. Proceed to the next instruction.
We can finish instruction enumeration in 3 cases:
4.1. We reached the end of both left and right basic-blocks. We didn’t exit on steps 1-3, so contents is equal, return 0.
4.2. We have reached the end of the left basic-block. Return -1.
4.3. Return 1 (the end of the right basic block).
cmpGEP¶
Compares two GEPs (getelementptr
instructions).
It differs from regular operations comparison with the only thing: possibility
to use accumulateConstantOffset
method.
So, if we get constant offset for both left and right GEPs, then compare it as numbers, and return comparison result.
Otherwise treat it like a regular operation (see previous paragraph).
cmpOperation¶
Compares instruction opcodes and some important operation properties.
- Compare opcodes, if it differs return the result.
- Compare number of operands. If it differs – return the result.
3. Compare operation types, use cmpType. All the same – if types are different, return result.
4.
- Compare operand types.
6. For some particular instructions check equivalence (relation in our case) of
some significant attributes. For example we have to compare alignment for
load
instructions.
Merging process, mergeTwoFunctions¶
Once MergeFunctions detected that current function (G) is equal to one that
were analyzed before (function F) it calls mergeTwoFunctions(Function*,
Function*)
.
Operation affects FnTree
contents with next way: F will stay in
FnTree
. G being equal to F will not be added to FnTree
. Calls of
G would be replaced with something else. It changes bodies of callers. So,
functions that calls G would be put into Deferred
set and removed from
FnTree
, and analyzed again.
The approach is next:
1. Most wished case: when we can use alias and both of F and G are weak. We
make both of them with aliases to the third strong function H. Actually H
is F. See below how it’s made (but it’s better to look straight into the
source code). Well, this is a case when we can just replace G with F
everywhere, we use replaceAllUsesWith
operation here (RAUW).
2. F could not be overridden, while G could. It would be good to do the next: after merging the places where overridable function were used, still use overridable stub. So try to make G alias to F, or create overridable tail call wrapper around F and replace G with that call.
3. Neither F nor G could be overridden. We can’t use RAUW. We can just
change the callers: call F instead of G. That’s what
replaceDirectCallers
does.
Below is detailed body description.
If “F” may be overridden¶
As follows from mayBeOverridden
comments: “whether the definition of this
global may be replaced by something non-equivalent at link time”. If so, that’s
ok: we can use alias to F instead of G or change call instructions itself.
HasGlobalAliases, removeUsers¶
First consider the case when we have global aliases of one function name to
another. Our purpose is make both of them with aliases to the third strong
function. Though if we keep F alive and without major changes we can leave it
in FnTree
. Try to combine these two goals.
Do stub replacement of F itself with an alias to F.
1. Create stub function H, with the same name and attributes like function F. It takes maximum alignment of F and G.
2. Replace all uses of function F with uses of function H. It is the two
steps procedure instead. First of all, we must take into account, all functions
from whom F is called would be changed: since we change the call argument
(from F to H). If so we must to review these caller functions again after
this procedure. We remove callers from FnTree
, method with name
removeUsers(F)
does that (don’t confuse with replaceAllUsesWith
):
2.1.
Inside removeUsers(Value* V)
we go through the all values that use value V (or F in our context). If value is instruction, we go to function that holds this instruction and mark it as to-be-analyzed-again (put toDeferred
set), we also remove caller fromFnTree
.2.2. Now we can do the replacement: call
F->replaceAllUsesWith(H)
.
3. H (that now “officially” plays F’s role) is replaced with alias to F. Do the same with G: replace it with alias to F. So finally everywhere F was used, we use H and it is alias to F, and everywhere G was used we also have alias to F.
- Set F linkage to private. Make it strong :-)
No global aliases, replaceDirectCallers¶
If global aliases are not supported. We call replaceDirectCallers
then. Just
go through all calls of G and replace it with calls of F. If you look into
method you will see that it scans all uses of G too, and if use is callee (if
user is call instruction and G is used as what to be called), we replace it
with use of F.
If “F” could not be overridden, fix it!¶
We call writeThunkOrAlias(Function *F, Function *G)
. Here we try to replace
G with alias to F first. Next conditions are essential:
- target should support global aliases,
- the address itself of G should be not significant, not named and not referenced anywhere,
- function should come with external, local or weak linkage.
Otherwise we write thunk: some wrapper that has G’s interface and calls F, so G could be replaced with this wrapper.
writeAlias
As follows from llvm reference:
“Aliases act as second name for the aliasee value”. So we just want to create second name for F and use it instead of G:
create global alias itself (GA),
adjust alignment of F so it must be maximum of current and G’s alignment;
replace uses of G:
3.1. first mark all callers of G as to-be-analyzed-again, using
removeUsers
method (see chapter above),3.2. call
G->replaceAllUsesWith(GA)
.Get rid of G.
writeThunk
As it written in method comments:
“Replace G with a simple tail call to bitcast(F). Also replace direct uses of G with bitcast(F). Deletes G.”
In general it does the same as usual when we want to replace callee, except the first point:
1. We generate tail call wrapper around F, but with interface that allows use it instead of G.
- “As-usual”:
removeUsers
andreplaceAllUsesWith
then. - Get rid of G.
That’s it.¶
We have described how to detect equal functions, and how to merge them, and in first chapter we have described how it works all-together. Author hopes, reader have some picture from now, and it helps him improve and debug this pass.
Reader is welcomed to send us any questions and proposals ;-)


--- layout: example.html title: WFS-T Map Editing Example shortdesc: Show how to work with basic WFS-T editing. docs: >


| Module | Thoughtbot::Shoulda |
| In: |
vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb
|
| VERSION | = | '1.1.0' |
| current_context | [RW] |
A context block groups should statements under a common set of setup/teardown methods. Context blocks can be arbitrarily nested, and can do wonders for improving the maintainability and readability of your test code.
A context block can contain setup, should, should_eventually, and teardown blocks.
class UserTest << Test::Unit::TestCase context "A User instance" do setup do @user = User.find(:first) end should "return its full name" assert_equal 'John Doe', @user.full_name end end end
This code will produce the method "test: A User instance should return its full name. ".
Contexts may be nested. Nested contexts run their setup blocks from out to in before each should statement. They then run their teardown blocks from in to out after each should statement.
class UserTest << Test::Unit::TestCase context "A User instance" do setup do @user = User.find(:first) end should "return its full name" assert_equal 'John Doe', @user.full_name end context "with a profile" do setup do @user.profile = Profile.find(:first) end should "return true when sent :has_profile?" assert @user.has_profile? end end end end
This code will produce the following methods
Just like should statements, a context block can exist next to normal def test_the_old_way; end tests. This means you do not have to fully commit to the context/should syntax in a test file.
# File vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb, line 111 111: def context(name, &blk) 112: if Shoulda.current_context 113: Shoulda.current_context.context(name, &blk) 114: else 115: context = Thoughtbot::Shoulda::Context.new(name, self, &blk) 116: context.build 117: end 118: end
Should statements are just syntactic sugar over normal Test::Unit test methods. A should block contains all the normal code and assertions you‘re used to seeing, with the added benefit that they can be wrapped inside context blocks (see below).
class UserTest << Test::Unit::TestCase def setup @user = User.new("John", "Doe") end should "return its full name" assert_equal 'John Doe', @user.full_name end end
…will produce the following test:
Note: The part before should in the test name is gleamed from the name of the Test::Unit class.
# File vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb, line 36 36: def should(name, &blk) 37: if Shoulda.current_context 38: Shoulda.current_context.should(name, &blk) 39: else 40: context_name = self.name.gsub(/Test/, "") 41: context = Thoughtbot::Shoulda::Context.new(context_name, self) do 42: should(name, &blk) 43: end 44: context.build 45: end 46: end
Just like should, but never runs, and instead prints an ‘X’ in the Test::Unit output.
# File vendor/plugins/shoulda/lib/shoulda/gem/shoulda.rb, line 49 49: def should_eventually(name, &blk) 50: context_name = self.name.gsub(/Test/, "") 51: context = Thoughtbot::Shoulda::Context.new(context_name, self) do 52: should_eventually(name, &blk) 53: end 54: context.build 55: end


“I would my father had made me a Hangman, when he made me a Stationer; for we are call'd to Accompt for Other Men's Works, as well as for our Own. And one thing that's cast in our Dish, is the selling of Translations, so Dog-Cheap, that every Sot knows now as much as would formerly have made a Passable Doctor, and every Nasty Groom, and Roguy Lacquay is grown as familiar with Homer, Virgil, Ovid, as if 'twere Robin the Devil; The Seven Champions; or a piece of George Withers.
“He would have talkt on, if a Devil had not stopt his Mouth with a Whiffe from a rowle of his own Papers, and Choak't him with the smoak on't. The Pestilent Fume would have dispatch't me too, if I had not got presently out of the reach on't. But I went on my way, saying, this to myself; If the Book-seller be thus Criminal, what will become of the Author!”
Sir Roger L'Estrange, The Visions Of Don Francisco De Quevedo Villegas (1667)


's team
Name:
ID:
Email:
Office Number:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:
Name:
ID:
Email:
School:


@DoNotImplement abstract class CordaClock : Clock, SerializeAsToken, CordaServiceInjectable, CordaFlowInjectable
A Clock that tokenizes itself when serialized, and delegates to an underlying Clock implementation.
<init> |
A Clock that tokenizes itself when serialized, and delegates to an underlying Clock implementation. CordaClock() |
delegateClock |
abstract val delegateClock: Clock |
getZone |
open fun getZone(): ZoneId |
instant |
open fun instant(): Instant |
toToken |
open fun toToken(context: SerializeAsTokenContext): SingletonSerializationToken |
withZone |
open fun |


1. English digit
Write a function that returns the last digit of given integer as an English word.
OK


{% macro install_flatpak_with_gui() %}
Flatpak is a cross-distribution framework for distribution and running of sandboxed applications. XDG Desktop Portal provides {{ nuvola.name }} with desktop integration. KDE Discover and GNOME Software make the browsing and installation of Flatpaks easier.
All required packages are available in OpenSUSE repositories, run following commands as root/sudo to install them:
zypper install flatpak xdg-desktop-portal
xdg-desktop-portal-kde discover
zypper install flatpak xdg-desktop-portal
xdg-desktop-portal-gtk gnome-software
Then restart your computer to add Flatpak paths alongside the system ones. Otherwise, you may see strange errors. Unfortunately, just logging out and logging in is not enough.
{% endmacro %} {% macro add_repositories_with_gnome_software() %}Finally, refresh the database of packages: Launch GNOME Software → switch to the Updates screen → click the Refresh button in the top left corner.
Finally, refresh the database of packages: Launch KDE Discover → switch to the Updates section → click the Check for Updates button in the top right corner.
{% else %} KDE Discover may ask you for an authentication to update the database of packages. {% endif %}In order to install Nuvola Player Service with KDE Discover, launch KDE Discover, search for Nuvola Player Service and finally click the Install button.
{% endmacro %} {% macro install_nuvola_service_with_gnome_software(codename) %}In order to install Nuvola Player Service with GNOME Software, launch GNOME Software, search for Nuvola Player Service and finally click the Install button.
{% endmacro %} {% macro install_nuvola_service_from_terminal(codename) %}Alternatively, launch a Linux terminal emulator and run a following command:
flatpak install nuvola {{ nuvola.uid }}


QuoteBars are built by consolidating the bid and ask ticks from the exchanges into bars. The $[QuoteBar,T:QuantConnect.Data.Market.QuoteBar] provides Open, High, Low, Close, Bid, Ask, LastBidSize, and LastAskSize properties for a given period of time. The Bid and the Ask properties are $[Bar,T:QuantConnect.Data.Market.Bar] objects that contain Open, High, Low, and Close. The QuoteBar Open, High, Low, and Close properties values are the mean of the respective Bid and Ask properties. QuoteBars are supported for all asset types.
self.AddForex('EURUSD', Resolution.Hour) # Subscribe to hourly QuoteBars in Initialize(self) def OnData(self, data): ## You can access the EURUSD QuoteBar directly by subsetting the slice object fxOpen = data['EURUSD'].Open ## Market Open FX Rate fxClose = data['EURUSD'].Close ## Market Close FX Rate ## If you are subscribed to more than one Forex or Futures data stream then you can ## access the QuoteBar dictionary and then subset this for your desired Forex symbol fxQuoteBars = data.QuoteBars eurusdQuoteBar = fxQuoteBars['EURUSD'] ## EURUSD QuoteBar fxOpen = eurusdQuoteBar.Open ## Market Open FX Rate fxClose = eurusdQuoteBar.Close ## Market Close FX Rate
With a specific QuoteBar, you can also access Bid and Ask Bars for the same security. These Bars provide information specific to the Bid and Ask side of Forex and Future asset types, while the QuoteBar.Open, High, Low, and Close properties are the midpoint of the Bid-Ask spread at that moment of time. These QuoteBar.Bid and QuoteBar.Ask bars have Open, High, Low, and close properties (e.g., QuoteBar.Bid.Open
).
self.AddForex('EURUSD', Resolution.Hour) # Subscribe to hourly QuoteBars in Initialize(self) def OnData(self, data): quoteBar = data['EURUSD'] ## EURUSD QuoteBar self.Log(f"Mid-point open price: {quoteBar.Open}") bidBar = quoteBar.Bid ## EURUSD Bid Bar askBar = quoteBar.Ask ## EURUSD Ask Bar self.Log(f"Bid open price: {bidBar.Open}") self.Log(f"Ask open price: {askBar.Open}")


Here you can see my work for the final projects for the API's and Microservices certificate from Free Code Camp. I completed my certificate on April 28, 2020.
You can see the original prompts here.


?6
7
8
9
10
.
H
v
The
New
York
copyright
reserved
botanical
Garden
New
York
Botanical
Garden
lb23M2T
BOTANICAL
U.S.
National
Herbarium
Examined
for
the
flora
of
St.
John
The
New
Vork
Botanical
Garden
St
John,
U.S.
Virgin
Islands.
N¡
820
Carica
papaya
L.
det.
P.
Acevedo,
1985'
Carica
papaya
L.
Det.
W.C.Holmes
(BAYLU)
IX
fÑ2005
Gift
Hill
Area
(
east
side).
A
shrub
1.5
m-
tall,
yellowish
flowers
P.
Acevedo,
R.O.
Woodbury,
J.
Matusak;
June
k
,
1985È
1623429
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


{% extends "layout.html" %} {% block body %}
In this example a scikit-learn random forest classifier is applied to a dataset of numerical and categorical examples, trying to predict creditworthiness.
LIME explains the variables explaining the most contributing variables to an individual decision.
The dataset is the German Credit Data set which can be found here, and the variable descriptions here.
Go back to try with other variables, or continue with image data and neural networks.


mySaaS
|
Hits
0
Money
$0
|
DCs
0
Racks
0
Servers
0
VMs
0
|
CPUs
0
Memory
0GB
Storage
0GB
|
200-Req/s
0
503-Req/s
0
Visit Website
Traffic Logs
Your Infrastructure
Infrastructure
|
DataCenters
|
Bank
|
Shop
This is your DC.
This is the Bank.
General
Marketing
Tell My Friends I
This will increase traffic to your website by
+1/s
.
ACQUIRED
Actions:


|
GML
Library
|
A mathematical 2D floating-point Vector. More...
#include <vector_2.hpp>
Public Member Functions | |
| Vector2 ()=default | |
| Default constructor. Elements of the Vector2 are initialised to 0.0f by default. | |
| Vector2 (float f) | |
| Constructor which sets all of the Vector2 components to the same value. More... | |
| Vector2 (float x, float y) | |
| Constructs a Vector3 with individually specified values. More... | |
| Vector2 (const Vector3 &vec3) | |
| Constructs a Vector2 using the first two components of a Vector3. More... | |
| Vector2 (const Vector4 &vec4) | |
| Constructs a Vector2 using the first two components of a Vector4. More... | |
| float | magnitudeSq () const |
| Calculates and returns the magnitude of the vector multiplied by itself. More... | |
| float | magnitude () const |
| Calculates and returns the magnitude of the vector. More... | |
| float | dot (const Vector2 &v) const |
| Calculates and returns the dot product of this vector and another. More... | |
| float | distance (const Vector2 &v) const |
| Calculates and returns the distance between this vector and another. More... | |
| float | angle (const Vector2 &v) const |
| Calculates and returns the angle between this Vector2 and another Vector2. More... | |
| Vector2 | normal () const |
| Calculates and returns a unit vector with the same direction as this vector, i.e: this vector's normal. More... | |
| Vector2 & | normalise () |
| Normalises the vector so it has a magnitude of 1. More... | |
| Vector2 & | limit (float newMagnitude) |
| Limits the vector's magnitude. More... | |
| float & | operator[] (unsigned int idx) |
| Accesses the vector's components using a given index. More... | |
| const float & | operator[] (unsigned int idx) const |
| Accesses the vector's components using a given index. More... | |
| Vector2 & | operator= (const Vector2 &rhs) |
| Vector2 assignment operator overload. More... | |
| Vector2 & | operator+= (const Vector2 &rhs) |
| Adds another vector to the vector. More... | |
| Vector2 & | operator-= (const Vector2 &rhs) |
| Subtracts another vector from the vector. More... | |
| Vector2 & | operator *= (const Vector2 &rhs) |
| Multiplies another vector with the vector. More... | |
| Vector2 & | operator/= (const Vector2 &rhs) |
| Divides the vector by another vector. More... | |
| Vector2 & | operator *= (float s) |
| Multiplies the vector by a scalar value. More... | |
| Vector2 & | operator/= (float s) |
| Divides the vector by a scalar value. More... | |
| Vector2 | operator- () const |
| Computes and returns the inverse of the vector, i.e: all components multiplied by -1. More... | |
Public Attributes | |
| float | x = 0.0f |
| The first component of the Vector2. More... | |
| float | y = 0.0f |
| The second component of the Vector2. More... | |
Static Public Attributes | |
| static const Vector2 | zero { 0.0f, 0.0f } |
| A static Vector2 with x and y members set to 0.0f. | |
| static const Vector2 | unit { 1.0f, 1.0f } |
| A static Vector2 with x and y members set to 1.0f. The magnitude of this Vector2 will be 1.0f; hence a unit vector. | |
| static const Vector2 | posX |
| A static Vector2 with x set to 1.0f and y set to 0.0f. | |
| static const Vector2 | negX |
| A static Vector2 with x set to -1.0f and y set to 0.0f. | |
| static const Vector2 | posY |
| A static Vector2 with y set to 1.0f and x set to 0.0f. | |
| static const Vector2 | negY |
| A static Vector2 with y set to -1.0f and x set to 0.0f. | |
A mathematical 2D floating-point Vector.
A struct representing a 2D Vector whose components are stored as floats.
Definition at line 17 of file vector_2.hpp.
| gml::Vector2::Vector2 | ( | float | f | ) |
Constructor which sets all of the Vector2 components to the same value.
| f | The value to give the x and y components of the Vector2. |
Definition at line 14 of file vector_2.cpp.
| gml::Vector2::Vector2 | ( | float | x, |
| float | y | ||
| ) |
Constructs a Vector3 with individually specified values.
| x | The value to give the x component. |
| y | The value to give the y component. |
Definition at line 18 of file vector_2.cpp.
| gml::Vector2::Vector2 | ( | const Vector3 & | vec3 | ) |
Constructs a Vector2 using the first two components of a Vector3.
| vec3 | The Vector3 from which to take the x and y component values from. |
Definition at line 22 of file vector_2.cpp.
| gml::Vector2::Vector2 | ( | const Vector4 & | vec4 | ) |
Constructs a Vector2 using the first two components of a Vector4.
| vec4 | The Vector4 from which to take the x and y component values from. |
Definition at line 26 of file vector_2.cpp.
| float gml::Vector2::angle | ( | const Vector2 & | v | ) | const |
| float gml::Vector2::distance | ( | const Vector2 & | v | ) | const |
Calculates and returns the distance between this vector and another.
| v | The other vector. |
Definition at line 45 of file vector_2.cpp.
| float gml::Vector2::dot | ( | const Vector2 & | v | ) | const |
Calculates and returns the dot product of this vector and another.
| v | The other vector used in calculating the dot product. |
Definition at line 40 of file vector_2.cpp.
| Vector2 & gml::Vector2::limit | ( | float | newMagnitude | ) |
Limits the vector's magnitude.
This will make the vector keep its direction but extend/shrink its magnitude.
| newMagnitude | The magnitude that the vector will be given. |
Definition at line 66 of file vector_2.cpp.
| float gml::Vector2::magnitude | ( | ) | const |
Calculates and returns the magnitude of the vector.
The vector's magnitude is also known as the vector's length or size.
Definition at line 35 of file vector_2.cpp.
| float gml::Vector2::magnitudeSq | ( | ) | const |
Calculates and returns the magnitude of the vector multiplied by itself.
Useful for when performance is paramount and the user wishes to avoid the use of the sqrt() function used in magnitude().
Definition at line 30 of file vector_2.cpp.
| Vector2 gml::Vector2::normal | ( | ) | const |
Calculates and returns a unit vector with the same direction as this vector, i.e: this vector's normal.
Definition at line 55 of file vector_2.cpp.
| Vector2 & gml::Vector2::normalise | ( | ) |
Normalises the vector so it has a magnitude of 1.
Definition at line 61 of file vector_2.cpp.
Multiplies another vector with the vector.
Multiplication is performed component-wise.
| rhs | Another vector which will be multiplied with the vector. |
Definition at line 105 of file vector_2.cpp.
| Vector2 & gml::Vector2::operator *= | ( | float | s | ) |
Multiplies the vector by a scalar value.
| s | The value of which to multiply/scale the vector by. |
Definition at line 119 of file vector_2.cpp.
Adds another vector to the vector.
Addition is performed component-wise.
| rhs | Another vector which will be added to the vector. |
Definition at line 91 of file vector_2.cpp.
| Vector2 gml::Vector2::operator- | ( | ) | const |
Computes and returns the inverse of the vector, i.e: all components multiplied by -1.
Definition at line 133 of file vector_2.cpp.
Subtracts another vector from the vector.
Subtraction is performed component-wise.
| rhs | Another vector which will be subtracted from the vector. |
Definition at line 98 of file vector_2.cpp.
Divides the vector by another vector.
Division is performed component-wise.
| rhs | Another vector which the vector will be divided by. |
Definition at line 112 of file vector_2.cpp.
| Vector2 & gml::Vector2::operator/= | ( | float | s | ) |
Divides the vector by a scalar value.
| s | The value of which to divide/scale the vector by. |
Definition at line 126 of file vector_2.cpp.
Vector2 assignment operator overload.
| rhs | The Vector2 from which to copy component values from. |
Definition at line 84 of file vector_2.cpp.
| float & gml::Vector2::operator[] | ( | unsigned int | idx | ) |
Accesses the vector's components using a given index.
| idx | The specified index of the component to return. |
Definition at line 74 of file vector_2.cpp.
| const float & gml::Vector2::operator[] | ( | unsigned int | idx | ) | const |
Accesses the vector's components using a given index.
| idx | The specified index of the component to return. |
Definition at line 79 of file vector_2.cpp.
| float gml::Vector2::x = 0.0f |
The first component of the Vector2.
Definition at line 26 of file vector_2.hpp.
| float gml::Vector2::y = 0.0f |
The second component of the Vector2.
Definition at line 27 of file vector_2.hpp.


| Package | Description |
|---|---|
| com.github.jessemull.microflex.integerflex.io |
| Class and Description |
|---|
| PlatePOJOInteger
This is a wrapper class for importing or exporting a JSON encoded plate object.
|
| PlateXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded plate object.
|
| ResultPOJOInteger
This is a wrapper class for importing or exporting a JSON encoded result.
|
| ResultWellXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded well in a result.
|
| ResultXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded result.
|
| SimpleWellPOJOInteger
This is a wrapper class for importing or exporting a JSON encoded well in a stack or plate object.
|
| SimpleWellSetPOJOInteger
This is a wrapper class for importing or exporting a JSON encoded well set in a plate or stack object.
|
| SimpleWellSetXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded well set in a plate or stack object.
|
| SimpleWellXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded well in a plate or stack object.
|
| StackListXMLInteger
This is a wrapper class used to marshal/unmarshal a list of XML encoded stack objects.
|
| StackPOJOInteger
This is a wrapper class for importing or exporting a JSON encoded stack object.
|
| StackXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded stack object.
|
| WellPOJOInteger
This is a wrapper class for importing or exporting a JSON encoded well object.
|
| WellSetPOJOInteger
This is a wrapper class for importing or exporting a JSON encoded well set object.
|
| WellSetXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded well set object.
|
| WellXMLInteger
This is a wrapper class used to marshal/unmarshal an XML encoded well object.
|


UNSHARE
Section: User Manuals (1)Updated: OCTOBER 2008
Index Return to Main Contents
NAME
unshare - run program with some namespaces unshared from parentSYNOPSIS
unshare [options] program [arguments]DESCRIPTION
Unshares specified namespaces from parent process and then executes specified program. Unshareable namespaces are:- mount namespace
- mounting and unmounting filesystems will not affect rest of the system (CLONE_NEWNS flag),
- UTS namespace
- setting hostname, domainname will not affect rest of the system (CLONE_NEWUTS flag),
- IPC namespace
- process will have indpendent namespace for System V message queues, semaphore sets and shared memory segments (CLONE_NEWIPC flag),
- network namespace
- process will have independent IPv4 and IPv6 stacks, IP routing tables, firewall rules, the /proc/net and /sys/class/net directory trees, sockets etc. (CLONE_NEWNET flag).
- See the clone(2) for exact semantics of the flags.
OPTIONS
- -h, --help
- Print a help message,
- -m, --mount
- Unshare the mount namespace,
- -u, --uts
- Unshare the UTC namespace,
- -i, --ipc
- Unshare the IPC namespace,
- -n, --net
- Unshare the network namespace.
SEE ALSO
unshare(2), clone(2)BUGS
None known so far.AUTHOR
Mikhail Gusarov<EMAIL_ADDRESS>The unshare command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:11 GMT, December 24, 2015


Nadal-inspired Spain to face Canada in Davis Cup final
Madrid - Rafael Nadal inspired Spain into their first Davis Cup final since 2012 as he teamed up with Feliciano Lopez to secure a dramatic last-four victory over Britain in Madrid.
The hosts trailed 1-0 after Lopez's singles defeat by Kyle Edmund on Saturday, but Nadal thrashed Dan Evans before partnering Lopez in a 7-6 (7/3), 7-6 (10/8) win in the deciding doubles over Jamie Murray and Neal Skupski.
Spain will face Canada in Sunday's final after the North Americans won their semi-final against Russia, which was also decided in the doubles rubber.
"It was a very special moment for us, a very unique opportunity," said the 38-year-old Lopez.
"We have a great opportunity to win this tournament here at home."
Denis Shapovalov and Vasek Pospisil sent Canada into their maiden Davis Cup showpiece by edging out Karen Khachanov and Andrey Rublev.
Five-time champions Spain were indebted to world number one Nadal for a virtuoso display as the 33-year-old continues his hunt for a fifth Davis Cup crown, having first lifted the title himself in 2004.
"This competition is always dramatic, especially with the new format," said Nadal.
"It's really, really special. Thank you to Feli (Lopez) and to the crowd who were amazing as well."
Spain lost their last Davis Cup final to the Czech Republic six years ago.
Edmund had earlier justified the decision of British captain Leon Smith to select him ahead of three-time Grand Slam champion Andy Murray by seeing off Lopez 6-3, 7-6 (7/3).
But Nadal swatted aside Evans 6-4, 6-0 to set up the doubles showdown.
Murray and Skupski more than held their own in the face of a partisan home crowd and a pumped-up Nadal at the Caja Magica, but saw a break point come and go in the 11th game of the first set before losing a tie-break.
The Britons saw four set points pass them by in the second set, including three in the breaker, with Nadal saving one by producing an incredible lob on the stretch.
A place in the final was sealed on a second match point.
"Rafa (Nadal) plays like this from the first round in every tournament. It's one of his powers," said Spain captain Sergi Bruguera.
Earlier on Saturday, the 20-year-old Shapovalov had drawn Canada level by beating Khachanov after Rublev's win over Pospisil in the opening match.
The Canadian pair then edged out Khachanov and Rublev in a thrilling deciding-set tie-break.
"I thought both teams played phenomenal," Canada captain Frank Dancevic said.
"The Russians threw everything they had at us, it was just a matter of who came up with the better shots. There was no room for error today - they went for their shots, went big in the big moments, and here we are into the final."
It was their third Davis Cup semi-final, after previous last-four defeats in 1913 and 2013.
"We've got a huge day, a historic day for us tomorrow, and we're going to leave it all out there," said world number 150 Pospisil.
Canada secured a 6-3, 3-6, 7-6 (7/5) victory on their second match point to finish a tie which lasted six and a half hours.
Earlier, Shapovalov had seen off Khachanov, Russia's leading player in the absence of world number four Daniil Medvedev due to exhaustion, in a dramatic match.
The left-handed rising star, who reached his maiden Masters final in Paris earlier this month, saved three successive break points while serving for the match.
The in-form Rublev had made it four singles wins from as many matches this week by brushing aside Pospisil 6-4, 6-4.
Canada have reached the final despite being without the injured Felix Auger-Aliassime, the world number 22, with Pospisil stepping up instead.
"I'm at a loss for words," Shapovalov said. "It's incredible how far we've come this week, with me and Vasek playing on a different level.
"It's unbelievable to see. And to clinch it like this, in the doubles, I wouldn't have it any other way."
Results from the sixth day of the inaugural Davis Cup Finals in Madrid on Saturday:
Semi-finals
Canada 2 Russia 1
Singles
Andrey Rublev (RUS) bt Vasek Pospisil (CAN) 6-4, 6-4
Denis Shapovalov (CAN) bt Karen Khachanov (RUS) 6-4, 4-6, 6-4
Doubles
Vasek Pospisil/Denis Shapovalov (CAN) bt Andrey Rublev/Karen Khachanov (RUS) 6-3, 3-6, 6-7 (5/7)
Spain 2 Britain 1
Singles
Kyle Edmund (GBR) bt Feliciano Lopez (ESP) 6-3, 7-6 (7/3)
Rafael Nadal (ESP) bt Dan Evans (GBR) 6-4, 6-0
Doubles
Marcel Granollers/Feliciano Lopez (ESP) bt Jamie Murray/Neal Skupski (GBR) 7-6 (7/3), 7-6 (10/8)


Week 1
Week 2
Week 3
Week 4
Week 5
Week 6
Week 7
Single-Page Application
this is test popup
Footer content


---
layout: post
title: Billiard is interesting
date: 2006-11-21 03:48:00.000000000 +11:00
comments: true
categories:
- personal
---
I sometimes play billiard to enjoy and have some relax. I took a cue in my hands tens times and thought I can hit balls very well, but when I played with a girls who's specialict in billiard I lost four games with zero result. Well, it was really nice to watch her play. And I also won that day one of my friends first time! Not sure how...
But now I want to have some more games and train myself. If my patience will allow that...
Russian billiard is very interesting.
Comments
Then I understood I cannot play billiard.