For a discussion of Arnold's object-oriented system of pluggable nodes, please refer to AtNode API. More...
Data Structures | |
| struct | AtCommonMethods |
| Methods common to all nodes. More... | |
| struct | AtNodeMethods |
| Node methods. More... | |
| struct | AtMetaDataEntry |
| struct | AtNodeEntry |
| This represents a node type in Arnold. More... | |
Node Types | |
| #define | AI_NODE_UNDEFINED 0x0000 |
| Undefined type. | |
| #define | AI_NODE_OPTIONS 0x0001 |
| Options node (following the "singleton" pattern, there is only one options node) | |
| #define | AI_NODE_CAMERA 0x0002 |
Camera nodes (persp_camera , fisheye_camera , etc) | |
| #define | AI_NODE_LIGHT 0x0004 |
Light source nodes (spot_light , etc) | |
| #define | AI_NODE_SHAPE 0x0008 |
Geometry nodes (sphere , polymesh , etc) | |
| #define | AI_NODE_SHADER 0x0010 |
Shader nodes (lambert , etc) | |
| #define | AI_NODE_OVERRIDE 0x0020 |
EXPERIMENTAL: override nodes support "delayed parameter overrides" for procedural nodes. | |
| #define | AI_NODE_DRIVER 0x0040 |
Output driver nodes (driver_tiff , etc) | |
| #define | AI_NODE_FILTER 0x0080 |
Pixel sample filter nodes (box_filter , etc. | |
| #define | AI_NODE_ALL 0xFFFF |
| Bitmask including all node types, used by AiASSWrite() | |
AtNodeEntry Methods | |
| AI_API AI_DEPRECATED AI_PURE const AtNodeEntry * | AiNodeEntryLookUp (const char *name) |
| Look up a node entry from a name string. More... | |
| AI_API AI_PURE const AtNodeEntry * | AiNodeEntryLookUpAtString (const AtString name) |
| AI_PURE const AtNodeEntry * | AiNodeEntryLookUp (const AtString name) |
| AI_API AI_PURE const char * | AiNodeEntryGetName (const AtNodeEntry *nentry) |
| Return the name of the given AtNodeEntry. More... | |
| AI_API AI_PURE AtString | AiNodeEntryGetNameAtString (const AtNodeEntry *nentry) |
| Return the name of the given AtNodeEntry as an AtString. More... | |
| AI_API AI_PURE int | AiNodeEntryGetType (const AtNodeEntry *nentry) |
| Return the type of the given AtNodeEntry. More... | |
| AI_API AI_PURE const char * | AiNodeEntryGetTypeName (const AtNodeEntry *nentry) |
| Return the type of the given AtNodeEntry as a string. More... | |
| AI_API AI_PURE int | AiNodeEntryGetOutputType (const AtNodeEntry *nentry) |
| Return the output type of the given AtNodeEntry. More... | |
| AI_API AI_PURE const char * | AiNodeEntryGetFilename (const AtNodeEntry *nentry) |
| Return the filename (so/dll path) of an AtNodeEntry. More... | |
| AI_API AI_PURE const char * | AiNodeEntryGetVersion (const AtNodeEntry *nentry) |
| Return the version that this node was linked with. More... | |
| AI_API AI_PURE int | AiNodeEntryGetCount (const AtNodeEntry *nentry) |
| Return the number of instances of a particular node. More... | |
| AI_API AI_PURE int | AiNodeEntryGetNumParams (const AtNodeEntry *nentry) |
| Return the number of parameters of a given AtNodeEntry. More... | |
| AI_API AI_PURE const AtParamEntry * | AiNodeEntryGetParameter (const AtNodeEntry *nentry, int i) |
| Return the i'th parameter in an AtNodeEntry. More... | |
| AI_API AI_DEPRECATED AI_PURE const AtParamEntry * | AiNodeEntryLookUpParameter (const AtNodeEntry *nentry, const char *param) |
| Look up a parameter in a node entry from a name string. More... | |
| AI_API AI_PURE const AtParamEntry * | AiNodeEntryLookUpParameterAtString (const AtNodeEntry *nentry, const AtString param) |
| AI_PURE const AtParamEntry * | AiNodeEntryLookUpParameter (const AtNodeEntry *nentry, const AtString param) |
| AI_API AtParamIterator * | AiNodeEntryGetParamIterator (const AtNodeEntry *nentry) |
| Creates and returns a new AtParamIterator for this node entry. More... | |
| AI_API AtMetaDataIterator * | AiNodeEntryGetMetaDataIterator (const AtNodeEntry *nentry, const char *param=NULL) |
| Creates and returns a new AtMetaDataIterator for this node entry. More... | |
| AI_API void | AiNodeEntryInstall (int type, AtByte output_type, const char *name, const char *filename, AtNodeMethods *methods, const char *version) |
| Install a new node in the system. More... | |
| AI_API void | AiNodeEntryUninstall (const char *name) |
| Uninstall a node from the system. More... | |
AtParamIterator Methods | |
| AI_API void | AiParamIteratorDestroy (AtParamIterator *iter) |
| Destroys a param iterator when it is no longer needed. More... | |
| AI_API const AtParamEntry * | AiParamIteratorGetNext (AtParamIterator *iter) |
| Returns current param entry and points param iterator to the next one. More... | |
| AI_API bool | AiParamIteratorFinished (const AtParamIterator *iter) |
| Returns true if there are no more parameters to iterate over. More... | |
AtMetaDataIterator Methods | |
| AI_API void | AiMetaDataIteratorDestroy (AtMetaDataIterator *iter) |
| Destroys a metadata iterator when it is no longer needed. More... | |
| AI_API const AtMetaDataEntry * | AiMetaDataIteratorGetNext (AtMetaDataIterator *iter) |
| Returns current metadata entry and points metadata iterator to the next one. More... | |
| AI_API bool | AiMetaDataIteratorFinished (const AtMetaDataIterator *iter) |
| Returns true if there is no more metadata to iterate over. More... | |
For a discussion of Arnold's object-oriented system of pluggable nodes, please refer to AtNode API.
| AI_API AI_DEPRECATED AI_PURE const AtNodeEntry* AiNodeEntryLookUp | ( | const char * | name | ) |
Look up a node entry from a name string.
Search all installed node entries for a given node name. If found, return a pointer to the node entry.
| name | input node name (such as "lambert") |
| AI_API AI_PURE const char* AiNodeEntryGetName | ( | const AtNodeEntry * | nentry | ) |
Return the name of the given AtNodeEntry.
| nentry | input node entry |
| AI_API AI_PURE AtString AiNodeEntryGetNameAtString | ( | const AtNodeEntry * | nentry | ) |
Return the name of the given AtNodeEntry as an AtString.
| nentry | input node entry |
| AI_API AI_PURE int AiNodeEntryGetType | ( | const AtNodeEntry * | nentry | ) |
Return the type of the given AtNodeEntry.
| nentry | input node entry |
AI_NODE_SHADER
, etc), or 0 if nentry is NULL | AI_API AI_PURE const char* AiNodeEntryGetTypeName | ( | const AtNodeEntry * | nentry | ) |
Return the type of the given AtNodeEntry as a string.
For example, a node of type AI_NODE_LIGHT
would return "light"
| nentry | input node entry |
| AI_API AI_PURE int AiNodeEntryGetOutputType | ( | const AtNodeEntry * | nentry | ) |
Return the output type of the given AtNodeEntry.
| nentry | input node entry |
AI_TYPE_RGB
, etc) | AI_API AI_PURE const char* AiNodeEntryGetFilename | ( | const AtNodeEntry * | nentry | ) |
Return the filename (so/dll path) of an AtNodeEntry.
| nentry | input node entry |
| AI_API AI_PURE const char* AiNodeEntryGetVersion | ( | const AtNodeEntry * | nentry | ) |
Return the version that this node was linked with.
There are restrictions as to what previously-compiled plug-in nodes can function with a given Arnold library. For example, a plug-in node compiled and linked with Arnold 3.1.x can't be loaded (installed) on Arnold 3.2.x.
| nentry | input node entry |
| AI_API AI_PURE int AiNodeEntryGetCount | ( | const AtNodeEntry * | nentry | ) |
Return the number of instances of a particular node.
| nentry | input node entry |
| AI_API AI_PURE int AiNodeEntryGetNumParams | ( | const AtNodeEntry * | nentry | ) |
Return the number of parameters of a given AtNodeEntry.
| nentry | input node entry |
| AI_API AI_PURE const AtParamEntry* AiNodeEntryGetParameter | ( | const AtNodeEntry * | nentry, |
| int | i | ||
| ) |
Return the i'th parameter in an AtNodeEntry.
| nentry | input node entry |
| i | parameter index, in 0..num_params-1 |
| AI_API AI_DEPRECATED AI_PURE const AtParamEntry* AiNodeEntryLookUpParameter | ( | const AtNodeEntry * | nentry, |
| const char * | name | ||
| ) |
Look up a parameter in a node entry from a name string.
Searches the parameter entries of a given node looking for a parameter that matches the name string. If found, returns a pointer to the parameter entry.
| nentry | input node entry |
| name | parameter name that we are looking for (such as "samples") |
| AI_API AtParamIterator* AiNodeEntryGetParamIterator | ( | const AtNodeEntry * | nentry | ) |
Creates and returns a new AtParamIterator for this node entry.
| nentry | node entry whose parameters will be iterated over |
| AI_API AtMetaDataIterator* AiNodeEntryGetMetaDataIterator | ( | const AtNodeEntry * | nentry, |
| const char * | param | ||
| ) |
Creates and returns a new AtMetaDataIterator for this node entry.
| nentry | node entry whose metadata will be iterated over |
| param | selects a specific parameter to get its metadata or NULL for node metadata |
| AI_API void AiNodeEntryInstall | ( | int | type, |
| AtByte | output_type, | ||
| const char * | name, | ||
| const char * | filename, | ||
| AtNodeMethods * | methods, | ||
| const char * | version | ||
| ) |
Install a new node in the system.
An Arnold-based app can use this function to extend the renderer with custom types of nodes, such as new shaders or cameras. The user must provide the node type, name, and methods. Successive calls to AiNode() can create nodes of this type.
Examples:
| type | type of node (AI_NODE_CAMERA , AI_NODE_SHADER , etc) |
| output_type | for shader nodes, which can link their output to the input of another shader, this is the output type (AI_TYPE_RGB , etc) |
| name | name string of the newly created node type |
| filename | string identifier that hints at how this node was created, usually the path of the dynamic library where it was loaded from but, in general, it should be set to whatever makes sense for the app that's installing the node |
| methods | pointer to the node methods |
| version | Arnold version string that this node is linked with |
| AI_API void AiNodeEntryUninstall | ( | const char * | name | ) |
Uninstall a node from the system.
Remove the node with the given name from the system. Successive calls to AiNode() using this node name will fail.
| name | name of the node to be removed from the system |
| AI_API void AiParamIteratorDestroy | ( | AtParamIterator * | iter | ) |
Destroys a param iterator when it is no longer needed.
| iter | param iterator that will be deallocated |
| AI_API const AtParamEntry* AiParamIteratorGetNext | ( | AtParamIterator * | iter | ) |
Returns current param entry and points param iterator to the next one.
This function is designed to be used inside a loop, as illustrated by the following example, which prints all the built-in parameters of a given AtNodeEntry:
| iter | a param iterator |
NULL
if there are no more parameters to iterate over | AI_API bool AiParamIteratorFinished | ( | const AtParamIterator * | iter | ) |
Returns true if there are no more parameters to iterate over.
| iter | a param iterator |
| AI_API void AiMetaDataIteratorDestroy | ( | AtMetaDataIterator * | iter | ) |
Destroys a metadata iterator when it is no longer needed.
| iter | metadata iterator that will be deallocated |
| AI_API const AtMetaDataEntry* AiMetaDataIteratorGetNext | ( | AtMetaDataIterator * | iter | ) |
Returns current metadata entry and points metadata iterator to the next one.
This function is designed to be used inside a loop, as illustrated by the following example, which prints all the metadata of a given AtNodeEntry:
| iter | a metadata iterator |
NULL
if there is no more metadata to iterate over | AI_API bool AiMetaDataIteratorFinished | ( | const AtMetaDataIterator * | iter | ) |
Returns true if there is no more metadata to iterate over.
| iter | a metadata iterator |


| 924 | (A) | and how this comly kynge that for criste weris |
| 931 | (C) | Howe þis komely kynge . þat for criste werredde |
| 917 | (D) | how this comly kyng þat for crist werrid |
| 894 | (E) | how this comliche kyng . þat for cryst werre . |
| (Ex) | ---- no text ---- | |
| 949 | (L) | how þis comelich kyng þat for crist werreþ |
| 867 | (P) | How þis comly kynge þat for criste weres |
| 904 | (U) | how this komely kyng / that for crist wered |
| (V) | ---- no text ---- |


Class app\modules\cronjob\helpers\CronHelper
| Inheritance | app\modules\cronjob\helpers\CronHelper |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| calculateNextRunTime() | Calculate the next run time for an entry using the given rules. Rules expected in keys: minutes, hours, dow, dom (all arrays) and day_type (string: dow or dom) Array rules are in format: -1 means "any", any other value means on those specific occurances. DoW runs 0 (Sunday) to 6 (Saturday). | app\modules\cronjob\helpers\CronHelper |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| _modifyRunTimeDayOfMonth() | Modifies the next run time based on the day of month rules. Note that if the required DoM doesn't exist (eg, Feb 30), it will be rolled over as if it did (eg, to Mar 2). | app\modules\cronjob\helpers\CronHelper |
| _modifyRunTimeDayOfWeek() | Modifies the next run time based on the day of week rules. | app\modules\cronjob\helpers\CronHelper |
| _modifyRunTimeHours() | Modifies the next run time based on the hour rules. | app\modules\cronjob\helpers\CronHelper |
| _modifyRunTimeMinutes() | Modifies the next run time based on the minute rules. | app\modules\cronjob\helpers\CronHelper |
| _modifyRunTimeUnits() | General purpose run time calculator for a set of rules. | app\modules\cronjob\helpers\CronHelper |
Method Details
Modifies the next run time based on the day of month rules. Note that if the required DoM doesn't exist (eg, Feb 30), it will be rolled over as if it did (eg, to Mar 2).
| protected static void _modifyRunTimeDayOfMonth ( array $dayRules, DateTime &$nextRun ) | ||
| $dayRules | ||
| $nextRun | DateTime | Date calculation object. This will be modified. |
Modifies the next run time based on the day of week rules.
| protected static void _modifyRunTimeDayOfWeek ( array $dayRules, DateTime &$nextRun ) | ||
| $dayRules | ||
| $nextRun | DateTime | Date calculation object. This will be modified. |
Modifies the next run time based on the hour rules.
| protected static void _modifyRunTimeHours ( array $hourRules, DateTime &$nextRun ) | ||
| $hourRules | array | Rules about what hours are valid (-1, or any number of values 0-23) |
| $nextRun | DateTime | Date calculation object. This will be modified. |
Modifies the next run time based on the minute rules.
| protected static void _modifyRunTimeMinutes ( array $minuteRules, DateTime &$nextRun ) | ||
| $minuteRules | array | Rules about what minutes are valid (-1, or any number of values 0-59) |
| $nextRun | DateTime | Date calculation object. This will be modified. |
General purpose run time calculator for a set of rules.
| protected static void _modifyRunTimeUnits ( array $unitRules, DateTime &$nextRun, $currentUnitValue, $unitName, $rolloverUnitName ) | ||
| $unitRules | array | List of rules for unit. Array of ints, values -1 to unit-defined max. |
| $nextRun | DateTime | Date calculation object. This will be modified. |
| $currentUnitValue | integer | The current value for the specified unit type |
| $unitName | string | Name of the current unit (eg, minute, hour, day, etc) |
| $rolloverUnitName | string | Name of the unit to use when rolling over; one unit bigger (eg, minutes to hours) |
Calculate the next run time for an entry using the given rules. Rules expected in keys: minutes, hours, dow, dom (all arrays) and day_type (string: dow or dom) Array rules are in format: -1 means "any", any other value means on those specific occurances. DoW runs 0 (Sunday) to 6 (Saturday).
| public static integer calculateNextRunTime ( array $runRules, $currentTime = null ) | ||
| $runRules | array | Run rules. See above for format. |
| $currentTime | integer|null | Current timestamp; null to use current time from application |
| return | integer | Next run timestamp |
|---|


YT Notes v1.0
Learn
About
Dark
Light
00:00:00
Note
Preview
Notes
Time
Save
Clear
New Learn
Export
Time
Notes
-
Preview
Warning!
×
You have existing notes. Do you want to reset for new notes?


{% extends "help/help_base.html" %} {% load i18n %} {% block del %}tab-cur{% endblock %} {% block help_con %}
{% blocktrans %}To maximize your data security, deletion of file libraries on the website and on your computer are not "synced" automatically. {% endblocktrans %}


Pokémon Sword And Shield's Pokédex Contains A Dire Warning About Climate Change
Take heed...
by Damien McFerranPokémon Sword And Shield may be set in a fantasy world that, in many ways, is quite different from our own, but it would seem that even the realm of Pocket Monsters has the same worries and concerns as ours – and that includes the thorny issue of global warming.
The game's Pokédex is being used to illustrate the dangers of climate change via a new regional form of the Pokémon Corsola. If you're well-versed in all things Pokémon then you'll be aware that Corsola is a coral-like Water/Rock-type monster.
However, in Sword and Shield, the Galarian Corsola has a bleached appearance and sad visage. The Pokédex even states that the 'mon was impacted by a rapid change in climate, which turns it into a life-leeching Ghost-type Pokémon. Corsola evolves into Cursola, which is even more spooky-looking.
Given that games like Sword and Shield will be played by millions of young kids, it's encouraging to see companies like Game Freak using them as a platform to educate on the dangers of climate change and how it can impact the world around us. Let us know your thoughts on this by posting a comment.
[via comicbook.com]


This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms and #programming.
I remember my own struggle with calculus at university. Limits, integrals, differential equations. Lots of practice, lots of homework. Pages and pages of exercises. I loved math, loved the connection between algebra and geometry, loved the very pleasure of solving problems by making different concepts work together. But I hated doing the “paperwork”.
Taking it seriously, I still studied through the semester, studied harder the week before the exam, studied even harder the night before. I got 62/100. That's 1 point above the lowest possible passing grade.
Well, maybe math is not for everyone. But wait a minute! The next semester I took part in the Math Olympiad, went through the faculty round, then through the university round, went to the nationals, and even managed to score a few points there. Which counted as a pass on that semester's exam.
My professors were proud of me. And for almost a year, they thought that the first semester's score was a mistake. Until in the third semester, I scored 65/100.
¯\_(ツ)_/¯
Mathematics is a lot of things. It's the fun of problem-solving, it's the excitement of discoveries, it's the pride of accomplishments, and it's a ton of tedious computations, too. I never liked that last part. I still don't. That's why I'm so happy to live in the XXI century since I can give it away to computers and still enjoy the first three.
According to the official site:
SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible.
Symbolic mathematics? Algebra system? Sounds exclusive. Sounds like it's a tool for practicing mathematicians and maybe the students who desperately want to become one. But it isn't. It is for practicing engineers who have just enough math knowledge to state a problem but not enough patience to solve it.
It does integration and differentiation. It finds limits, and it expands power series. It solves equations and systems of equations. It can even do statistics.  It doesn't just compute numbers, it computes formulas.
It is a Python library that does the boring part of math for you. Moreover, it does the math fast, accurately, and without angst. In other words, it is everything I'm not.
Let's say we want to model the sine function with a polynomial. Let's pretend we have a reason. Now how do we do that?
How about, we gather all we know about the sine function in one bowl and let SymPy do the rest? Sounds good?
sin(x)
We know that sin(0) = 0, right? Everybody knows that. Also, as you might have heard, you can approximate a small sine with its own argument: sin(0.001) ≃ 0.001. This means that the derivative of sine in 0 is 1.
The sine function climbs from 0 to π/2 and then it starts going down. In π/2 it's neither climbing nor descending, it's at its peak. This means that the derivative of sin(π/2)' = 0. Also, since the sine only climbs to 1, sin(π/2) = 1.
The sine is symmetrical relative to π/2. This means that it descends exactly as it climbs, and at the point where it reaches full π, its derivative is sin(π)' = -1, and the function itself sin(π) = 0.
Also, one less known (but easily computable) fact, the integral of the sine from 0 to π/2 is 1. Let's throw this into the bowl as well.
So, we have 7 facts. This implies 7 equations. This implies that our polynomial will have 7 coefficients and the highest degree will be then 6.
Let's translate it all into Python.
from sympy import * a, b, c, d, e, f, g, x = symbols('a b c d e f g x') sine = a*x**6 + b*x**5 + c*x**4 + d*x**3 + e*x**2 + f*x + g sine_d = diff(sine, x) sine_i = integrate(sine, x) the_system = [ sine_i.subs(x, pi / 2) - sine_i.subs(x, 0) - 1, sine_d.subs(x, 0) - 1, sine_d.subs(x, pi / 2), sine_d.subs(x, pi) + 1, sine.subs(x, 0), sine.subs(x, pi / 2) - 1, sine.subs(x, pi) ] res = solve(the_system, (a, b, c, d, e, f, g)) print(res) |
You can browse the tutorial if you like but it should be more or less clear as it is. sine is our polynomial model. diff is differentiation. integrate is integration. solve is solve. Simple!
Our solution now is a Python dictionary of formulas:
{a: (-448*pi - 28*pi**2 + 1680)/pi**7,
b: (-5040 + 84*pi**2 + 1344*pi)/pi**6,
c: (-1440*pi - 95*pi**2 + 5460)/pi**5,
d: (-2520 + 50*pi**2 + 640*pi)/pi**4,
e: (-96*pi - 12*pi**2 + 420)/pi**3,
f: 1,
g: 0}
Which is nice but not be exactly what we expected. We need the coefficients for a polynomial model and SymPy gave us the way to compute these coefficients from π instead. Well, it's what it does, it computes things symbolically not numerically. Or does it?
Look! I'll add one more line and SymPy will compute our coefficients as floating-point numbers.
from sympy import * from math import pi a, b, c, d, e, f, g, x = symbols('a b c d e f g x') sine = a*x**6 + b*x**5 + c*x**4 + d*x**3 + e*x**2 + f*x + g sine_d = diff(sine, x) sine_i = integrate(sine, x) the_system = [ sine_i.subs(x, pi / 2) - sine_i.subs(x, 0) - 1, sine_d.subs(x, 0) - 1, sine_d.subs(x, pi / 2), sine_d.subs(x, pi) + 1, sine.subs(x, 0), sine.subs(x, pi / 2) - 1, sine.subs(x, pi) ] res = solve(the_system, (a, b, c, d, e, f, g)) for var, exp in res.items(): print(var, srepr(exp)) |
Have you noticed which line it is? Anyway, the result is now this:
{a: -0.00125233934372311,
b: 0.0118030202461258,
c: -0.00492072682786551,
d: -0.163234062440025,
e: -0.000907801926098641,
f: 1.00000000000000,
g: 0.0}
The line was from math import pi. This overloads the pi in the scope to be a floating-point number, not a symbol. And voilà — SymPy is now numeric. We can take these numbers, put them into our polynomial and it will be our model.
The polynomial model put over original sin(x)
The model works wonders in the [0; π] range. Outside this range, the model diverges from the sine but we never specified that it shouldn't.
The polynomial bears all the properties we told SymPy about with our equations and nothing more.
In my Geometry for Programers book, I used a less graphic but more practical example. I modeled the sine on [0, π/2] range with only four non-zero coefficients and then compared my model to a conventional one obtained as a power series. Mine appeared to be an order of magnitude more precise.
Let's say we want something that looks like the sine but isn't. Something we can tweak interactively. Like the sine but with the movable middle point.
We can start the same way. Let's retain the point locations. The integral criterion and the derivatives in the endpoints criteria are better to be lifted. But that's just my opinion, you can try to retain them yourself and see what'll happen.
Anyway, the code that states the problem now looks like this:
from sympy import * a, b, c, d, x, px, py = symbols('a b c d x px py') sine = a*x**3 + b*x**2 + c*x + d sine_d = diff(sine, x) the_system = [ sine_d.subs(x, px), sine.subs(x, 0), sine.subs(x, px) - py, sine.subs(x, pi) ] res = solve(the_system, (a, b, c, d)) print(res) |
When run, it prints out that:
{a: (-2*px*py + pi*py)/(px**4 - 2*pi*px**3 + pi**2*px**2),
b: (3*px**2*py - pi**2*py)/(px**4 - 2*pi*px**3 + pi**2*px**2),
c: (-3*pi*px*py + 2*pi**2*py)/(px**3 - 2*pi*px**2 + pi**2*px),
d: 0}
This is already code-like, you can copy-paste this to your program and maul it a bit so it would fit the syntax of your favorite language. Or you can ask SymPy to do that for you as well!
Just replace print(res) with print(jscode(res)) and SymPy will write the solution in JavaScript!
{a: (-2*px*py + Math.PI*py)/(Math.pow(px, 4) -
2*Math.PI*Math.pow(px, 3) +
Math.pow(Math.PI, 2)*Math.pow(px, 2)),
b: (3*Math.pow(px, 2)*py - Math.pow(Math.PI, 2)*py)/
(Math.pow(px, 4) - 2*Math.PI*Math.pow(px, 3) +
Math.pow(Math.PI, 2)*Math.pow(px, 2)),
c: (-3*Math.PI*px*py + 2*Math.pow(Math.PI, 2)*py)/
(Math.pow(px, 3) - 2*Math.PI*Math.pow(px, 2) +
Math.pow(Math.PI, 2)*px),
d: 0}
The formulas are now completely runnable code. Here I used them to make this very interactive widget ↓
You can drag the point. SymPy-generated code will recompute the curve.
SymPy can also write code in Rust, C++, Fortran, Matematica, and more. Most of the non-esoterical languages are already there.
They say that AI will replace programmers in the future. Well, for a certain part, the future is here. SymPy already writes your code for you and not just some boilerplate. It really solves a mathematical problem and turns the solution into something you can run. Well, if writing code means solving equations without any creative thought involved, I don't mind being replaced.
I disagree with the “math is not for everyone”. Math is vast and diverse. Surely there is enough math for everyone. But some parts of it are better left to computers.
Hope this demonstration shows that computers are happy to help you. It's not that hard to state a problem and it's even easier to interpret results. And it's fun.
If my humble introduction to SymPy will help you enjoy math long after your final calculus exam, it'll make me happy too.
| Index #programming #mathematics #tutorials | ← there's more. |
+
So You Think You Know C (free book) + Geometry for Programmers (paid book) + Github & RSS |


Squid Documentation, April 2008 Edition
David Betz<EMAIL_ADDRESS>Back in late 2005 I created a system which I released in 2007 under the title of Data Feed Framework (DFF) which I later started to call Sql Feed Framework. Now I'm releasing a newly refactored edition, which relies on WCF for RSS creation and aggregation in place of RSS.NET, called simply Squid. This library exists to greatly simplify the creation of RSS feeds and the aggregation of RSS and Atom feeds on websites. The goal of the feed creation portion of the system was to allow developers and IT professionals to create RSS feeds with little to no work at all thereby allowing them to use RSS for purposes other than blogging or news. The goal of the aggrgator portion of DFF was to the integration of information into ASP.NET 2.0 pages.
The Data Feed Framework has two primary components:
- FeedCreation
- InfoBlocks
Using the FeedCreation mechanism, developers and IT professionals can quickly create RSS feeds to monitor internal SQL databases, create sales RSS feeds for management, or monitor whatever else they wanted. The aggregator portion of the system, called InfoBlocks, allows web developers to declare a control in ASP.NET 2.0, give it an RSS or Atom feed and walk away having an InfoBlock on their page containing a list of feed entries from the RSS feed.
The two portions of the system work together, but can also be used separately.
To make explaining this a bit easier, below is a link to my documentation for the system. Below that are the links for the source of the system as well as screen shots.
I can't overemphasis how simply this system makes RSS creation and RSS/Atom aggregation. It's literally a matter writing a SQL statement. Absolutely no more work than that is required. The simplicity is very much like that simplicity in WCF. Where WCF relied primarily on attributes and a config file, I rely simply on a SQL Server 2005 table called "FeedCreation". You literally write a SQL statement and give it a name and you have a complete RSS feed ready for corporate or public distribution. I'm planning on incorporating this system into the core of Minima in the next CTP.
The license for this is simple: use it all you want for whatever you want, customize it to your own needs, but 1) ALWAYS keep the copyright notice in there and 2) I nor my companies are liable for anything. It's a Creative Commons Attribution 2.5 License.
The following documentation explains step-by-step how the FeedCreator and InfoBlocks work. Please read this completely.
Simply Feed Creation
To create a feed, go to the FeedCreation table put a Title, Description (which can be blank), and a SQL statement. That's all that's required to create a feed. The feed is then accessible via the LoadFeed.aspx page. For example, go to the FeedCreation table and put the following information in:
FeedCreationTitle: SQL Jobs FeedCreationStatement: select Id=0, Title=name, Description=description from msdb.dbo.sysjobs where enabled = 1
Leave all others as defaults, then you can access the feed with:
LoadFeed.aspx?title=SQL+Jobs
Or, if the FeedCreationId is 29, you can use this:
LoadFeed.aspx?id=29
However, this may be something you don't want people to guess. If they know they can type in LoadFeed.aspx?id=# to get a feed, they can start guessing numbers.
To get around this...
Secret Feed Creation
... simply set FeedAccessViaGuidOnly to true and then you may only access it with the Guid in FeedGuid like this:
LoadFeed.aspx?secretId=9BE0FBBB-FAC4-464A-B183-88B5B5DEB582
Now you have a feed that isn't publicly advertised. There's really no way anyone is going to access that feed unless they are given the Guid.
...as an InfoBlock
Now, if you were to use an InfoBlock to access this feed you simply have to register the InfoBlock control assembly with the page and declare an InfoBlock.
For example, to register the assembly with the page, the use the following syntax:
<%@ Register Assembly="InformationAccessPointControls" Namespace="Iap.Controls" TagPrefix="iap" %>
Now, to declare an InfoBlock, use the following sytax, setting the DataSource to the feed you want the InfoBlock to use:
<iap:InfoBlock ID="ibBlock3" runat="server" DataSource="http://MyHost/LoadFeed.aspx?secretId=9BE0FBBB-FAC4-464A-B183-88B5B5DEB582"></iap:InfoBlock>
...which would show a list of entries in the feed with each entry's link set whatever is in the DefaultEntryLinkTemplate item in the web configuration file.
For this scenario it may not matter where the link goes as you may not even need a description. Perhaps all you care about are the titles. However, if you did care about the description you can rely on the DefaultEntryLinkTemplate to have a custom page display the description for you. Furthermore, the DefaultEntryLinkTemplate is actually a link template allowing you more flexibility than a mere link would.
For example, if "SnippetViewer.aspx?id={id}" was the DefaultEntryLinkTemplate, then the {id} would be replaced with the ID of the entry. So, clicking on item 28 in the feed would take you to "SnippetViewer.aspx?id=28". You could also use {title} or {description} if you needed to, though {id} will probably be used more than anything else.
SnippetViewer.aspx is provided as an example of what could be used to display snippets. You could either use this page (with some rather extensive styling) or you could create your own page and completely change the value of DefaultEntryLinkTemplate.
Custom Link Templates
Now, say you wanted this, and only this, feed to have links going to a page you created, but you didn't want to change the DefaultEntryLinkTemplate as that would affect all feeds. Perhaps you setup a SQLMonitor.aspx page that will help you monitor your system. Assuming that you can send paramaters to the page, you can use your own custom template by altering the feed creation statement:
select Id=0, Title=name, Description=description, LinkTemplate='SQLMonitor.aspx?SqlJobId={id}' from msdb.dbo.sysjobs where enabled = 1
Now, the InfoBlock will show your own link.
Schedules Entries
Say you want to setup a company feed to advertise company announcements, however you don't want to micromanage the announcements. Using this system, you can schedule your annoucements to automatically show at a certain date and time and then automatically disappear at a different date and time. To see this, lets first setup a SnippetGroup called "Company Announcements". You do this simply by putting a record in the SnippetGroup table.
Now, in the FeedCreation table, use this FeedCreationStatment:
select Id = SnippetId, Title = SnippetTitle, Description = SnippetDescription from SnippetDatedwhere SnippetGroupId = 12
Please note that this statement uses the SnippetDated view, not not the Snippet table directly. This is important when working with scheduling.
Lastly, in the Snippet table start putting in some snippets, setting each snippet's SnippetGroupId to the SnippetGroupId obtained from the SnippetGroup.
Snippet Titles:
- Client in Office - Week of March 12
- Happy Independence Day!
- February Birthdays
- March Birthdays
- Jeans Day Every Friday
You'll also probably want to put in some descriptions for each of these. Samples are given in the provided SQL Server 2005 database.
Now, say you want to set the February Birthdays entry to only show for the month of February and the March Birthdays entry to only show up for the month of march. To do this just put in the start and end dates in the SnippetValidBegin and SnippetValidEnd columns, respectively.
When someone views the feed by any of the following means, they will see only the entries appropriate for that moment. If the SnippetValidBegin and SnippetValidEnd columns are null, the entries will always show up:
Possibly ways to access this feed:
LoadFeed.aspx?id=30 LoadFeed.aspx?title=Company+Announcements LoadFeed.aspx?secretId=75DCDDFF-E457-4CF3-95EC-951B1B648AE7
More Complex SQL
As you saw in the SQL Server jobs example, you do not have to use the Snippet and SnippetGroup tables. You can use anything you want. But that's not all. You don't even have to stay in the same database and you don't have to use simple SQL statements.
Here's an example of creating a feed to get the top 10 sales persons with the best sales from the AdventureWorks database.
Use this as your FeedCreationStatement:
select Id=pc.ContactID, Title=pc.FirstName + ' ' + pc.LastName + ': ' + convert(varchar(20), convert(numeric(10,2), sum(LineTotal))), Description='', LinkTemplate = 'ShowContactInformation.aspx?ContactID={id}' from Sales.SalesOrderDetail sod inner join Sales.SalesOrderHeader soh on soh.SalesOrderID = sod.SalesOrderID inner join Person.Contact pc on pc.ContactID = soh.SalesPersonID group by pc.FirstName, pc.LastName, pc.ContactID order by sum(LineTotal) desc
Then, you need to put AdventureWorks in the FeedCreationDatabase column of the same record.
This SQL Server statement will refresh every time the feed is accessed, unless you have some sort of caching mechanism to prevent this. Also notice that this statement has LinkTemplate set.
For something like this, you probably won't need to schedule it, though you could, but you may want to set FeedAccessViaGuidOnly to true to prevent just anyone from accessing it.
In addition to more complicated SQL statements, you could also use stored procedures, but I won't show an example of that as it should be fairly self explanatory at this point.
Registering a Feed with a Web Browser
Both Mozilla Firefox (1.0 and beyond) and Internet Explorer 7 allow for the ability to register a feed with a web browser via the use of a <link /> element. When you place an InfoBlock on a screen, you can tell it to register the specified feed with the web browser by setting the InfoBlock property of RegisterFeedWithBrowser to True. This will tell Firefox and IE about the link and they will in turn show the feed icon (usually the orange feed icon) in the address bar.
For example, to register the company announcement feed with Firefox or IE7, you will have this:
<iap:InfoBlock ID="ibBlock3" runat="server" RegisterFeedWithBrowser="True" DataSource="http://MyHost/LoadFeed.aspx?secretId=75DCDDFF-E457-4CF3-95EC-951B1B648AE7"></iap:InfoBlock>
Now the user will see the feed icon in his or her address bar. In Firefox, the user could click the icon and set it as a Firefox Live Bookmark, which looks and feels like a bookmark, but automatically updates as the feed changes.
Other Feeds
The InfoBlocks could also used to show other RSS feeds.
For example, the following creates and InfoBlock for my NetFX Harmonics feed:
<iap:InfoBlock ID="ibBlock9" runat="server" DataSource="http://feeds.feedburner.com/FXHarmonics/" Visible="true"></iap:InfoBlock>
For something like this, you probably wouldn't register with the browser, but you may want to have as a different size, either taller or wider
Block Sizes
To set this, simply change the BlockSize property of the InfoBlock to either Wide or Tall, depending on what you want.
For example, this sets a wide InfoBlock...
<iap:InfoBlock ID="ibBlock9" runat="server" BlockSize="Wide" DataSource="http://feeds.feedburner.com/FXHarmonics/" Visible="true"></iap:InfoBlock>
... and this sets a tall InfoBlock.
<iap:InfoBlock ID="ibBlock3" runat="server" BlockSize="Tall" RegisterFeedWithBrowser="True" DataSource="http://MyHost/LoadFeed.aspx?secretId=9BE0FBBB-FAC4-464A-B183-88B5B5DEB582"></iap:InfoBlock>


⬆
Imagine being a part of a senior management team of a developing business that is currently taking the corporate world by storm. As top management, you have full autonomy in making decisions regarding profits and market share, and will compete head to head with lead competitors of the industry. Now imagine, you are given the opportunity to do all of that in the next few weeks…
The Future Leaders Challenge (FLC) is an innovative business case competition designed to give high school students with a passion for business the opportunity to face the risk, challenges, and rewards of managing their own companies. As the high school level counterpart of the University of Toronto’s LIVE Competition, FLC is focused on developing both the personal and professional skills like no other competition.
Register by May 9th, 2017 to secure your spot at FLC 2017.
FLC is open to students in grade 11 or 12 in high schools all across Canada. Delegates compete in teams of 4 to take on the role of a senior management team.
As one of Canada’s largest multidisciplinary case competitions, FLC gives you the opportunity to explore various fields of business such as accounting, finance, human resources, and marketing, which is not only a great way to demonstrate your strengths, but the ability to simultaneously learn about the countless opportunities in the world of business.
University of Toronto Scarborough – Instructional Centre
Saturday May 13, 2017 from 9:00am to 5:30pm
Unfortunately, you must sign up with 3 other students from your high school in order to form a team representing your school.
Registrants for FLC do not have to be applicants of UTSC, the only requirement is that they are a secondary school student!
A total of 120 secondary students will be competing in this year's competition.
Throughout the event, you will be able to meet university students from first year to fourth year - spanning across all streams of business. These senior students have held several positions on Clubs and Student Associations, have had real work experience, and a passion for mentorship.
No, you do not need a strong business background to compete. FLC tests more than just technical skills, but also a competition that requires a range of soft skills - such as communication, teamwork, etc. There’s something for everyone. Attending LIVE FLC is a great way to gauge your interest for business and to test your basic business knowledge as well.
Fun fact: The first place team from FLC in 2014 was made up of 1 business student and 3 engineering/science students.
The $25 we ask per team member covers lunch for the day, swag bag as well as other goodies!
LIVE is the only undergraduate competition that focuses on multidisciplinary rounds, something that you won’t be able to experience anywhere else! You will be able to experience firsthand what LIVE Competition is like through the rounds at FLC. From solving numerical problems to presentations, FLC has a wide range of offerings that will test a multitude of skills.
The material involved in FLC will be based on grade 11 and 12 material, so it is up to the student's’ discretion on whether they ultimately would like to compete. If they are confident in their business knowledge, then they are more than welcome to register.
The maximum number of teams per school is currently set at 3. However, if a school wishes to enter more than 3 teams, they can submit teams onto a wait-list by emailing<EMAIL_ADDRESS>Professors from the University of Toronto will be marking the rounds of the competition.


Uncommon Friends of the 20th Century Reviewed by Eugene Novikov http://www.ultimate-movie.com/ Member: Online Film Critics Society
A documentary with James Newton, Thomas Edison, Harvey Firestone, Henry Ford, Charles Lindbergh. Not Rated (nothing offensive).
James Newton is one fortunate fellow. The 94-year-old Floridian can tout being intimate friends with some of the world's most influential people. Yes, Thomas Edison, Henry Ford, Charles Lindbergh and Harvey Firestone were all Newton's cronies and the man is quite proud of his relationship with them. Uncommon Friends of the 20th Century, a new documentary narrated by Walter Cronkite claims to tell Newton's story; in reality, however, it is only a mildly diverting history lesson, and not a very complete one at that. The film tackles its subjects almost methodically, starting with Edison and wrapping up with Lindbergh. Insight isn't this 63 minute production's forte; we do, however, get enough interesting tidbits to hold our attention for its mercifully short running time. We learn, for example, that Thomas Edison loved children and did his best to boost their self-confidence. We discover that Lindbergh's greatest foe on his journey across the Atlantic was sleep. Firestone, evidently, was the "human portrait of dignity". We are given countless little factoids like that which, while interesting, don't amount to much.
Much of Uncommon Friends feels utterly authentic, with genuine, well- edited footage of its subjects and compelling narration by the dependable journalist Cronkite. Unfortunately the film is intercut with "dramatic reenacments" that are lame, inept and horrifyingly cheesy. They undermine the film's otherwise prevalent sense of verisimilitude, making it seem phony, somehow contrived (especially in retrospect).
This is a very conventional documentary hiding behind a rather original facade. You see, it has very little to do with James Newton, and the material they put in about him is little more than a justification to be able to put his name in the synopsis and name the film Uncommon Friends of the 20th Century. This doesn't, I suppose, negatively affect the movie if judged on its cinematic merits, but it does add to its fabricated feel.
Considering all its flaws, Uncommon Friends of the 20th Century is really better than it deserves to be. Truth be told, I enjoyed it despite its reenactments, deceitful title and hollow structure. The movie ends, as many documentaries do, by updating us on the current status of its (alleged) subject. As we were being told that James Newton lives in Florida with his wife, likes long walks on the beach, etc., All I could think was "Who cares?" But the stories of Edison, Firestone, Ford and Lindbergh, American legends, still manage to be compelling.
Grade: B-
©1999 Eugene Novikov
Sent via Deja.com http://www.deja.com/ Before you buy.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


+++ draft = false date = "2007-01-12T18:55:01-02:00" title = "Firebug getting close to 1.0" tags = ["Plone"] created = "2007-01-12T18:50:17-02:00" modified = "2007-01-12T18:55:01-02:00" permaLink = "http://play.pixelblaster.ro/blog/archive/2007/01/12/firebug-getting-close-to-1.0" author = "Tiberiu Ichim" aliases = [ "/blog/archive/2007/01/12/firebug-getting-close-to-1.0" ] +++
Wow! I am impressed. Following a discussion on slashdot I've installed the new 1.0 beta version of Firebug, an extension for web developers. Created by the same author as the classic Dom Inspector, Firebug didn't seem too useful for me until now. The version on the mozilla extensions site is old (0.4), not so featured and to me it seemed to be really buggy. The new version seems to work very good and offers for each area of focus a multitude of information and options that puts it on first place in my toolkit as Plone web developer.


|
|
def | __init__ |
| |
|
def | jid_size |
| |
|
def | jid_list |
| |
|
def | jid |
| |
|
def | set_jid |
| |
|
def | add_jid |
| |
|
def | clear_jid |
| |
|
def | body |
| |
|
def | set_body |
| |
|
def | clear_body |
| |
|
def | has_body |
| |
|
def | raw_xml |
| |
|
def | set_raw_xml |
| |
|
def | clear_raw_xml |
| |
|
def | has_raw_xml |
| |
|
def | type |
| |
|
def | set_type |
| |
|
def | clear_type |
| |
|
def | has_type |
| |
|
def | from_jid |
| |
|
def | set_from_jid |
| |
|
def | clear_from_jid |
| |
|
def | has_from_jid |
| |
|
def | MergeFrom |
| |
|
def | Equals |
| |
|
def | IsInitialized |
| |
|
def | ByteSize |
| |
|
def | ByteSizePartial |
| |
|
def | Clear |
| |
|
def | OutputUnchecked |
| |
|
def | OutputPartial |
| |
|
def | TryMerge |
| |
|
def | __str__ |
| |
|
|
| jid_ |
| |
|
| has_body_ |
| |
|
| body_ |
| |
|
| has_raw_xml_ |
| |
|
| raw_xml_ |
| |
|
| has_type_ |
| |
|
| type_ |
| |
|
| has_from_jid_ |
| |
|
| from_jid_ |
| |
|
|
int | has_body_ = 0 |
| |
|
string | body_ = "" |
| |
|
int | has_raw_xml_ = 0 |
| |
|
int | raw_xml_ = 0 |
| |
|
int | has_type_ = 0 |
| |
|
string | type_ = "chat" |
| |
|
int | has_from_jid_ = 0 |
| |
|
string | from_jid_ = "" |
| |
|
int | kjid = 1 |
| |
|
int | kbody = 2 |
| |
|
int | kraw_xml = 3 |
| |
|
int | ktype = 4 |
| |
|
int | kfrom_jid = 5 |
| |
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/api/xmpp/xmpp_service_pb.py


--- title: Books layout: page ---
“People don't realize how a man's whole life can be changed by one book.”


I have a feature in my app: pick a phone number. I code this feature in Objective C and now I want to parse to Swift. The feature requires to load all phone numbers from all contacts, search contacts, contacts are grouped into first character of the name. Here what I did
I use intention in this function so that this picker can be use anywhere easily. Read more about intention at my posts: 1000+ lines of code, good work?“ (Cont) and PageViewController: How can I reuse it?
Let’s begin.
contactCell
with style is Subtitle
.ContactPickerIntention.swift
and implement NSObject class. It’s our intention.ContactPickerIntention.swift
.searchBar
and tableView
.You have to ask permission to access to contact.
ABAddressBookRequestAccessWithCompletion(addressBook) { granted, error in
// warn the user that because they just denied permission, this functionality won't work
// also let them know that they have to fix this in settings
if granted == false { return }
// load contact
}
Load all contacts
let allContacts = ABAddressBookCopyArrayOfAllPeople(addressBook).takeRetainedValue() as Array
All contacts are here. Run a loop and load every contact, find the phone number and consider this contact with every number is a contact item.
private func getNameFromContact(currentContact: ABRecordRef) -> String {
let firstName = ABRecordCopyValue(currentContact, kABPersonFirstNameProperty)
let lastName = ABRecordCopyValue(currentContact, kABPersonLastNameProperty)
var currentName = ""
if firstName == nil && lastName == nil { // prevent anonymous contact
currentName = ""
} else {
currentName = ABRecordCopyCompositeName(currentContact).takeRetainedValue() as String
}
return currentName
}
The ABRecordCopyCompositeName
function can get the contact’s full name for you, but if there is a contact without first name or last name, your app crashes. Take care some anonymous friends with this func.
Get the phone numbers.
private func getPhoneNumbersFromContact(currentContact: ABRecordRef) -> [String]? {
var phoneNumberList = [String]()
let phones:ABMultiValueRef = ABRecordCopyValue(currentContact, kABPersonPhoneProperty).takeRetainedValue()
for var j: CFIndex = 0; j < ABMultiValueGetCount(phones); j++ {
let mobileLabel = ABMultiValueCopyLabelAtIndex(phones, j).takeRetainedValue()
if mobileLabel == kABPersonPhoneMobileLabel ||
mobileLabel == kABHomeLabel ||
mobileLabel == kABPersonPhoneMainLabel ||
mobileLabel == kABPersonPhoneIPhoneLabel ||
mobileLabel == kABOtherLabel ||
mobileLabel == kABWorkLabel {
let phone = ABMultiValueCopyValueAtIndex(phones, j).takeRetainedValue() as! String
phoneNumberList.append(phone)
}
}
return phoneNumberList
}
There are a few phone number types such as Mobile, Home, Work. And those types are marked with the Label. We have to get the phones multi value and find the phone number conform to the labels.
I created struct Contact
to keep the name and the phone number. And a dictionary with key is the first character of the name and the value is an array of Contact to store all contacts.
If you want to get email, try this func
func getEmail(currentContact: ABRecordRef) -> String {
let email:ABMultiValueRef = ABRecordCopyValue(currentContact, kABPersonEmailProperty).takeRetainedValue()
var emailString = ""
if ABMultiValueGetCount(email) > 0 {
emailString = ABMultiValueCopyValueAtIndex(email, 0).takeRetainedValue() as! String
}
return emailString
}
You can download my complete project at my github You can use this intention anywhere you want with simple actions, copy the file and use it in ViewController. ViewController
contactPickerIntention.getAllContacts()
This project just demonstrate how I did my feature. And you can do a lot with this, add delegate to pass data from picker to ViewController, show alert and open setting when access denied and user want to accept it. Intention is extremely easy and powerful. Understand it clearly, your code grows to a higher level.


@@include("partials/head.html") @@include("partials/header.html")
You're now part of the Query community! I'm glad you've joined us.
Look out for a welcome email comingsoon. If you don't see it in your inbox within the next hour, check the promotions tab or your spam.
– Jordan


Are you new to the gym and not sure where to start? Looking to add more variety into your workout? Or are you wanting to master a move to perfection? Then look no further. Learn how to perform exercise moves safely and effectively with our exercise database, which includes top tips from our qualified trainers, video demonstrations, and a step by step guide.
Build a strong core and improve your posture by including the ab exercises in this section into your ab workout routine.
Tone your upper body with our arm exercises which target a range of muscle groups including your shoulders, triceps and biceps.


Enter ur name
Enter ur age
Select Country
India
Chine
Japan
{{userDetails}}
user name is {{userDetails.uname}}
user age is {{userDetails.uage}}
user countdry is {{userDetails.ucountry}}


%! from django.utils.translation import ugettext as _ %>
<%! from django.template import RequestContext %>
<%! from third_party_auth import pipeline %>
<%!
from django.core.urlresolvers import reverse
import waffle
%>
<%! from django.template import RequestContext %>
<%
cert_name_short = settings.CERT_NAME_SHORT
cert_name_long = settings.CERT_NAME_LONG
%>
<%inherit file="main.html" />
<%namespace name='static' file='static_content.html'/>
<%block name="pagetitle">${_("Dashboard")}%block>
<%block name="bodyclass">view-dashboard is-authenticated%block>
<%block name="nav_skip">#my-courses%block>
<%block name="js_extra">
%block>
% if reverifications["must_reverify"] or reverifications["denied"]:
<%include file='dashboard/_dashboard_prompt_midcourse_reverify.html' />
% endif
%if message:
${message}
%endif
% if duplicate_provider:
## Translators: this message is displayed when a user tries to link their account with a third-party authentication provider (for example, Google or LinkedIn) with a given edX account, but their third-party account is already associated with another edX account. provider_name is the name of the third-party authentication provider, and platform_name is the name of the edX deployment.
${_('The selected {provider_name} account is already linked to another {platform_name} account. Please {link_start}log out{link_end}, then log in with your {provider_name} account.').format(link_end='', link_start='' % logout_url, provider_name='%s' % duplicate_provider.NAME, platform_name=platform_name)}
% endif
${ user.username }
${_("Full Name")} (${_("edit")})${ user.profile.name | h }
${_("Email")}
% if external_auth_map is None or 'shib' not in external_auth_map.external_domain:
(${_("edit")})
% endif
${ user.email | h }
% endif
% endif
% if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH'):
## Translators: this section lists all the third-party authentication providers (for example, Google and LinkedIn) the user can link with or unlink from their edX account.
${_("Account Links")}
% for state in provider_user_states:
${_("Looks like you haven't been enrolled in any courses yet.")}
%endif
% endif
% if staff_access and len(errored_courses) > 0:
${_("Course-loading errors")}
% for course_dir, errors in errored_courses.items():
${course_dir | h}
% for (msg, err) in errors:
${msg}
${err}
% endfor
% endfor
% endif
${_('Email Settings for {course_number}').format(course_number='')}
,
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
${_("window open")}
${_('Password Reset Email Sent')}
,
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
${_("window open")}
${_("Change Email")},
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
${_("window open")}
${_("Change your name")}
,
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
${_("window open")}
${_(' {course_number}? ').format(course_number='')}
,
## Translators: this text gives status on if the modal interface (a menu or piece of UI that takes the full focus of the screen) is open or not
${_("window open")}


Some data has been removed/modified for a better chart :)
The data made available here has been modified for use from its original source, which is the City of Seattle. Neither the City of Seattle nor the Office of the Chief Technology Officer (OCTO) makes any claims as to the completeness, timeliness, accuracy or content of any data contained in this application; makes any representation of any kind, including, but not limited to, warranty of the accuracy or fitness for a particular use; nor are any such warranties to be implied or inferred with respect to the information or data furnished herein. The data is subject to change as modifications and updates are complete. It is understood that the information contained in the web feed is being used at one's own risk.


Apache XML Commons Resolver Helpers package.
This package provides a collection of static helper functions used across a number of different classes.


{% extends "helper/base.html" %}
{% block body -%}
Click Me ^
Hi. My name is Joshua Franklin. I am currently studying at the University of Colorado at Boulder, pursuing a BS in Computer Science and a minor in Space.
Outside of school, I enjoy biking, hiking, and competing in hackathons


|
Elektra
0.8.23
|
This global semlock plugin introduces a read lock while GET
and a read/write lock while SET
.
A semaphore is used for the synchronization and the implemented algorithm favors the writer, because updates should be propagated soon as possible.
The algorithm is described here.
The usage of this plugin could lead to deadlocks, due to an ongoing discussion (-10000) (Link).
Is the location where the semaphores will be saved. /dev/shm
should be mounted as tempfs, otherwise the semaphores can not be created (this issue only appears on older systems). More information here.


--- title: Home layout: base description: random space on the internet category: home canonical_url: / ---
Science of light leads to countless applications. From lenses to outer space communications.
A good chunk of my youth was spent exploring the field.
Here are some of fun examples I made available on the web.
Coding is very fun. I picked it up as a hobby but it has also become my profession.
Expanding from physics simulation, to data science, to web development, and who knows what's next.
These are some projects that help me learn along the way.
I was fortunate that I got to share some of my research/projects/ideas.
Here are presentations in various topics.


Jan De Wilde — Sam Vloeberghs
@MrJean — @samvloeberghs
CC Front-end & UX
"Foundation is the most advanced responsive front-end framework in the world"
"Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web."
| More Foundation | More Bootstrap |
|---|---|
|
|
| More Foundation | More Bootstrap |
|---|---|
|
|
| More Foundation | More Bootstrap |
|---|---|
|
Default 4 breakpoints:
|
Default 3 breakpoints:
|
| More Foundation | More Bootstrap |
|---|---|
|
4 breakpoints means, styling for 5 levels:
|
3 breakpoints means, styling for 4 levels:
|
| More Foundation | Bootstrap |
|---|---|
|
|
| More Foundation | More Bootstrap |
|---|---|
|
|
| More Foundation | More Bootstrap |
|---|---|
default generic naming:
|
|
| More Foundation | More Bootstrap |
|---|---|
|
When placing more than 12 columns in a row, they will wrap on a new line. eg. small-9 + small-4 = 13 columns > 12 columns |
When placing more than 12 columns in a row, they will wrap on a new line. eg. col-xs-9 + col-xs-4 = 13 columns > 12 columns |
| More Foundation | More Bootstrap |
|---|---|
|
Bootstrap does column resets by adding an extra HTML element in your grid. |
| More Foundation | More Bootstrap |
|---|---|
|
It is possible to give a column an offset of * columns.
|
It is possible to give a column an offset of * columns.
|
| More Foundation | More Bootstrap |
|---|---|
|
Ordering can be done by using push or pull. Easily change the order of our built-in grid columns with some classes.
and
modifier classes.
|
Ordering can be done by using push or pull. Easily change the order of our built-in grid columns with and modifier classes.
|
| More Foundation | More Bootstrap |
|---|---|
|
A set of variables and mixins can be customised and used within Foundation. Example:
|
A set of variables and mixins can be customised and used within Bootstrap. Example:
|
| More Foundation | More Bootstrap |
|---|---|
|
Based on your viewport it's possible to show/hide content. Compared to Bootstrap this is extensive. Visibility rules can rely on:
Examples:
|
Based on the width you are on it is possible to show / hide content using just classes. These helper classes are fairly basic.
|
| More Foundation | More Bootstrap |
|---|---|
|
Helper classes to show or hide content on print are fairly basic but handy.
|
Helper classes to show or hide content on print are fairly basic.
|
| More Foundation | More Bootstrap |
|---|---|
|
|
| Foundation | Bootstrap | |
|---|---|---|
|
Orbid |
vs. |
Carousel |
| More Orbit | More Carousel |
|---|---|
|
|
| More Magellan | More Scrollspy |
|---|---|
|
|
| More Joyride | More Popover |
|---|---|
|
|
| More Responsive tables | More Responsive tables |
|---|---|
|
|
Jan De Wilde — Sam Vloeberghs
@MrJean — @samvloeberghs
CC Front-end & UX


#include <sys/types.h> #include <sys/socket.h> #include <netdb.h> int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); void freeaddrinfo(struct addrinfo *res); const char *gai_strerror(int errcode);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getaddrinfo(), freeaddrinfo(), gai_strerror():
The addrinfo structure used by getaddrinfo() contains the following fields:
struct addrinfo { int ai_flags; int ai_family; int ai_socktype; int ai_protocol; socklen_t ai_addrlen; struct sockaddr *ai_addr; char *ai_canonname; struct addrinfo *ai_next; };
The hints argument points to an addrinfo structure that specifies criteria for selecting the socket address structures returned in the list pointed to by res. If hints is not NULL it points to an addrinfo structure whose ai_family, ai_socktype, and ai_protocol specify criteria that limit the set of socket addresses returned by getaddrinfo(), as follows:
All the other fields in the structure pointed to by hints must contain either 0 or a null pointer, as appropriate.
Specifying hints as NULL is equivalent to setting ai_socktype and ai_protocol to 0; ai_family to AF_UNSPEC; and ai_flags to (AI_V4MAPPED | AI_ADDRCONFIG). (POSIX specifies different defaults for ai_flags; see NOTES.) node specifies either a numerical network address (for IPv4, numbers-and-dots notation as supported by inet_aton(3); for IPv6, hexadecimal string format as supported by inet_pton(3)), or a network hostname, whose network addresses are looked up and resolved. If hints.ai_flags contains the AI_NUMERICHOST flag, then node must be a numerical network address. The AI_NUMERICHOST flag suppresses any potentially lengthy network host address lookups.
If the AI_PASSIVE flag is specified in hints.ai_flags, and node is NULL, then the returned socket addresses will be suitable for bind(2)ing a socket that will accept(2) connections. The returned socket address will contain the "wildcard address" (INADDR_ANY for IPv4 addresses, IN6ADDR_ANY_INIT for IPv6 address). The wildcard address is used by applications (typically servers) that intend to accept connections on any of the hosts's network addresses. If node is not NULL, then the AI_PASSIVE flag is ignored.
If the AI_PASSIVE flag is not set in hints.ai_flags, then the returned socket addresses will be suitable for use with connect(2), sendto(2), or sendmsg(2). If node is NULL, then the network address will be set to the loopback interface address (INADDR_LOOPBACK for IPv4 addresses, IN6ADDR_LOOPBACK_INIT for IPv6 address); this is used by applications that intend to communicate with peers running on the same host.
service sets the port in each returned address structure. If this argument is a service name (see services(5)), it is translated to the corresponding port number. This argument can also be specified as a decimal number, which is simply converted to binary. If service is NULL, then the port number of the returned socket addresses will be left uninitialized. If AI_NUMERICSERV is specified in hints.ai_flags and service is not NULL, then service must point to a string containing a numeric port number. This flag is used to inhibit the invocation of a name resolution service in cases where it is known not to be required.
Either node or service, but not both, may be NULL.
The getaddrinfo() function allocates and initializes a linked list of addrinfo structures, one for each network address that matches node and service, subject to any restrictions imposed by hints, and returns a pointer to the start of the list in res. The items in the linked list are linked by the ai_next field.
There are several reasons why the linked list may have more than one addrinfo structure, including: the network host is multihomed, accessible over multiple protocols (e.g., both AF_INET and AF_INET6); or the same service is available from multiple socket types (one SOCK_STREAM address and another SOCK_DGRAM address, for example). Normally, the application should try using the addresses in the order in which they are returned. The sorting function used within getaddrinfo() is defined in RFC 3484; the order can be tweaked for a particular system by editing /etc/gai.conf (available since glibc 2.5).
If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canonname field of the first of the addrinfo structures in the returned list is set to point to the official name of the host.
The remaining fields of each returned addrinfo structure are initialized as follows:
If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses are returned in the list pointed to by res only if the local system has at least one IPv4 address configured, and IPv6 addresses are returned only if the local system has at least one IPv6 address configured. The loopback address is not considered for this case as valid as a configured address. This flag is useful on, for example, IPv4-only systems, to ensure that getaddrinfo() does not return IPv6 socket addresses that would always fail in connect(2) or bind(2).
If hints.ai_flags specifies the AI_V4MAPPED flag, and hints.ai_family was specified as AF_INET6, and no matching IPv6 addresses could be found, then return IPv4-mapped IPv6 addresses in the list pointed to by res. If both AI_V4MAPPED and AI_ALL are specified in hints.ai_flags, then return both IPv6 and IPv4-mapped IPv6 addresses in the list pointed to by res. AI_ALL is ignored if AI_V4MAPPED is not also specified.
The freeaddrinfo() function frees the memory that was allocated for the dynamically allocated linked list res.
Starting with glibc 2.3.4, getaddrinfo() has been extended to selectively allow the incoming and outgoing hostnames to be transparently converted to and from the Internationalized Domain Name (IDN) format (see RFC 3490, Internationalizing Domain Names in Applications (IDNA)). Four new flags are defined:
If the input name contains non-ASCII characters, then the IDN encoding is used. Those parts of the node name (delimited by dots) that contain non-ASCII characters are encoded using ASCII Compatible Encoding (ACE) before being passed to the name resolution functions.
If the name is encoded using ACE, then it will contain the xn-- prefix for one or more components of the name. To convert these components into a readable form the AI_CANONIDN flag can be passed in addition to AI_CANONNAME. The resulting string is encoded using the current locale's encoding.
The gai_strerror() function translates these error codes to a human readable string, suitable for error reporting.
AI_ADDRCONFIG, AI_ALL, and AI_V4MAPPED are available since glibc 2.3.3. AI_NUMERICSERV is available since glibc 2.3.4.
According to POSIX.1-2001, specifying hints as NULL should cause ai_flags to be assumed as 0. The GNU C library instead assumes a value of (AI_V4MAPPED | AI_ADDRCONFIG) for this case, since this value is considered an improvement on the specification.
#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/socket.h> #include <netdb.h> #define BUF_SIZE 500 int main(int argc, char *argv[]) { struct addrinfo hints; struct addrinfo *result, *rp; int sfd, s; struct sockaddr_storage peer_addr; socklen_t peer_addr_len; ssize_t nread; char buf[BUF_SIZE]; if (argc != 2) { fprintf(stderr, "Usage: %s port\n", argv[0]); exit(EXIT_FAILURE); } memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */ hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */ hints.ai_protocol = 0; /* Any protocol */ hints.ai_canonname = NULL; hints.ai_addr = NULL; hints.ai_next = NULL; s = getaddrinfo(NULL, argv[1], &hints, &result); if (s != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(s)); exit(EXIT_FAILURE); } /* getaddrinfo() returns a list of address structures. Try each address until we successfully bind(2). If socket(2) (or bind(2)) fails, we (close the socket and) try the next address. */ for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0) break; /* Success */ close(sfd); } if (rp == NULL) { /* No address succeeded */ fprintf(stderr, "Could not bind\n"); exit(EXIT_FAILURE); } freeaddrinfo(result); /* No longer needed */ /* Read datagrams and echo them back to sender */ for (;;) { peer_addr_len = sizeof(struct sockaddr_storage); nread = recvfrom(sfd, buf, BUF_SIZE, 0, (struct sockaddr *) &peer_addr, &peer_addr_len); if (nread == -1) continue; /* Ignore failed request */ char host[NI_MAXHOST], service[NI_MAXSERV]; s = getnameinfo((struct sockaddr *) &peer_addr, peer_addr_len, host, NI_MAXHOST, service, NI_MAXSERV, NI_NUMERICSERV); if (s == 0) printf("Received %zd bytes from %s:%s\n", nread, host, service); else fprintf(stderr, "getnameinfo: %s\n", gai_strerror(s)); if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr, peer_addr_len) != nread) fprintf(stderr, "Error sending response\n"); } }
#include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #define BUF_SIZE 500 int main(int argc, char *argv[]) { struct addrinfo hints; struct addrinfo *result, *rp; int sfd, s, j; size_t len; ssize_t nread; char buf[BUF_SIZE]; if (argc < 3) { fprintf(stderr, "Usage: %s host port msg...\n", argv[0]); exit(EXIT_FAILURE); } /* Obtain address(es) matching host/port */ memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */ hints.ai_flags = 0; hints.ai_protocol = 0; /* Any protocol */ s = getaddrinfo(argv[1], argv[2], &hints, &result); if (s != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(s)); exit(EXIT_FAILURE); } /* getaddrinfo() returns a list of address structures. Try each address until we successfully connect(2). If socket(2) (or connect(2)) fails, we (close the socket and) try the next address. */ for (rp = result; rp != NULL; rp = rp->ai_next) { sfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); if (sfd == -1) continue; if (connect(sfd, rp->ai_addr, rp->ai_addrlen) != -1) break; /* Success */ close(sfd); } if (rp == NULL) { /* No address succeeded */ fprintf(stderr, "Could not connect\n"); exit(EXIT_FAILURE); } freeaddrinfo(result); /* No longer needed */ /* Send remaining command-line arguments as separate datagrams, and read responses from server */ for (j = 3; j < argc; j++) { len = strlen(argv[j]) + 1; /* +1 for terminating null byte */ if (len + 1 > BUF_SIZE) { fprintf(stderr, "Ignoring long message in argument %d\n", j); continue; } if (write(sfd, argv[j], len) != len) { fprintf(stderr, "partial/failed write\n"); exit(EXIT_FAILURE); } nread = read(sfd, buf, BUF_SIZE); if (nread == -1) { perror("read"); exit(EXIT_FAILURE); } printf("Received %zd bytes: %s\n", nread, buf); } exit(EXIT_SUCCESS); }


Question 1 of 10
Relating & Networking 1
You are working with other people from different trades on building a new house.
You have been given the job of hanging a radiator on a wall.
The carpenter is on site today and is currently still working on the wall that you need to hang your radiator on.
You have not met this carpenter before or spoken to them, but you may need to work together to get the wall built and the radiator hung on it by the end of the day.
Choose your approach
Please select an option from the choices above before continuing.


'Marvelous Mrs. Maisel' actor Brian Tarantina dies at 60
Medical examiner to determine cause of death
by Laura Ly and Jason Hanna, CNN(CNN) - Brian Tarantina, an actor who recently played the role of Jackie in Amazon's "The Marvelous Mrs. Maisel" series, has died in New York at age 60, his manager told CNN on Saturday.
Tarantina was found in his midtown Manhattan apartment after someone called 911 to say he was unconscious, and medics pronounced him dead at the scene, the New York Police Department said.
A medical examiner will determine the cause of death, the department said.
Tarantina had been "quite ill recently" and was recuperating at home, said his manager, Laurie Smith.
"I have known him for years. He was an amazing, very, very talented actor and very sweet person," Smith said. "I was really shocked and very sad. I'm still shocked."
Tarantina was with the "The Marvelous Mrs. Maisel" cast in January when it picked up a Screen Actors Guild award for top performance by an ensemble in a comedy series.
He appeared in this year's crime drama "The Kitchen" starring Melissa McCarthy, Tiffany Haddish and Elisabeth Moss. His acting credits include roles in TV's "Gilmore Girls" and movies including "Summer of Sam" and "Uncle Buck."


AikidoTrack
people
Member details
list
Attendance
event
Date
Apply
Type
Time
Duration (mins)
Attendance
add
Add session
Session details
Basic info
ID
Junior
Beginner
General
Advanced
Iaido
Weapons
Type
event
Date
access_time
Start time
Duration
Attendance
First name
Last name
Type
Present
search
Filter
Filter by type
Present


Inside luxury cruise ships used to accommodate fans at 2022 World Cup in Qatar
The 94,409-ton MSC Poesia boasts three swimming pools, four whirlpool baths, authentic Japanese sushi bar, state-of-the art gym, mini golf and a poker room
by Anthony HarwoodPoolside cinemas, whirlpool baths, spa centres and rooms with ocean views – it’s not exactly what the average football fan is used to at a World Cup.
But, following the announcement of the first two cruise liners that will be used to accommodate 4,000 people during the 2022 tournament in Qatar, some supporters can certainly look forward to living it up in between matches.
The floating hotels will be berthed at Doha Port in the Qatari capital and be used alongside hotels, apartments and even tents in the desert to accommodate more than a million fans expected at the month-long tournament.
Qatar has chartered the ships from MSC Cruises and will use shuttle buses to take the fans to nearby train stations from where they will be able to reach the eight stadiums being used for the tournament – all of which lie within a 21-mile radius of the city.
The 94,409-ton MSC Poesia can normally be found cruising the corners of the world with amenities that include three swimming pools, four whirlpool baths, a foyer waterfall to a Zen Garden, authentic Japanese sushi bar, a state-of-the art gym, mini golf, tennis court, basketball court and poker room.
The other liner being used is the MSC Europa which hasn’t even been built yet and won’t come into service until May 2022, six months before the tournament kicks off.
When it’s finished it will be the biggest in the MSC Cruises fleet, capable of carrying up to 6,760 passengers.
It’s not yet known when fans will be able to buy tickets or how much a cabin will cost.
Nor has it been revealed whether alcohol will be served on board; strict laws on drinking in the Muslim country mean booze will only be served in specially-designated fan zones.
The tiny Gulf state – which is about the same size as Yorkshire and has a population of about 2.7million – needs to accommodate the fans of 32 teams in the tournament effectively in the same city and has had to resort to unusual means to fit everybody in.
But organisers have promised there will be enough room for everyone and that alcohol will be widely served.
A statement said: "Chartering cruise liners for fans has long been part of Qatar’s accommodation strategy, with the country keen to offer sustainable solutions."
Hassan Al Thawadi, Secretary General of the Supreme Committee, said: "We are pleased to collaborate with MSC Cruises to deliver this unique accommodation option for fans in 2022.
"We are sure fans from all over the world will be excited at the prospect of staying on board a cruise ship, with a fabulous view of the West Bay, and fast access to the all the stadium and fans zones."
Pierfrancesco Vago, Executive Chairman, MSC Cruises, added: "We are delighted that Qatar has selected our ships to ensure that tourists who visit the country during the upcoming FIFA World Cup have high-end accommodation and services available to further enrich their experience."