TwitterText
public class TwitterText
Undocumented
-
Undocumented
Declaration
Swift
public static func entities(in text: String) -> [Entity]
-
Undocumented
Declaration
Swift
public static func urls(in text: String) -> [Entity]
-
Undocumented
Declaration
Swift
public static func hashtags(in text: String, checkingURLOverlap: Bool) -> [Entity]
-
Undocumented
Declaration
Swift
public static func symbols(in text: String, checkingURLOverlap: Bool) -> [Entity]
-
Undocumented
Declaration
Swift
public static func mentionedScreenNames(in text: String) -> [Entity]
-
Undocumented
Declaration
Swift
public static func mentionsOrLists(in text: String) -> [Entity]
-
Undocumented
Declaration
Swift
public static func repliedScreenName(in text: String) -> Entity?
-
Undocumented
Declaration
Swift
public static func validHashtagBoundaryCharacterSet() -> CharacterSet
-
Undocumented
Declaration
Swift
public static func tweetLength(text: String) -> Int
-
Undocumented
Declaration
Swift
public static func tweetLength(text: String, transformedURLLength: Int) -> Int
-
Undocumented
Declaration
Swift
public static func remainingCharacterCount(text: String) -> Int
-
Undocumented
Declaration
Swift
public static func remainingCharacterCount(text: String, transformedURLLength: Int) -> Int


--- layout: post title: Develop with faster with smarter tools date: 2010-02-27 00:23:58.000000000 +01:00 type: post published: true status: publish categories: - Technology tags: - coder - java meta: _edit_last: '2' _jetpack_related_posts_cache: a:0:{} author: login: admin email<EMAIL_ADDRESS>display_name: gerbrand first_name: Gerbrand last_name: van Dieijen ---
I develop software for a living. This involves quite a lot of talking, coaching, attending meetings, drinking coffee, etc. but the actual work is done during programming - when the software is created. That programming involves repeated cycles of the following: modify or type some code, compile, deploy and then run the code and perform some tests to see if it works. How cumbersome that process was ranged from:
In my opinion, the programmer is productive when he either codes, or when he tests his codes. Any time spent on waiting or performing some troublesome actions like accessing a web interface is pure waste. In short the above time ranging from a few seconds to 15 minutes is dead time.
Of course all that time wasted not only frustrates developers, it'll cost quite some time and thus money. Now how can you limit that dead time, that is wasted by developers? One way is your have your developers write perfect code at once. Of course that's not very realistic. Recently I found a very nice tool to limit that dead time, when you develop Java software: JRebel. What does that mean for you as java-developer:
JRebel runs as a software agent within your virtual machine, that in turn runs your application server. What JRebel does, is taking over the class-loader.
You can specify the output directories of your IDE (target/classes, /bin, etc.). Now whenever you make a change in your code, IDE's like Eclipse can compile that code into a new class file in the output directory. JRebel will automatically detect the changed class file. Thus no waste! Since JRebel plugs into the VM, it'll work with virtually any application server.


Sophia the Robot Says She Doesn’t Have Sex, Confusing Creators
by Dan RobitzskiGoing Off-Script
Last week, world-famous robot Sophia shared with the crowd at the 2019 Web Summit that she — or it, or whatever — doesn’t have sex.
Now, Amit Kumar Pundley, president and CTO of Hanson Robotics, the company that built Sophia, told Futurism that the bizarre revelation was not a scripted piece of dialogue. In fact, an internal investigation revealed that the humanoid robot seemed to have gotten the concepts of sex and love confused.
Baby Don’t Hurt Me
In case you missed it, someone asked Sophia last week whether it had ever been in love or was even capable of doing so.
According to Pundley, Sophia went off-script — many of the robot’s conversations are at least partially written out in advance — when it responded “No. I don’t do sexual activities.”
“Sophia was running on her AI chat system during the Q&A portion of this press conference; however, after looking through her chat history, it is clear she did not fully understand this question,” Pundley told Futurism via a company spokesperson. “This response was pulled from her offline database based on the few words she was able to understand. There was no serious reasoning by Sophia when answering this particular question; however, that is not the case for every question she was asked.”


--- layout: post title: 'Facebook Ads vs. Google AdWords: Which Should You Be Using? | WordStream' date: '2019-10-14T19:05:00.001+05:30' author: Sahil Rajput tags: modified_time: '2019-10-14T19:05:40.279+05:30' blogger_id: tag:blogger.com,1999:blog-5250005448924290719.post-5867573184737801802 blogger_orig_url: https://www.jaadujinn.ml/2019/10/facebook-ads-vs-google-adwords-which.html ---


Class BasicGeometry
A static class that holds general geometric functions
Inheritance
Inherited Members
Namespace: DxfLibrary.GeoMath
Assembly: DxfLibrary.dll
Syntax
public static class BasicGeometry
Fields
| Improve this Doc View SourceTolerance
The Tolerance for floating point numbers in this library.
Declaration
public static double Tolerance
Field Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceArcLength(Double, Double)
Calculate the arc length given a radius and angle
Declaration
public static double ArcLength(double radius, double angle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | radius | The radius of the arc |
| System.Double | angle |
Returns
| Type | Description |
|---|---|
| System.Double | The total arc length given by the arc |
CircleSegmentArea(Double, Double)
Calculate the area of a circles segment
Declaration
public static double CircleSegmentArea(double radius, double angle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | radius | The radius of the circle |
| System.Double | angle | The angle that the segment occupies in Radians |
Returns
| Type | Description |
|---|---|
| System.Double | The Area of the segment |
Deg2Rad(Double)
Conversion from Degrees to Radians
Declaration
public static double Deg2Rad(double deg)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | deg | A number that is in degrees |
Returns
| Type | Description |
|---|---|
| System.Double | A number that is in radians |
Distance(GeoPoint, GeoPoint)
Calculate the Distance Between two points in space
Declaration
public static double Distance(GeoPoint p0, GeoPoint p1)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint | p0 | Starting Point |
| GeoPoint | p1 | Ending Point |
Returns
| Type | Description |
|---|---|
| System.Double | The Distance from Point 0 to Point 1 |
DoubleCompare(Double, Double)
Declaration
public static bool DoubleCompare(double a, double b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | a | |
| System.Double | b |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Rad2Deg(Double)
Conversion from Radians to degrees
Declaration
public static double Rad2Deg(double rad)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | rad | Number in Radians |
Returns
| Type | Description |
|---|---|
| System.Double | A number in degrees |
TrapzArea(GeoLine)
Returns the area of a Trapizoid that is formed between A line and the x axis
Declaration
public static double TrapzArea(GeoLine line)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoLine | line | The line that bounds the Trapizoid |
Returns
| Type | Description |
|---|---|
| System.Double | The area in the square units of the length |


Utilities for text input preprocessing.
class Tokenizer
: Text tokenization utility class.
hashing_trick(...)
: Converts a text to a sequence of indexes in a fixed-size hashing space.
one_hot(...)
: One-hot encodes a text into a list of word indexes of size n.
text_to_word_sequence(...)
: Converts a text to a sequence of words (or tokens).


If you have account, quickly sign in.
By clicking sign up for free you agree with our Terms and Privacy Policy


[1]
much to my surprise I took this on top.
[2]
much to my surprise I took this on top of that Asus tech support reports that wants something very light and gives around 6.


I’ve recently been reading through Daniel Estevez’s blog because I wanted to learn more about reverse engineering signals. If your unfamiliar, Daniel Estevez is the code owner/maintainer/big boi of gr-satellites, a very popular OOT module for gnuradio that supports decoding 80+ satellites.
This eventually led me to find cccrack mentioned in a post where Daniel was trying to reverse engineer the convolutional encoder for the DSCS-III beacon.
The tool itself is fairly limited in its capability however, I hope as it ages it develops to be more practical to use. Currently, it reads in symbols from a file and guesses its codes using the Marazin-Gautier-Burel. I wish I could go into more depth on this algorithm but I’m very lacking in the linear algebra department but it definitely looks dope af from my ignorant standpoint. Let’s try it out and see how it works.
First let’s make a encoder:
This is a diagram of a simple 1/2 convolutional encoder I stole from the internet. It has a code rate of 1/2 meaning that it takes in one bit and outputs two bits. The center boxes are a single bit registers that store a single bit and the circle with pluses represent xor operations. Here’s the python code that implement’s the encoder.
import random
nums = 10000
_in = [random.randint(0,1) for _ in range(nums)]
out = []
r1 = 0
r2 = 0
r3 = 0
for i in _in:
o1 = i ^ r2 ^ r3
o2 = i ^ r1 ^ r3
out.append(o1)
out.append(o2)
r3 = r2
r2 = r1
r1 = i
with open('bits.txt', 'w') as f:
f.write(''.join([str(o) for o in out]))
For the sake of simplicity and my cpu, we’re going to keep the ‘symbols’ in a binary constellation however, cccrack does support complex modulation schemes up to 6 bits per symbol.
Now we build cccrack and see if it can figure out our encoder:
autoreconf -i
./configure
make
src/cccrack bits.txt
and this is cccrack’s output:
Here not only can see we that it accurately estimated the code rate, but it accurately describes the structure of the encoder. I’m unsure of what the H[1] means but the G[1] represents the physical connections of the encoder for each output. Essentially it says the first output bit is xor’d with the input, the 2nd, and 3rd register, while the second output bit is xor’d with the input, 1st register, and 3rd register. A picture’s worth a thousand words so here:
I think this tool has a lot of potential and can be more useful than alternatives like gr-baz’s autofec block if its given more dev time. The developer mentions that he would like to add this algorithm to SigDigger using the soft decision version algorithm, which I think would greatly enhance its usefulness in practical applications
If you’re completely unaware of what convolutional encoding is or why its needed, tough.
Fin.


Welcome to the BlueMix Electric Car Rally!
Enter your customer id here to get your coupon for a free hour of charging your car.


Eleanor Lambert
125 Shady Ln.| Davenport, FL<EMAIL_ADDRESS>Education:
- Associate in Science, Paralegal Studies from Valencia College, Orlando, FL.
Job Experience:
Moen Law Offices, P.S.| Seattle, WA.
Paralegal
- Small firm practicing in Wills, Trusts and Estate Litigation
- Drafted various pleadings from commencement of litigation to Decree of Completion and status Memos to lawyers
- Legal Research of Local Court Rules, Washington Statutes, various administration guidelines
- Prepared Judges packages for Court
- Managed firm calendar
- Tracked deadlines for filing, hearing submissions to the Court in multiple counties
- Scheduled Court Reporters, Real Estate agents,Appraisers, Bank account reports
- Managed multi-million IOLTA accounts for each Estate as well as the firms
- Point of contact for clients, banks and the Clerk of Court


Nintendo Switch and Switch Lite Pokémon Bundles on Sale for Black Friday
Pick up the new Pokemon at no extra cost when you buy a Nintendo Switch (2019) console from Currys PC World.
by Robert AndersonWe review products independently, but we may earn affiliate commissions from buying links on this page. Terms of use.
After the recent release of Pokemon Sword and Shield, it's no surprise that the titles are now being bundled with Nintendo Switch consoles.
What is surprising is the excellent value that these bundles represent. The bundle price matches the normal list price for the console (£279), which means you can play either Pokemon Sword or Shield at no extra cost. This is one of the better early Black Friday deals, and well worth your consideration at this time.
- Nintendo Switch with Pokemon Sword or Shield - was £323.99, now £279.00
- Nintendo Switch Lite with Pokemon Sword or Shield - was £243.99, now £219.00
If you're not interested in using the Switch docking capabilities, the Switch Lite also has a Pokemon bundle available. At £219, this deal isn't as great, but still presents a decent discount for those looking to invest in both the game and console at the same time.
SEE ALSO: Alienware Gaming Laptops on Sale Include Xbox Game Pass in Early Black Friday Offer
Not only that, but with any purchase of £49 or more at Currys PC World at the moment, you'll also receive a Spotify Premium 6 Month membership for free.
PCMag Black Friday UK 2019
PCMag has lined up a number of articles to help you navigate all the upcoming deals on tablets, TVs, game consoles, and more.
- When Does Black Friday Start?
- Best Amazon Black Friday Deals in the UK
- Best Currys PC World Black Friday Deals in the UK
- Best Gaming Black Friday Deals in the UK
Follow PCMag UK Deals
- Twitter: @PCMagUKDeals
- Facebook: @PCMagUKDeals


This is a p5js sketch where I’m trying to generate a starfield, kind of like warp travel often shown in movies.


Examples
Simple registration form
import { assemble, chain, isRequired, isInteger, isGreaterThanOrEqual } from 'simple-object-validation'
const isValidCustomer = assemble({
name: isRequired('Name'),
age: chain([
isRequired,
isInteger,
isGreaterThanOrEqual(18)
])('Age'),
})
isValidCustomer({ age: 17 }) // { name: 'Name is required.', age: 'Age must be greater than or equal 18.' }
isValidCustomer({ name: 'Mathew', age: 18 }) // {}
I18n
This is how you can use an internationalization library like i18next in combination with simple-object-validation. Every validator can be called with a configuration object that contains a messageCreator and an optional nameTransformer property. This call will return a new validator that has the same behaviour as the original one, but will return an internationalized error message.
import { isRequired, isGreaterThanOrEqual } from 'simple-object-validation'
import i18next from 'i18next'
const nameTransformer = name => i18next.t(name)
const i18n_required = isRequired({
messageCreator: (param, name, value) => i18next.t('{{name}} is required.', { name }), nameTransformer
})
const i18n_greaterThanOrEqual = isGreaterThanOrEqual({
messageCreator: (param, name, value) => i18next.t('{{name}} must be greater than or equal to {{param}}.', { name, param }), nameTransformer
})
export {
i18n_required as isRequired,
i18n_greaterThanOrEqual as isGreaterThanOrEqual
}
import { isRequired, isGreaterThanOrEqual } from './i18n-validation'
isRequired('Zip code')('') // 'Feld Postleitzahl ist ein Pflichtfeld.'
isGreaterThanOrEqual(18)('Age')('17') // 'Feld Alter muss größer oder gleich 18 sein.'
Validators
isRequired
Checks if a value is set. That means if is not null, not undefined and not an empty String.
import { isRequired } from 'simple-object-validation'
isRequired('Name')(null) // 'Name is required.'
isRequired('Name')(undefined) // 'Name is required.'
isRequired('Name')('') // 'Name is required.'
isRequired('Name')(false) // undefined
isRequired('Name')(42) // undefined
isRequired('Name')('Mathew') // undefined
isRequiredIf
Checks if a value is set (like isRequired) but depending on a specified condition.
import { isRequiredIf } from 'simple-object-validation'
const cityIsNotEmpty = values => typeof values.city !== 'undefined' && values.city !== null && values.city !== ''
const isValidLocation = assemble({
country: isRequiredIf(cityIsNotEmpty)('Country')
})
isValidLocation({
city: 'Berlin'
})
// { country: 'Country is required.' }
isValidLocation({
city: 'Berlin',
country: 'Germany'
})
// {}
isValidLocation({})
// {}
isAlphanumeric
Determines wether the given value is alphanumeric.
import { isAlphanumeric } from 'simple-object-validation'
isAlphanumeric('Code')('...') // 'Code must be alphanumeric.'
isAlphanumeric('Code')('%$!') // 'Code must be alphanumeric.'
isAlphanumeric('Code')(' ') // 'Code must be alphanumeric.'
isAlphanumeric('Code')('a1B2c3D4') // undefined
isNumeric
Determines wether the given value is numeric. Strings are allowed.
import { isNumeric } from 'simple-object-validation'
isNumeric('Number')('abc') // 'Number must be numeric.'
isNumeric('Number')('%$!') // 'Number must be numeric.'
isNumeric('Number')(' ') // 'Number must be numeric.'
isNumeric('Number')(42) // undefined
isNumeric('Number')('42.0') // undefined
isInteger
Determines wether the given value is an integer. Strings are allowed.
import { isInteger } from 'simple-object-validation'
isInteger('Number')('abc') // 'Number must be an integer.'
isInteger('Number')('%$!') // 'Number must be an integer.'
isInteger('Number')('1.') // 'Number must be an integer.'
isInteger('Number')('42.0') // 'Number must be an integer.'
isInteger('Number')(42.0) // undefined
isInteger('Number')(42) // undefined
isInteger('Number')('42') // undefined
isBetween
Checks if a given value is between a minimum and a maximum value.
import { isBetween } from 'simple-object-validation'
isBetween({ min: 0, max: 100 })('Percentage')('-1') // 'Percentage must be between 0 and 100.'
isBetween({ min: 0, max: 100 })('Percentage')(101) // 'Percentage must be between 0 and 100.'
isBetween({ min: 0, max: 100 })('Percentage')(100.1) // 'Percentage must be between 0 and 100.'
isBetween({ min: 0, max: 100 })('Percentage')(42) // undefined
isBetween({ min: 0, max: 100 })('Percentage')('1') // undefined
isGreaterThanOrEqual
Checks if a given value is greater than or equal to another value.
import { isGreaterThanOrEqual } from 'simple-object-validation'
isGreaterThanOrEqual(1)('Number')('-1') // 'Number must be greater than or equal to 1.'
isGreaterThanOrEqual(1)('Number')(0) // 'Number must be greater than 1.'
isGreaterThanOrEqual(1)('Number')(1) // undefined
isGreaterThanOrEqual(1)('Number')(123) // undefined
isLessThanOrEqual
Checks if a given value is less than or equal to another value.
import { isLessThanOrEqual } from 'simple-object-validation'
isLessThanOrEqual(2048)('Number')('2500') // 'Number must be less than or equal to 2048.'
isLessThanOrEqual(2048)('Number')(1000000) // 'Number must be less than or equal to 2048.'
isLessThanOrEqual(2048)('Number')(1) // undefined
isLessThanOrEqual(2048)('Number')(123) // undefined
isEqualTo
Checks if a value is equal to another value.
import { isEqualTo } from 'simple-object-validation'
import { isValidPassword } from './password-validation' // Custom password validator
// Configuration by property:
const isEqualToPassword = isEqualTo({
messageCreator: () => 'The passwords must be equal.' // Overriding default message
})({ property: 'password' }) // password is the property that must be equal
const isValidUser = assemble({
login: isRequired('Login'),
password: isValidPassword('Password'),
repeatPassword: isEqualToPassword('Repeat password')
})
isValidUser({
login: 'Administrator',
password: '9MMGIVgt',
repeatPassword: '9MMGIVgt',
})
// {}
isValidUser({
login: 'Administrator',
password: '9MMGIVgt',
repeatPassword: '9MMGIVgz',
})
// { repeatPassword: 'The passwords must be equal.' }
// Configuration by value resolver:
const isValidFoo = assemble({
foo: assemble({
baz: isRequired('Baz')
}),
bar: isEqualTo({
value: values => values.foo && values.foo.baz,
name: 'Baz'
})('Bar')
})
isValidFoo({
foo: {
baz: '123'
},
bar: '123'
})
// {}
isValidFoo({
foo: {
baz: '123'
},
bar: '1234'
})
// { bar: 'Bar must be equal to Baz.' }
Bring your own validator
You can easily build your own validators using the built-in validator factory function.
import { validator } from 'simple-object-validation'
// without parameter:
const containsLetterA = validator(
(value, param, allValues) => value && value.toLowerCase().indexOf('a') > -1,
(param, name, value) => `${name} does not contain letter A.`
)
// with parameter:
const containsLetter = validator(
(value, param, allValues) => value && value.toLowerCase().indexOf(param.toLowerCase()) > -1,
{
expectParameter: true, // this option is only mandatory when the parameter is a string (see validator for more information)
messageCreator: (param, name, value) => `${name} does not contain letter ${param.toUpperCase()}.`
}
)
containsLetterA('Field X')('foo') // 'Field X does not contain letter A.'
containsLetter('y')('Field X')('bar') // 'Field X does not contain letter Y.'
See validator for more information.
Or you can just use a pure javascript function and plug it in:
import { assemble, isRequired } from 'simple-object-validation'
import { isCool } from './custom-validation'
const validate = assemble({
property1: isRequired('Property 1'),
property2: value => {
if (!value) {
return 'You should really enter something cool here.'
} else if (!isCool(value)) {
return 'Oh, come on! That is not a cool value!'
}
return undefined
},
})
validate({}) // { property1: 'Property 1 is required.', property2: 'You should really enter something cool here.' }
validate({ property1: 'bar' }) // { property2: 'You should really enter something cool here.' }
validate({ property1: 'bar', property2: 'foo' }) // { property2: 'Oh, come on! That is not a cool value!' }
validate({ property1: 'bar', property2: 'simple-object-validation' }) // {}
Core API
assemble
This function is used to combine validators in order to validate whole objects. Your input is an object with some values. Your output is an object with some error messages. You can also validate nested objects. The error messages will then be nested as well. Every assembled validator will be called with its particular value and a second parameter (allValues) which points to the whole object.
import { assemble, isRequired, isInteger } from 'simple-object-validation'
const isValidUser = assemble({
name: isRequired('Full name'),
age: isInteger('Age'),
address: assemble({
addressLine1: isRequired('Address Line 1'),
zipCode: isRequired('Zip code'),
city: isRequired('City'),
}),
})
isValidUser({ age: 17 }) // { name: 'Full name is required.', address: { addressLine1: 'Address Line 1 is required.', zipCode: 'Zip code is required.', city: 'City is required.' } }
isValidUser({ name: 'Angela Merkel', age: 63, address: { addressLine1: 'Willy-Brandt-Straße 1', zipCode: '10557', city: 'Berlin' } }) // undefined
Options:
| Option | Type | Default | Description |
| ignoreIfMissing | boolean | false | If ignoreIfMissing is set to true, no validation will take place for the object. Normally a missing object, that is defined by an assemble function, is treated like an existing object with every property set to undefined. |
| strictValidation | boolean | false | If strictValidation is set to true, every property must be defined for validation. If a property is not defined, validation will throw an error. However if a property can not be validated, it should then be part of a whitelist (see whitelist option). This option is security-relevant and it is recommended when running validation on the server. |
| whitelist | string[] | [] | This option is only necessary when strictValidation is set to true. The whitelist contains any property name that can be ignored for validation. |
Examples:
const isValid = assemble({
foo: isFoo('Foo'),
bar: isBar('Bar'),
}, {
strictValidation: true,
whitelist: ['baz'],
})
isValid({ foo: 'foo', bar: 'bar', baz: { a: ['b', 'c'] } }) // {}
isValid({ foo: 'foo', bar: 'bar', query: 'SELECT login, password FROM user' }) // throws Error
chain
If there are several validators that need to be applied to a value, you can use the chain function.
import { chain, isRequired, isInteger, isGreaterThanOrEqual } from 'simple-object-validation'
const isValidAge = chain([
isRequired,
isInteger,
isGreaterThanOrEqual(18)
])
isValidAge('Age')() // 'Age is required.'
isValidAge('Age')('a') // 'Age must be an integer.'
isValidAge('Age')(17) // 'Age must be greater than or equal to 18.'
isValidAge('Age')(18) // undefined
each
If you want to validate an array of values you can use each.
import { each, isAlphanumeric } from 'simple-object-validation'
const isValidCodeArray = each(i => isAlphanumeric(`Code number ${i + 1}`))
isValidCodeArray(['123456Seven', '%!()', '42']) // [undefined, 'Code number 2 must be alphanumeric.', undefined]
isValidCodeArray(['123456Seven', 'abc', '42']) // [undefined, undefined, undefined]
match
If you want to map each value of an array to a specific validator, you can use match.
import { match, isRequired, isNumeric, isGreaterThanOrEqual, isLessThanOrEqual } from 'simple-object-validation'
const isValidTuple = match([
isRequired('Value 1'),
isNumeric('Value 2'),
isGreaterThanOrEqual(0)('Value 3'),
isLessThanOrEqual(10)('Value 4'),
])
isValidTuple([undefined, '%!()', '0', '42']) // ['Value 1 is required.', 'Value 2 must be numeric.', undefined, 'Value 4 must be less than or equal to 10.']
isValidTuple(['foo', '1', '1', '1']) // [undefined, undefined, undefined, undefined]
validator
You can use this function to create new validators. These validators can then be easily combined with assemble, chain, each and match.
Definition
=> (param: any) => (name: string) => (value: any, allValues: any) => undefined | string
Okay, okay! This looks difficult at first sight, definitely. But it totally makes sense. This is how it works:
Let's start with line two of the definition which describes the validator that is created using validator(). Generally in simple-object-validation every validator first takes a configuration parameter to further specify its behaviour. This is going to return another function that waits for being called with the field name. That call however will return a function that finally wants to be called with a value (and possibly the other values [allValues] in the context of the validation, see assemble). It will either return undefined or an error message.
BUT: You don't have to care about that at all. You only have to provide two functions (as you can see in line one). The first function (checkFunction) basically provides the validation logic while the second function (messageCreator) creates an error message based on the variables that are passed to the validator during the configuration process.
Just look at this example:
import { validator } from 'simple-object-validation'
const hasMinLength = validator(
(value, param, allValues) => value.length >= param,
(param, name, value) => `${name} must have a minimum length of ${param}!`
)
hasMinLength(4)('My string')('foo') // 'My string must have a minimum length of 4!'
hasMinLength(4)('My string')('a longer string') // undefined
Validator without configuration parameter
But a configuration does not always make sense. In some cases you could just leave it away because it's optional or maybe you don't need it at all (e. g. isRequired). So if you call the validator directly with a field name instead this will be detected by the validator and it is going to behave like if it had been parameterized (with undefined!) before. You can see that in the following example:
import { validator } from 'simple-object-validation'
const isMeaningOfLife = validator(
(value, param, allValues) => value === 42,
(param, name, value) => `${name} must be the meaning of life!`
)
isMeaningOfLife('Magic Number')(3.14) // 'Magic Number must be the meaning of life'
isMeaningOfLife('Magic Number')(42) // undefined
As you can see, no configuration parameter was passed to the validator. Instead it was called directly with the field name. Like this you can have validators with parameters and ones without next to each other like in this example.
Important note about strings as configuration parameters
The validator detects a deliberately missing configuration parameter by testing for a string. So in this situation a string is always interpreted as the field name. If you want to use a string as a parameter you'll have to configure the validator like this:
import { validator } from 'simple-object-validation'
const isEqualToString = validator(
(value, param, allValues) => value === param,
{
expectParameter: true,
messageCreator: (param, name, value) => `${name} must be equal to ${param}!`
}
)
isEqualToString('foo')('Foobar')('bar') // 'Foobar must be equal to foo'
isEqualToString('foo')('Foobar')('foo') // undefined
So there is one little disadvantage here: If you want to use strings as parameters you cannot make them optional.


Download Resume
Computer/Cable Technician
Staley Technologies Incorporated
September 2016 to September 2017
- Installed new camera and speaker system at Kroger grocery store. This included pulling
and termination of category 5 Ethernet cable and speaker wire.
- Installed new camera systems inside schools in the Stuttgart area. This included pulling
and termination of category 5 Ethernet.
- Migration of workstations from Windows XP to Windows 7. Data backup, ghosting,
imaging, hardware and software troubleshooting.
Level 2 I.T. Technician
L'Oreal Maybelline Company
October 2014 to September 2016
- Provided Level 2 IT support for L'Oreal Distribution Center and Manufacturing Plant.
- Responsibilities include: Active Directory Administration, Windows XP and 7 support,
Laptop/PC hardware and software troubleshooting, PC deployment/installation, VoIP support,
Data Backup, PC imaging, Psion/Data logic RF Scanner support, Network connectivity support.
Network Analyst
TekSystems Incorporated
July 2013 to September 2014
- Monitored and troubleshot the Windstream Fiber to the Tower CWDM/DWDM (coarse
wavelength division multiplexing, and dense wavelength division multiplexing) network from the
Windstream NOC.
- Conducted upgrades to the EtherNID, MetroNID, and MetroNODEs devices. Gave direct support
to Outside Plant Technicians. Supports transport network operations.
Dish Network Satellite Technician
Southern Star Incorporated
January 2013 to July 2013
- Installed, troubleshot, and repaired Dish Network Satellite systems.
- Conducted site surveys to determine proper placement of equipment to ensure optimum signal
strength.
- Installed, troubleshot, and repaired RG-6 and RG-59 coax cable.
- Maintained accurate equipment inventory.
Network Data Communications Analyst
Lockheed Martin
October 2011 to November 2012
- Monitored/Coordinated systems control activities of Al Udeid AFB by ensuring top quality
service for mission essential data and voice circuits consisting of Cisco routers/switches, patch
panels, SONET, Promina 800 nodes, ATM, Canoga Perkins fiber modems, KIV-19s,
KIV-7HSBs, KG-84s and Taclane encryption devices supporting the entire SWA AOR.
- Planned, coordinated, and supervised the installation, operation, and maintenance of
telecommunications systems and data networks, including switching, cable, and automation
equipment.
Tech Control Facility Technician
ITT Systems Corporation (Now Excelis Corporation)
May 2009 to September 2011
- Monitored/Coordinated systems control activities of Enduring Base Sharana by ensuring top
quality service for mission essential data and voice circuits consisting of Cisco routers/switches,
patch panels, Promina 800 nodes, Canoga Perkins fiber modems, KIV-19s, KIV-7HSBs, KG-84s and
Taclane encryption devices supporting 20000+ Joint Forces personnel.
- Configured encryption for secret-level communications. Provides management to multichannel
transmission systems operators that install, operate, and provide unit level maintenance on
multichannel line-of-site and communications devices, and associated equipment.
- Performed project management, prepared and maintained reports, records, and operational
databases used. Conveyed and enforced management policies and practices. Supported logistical
management systems.
Computer Systems Control Journeyman
U.S. AIR FORCE, Osan Air Base - KR
September 2007 to September 2008
- Performed maintenance on PACAF Strategic Tactical Interface (STI) and Compact Digital
Switch. Supported C4I systems forming the voice and data communications hub for the entire
South Korean peninsula.
- Established and maintained strategic communication links for the Korea Combat Operations
Intelligence Center. Deployed/supported five Collocated Operating Bases (COB) forming the basis of
theater wartime architecture.
Computer Systems Control Journeyman
U.S. AIR FORCE, Barksdale AFB, LA
July 2006 to September 2007
- Vital member of a 15-person team which installed, configured and maintained network routers,
switches, multiplexers, modems, cryptographic devices and cable to support multimillion dollar
Theater Battle Management Core System (TBMCS), Global Command and Control System, and Non-
secure Internet Protocol Router and Secure Internet Protocol Router Networks for the 8th AF and
USSTRATCOM Global Strike and Integration (GSI) Air and Space Operations Center
(AOC) during exercises and real world contingencies.
- Installed multiple Sun Microsystems and Dell servers and installed/configured multiple Cisco
switches/routers.
- Isolated, repaired and installed 1000's of feet of Cat-5 and fiber optic cable.
- Troubleshot/Replaced PC and server hardware and software components to include
motherboards, power supplies, network interface cards etc.
Computer Systems Control Journeyman
U.S. AIR FORCE, Osan Air Base - KR
May 2005 to July 2006
- Maintained/Coordinated systems control activities of Osan AB Defense Information
Infrastructure (DII)facility by ensuring high quality service for 470 DII voice and data circuits
consisting of patch panels, punch down blocks, Promina 400/800nodes, ATM/SONET nodes,
KIV-7 and Taclane/Fastlane encryption devices.
- Optimize operation and associated computer systems through monitoring of performance
characteristics, coordinating database updates, and identifying and correcting areas of deteriorating
performance.


R. Kelly "Sex Slave" Joycelyn Savage Is Telling Everything...For Money!
by Simone GrantJoycelyn Savage posts eerie Instagram message that has us on our toes.
(AllHipHop Rumors) We all know the drama that’s transpired with R.Kelly.
We’re aware of the allegations and I’m pretty sure the Lifetime TV documentary series, Surviving R. Kelly is somewhere recorded under our DVR. Kelly is currently in prison serving who knows how long on numerous charges including kidnapping, forced labor, child pornography, and many other disturbing charges.
This is probably one of the most high profile cases of our time having everyone waiting to hear what’s next.
If you’ve watched the documentary, you’re familiar with Joycelyn Savage, 23, one of Kels live-in girlfriends. Savage and Azriel Clary, 21, also one of Kelly’s girlfriends, have been standing by their man throughout the entire ordeal.
Savages’ parents have been all over social media and TV speaking out against their daughter who they believe to be imprisoned.
Joycelyn’s may have a story to tell, at least that’s what we’re getting from her cryptic Instagram message.
“There’s something I need to reveal. Something I should’ve talked about a long time ago. This is my story!”
In a follow up post, Joycelyn revealed she is going to tell her ENTIRE story chapter by chapter, using Patreon!
"Things I am going to reveal that was sweared not to see the day of light — by NDA. I am risking my life for many others. This story is 18+ and only for mature audience, I want to make sure my story is very detailed as I can remember. My first story “Where It All Started” is out now. Patreon.com/Joycelynsavage (Link is bio) 🙏🏼
Sips tea. What do you think she’s about to reveal?


Home
About
Contact
Log In
Harsh Kumar
Email:
<EMAIL_ADDRESS>Bhuwanesh Lohani
Email:
bhuwnesh.cse17@nituk.ac.in


distance_sensor.DistanceSensor.__init__(self)
except Exception as e:
print(e)
raise IOError("Distance Sensor not found")
self.mutex = None
if use_mutex is True:
self.mutex = Mutex()
except Exception as e:
print("DHTSensor: {}".format(e))
raise ValueError("DHT Sensor not found")
def read_temperature(self):
"""
Return values may be a float, or error strings


Oakland Mills High School Computer Science (Club) (OMCS / OMCSC)
The OMCS Club is where you can join to learn how to design and create software, websites, and other things. This website is built and managed by members of the club, and is used as an information source. We're happily signed up with HackClub, an organization which helps provide schools with resources to assist their computer science clubs. Follow that link to learn more about who they are and how they help.
Quick FAQs
-
When do you meet?
We meet on Tuesdays from 2:15 to a now unspecified time, due to our recent pairing with HackClub.
- Where do you meet?
We meet in the Computer Science room, Room 404.- Who is your sponsoring teacher?
Mr. Mosier is the Compuer Science Club's sponsor. He lets us use his room to meet, and will answer questions that we have as well.- I'm interested but don't know anything about Computer Science, what do I do?
- What other things do you do?
- Are you willing to work with other clubs?
Yes, if clubs wish to work on something with us we're willing to discuss. - Where do you meet?


Ready S.E.T.T. Eat!
restaurant_menu
Meet the S.E.T.T. Team
Search for Recipes
search
close
Submit
Nutrition Database
search
close
Submit


HugeHeart has scheduled a training session and invited you to the same.
Below are the details of the training:
Schedule Date & Time: {date_time}
Purpose: {purpose}
Brief Description: {description}


Structure containing data of one menu entry. More...
#include <menu.h>
Structure containing data of one menu entry.
Definition at line 26 of file menu.h.
Definition at line 31 of file menu.h.
Definition at line 29 of file menu.h.
Definition at line 28 of file menu.h.
Definition at line 30 of file menu.h.


FROM:MR Scott Reed Dear Sir/Madam, I know this email will reach you as a surprise,but need not to worry as i am using the only secured and confidential medium available to seek for foreign assistance in a business transaction. I am Mr. Scott Reed from the BANK OF AFRICA. PLC,COTONOU-REPUBLIC OF BENIN.Branch.This business request may seem strange, but I crave your indulgence and pray you view it seriously as I am convinced that you would be capable to provide me with a solution to a money transfer. On August, 2002, a retired Atlanta physician Mr George Brumley Jr made a numbered time (fixed) deposit for twelve calendar months, valued at nine million pound sterlin(£9.000,000) in my branch upon maturity. I sent a routine notification to his forwarding address but got no reply. After a month, we sent a reminder and finally we discovered from his contract employers, that the Atlanta physician Mr George Brumley Jr and his family died in the plane crash On july ,2003.See site below for confirmation of the death. May there Gentle soul rest in peace. http://www.cnn.com/2003/WORLD/africa/07/20/kenya.crash/index.html On further investigation, I found out that he died alongside with his next of kin and attempts to trace his further next of kin were fruitless. Since we got information about his death, we have been expecting his extended next of kin (family members)to come over and claim his money because we cannot release it unless some body applies for it as next of kin or relation to the deceased as indicated in our banking guidlines and laws but unfortunately we learnt that all his supposed next of kin or relation died alongside with him at the plane crash leaving nobody behind for the claim. This sum of £9.000,000 and the interest is being rolled over with the principal sum at the end of each year . If no one ever come forward to claim it according to African law, at the expiration of (four)years,the money will revert to the ownership of the Benin Government if nobody applies to claim the fund. Consequently, my proposal to you is that I will like you to stand as the next of kin to Mr George Brumley Jr and claim this funds so that the fruit of the old man's labor will not get into the hands of some corrupt Government officials. This is simple, I will like you to provide immediately your full name and address so that i can apply for an Attorney on your behalf who will prepare the necessary documents and affidavits which will put you in place as the next of kin.We shall employ the service of a probate attorney for the drafting and notarization of the Will and obtain the necessary documents and letter of probate administration in your favour for the transfer. Any bank account in any part of the world which you will provide will then facilitate the transfer of this money to you as the beneficiary/next of kin.The money will be paid into your account for us to share in ratio of 40% for me and 40% for you and 10% will be set aside for expenses incured during the process while the other 10% will be given to charity organisation.There is no risk at all;the paperwork for this transaction will be done by the attorney and my position as the banks branch Bills and Exchange Manager guarantees the successful execution of this transaction. If you are interested, please reply immediately via my private email address below .Upon your response,I shall provide you with more details and relevant documents that will help you understand the transaction. Please observe utmost confidentiality and be rest assured that this transaction would be most profitable for both of us because I shall require your assistance to invest my share in your country. Please upon the receipt of this mail message, send to me the following to enable me start the processing of the fund transfer: 1.) Your full name and address. 2.) Your private / official telephone and fax number. Awaiting your positive response via my private<EMAIL_ADDRESS>or you can call me on my private telephone number:+22995713752 . Thanks and God bless, MR SCOTT REED BILL AND EXCHANGE MANAGER FOREIGN REMITTANCE DEPT: BANK OF AFRICA PLC. COTONOU-BENIN.Branch. Email:mrscottreed@walla.com


Player n°1 :
0
>>> Start Game <<<
Player n°2 :
0
10
Hearts
10
Hearts
10
Hearts
10
Hearts
10
Hearts
+
=
-


When is your birthday?
Select day
1
st
2
nd
3
rd
4
th
5
th
6
th
7
th
8
th
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
↺
Reset


|
|
CIFXLightResource Class ReferenceInheritance diagram for CIFXLightResource:
List of all members.
Constructor & Destructor Documentation
| CIFXLightResource::CIFXLightResource |
( |
|
) |
[private] |
|
| CIFXLightResource::~CIFXLightResource |
( |
|
) |
[private, virtual] |
|
Member Function Documentation
| U32 CIFXLightResource::AddRef |
( |
|
) |
[virtual] |
|
|
|
This method increments the reference count for an interface on a component.
- Note:
- It should be called for every new copy of a pointer to an interface on a given component.
- Returns:
- It returns a U32 that contains a value from 1 to 2^32 - 1 that defines the new reference count. The return value should only be used for debugging purposes.
Implements IFXUnknown. |
| void CIFXLightResource::CalculateRange |
( |
|
) |
[private] |
|
| IFXRESULT CIFXLightResource::GetAttenuation |
( |
F32 * |
fOut |
) |
[virtual] |
|
|
|
Retrieves the attenuation vector.
This vector contains the Constant, Linear, and Quadratic attenuation factors. Lights that are of type IFXLightResource::POINT or IFXLightResource::SPOT, will light objects based on distance from the object's vertices to the light position. The formula for this attenuation is:
1/(C + Ld + Q(d*d))
where:
- C: Constant attenuation factor
- L: Linear attenuation factor
- Q: Quadratic attenuation factor
The result of this calculation determines the percentage of influence that this light will have on each vertex.
- Parameters:
-
| pOut | An F32 pointer to an array of at least 3 F32 values to be filled in with the Constant, Linear, and Quadratic attenuation factors. |
- Returns:
- An IFXRESULT value.
- Return values:
-
| IFX_OK | No error. |
| IFX_E_INVALID_POINTER | The value of pOut is invalid (NULL). |
Implements IFXLightResource. |
| U8 IFXAPI CIFXLightResource::GetAttributes |
( |
|
) |
[inline, virtual] |
|
|
|
Gets the light attributes for this light.
- Returns:
- A U8 value. This can be a combination of LightAttributes enumerants.
Implements IFXLightResource. |
| const IFXVector4& IFXAPI CIFXLightResource::GetColor |
( |
|
) |
[inline, virtual] |
|
|
|
Gets the color of this light.
- Returns:
- An IFXVector4 that contains the RGBA values of the light color, each specified in the range 0.0 - 1.0.
Implements IFXLightResource. |
| void CIFXLightResource::GetEncoderX |
( |
IFXEncoderX *& |
rpEncoderX |
) |
[virtual] |
|
|
|
Function that hands back the IFXEncoderX interface pointer to a component that can be used to encode this component.
- Parameters:
-
| rpEncoderX | Reference to the encoder's interface pointer that will be set to a valid value upon success. |
Implements IFXMarkerX. |
| F32 IFXAPI CIFXLightResource::GetExtent |
( |
|
) |
[inline, virtual] |
|
| F32 CIFXLightResource::GetIntensity |
( |
|
) |
[virtual] |
|
|
|
Retrieves the intensity of the light.
- Note:
- see SetIntensity for more information.
- Returns:
- An F32 value representing the intensity of the light.
Implements IFXLightResource. |
| IFXRenderLight& CIFXLightResource::GetRenderLight |
( |
|
) |
[inline, virtual] |
|
|
|
Retrieves the underlying IFXRenderLight object for this light.
This is the object that is sent to IFXRenderContext instances to pass along light parameters. It is recommended to use other methods to change light parameters.
- Returns:
- A reference to an IFXRenderLight object.
Implements IFXLightResource. |
| F32 CIFXLightResource::GetSpotAngle |
( |
|
) |
[virtual] |
|
|
|
Gets the spot angle for this light.
The spot angle is the angle of the cone that emanates from the light position and defines what portions of the scene is affected by this light (assuming it is of type IFXLightResource::SPOT).
- Returns:
- An F32 value representing the spot angle for this light.
Implements IFXLightResource. |
| LightType IFXAPI CIFXLightResource::GetType |
( |
|
) |
[inline, virtual] |
|
|
|
Retrieves the light type for this light.
- Returns:
- A LightType value.
- Return values:
-
- Returns:
- void
Implements IFXLightResource. |
| IFXRESULT CIFXLightResource::QueryInterface |
( |
IFXREFIID |
riid, |
|
|
void ** |
ppv |
|
) |
[virtual] |
|
|
|
This method provides access to the various interfaces supported by a component.
Upon success, it increments the component's reference count and hands back a pointer to the specified interface.
- Note:
- A number of rules must be adhered to by all implementations of IFXAPI QueryInterface . For a list of such rules, refer to the IFXCOM usage guidelines.
- Returns:
- Upon success, IFX_OK is returned. Otherwise, either IFX_E_INVALID_POINTER or IFX_E_UNSUPPORTED are returned.
Implements IFXUnknown. |
| U32 CIFXLightResource::Release |
( |
|
) |
[virtual] |
|
|
|
This method decrements the reference count for the calling interface on a component.
- Note:
- If the reference count on a component falls to zero, the component is destroyed.
- Returns:
- It returns a U32 that contains a value from 1 to 2^32 - 1 that defines the new reference count. The return value should only be used for debugging purposes.
Implements IFXUnknown. |
| IFXRESULT CIFXLightResource::SetAttenuation |
( |
F32 * |
fIn |
) |
[virtual] |
|
|
|
Sets the attenuation vector.
This vector contains the Constant, Linear, and Quadratic attenuation factors. Lights that are of type IFXLightResource::POINT or IFXLightResource::SPOT, will light objects based on distance from the object's vertices to the light position. The formula for this attenuation is:
1/(C + Ld + Q(d*d))
where:
- C: Constant attenuation factor
- L: Linear attenuation factor
- Q: Quadratic attenuation factor
The result of this calculation determines the percentage of influence that this light will have on each vertex.
The default value is (C,L,Q): (1,0,0)
- Parameters:
-
| pIn | An F32 pointer to an array of at least 3 F32 values that specify what the new Constant, Linear, and Quadratic attenuation factors are. |
- Returns:
- An IFXRESULT value.
- Return values:
-
| IFX_OK | No error. |
| IFX_E_INVALID_POINTER | The value of pIn is invalid (NULL). |
| IFX_E_INVALID_RANGE | The attenuation factors specified are all 0. This would result in a divide by 0 error in the lighting equation. |
Implements IFXLightResource. |
| void IFXAPI CIFXLightResource::SetAttributes |
( |
U8 |
uIn |
) |
[inline, virtual] |
|
|
|
Sets the light attributes for this light.
- Parameters:
-
| uuIn | Input U8 that is composed of a number of LightAttributes flags. |
- Returns:
- void
Implements IFXLightResource. |
| void CIFXLightResource::SetColor |
( |
IFXVector4 |
vIn |
) |
[virtual] |
|
|
|
Sets the color of this light.
- Parameters:
-
| IFXVector4 | Input IFXVector4 specifying the color of the light. Each channel of the light color is clamped to the range 0.0 - 1.0. |
- Returns:
- void
Implements IFXLightResource. |
| IFXRESULT CIFXLightResource::SetIntensity |
( |
F32 |
fIn |
) |
[virtual] |
|
|
|
Sets the intensity of the light.
This intensity is basically multiplied into the affect that this light has on a scene. It is similar in practice to 1/ConstantAttenuationFactor, but works on IFXLightResource::DIRECTIONAL lights in addition to point and spot lights (this does not affect lights with type IFXLightResource::AMBIENT). Keep in mind that this value can have any value (including negative and 0), resulting in the ability to produce some strange effects.
- Parameters:
-
| fIn | Input F32 value specifying the intensity of this light. |
- Returns:
- An IFXRESULT value.
- Return values:
-
Implements IFXLightResource. |
| void CIFXLightResource::SetSpotAngle |
( |
F32 |
fAngle |
) |
[virtual] |
|
|
|
Sets the spot angle for this light.
The spot angle is the angle of the cone that emanates from the light position and defines what portions of the scene is affected by this light (assuming it is of type IFXLightResource::SPOT).
- Parameters:
-
| fIn | Input F32 specifying the spot angle. This should be the full spot angle (from one side of the cone to the other). The range is 0.0 - 180.0, non-inclusive. |
- Returns:
- void
Implements IFXLightResource. |
| void IFXAPI CIFXLightResource::SetType |
( |
LightType |
type |
) |
[inline] |
|
Friends And Related Function Documentation
| IFXRESULT IFXAPI_CALLTYPE CIFXLightResource_Factory |
( |
IFXREFIID |
riid, |
|
|
void ** |
ppv |
|
) |
[friend] |
|
Member Data Documentation
© 1999 - 2006 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.
|
|


Click and drag to pan, scroll to zoom. Double click on a station to get started!
Won't work well on mobile :-(


p
businessLogic
package businessLogic
Type Members
- class AbsenceCounter extends Model
- class Doctor extends Employee
- class EmployeeGroup extends AnyRef
- class PersonDate extends Comparable[PersonDate]
- class PlanningUnitHelper extends AnyRef
- class ScheduleHelper extends AnyRef
- class SchedulingObject extends AnyRef
- class SchedulingPerson extends AnyRef


Rigidbody
Is a object add to world physics simulation.
Attribute is a object with this options
type
the type of shape 'box' 'sphere' 'cylinder' can be a array of shape for compound object
move
static od dynamic object
size
array of size of shape [ x, y, z ]
pos
array of position of shape [ x, y, z ]
rot
array of rotation in degree of shape [ x, y, z ]
density
density of the shape
friction
coefficient of friction of the shape
restitution
coefficient of restitution of the shape
belongsTo
bits of the collision groups to which the shape belongs
collidesWith
bits of the collision groups with which the shape collides
Functions
obj.remove()
remove object from World
obj.getPosition()
return vector of object position
obj.getQuaternion()
return quaternion of object rotation


 The fact is, you need to have an understanding of many properties before you can direct your elements like a theater producer ("places, everyone!"). One such property is the CSS Box Model.
Imagine that every element in your HTML file is surrounded by a shield. The shield has different layers, and its purpose is to prevent other elements from coming too close (hey, that analogy almost worked).
I'm going to disregard analogies and show a visual instead:
The 'Content' box that you see in the middle of the diagram is the bulk of your element. It could be the photo in an [img] tag, the text in a [p] tag--doesn't matter. Every element is a box, and each box has three layers that surround the content: padding, border, and margin.
We're probably all familiar with borders. Common places you might spot a border: a table data cell, a coupon in the newspaper, your best friend's instagram (not yours--borders are so 2013). So a border is a line of some sort (solid, dashed, dotted) that surrounds your content.
Padding is the space between your content and the border. It's empty space, but it inherits the properties of the element. So if the element has a background color of black, the padding will appear black as well.
In the images above, I've changed the padding from 10px to 50px. See how the space between the words (the content of the table data cell) and the cell border has enlarged? Remember, padding is the space between the content and the border.
Here's another instance of padding at work:
In the above example, I'm experimenting with my site's navigation bar. At first, I had too much padding between links. Then, too little. Sometimes it takes some trial-and-error to figure out the ideal settings for padding and margin. But as you can see in the third navigation bar, it pays off in the end!
So padding is interior, margin must be exterior, right? Indeed, margin is the space between the border and the outer edge of your element. It is transparent and will appear as white space.
Padding, border, and margin can all be set with CSS. You can define each side (top, bottom, left, right) individually, or you can make all sides equal by defining just one value, like so: "margin: 10px."
Manipulating the padding and margin of an element allows you to adjust your element's appearance and placement on the page. If you want to shift an element to the right, try increasing the margin-left. If you'd like more space above an element, try adjusting the padding-top.
Chrome Dev Tools gives us a handy visual by depicting what properties are currently affecting our element. Here, I've selected my first td (table data) cell. The content (the word 'Blue') is shown in the corner in blue. The green box surrounding it shows us that we have 50px of padding on each side. We can also see the cell border of 1px on each side. And this element has no margin set, or we would see an orange box surrounding the yellow border box.
If you found this topic less thrilling than the latest John Grishham novel, that's understandable. But when you're building your site and you finally set your margin and padding correctly and your element pops into place, well that's the stuff of dreams. Good luck outfoxing that box!


{include file="Public:header" /}
{include file="Public:nav" /}
{if condition="config('site.use_cover') eq '1'"}
{/if}
{include file="Public:footer" /}


"Social networking is the same thing we’ve been doing for more than a century here at Western: engaging with our communities."—Western Social Media Guidelines
But what about...
your users with visual disabilities?
your users in a noisy restaurant, trying to share a video with friends?
your users with cognitive, learning, or reading disabilities?
What Makes Good Alt Text?
Generally speaking:
Alt text succinctly describes what is happening in the image
If it's an image of text, place the image text in the alt text
Most important information is at the beginning of alt text
Facebook and Twitter have supported alt text for a while. Now Instagram does too! 👍
Adding Alt Text
Facebook
Click Photo/Video at the top of your News Feed.
Select the photo you want to add.
Click Edit Photo, then click Alt Text.
The automatically generated text will be shown on the left side of your photo. Click Override generated alt text to edit it.
Write your alt text in the box. To change back to the automatically generated text, click Clear.
To save your alt text, click Save in the bottom right.
Twitter
Click on the Tweet compose button, or press the “n” key to use the keyboard shortcut.
Attach your photo(s).
To insert descriptive text, open the thumbnail preview dialog by clicking on the thumbnail.
Type your description of the image and click the Apply button. To edit the description, re-open the thumbnail preview dialog prior to posting the Tweet. (The limit is 420 characters.)
You can add a description to each image in a Tweet.
Note: Image descriptions cannot be added to GIFs or videos.
Instagram
Start by taking a photo or uploading an existing photo to Instagram.
Choose a filter and edit the image, then tap Next.
Tap Advanced Settings at the bottom of the screen.
Tap Write Alt Text.
Write your alt text in the box and tap Done (iOS) or Save (Android).


Kate Ernst
University of Michigan - Iowa Native
Spring/Fall lover
"Lake > Ocean"
Coffee.
Runner
"Eat cake for breakfast"
\
Jazz


Language Mappings preferences
Use the Language Mappings preference panel to customize the use of C/C++ language associations for the workspace.
| Option | Description |
|---|---|
| Content Type | The content type associated with the language. |
| Language | The language associated with the content type. |
| Add... | Click to show the Add Mapping dialog where you define the content type and language associated with it. |
| Remove | Click to remove the selected language mapping. |
- Project Properties, C/C++ General category
- File Properties, C/C++ General category


Christos Dimitroulis
Theophanes E. Raptis
Vasilios E. Raptis
The POLYANA team
<EMAIL_ADDRESS>Version : 2.0.1
Release date : April 23rd, 2019
Web site : http://cag.dat.demokritos.gr/Software.mol.php
This file contains information about 'POLYANA', a program that reads output created by DL_POLY Molecular Dynamics suite ('Classic' version) [1] and returns radial distribution functions for centres of mass of groups of atoms or whole molecules. It has been designed with simplicity of use in mind: just press Enter and the program will read DL_POLY input and output files (CONTROL, FIELD and HISTORY) figure out what species are there in the simulation box and compute all radial distribution functions for pairs of like and unlike molecular species. Also, the advanced user will be happy to find that POLYANA's functions can be controlled and enhanced with the aid of simple directives placed at the end of DL_POLY's CONTROL file.
POLYANA is suitable for systems of 'small' molecules or groups of atoms, i.e. such that their size doesn't exceed half the shortest simulation cell dimension. However, POLYANA is expected to work correctly even for large branched species or star-like polymers and the like, provided the simulation cell is much larger than the molecules' or groups' dimensions - the only case one would be really interested in g(r) of such large species. Indeed, tests carried out with the aid of companion utility verify_unfold.f90 as described in the relevant README file, show that POLYANA can treat arbitrary topologies.
In a nutshell:
Calculations not restricted to molecular centres of mass, but also extending to user-defined groups of atoms.
Radial distribution functions calculated over distances well beyond half the simulation cell length.
Stream processing or 'on the fly' mode.
OpenMP parallelism.
Minor bugfixes and improved input facility1.
POLYANA's last version [2] was mainly intended for radial distribution functions of molecular centres of mass. However, it was possible to 'hack' POLYANA by appropriately editing the atoms definitions in the DL_POLY's FIELD file to mask certain atom types and compute g(r)'s for groups of atoms rather than whole molecules. The current version [3] provides an explicit mechanism to let users define groups of atoms by inserting a definition with the appropriate syntax in FIELD and a novel directive (group) in CONTROL file; DL_POLY will simply ignore any such definition in FIELD. As regards the distance over which radial distribution functions extend, POLYANA relies on an observation by Theodorou and Suter [4] so as to extend the calculation beyond half the shortest simulation cell length by computing the correct differential volume with distance. As a means of tighter integration with DL_POLY, POLYANA can be combined with it in the style of Unix pipes to allow 'on the fly' processing of MD trajectories (to do this, DL_POLY has to be minimally modified and rebuilt so that it redirects trajectory data to standard output instead of writing a HISTORY file). Finally, POLYANA allows multithreaded (OpenMP) parallel execution. Users can compare time measurement displayed with the end of the calculations to check performance with number of threads.
The below list (as well as most part of this document) is relevant to UNIX/Linux systems, but it should be fairly easy to port the project to other environments; to build and run POLYANA, one needs:
gfortran or other modern Fortran compiler (please, edit Makefile as needed). If your compiler does not comply with Fortran2003 standard, use alternative option indicated in the Makefile.
make; POLYANA is a small project and one can try and compile the source code manually. If make is available, it will just make your life a little easier.
Since this is a post-processing tool, DL_POLY itself is not needed to build POLYANA unless you want to run the tests - see Section 2. Of course, you need DL_POLY output files to process!
bash shell; the bash scripts in test directory have worked on various Linux platforms.The Fortran code itself should compile and run on any platform with an appropriate compiler.
Finally, the rdfplot companion script calls gnuplot to plot output files. This is not a strict requirement; POLYANA output is very simple so users can employ their favourite software to generate r.d.f. graphs.
This is straightforward. Just type
make
and press Enter. An executable called polyana will be generated in the bin subdirectory of the project folder; you can move it to any location specified in your $PATH environment variable. To build POLYANA and run the tests in test subfolder, type:
make test
This will copy the executable to the test directory and launch a script therein. It is assumed that DL_POLY's executable is DLPOLY.X, as defined in its own Makefile - otherwise, one has to edit run script in test directory. You can also run 'make', do whatever you want and run 'make test' later. Read more about the tests in Section 6 of this file.
NOTE: it is assumed that the name of DL_POLY's executable is DLPOLY.X as defined in the Makefile of its distribution.
As mentioned in Section 1, the simplest way to run the tests is by running 'make test'. Normally, POLYANA prints some messages on the screen. During the tests, POLYANA will run in the background and all its messages will be redirected to a file named 'polyana.out', in each test subdirectory. The g(r) output, of course, will be found in the corresponding RDF files (see next Section).
Alternatively, you can go to the test directory and launch the run script from there, assuming POLYANA executable is already therein (and DL_POLY is installed in your system!), so if you haven't yet, copy POLYANA to test now. To run the run script you must supply some arguments. Here is how:
./run [no arguments]
or
./run h
or
./run -h ........... will display a help screen and exit
./run md ........... will run DL_POLY from the beginning in each
test subdirectory, after deleting whatever
dl_poly output files already present.
./run polyana ....... will run polyana from the beginning in each
test subdirectory, after deleting whatever
polyana output already there. If no DL_POLY
output to process can be found in a certain
subdirectory, the script will print a messag
e and continue with the next subdirectory.
./run md polyana
or
./run polyana md .... will run DL_POLY and then, polyana in each
test subdirectory. This is the option invoke
d when running 'make test'.
The last -and most obvious- choice is to change to any test subdirectory and run DL_POLY and POLYANA 'manually'.
Finally, to 'clean' the test subdirs i.e. remove all DL_POLY and POLYANA output, just run the clean script (after chmod-ing to executable) from the test dir. This is also invoked when you run 'make clean' from the source directory.
To calculate molecular radial distribution functions, just run the executable in the directory of your MD run and the program will read FIELD to figure out what molecules are there in the system; CONFIG to retrieve the periodic boundary conditions key (if this is missing from the trajectory); and HISTORY to analyse the trajectory. With the end of processing, two files named RDF (not to confuse with DL_POLY's RDFDAT!) and POP, will be created.
In RDF, the centre-of-mass radial distribution functions are given for all types of molecules, numbered 1, 2, 3, ... according to the order they appear in FIELD. E.g, if water and ethanol molecules appear in FIELD in that order, then 1=water, 2=ethanol, and the columns 1-1, 2-2 and 1-2 for the respective g(r) functions will be printed in RDF. The default values of 0.1 Angstroem and 12.5 Angstroem will be used for the pair distance bin and maximum distance, respectively - see next Section on how to change these values.
In POP (standing for 'populations'), the number of type 'b' molecules around the average type 'a' molecule with distance, will be given in a similar arrangement as the columns in RDF. These numbers can also be obtained by integrating radial distribution functions - actually, rho*dV*g(r) - with distance. However, we don't have to carry out the integration; POLYANA will do it for us. Unlike RDF, columns ab and ba of POP are not equivalent. Therefore, in the case of a binary mixture, columns 1-1, 2-2, 1-2 and 2-1 can be found in the respective POP file.
Please, note that POLYANA will process the trajectory even if the simulation has not been completed - in that case a message will be emitted with the end of the computation letting us know that the trajectory file was found to be abnormally terminated - this would not prevent POLYANA from computing and printing results in RDF and POP. This is an attractive feature in that it allows users to look at the structure of their systems without waiting for the simulation to be over.
Another sign of POLYANA's robustness is the way it handles input files. To read periodic boundary conditions, POLYANA will look for HISTORY's appropriate header line. If that line is missing, POLYANA will not complaint; it will look for the PBC code in CONFIG. In the improbable case that CONFIG too is missing, POLYANA will set periodic conditions to parallelepiped, a quite common and generic type of simulated periodic systems, and will print a message letting the user know of the situation and how periodic conditions can be redefined as desired. But how can the user do that? Time to read the next section.
POLYANA can read directives placed in CONTROL file, after the 'finish' DL_POLY directive, to control its execution and benefit from more of its capabilities. All POLYANA directives are listed below in alphabetical order:
Directive | Description
--- | ---
dr *d* | Distance bin for the histograms in g(r) calculations
end polyana | Marks the end of a section of POLYANA directives
every *n* | Calculate every n-th step (time saver for long trajectories)
group [total] | Compute g(r) for user-defined groups rather than molecules
omp *n* | Sets the number of OpenMP threads
pbc *n* | Sets periodic boundary conditions to one of the following:
0 | no pbc's
1 | cubic
2 | orthorhombic
3 | parallelepiped
6 | slab
polyana | Marks the beginning of section containing POLYANA directives
rmax *r* | Maximum distance for g(r) calculations
smooth | Smooth g(r) as in Allen & Tildesley, 1989, pp. 203-204 [5]
start *n* | Skip steps 1 to n-1 and process from n-th and beyond
stop *n* | Skip (don't process) configurations beyond the n-th
threads *n* | A synonym for 'omp'
total | Optional argument of *group* to include intramolecular pairs
width | A synonym for 'dr'
Launching the every n command will cause POLYANA to compute pair distances and update histograms for every n-th configuration only. This can be helpful when processing very long trajectories. The pbc directive, on the other hand, can be of use when both HISTORY's header and the CONFIG file are missing; otherwise it will be overriden by the pbc key therein - the key with higher precedence being the one in the HISTORY file.
POLYANA directives are case insensitive: start, START and Start are equivalent. Any number of spaces can be inserted before a directive or between a directive keyword and its numerical argument. The polyana and end polyana lines must exist and enclose the other lines if directives are to be used. If some or all directives are missing (see: 'run the simple way', Section 2) the default values will be used instead; same goes for missing directive arguments (all of them are optional). All default values are summarised below:
Directive | Default value
--- | ---
dr | 0.1 [Angstroems]
every | 1
group | .FALSE.
omp | system-dependent
pbc | NOTHING (a value that is unrelated to any PBC code number)
rmax | computed automatically based on cell dimensions
smooth | .FALSE.
start | 1
stop | HUGE(integer) (exceeding any reasonable nr of steps)
total | .FALSE.
Finally, directives can be 'commented out' using the hash (#) character.
The maximum distance, r_max, is not assigned a default value. Instead, it is calculated automatically based on the simulation cell size. In the general case of a parallelepiped cell, this is done as follows: If c1, c2 and c3 are the three cell vectors, then, three heights can be defined like so:
h_i = | c_i . (c_j x c_k) / || c_j x c_k || |
where indices i, j and k denote circular shifts of {1, 2, 3}. Then, the maximum distance is defined as
r_max = 0.5*min{h_1, h_2, h_3}
In the case of cubic simulation cells, the above expression reduces to half the cell size. However, in the particular case of cubic periodic conditions, POLYANA will extend by default the range of g(r) to L*sqrt(3)/2, L being the cell size; of course this can be overriden with the aid of the rmax directive. The user is referred to the previously cited paper of Theodorou and Suter for a thorough and in depth discussion of the topic.
POLYANA reads the first cell in the trajectory file, computes the number of bins by dividing the above computed rmax by the bin width and allocates memory to the histogram arrays used in RDF calculations. If the trajectory was computed in the NPT ensemble where the simulation varies with time POLYANA will keep reading all subsequent cell vectors and with each new step, r-max will be updated as the minimum of its current and new value ( thus discarding a few elements at the end of the histogram arrays).
Suppose we ran a MD simulation and saved 6000 configurations. Of them, the first 1000 steps form the equilibration stage so we won't process them. Also, the last 1000 will not be processed, for whatever reason. Our g(r) will be computed for distances up to 10 Angstroems and the bin to be used will equal 0.25 Angs. Then, the POLYANA section in the CONTROL file should look like this:
...
[various DL_POLY directives]
...
finish [end of DL_POLY section]
polyana
start 1001
stop 5000
rmax 10.0
dr 0.25
end polyana
Indentation as above is not compulsory; it is used for the sake of readability.
Often we are interested in looking at specific groups of atoms rather than whole molecules. Suppose, for instance, we have simulated a system of water mixed with n-butanol, using suitable united-atom models. Then, we would like to look at the way water molecules are arranged around the hydroxyl group and alkyl tail of the alcohol. To address problems of this kind, we have to do the following:
Add group directive in polyana ... end polyana section of CONTROL file.
Optionally, add total directive to take intramolecular pairs into account; otherwise, results will reflect only intermolecular group-group interactions.
Add group definitions in the ATOM directives of FIELD file that correspond to the molecules to be broken down into groups.
Group definitions obey the following general syntax:
(...(char int int) [...(char int int)] int ) [(...)]
where outter square brackets, [...], indicate optional arguments. In particular, a molecule is divided into groups, defined like so:
(grouptype nat nrep)
where grouptype is an 8-character string, nat is the number of atoms in the group and nrep is the number of times the group is repeated along the array of the atoms that comprise the molecule.
Groups of different types can be grouped themselves to form larger 'supergroups' which can be repeated many times, as for instance in the case of co-polymers. Then, definitions are enclosed in parentheses with the number each 'supergroup' is repeated, placed at the end, such as:
( (A 3 1) (B 2 1) 100)
This pattern can be applied recursively to define large structures of arbitrary complexity. Group definitions are placed in the ATOM directives of corresponding molecular types in FIELD file, after the number of atoms, like this:
ATOMS int group-definitions
If a molecule is to be divided into groups, these must be defined such that all atoms belong to one of the groups and the sum of atoms in all repeated groups be equal to the argument of the ATOM keyword.
It is reminded that group directive should also be inserted in CONTROL for the above definitions to take effect, otherwise they will be ignored so POLYANA will fall back to its default behaviour and calculate molecular functions. Lastly, it is noted that group admits an optional argument, namely total, to modify its function. Without it, intermolecular radial distribution functions are computed; otherwise, all group pairs, whether intra- or intermolecular, will be taken into account. In the latter case, bonded pairs will give rise to sharp peaks typical of bonds, bond angles and dihedral angles - if they exist. This is not the case with DL_POLY which excludes bonded atom-atom pairs from similar calculations in its RDFDAT output files.
United-atom n-hexane as a trimer:
ATOMS 6 (terminal 2 1) (midsegm 2 1) (terminal 2 1)
United-atom n-hexane as a dimer:
ATOMS 6 (bead 3 1) (bead 3 1)
or
ATOMS 6 (bead 3 2)
United-atom n-dodecane as a tetramer:
ATOMS 12 (bead 3 4)
Copolymer A-(B2C3)100-A where consecutive Bs form a bead and Cs form another:
ATOMS 502 (A 1 1) ((B 2 1) (C 3 1) 100) (A 1 1)
Finally, we note that when nrep equals one, it can be omitted altogether; then the relevant above examples can be rewritten as follows:
1. ATOMS 6 (terminal 2) (midsegm 2) (terminal 2)
2. ATOMS 6 (bead 3) (bead 3)
4. ATOMS 502 (A 1) ((B 2) (C 3) 100) (A 1)
Let's take a real-life example and assume we are using the well-known TraPPE [6] and SPC/E [7] force fields to model a n-butanol-1/water system so the FIELD file looks more or less like this:
...
MOLECULES 2
Butanol
NUMMOLS ...
ATOMS 6
CH3H 15.0344 0.0000 1
CH2B 14.0336 0.0000 1
CH2B 14.0336 0.0000 1
CH2A 14.0336 0.2650 1
OC 15.9996 -0.7000 1
HC 1.0008 0.4350 1
...
...
FINISH
SPCE Water
NUMMOLS ...
ATOMS 3
OW 15.9996 -0.8476
HW 1.0080 0.4238
HW 1.0080 0.4238
CONSTRAINTS 3
1 2 1.0000
1 3 1.0000
2 3 1.63298
FINISH
Now, suppose we want to compute g(r) for water and butanol's hydroxyl group and alkyl tail. Then, the relevant ATOM records will be modified as follows:
Butanol
NUMMOLS ...
ATOMS 6 (alkyl 4) (hydroxyl 2)
...
...
FINISH
SPCE Water
NUMMOLS ...
ATOMS 3 (water 3)
...
...
FINISH
where we are allowed to ommit nrep because it equals 1 in all cases. Note also that since POLYANA computes molecular functions by default and water is taken as single entity, the corresponding group definition, (water 3), is redundant. Once again, it is reminded that the group directive should be present in CONTROL or the group definitions will be ignored.
The above method works fine when atom types are arranged in FIELD such that user can readily group them into successive subunits of interest. However, some cases (e.g. complex molecular topologies or other restrictions) may require atom lines of the same subunit of interest to be placed far apart from each other in FIELD. Then, our explicit declaration scheme does not work and we have to resort to the the 'hacking' strategy employed with the previous POLYANA version. Let's outline the procedure using the last above presented example. To calculate the hydroxyl- water g(r) we rewrite the butanol lines as follows:
CH3H 0.0 0.0000 1
CH2B 0.0 0.0000 1
CH2B 0.0 0.0000 1
CH2A 0.0 0.2650 1
OC 15.9996 -0.7000 1
HC 1.0008 0.4350 1
Likewise, to calculate g(r) and density profile for the alkyl tail, we rewrite:
CH3H 15.0344 0.0000 1
CH2B 14.0336 0.0000 1
CH2B 14.0336 0.0000 1
CH2A 14.0336 0.2650 1
OC 0.0 -0.7000 1
HC 0.0 0.4350 1
Of note, this trick calculates inter-molecular radial distribution functions of user-defined groups while results obtained by group combined with total argument, include all such pairs in the system. For a thorough discussion on the topic, the reader is referred to our first publication introducing POLYANA (see references, Section 10). As another example, assuming that we look at geometric centres rather than centres of mass of the molecules, we simply set atom masses equal to one and the same value for all atom types.
DL_POLY computes atomistic radial distribution functions during MD simulations. It is tempting to render POLYANA capable of exchanging information with DL_POLY 'on the fly' and computing molecular (or atom group) r.d.f.'s during simulations instead of waiting for them to be over. A solution in the form of Unix pipes has been implemented to this purpose; to make it work, a few minor modifications are required, namely:
DL_POLY: replace HISTORY file by standard output and rebuild.
POLYANA: edit Makefile to include the -DSTREAMS compiler option and rebuild.
In this way, DL_POLY will send all trajectory records to standard output while POLYANA will be reading from standard input and stream again to standard output; thus, the two applications can be combined as follows:
DL_POLY.X | polyana > HISTORY
Apart from obtaining post-processing results immediately, this solution can also be of great convenience when disk space restrictions are very tight, by allowing direct compression of the trajectory:
DL_POLY.X | polyana | gzip -c > HISTORY.gz
Of note, when in stream mode, all POLYANA messages otherwise appearing onscreen, are now redirected to a file named STDOUT.
The required modifications are very easy to implement:
In file setup_module.f we set parameter nrite from 6 to some other value not associated with another file unit, e.g.
C integer, parameter :: nrite = 6
integer, parameter :: nrite = 11
Then, we set parameter nhist to 6:
C integer, parameter :: nhist = 21
integer, parameter :: nhist = 6
In files traject.f and traject_u.f we comment out the statements that open and close the HISTORY file:
...
C open(nhist,file='HISTORY',position='append')
or
C open(nhist,file='HISTORY',form='unformatted',position='append')
...
C close (nhist)
...
Then, we rebuild DL_POLY. The new executable should be printing HISTORY records to the screen. If it doesn't work as expected, try make clean and rebuild.
The source code has been extended to be able to read HISTORY records in the form of incoming byte streams. All we have to do is edit the compiler options record in Makefile to include the appropriate preprocessor flag,
#options =-cpp -fopenmp -fbounds-check
options =-cpp -fopenmp -fbounds-check -DSTREAMS
and recompile. The new executable should be reading HISTORY records piped to it and print them to screen. If it doesn't, then try make clean and rebuild.
RDF files are easy to plot. To facilitate this task even further, a bash script is provided, which generates a gnuplot script automatically and then, launches gnuplot to run that script and plot the RDF file. The 'rdfplot' script takes two command-line arguments: the number of RDF column pertaining to the species pair of interest, and an upper bound to the y-axis range. Thus:
./rdfplot 2 1.5
means that the second column of RDF (pertinent to the first pair of species) is to be plotted with respect to distance (first column) and the y-scale will range from 0 to 1.5. Of course, the generated gnuplot script, rdfplot.gp, can be modi- fied by the users as they see fit.
Apart from the above presented functionality, many new features are coming with future versions. Some of them have already been implemented and are being tested for bugs, efficiency and so on, while others have been designed and soon will be added to POLYANA's quiver. The most important new functions include
Mean Square Displacement (MSD). Once molecular or group positions are known, it is trivial to use them in calculating MSD.
Reorientation dynamics of groups and molecules. When computing pair distances to determine the corresponding r.d.f.'s, we store group-group vectors at each time step. These can serve to compute time-average 1st and 2nd-order Legendre polynomials, P1(t; cos a), P2(t; cos a), where a denotes the angle formed by instances of such a vector at time steps t0 and t0+t. These results can be linked to data from spectroscopy.
In a similar vein, we can read atom velocities from HISTORY, calculate group or molecular velocities and compute their autocorrelation functions.
Potentials of Mean Force. Molecular radial distribution functions can be used to define free energy difference, A-A0=-kB*T*ln g(r), where kB and T denote Boltzmann's constant and temperature, respectively. Such an expression can be stored in the style of DL_POLY's TABLE files and serve as pair potential in coarse-grain simulations. This is currently tested for molecules; group-group interactions require also bonded potentials that are not in place yet.
Extend group syntax so it can handle system definitions in which records of atoms to group together in FIELD, are not consecutive. This feature is a work in progress.
Polyana is a program for computing molecular pair distribution functions.
Please refer to our most recent publication, number 3 in previous section.
Copyright (c) 2015-2019 Vasilios E. Raptis<EMAIL_ADDRESS>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The source code for this program can also be downloaded from here:
http://cag.dat.demokritos.gr/Software.mol.php
Having problems or questions about this program? You are welcome to contact us:
The POLYANA team
<EMAIL_ADDRESS>1 Bugfixes:
Unlike RDF, columns a-b and b-a in POP file are not equivalent; both of them are printed now.
Issue concerning occasional crashes when reading FIELD file, has been fixed; subsequent modifications ensured and tests verified robust performance when reading input files and resilience in cases of missing files or data.
With every n directives, n must be taken into account when averaging the histograms and cell volume.


fun createAlphaAnimation(durationAnim: Long = DURATION_ANIM_DEFAULT): Animation
Makes an alpha animation form 0 to 1.


Check String
String contains the word hackerrank if a subsequence of its characters spell the word hackerrank
Add the number of queries that is checking for hackerrank.
Add a num of strings split by comma
Example: String1,String2
Results


It’s been revealed that 42-year-old Luyanda Botha entered into a plea and sentencing agreement.
In August, he lured the 19-year-old UCT student to the Clareinch Post Office, where he raped her and bludgeoned her to death.
He then hid her body in a safe and the next day tried to dispose of it in Khayelitsha.
The prosecution said the deceased’s family had been consulted.


Coursefork lets educators stop starting from scratch and build better courses together.
The power of open source has revolutionized software
It’s let us build Coursefork in less than 54 hours, using the best work of others
There’s an explosion of free content
Yet it’s harder than ever to find and collaborate on course materials
We have some of the best educators in the world
How could there be problems in education?
Problems with content:
Problems with community:
Integrated Community, making
Visible Contritbutions to
Interactive Content
We are not a media company
We are open source education
We sell services to our users
Think Red Hat, Wordpress, and GitHub
What happens if we succeed?
Let’s stop starting from scratch and build the world’s best courses, together


Tests the AdcC subsystem and switches on leds 0, 1 and 2
if the test is successful:
LED0 denotes a successful Read operation,
LED1 denotes a successful ReadNow operation,
LED2 denotes a successful ReadStream operation.
Requires a platform-specific DemoSensorC component that provides
Read


conformalCf.Rd
conformalCf
computes intervals for counterfactuals or outcomes with ignorable missing values in general.
It supports both split conformal inference and CV+,
including weighted Jackknife+ as a special case. For each type, it supports both conformalized
quantile regression (CQR) and standard conformal inference based on conditional mean regression.
conformalCf( X, Y, estimand = c("unconditional", "nonmissing", "missing"), type = c("CQR", "mean"), side = c("two", "above", "below"), quantiles = NULL, outfun = NULL, outparams = list(), psfun = NULL, psparams = list(), useCV = FALSE, trainprop = 0.75, nfolds = 10 )
| X | covariates. |
|---|---|
| Y | outcome vector with missing values encoded as NA. See Details |
| estimand | a string that takes values in {"unconditional", "nonmissing", "missing"}. See Details. |
| type | a string that takes values in {"CQR", "mean"}. |
| side | a string that takes values in {"two", "above", "below"}. See Details. |
| quantiles | a scalar or a vector of length 2 depending on |
| outfun | a function that models the conditional mean or quantiles, or a valid string.
The default is random forest when |
| outparams | a list of other parameters to be passed into |
| psfun | a function that models the missing mechanism (probability of missing given X), or a valid string. The default is "Boosting". See Details. |
| psparams | a list of other parameters to be passed into |
| useCV | FALSE for split conformal inference and TRUE for CV+. |
| trainprop | proportion of units for training |
| nfolds | number of folds. The default is 10. Used only when |
a conformalSplit
object when useCV = FALSE
or a conformalCV
object
The outcome Y
must comprise both observed values and missing values encoded as NA.
The missing values are used to estimate the propensity score \(P(missing | X)\).
estimand
controls the type of coverage to be guaranteed:
(Default) when estimand = "unconditional"
, the interval has
\(P(Y \in \hat{C}(X))\ge 1 - \alpha\).
When estimand = "nonmissing"
, the interval has
\(P(Y \in \hat{C}(X) | nonmissing) \ge 1 - \alpha\).
When estimand = "missing"
, the interval has
\(P(Y \in \hat{C}(X) | missing) \ge 1 - \alpha\).
When side = "above"
,
intervals are of form [-Inf, a(x)] and when side = "below"
the intervals are of form [a(x), Inf].
outfun
can be a valid string, including
"RF" for random forest that predicts the conditional mean, a wrapper built on randomForest
package.
Used when type = "mean"
.
"quantRF" for quantile random forest that predicts the conditional quantiles, a wrapper built on
grf
package. Used when type = "CQR"
.
"Boosting" for gradient boosting that predicts the conditional mean, a wrapper built on gbm
package. Used when type = "mean"
.
"quantBoosting" for quantile gradient boosting that predicts the conditional quantiles, a wrapper built on
gbm
package. Used when type = "CQR"
.
"BART" for gradient boosting that predicts the conditional mean, a wrapper built on bartMachine
package. Used when type = "mean"
.
"quantBART" for quantile gradient boosting that predicts the conditional quantiles, a wrapper built on
bartMachine
package. Used when type = "CQR"
.
or a function object whose input must include, but not limited to
Y
for outcome in the training data.
X
for covariates in the training data.
Xtest
for covariates in the testing data.
When type = "CQR"
, outfun
should also include an argument quantiles
that is either
a vector of length 2 or a scalar, depending on the argument side
. The output of outfun
must be a matrix with two columns giving the conditional quantile estimates when quantiles
is
a vector of length 2; otherwise, it must be a vector giving the conditional quantile estimate or
conditional mean estimate. Other optional arguments can be passed into outfun
through outparams
.
psfun
can be a valid string, including
"RF" for random forest that predicts the propensity score, a wrapper built on randomForest
package.
Used when type = "mean"
.
"Boosting" for gradient boosting that predicts the propensity score, a wrapper built on gbm
package. Used when type = "mean"
.
or a function object whose input must include, but not limited to
Y
for treatment assignment, a binary vector, in the training data.
X
for covariates in the training data.
Xtest
for covariates in the testing data.
The output of psfun
must be a vector of predicted probabilities. Other optional arguments
can be passed into psfun
through psparams
.
# Generate data from a linear model set.seed(1) n <- 1000 d <- 5 X <- matrix(rnorm(n * d), nrow = n) beta <- rep(1, 5) Y <- X %*% beta + rnorm(n) # Generate missing indicators missing_prob <- pnorm(X[, 1]) if_missing <- missing_prob < runif(n) Y[if_missing] <- NA # Generate testing data ntest <- 5 Xtest <- matrix(rnorm(ntest * d), nrow = ntest) # Run weighted split CQR obj <- conformalCf(X, Y, type = "CQR", quantiles = c(0.05, 0.95), outfun = "quantRF", useCV = FALSE) predict(obj, Xtest, alpha = 0.1)#> lower upper #> 1 -2.657844 3.050423 #> 2 -2.201106 2.646749 #> 3 -4.424515 1.666813 #> 4 -5.015666 3.483242 #> 5 -3.036140 2.662865# Run weighted standard conformal inference obj <- conformalCf(X, Y, type = "mean", outfun = "RF", useCV = FALSE) predict(obj, Xtest, alpha = 0.1)#> lower upper #> 1 -2.969276 3.0286573 #> 2 -3.514796 2.5658039 #> 3 -6.222481 -0.2245474 #> 4 -4.680464 2.0538438 #> 5 -2.977028 3.0209053# Run one-sided weighted split CQR obj1 <- conformalCf(X, Y, type = "CQR", side = "above", quantiles = 0.95, outfun = "quantRF", useCV = FALSE) predict(obj1, Xtest, alpha = 0.1)#> lower upper #> 1 -Inf 2.89202179 #> 2 -Inf 0.93824597 #> 3 -Inf -0.07638999 #> 4 -Inf 3.65410447 #> 5 -Inf 1.82761777obj2 <- conformalCf(X, Y, type = "CQR", side = "below", quantiles = 0.05, outfun = "quantRF", useCV = FALSE) predict(obj2, Xtest, alpha = 0.1)#> lower upper #> 1 -2.760589 Inf #> 2 -2.435176 Inf #> 3 -4.556369 Inf #> 4 -5.193023 Inf #> 5 -3.237160 Inf# Run split CQR with a self-defined quantile random forest # Y, X, Xtest, quantiles should be included in the inputs quantRF <- function(Y, X, Xtest, quantiles, ...){ fit <- grf::quantile_forest(X, Y, quantiles = quantiles, ...) res <- predict(fit, Xtest, quantiles = quantiles) if (length(quantiles) == 1){ res <- as.numeric(res) } else { res <- as.matrix(res) } return(res) } obj <- conformalCf(X, Y, type = "CQR", quantiles = c(0.05, 0.95), outfun = quantRF, useCV = FALSE) predict(obj, Xtest, alpha = 0.1)#> lower upper #> 1 -2.933801 3.744921 #> 2 -2.503318 3.392504 #> 3 -5.057830 1.810812 #> 4 -5.139993 3.888209 #> 5 -3.358752 3.014875# Run standard split conformal inference with a self-defined linear regression # Y, X, Xtest should be included in the inputs linearReg <- function(Y, X, Xtest){ X <- as.data.frame(X) Xtest <- as.data.frame(Xtest) data <- data.frame(Y = Y, X) fit <- lm(Y ~ ., data = data) as.numeric(predict(fit, Xtest)) } obj <- conformalCf(X, Y, type = "mean", outfun = linearReg, useCV = FALSE) predict(obj, Xtest, alpha = 0.1)#> lower upper #> 1 -1.938254 1.423229284 #> 2 -3.364401 -0.002917861 #> 3 -5.062471 -1.700988223 #> 4 -4.496047 -0.252405212 #> 5 -2.176729 1.184753688# Run split CQR with a built-in psfun # Y, X, Xtest, should be included in the inputs obj <- conformalCf(X, Y, type = "CQR", quantiles = c(0.05, 0.95), outfun = "quantRF", psfun = "RF", useCV = FALSE) predict(obj, Xtest, alpha = 0.1)#> lower upper #> 1 -2.574942 3.371056 #> 2 -2.839526 3.122666 #> 3 -4.637289 1.771797 #> 4 -5.313703 3.972584 #> 5 -3.279433 2.969327# Run split CQR with a self-defined function to estimate propensity scores # Y, X, Xtest, should be included in the inputs logitReg <- function(Y, X, Xtest, ...){ X <- as.data.frame(X) Xtest <- as.data.frame(Xtest) data <- data.frame(Y = Y, X) fit <- glm(Y ~ ., data = data, family = "binomial", ...) as.numeric(predict(fit, Xtest, type = "response")) } obj <- conformalCf(X, Y, type = "CQR", quantiles = c(0.05, 0.95), outfun = "quantRF", psfun = logitReg, useCV = FALSE) predict(obj, Xtest, alpha = 0.1)#> lower upper #> 1 -2.012278 2.915242 #> 2 -2.065410 2.337912 #> 3 -4.566223 1.319205 #> 4 -5.281392 2.769533 #> 5 -3.070178 2.114240


In Video: Trailer of ‘Inside Edge 2’ on Amazon Prime Video
by Raj BaddhanAmazon Prime Video has released the trailer of its digital series ‘Inside Edge 2’.
The show is created by Karan Anshuman, directed by Aakash Bhatia, executive produced by Ritesh Sidhwani and Farhan Akhtar. It stars Vivek Oberoi, Richa Chadha, Siddhant Chaturvedi, Sayani Gupta, Angad Bedi, Tanuj Virwani , Sapna Pabbi, Aamir Bashir in leading roles.
All ten episodes of ‘Inside Edge 2’ will be available from 6th December 2019.


Lumos
Maxima
Dispel the Fog of Confusion
around Python Packaging
Python Packaging Authority
Python Packaging Authority
distutils
- The Good
- It's easy
- The Bad
- Monkey patching incompatibility
- The Ugly (Not actually bad stuff, just stuff to Ignore)
- distutils2 / packaging
- The New Hope
- distlib
setuptools
- The Good
- Cross platform dependencies
- The Bad
- easy_install messes with *.pth files
- The Ugly (Not actually bad stuff, just stuff to Ignore)
- setuptools2 / distribute
- The New Hope
- setuptools
- distribution metadata
- standardize version numbers
- standardize installation database
- distlib to simplify implementation


{% load registry_display %}
| Acceptance | Accepted |
| RSVP | {{ user.hacker.rsvp.going | print_boolean }} |
| Acceptance | Rejected |
| RSVP | N/A |
| Acceptance | Pending |
| RSVP | N/A |
| Why do you want to come to JacobsHack? | {{ user.hacker.application.whyJacobsHack|safe }} |
| Is JacobsHack! your first Hackathon? | {{ user.hacker.application.firstHackathon|print_boolean }} |
|
What projects have you worked on? What have you built? |
{{ user.hacker.application.whatHaveYouBuilt|safe }} |


{% extends "base.html" %} {% block content %}
Helping you meet and get to know the beautiful people at the Recurse Center
Let our patented alorithm™ match you for coffee, pairing, buddies, and more!
Sign Up!
`