// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./UpgradeableProxy.sol";
/**
* @dev This contract implements a proxy that is upgradeable by an admin.
*
* To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector
* clashing], which can potentially be used in an attack, this contract uses the
* https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two
* things that go hand in hand:
*
* 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if
* that call matches one of the admin functions exposed by the proxy itself.
* 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the
* implementation. If the admin tries to call a function on the implementation it will fail with an error that says
* "admin cannot fallback to proxy target".
*
* These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing
* the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due
* to sudden errors when trying to call a function from the proxy implementation.
*
* Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,
* you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.
*/
contract TransparentUpgradeableProxy is UpgradeableProxy {
/**
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
* optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.
*/
constructor(address _logic, address admin_, bytes memory _data) public payable UpgradeableProxy(_logic, _data) {
assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
_setAdmin(admin_);
}
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.
*/
modifier ifAdmin() {
if (msg.sender == _admin()) {
_;
} else {
_fallback();
}
}
/**
* @dev Returns the current admin.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function admin() external ifAdmin returns (address admin_) {
admin_ = _admin();
}
/**
* @dev Returns the current implementation.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
*/
function implementation() external ifAdmin returns (address implementation_) {
implementation_ = _implementation();
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.
*/
function changeAdmin(address newAdmin) external ifAdmin {
require(newAdmin != address(0), "TransparentUpgradeableProxy: new admin is the zero address");
emit AdminChanged(_admin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev Upgrade the implementation of the proxy.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.
*/
function upgradeTo(address newImplementation) external ifAdmin {
_upgradeTo(newImplementation);
}
/**
* @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified
* by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the
* proxied contract.
*
* NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.
*/
function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {
_upgradeTo(newImplementation);
Address.functionDelegateCall(newImplementation, data);
}
/**
* @dev Returns the current admin.
*/
function _admin() internal view returns (address adm) {
bytes32 slot = _ADMIN_SLOT;
// solhint-disable-next-line no-inline-assembly
assembly {
adm := sload(slot)
}
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
bytes32 slot = _ADMIN_SLOT;
// solhint-disable-next-line no-inline-assembly
assembly {
sstore(slot, newAdmin)
}
}
/**
* @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.
*/
function _beforeFallback() internal override virtual {
require(msg.sender != _admin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target");
super._beforeFallback();
}
}
|


Takehome Assignment - Build Tree Structure
July 7, 2015
This is one of the Takehome Assignment for a full-stack developer position. The assignment was to write a program that can hold family tree like data structure.
What need to be done
There are also requirement of creating a public repository on Github and make regular commits so that we can look at your progress;
TDD - Writing test that covers the script.
Step 1. Think where to begin the challenge
The first challenge I have is understanding 'Tree database structure'.
Step 2. Shop Around
So I found that there is a built in rubyTree gem I can use to cover all requirements. It also have simple tree like drawing functions that I can easily implement to my tree. So what's the downside of it?
The downside is the testing. Most of core functions like determining siblings, parents and root-node are given so TDD is impossible for these. Testing can be only done on the functions that I create.
After playing around a day, I decide to build my own tree-like data structure from scratch. This will be easy. Each node have parent and child variables that I can come up with grand parents and sibling functions.
Step 3. Writing Code
module Tree
class Family
attr :name, :children, :parent
def initialize(name)
@name = name
# @child_hash = Hash.new
@children = []
end
def root
root = self
root = root.parent while !root.is_root?
root
end
def is_root?
@parent == nil
end
def parent=(parent)
@parent = parent
end
end #class ends
end #module ends
So this was easy part. The hard part was to make it search function and creating the relationship of parent - children.
The complete code with rspec is available in my github
Step 4. Optimization and Refectoring the code
1. Data Structure
At first, I created an array and throw all nodes in the array and loop through it to find siblings, grand parents etc. This seems efficient and easy to work with the tree. So why I got rid of it?
: The answer was because of the source of truth for the data. Because the data is two place, one in tree and one in the array, first, it is inefficient to run any function, second, it is duplicate the effort to maintain the data. So I had to change the search function that a) can find the root node and, b) find whatever node it wants to find by following children. It will not save any time but at least I don't have to maintain two sources of data.
2. Same name in the Tree
What's the big deal to have several same names in the tree? Isn't this happen in real life anyway? Well, the current tree search function will only return the first instance (or node) when they find the node with name form the root node. If there are two "Mary"s in the same family, which can be happen in real life, the current tree search function will only return the first "Mary" and then stop looking for it. I could have change the function that returns both Mary nodes but instead, I decide to raise an argument error when there is same name of node added to the tree. This may not be the best solution but at least you can trust the data it provides.
Step 5. Submit the code and wait for the next step
The thing is ... you don't know how well you've done. I'll keep all of ya updated how it goes. GOOD LIGHT!


--- layout: post title: no title date: '2010-12-07T20:30:59+00:00' tags: [] tumblr_url: http://backlog.robbevan.com/post/2135158166/shop-vac-by-jarrett-heather ---
Shop Vac (by Jarrett Heather)


Council on Foreign Relations inducts new members
The Council on Foreign Relations (CFR) Ghana, a foreign policy think tank, has inducted 17 new members to help advance Ghana’s foreign policy and its relations with other nations.
The new members are Ms Awo Quayson-Sackey, Major-General Carl Coleman, Professor Henrietta Mensa-Bonsu, Dr Kofi K. Sarpong, Mr Ken Thompson, Dr Ali Kamal-Deen, Dr William G. M. Brandful and Mr Patrick Hayford.
The rest are Mr Kwabena Baah-Duodu, Mrs Afua Asare, Ms Irene Maamah, Dr Festus Aubyn, Paa Kojo Ackum, Ms Akua Sena Dansua, Dr Mokowa Blay Adu-Gyamfi, Mr Ivor Agyeman-Duah and Dr Philip Osafo-Kwaku.
The aim of the council is to ensure that stakeholders are well informed about current international issues, as it also reaches out to businesses, economists, technologists and academics to help address the country’s development challenges.
At the induction ceremony in Accra last Wednesday, the President of CFR Ghana, Mr Daniel K. Osei, said the council would next month launch its annual report, which will include themes discussed at various lectures on international issues organised by the council.
He said the council would also introduce a journal that would contain foreign policy issues, such as maritime security along the Gulf of Guinea, the closure of Nigeria’s border and its implications for regional integration, the Africa Continental Free Trade Area (AfCFTA) agreement and the 2020 elections and their security implications in West Africa.
He urged members with expertise in democracy to volunteer and join sub-committees of the council, which would soon be established to provide in-depth information on some of the areas to be covered in the journal.
Advertisement
ACBF
A former Vice-President of the International Criminal Court, Professor Akua Kuenyehia, asked the new members to bring their expertise on board and also offer actionable steps for policy makers to adopt to address the problems facing Ghana and Africa as a whole.
Appreciation
On behalf of her colleagues, Ms Quayson-Sackey expressed appreciation to the council for admitting them to its fold, saying: “We are committed to bringing our expertise on board to achieve the aim of the council.”
Background
The council was inaugurated by President Nana Addo Dankwa Akufo-Addo in February this year, with a charge on members to act as facilitators in improving policy-making and execution and to be key agents of social change.
The council is composed of a diverse group of retired diplomats, experienced lawyers, media experts, financial players, among other experts, numbering more than 30.
The idea of forming CFR Ghana was mooted by Mr Kabral Blay-Amihere, a former Ambassador to Cote d’Ivoire, for like-minded Ghanaians to come together to reflect on foreign policy issues.
After months of consultations, the council was duly registered as a private company limited by guarantee on February 23, 2011.


Numbers 19:22
And whatsoever the unclean person toucheth shall be unclean; and the soul that toucheth it shall be unclean until even.


 When he's called a jerk four times in one scene, he asks his assistant Amy (Emily Mortimer) if that makes it true. "No," she says, "four times is a pattern. It takes five times to be a fact." Shortly thereafter she calls him a jerk, and that was good enough for me.
The premise of this comedy is that Russ needs serious help from his inner child to overcome his personality impediment, and through the magic of Disney, that help incarnates as his 8-year-old self, Rusty (Spencer Breslin). Nobody seems to have much trouble accepting this curious phenomenon, and there's precious little explanation of how it happened, but Rusty looks as if he may have climbed out of a Campbell's Soup can.
Of all the under-explained phenomena in the movie, the undermost-explained is why people like Russ so much. On the one hand we're shown what an obnoxious prick he is, and on the other we see people beaming at him and falling in love with him. Maybe it's because he looks like Bruce Willis. Amy admits that every time she's ready to leave, she gets a glimpse of the kid in him, and she just melts.
Russ has spent his adult life overcoming the dweeb he was as a kid, and little Rusty is no more pleased to see how he turns out ("A dogless, chickless guy with a tick!") The challenge is for each to change the other, and this movie has no conscience about that old "never mess with the past" caveat. There's a surprise guest appearance by yet a third Russ character to round things off.
Willis, who seems to have partitioned his career into the action Bruce Willis and the sensitive Bruce Willis here again shows his sweet, child-loving side, and Breslin overcomes some inept early scenes (but heck, he's only 8) to do an ingratiating job. Best are Lily Tomlin as Russ's wry secretary ("How's Mini-you?"), and Jean Smart (Guinevere) as an understanding client. A witty screenplay by Audrey Wells (Guinevere) helps carry this movie safely into the "fun for the family" zone. But it's not recommended for diabetics.
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


| Changes since previous version |
| |
| MAP -> MD3: Use any shaped brush: |
| | It's no longer necessary to use 6 sided brushes in the .map model. |
|
| |
| MD3 "Surfaces Compact" option added: |
| | It compresses as many surfaces as possible. Surfaces must all have the same shader. The maximum amount of vertices and triangles per surface is not exceeded, but You can load models that have up to 4 times the MD3-limit of vertex-per-surface. |
|
| |
| MD3 swap texture-coordinates UV-ST option added: |
| | For swapping texture-coordinates from ST to UV, or vice versa. |
|
| |
| Display of groundplane & axis option added: |
| | The groundplane is the "floor". It's positioned at the same height as the model's origin.
The (positive) axis coloring: X-axis = red, Y-axis = green, Z-axis = blue. |
|
| |
| Small fixes: |
| | Some minor fixes were made for problems related to: file-in-use, screen-flickering, INI-save/restore, texturing.. |
|
| |
| |
| Previous changes/additions/fixes |
| |
| MDM recalculate surface-normals option added: |
| | This options lets You calculate the surface-normals for MDM playermodels.
It also works for playermodels that are converted into MDM on load-time. |
|
| |
| Adding tag-axis (direction) option added: |
| | It is possible now to manually add tags that are not aligned on the default axis.
You can enter the 9 values for the 3 different axis (X,Y,Z) now.. |
|
| |
| Game PAK handling fixes: |
| | If one of the PAKs did not contain a relevant file, the open-dialog did not open anymore.
There were also some other related issues, which also should be solved now.. |
|
| |
| Game PAK search list added: |
| | The tool will search all the listed game PAK-files for needed files such as textures, shader and/or models.
This option makes the tool more easy to use for people who do not model for Wolfenstein-ET (only).
Any Quake3-based game that uses PAK-files (*.pk3) is therefore supported..
The user can maintain the list; Add other PAK-files & remove files from the list. |
|
| |
| tcMod bug fixed: |
| | There was a bug in the previous code, which displayed some models incorrectly. |
|
| |
| Drag'n'Drop: |
| | The following filetypes can also be drag'n'dropped onto the tool's window: MS3D, ASE. |
|
| |
| Mouse Control Type: |
| | On-screen model rotation handling method added.
It provides another, likely for most people a more intuitive way of rotating the model on screen.. |
|
| |
| ASE loading improved: |
| | An ASE-model that would exceed the MD3 coordinate-limits (-511 to 511) can now be scaled down so it can be saved as MD3. |
|
| |
| Editing surface-names option added: |
| | It is now possible to change the surfacenames.
Select a surface from the list, edit the name, and press ENTER to confirm the changes.. |
|
| |
| Some tcMod shader-features added: |
| | Shaders that use tcMod scroll and/or tcMod rotate do now show scrolling and/or rotating textures. |
|
| |
| Alpha-channel textures handling improved: |
| | Displaying of transparent/translucent textures is improved, which makes it look much better now. |
|
| |
| |
| Drag'n'Drop: |
| | The following filetypes can be drag'n'dropped onto the tool's window: MD3, MAP, MDS, SKIN, MDM/MDX.
Drop only 1 file when using MD3,MAP,MDS or SKIN files.
Drop 2 files at once when using MDM/MDX files. |
|
| |
| Mirroring MD3 models routine corrected: |
| | The mirroring of MD3-model along the X-,Y- or Z-axis is now correct. |
|
| |
| Reverse triangle winding option added: |
| | The winding of triangles can now be reversed (CCW->CW, CW->CCW). |
|
| |
| Loading Milkshape files option added: |
| | Milkshape .MS3D files can be converted to MD3.
No animations, skeleton/bones nor tags are supported yet..
There is however an automatic scale-down feature, in case the model would exceed the MD3-boundries. |
|
| |
| Loading 3DSMax ASCII files option added: |
| | The old 3D-Studio .ASE files can be converted to MD3.
No animations are supported yet.. |
|
| |
| MAP to MD3 convert: |
| | Textures of any dimension can be used.
Place custom textures in the same folder as the .map You want to convert, or use ET-textures..
Adding tags improved, also saving tags (as .tag file) is now possible
Brush-planes to face-vertices routine slightly improved.
Calculation of texture-coordinates improved. |
|
| |
| Shaders: |
| | Shaders with only translucent textures are no longer displayed translucent when they also contain a lightmap-stage. |
|
| |
| |
| Known issues |
| |
| Wolfenstein-ET Churchill tank: |
| | The undamaged Churchill tank is displayed incorrectly because of some shader-issue.
The damaged Churchill tank however, which uses the very same shader, is displayed correctly..
And i just can't see why this happens. |
|


{% extends "layout.html" %} {% block body %}
| Timestamp | {{obj["ts"] | timestamp}} |
|---|---|
| Domain | {{obj["domain"] | null}} |
| Hostname | {{obj["hostname"] | null}} |
| IP Address | {{obj["remote_addr"] | null}} |
| Name | {{obj["name"] | null}} |
| {{obj["email"] | null}} | |
| Organization | {{obj["organization"] | null}} |
| Subscribed to pegasus-users? | {{obj["sub_users"] | yesno}} |
| Subscribed to pegasus-announce? | {{obj["sub_announce"] | yesno}} |
| File Name | {{obj["filename"]}} |
| Version | {{obj["version"] | null}} |
| Application Domain | {{obj["app_domain"] | null}} |
|---|---|
| Application Description | {{obj["app_description"] | null}} |
| How did you hear about Pegasus? | {{obj["howheard"] | null}} |
| What features of Pegasus interest you most? | {{obj["oldfeatures"] | null}} |
| What feature(s) would you like to see supported? | {{obj["newfeatures"] | null}} |
| What could we do to help you and your research? | {{obj["howhelp"] | null}} |
| City | {{obj["city"]}} |
|---|---|
| Region | {{obj["region_name"]}} ({{obj["region_code"]}}) |
| Country | {{obj["country_name"]}} ({{obj["country_code"]}}) |
| Postal Code | {{obj["zipcode"]}} |
| Area Code | {{obj["metrocode"]}} |
| Latitude | {{obj["latitude"]}} |
| Longitude | {{obj["longitude"]}} |


Templates to make usability testing easier, faster, and more consistant.
Post-test Satisfaction questionnaire. Mandatory for use during all USPTO usability testing. This is a .doc formatted version for printing out or as guidance for creating versions using other mediums.
Background information for observers to minimize disruption during sessions.


▲ 0
0
upvotes per second
00:00
0
0
0
0
0
0
0
0
0
0
0
Surprise!
ITEM
COST
Cursor
▼ 10
.io Domain
▼ 100
gif Thumbnail
▼ 500
Buzzword up!
▼ 1,000
Post at 12:00 AM
▼ 2,000
BuzzFeed Mention
▼ 5,000
@rrhoover Tweet
▼ 10,000
Endorsed by Gary V
▼ 50,000
Implement AI
▼ 1,000,000
Blockchain it!
▼ 100,000,000
Ship with PH ;)
▼ 1,000,000,000