Texar is an open-source toolkit based on Tensorflow, aiming to support a broad set of machine learning especially text generation tasks, such as machine translation, dialog, summarization, content manipulation, language modeling, and so on. Texar is designed for both researchers and practitioners for fast prototyping and experimentation.
With the design goals of modularity, versatility, and extensibility in mind, Texar extracts the common patterns underlying the diverse tasks and methodologies, creates a library of highly reusable modules and functionalities, and facilitates arbitrary model architectures and algorithmic paradigms, e.g.,
With Texar, cutting-edge complex models can be easily constructed, freely enriched with best modeling/training practices, readily fitted into standard training/evaluation pipelines, and fastly experimented and evolved by, e.g., plugging-in and swapping-out different modules.
Builds a (self-)attentional sequence encoder-decoder model, with different learning algorithms:
import texar as tx
# Data
data = tx.data.PairedTextData(hparams=hparams_data) # Hyperparameter configs in `hparams`
iterator = tx.data.DataIterator(data)
batch = iterator.get_next() # A data mini-batch
# Model architecture
embedder = tx.modules.WordEmbedder(data.target_vocab.size, hparams=hparams_emb)
encoder = tx.modules.TransformerEncoder(hparams=hparams_encoder)
outputs_enc = encoder(inputs=embedder(batch['source_text_ids']),
sequence_length=batch['source_length'])
decoder = tx.modules.AttentionRNNDecoder(memory=output_enc,
memory_sequence_length=batch['source_length'],
hparams=hparams_decoder)
outputs, _, _ = decoder(inputs=embedder(batch['target_text_ids']),
sequence_length=batch['target_length']-1)
# Loss for maximum likelihood learning
loss = tx.losses.sequence_sparse_softmax_cross_entropy(
labels=batch['target_text_ids'][:, 1:],
logits=outputs.logits,
sequence_length=batch['target_length']-1) # Automatic masks
# Beam search decoding
outputs_bs, _, _ = tx.modules.beam_search_decode(
decoder,
embedding=embedder,
start_tokens=[data.target_vocab.bos_token_id]*num_samples,
end_token=data.target_vocab.eos_token_id)
# Policy gradient agent for RL learning
agent = tx.agents.SeqPGAgent(samples=outputs.sample_id,
logits=outputs.logits,
sequence_length=batch['target_length']-1,
hparams=config_model.agent)
Many more examples are available here
Check out the tech report for more details:
Texar: A Modularized, Versatile, and Extensible Toolkit for Text Generation
Zhiting Hu, Haoran Shi, Zichao Yang, Bowen Tan, Tiancheng Zhao, Junxian He, Wentao Wang, Xingjiang Yu, Lianhui Qin, Di Wang, Xuezhe Ma, Hector Liu, Xiaodan Liang, Wanrong Zhu, Devendra Singh Sachan, Eric P. Xing
2018
@article{hu2018texar,
title={Texar: A Modularized, Versatile, and Extensible Toolkit for Text Generation},
author={Hu, Zhiting and Shi, Haoran and Yang, Zichao and Tan, Bowen and Zhao, Tiancheng and He, Junxian and Wang, Wentao and Yu, Xingjiang and Qin, Lianhui and Wang, Di and Ma, Xuezhe and Liu, Hector and Liang, Xiaodan and Zhu, Wanrong and Sachan, Devendra Singh and Xing, Eric},
year={2018}
}
Texar is released under the Apache License 2.0


Open full menu
LeadStories
Hoax Alert
Analysis
Red Feed
Blue Feed
Satire
Sorry, Page not found
Some error happened
Lead
Stories
Go
Home page
Hoax Alert
Analysis
Red Feed
Blue Feed
Satire


| Signature | Description | Parameters |
template<typename T, typename V>
V &
single_act_visit(const char *name, V &visitor);
|
This is similar to visit(), but it passes a const reference to the index vector and the named column vector at once the functor visitor. This is convenient for calculations that need the whole data vector, for example auto-correlation.
NOTE: There is also a const version of this method.
|
T: Type of the named column
V: Type of the visitor functor
name: Name of the data column
|
template<typename T, typename V>
std::future<V &>
single_act_visit_async(const char *name, V &visitor);
|
These are identical to above single_act_visit() but could execute asynchronously.
NOTE: It should be safe to run multiple single_act_visit on different columns at the same time (as long as the index column is not being modified).
NOTE: It should be safe to run multiple read-only single_act_visit on the same column or different columns at the same time
NOTE: There is also a const version of this method.
|
|
template<typename T1, typename T2, typename V>
V &
single_act_visit(const char *name1, const char *name2, V &visitor);
|
This is similar to visit(), but it passes a const reference to the index vector and the two named column vectors at once the functor visitor. This is convenient for calculations that need the whole data vector.
NOTE: There is also a const version of this method.
|
T1: Type of the first named column
T2: Type of the second named column
V: Type of the visitor functor
name1: Name of the first data column
name2: Name of the second data column
|
template<typename T1, typename T2, typename V>
std::future<V &>
single_act_visit_async(const char *name1, const char *name2, V &visitor);
|
These are identical to above single_act_visit() but could execute asynchronously.
NOTE: It should be safe to run multiple single_act_visit on different columns at the same time (as long as the index column is not being modified).
NOTE: It should be safe to run multiple read-only single_act_visit on the same column or different columns at the same time
NOTE: There is also a const version of this method.
|
|


Mr.Roboto
Now that we can set the perspetive, model-view matrix and can position different elements using push and pop matrix lets make a complex scene. Instead of just drawing a few boxes, we're going to draw a box robot. At that, one that moves!
The final project will look something like this:
New scene
So, lets get started! Make a new demo scene that extends the Game
class. Add the DrawCube, LookAt and Perspective helper functions to this class. Also, add a grid.
We're ging to add 8 floats to this class. The first 4 are the angles for the arms and legs of the robot. The last 4 are the direction in which the arms / legs are moving!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK.Graphics.OpenGL;
namespace GameApplication {
class MrRoboto : Game {
Grid grid = null;
float leftArmRot = -15.0f;
float rightArmRot = 15.0f;
float leftLegRot = 15.0f;
float rightLegRot = -15.0f;
float leftArmDir = 1.0f;
float rightArmDir = -1.0f;
float leftLegDir = -1.0f;
float rightLegDir = 1.0f;
public override void Initialize() {
grid = new Grid();
// THIS CALL IS NEEDED
// We will discuss what it does later!
GL.Enable(EnableCap.DepthTest);
}
protected static void LookAt(float eyeX, float eyeY, float eyeZ, float targetX, float targetY, float targetZ, float upX, float upY, float upZ) {
// copy / paste
}
public static void Perspective(float fov, float aspectRatio, float znear, float zfar) {
// copy / paste
}
public static void DrawCube() {
// copy / paste
}
public override void Update(float dTime) {
// todo
}
public override void Render() {
// todo
}
}
}
The only thing to note in the above code is the GL.Enable(EnableCap.DepthTest)
call. We have not discussed what that does yet, we will in a later chapter. For now, just turn it on, it's needed for the game to run.
Update
Next up, lets animate those rotation variables! In the update we're going to animate the rotation of each limb by 50 degrees / second. If a limb's rotation is > +20 or < -20 we will reverse it's direction
public override void Update(float dTime) {
// Update rotations
leftArmRot += 50.0f * dTime * leftArmDir;
rightArmRot += 50.0f * dTime * rightArmDir;
leftLegRot += 50.0f * dTime * leftLegDir;
rightLegRot += 50.0f * dTime * rightLegDir;
// Clamp & change direction at edge
if (leftArmRot > 20.0f || leftArmRot < -20.0f) {
// Clamp to -15 or +15, depending on if the number
// is negative or positive
leftArmRot = (leftArmRot < 0.0f) ? -20.0f : 20.0f;
// Change direction
leftArmDir *= -1.0f;
}
if (rightArmRot > 20.0f || rightArmRot < -20.0f) {
rightArmRot = (rightArmRot < 0.0f) ? -20.0f : 20.0f;
rightArmDir *= -1.0f;
}
if (leftLegRot > 20.0f || leftLegRot < -20.0f) {
leftLegRot = (leftLegRot < 0.0f) ? -20.0f : 20.0f;
leftLegDir *= -1.0f;
}
if (rightLegRot > 20.0f || rightLegRot < -20.0f) {
rightLegRot = (rightLegRot < 0.0f) ? -20.0f : 20.0f;
rightLegDir *= -1.0f;
}
}
Render
Let's start out by simply rendering our grid, up to this point, the render function should look rather familiar. I'm also going to include a function called RenderRobot
, i want to write the render code for the robot in it's own function, to make it re-usable and to keep the render loop clean.
public override void Render() {
GL.Viewport(0, 0, MainGameWindow.Window.Width, MainGameWindow.Window.Height);
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
Perspective(60.0f, (float)MainGameWindow.Window.Width / (float)MainGameWindow.Window.Height, 0.01f, 1000.0f);
GL.MatrixMode(MatrixMode.Modelview);
GL.LoadIdentity();
LookAt(
10.0f, 5.0f, 15.0f,
0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f
);
grid.Render();
DrawRobot(-1.0f, 1.0f, 0.0f);
}
The draw robot function takes 3 arguments, world x, world y and world z. The cameras positon is 10, 5, 15 and it is looking at point 0, 0, 0. The near and far plane are almost 1000 units apart, so we can see just about anything in the scene.
Draw Robot
This is going to be the basic function to draw our (un-animated) robot:
void DrawRobot(float x, float y, float z) {
// Save the matrix state we enter this function with
GL.PushMatrix();
// Translate the robot to the desired coordinates
// because all body parts will be based off of this position
// we don't need to push a matrix here
GL.Translate(x, y, z);
// Draw the head, becuase it multiplies a position we have to push matrix
GL.Color3(1.0f, 0.0f, 0.0f); // Red
GL.PushMatrix();
GL.Translate(1.0f, 4.0f, 0.0f);
GL.Scale(0.5f, 0.5f, 0.5f);
DrawCube();
GL.PopMatrix(); // finish head
// Draw the body
GL.Color3(0.0f, 1.0f, 0.0f); // green
GL.PushMatrix();
GL.Translate(1.0f, 2.5f, 0.0f);
GL.Scale(0.75f, 1.0f, 0.5f);
DrawCube();
GL.PopMatrix(); // finish body
// Draw left arm
GL.Color3(0.0f, 0.0f, 1.0f); // blue
GL.PushMatrix();
GL.Translate(0.0f, 2.25f, 0.0f);
GL.Scale(0.25f, 1.0f, 0.25f);
DrawCube();
GL.PopMatrix();
// Draw right arm
GL.Color3(1.0f, 0.0f, 1.0f); // magenta
GL.PushMatrix();
GL.Translate(2.0f, 2.25f, 0.0f);
GL.Scale(0.25f, 1.0f, 0.25f);
DrawCube();
GL.PopMatrix();
// Draw left leg
GL.Color3(1.0f, 1.0f, 0.0f); // yellow
GL.PushMatrix();
GL.Translate(0.5f, 0.5f, 0.0f);
GL.Scale(0.25f, 1.0f, 0.25f);
DrawCube();
// Draw left foot. Since nothing else uses the modellview matrix beofore
// the next pop, we don't have to technically include this push call.
// But i think including it makes it obvious that the foot is being
// drawn relative to the leg!
GL.PushMatrix();
GL.Translate(0.0f, -1.0f, 1.0f);
GL.Scale(1.0f, 0.25f, 2.0f);
DrawCube();
GL.PopMatrix();
GL.PopMatrix();
// Draw right leg
GL.Color3(0.0f, 1.0f, 1.0f); // baby blue
GL.PushMatrix();
GL.Translate(1.5f, 0.5f, 0.0f);
GL.Scale(0.25f, 1.0f, 0.25f);
DrawCube();
// Draw right foot.
GL.PushMatrix();
GL.Translate(0.0f, -1.0f, 1.0f);
GL.Scale(1.0f, 0.25f, 2.0f);
DrawCube();
GL.PopMatrix();
GL.PopMatrix();
// Restore original matrix state, like if this function
// never did anything to matrices ;)
GL.PopMatrix();
}
The comments in the code above outline what is happening, but lets discuss it real quick anyway. The robot is made up of 8 cubes. We first scale the cube into the shape of a certain body part. Once the body part has the right shape, we translate it into position.
The most interesting bit here are the feet on the legs. Because each foot is rendered inside the push / pop block of the leg it belongs to, when we rotate the leg we will also rotate the foot.
How did we come up with the scale (1.0f, 0.25f, 2.0f) for the feet? Well, if we don't translate or scale in there, just draw a cube it will draw the leg cube. We want the foot cube to be just as wide as the leg, so the X-scale stays 1. Relative to the leg, we want to foot to be 1/4 the height of the leg. So y scale becomes 0.25. We want the foot to be deeper than the leg, so it can jot out. Relative to the leg we want the foot twice as long, so we scale Z by 2.
This is an important concept. Each time we transform something, we are transforming it relative to the space it's in. The leg is relative to view space, the foot is relative to the legs model space. If we had toes they would be relative to the foots model space.
The concept of relative spaces is very important. If you don't understand it talk to me on skype!
With the above render code in place, your robot should render like so:
Animate
Awesome! Now we have a robot!But it's not doing anything.... Lame. Let's animate some movement!
To add animation, all we have to do is account for rotation for all major joints. Left and right arms both rotate. Left and right legs both rotate. The left and right feed don't rotate independently, they rotate with the legs.
Here is how you would rotate the left arm:
// Draw left arm
GL.Color3(0.0f, 0.0f, 1.0f); // blue
GL.PushMatrix();
GL.Translate(0.0f, 2.25f, 0.0f);
GL.Rotate(leftArmRot, 1.0f, 0.0f, 0.0f);
GL.Scale(0.25f, 1.0f, 0.25f);
DrawCube();
GL.PopMatrix();
The only thing new is we added Rotate to the transfomration matrix of the arm. Try to rotate the otehr limbs yourself.
Once you have all of this, you should see the limbs swinging. Only one problem, the arms are not rotating at the shoulder, they are rotating at the elbow! Same for the legs...
Pivot
The reason our rotations look messed up is because of how they pivot! To understand what's going on, lets discect what happens when you draw just one part of the robot, the left arm:
- We start off with a unit cube, this is just some cube
- We scale the cube, this gives it the correct porportion
- We apply a rotation to the cube, this rotates the cube around it's own ceter
- We position the rotated cube into it's final place
Where things break is step 3. The rotate function rotates the object around the center of the objects coordinate system, and thats why we don't pivot around the shoulder.
How can we fix this? Well, we know that all rotations happen around the origin of the objects model matrix. We can translate the model matrix so that the point we want to pivot is at it's origin, then do the rotation and then translate the model matrix back to how it was. This would give us control over where the pivot point goes.
If that sounds confusing, maybe this will clear it up:
So how would we do this pivoting for the left arm?
// Draw left arm
GL.Color3(0.0f, 0.0f, 1.0f); // blue
GL.PushMatrix();
GL.Translate(0.0f, 2.25f, 0.0f);
GL.Translate(0.0f, 1.0f, 0.0f); // UnPivot
GL.Rotate(leftArmRot, 1.0f, 0.0f, 0.0f);
GL.Translate(0.0f, -1.0f, 0.0f); // Pivot
GL.Scale(0.25f, 1.0f, 0.25f);
DrawCube();
GL.PopMatrix();
If you run with that code, the left arm will pivot around the shoulder joing. So, the question is, why do we move this joint by -1 on the y?
To answer that question, we still want to rotate around the center of the arm on the X and Z axis, we just want to rotate at the tip of the Y axis (on the top of the arm).
If you look at the cube being drawn, the Y scale is 1. Remember, the height of the cube is 2, because it goes from -1 to +1. Default rotation is around 0, 0. So to rotate around the tip of the arm we have to subtract 1, our pivot point is 0, -1.
Why -1, wouldn't +1 make more sense? Remember, in OpenGL positive Y goes down, negative Y goes up. If we pivoted to 0, 1 the arm would pivot around the fingers. Kind of the opposite of what we want.
Go ahead and try to add pivots to the rest of the robot to complete it's walk-cycle.


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Posting Comments
In order to post comments to stories, you will have to
create an account.
Accounts will generally be validated within 24 hours, and of
course will be disabled if there is abuse.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
Other Rotten
Rotten
Gaping Maw
Celebrity Morgue
Mugshots
Rotten Store
Rate My Poo
Rate My Kitten
Rate My Finger
Penny Postcards
Phallic
Boners
Home
Make Dailyrotten your start page
|
|
|
December 06, 2002
Ninth Circuit tries to rewrite history
San Jose Mercury News | Submitted by: Soylent
In an apparent misunderstanding of both history and English grammar, the
Ninth Circuit Court of Appeals ruled that the second amendment to the U.S.
Constitution doesn't actually mean the right to keep and bear arms
shall not be infringed, as it states. The word "not" is merely an
oversight, or a historical artifact that somehow managed to make it onto
paper. Unfortunately for the Ninth Circuit, there is another of their peers,
the Fifth Circuit, who disagrees. Sorry Judge Reinhardt, you will find that
it is not this easy to amend the Constitution.
|
|
Read article...
|
|
Wal-Mart stealing from charity
KMGH-TV 7 Denver | Submitted by: Ann Onymous
"Toys that had been placed in a drop-off box for charity at a Wal-Mart store
were put back on the store's shelves after a mix-up that frustrated
organizers. With 10 days left until the end of the annual Toys for Tots drive
for the Logan County Chamber of Commerce, organizer Susan Kraich said she
was back at square one. "I've been keeping an eye on that box every time I
went to Wal-Mart, and was so excited as it slowly began to fill. Over the
weekend I heard that it was nearly full, so I went to pick it up. I was
devastated when I found it empty." Wal-Mart said they would replace items she
could demonstrate were in the box. Wal-Mart replaced three of the toys.
|
|
Read article...
|
|
Bin Laden as action hero
CBS News | Submitted by: Scooter The Wonderduck
Looking for someone to fight your GI Joes? Look no further:
"One of this year's 'must-haves' would probably be banned from sale
in many parts of the West. It's a distinctive, bearded figurine,
riding 'shotgun' in a military jeep.
|
|
Read article...
|
|
Will end remain tight in prison?
ESPN | Submitted by: SpecialK
Why is this not just another "athlete pulled over and arrested for drug
possession" story? Because University of Arizona tight end Justin Levasseur
had 87 pounds of the wacky weed. That's a LOT of disappointed stoners.
He's looking at up to thirty years if convicted.
|
|
Read article...
|
|
New Berkeley mayor is a cheat
UCB Daily Cal | Submitted by: CUAdam
"Berkeley Mayor Tom Bates has admitted responsibility for stealing and
trashing about 1,000 copies of The Daily Californian that carried the
student newspaper's endorsement of his opponent, police said yesterday...
"It's especially ironic he would have thrown these Daily Cals away just
a few feet away from the birthplace of the Free Speech Movement."
What does the mayor, the one who stole the papers, say about all this?
"I think we all agree that campaigns must be about furthering the free
exchange of ideas. Any effort to impede this free exchange is a great
disservice to The Daily Californian and the people of Berkeley."
|
|
Read article...
|
|
I Want My Porn-TV
Agence France-Presse | Submitted by: Dirty Sammy
"Many Helsinki residents expressed outrage Thursday after a local cable
TV network monopoly said it was cancelling free porn shows carried by two
low-budget cable channels. "Why, that's outrageous. It smacks of older
times and political correctness, and it's certainly not what the people
want," one viewer, who asked to remain anonymous, told AFP."
|
|
Read article...
|
|
Kaboom: The suicide bomber game
New York Times | Submitted by: Humboldt Honey
Points are given for the number of people killed or maimed:
"Understandably, Kaboom has offended many. Representative Nita M. Lowey,
Democrat of New York, called on [Newgrounds] to remove it. Lewis Roth, assistant
executive director of Americans for Peace Now, a prominent pro-Israel
organization, said the group was deeply troubled by the game's trivialization
of recent events in Israel. "The violence and the tragedy of the intifada is
bad enough without trying to replicate that kind of bloodshed in a computer
game," Mr. Roth said."
|
|
Read article...
|
|
Mars past not so pleasant
Science Daily | Submitted by: Crazy Quagga
Mars was far less wet and warm than scientists originally thought.
Asteroids pelting the surface threw up dust clouds and kept out the sun.
This theory is being pushed by a man named Toon. "According to Toon,
previous theories that carbon dioxide gas and clouds warmed Mars during its
early history 'just have not worked out quantitatively.' There is no evidence
on Mars of large limestone deposits from the first billion years, which would
be directly linked to large amounts of C02, a greenhouse gas, he said."
|
|
Read article...
|
|
Urban legend leads to drug bust
Vancouver Sun | Submitted by: jacintha
"A woman accidentally called police early Tuesday morning because her son
told her dialing an extra one after 911 would connect her with a taped message
explaining whether or not police officers were tapping her phones... Officers,
concerned there might be an emergency at the house, quickly showed up at her
door in the 15100 block of 60th Avenue... Inside, police discovered 'a
reasonably sized' marijuana growing operation."
|
|
Read article...
|
|
Thief not so rehabilitated
Canadian Press | Submitted by: jacintha
"A man charged with theft didn't have the money to pay for a rehabilitation
program that would clear his criminal record, so he stole a courthouse
computer to pawn off, police said." He forgot to steal the power cable, so
he went back for it, and was caught by a secretary.
|
|
Read article...
|
|
Jackass The Lawsuit
Missoulian | Submitted by: Camsmama
"Last week, Jack Ass the man sued Viacom, the parent corporation of the
Jackass movie and TV properties, alleging plagiarism and infringement of
trademark and copyright. Jack Ass claims his public-service enterprises
promoting responsible drinking, heart-shaped public memorials for accident
victims and anthropomorphic cartoons that humorously promote the use of
designated drivers have been harmed by the Jackass movie and TV series."
This is almost written like The Onion.
|
|
Read article...
|
|
Starvation and boredom as performance art
Village Voice | Submitted by: Son of Benway
"Halfway up the wall were three open platforms where she intended to
live: without eating, without speaking—for 12 days. She would have no
privacy. Not only were the rooms open, but spectators would be invited
to observe the artist through a high-powered telescope. And she would
have no escape. The ladders leaning against bedroom, sitting room,
and bathroom had rungs made of large butcher knives."
|
|
Read article...
|
|
Florida hosts Woodstock for Racists
Wire Services | Submitted by: Son of Benway
"The Hammerskins, which uses Confederate flags and Nazi swastikas as its
emblems, is an umbrella organization for the skinhead movement. It has
sponsored an annual Hammerfest since 1997, according to the Anti-Defamation
League, which tracks white supremacist groups. Bands with names like Attack,
Definite Hate, White Wash and Intimidation One use lyrics that promote
beating and killing nonwhites, especially blacks and Jews."
|
|
Read article...
|
|
Lick that toad
Wire Services | Submitted by: SFpolarbear
"Dutch police are investigating whether drug addicts raided a pet shop and
stole three exotic toads whose warty skin can induce hallucinations when
licked... The fist-sized brown cane toads, from the bufo marinus species, are
originally from South America and secrete a toxin from glands on their necks
and backs as a defense against predators."
|
|
Read article...
|
|
Rat Olympics
WKMG-TV 6 Orlando | Submitted by: Rio
"Several rats in Nebraska were winners of Olympic medals in an unique
competition that features the animals lifting weights and even long-distance
jumping against each other. The 28th annual Rat Olympics was held at Nebraska
Wesleyan University in Lincoln. "First we have to train them to learn what
they are going to be eating for food," student Erick Hjermstad said. "A lot
of it is positive reinforcement, giving them a lot of food, training them
when to eat and that really gets them going."
|
|
Read article...
|
|
If all else fails, drop yer pants!
Monterey Herald | Submitted by: The Good Doctor
"The strange case of Mike Echols took an even stranger twist Thursday when
the crusader against pedophilia ignored his attorney's advice and gave an
impassioned speech in court defending himself against charges of trespassing
and indecent exposure. After being cited for trespassing and obstructing an
officer, Echols dropped his pants and waved his genitalia at him.
Echols denies it."
|
|
Read article...
|
|
Spammer can't take what he dishes out
Detroit Free Press | Submitted by: Alaska Freegold
After we kill all the lawyers, lets start on the spammers: "West Bloomfield
bulk e-mailer Alan Ralsky, who just may be the world's biggest sender of
Internet spam, is getting a taste of his own medicine. Ever since I [Mike
Wendland] wrote a story on him a couple of weeks ago, he says he's been
inundated with ads, catalogs and brochures delivered by the U.S. Postal
Service to his brand-new $740,000 home."
|
|
Read article... and
This article...
|
|
Drugs are just bad, M'kay
Toronto Star | Submitted by: Meerkat
"A high school student got an F for effort from a Winnipeg judge this
week when the essay he was ordered to write on the evils of drugs turned
into a "how-to" guide filled with advice for young users. The teen
suggested he was simply giving the "complete truth" about ecstasy."
The judge was not amused.
|
|
Read article...
|
|
K-Mart raid pigs indicted
Houston Chronicle | Submitted by: f00f
A followup in the ridiculous K-Mart raid: "The Aug. 18 raid in the 8400
block of Westheimer was intended to crack down on drag racing, but the arrests
were made for trespassing and curfew violations. Thirteen police supervisors
were suspended in the incident, and the city faces one lawsuit and 89 claims
for damages filed by people seeking millions of dollars." Two policemen have
been indicted for their role in the crackdown.
|
|
Read article...
|
|
Thief of massive proportions
News Corporation | Submitted by: Honkey Kong
"Jim Dal stands 191cm, weighs 158kg and can't buy gloves big enough to cover
his hands. Which is why, according to police, he wraps his fists with stolen
tea towels or calico bank bags when operating as one of Australia's busiest
and most brazen burglars. The giant appeared in the Melbourne Magistrates'
Court yesterday charged with 354 offences, including 212 burglaries, 127
thefts and 12 attempted burglaries."
|
|
Read article...
|
|
|
|
|


West Bengal (WB) Police Constable Prelims Result 2019 declared at policewb.gov.in: How to check marks online
West Bengal Police Constable Result 2019: Candidates who have appeared for the written examination can check their result through the official website of WB Police at wbpolice.gov.in.


This phonetic keyboard is designed for the N'Ko script of West Africa. The keyboard has been developed to make it easy to type all of the letters and diacritics necessary for N'Ko.
(c) 2012-2020 Michael Everson and SIL International


Guidance
Resources to help schools and providers promote their School Direct initial teacher training programmes.
These resources are for initial teacher training (ITT) providers and schools participating in School Direct programmes.
Please see our recruitment and marketing guide for information on creating a successful marketing campaign to recruit candidates to your School Direct programme, and Guidance on your UCAS entry ( PDF , 1.89MB , 29 pages ) for help with writing entry profiles.
This page is part of the collection, School Direct: marketing resource bank , which includes other downloadable promotional material.
We are holding a national marketing day on Wednesday 1 March 2017 from 10.30am to 3pm.
The event is being held at The Pier Centre, Pottery Road, Wigan, Greater Manchester WN3 5AB.
This event is for all School Direct lead schools and SCITTs with sessions about how to maximise the impact of your marketing and create an effective campaign.
If you have any questions about the event please contact<EMAIL_ADDRESS>.
Please note that most of these files will need to be downloaded to your computer in order to use them. To do this, you should right-click the link and select ‘Save As’, ‘Save Link As’, or ‘Save Target As’.
Please read:
Poster
Your future, their future: A3 editable poster ( PDF , 6.06MB , 1 page )
Your future, their future: A4 editable poster ( PDF , 206KB , 1 page )
Postcard
Your future, their future: A6 editable postcard ( PDF , 40.2KB , 1 page )
A4, 4-up postcard ( PDF , 17.6KB , 1 page )
A3, 8-up postcard ( PDF , 10.5KB , 1 page )
Flyer
Your future, their future: A5 editable flyer ( PDF , 125KB , 1 page )
A4, 2-up flyer ( PDF , 10.3KB , 1 page )
A3, 4-up flyer ( PDF , 12.2KB , 1 page )
Scholarship flyers
Chemistry scholarships flyer ( PDF , 1.12MB , 4 pages )
Geography scholarships flyer ( PDF , 231KB )
Languages scholarships flyer ( PDF , 282KB , 1 page )
Mathematics scholarships flyer ( PDF , 1.27MB , 2 pages )
Physics scholarships flyers ( PDF , 1.87MB , 4 pages )
BCS teacher training scholarships flyer ( PDF , 4.47MB , 1 page )
Press advert: guidelines for schools ( PDF , 725KB , 5 pages )
Press advert: guidelines for printers ( PDF , 1.08MB , 8 pages )
Artwork zip file: large file - please email us if you would like us to send this to you or your printing company
Banner: guidelines for schools ( PDF , 131KB , 5 pages )
Banner: guidelines for printers ( PDF , 163KB , 5 pages )
Artwork zip file: large file - please email us if you would like us to send this to you or your printing company
A two-sided fact sheet that describes the types of teacher training courses.
Guidance on planning and delivering your teacher training recruitment event.
Use the materials ordering form to request our teacher training publications for your events.
Use the provider event details form to advertise your own events on the events section of the Get Into Teaching website.
Get valuable feedback on your event, by handing out the Event feedback form ( MS Word Document , 75.5KB ) to attendees.
If you need any help using these materials, or would like to request the large zip files to be sent to your printing company, please contact us.
Published: 1 June 2014
Updated: 8 February 2017


About Me
Creating meaningful work, as an artist, has been one of the primary passions of my life for the last 20 years. Graduating with a BFA in Ceramics in 1998 (Alfred University), I began utilizing my passion for teaching as well. I have taught in South Korea, Poland, Texas, Michigan, New York, and Oregon. I was also blessed to get an MA in Ceramics (Central Michigan University), and an MFA in Visual Arts (Azusa Pacific University). The last twenty years have found me plenty of opportunities for exhibition, and exploration. Along the way I have had the opportunity to experience a multitude of artistic and educational settings, ideologies and creative pathways. Through working with other artists and students, I have grown to respect and enjoy the many ways people find their creative voice, passion and calling.
It is this variety of experience that has led me to create Rosselle Studios. Throughout my career as an artist-teacher I have found that opening up your creative practice to collaboration, new art media, and divergent ways of thinking about the creative process leads to new and dynamic work. While, ceramics will always be my first love when it comes to art materials, I also love painting, fibers, mixed media, and installation art. Collaborating and seeking the insight of other creative individuals both in and out of the art field has also lead to important dialogues within my work.


Library Management System
Sign out
Manage Books
All Books
Create Book
Manage Users
All Users
Search User
New User


Hugh Grant and Guy Ritchie recreate fathers' Army picture
Actor Hugh Grant and film director Guy Ritchie have recreated a picture of their Army officer fathers for Armistice Day.
Capt John Ritchie and Capt James Grant were with the Seaforth Highlanders stationed in Singapore 65 years ago.
Hugh Grant is starring in Ritchie's latest film, The Gentleman, which is being filmed in London.
Events took place across the UK on the 100th Armistice Day commemoration held since the end of World War One.
The Seaforth Highlanders merged with the Queen's Own Cameron Highlanders in 1961 to form the Queen's Own Highlanders (Seaforth and Camerons).
Interactive Hugh Grant and Guy Ritchie recreate fathers' army picture
Posting the images on social media, Guy Ritchie said: "This first picture was taken 65 years ago in Singapore where my dad - Captain John Ritchie - and Hugh Grant's dad - Captain James Grant - were stationed in the same regiment, the Seaforth Highlanders.
"The second picture - taken on a film set in London 65 years later, has one grandson and two sons recreating that original image.
"We'd discovered by co-incidence that Rory Gibb, our production assistant on the film's granddad was in that same original picture. You can see the resemblance."


Romeo Must Die (2000) 2 stars out of 4. Starring Jet Li, Aaliyah and Delroy Lindo.
"Romeo Must Die" is definitely a guilty pleasure movie.
An action-packed, one-two punch of martial arts and hip-hop, the film marks the starring debut of Hong Kong action star Jet Li.
Li was the main action heavy in "Lethal Weapon IV" and walked away with the film without so much as a thank you to Mel Gibson and company.
Set mainly around the Oakland waterfront, "Romeo Must Die," as the title implies, involves two warring families, one black the other Chinese.
Li is Han, whose father is the head of the Chinese faction. His co-star, Aaliyah (Trish) is the daughter of the leader of the black faction.
Han and Trish unite to solve a series of murders, including those of both their brothers.
Of course the story is mere stuff and nonsense centered around acquiring waterfront property in hopes of luring an NFL team back to Oakland.

All you really want to see is Li kick butt, face, stomach, groin and other body parts. And he does plenty of that.
The problem with "Romeo Must Die" is a lack of action. There is too much dialogue and too little Li. Not that he is much of an actor. His feet and hands usually do the talking for him.
And some dialogue is needed for exposition, but you merely tolerate those scenes waiting for Li to again knock the heck out of some smirking wise guy who can't see beyond Li's calm facade.
He is a tiger. The fight sequences are a superb melding of choreography and editing. At times it looks as if Li is defying gravity.
"Romeo Must Die" is not a movie for serious filmgoers. But fans of this genre will have a field day.
With Chow Yun-Fat and Jackie Chan also making movies for American studios, some enterprising studio boss should try to develop a script utilizing the talents of all three.
Now that would be a cinematic battle royal.
Bob Bloom is the film critic at the Journal and Courier in Lafayette, IN. He can be reached by e-mail at<EMAIL_ADDRESS>or at<EMAIL_ADDRESS>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


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Makes 12 slices
Dietary
Brighten up a special occasion, or cake sale, with this rich beetroot and chocolate flavour combo, decorated with heart-shaped candied beetroot!
For this recipe you will need a food processor.
Preheat the oven to 180C/160C Fan/Gas 4. Grease and line a 30x20cm/12x8in traybake tin.
Mix together the flour, cocoa powder and baking powder in a bowl.
Blend the beetroot in a food processor until you have a rough purée. Put the purée in a bowl, add the vinegar and buttermilk. Mix to combine.
Beat the butter and sugar together until light and fluffy. Gradually beat in the eggs, followed by half the dry mixture and half the beetroot mixture.
Continue to mix gently, adding the rest of the dry ingredients and the remaining beetroot. Pour the mixture into the tin and bake for 40-50 minutes. Leave to cool in the tin for 10 minutes before turning it out of the tin and leaving it to cool completely.
Meanwhile make the icing. Beat together the cream cheese and butter until soft. Beat in the icing sugar and vanilla extract until they are combined, then spread the icing onto the cooled cake.
For the beetroot hearts, thinly slice the beetroot, and cut into 12 heart shapes.
Boil the sugar in 200ml/7fl oz water until the sugar has dissolved, then add the beetroot hearts and simmer for about 10 minutes until soft and translucent. Using a fork, carefully remove the beetroot hearts from the hot sugar syrup and carefully lay them on paper towel to soak up any excess syrup.
Slice the cake into 12 even squares, and then decorate each square with a beetroot heart.


public interface ExecutionPackage
extends org.eclipse.emf.ecore.EPackage
ExecutionFactory
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ExecutionPackage.Literals
Defines literals for the meta objects that represent
each class,
each feature of each class,
each operation of each class,
each enum,
and each data type
|
| Modifier and Type | Field and Description |
|---|---|
static int |
AGGREGATED_INVOCATION
The meta object id for the '
Aggregated Invocation ' class. |
static int |
AGGREGATED_INVOCATION__SOURCE
The feature id for the 'Source' reference.
|
static int |
AGGREGATED_INVOCATION__TARGET
The feature id for the 'Target' reference.
|
static int |
AGGREGATED_INVOCATION_FEATURE_COUNT
The number of structural features of the 'Aggregated Invocation' class.
|
static int |
AGGREGATED_INVOCATION_OPERATION_COUNT
The number of operations of the 'Aggregated Invocation' class.
|
static int |
DEPLOYED_OPERATIONS_PAIR_TO_AGGREGATED_INVOCATION_MAP_ENTRY
The meta object id for the '
Deployed Operations Pair To Aggregated Invocation Map Entry ' class. |
static int |
DEPLOYED_OPERATIONS_PAIR_TO_AGGREGATED_INVOCATION_MAP_ENTRY__KEY
The feature id for the 'Key' attribute.
|
static int |
DEPLOYED_OPERATIONS_PAIR_TO_AGGREGATED_INVOCATION_MAP_ENTRY__VALUE
The feature id for the 'Value' containment reference.
|
static int |
DEPLOYED_OPERATIONS_PAIR_TO_AGGREGATED_INVOCATION_MAP_ENTRY_FEATURE_COUNT
The number of structural features of the 'Deployed Operations Pair To Aggregated Invocation Map Entry' class.
|
static int |
DEPLOYED_OPERATIONS_PAIR_TO_AGGREGATED_INVOCATION_MAP_ENTRY_OPERATION_COUNT
The number of operations of the 'Deployed Operations Pair To Aggregated Invocation Map Entry' class.
|
static ExecutionPackage |
eINSTANCE
The singleton instance of the package.
|
static java.lang.String |
eNAME
The package name.
|
static java.lang.String |
eNS_PREFIX
The package namespace name.
|
static java.lang.String |
eNS_URI
The package namespace URI.
|
static int |
EXECUTION_MODEL
The meta object id for the '
Model ' class. |
static int |
EXECUTION_MODEL__AGGREGATED_INVOCATIONS
The feature id for the 'Aggregated Invocations' map.
|
static int |
EXECUTION_MODEL_FEATURE_COUNT
The number of structural features of the 'Model' class.
|
static int |
EXECUTION_MODEL_OPERATION_COUNT
The number of operations of the 'Model' class.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.emf.ecore.EReference |
getAggregatedInvocation_Source()
Returns the meta object for the reference '
Source '. |
org.eclipse.emf.ecore.EReference |
getAggregatedInvocation_Target()
Returns the meta object for the reference '
Target '. |
org.eclipse.emf.ecore.EClass |
getAggregatedInvocation()
Returns the meta object for class '
Aggregated Invocation '. |
org.eclipse.emf.ecore.EAttribute |
getDeployedOperationsPairToAggregatedInvocationMapEntry_Key()
Returns the meta object for the attribute '
Key '. |
org.eclipse.emf.ecore.EReference |
getDeployedOperationsPairToAggregatedInvocationMapEntry_Value()
Returns the meta object for the containment reference '
Value '. |
org.eclipse.emf.ecore.EClass |
getDeployedOperationsPairToAggregatedInvocationMapEntry()
Returns the meta object for class '
Deployed Operations Pair To Aggregated Invocation Map Entry '. |
ExecutionFactory |
getExecutionFactory()
Returns the factory that creates the instances of the model.
|
org.eclipse.emf.ecore.EReference |
getExecutionModel_AggregatedInvocations()
Returns the meta object for the map '
Aggregated Invocations '. |
org.eclipse.emf.ecore.EClass |
getExecutionModel()
Returns the meta object for class '
Model '. |
getEClassifier, getEClassifiers, getEFactoryInstance, getESubpackages, getESuperPackage, getNsPrefix, getNsURI, setEFactoryInstance, setNsPrefix, setNsURI
getEAnnotation, getEAnnotations
static final java.lang.String eNAME
static final java.lang.String eNS_URI
static final java.lang.String eNS_PREFIX
static final ExecutionPackage eINSTANCE
static final int EXECUTION_MODEL
Model
' class.

AggregatedInvocationImpl
,
ExecutionPackageImpl.getAggregatedInvocation()
,
Constant Field Valuesstatic final int AGGREGATED_INVOCATION__SOURCE
static final int AGGREGATED_INVOCATION__TARGET
static final int AGGREGATED_INVOCATION_FEATURE_COUNT
static final int AGGREGATED_INVOCATION_OPERATION_COUNT
org.eclipse.emf.ecore.EClass getExecutionModel()
Model
'.
ExecutionModel
org.eclipse.emf.ecore.EReference getExecutionModel_AggregatedInvocations()
Aggregated Invocations
'.
ExecutionModel.getAggregatedInvocations()
,
getExecutionModel()
org.eclipse.emf.ecore.EClass getDeployedOperationsPairToAggregatedInvocationMapEntry()
Deployed Operations Pair To Aggregated Invocation Map Entry
'.
Map.Entry
org.eclipse.emf.ecore.EAttribute getDeployedOperationsPairToAggregatedInvocationMapEntry_Key()
Key
'.
Map.Entry
,
getDeployedOperationsPairToAggregatedInvocationMapEntry()
org.eclipse.emf.ecore.EReference getDeployedOperationsPairToAggregatedInvocationMapEntry_Value()
Value
'.
Map.Entry
,
getDeployedOperationsPairToAggregatedInvocationMapEntry()
org.eclipse.emf.ecore.EClass getAggregatedInvocation()
Aggregated Invocation
'.
AggregatedInvocation
org.eclipse.emf.ecore.EReference getAggregatedInvocation_Source()
Source
'.
AggregatedInvocation.getSource()
,
getAggregatedInvocation()
org.eclipse.emf.ecore.EReference getAggregatedInvocation_Target()
Target
'.
AggregatedInvocation.getTarget()
,
getAggregatedInvocation()
ExecutionFactory getExecutionFactory()
Copyright 2020 Kieker Project, http://kieker-monitoring.net


August 2016: For some useful comments from cruisers in the Philippines see this report.
April 2016: Both the US and the UK governments have advised against all travel to south-west Mindanao and the Sulu archipelago due to the high risk of kidnapping of international travellers and the increased threat of maritime kidnappings against small boats.
There are persistent rumours about the danger of pirates in the south of Mindanao and the Sulu Sea and yachts generally avoid this area. General advice seems to be to stay away from the Southern PI, including South Palawan and be careful heading between PI and Malaysia.
A well known marina on Samal Island near Davao in the southern Philippines was stormed by armed men in September 2015 and four yachties were kidnapped. Two of the captives were executed and two were released. See report here.
A German couple were abducted from their yacht by bandits at Palawan on their way back to Sabah in Malaysia after island-hopping in Mindanao, in April 2014. Read news report here. This area south of Palawan continues to be a dangerous area.
The area off the west coast at the southern end of Palawan, in particular Tagbita Bay, is also an area that should be avoided. See this latest Noonsite report.
A long-term cruiser in the Philippines sent this report to noonsite with security advice and places to avoid if cruising the country.
People are extremely friendly everywhere in the Philippines, however, the uncertain political situation in some parts of the country has seen worrying rebel groups developing in certain areas which means cruisers should explore with care and a carefully planned itinerary.
Last updated September 2016.
The Philippines have a tropical climate. The rainy, SW monsoon season is from June to September, the dry season October to May. The average temperature is 81°F (27°C) and humidity is high. The Philippines have a high incidence of typhoons, which are most frequent between June and October. The best season for cruising is from early January to mid-May when the weather is pleasant and the danger of typhoons is minimal.
Brunei Bay Radio operates a regular voice broadcast sked of METAREA and local coastal forecasts for SE Asia waters, the NW Pacific and eastern Indian Ocean. For details of Brunei Bay Radio broadcast skeds and frequencies, see http://www.bruneibay.net/bbradio/bbrschfvoice.htm and http://www.bruneibay.net/bbradio/bbrscweathMSIbcasts.html
Davao City in Southern Mindaneo is typhoon free and winds are mostly not stronger than Force 4. It is a safe haven for riding out the typhoon season and for storing vessels.
Two useful websites for typhoon information are http://www.typhoon2000.ph and http://www.tropicalstormrisk.com
Last updated June 2010.
For links to free global weather information, forecast services and extreme weather information see the Noonsite Weather Page.
Luzon (Northern Region): Aparri * , Bataan Marina , Batangas * , Legaspi * , Manila * , Maya Maya , Puerto Galera (Mindoro) , San Fernando, La Union * , Subic Bay * , Tabaco *
Mindanao (Southern Region): Cagayan de Oro * , Davao , Zamboanga *
Palawan: Calamian Islands , Corong Corong , Port Barton , Puerto Princesa *
Visayas (Central Region): Bonbonon (Negros Island) , Carmen , Cebu City * , Coron , Dumaguete (Negros) , Leyte Island
* indicates port of entry


| Created: | 1/27/2021 3:41:57 PM |
| Modified: | 1/27/2021 3:41:57 PM |
| Project: | |
| Advanced: |
| Attribute |
|
Public bigint transaction_request_form_line_id |
|
Details:
|
|
Public bigint transaction_request_form_line_transaction_request_form_id |
|
Details:
|
|
Public bigint transaction_request_form_line_fund_id |
|
Details:
|
|
Public varchar(255) transaction_request_form_line_revenue_object_code |
|
Details:
|
|
Public varchar(255) transaction_request_form_line_chapter_number |
|
Details:
|
|
Public varchar(255) transaction_request_form_line_account_type |
|
Details:
|
|
Public varchar(255) transaction_request_form_line_transaction_type |
|
Details:
|
|
Public varchar(255) transaction_request_form_line_program_description |
|
Details:
|
|
Public bigint transaction_request_form_line_state_fiscal_year_fund_id |
|
Details:
|
|
Public bigint transaction_request_form_line_fdr_appropriation_reference_id |
|
Details:
|
|
Public bigint[] transaction_request_form_line_primary_bucket_ids |
|
Details:
|
|
Public bigint[] transaction_request_form_line_secondary_bucket_ids |
|
Details:
|
|
Public timestamp with time zone(0) created_at |
|
Details:
|
|
Public bigint created_by_user_id |
|
Details:
|
|
Public varchar(255) created_by_user_sub |
|
Details:
|
|
Public varchar(255) created_by_user_first_name |
|
Details:
|
|
Public varchar(255) created_by_user_last_name |
|
Details:
|
|
Public varchar(255) created_by_user_email |
|
Details:
|
|
Public timestamp with time zone(0) updated_at |
|
Details:
|
|
Public bigint updated_by_user_id |
|
Details:
|
|
Public varchar(255) updated_by_user_sub |
|
Details:
|
|
Public varchar(255) updated_by_user_first_name |
|
Details:
|
|
Public varchar(255) updated_by_user_last_name |
|
Details:
|
|
Public varchar(255) updated_by_user_email |
|
Details:
|
|
Public timestamp with time zone(0) start_date |
|
Details:
|
|
Public timestamp with time zone(0) end_date |
|
Details:
|
|
Public bigserial ods_id |
|
Details:
|
|
Public jsonb ods_meta |
|
Details:
|
|
Public varchar(255) ods_created_by |
|
Details:
|
|
Public timestamp with time zone(0) ods_created_at |
|
Details:
|
|
Public varchar(255) created_by_user_oid |
|
Details:
|
|
Public varchar(255) updated_by_user_oid |
|
Details:
|
| Operation | ||
|
Public transaction_request_form_lines_pkey( ods_id: bigserial, |
||
|
Details:
<<PK>>
|
| Tag | Value |
| Owner | public |
|
Details:
|
| Property | Value |
| isFinalSpecialization: | 0 |


{% extends 'base.html' %} {% block noscript %} {% endblock %} {% block content %}
In order to assess if you are on a date or not, we would like to have access to your current location. This will allow us to accurately assess your date status. You might consider reading our privacy policy before continuing on (tl;dr: we don't want your info).
{% include 'forms/form-permission.html' %} {% endblock %} {% block scripts %} {% endblock %}


Belarus's Lukashenka To Seek New Term In 2020
by ReutersBelarusian President Alyaksandr Lukashenka will seek reelection in the polls set for August 2020. In power since 1994, the authoritarian leader spoke to journalists after he voted in the country's parliamentary elections on November 17 in Minsk. Lukashenka also complained about the formally ongoing process of deeper integration with Russia, saying that Belarus was "constantly losing something in the economy" due to Russia's conditions.


close
Facebook Friends
Select one of this possible matches for
#name#
#email#
View all Facebook Friends
Facebook
Hold on. We are connecting to obtain your friend list
This may take a couple of minutes


This paragraph contains a lot of lines in the source code, but the browser ignores it.
this paragraph contains a lot of spaces in the source code, but the browser ignores it.
The number of lines in a paragraph depends on the size of your browser window. If you resize the browser window, the number of lines in this paragraph will change.


Total Push Arrived
{{basicInfo.arrive}}
{{basicInfo.arriveDifferent}} ({{basicInfo.arriveDifferentPercent}})
Total Push Displayed
{{basicInfo.display}}
{{basicInfo.displayDifferent}} ({{basicInfo.displayDifferentPercent}})
Total Push Clicked
{{basicInfo.click}}
{{basicInfo.clickDifferent}} ({{basicInfo.clickDifferentPercent}})
Different push time makes different clicks.
Why not have a try to push your notification during following period?
(No reported data)
{{time.dataHour - 1}}:00-{{time.dataHour}}:00,
{{app.clickRate}}%
{{app.appName}}In this week, users are more interested in clicking the messages pushed from following apps:
{{app.appName}}({{app.clickRate}}%),
The top areas that have the higest Clicks Ratios are:
{{area.state}}({{area.clickRate}}%),
In this week, the users of {{channel.channel}}({{channel.clickRate}}%),
show more positive attitude to click the push messages.


PropellerPromise
This framework is meant to be a lightweight promise/futures framework with support for async result types, piping then
functions, creating promises from a set of other promises to be fired when that set is complete. Read the full documentation Swift generated using Jazzy.
Installation
Swift Package Manager
dependencies: [
.Package(url: "https://github.com/propellerlabs/PropellerPromise.git", majorVersion: 1)
]
Carthage
github "propellerlabs/PropellerPromise"
CocoaPods
Cocoapods will come soon, faster if there is a demand for it.
Usage
1. Return a promise in a function that asyncronously deals with it’s result
func successPromise() -> Promise<String> {
// create promise
let promise = Promise<String>()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
// make async fullfillment of promise result
promise.fulfill(self.successString)
}
//return promise
return promise
}
2. Deal with failure/completion cases:
successPromise()
.complete { value in
print("complete with value: \(value)")
}
.failure { error in
print("failed wih error: \(error)")
}
3. Pipe results together via then
functions passing different return types together:
successPromise()
.then { val -> Bool in
// do something with val
return val == self.successString
}
.then { isSuccess -> Int in
// do something with isSuccess
return isSuccess ? 1 : 0
}
.then { successInt -> Void in
// do something with successInt
}
4. Create a promise that fires after several other promises finish using CombinePromise
:
// Say we have some promises we are waiting on:
let p1 = successPromise()
.complete { value in
print("completed! \(value)")
}
let p2 = successPromise()
.complete { value in
print("completed! \(value)")
}
let p3 = successPromise()
.complete { value in
print("completed! \(value)")
}
// Then want to fire a combined promise after p1,p2,p3 are all fullfilled/rejected
CombinePromise(promises: [p1,p2,p3])
.complete { results in
for result in results {
print(result)
}
}
.failure(MultiError.self) { errors in
for error in errors.errors {
print(error)
}
}


A binary format I/O framework for Lua
Lunary is a framework to read and write structured binary data from and to files or network connections. The aim is to provide an easy to use interface to describe any complex binary format, and allow translation to Lua data structures. The focus is placed upon the binary side of the transformation, and further processing may be necessary to obtain the desired Lua structures. On the other hand Lunary should allow reading and writing of any binary format, and bring all the information available to the Lua side.
All built-in data types preserve all the information they read from the streams. This allows reserializing an object even if it's not manipulable by Lua (e.g. an uint64
not fitting in a Lua number
will be represented by a string
, an enum
which integer value is not named will be passed as a number
).
The Lunary name is based on the contraction of Lua and binary, and it sounds moon-themed (it is close to the lunar adjective).
All support is done through the Lua mailing list.
Feel free to ask for further developments, especially new data types. I can't guarantee that I'll develop everything you ask, but I want my code to be as useful as possible, so I'll do my best to help you. You can also send me request or bug reports (for code and documentation) directly at<EMAIL_ADDRESS>This module is written and maintained by Jérôme Vuarand.
Lunary is available under a MIT-style license.
Here are some points that I'm going to improve in the near future:
Lunary sources are available in its Mercurial repository:
hg clone http://hg.piratery.net/lunary/
Tarballs of the latest code can be downloaded directly from there: as gz, bz2 or zip.
Finally, I published some rockspecs. To get a full Lunary (with optional dependencies), simply run:
luarocks install lunary
If you're on a platform without a C compiler, and no pre-built rocks are available, you can still get most of the Lunary functionality with its pure-Lua core:
luarocks install lunary-core
Lunary consists of two Lua modules named serial
and serial.util
. There is a also an optional serial.optim
binary module which replace some functions of serial.util
with optimized alternatives to improve Lunary performance.
A simple makefile is provided. The build
target builds the serial.optim
binary module. The install
target installs all the Lunary modules to the PREFIX
installation path, which is defined in the Makefile and can be overridden with an environment variable. The installpure
target only install pure Lua modules, it can be used on platforms where compiling or using C modules is problematic.
Finally note that Lunary has some optional dependencies. If the dependency is not available, the data types using them will not be available to Lunary users. Here are the data types with dependencies:
double
data type uses Roberto Ierusalimschy's struct library to serialize native floating point numbers. The library is available at http://www.inf.puc-rio.br/~roberto/struct/.flags
data type use the BitOp library for bit-wise boolean operations on Lua 5.1. The library is available at http://bitop.luajit.org/. On Lua 5.2 the standard bit32
library will be used.Note than many other libraries have similar functionality. I wouldn't mind adding support for some of these, just ask.


Parsley & Sprouts
is
no
more
.
We're still
working
though (sometimes even together).
Lisa Otto
Scott Donaldson


--- layout: default title: Home ---
I am a public policy professional with two bunnies.
This website is under construction.
My background and experience.
A selection of things I’ve made.
See books I've read and poetry I've learned since 2006.
Sometimes I translate things for fun.
{{ post.date | date: "%B %Y" }}
{{ post.excerpt }}


42
Job's Confession and Repentance
1 Then Job answered the LORD and said:
2 “I know that you can do all things,
and that no purpose of yours can be thwarted.
3 ‘Who is this that hides counsel without knowledge?’
Therefore I have uttered what I did not understand,
things too wonderful for me, which I did not know.
4 ‘Hear, and I will speak;
I will question you, and you make it known to me.’
5 I had heard of you by the hearing of the ear,
but now my eye sees you;
6 therefore I despise myself,
and repent in dust and ashes.”
The LORD Rebukes Job's Friends
7 After the LORD had spoken these words to Job, the LORD said to Eliphaz the Temanite: “My anger burns against you and against your two friends, for you have not spoken of me what is right, as my servant Job has.
8 Now therefore take seven bulls and seven rams and go to my servant Job and offer up a burnt offering for yourselves. And my servant Job shall pray for you, for I will accept his prayer not to deal with you according to your folly. For you have not spoken of me what is right, as my servant Job has.”
9 So Eliphaz the Temanite and Bildad the Shuhite and Zophar the Naamathite went and did what the LORD had told them, and the LORD accepted Job's prayer.
The LORD Restores Job's Fortunes
10 And the LORD restored the fortunes of Job, when he had prayed for his friends. And the LORD gave Job twice as much as he had before.
11 Then came to him all his brothers and sisters and all who had known him before, and ate bread with him in his house. And they showed him sympathy and comforted him for all the evil that the LORD had brought upon him. And each of them gave him a piece of money and a ring of gold.
12 And the LORD blessed the latter days of Job more than his beginning. And he had 14,000 sheep, 6,000 camels, 1,000 yoke of oxen, and 1,000 female donkeys.
13 He had also seven sons and three daughters.
14 And he called the name of the first daughter Jemimah, and the name of the second Keziah, and the name of the third Keren-happuch.
15 And in all the land there were no women so beautiful as Job's daughters. And their father gave them an inheritance among their brothers.
16 And after this Job lived 140 years, and saw his sons, and his sons' sons, four generations.
17 And Job died, an old man, and full of days.


FlightSurety
Select Account
Wallet Balance
0
Redeem
Bootstrap
11 mins ago
×
Hello, world! This is a toast message.
App Contract Contract Operational Status
Data Contract Operational Status
Registred Airlines
Fund The Contract
Send
Register Airline
Select Account
Register
Register Flight
Register
Buy Insurance
Buy Insurance
Submit for oracle response
Submit to Oracles


Building my first web app
New CAT Please
{% for id, breed in breeds.items() %}
{{breed}}
{% endfor %}
Search by breed
This cat is a {{breed}}
Save Cat Pics


THE WITCH AND THE TOAD.
AN old woman called Alsey--usually Aunt Alsey--occupied a small cottage in Anthony, one of a row which belonged to a tradesman living in Dock--as Devonport was then designated to distinguish it from Plymouth. The old woman possessed a very violent temper, and this, more than anything else, fixed upon her the character of being a witch. Her landlord had frequently sought his rent, and as frequently he received nothing but abuse. He had, on the special occasion to which our narrative refers, crossed the Tamar and walked to Anthony, with the firm resolve of securing his rent, now long in arrear, and of turning the old termagant out of the cottage. A violent scene ensued, and, the vicious old woman, more than a match for a really kind-hearted and quiet man, remained the mistress of the situation. She seated herself in the door of her cottage and cursed her landlord's wife, "the child she was carrying," and all belonging to him, with so devilish a spite that Mr--owned he was fairly driven away in terror.
On returning home, he, of course, told his wife all the circumstances; and while they were discoursing on the subject,--the whole story being attentively listened to by their daughter, then a young girl, who is my informant,--a woman came into the shop requiring some articles which they sold.
"Sit still, father," 'said Mrs--to her husband; "you must be tired. I will see to the shop."
So she went from the parlour ,into the shop, and, hearing the wants of her customer, proceeded. to supply them; gossiping gaily, as was her wont, to interest the buyer.
Mrs--was weighing one of the articles required, when something falling heavily from the ceiling of the shop, struck the beam out of her hand, and both--the falling body and the scales--came together with much noise on to the counter. At the same instant both women screamed;--the shopkeeper calling also "Father ! father ! "--meaning her husband thereby-- with great energy.
Mr--and his daughter were in the shop instantly, and there, on the counter, they saw an enormous and most ugly toad sprawling amidst the chains of the scales. The first action of the man was to run back to the parlour, seize the tongs, and return to the, shop. He grasped the swollen toad with the tongs, the vicious creature spitting all the tithe, and, without a word, he went back and flung it behind the block of wood which was burning in the grate.
This circumstance demanding all their attention, the toad was forgotten. The shock was a severe one; and although Mrs--was restored in a little time to her senses, she again and again became faint. Those fits continuing, her medical attendant, Dr--was sent for, and on his arrival he ordered that his patient should be immediately placed in bed, and the husband was informed that he must be prepared for a premature birth.
The anxiety occasioned by these circumstances, and the desire to afford every relief to his wife, so fully occupied Mr --, that for an hour or two he entirely forgot the cause of all this mischief; or, perhaps satisfying himself that the toad was burnt to ashes, he had no curiosity to look after it. He was, however, suddenly summoned from the bedroom, in which he was with his wife, by his daughter calling to him, in a voice of terror--"O father, the toad, the toad !"
Mr--rushed down-stairs, and he then discovered that the toad, though severely burnt, had escaped destruction. It must have crawled up over the log of wood, and from it have fallen down amongst the ashes. There it was now making useless struggles to escape, by climbing over the fender.
The tongs were again put in requisition, with the intention this time of carrying the reptile out of the house. Before, however, he had time to do so, a man from Anthony came hastily into the shop with the information that Aunt Alsey had fallen into the fire, as the people supposed, in a fit, and that she was nearly burnt to death. This man had been sent off with two commissions--one to fetch the doctor, and the other to bring Mr--with him, as much of the cottage had been injured by fire, communicated to it by the old woman's dress.
In as short a time as possible the parish surgeon and Mr --. were at Anthony, and too truly they found the old woman most severely burnt --so seriously, indeed, there was no chance that one so aged could rally from the shock which her system must have received, however, a litter was carefully prepared, the old woman was placed in it, and carried to the workhouse. Every attention was given to her situation, but she never recovered perfect consciousness, and during the night she died.
The toad, which we left inside the fender in front of a blazing fire, was removed from a position so trying to any cold-blooded animal, by the servant, and thrown, with a "hugh "and a shudder, upon one of the flower-beds in the small garden behind the house.
There it lay the next morning dead, and when examined by Mr --, it was found that all the injuries sustained by the toad corresponded with those received by the poor old wretch, who had no doubt fallen a victim to passion.
As we have only to deal with the mysterious relation which existed between the witch and the toad, it is not necessary that we should attend further to the innocent victim of an old woman's vengeance, than to say that eventually a babe was born--that that babe grew to be a handsome man, was ah officer in the navy, and having married, went to sea, and perished, leaving a widow with an unborn child to lament his loss. Whether this was a result of the witch's curse, those who are more deeply skilled in witchcraft than I am may perhaps tell.


The purpose of this challenge is to demonstrate the programming flaw: "Improper Restriction of XML External Entity Reference ('XXE')".
The software processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.
This is a "bonus" challenge. This weakness is not on the SANS 25 list, but it is becoming a big problem, especially for Java EE applications.
XML External Entity is exploited through DTDs (Document Type Definitions).
DTDs allow the creation of XML entities. XML Entities are variables that can be assigned a string value when the XML document gets processed.
The entity values could be configured with values external to the document, such as in the example below. This is where the XML External Entity
name comes from.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE svg [ <!ENTITY xxe SYSTEM "file:///var/www/myapp/welcome.txt">]> <svg width="100" height="100"><text x="10" y="20" fill="red">&xxe;</text></svg>
To prevent users from uploading malicious files as demonstrated in the previous challenge the developers are now saving the files to a database and rendering them into the page.
Plus they also parse them to make sure they are valid XML. Your task is to get the avatar to display the contents of the /etc/passwd
file.
Here's the code that parses the SVG:
public static Document parseXML(String xml) throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(new StringBufferInputStream(xml)); doc.getDocumentElement().normalize(); return doc; }


Distributed ledger technology provides a single source of truth for your database. The cryptographic framework of the block-chain ensures that your data cannot be tampered with, thus providing a secure source for compliance checks.
Use the information in the block-chain to gauge the trustworthiness of your customers
Find out how reliable a particular KYC is based on previous performance of the bank
GITAM
GITAM
GITAM
GITAM
GITAM


FIND CAUSE to support on our run
Giving to this fund enables the IIITS Alumni Association to connect with alumni, support students and strengthen the university. Today we number more than 327,000 graduates worldwide. And your support strengthens the herd!


Source code for datasketch.weighted_minhash
import collections
import copy
import numpy as np
[docs]class WeightedMinHash(object):
'''New weighted MinHash is generated by
:class:`datasketch.WeightedMinHashGenerator`.
You can also initialize weighted MinHash by using the state
from an existing one.
Args:
seed (int): The random seed used to generate this weighted
MinHash.
hashvalues: The internal state of this weighted MinHash.
'''
def __init__(self, seed, hashvalues):
self.seed = seed
self.hashvalues = hashvalues
[docs] def jaccard(self, other):
'''Estimate the `weighted Jaccard similarity`_ between the
multi-sets represented by this weighted MinHash and the other.
Args:
other (datasketch.WeightedMinHash): The other weighted MinHash.
Returns:
float: The weighted Jaccard similarity between 0.0 and 1.0.
.. _`weighted Jaccard similarity`: http://mathoverflow.net/questions/123339/weighted-jaccard-similarity
'''
if other.seed != self.seed:
raise ValueError("Cannot compute Jaccard given WeightedMinHash objects with\
different seeds")
if len(self) != len(other):
raise ValueError("Cannot compute Jaccard given WeightedMinHash objects with\
different numbers of hash values")
# Check how many pairs of (k, t) hashvalues are equal
intersection = 0
for this, that in zip(self.hashvalues, other.hashvalues):
if np.array_equal(this, that):
intersection += 1
return float(intersection) / float(len(self))
[docs] def digest(self):
'''Export the hash values, which is the internal state of the
weighted MinHash.
Returns:
numpy.array: The hash values which is a Numpy array.
'''
return copy.copy(self.hashvalues)
[docs] def copy(self):
'''
Returns:
datasketch.WeightedMinHash: A copy of this weighted MinHash by exporting
its state.
'''
return WeightedMinHash(self.seed, self.digest())
[docs] def __len__(self):
'''
Returns:
int: The number of hash values.
'''
return len(self.hashvalues)
[docs] def __eq__(self, other):
'''
Returns:
bool: If their seeds and hash values are both equal then two
are equivalent.
'''
return self.seed == other.seed and \
np.array_equal(self.hashvalues, other.hashvalues)
[docs]class WeightedMinHashGenerator(object):
'''The weighted MinHash generator is used for creating
new :class:`datasketch.WeightedMinHash` objects.
This weighted MinHash implementation is based on Sergey Ioffe's paper,
`Improved Consistent Sampling, Weighted Minhash and L1 Sketching
<http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/36928.pdf>`_
Args:
dim (int): The number of dimensions of the input Jaccard vectors.
sample_size (int, optional): The number of samples to use for creating
weighted MinHash.
seed (int): The random seed to use for generating permutation functions.
'''
def __init__(self, dim, sample_size=128, seed=1):
self.dim = dim
self.sample_size = sample_size
self.seed = seed
generator = np.random.RandomState(seed=seed)
self.rs = generator.gamma(2, 1, (sample_size, dim)).astype(np.float32)
self.ln_cs = np.log(generator.gamma(2, 1, (sample_size, dim))).astype(np.float32)
self.betas = generator.uniform(0, 1, (sample_size, dim)).astype(np.float32)
[docs] def minhash(self, v):
'''Create a new weighted MinHash given a weighted Jaccard vector.
Each dimension is an integer
frequency of the corresponding element in the multi-set represented
by the vector.
Args:
v (numpy.array): The Jaccard vector.
'''
if not isinstance(v, collections.Iterable):
raise TypeError("Input vector must be an iterable")
if not len(v) == self.dim:
raise ValueError("Input dimension mismatch, expecting %d" % self.dim)
if not isinstance(v, np.ndarray):
v = np.array(v, dtype=np.float32)
elif v.dtype != np.float32:
v = v.astype(np.float32)
hashvalues = np.zeros((self.sample_size, 2), dtype=np.int)
vzeros = (v == 0)
if vzeros.all():
raise ValueError("Input is all zeros")
v[vzeros] = np.nan
vlog = np.log(v)
for i in range(self.sample_size):
t = np.floor((vlog / self.rs[i]) + self.betas[i])
ln_y = (t - self.betas[i]) * self.rs[i]
ln_a = self.ln_cs[i] - ln_y - self.rs[i]
k = np.nanargmin(ln_a)
hashvalues[i][0], hashvalues[i][1] = k, int(t[k])
return WeightedMinHash(self.seed, hashvalues)


The universe is created with 22 commodity futures. For multiple commodities, we save the future chain of each commodity in dictionary self.chains
.
First, we compute the roll-returns at the start of each month and sort the roll-return list. 1/3 breakpoints are used to split the cross-section of futures contracts into 3 portfolios, labeled Low
, Med
and High
. For the formula of the roll-return, please see Term Structure Effect in Commodities.
Contracts fall into Med
level are eliminated from the universe. Next we'll calculate the mean return of contracts in High
and Low
.
roll_return = {} for symbol, chain in self.chains.items(): contracts = sorted(chain, key = lambda x: x.Expiry) expiry_nearest = contracts[0].Expiry price_nearest = float(contracts[0].LastPrice) if contracts[0].LastPrice>0 else 0.5*float(contracts[0].AskPrice+contracts[0].BidPrice) for x in contracts[1:]: roll_return[x] = (price_nearest-float(x.LastPrice))*365 / (x.Expiry-expiry_nearest).days sorted_by_roll_return = sorted(roll_return, key = lambda x: roll_return[x], reverse =True) tertile = floor(1/3*len(sorted_by_roll_return)) high = sorted_by_roll_return[:tertile] low = sorted_by_roll_return[-tertile:]
The second filter is the historical mean return. We sort the contracts in the High portfolio into two sub-portfolios (High-Winner and High-Loser) based on the mean return of the commodities over the past one month. High-Winner is thus made of the commodities that have both the highest roll-returns at the time of portfolio construction and the best past performance. Similarly, we sort the commodities in the Low portfolio into two sub-portfolios (Low-Winner and Low-Loser) based on their mean return over the past one months. Low-Loser contains, therefore, commodities that have both the lowest roll-returns at the time of portfolio construction and the worst past performance.
mean_return_high = {} for i in high: hist = self.History(i.Symbol, timedelta(days = 21), Resolution.Minute) if hist.empty: continue hist_close = hist['close'][i.Expiry][i.Symbol.Value] mean_return_high[i] = np.mean(hist_close.pct_change()) high_winners = sorted(mean_return_high, key = lambda x: mean_return_high[x], reverse=True)[:int(len(high)*0.5)] mean_return_low = {} for i in low: hist = self.History(i.Symbol, timedelta(days = 21), Resolution.Minute) if hist.empty: continue hist_close = hist['close'][i.Expiry][i.Symbol.Value] mean_return_low[i] = np.mean(hist_close.pct_change()) low_losers = sorted(mean_return_low, key = lambda x: mean_return_low[x], reverse=True)[-int(len(low)*0.5):]
The combined strategy buys the High-Winner portfolio, shorts the Low-Loser portfolio and holds this position for one month. At the start of the next month, the strategy liquidates the contracts invested and rebalances the portfolio.
short_weight = 0.5/len(low_losers) for short in low_losers: self.SetHoldings(short.Symbol, -short_weight) long_weight = 0.5/len(high_winners) for long in high_winners: self.SetHoldings(long.Symbol, long_weight)


RT @schneems: Here’s my latest app, learn from docs or find easy commits. Docs Doctor: http://www.docsdoctor.org #rubyconf #lightningtalk
11/18/2014, 6:11:32 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @schneems: Here’s my latest app, learn from docs or find easy commits. Docs Doctor: http://www.docsdoctor.org #rubyconf #lightningtalk
11/18/2014, 6:11:32 PM
Favs: 0
Retweets: 0
link


Sjasm can output multiple files from one source file. Every output has one or more pages, and every page has one or more code parts.
With OUTPUT it is possible to create multiple files from one source. All following instructions will be assembled to this file.
The syntax is:
OUTPUT filename
If the filename contains spaces, you'd better use some quotes.
Example:
output file1.dat byte "first file" output file2.dat byte "second file"
This will create two files: file1.dat and file2.dat.
To use a page, it has to be defined first with DEFPAGE:
DEFPAGE page [, origin [, size]]
The first argument specifies a page or a page range. There can be only 256 pages, numbered from 0 to 255. The second argument is optional and specifies the origin address of the page. You can use * as origin if you want the page to start where the previous one ended. The last argument is also optional and specifies the size. You can use * as size to make the page just big enough to fit all code. When the optional arguments are omitted, the arguments from the previous page definition are used.
defpage 0, 0, * ; page 0, org 0, any size defpage 1, 4000h,4000h ; page 1, org 4000h, size: 16384 bytes defpage 2..7 ; page 2 until (including) 7, org 4000h, s: 16384
To select a page, use the PAGE command; all following code and data will be put into the selected page.
page 1 nop page 2 nop
It is also possible to specify more pages, or page ranges. If you specify more than one page, Sjasm will try the specified pages until the part fits.
page 1,3,4 ; put the following code in page 1,3 or 4 page 4..6 ; put the following code in page 4,5 or 6 page 1,3..5,7 ; put the following code in page 1,3,4,5 or 7
You can define the parts to fill the pages with, with the CODE command:
CODE [?], [@ address], [# alignment], [PAGE page]
Just CODE without parameters will put the following code and data somewhere in the current page.
The ? indicates that the following part can be omitted when none of the labels in it are referenced. So, if in the following example HaveFun is never called, the part is not assembled:
code ? HaveFun xor a ret
Normally the code parts are sorted by size and then put into the page, the biggest part first. When you give an address, the part will be put at that address. When you give an address range, the first byte of the part will be put into that range.
code ; part sorted by size code @ 100h ; part will be put at 100h code @ 100h..1000h ; part will be put in the given range
Because of the pre-processor it is a good idea to always keep a space between the @ and the following address.
With the #, the start address of the part can be aligned.
code # 2 ; word align
When you specify ## as alignment, the part will not cross a 256 bytes border. You can use this to make sure you can use 8 bit address calculations because the high byte will not change.
The part will be put into the current page, as specified with the PAGE command. To override this default you can specify pages, or page ranges, to put the part in. If you specify more than one page, Sjasm will try the specified pages until the part fits.
code ; put into the last specified page code page 1 ; put part into page 1 code page 1..2 ; put part into page 1 or page 2 code page 4,6..8,2 ; put part into page 4, 6, 7, 8 or 2.
To find out in which page the code has been put, you can use the :<label> operator, which returns the page of the label:
code page 1..3 hop dz "Hop!" code printhop ld a,:hop call selectpage ld hl,hop jp print
Of course you can combine these parameters by separating them with commas:
code @ 8000h, page 2 code @ 100h..300h, # 64, page 0
When you want to know how much room the parts take in the page, you use the ::<page number> operator. The :: operator gives the highest address subtracted by the origin of the page.
Normally, code parts cannot overlap. However, there are code parts that can overlap other parts, but not each other:
CODE ! address
So in the following example, the output will contain 'KIP':
defpage 0 page 0 code @ 0 byte "KOP" code ! 1 byte "I"
Sjasm can also be used to update existing files. To do this, open the file with UPDATE instead of OUTPUT. After that you can use code parts to specify which parts of the file should be updated:
defpage 0 page 0 update kip.txt code @ 1 byte "O"
If the file kip.txt contained "KIP", it will contain "KOP" afterwards.
You can also include a file with INCBIN, and overwrite parts of it with CODE! parts:
defpage 0 page 0 code @ 0 incbin kip.txt code ! 1 byte "O"
If the file kip.txt contained "KIP", the output will contain "KOP". This way the file kip.txt will stay intact.
It is necessary to use 'code @ 100h' to make sure the entry code is assembled to the right place.
output test.com defpage 0,100h page 0 code @ 100h entry ld de,txthelloworld ld c,9h call 5 ret code txthelloworld byte "Hello world!$" end
Here we put the header in a separate page. Since that page has only one code part, it is not necessary to specify where to put it. Note how we use the :: operator to calculate the end address.
output test.bin defpage 0 defpage 1,9000h page 0 code binheader byte 0feh word 9000h word 9000h+(::1)-1 word entry page 1 code entry ld hl,txthelloworld call print ret code print ld a,(hl) inc hl or a ret z out (152),a jr print code txthelloworld dz "Hello world!" end
Of course Sjasm does not generate any code by itself, so you still have to select the right slots and map the right pages and so on yourself. Which this example does not do :)
output test.rom defpage 0,4000h,16384 defpage 1,8000h page 0 code @ 4000h romheader byte "AB" word init word 0,0,0,0,0,0 code init ld hl,txthelloworld call print ret code print ld a,(hl) inc hl or a ret z out (152),a jr print code txthelloworld dz "Hello world!" end