Career Centered Experience
Ripple, Inc.
Senior Technical Operations Engineer
June '15-February '16
For a blockchain-enhanced, cryptocurrency-based financial services startup, I worked as lead on projects to automate rapid, reliable deployment.
- Continued my deep dive into Chef and Ruby.
- Utilized Test Kitchen for all code, and implemented code reviews for infrastructure code.
- Transitioned live cluster network of Ripple protocol clients from single bare-metal provider to SoftLayer.
- Began work on implementing Chef Provisioner for machine provisioning with Softlayer and Amazon AWS/EC2.
- Saved them a bunch of fiat money by decommissioning almost one hundred orphaned servers and services.
- Mentored sharp Desktop IT Admin on Operations concepts and career (thanks to the master SysAdmin Tom Limoncelli and crew's books).
Hello.com
Productivity and Systems Engineer
August '14-May '15
Stealth social startup in SF and Palo Alto, venture-backed by Google. I was the first non-Google engineer hired in the Palo Alto office.
- Learned Chef, utilizing Test Kitchen + Vagrant
- Migrated all Hello code to a GitHub Private Repo
- Performed in-depth 3rd-party development and productivity tool evaluations
- Linux SysAdmin/DevOps process introductions, advising development team on infrastructure impacts.
- Transformed in-house build scripts to Travis-CI.com YAML for both mobile client (iOS) builds and backend server builds (Java w/ Ant, yeah, I know, meh).
- Moved production onto RightScale, which included moving to Percona MySQL Server, database replication farm, large storage arrays with GlusterFS, and all on Google Compute Engine.
- Oversaw deployment of New Relic OS Agent on all Linux servers, on Java/Tomcat applications, and on Mobile iOS client. (New Relic captures EVERY crash!)
- Negotiated costs with vendors. LOTS of automation.
Collab.Net, Inc.
Senior Linux Systems Engineer
August '11-August '14
Oversaw legacy site "Codesion.com" aka "CVSDude"
transition after acquisition, to become "cloudforge.com".
- Handled a large amount of technical debt, paid some of it down,
and helped to plan out how to pay the remainder.
- Tuned MySQL, stopping database issues cold.
- Unrusted my RedHat skills, though I wish them rusted again.
- Converted RedHat Enterprise stack to CentOS *in-place*.
- Unfroze package upgrade process, which had been frozen in place by fear for over a year.
- 48 Real servers and 5 "cloud" virtualized servers at SoftLayer, in multiple datacenters.
- Learned Puppet (they sent me to a PuppetLabs course, which was nice), and used knowledge to completely
revamp existing Puppet legacy infrastructure.
Giant
Rabbit, LLC, Berkeley, CA (via my company Bold and Busted, LLC)
Systems Architect/Systems Administrator/Computer
Duster
April '09-September '11
For a IT consulting company dedicated to
supporting non-profits with size-appropriate technology, work
with over a dozen Bay Area non-profit clients (and one
international client) to put out fires, architect solid
solutions, and provide excellent documentation and personable
service. Prominent clients included Youth Employment Partnership of Oakland,
Inc., ACCESS Women's
Health Justice, and over a dozen others on an as-needed
basis.
Kiva
Microfunds, Inc., San Francisco, CA
Systems Administrator/IT Manager
March '08-October '08
For a prominent non-profit micro-finance
lending web site, supported and improved internal and
production systems.
- Built out and migrated to new web and database server
architecture, based on CentOS 5.1, Apache 2.2, Zend PHP and
MySQL 5, from previous single-host legacy host on CentOS
4.4
- Implemented load-balancing across web hosts
- Implemented MySQL replication, MAATKIT MySQL tools
- Implemented Nagios, NagiosQL, Cacti and custom Cacti HTTP
transaction latency scripts and graphs
- Tuned Apache, PHP and MySQL, based on load, informed by
benchmarks and organizational goals
- Implemented log file summarizers pflogsumm and logwatch,
improving visibility into production system health for
development team
- Documented system build out recipes and architecture
overviews
- Implemented the use of Subversion for configuration file
change control
- Created code deployment scripts
- Initiated alternative co-location vendor
communications
- Identified administration and performance problems with
locked-down virtualized guest hosts and lack of visibility
into system performance metrics
- For office network, implemented Windows Active Directory
roaming profiles and JungleDisk corporate backups to Amazon
S3, as well as switching virus scanning to Kaspersky
AntiVirus for all Microsoft Windows systems
Weather Underground, Inc.,
San Francisco, CA
Systems Administrator
September '07-March '08
For one of the oldest weather sites on the Web,
support existing systems and network devices, assist software
developers and assist the Director of Technology in maintaining
three data centers.
- Cleaned main data center of old hardware, including
rack-mount servers and network equipment; arranged pickup and
reuse by local 501(c)(3) charity (OTX-WEST), which I
selected.
- Supported PXELINUX diskless systems (loosely based on
Slackware 9.1).
- Implemented NTPd (with multicast updates) across diskless
hosts.
- Created more streamlined and tuned diskless-oriented
Linux Kernel builds.
- Streamlined BIND configuration files for ease of updates
and standardized shared options, and implemented master/slave
BIND servers with NOTIFY updates to slaves and to ISP DNS
servers.
- Assisted with BIOS reconfigurations to fix boot up
problems, and tuning for PCI Express.
- Upgraded internal MediaWiki instance to latest
version.
- Documented previously under-documented systems.
- Handled system and application outages.
- Assisted with planned data center power outage.
- Proposed and implemented home-grown Highly Available NFS
filer with RAID5 providing 5.4 TB usable storage, using
Gentoo Linux, Heartbeat, DRBD, and Areca 1220 RAID controller
cards with RAID battery backup unit, on two servers with
virtual IP failover. Provided benchmarks, determining better
hardware RAID controller models and facilitating kernel
tuning.
- Improved communications from Operations to the
development and application teams.
- Fixed a variety of problems with NFS, recommended
standard client mount options.
- Advised senior staff on system performance and
administration process improvements.
- Upgraded Awstats, and rewrote automated log processing
Bash shell scripts, using "Trampoline"-style looping
constructs to maximize usage of all CPU cores, while
minimizing impact on server resources. Initiated use of
non-memory intensive and non-disk intensive web server log
aggregation tools. Log processing time cut by a two-thirds,
and solved inconsistent data representation.
- Coordinated vendor on-site maintenance and upgrades.
- Server upgrades and service migrations (Slackware 9.1 to
12.0), including Sendmail, milter, and Apache, and internal
user directories.
- Assisted developers with proper system utility usage, and
developer virtual machine development OS instances.
- Racked, cabled and configured servers, and performed
general hardware upgrades.
Jumpcut.com (née
Yahoo, Inc.), San Francisco, CA
Systems and Network Engineer
July '06-April '07
For a "Web 2.0" video editing, sharing, and
community startup, supported systems and network devices, and
assisted software development.
- Production applications supported include Apache 2.0.X,
PHP 5.X, MySQL 5.X, all running under Gentoo Linux
- Performed testing and configuration optimization
- Polished Cacti and Nagios implementations, implemented
teMySQL templates, and created a custom script, data sources
and templates for HTTP latency graphing
- Implemented new Apache SSL hosts
- Implemented OpenVPN LAN-to-LAN VPN between office and
co-location facility
- Created "chroot jails" for various production
applications, using the Jail shell,
sudo, and a bit of shell scripting, with an aim to make safer
calls from production applications to external
applications
- Implemented SQLGrey for managed Postfix Grey-listing
- Added secondary backup "store-and-forward" Postfix MTA
with SQLGrey integration
- Worked with CTO on development of applications, including
creating development environments using VMWare, WINE and Xorg
X11 drivers
- Implemented OpenWrt (http://www.openwrt.org/) on office
router
- Managed corporate desktop systems migration to Yahoo's
infrastructure
- Configured Yahoo's custom Apache and PHP, and deployed
site code to Yahoo! production systems as a part of Yahoo's
acquisition of Jumpcut
- Wiki'd documentation of systems and project planning
Verizon
Business (née Totality, Inc), San Francisco, CA
Senior Systems Engineer
December '05-July '06 (consultant via Taos Mountain, Inc.)
Supported Verizon Business Managed Service
Provider clients, such as the Gap, Best Buy, American Airlines,
and many others, in a Service Level Agreement model:
- Improved production procedures documentation and
process
- Supported business-critical Solaris, Red Hat Linux,
HP-UX, AIX, and Windows systems and applications.
“Unrusted” proprietary UNIX skillset
- Suggested, and helped pilot, Plone/Zope CMS for
replacement of aging CVS-updated AFT/HTML documentation
system. Worked with Perl programmer to create automated site
scraping for deployment of read-only version of Plone site,
using Bash, cron and wget
- Resolved client issues alongside database administrators
and network engineers
- Trained new systems engineers
- Consistently high marks from management
Riverbed, Inc, San Francisco,
CA
Systems Administration Consultant
March '05-June '05 (Independent Consultant)
Advised on and implemented the following
services:
- Assisted the Systems Administrator in closing a backlog
of requests
- Implemented a spam flagging system using Postfix and
DSPAM
- Upgraded internally-facing wiki (TWiki) to latest stable
version
- Implemented a VPN solution with OpenVPN, and added to the
OpenVPN codebase
- Documented progress and systems with Bugzilla and
TWiki
Genentech, Inc., South San
Francisco, CA
Senior Systems Administrator/Software Deployment Engineer
(Consultant)
July '03-June '04 (part-time/full-time mix)
Contracted by former full-time supervisor:
- Packaged and deployed difficult multi-layered software to
over 1200 Windows workstations, in a validated, controlled
and FDA-regulated environment
- Wrote Perl scripts to automate local configuration
changes and systems administration on Windows
workstations
- Prototyped and assisted in the evaluation of Gentoo
Linux/Zope Content Management Frameworks development and
staging servers
- Managed Linux development server relocation to data
center
Center for
Reproductive Health Research & Policy, University of
California, San Francisco
Systems Administrator (Independent Consultant)
October '02-November '03 (project driven)
Contracted to provide the following services
for PhD-level researchers and staff:
- Proposed and implemented web-based full-featured shared
calendaring system
- Reduced costs by re-purposing older hardware
- Used Red Hat GNU/Linux 7.3., stripped down to HTTP,
HTTPS, NTP and SSH network services, with Big Brother
1.9c for monitoring
- Installed and configured Web
Calendar
- Used iptables to restrict access and usage to two
subnets
- Prototyped web-based survey system Mod_Survey
- Created role-based shared folders with Windows 2000/XP
"Offline Files" functionality
- Security assessments, using a variety of tools, including
Nessus, nmap and Ettercap
- User Training (very high marks!)
Denalii, Inc. (defunct), Burlingame, CA
Senior Systems Engineer (Full-time)
March '01-March '02
Responsible for the following systems and
services for heterogeneous Production network:
- Network Applications: BIND 8, ProFTPd, Apache, NTP,
OpenSSH/SFTP
- Web Application Platform: Oracle 8, Orion Application
Server, Apache, PHP 4, Sawmill web log analyzer
- System Monitoring: Big Brother, Syslog (centralized)
- Hardware: Sun/Intel
- Operating Systems: Solaris 8, Red Hat Linux 6.2 &
7.1
- Network devices: Cisco (3600 Routers, 4006 Smart
Switches, ArrowPoint load balancers), Netscreen 100
firewalls
Supervised the following projects:
- Rolled out NTP to all hosts, syncing to both internal
servers and external time servers
- Rolled out Big Brother, for host monitoring, role-based
paging, and uptime tracking
- Migrated HTML content from Roxen to Apache
- “In-sourced” corporate web site, DNS, and
network administration (phased out SiteSmith)
- Performed and managed technical aspects of closing
engineering-centered office
- Maintained production Perl environment, including module
maintenance, configuration and updates (DBI, DBD::Oracle,
MD5, etc.)
- Deployed applications onto Orion J2EE Application Server
(1.5.2), resolved Windows-to-UNIX migration issues
- Quickly and thoroughly undid sloppy administration
practices of previous Systems Administrator, including
correcting bad kernel build from unstable kernel tree,
remaking DNS structure and updating many applications for
security and bugfixes
- Implemented security policies, including password aging
and auditing, regular Nessus scanning, regular network packet
sniffing using snoop (Solaris), tcpdump (Linux), Ethereal for
capture and analysis (Linux & Windows), and nmap (both
external and internal network service scanning)
- Kept documentation up to date. Worked closely with Senior
Oracle DBA to both maintain and improve current Oracle
administration on Solaris, rolled-out Oracle on Linux, and
also trained her on more advanced Systems Administration
tasks to act as my backup, and she trained me on more
advanced Oracle administration techniques
Special Note:Helped guide developers on
architecture of logging and alerting systems to integrate with
existing Open Source tools, made use of Open Source solutions
for all appropriate areas, kept costs to a minimum, created
generally stronger and more closely held policies and
procedures for administration and maintenance of production
systems.
Zing Networks, Inc. (defunct), San
Francisco, CA
Director of Network Operations (Production Network &
Systems) (Full-time, promotion)
July '00-December '00
Responsible for the following systems and
services:
- Network Applications: Apache, Squid (HTTP accelerator
mode), Sendmail, BoldFish (mass e-mailing server),
OpenSSH
- Web Application Platform: Apache, Squid, mod_perl, Mason,
Oracle
- Monitoring/Reporting: Aria Web Tracking, Big Brother,
MRTG, PIXlog, LogWatch, swatch
- Hardware: Mostly Intel, with Sun for Oracle (E4500
primary, E3500 standby)
- Storage: EMC Symmetrix drive arrays and Celerra File
Server, with 3 TB usable storage, Legato Networker with
SpectraLogic Bullfrog AIT-1 tape jukebox
- Operating Systems: RedHat Linux 6.2, Solaris 7
- Network devices: Cisco PIX firewalls, Foundry Networks
(ServerIron (Layer 7 switch), NetIron (Layer 3 switch), 3Com
BayStack 350 (Layer 3 switch), point-to-point T1
- Vendor Relationships: Exodus, VALinux, Sun, SiteSmith,
Redapt, GlobalCenter, Envive, Akamai, CDW
Supervised the following projects:
- Rolled out of new EMC Symmetrix node, adding 1.5TB of
usable storage for photo & video storage
- Added SiteSmith to maintain high levels of uptime and
support
- Planned Globalization of Zing's Network (Japan, Europe
and US East Coast)
- Evaluated and recommended move to new data center
(GlobalCenter to replace Exodus Communications)
- Supervised install and maintained Aria Web Monitoring
system
- Akamized new sites static content
- Supervised two Sr. Unix/Network Administrator
contractors
Zing Networks, Inc. (defunct), San
Francisco, CA
Systems Administrator (Corporate & Production Networks
& Systems) (Full-time)
October '99-July '00
Implemented the following from the ground
up:
- VPN with Compatible System's (now owned by Cisco)
IntraPort 2 VPN router, with Win 95/98, NT 4.0, Linux and Mac
clients
- MS Exchange 5.5 SP3, with TrendMicro's ScanMail for
Exchange 3.0, Outlook Web Access
- Mapped external site e-mails to Exchange Public
Folders
- Rolled out Outlook 2000, gave 3 classes for users, with
rave reviews
- ARCServeIT 6.61 for NT, using OFA, Exchange Client,
Client for UNIX (Solaris), Tape Library Option (with 30-slot
SpectraLogic Treefrog tape autoloader with 1 AIT-2 drive) on
5-day Differential rotation
- Reduced PC architecture to 3 major vendors (Dell, Apple,
IBM), and 5 models tailored to company needs
- Created PC purchasing forms and procedures
- McAfee's Total Virus Defense, managed from McAfee Network
Management Console
- BoldFish mass-mail server for Linux
- Negotiated Microsoft Open License
- Employee Purchase Program with CDW
Supported the following:
- Microsoft DNS & DNS/DHCP/WINS (maintained static
routes, migrated DNS to new server)
- Apache 1.3.12 on Linux, IIS 4.0
- 2 NT Domains, with 9 NT 4.0 SP6a servers and 50 desktop
and notebook PCs and 6 Macs
- HP EtherJet (installed internal and external print device
servers)
- Installed & maintained co-located servers at Exodus
Communications in Santa Clara
- BigBrother Network Monitor on Linux
Special Note: Supervised office Cat 5
Ethernet re-configuration & deployment, negotiated
cost-effective vendor relationships, stopped company virus
problems COLD, smooth transition from Netscape Messaging Server
3.62 to Exchange 5.5 SP3. Promoted from Systems Administrator
(internal) to UNIX Systems Administrator for Production (public
web site). Y2K updates. Supported 3 US offices, 1 Israeli
office.
Pillsbury, Madison and
Sutro, LLP, San Francisco, CA
Systems Management Server Administrator (Contract)
November '98-June '99
Supported the following:
- SMS 1.2 (Multi-Site) with MS SQL Server 6.5
- Workstation configuration management, application testing
and software distribution
- ArcServe 6.5 for NT/Exchange
- Y2K testing
Employed the following:
- SMS Installer 2.0 and NT Command Line Scripting
- TCP/IP troubleshooting tools
- MS and third-party NT 4.0 Administration tools (GUI &
Command Line)
- Trained help desk on using SMS to assist in end-user
systems support
Special Notes: Packaged over 80
applications and patches for distribution to over 1300 NT
Workstations
The Internet Industry Standard
Magazine, San Francisco, CA
MIS Manager/Network Administrator (Contract)
October '98-November '98
Supported the following:
- NT 4.0 Server running Services for Macintosh, Print and
File Services
- Microsoft Exchange 5.5, Quark QPS Server, Act 4.0 and
BackupExec
- Mixed environment of Desktops & Laptops running Mac
OS and Windows 95/98
- CTI voicemail & phone system
- Outlook/Outlook Express for Windows and Mac OS
Employed the following:
- LANovation's PictureTaker software distribution
package
- Deployed Network Associates' VirusScan for Windows
95/98/NT and Norton AntiVirus with PictureTaker
Special Notes: handled budget and
ordering, shepherded transition from Act sales database to
SalesLogix, documented network and software distribution
method, supervised and mentored helpdesk, 60 users in SF, 8 in
New York
Genentech, Inc, South San Francisco,
CA
Windows NT/SMS Systems Administrator (Full-time)
February '97-October '98
Supported the following for 1,200
end-users:
- 40 Compaq Proliant NT 4.0 servers and 2 HP 9000s with
HP-UX 9 and 10 running Oracle 7
- ArcServe 6.5 for NT with Disaster Recovery, DEC tape
autoloader
- Network Associates' NetShield for NT
- MS SMS 1.2 with MS SQL 6.5
- Proprietary applications for Laboratory Management
(CALS), Inventory tracking (POMS), Document Management
(NovaManage), Manufacturing process management (BPCS)
- FileMaker Pro Server 3.0
- PDC, 4 BDCs
- NT Command Line Scripts for local account creation on
over 100 NT Workstations
- Hand-crafted Ethernet cabling for dozens of
laboratories
- DLC to Ethernet network migration
Employed the following:
- NT Command line scripts
- Heavy documentation for technical and non-technical
audiences
- Diplomacy
- Troubleshooting skills and ability to "reverse engineer"
installations
- TechNet, various NT & UNIX bibles
- NT Resource Kits (BackOffice and Server/Workstation)
- HP-UX system administration tools, man pages
Special notes: validated, controlled
environment, 3 recognition awards, promoted after 10 months,
"Exceeds Expectations" on annual review
Ifusion.com (defunct),
San Francisco, CA
Systems/Network Administrator (Contract)
October '96-January '97
Supported the following:
- 2 Microsoft NT 4.0 servers running Services for
Macintosh, NT Backup, MS Exchange, and RAS, as 1 PDC and 1
BDC
- Ascend MAX Pipeline Router/Modem Pool
- BayNetworks Ethernet Hubs
- 10 Macintosh design stations, 6 Windows 95 Micron
desktops
- 16 Windows 95 ThinkPad and NEC laptops
- Hardware and software product evaluations
Employed the following:
- NT Command Line scripting (before it was well
documented)
- NT System Administration tools
- Ethernet cable routing
- Proactive/preemptive troubleshooting
Special notes : Fast-paced startup
environment prepared COMDEX demo machines, helped QA debut
product, showed great time-management
Selected Historical
Experience (pre-technical career)
Clean Water Action Phone Canvass, San
Francisco, CA (major non-profit environmental group)
Office Administrator/Phone Manager/PC
Troubleshooter/Internet Liaison
1990-1991; 1994-1996
Technical Duties:
- Responsible for setting up full PC PPP Internet access in
San Francisco and Pittsburgh, PA offices
- Replied to off-site e-mail. Internet searching. Windows
3.1 and Internet training
- General computer maintenance including automating daily
backups, hard drive optimizing and virus hunting
- Gained working knowledge of: WordPerfect 5.1 for DOS,
PerfectOffice 6.01 for Windows, Lotus 1-2-3, Norton
Utilities, FoxPro for DOS Query scripting, DOS batch
scripting, streamlining DOS and Windows 3.1 configuration
files
- Installed ICVerify credit card processing software and
trained staff
Special notes: Raised over $100,000 for
organization, one membership call at a time. Quickly promoted
to leadership based on canvassing, fund-raising and training
skills.
Bouquet Computing Lab Annex, University
of Pittsburgh, Pittsburgh, PA
Macintosh User Consultant
1988-1989 (during college attendance, part-time)
Supervised student laboratory:
- Maintained 60 Apple Macintosh PCs and 2 servers
- Assisted students with software issues and distributed
access key floppies
Carnegie-Mellon University, Pittsburgh,
PA
Macintosh System Administrator/Troubleshooter
1986-1988
For top administration officials:
- Performed weekly backups and upgrades on Apple Macintosh
PCs
- Troubleshooting software and hardware
- End-user training
Carnegie-Mellon University, Pittsburgh,
PA
Teaching Assistant
Summers of 1986-1988 (while in High School)
Assisted VP for Academic Affairs in:
- Teaching an introductory Macintosh course for 23 to 40
college administrators & professors from major
universities around the world
- Special focus on showing students secret power-user tips
that make the Macintosh more fun to use.
Chatham College, Pittsburgh, PA
"Resident Hacker/Apprentice Programmer"
1980-1986 (began while in Junior High School)
Self-taught:
- Languages: DEC BASIC-PLUS, Pascal (with the book
Oh! Pascal, first edition), 6502 Assembly Code
- DEC RSTS Operating System on a PDP-11 mainframe
- First encounter with proto-Open Source code (DEC
included source code with RSTS)
- Wrote additions to LOGIN/LOGOUT code on RSTS PDP-11
to track unauthorized dial-up access
- First encounter with tab-key command auto-completion
(DCL, a new "shell" for RSTS and the PDP-11)
- First encounter with a multi-user multi-tasking
timesharing system
- Microcomputers: Apple DOS, IBM MS-DOS,
Macintosh
Self-supervised:
- User Consultant for academic community, where I became
adept at translating "computer-speak" into layman's
terms
- Trusted to supervise computer center unattended at age
12


Class RemovingFromListEventArgs
Used as a parameter in the event RemovingFromListDelegate. When handling an appropriate event, you can prevent the object beeing removed from the list.
Inheritance
Inherited Members
Namespace: CADability
Assembly: CADability.dll
Syntax
public class RemovingFromListEventArgs : EventArgs
Constructors
| Improve this Doc View SourceRemovingFromListEventArgs(Object, Object, String, String)
Creates an RemovingFromListEventArgs object.
Declaration
public RemovingFromListEventArgs(object List, object Item, string Name, string ResourceID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | List | The List, from which the object is going to be removed |
| System.Object | Item | The object that is going to be removed |
| System.String | Name | |
| System.String | ResourceID |
Fields
| Improve this Doc View SourceItem
The object that is going to be removed.
Declaration
public object Item
Field Value
| Type | Description |
|---|---|
| System.Object |
List
The list from which the object is going to be removed.
Declaration
public object List
Field Value
| Type | Description |
|---|---|
| System.Object |
Name
Name of the Item.
Declaration
public string Name
Field Value
| Type | Description |
|---|---|
| System.String |
Refuse
Set this to true if you want to prevent the object to be removed.
Declaration
public bool Refuse
Field Value
| Type | Description |
|---|---|
| System.Boolean |
ResourceID
Resource ID for errormessages that will be displayed in ItemIsUsed(). ResourceID+".ItemIsUsed" is the formattable string like "Item with the name {0} is used. Do you want to remove it anyway". ResourceID+".Label" is used for the Title of the message.
Declaration
public string ResourceID
Field Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceDontRemoveLastItem()
Displays a massage telling the user that the last item cannot be removed
Declaration
public virtual void DontRemoveLastItem()
ItemIsUsed()
Displays a massage telling the user that the item is still in use and asks the user whether the item should be removed anyway.
Declaration
public virtual void ItemIsUsed()


Full Approximation Storage ("FAS") Multigrid solver class. More...
#include <multigrid.h>
Public Types | |
| typedef relax_t | relax_t |
Public Member Functions | |
| FASMultigrid (IDX_T grid_num_x_in, IDX_T grid_num_y_in, IDX_T grid_num_z_in, REAL_T grid_length_x_in, REAL_T grid_length_y_in, REAL_T grid_length_z_in, IDX_T max_depth_in, IDX_T max_relax_iters_in, relax_t relax_scheme_in, REAL_T relaxation_tolerance_in) | |
| Full Constructor. More... | |
| FASMultigrid (IDX_T grid_num_in, REAL_T grid_length_in, IDX_T max_depth_in, REAL_T relaxation_tolerance_in) | |
| Partial Constructor, with some defaults. More... | |
| ~FASMultigrid () | |
| destructor | |
| void | build_rho (IDX_T src_num_in, IDX_T u_exp_in[]) |
| void | build_rho (IDX_T src_num) |
| allocate the space of rho with src_num of sources More... | |
| void | initializeRhoHeirarchy () |
| Initialize matter source on all grids. | |
| void | VCycle () |
| void | VCycles (IDX_T num_cycles) |
| void | setTrialSolution (IDX_T type) |
| set trial solution for different type More... | |
| void | add_poly_srcs (IDX_T type) |
| add source term to the elliptical equation More... | |
| void | printSolutionStrip (IDX_T depth) |
| void | printSourceStrip (IDX_T rho_n, IDX_T depth) |
| void | setPolySrcAtPt (IDX_T i, IDX_T j, IDX_T k, IDX_T n, REAL_T value) |
| REAL_T * | getSolution () |
Protected Types | |
| enum | relax_t { inexact_newton, inexact_newton_constrained, newton } |
| typedef REAL_T * | fas_grid_t |
| typedef fas_grid_t * | fas_heirarchy_t |
| typedef fas_heirarchy_t * | fas_heirarchy_set_t |
Protected Member Functions | |
| IDX_T | _dIdx (IDX_T depth) |
| indexing scheme of a grid heirarchy return index of grid at a particular depth in a grid heirarchy More... | |
| IDX_T | _sign (REAL_T x) |
| return sign of argument More... | |
| IDX_T | _gIdx (IDX_T i, IDX_T j, IDX_T k, IDX_T nx, IDX_T ny, IDX_T nz) |
| Return array index of a point located at (i,j,k) on a grid with periodic boundaries, of size n^3. More... | |
| IDX_T | _2toPwr (IDX_T pwr) |
| compute power of 2 More... | |
| IDX_T | _Pwr3 (IDX_T num) |
| compute integer number to power of 3 More... | |
| REAL_T | _Pwr2 (REAL_T num) |
| compute integer number to power of 2 More... | |
| REAL_T | _laplacian (fas_grid_t grid, IDX_T i, IDX_T j, IDX_T k, IDX_T nx, IDX_T ny, IDX_T nz) |
| Take a laplacian stencil on "grid" of size n^3 at point i,j,k. More... | |
| REAL_T | _averageGrid (fas_grid_t grid, IDX_T points) |
| Compute average of a grid. More... | |
| REAL_T | _maxGrid (fas_grid_t grid, IDX_T points) |
| Compute max value in a grid. More... | |
| REAL_T | _minGrid (fas_grid_t grid, IDX_T points) |
| Compute min value in a grid. More... | |
| REAL_T | _srcVal (IDX_T pos_idx, IDX_T depth_idx, REAL_T u) |
| return the value of the "left hand side" of the elliptical equation, excluding the Laplacian term More... | |
| REAL_T | _srcValDir (IDX_T pos_idx, IDX_T depth_idx, REAL_T u) |
| return the derivative of the "left hand side" of the elliptical equation, excluding the Laplacian term More... | |
| void | _zeroGrid (fas_grid_t grid, IDX_T points) |
| initialize a grid to 0 More... | |
| REAL_T | _totalGrid (fas_grid_t grid, IDX_T points) |
| Compute total of grid (sum of all elements) More... | |
| void | _shiftGridVals (fas_grid_t grid, REAL_T shift, IDX_T points) |
| Shift all values in grid by a value. More... | |
| void | _restrictFine2coarse (fas_heirarchy_t grid_heirarchy, IDX_T fine_depth) |
| "restrict" a fine grid to coarser grid More... | |
| void | _interpolateCoarse2fine (fas_heirarchy_t grid_heirarchy, IDX_T coarse_depth) |
| interpolate a coarse grid to a finer grid More... | |
| void | _evaluateEllipticEquation (fas_heirarchy_t result_h, IDX_T depth) |
| Evaluate elliptic operator at given depth. More... | |
| REAL_T | _evaluateEllipticEquationPt (IDX_T depth, IDX_T i, IDX_T j, IDX_T k) |
| Evaluate elliptic operator at given depth at a point. More... | |
| void | _shiftConstrainedFieldMonopole (IDX_T depth) |
| Find value of A that gives a root of the function: f(A) = ( * ( + A)^5 - coarse_src ) d V and offset phi by this. More... | |
| REAL_T | _monopoleConstraintTotal (IDX_T depth, REAL_T shift) |
| REAL_T | _monopoleConstraintDerivativeTotal (IDX_T depth, REAL_T shift) |
| void | _computeResidual (fas_heirarchy_t residual_h, IDX_T depth) |
| Computes residual, stores result in "tmp" heirarchy. More... | |
| REAL_T | _getMaxResidual (IDX_T depth) |
| Computes max residual, uses intermediate tmp_h. More... | |
| void | _computeCoarseRestrictions (IDX_T fine_depth) |
| Compute coarse_src and u on a coarser grid using tmp_h for some computations. More... | |
| void | _changeApproximateSolutionToError (fas_heirarchy_t appx_to_err_h, fas_heirarchy_t exact_soln_h, IDX_T depth) |
| Convert a grid containing an approximate solution to a grid containing the solution error, err = true - appx. More... | |
| void | _correctFineFromCoarseErr_Err2Appx (fas_heirarchy_t err2appx_h, fas_heirarchy_t appx_soln_h, IDX_T fine_depth) |
| Compute and add in correction to fine grid from error on coarser grid; replace error with appx. solution. More... | |
| void | _copyGrid (fas_heirarchy_t from_h, fas_heirarchy_t to_h, IDX_T depth) |
| Copy grid from one heirarchy to another. More... | |
| REAL_T | _getLambda (IDX_T depth, REAL_T norm) |
| iterative method to find a between 1 and zero, returning the largest value that satisfies norm less than the norm of F(u) More... | |
| REAL_T | _dampingConstraintTotal (IDX_T depth, REAL_T shift) |
| calculating total of Jacob constraint More... | |
| REAL_T | _dampingConstraintDerivativeTotal (IDX_T depth, REAL_T shift) |
| void | _shiftConstrainedDamping (IDX_T depth) |
| find shift to Jacob equation to satisfy the zero integration constraint More... | |
| bool | _jacobianRelax (IDX_T depth, REAL_T norm, REAL_T C, IDX_T p) |
| perform Jacobian relaxation until a desired precision is reached More... | |
| bool | _singularityExists (IDX_T depth) |
| find singularity in the solution, returns 1 if singularity found More... | |
| void | _relaxSolution_GaussSeidel (IDX_T depth, IDX_T max_iterations) |
| relax u using the inexact Newton iterative method | |
| void | _initializeMultigrid (IDX_T grid_num_x_in, IDX_T grid_num_y_in, IDX_T grid_num_z_in, REAL_T grid_length_x_in, REAL_T grid_length_y_in, REAL_T grid_length_z_in, IDX_T max_depth_in, IDX_T max_relax_iters_in, relax_t relax_scheme_in, REAL_T relaxation_tolerance_in) |
| Method to initialize internal variables, allocate memory. More... | |
| void | _printStrip (fas_heirarchy_t out_h, IDX_T depth) |
| void | _printAll (fas_heirarchy_t out_h, IDX_T depth) |
Protected Attributes | |
| IDX_T | max_depth |
| IDX_T | max_depth_idx |
| IDX_T | min_depth |
| IDX_T | min_depth_idx |
| IDX_T | total_depths |
| IDX_T | max_relax_iters |
| REAL_T | grid_length_x |
| REAL_T | grid_length_y |
| REAL_T | grid_length_z |
| IDX_T * | nx_h |
| IDX_T * | ny_h |
| IDX_T * | nz_h |
| number of grid points in each direction at different depths | |
| REAL_T | relaxation_tolerance |
| desired precision when performing relaxation | |
| relax_t | relax_scheme |
| fas_heirarchy_t | tmp_h |
| reusable grid for storing intermediate calculations | |
| fas_heirarchy_t | coarse_src_h |
| multigrid source term | |
| fas_heirarchy_t | u_h |
| field seeking a solution for | |
| fas_heirarchy_t | appx_u_h |
| field containing an approximate solution | |
| fas_heirarchy_t | damping_tmp_h |
| _lap (u) - f, used to calculate F(u + v) | |
| fas_heirarchy_t | lap_v_h |
| _lap(v), used to caculate F(u + v) | |
| fas_heirarchy_t | damping_v_h |
| v, used to update u through u_{n+1} = u{n} + v in interation | |
| fas_heirarchy_t | jac_rhs_h |
| IDX_T | rho_num |
| number of source terms | |
| IDX_T * | u_exp |
| exponent of u for each term, has rho_num terms in total | |
| fas_heirarchy_set_t | rho_h |
| source matter terms with number being rho_num; | |
Full Approximation Storage ("FAS") Multigrid solver class.
see: https://computation.llnl.gov/casc/people/henson/postscript/UCRL_JC_150259.pdf section 3 for a very concise, clean description of the FAS Scheme.
And also: http://www.scicomp.ucsd.edu/~mholst/pubs/dist/Hols94e.pdf for introduction to inexact Newton method.
In this implementation, the following step is done for restriction: restrict a fine grid approximation to a coarser grid:
The set of grids (array of arrays) is referred to as a "heirarchy" of grids, where each grid has some "depth".
| FASMultigrid::FASMultigrid | ( | IDX_T | grid_num_x_in, |
| IDX_T | grid_num_y_in, | ||
| IDX_T | grid_num_z_in, | ||
| REAL_T | grid_length_x_in, | ||
| REAL_T | grid_length_y_in, | ||
| REAL_T | grid_length_z_in, | ||
| IDX_T | max_depth_in, | ||
| IDX_T | max_relax_iters_in, | ||
| relax_t | relax_scheme_in, | ||
| REAL_T | relaxation_tolerance_in | ||
| ) |
Full Constructor.
Initialize internal variables, allocate memory
| [in] | number | grid points in x direction |
| [in] | number | grid points in y direction |
| [in] | number | grid points in z direction |
| [in] | grid | length in x direction |
| [in] | grid | length in y direction |
| [in] | grid | length in z direction |
| [in] | number | of multigrid layers |
| [in] | maximum | iterations when relaxing |
| [in] | relaxation | scheme (enum) |
| FASMultigrid::FASMultigrid | ( | IDX_T | grid_num_in, |
| REAL_T | grid_length_in, | ||
| IDX_T | max_depth_in, | ||
| REAL_T | relaxation_tolerance_in | ||
| ) |
Partial Constructor, with some defaults.
| [in] | number | grid points in each direction |
| [in] | grid | length in each direction |
| [in] | number | of multigrid layers |
|
inlineprotected |
compute power of 2
| pwr | power to raise 2 to |
|
protected |
Compute average of a grid.
| grid | grid to average |
| points | # points in grid |
|
protected |
Convert a grid containing an approximate solution to a grid containing the solution error, err = true - appx.
| appx_to_err_h | grid heirarchy containing appx'n to convert | |
| exact_soln_h | heirarchy containing exact solution | |
| [in] | depth | depth to perform computation at |
|
protected |
Compute coarse_src and u on a coarser grid using tmp_h for some computations.
| [in] | fine_depth | depth of grid to coarsen |
|
protected |
Computes residual, stores result in "tmp" heirarchy.
| [in] | depth | depth to compute residual at |
| residual_h | heirarchy of arrays to store residual in |
|
protected |
Copy grid from one heirarchy to another.
| from_h | copy from this heirarchy |
| to_h | to this heirarchy |
| depth | at this depth |
|
protected |
Compute and add in correction to fine grid from error on coarser grid; replace error with appx. solution.
| err_h | grid heirarchy containing error |
| err2appx_h | heirarchy containing approximate solution |
| fine_depth | depth of fine grid to correct |
|
protected |
calculating total of Jacob constraint
| depth | |
| shift |
|
inlineprotected |
indexing scheme of a grid heirarchy return index of grid at a particular depth in a grid heirarchy
| depth | "depth" of grid |
|
protected |
Evaluate elliptic operator at given depth.
| [in] | depth | depth to evaluate at |
| result_h | grid to store result on |
|
protected |
Evaluate elliptic operator at given depth at a point.
| [in] | depth | depth to evaluate at |
| result_h | grid to store result on |
|
protected |
iterative method to find a between 1 and zero, returning the largest value that satisfies norm less than the norm of F(u)
| depth | |
| norm |
|
protected |
Computes max residual, uses intermediate tmp_h.
| [in] | depth | depth to compute residual at |
|
inlineprotected |
Return array index of a point located at (i,j,k) on a grid with periodic boundaries, of size n^3.
| [in] | i | label of points in x-dir |
| [in] | j | label of points in y-dir |
| [in] | k | label of points in z-dir |
| [in] | nx | number of grids in x-dir |
| [in] | ny | number of grids in y-dir |
| [in] | nz | number of grids in z-dir |
|
protected |
Method to initialize internal variables, allocate memory.
| [in] | number | grid points in x direction |
| [in] | number | grid points in y direction |
| [in] | number | grid points in z direction |
| [in] | grid | length in x direction |
| [in] | grid | length in y direction |
| [in] | grid | length in z direction |
| [in] | number | of multigrid layers |
| [in] | maximum | iterations when relaxing |
| [in] | relaxation | scheme (enum) |
|
protected |
interpolate a coarse grid to a finer grid
using a lot of "if" before updating to deal with the boundary probs when n_coarse * 2 != n_fine
|
protected |
perform Jacobian relaxation until a desired precision is reached
can be controled to use constrait or not,
| depth | |
| norm | of F(u) |
| parameter | can control the converge speed |
| parameter | can control the converge speed |
|
inlineprotected |
Take a laplacian stencil on "grid" of size n^3 at point i,j,k.
|
protected |
Compute max value in a grid.
| grid | grid to find max of |
| points | # points in grid |
|
protected |
Compute min value in a grid.
| grid | grid to find min of |
| points | # points in grid |
|
inlineprotected |
compute integer number to power of 2
| number | to raise to ^2 |
|
inlineprotected |
compute integer number to power of 3
| number | to raise to ^3 |
|
protected |
"restrict" a fine grid to coarser grid
Restriction scheme: (1 given cell)*(1/8) + (6 adjacent "faces") * (1/16)
| field_heirarchy | field to restrict |
| fine_depth | "depth" of finer grid |
|
protected |
find shift to Jacob equation to satisfy the zero integration constraint
| depth |
|
protected |
Find value of A that gives a root of the function: f(A) = ( * ( + A)^5 - coarse_src ) d V and offset phi by this.
| depth | depth to compute at |
|
protected |
Shift all values in grid by a value.
eg; grid[i] += shift for all i
| grid | grid to shift |
| shift | amount to shift by |
| points | # points in grid |
|
inlineprotected |
return sign of argument
return zerp when argument is zero
|
protected |
find singularity in the solution, returns 1 if singularity found
| depth |
|
protected |
return the value of the "left hand side" of the elliptical equation, excluding the Laplacian term
| index | of position |
| index | of depth |
| the | value of u |
|
protected |
return the derivative of the "left hand side" of the elliptical equation, excluding the Laplacian term
| index | of position |
| index | of depth |
| the | value of u |
|
protected |
Compute total of grid (sum of all elements)
| grid | grid to total |
| points | # points in grid |
|
protected |
initialize a grid to 0
| grid | grid (array) to initialize | |
| [in] | points | # points in array / on grid |
| void FASMultigrid::add_poly_srcs | ( | IDX_T | type | ) |
add source term to the elliptical equation
type = 0: This is the case in the paper: 1511.05143 where is given by a inhomogeneous scalar field. The solver can deal with this case well with inexact Newton iteration with constraint to speedup (relax_scheme = 1).
type = 1: This is the case for the case with analytical solution (we can get this by calculating -(u) / u^5 for a given inhomogenous function of u). In this case, for a very good guess ( u(exact) + (rand()/RAND_MAX - 0.5) / 100 ), it converges to precision 0.0002 without applying constraint to speed up (actually, applying constraint makes thing worse in this case). For worse guess, it may converge to zero.
| u_guess | guess for on the finest grid |
| void FASMultigrid::build_rho | ( | IDX_T | src_num | ) |
allocate the space of rho with src_num of sources
| number | of source terms |
| void FASMultigrid::setTrialSolution | ( | IDX_T | type | ) |
set trial solution for different type
| type | of different rho, see parameter explanation for add_poly_srcs(); |
|
protected |


TC Energy says about 4,300 barrels of oil recovered from Keystone leak
(Reuters) - About 4,300 barrels of oil have been recovered from TC Energy Corp’s Keystone pipeline leak in Walsh County, North Dakota, the company said on Monday.
“Preliminary work to expose and extract the damaged section of pipe has begun and is expected to be complete by the end of the week,” the company said in a statement, adding “about 200 round-the-clock personnel focused on clean-up and remediation activities.”
The 590,000-barrel-per-day Keystone pipeline was shut last week after a drop in pressure was detected and was estimated to have spilled more-than 9,000 barrels of oil.


A/B Test Decisions
New Search
SsoId
Test-Name
Selected Variant
Active
Test-Period
Available Variants
Actions
Confirm Deletion
Are you sure that you want to delete the decision?


Proof of Functioning Brainfuck Interpreter
See JavaScript comments for explanation; see console for results


Landing Page
Special Projects
This story is part of a series of specially designed stories that represents some of the best journalism The Post has to offer. Check out the rest of the special projects here.
RILEY SCOTT
05.30.19
Riley Perone | Provided
Lydia Ramlo will be the Student Senate president for the 2019-2020 academic year.
How time has flown by — my first time in the Convocation Center does not feel that long ago, but here I am four years later. The rush of excitement, anxiety and concern while being pushed by all your peers up Richland may feel overwhelming, but savor that moment for the rest of your life. Because at that moment, you enter a new chapter of your life — your Bobcat Chapter.
I would tell you now that when I stepped foot in Athens, I didn’t think I would become president of the student body nor travel across the Atlantic for an internship in England. I came on campus as a double major in theater and social work, who just had a teary goodbye with my best friend — my dad.
In my first semester, however, Ohio University’s Career and Leadership Development Center (CLDC) helped find me a new career path in civil engineering and environmental studies and pushed me to earn a professional leadership certificate. When I switched both of my majors, I was welcomed into those departments with open arms. As people, we look for somewhere we belong, and my sophomore year is when I felt that sense of belonging at OU.
Student Senate has also helped me find a sense of belonging. This organization is the nonpartisan liaison between the student body and the administration. Senate advocates for all students on campus by bringing any ideas, concerns or questions to the administration and faculty to create a tangible difference. Last year, Senate aided in the institutionalization of the Safety App (check it out!) as well as continued to grow “Take A Tampon, Leave A Tampon.”
Our team is excited to continue to make progress on campus, especially in regards to students’ mental health, sustainability, safety, diversity and inclusion. If you ever have concerns, drop by our Student Speakouts on Wednesdays at 7:15 p.m. in Walter 235.
This chapter is the time to escape your comfort zone — join a student organization (here is my pitch to check out Student Senate); explore Athens; find your favorite coffee shop (Donkey and Brenen’s are mine); take a fun class (I definitely recommend Personal Finance); and become a regular at one of Athens’ superb restaurants.
Athens is a magical place where time flies by fast, so enjoy every moment.  With a campus of 565 student organizations, amazing research opportunities, on and off-campus jobs, athletic events, and hiking trails (have you heard of Radar and Bong Hill?), you will always have something to do.
Here is a mere start of a bucket list for you: go to the CLDC (earn a certificate, have a career coaching session, etc.); attend at least three different student organizations,]; hold a research position or a job; go to all three dining halls and argue with your friends about which one is truly the best; take a group fitness class at Ping; go to every restaurant on Court Street to figure out which one is your “go-to;” see a movie at the Athena Cinema; walk in the Office of Global Opportunities to explore studying abroad; attend open-mic nights (Donkey’s are on Thursdays); go to Homecoming; cheer on Ohio Athletics (I love hockey games); run down to Baker Center on Wednesdays and try UPC’s “Flavor of the Week;” attend a Kennedy Lecture Series; see a performance at Kanter Hall or Lost Flamingo Company … the list goes on and on. Take this list and add to it!
It’s time to make your story on these bricks! Don’t waste a second, Bobcat. If you need anything, definitely stop by the Student Senate Office in Baker Center 305 (also known as the place with free blue books).
BackLanding Page
This story is part of a series of specially designed stories that represents some of the best journalism The Post has to offer. Check out the rest of the special projects here.


Growing up in Chippewa Falls, WI, I always had a fascination for technology. My free time after school that wasn't spent on sports or music was devoted to furthering my knowledge on everything technology. This is where my love for coding and software development formed. From modifying HTML and CSS on popular websites to building my own websites, there was never a dull moment. And I took this love and ran with it when I decided to start my journey with DevMountain. While at one of the most prestigious coding bootcamps in the country, I am learning all the newest standards in the industry and everything I need to know to jumpstart my web development career. I also used my prior sales background to build a confident personality that translates well into the teamwork aspect of Web Development.


#include "AppHdr.h"
#include "mon-movetarget.h"
#include "act-iter.h"
#include "coord.h"
#include "coordit.h"
#include "env.h"
#include "fprop.h"
#include "item-prop.h"
#include "items.h"
#include "libutil.h"
#include "los-def.h"
#include "losglobal.h"
#include "mon-behv.h"
#include "mon-pathfind.h"
#include "mon-place.h"
#include "state.h"
#include "terrain.h"
#include "traps.h"
// If a monster can see but not directly reach the target, and then fails to
// find a path to get there, mark all surrounding (in a radius of 2) monsters
// of the same (or greater) movement restrictions as also being unable to
// find a path, so we won't need to calculate again.
// Should there be a direct path to the target for a monster thus marked, it
// will still be able to come nearer (and the mark will then be cleared).
static void _mark_neighbours_target_unreachable(monster* mon)
{
const mon_intel_type intel = mons_intel(*mon);
const bool flies = mon->airborne();
const bool amphibious = (mons_habitat(*mon) == HT_AMPHIBIOUS);
const bool amph_lava = (mons_habitat(*mon) == HT_AMPHIBIOUS_LAVA);
const habitat_type habit = mons_primary_habitat(*mon);
for (radius_iterator ri(mon->pos(), 2, C_SQUARE); ri; ++ri)
{
if (*ri == mon->pos())
continue;
// Don't alert monsters out of sight (e.g. on the other side of
// a wall).
if (!mon->see_cell(*ri))
continue;
monster* const m = monster_at(*ri);
if (m == nullptr)
continue;
// Don't restrict smarter monsters as they might find a path
// a dumber monster wouldn't.
if (mons_intel(*m) > intel)
continue;
// Monsters of differing habitats might prefer different routes.
if (mons_primary_habitat(*m) != habit)
continue;
// A flying monster has an advantage over a non-flying one.
// Same for a swimming one.
if (!flies && m->airborne()
|| !amphibious && mons_habitat(*m) == HT_AMPHIBIOUS
|| !amph_lava && mons_habitat(*m) == HT_AMPHIBIOUS_LAVA)
{
continue;
}
// If the monster is trying to reach the same foe, consider their
// foe also unreachable.
if (m->travel_target == MTRAV_NONE && m->foe == mon->foe)
m->travel_target = MTRAV_UNREACHABLE;
}
}
static void _set_no_path_found(monster* mon)
{
#ifdef DEBUG_PATHFIND
mpr("No path found!");
#endif
mon->travel_target = MTRAV_UNREACHABLE;
// Pass information on to nearby monsters.
_mark_neighbours_target_unreachable(mon);
}
bool target_is_unreachable(monster* mon)
{
return mon->travel_target == MTRAV_UNREACHABLE
|| mon->travel_target == MTRAV_KNOWN_UNREACHABLE;
}
//#define DEBUG_PATHFIND
// Check whether there's an unobstructed path to our foe,
// either by using an existing travel_path or calculating a new one.
// Returns true if no further handling necessary, else false.
bool try_pathfind(monster* mon)
{
// Just because we can *see* our target, that doesn't mean
// we can actually get there.
// If no path is found (too far away, perhaps) set a
// flag, so we don't directly calculate the whole thing again
// next turn, and even extend that flag to neighbouring
// monsters of similar movement restrictions.
const actor* foe = (mon->friendly() && mon->foe == MHITYOU ? &you
: mon->get_foe());
// Trying to pathfind towards nothing in particular; bail out.
if (!foe)
return false;
const coord_def targpos = foe->pos();
bool need_pathfind = !can_go_straight(mon, mon->pos(), targpos);
// Smart monsters that can fire through obstacles won't use
// pathfinding.
if (need_pathfind
&& !mon->friendly()
&& mon->can_see(*foe)
&& mons_has_los_ability(mon->type))
{
need_pathfind = false;
}
// Also don't use pathfinding if the monster can shoot
// across the blocking terrain, and is smart enough to
// realise that.
if (need_pathfind
&& !mon->friendly()
&& mons_has_ranged_attack(*mon)
&& cell_see_cell(mon->pos(), targpos, LOS_SOLID_SEE))
{
need_pathfind = false;
}
if (!need_pathfind)
{
// The target is easily reachable.
// Clear travel path and target, if necessary.
if (mon->travel_target != MTRAV_PATROL
&& mon->travel_target != MTRAV_NONE)
{
if (mon->is_travelling())
mon->travel_path.clear();
mon->travel_target = MTRAV_NONE;
}
return false;
}
// If the target is "unreachable" (the monster already tried,
// and failed, to find a path), there's a chance of trying again.
// Retreating monsters retry every turn.
if (target_is_unreachable(mon) && !one_chance_in(12))
return false;
#ifdef DEBUG_PATHFIND
mprf("%s: Target out of reach! What now?",
mon->name(DESC_PLAIN).c_str());
#endif
// If we're already on our way, do nothing.
if (mon->is_travelling() && mon->travel_target == MTRAV_FOE)
{
const int len = mon->travel_path.size();
const coord_def targ = mon->travel_path[len - 1];
// Current target still valid?
if (can_go_straight(mon, targ, targpos))
{
// Did we reach the target?
if (mon->pos() == mon->travel_path[0])
{
// Get next waypoint.
mon->travel_path.erase(mon->travel_path.begin());
if (!mon->travel_path.empty())
{
mon->target = mon->travel_path[0];
return true;
}
}
else if (can_go_straight(mon, mon->pos(), mon->travel_path[0]))
{
mon->target = mon->travel_path[0];
return true;
}
}
}
// Use pathfinding to find a (new) path to the target.
const int dist = grid_distance(mon->pos(), targpos);
#ifdef DEBUG_PATHFIND
mprf("Need to calculate a path... (dist = %d)", dist);
#endif
const int range = mon->friendly() ? 1000 : mons_tracking_range(mon);
if (range > 0 && dist > range)
{
mon->travel_target = MTRAV_UNREACHABLE;
#ifdef DEBUG_PATHFIND
mprf("Distance too great, don't attempt pathfinding! (%s)",
mon->name(DESC_PLAIN).c_str());
#endif
return false;
}
#ifdef DEBUG_PATHFIND
mprf("Need a path for %s from (%d, %d) to (%d, %d), max. dist = %d",
mon->name(DESC_PLAIN).c_str(), mon->pos().x, mon->pos().y,
targpos.x, targpos.y, range);
#endif
monster_pathfind mp;
if (range > 0)
mp.set_range(range);
if (mp.init_pathfind(mon, targpos))
{
mon->travel_path = mp.calc_waypoints();
if (!mon->travel_path.empty())
{
// Okay then, we found a path. Let's use it!
mon->target = mon->travel_path[0];
mon->travel_target = MTRAV_FOE;
return true;
}
}
// We didn't find a path.
_set_no_path_found(mon);
return false;
}
static bool _is_level_exit(const coord_def& pos)
{
// All types of stairs.
if (feat_is_stair(grd(pos)))
return true;
// Teleportation and shaft traps.
const trap_type tt = get_trap_type(pos);
if (tt == TRAP_TELEPORT || tt == TRAP_TELEPORT_PERMANENT
|| tt == TRAP_SHAFT)
{
return true;
}
return false;
}
// Returns true if a monster left the level.
bool pacified_leave_level(monster* mon, vector<level_exit> e, int e_index)
{
// If a pacified monster is leaving the level, and has reached an
// exit (whether that exit was its target or not), handle it here.
// Likewise, if a pacified monster is far enough away from the
// player, make it leave the level.
if (_is_level_exit(mon->pos())
|| (e_index != -1 && mon->pos() == e[e_index].target)
|| grid_distance(mon->pos(), you.pos()) >= LOS_DEFAULT_RANGE * 3)
{
make_mons_leave_level(mon);
return true;
}
return false;
}
// Assesses how desirable a spot is to a merfolk avatar (preferring spaces
// surrounded by water, at least one of which is deep, and with at least one
// neighbour which is inhabitable without swimming or flight)
static int _merfolk_avatar_water_score(coord_def p, bool& deep)
{
int score = 0;
bool near_floor = false;
deep = false;
for (adjacent_iterator ai(p); ai; ++ai)
{
if (grd(*ai) == DNGN_SHALLOW_WATER)
{
score++;
near_floor = true;
}
else if (grd(*ai) == DNGN_DEEP_WATER)
{
score++;
deep = true;
}
else if (feat_has_solid_floor(grd(*ai)))
near_floor = true;
}
// Don't prefer any locations non-adjacent to either shallow water or land
if (!near_floor)
return 0;
// Greatly prefer at least one tile of neighbouring deep water
if (deep)
score += 6;
// Slightly prefer standing in deep water, if possible
if (grd(p) == DNGN_DEEP_WATER)
score++;
return score;
}
// Pick the nearest water grid that is surrounded by the most
// water squares within LoS.
bool find_merfolk_avatar_water_target(monster* mon)
{
ASSERT(mon->type == MONS_MERFOLK_AVATAR);
// Moving away could break the entrancement, so don't do this.
if (grid_distance(mon->pos(), you.pos()) >= 5)
{
mon->firing_pos.reset();
return false;
}
bool deep;
// If our current location is good enough, don't bother moving towards
// some other spot which might be somewhat better
if (_merfolk_avatar_water_score(mon->pos(), deep) >= 12 && deep
&& grd(mon->pos()) == DNGN_DEEP_WATER)
{
mon->firing_pos = mon->pos();
return true;
}
if (mon->travel_target == MTRAV_MERFOLK_AVATAR)
{
coord_def targ_pos(mon->travel_path[mon->travel_path.size() - 1]);
#ifdef DEBUG_PATHFIND
mprf("merfolk avatar target is (%d, %d), dist = %d",
targ_pos.x, targ_pos.y, (int) (mon->pos() - targ_pos).rdist());
#endif
if ((mon->pos() - targ_pos).rdist() > 2)
return true;
}
int best_water_count = 0;
coord_def best_target;
deep = false;
// Try two iterations, the second more relaxed than the first. But if
// we find deep water on the first pass, don't bother with the second.
for (int iteration = 0; iteration < 2 && !deep; ++iteration)
{
int best_num = 0;
for (radius_iterator ri(mon->pos(), LOS_NO_TRANS); ri; ++ri)
{
if (!feat_is_water(grd(*ri)))
continue;
const int dist = grid_distance(mon->pos(), *ri);
// In the first iteration only count water grids that are
// not closer to the player than to the merfolk avatar.
if (iteration == 0 && dist > grid_distance(you.pos(), *ri))
continue;
// Counts deep water twice.
const int water_count = _merfolk_avatar_water_score(*ri, deep);
if (water_count > best_water_count)
{
best_water_count = water_count;
best_target = *ri;
best_num = 1;
}
else if (water_count == best_water_count)
{
const int old_dist = best_target.origin() ? INFINITE_DISTANCE
: grid_distance(mon->pos(), best_target);
if (dist < old_dist)
{
best_target = *ri;
best_num = 1;
}
else if (dist == old_dist && one_chance_in(++best_num))
best_target = *ri;
}
}
}
if (!best_water_count)
return false;
// We're already optimally placed.
if (best_target == mon->pos())
{
mon->firing_pos = mon->pos();
return true;
}
monster_pathfind mp;
#ifdef WIZARD
// Remove old highlighted areas to make place for the new ones.
if (you.wizard)
for (rectangle_iterator ri(1); ri; ++ri)
env.pgrid(*ri) &= ~(FPROP_HIGHLIGHT);
#endif
if (mp.init_pathfind(mon, best_target))
{
mon->travel_path = mp.calc_waypoints();
if (!mon->travel_path.empty())
{
#ifdef WIZARD
if (you.wizard)
{
for (coord_def pos : mon->travel_path)
env.pgrid(pos) |= FPROP_HIGHLIGHT;
}
#endif
#ifdef DEBUG_PATHFIND
mprf("Found a path to (%d, %d) with %d surrounding water squares",
best_target.x, best_target.y, best_water_count);
#endif
// Okay then, we found a path. Let's use it!
mon->firing_pos = mon->travel_path[0];
mon->travel_target = MTRAV_MERFOLK_AVATAR;
return true;
}
}
return false;
}
// Returns true if further handling neeeded.
static bool _handle_monster_travelling(monster* mon)
{
#ifdef DEBUG_PATHFIND
mprf("Monster %s reached target (%d, %d)",
mon->name(DESC_PLAIN).c_str(), mon->target.x, mon->target.y);
#endif
// Hey, we reached our first waypoint!
if (mon->pos() == mon->travel_path[0])
{
#ifdef DEBUG_PATHFIND
mpr("Arrived at first waypoint.");
#endif
mon->travel_path.erase(mon->travel_path.begin());
if (mon->travel_path.empty())
{
#ifdef DEBUG_PATHFIND
mpr("We reached the end of our path: stop travelling.");
#endif
mon->travel_target = MTRAV_NONE;
return true;
}
else
{
mon->target = mon->travel_path[0];
#ifdef DEBUG_PATHFIND
mprf("Next waypoint: (%d, %d)", mon->target.x, mon->target.y);
#endif
return false;
}
}
// Can we still see our next waypoint?
if (!can_go_straight(mon, mon->pos(), mon->travel_path[0]))
{
#ifdef DEBUG_PATHFIND
mpr("Can't see waypoint grid.");
#endif
// Apparently we got sidetracked a bit.
// Check the waypoints vector backwards and pick the first waypoint
// we can see.
// XXX: Note that this might still not be the best thing to do
// since another path might be even *closer* to our actual target now.
// Not by much, though, since the original path was optimal (A*) and
// the distance between the waypoints is rather small.
int erase = -1; // Erase how many waypoints?
const int size = mon->travel_path.size();
for (int i = size - 1; i >= 0; --i)
{
if (can_go_straight(mon, mon->pos(), mon->travel_path[i]))
{
mon->target = mon->travel_path[i];
erase = i;
break;
}
}
if (erase > 0)
{
#ifdef DEBUG_PATHFIND
mprf("Need to erase %d of %d waypoints.",
erase, size);
#endif
// Erase all waypoints that came earlier:
// we don't need them anymore.
while (0 < erase--)
mon->travel_path.erase(mon->travel_path.begin());
}
else
{
// We can't reach our old path from our current
// position, so calculate a new path instead.
monster_pathfind mp;
// The last coordinate in the path vector is our destination.
const int len = mon->travel_path.size();
if (mp.init_pathfind(mon, mon->travel_path[len-1]))
{
mon->travel_path = mp.calc_waypoints();
if (!mon->travel_path.empty())
{
mon->target = mon->travel_path[0];
#ifdef DEBUG_PATHFIND
mprf("Next waypoint: (%d, %d)",
mon->target.x, mon->target.y);
#endif
}
else
{
mon->travel_target = MTRAV_NONE;
return true;
}
}
else
{
// Or just forget about the whole thing.
mon->travel_path.clear();
mon->travel_target = MTRAV_NONE;
return true;
}
}
}
// Else, we can see the next waypoint and are making good progress.
// Carry on, then!
return false;
}
static bool _choose_random_patrol_target_grid(monster* mon)
{
const mon_intel_type intel = mons_intel(*mon);
// Zombies will occasionally just stand around.
// This does not mean that they don't move every second turn. Rather,
// once they reach their chosen target, there's a 50% chance they'll
// just remain there until next turn when this function is called
// again.
if (intel == I_BRAINLESS && coinflip())
return true;
// If there's no chance we'll find the patrol point, quit right away.
if (grid_distance(mon->pos(), mon->patrol_point) > 2 * LOS_DEFAULT_RANGE)
return false;
// Can the monster see the patrol point from its current position?
const bool patrol_seen = mon->see_cell(mon->patrol_point);
if (intel == I_BRAINLESS && !patrol_seen)
{
// Really stupid monsters won't even try to get back into the
// patrol zone.
return false;
}
// While the patrol point is in easy reach, monsters of brainless
// intelligence will only use a range of 4 (distance from the patrol point).
// Otherwise, try to get back using the full LOS.
const int rad = (intel > I_BRAINLESS || !patrol_seen) ?  If everything fails,
// we'll stay here anyway.
for (radius_iterator ri(mon->patrol_point, you.current_vision, C_SQUARE, true);
ri; ++ri)
{
if (!in_bounds(*ri) || !mon->can_pass_through_feat(grd(*ri)))
continue;
// Don't bother moving to squares (currently) occupied by a
// monster. We'll usually be able to find other target squares
// (and if we're not, we couldn't move anyway), and this avoids
// monsters trying to move onto a grid occupied by a plant or
// sleeping monster.
if (monster_at(*ri))
continue;
if (patrol_seen)
{
// If the patrol point can be easily (within LOS) reached
// from the current position, it suffices if the target is
// within reach of the patrol point OR the current position:
// we can easily get there.
// Only smart monsters will even attempt to move out of the
// patrol area.
// NOTE: Either of these can take us into a position where the
// target cannot be easily reached (e.g. blocked by a wall)
// and the patrol point is out of sight, too. Such a case
// will be handled below, though it might take a while until
// a monster gets out of a deadlock. (5% chance per turn.)
if (!patrol.see_cell(*ri)
&& (!is_smart || !lm.see_cell(*ri)))
{
continue;
}
}
else
{
// If, however, the patrol point is out of reach, we have to
// make sure the new target brings us into reach of it.
// This means that the target must be reachable BOTH from
// the patrol point AND the current position.
if (!patrol.see_cell(*ri)
|| !lm.see_cell(*ri))
{
continue;
}
// If this fails for all surrounding squares (probably because
// we're too far away), we fall back to heading directly for
// the patrol point.
}
bool set_target = false;
if (intel == I_BRAINLESS && *ri == mon->patrol_point)
{
// Slightly greater chance to simply head for the centre.
count_grids += 3;
if (x_chance_in_y(3, count_grids))
set_target = true;
}
else if (one_chance_in(++count_grids))
set_target = true;
if (set_target)
mon->target = *ri;
}
return count_grids;
}// Returns true if further handling neeeded.
static bool _handle_monster_patrolling(monster* mon)
{
if (!_choose_random_patrol_target_grid(mon))
{
// If we couldn't find a target that is within easy reach
// of the monster and close to the patrol point, head back
// to patrol point.
 This
// is in part due to the flavour of e.g. bees finding
// their way back to the Hive (and patrolling should
// really be restricted to cases like this), and for the
// other part it's not all that important because we
// calculate the path once and then follow it home, and
// the player won't ever see the orderly fashion the
// bees will trudge along.
// What he will see is them swarming back to the Hive
// entrance after some time, and that is what matters.
monster_pathfind mp;
if (mp.init_pathfind(mon, mon->patrol_point))
{
mon->travel_path = mp.calc_waypoints();
if (!mon->travel_path.empty())
{
mon->target = mon->travel_path[0];
mon->travel_target = MTRAV_PATROL;
}
else
{
// We're so close we don't even need a path.
mon->target = mon->patrol_point;
}
}
else
{
// Stop patrolling.
mon->patrol_point.reset();
mon->travel_target = MTRAV_NONE;
return true;
}
}
else
{
#ifdef DEBUG_PATHFIND
mprf("Monster %s (pp: %d, %d) is now patrolling to (%d, %d)",
mon->name(DESC_PLAIN).c_str(),
mon->patrol_point.x, mon->patrol_point.y,
mon->target.x, mon->target.y);
#endif
}
return false;
}
void set_random_target(monster* mon)
{
mon->target = random_in_bounds(); // If we don't find anything better.
for (int tries = 0; tries < 150; ++tries)
{
coord_def delta;
delta.x = random2(13) - 6;
delta.y = random2(13) - 6;
if (delta.origin())
continue;
const coord_def newtarget = delta + mon->pos();
if (!in_bounds(newtarget))
continue;
if (!summon_can_attack(mon, newtarget))
continue;
if (!mon->is_location_safe(newtarget))
continue;
mon->target = newtarget;
break;
}
}
// Try to find a band leader for the given monster
static monster * _active_band_leader(monster * mon)
{
// Not a band member
if (!mon->props.exists("band_leader"))
return nullptr;
// Try to find our fearless leader.
unsigned leader_mid = mon->props["band_leader"].get_int();
return monster_by_mid(leader_mid);
}
// Return true if a target still needs to be set. If returns false, mon->target
// was set.
static bool _band_wander_target(monster * mon)
{
int dist_thresh = LOS_DEFAULT_RANGE + HERD_COMFORT_RANGE;
monster * band_leader = _active_band_leader(mon);
if (band_leader == nullptr)
return true;
int leader_dist = grid_distance(mon->pos(), band_leader->pos());
if (leader_dist > dist_thresh)
{
monster_pathfind mp;
mp.set_range(1000);
if (mp.init_pathfind(mon, band_leader->pos()))
{
mon->travel_path = mp.calc_waypoints();
if (!mon->travel_path.empty())
{
// Okay then, we found a path. Let's use it!
mon->target = mon->travel_path[0];
mon->travel_target = MTRAV_PATROL;
return false;
}
else
return true;
}
return true;
}
vector<coord_def> positions;
for (radius_iterator r_it(mon->pos(), LOS_NO_TRANS, true); r_it; ++r_it)
{
if (!in_bounds(*r_it))
continue;
if (!band_leader->is_location_safe(*r_it))
continue;
int dist = grid_distance(*r_it, band_leader->pos());
if (dist < HERD_COMFORT_RANGE)
positions.push_back(*r_it);
}
if (positions.empty())
return true;
mon->target = positions[random2(positions.size())];
ASSERT_IN_BOUNDS(mon->target);
return false;
}
// Returns true if a movement target still needs to be set
static bool _herd_wander_target(monster * mon)
{
vector<monster_iterator> friends;
map<int, vector<coord_def> > distance_positions;
int dist_thresh = LOS_DEFAULT_RANGE + HERD_COMFORT_RANGE;
for (monster_iterator mit; mit; ++mit)
{
if (*mit == mon
|| mons_genus(mit->type) != mons_genus(mon->type)
|| grid_distance(mit->pos(), mon->pos()) > dist_thresh)
{
continue;
}
friends.push_back(mit);
}
if (friends.empty())
return true;
for (radius_iterator r_it(mon->pos(), LOS_NO_TRANS, true); r_it; ++r_it)
{
if (!in_bounds(*r_it))
continue;
if (!mon->is_location_safe(*r_it))
continue;
int count = 0;
for (monster_iterator &fr_it : friends)
{
if (grid_distance(fr_it->pos(), *r_it) < HERD_COMFORT_RANGE
&& fr_it->see_cell_no_trans(*r_it))
{
count++;
}
}
if (count > 0)
distance_positions[count].push_back(*r_it);
}
map<int, vector<coord_def> >::reverse_iterator back =
distance_positions.rbegin();
if (back == distance_positions.rend())
return true;
mon->target = back->second[random2(back->second.size())];
return false;
}
static bool _herd_ok(monster * mon)
{
bool in_bounds = false;
bool intermediate_range = false;
int intermediate_thresh = LOS_DEFAULT_RANGE + HERD_COMFORT_RANGE;
// herdlings magically know others even out of LOS
for (monster_iterator mit; mit; ++mit)
{
if (*mit == mon)
continue;
if (mons_genus(mit->type) == mons_genus(mon->type))
{
int g_dist = grid_distance(mit->pos(), mon->pos());
if (g_dist < HERD_COMFORT_RANGE
&& mon->see_cell_no_trans(mit->pos()))
{
in_bounds = true;
break;
}
else if (g_dist < intermediate_thresh)
intermediate_range = true;
}
}
return in_bounds || !intermediate_range;
}
// Return true if we don't have to do anything to keep within an ok distance
// of our band leader. (If no leader exists we don't have to do anything).
static bool _band_ok(monster * mon)
{
// Don't have to worry about being close to the leader if no leader can be
// found.
monster * leader = _active_band_leader(mon);
if (!leader)
return true;
int g_dist = grid_distance(leader->pos(), mon->pos());
// If in range, or sufficiently out of range we can just wander around for
// a while longer.
if (g_dist < HERD_COMFORT_RANGE && mon->see_cell_no_trans(leader->pos())
|| g_dist >= (LOS_DEFAULT_RANGE + HERD_COMFORT_RANGE))
{
return true;
}
return false;
}
void check_wander_target(monster* mon, bool isPacified)
{
// default wander behaviour
if (mon->pos() == mon->target
|| mons_is_batty(*mon)
|| (!isPacified && !mons_is_avatar(mon->type) && one_chance_in(20))
|| herd_monster(*mon) && !_herd_ok(mon)
|| !_band_ok(mon))
{
bool need_target = true;
if (mon->is_travelling())
need_target = _handle_monster_travelling(mon);
// If we still need a target because we're not travelling
// (any more), check for patrol routes instead.
if (need_target && mon->is_patrolling())
need_target = _handle_monster_patrolling(mon);
if (need_target && herd_monster(*mon))
need_target = _herd_wander_target(mon);
if (need_target
&& _active_band_leader(mon) != nullptr)
{
need_target = _band_wander_target(mon);
}
// XXX: This is really dumb wander behaviour... instead of
// changing the goal square every turn, better would be to
// have the monster store a direction and have the monster
// head in that direction for a while, then shift the
// direction to the left or right. We're changing this so
// wandering monsters at least appear to have some sort of
// attention span. -- bwr
if (need_target)
set_random_target(mon);
}
}
static void _find_all_level_exits(vector<level_exit> &e)
{
e.clear();
for (rectangle_iterator ri(1); ri; ++ri)
{
if (!in_bounds(*ri))
continue;
if (_is_level_exit(*ri))
e.push_back(level_exit(*ri, false));
}
}
int mons_find_nearest_level_exit(const monster* mon, vector<level_exit> &e,
bool reset)
{
if (e.empty() || reset)
_find_all_level_exits(e);
int retval = -1;
int old_dist = -1;
for (unsigned int i = 0; i < e.size(); ++i)
{
if (e[i].unreachable)
continue;
int dist = grid_distance(mon->pos(), e[i].target);
if (old_dist == -1 || old_dist >= dist)
{
retval = i;
old_dist = dist;
}
}
return retval;
}
void set_random_slime_target(monster* mon)
{
// Strictly neutral slimes will go for the nearest item.
for (distance_iterator ri(mon->pos(), true, false, you.current_vision);
ri; ++ri)
{
if (!in_bounds(*ri) || !mon->see_cell(*ri))
continue;
if (testbits(env.pgrid(*ri), FPROP_NO_JIYVA))
continue;
for (stack_iterator si(*ri); si; ++si)
{
item_def& item(*si);
if (item_is_jelly_edible(item))
{
mon->target = *ri;
goto end;
}
}
}
end:
if (mon->target == mon->pos() || mon->target == you.pos())
set_random_target(mon);
}
static bool _can_safely_go_through(const monster * mon, const coord_def p)
{
ASSERT(map_bounds(p));
if (!monster_habitable_grid(mon, grd(p)))
return false;
// Stupid monsters don't pathfind around shallow water
if (mon->floundering_at(p) && (mons_intel(*mon) >= I_HUMAN))
return false;
return true;
}
// Checks whether there is a straight path from p1 to p2 that monster can
// safely passes through.
// If it exists, such a path may be missed; on the other hand, it
// is not guaranteed that p2 is visible from p1 according to LOS rules.
// Not symmetric.
// FIXME: This is used for monster movement. It should instead be
// something like exists_ray(p1, p2, opacity_monmove(mons)),
// where opacity_monmove() is fixed to include opacity_immob.
bool can_go_straight(const monster* mon, const coord_def& p1,
const coord_def& p2)
{
// If no distance, then trivially true
if (p1 == p2)
return true;
if (grid_distance(p1, p2) > get_los_radius())
return false;
// XXX: Hack to improve results for now. See FIXME above.
ray_def ray;
if (!find_ray(p1, p2, ray, opacity_mons_immob(mon)))
return false;
while (ray.advance() && ray.pos() != p2)
if (!_can_safely_go_through(mon, ray.pos()))
return false;
return true;
}
↑ V648 Priority of the '&&' operation is higher than that of the '||' operation.


Ploror688.github.io
Find writer Find Jobs! Search Gumtree Briefly.co.za is on the hunt for a political writer to start asap.Do you love writing and Jobs in South Africa. Writing Jobs - https://sawn.co.za - South African Writers. Creative Writing Prompt: Conspiracy! Writer's Digest. Creative Writing Jobs In South Africa — Creative Writing. 12 Steps To Writing The Perfect Screenplay: The Write Journey is an interactive course for writers who would like to write a screenplay for feature film or television. Craigslist: westside-southbay-310 jobs, apartments Craigslist: hanford-corcoran jobs, apartments About Us Student Work and Jobs. Welcome to Rent-a-Student South Africa. We help registered (part vetted) students secure paid part-time and casual work throughout.
The National Union of Mineworkers (NUM) is a trade union in South Africa. With a membership of 300,000 it is the largest affiliate of the Congress of South African.
Inspiring Fifty: South Africa 2017 - Inspiring fifty. 2018 Film Releases In South Africa The Writing Studio. Craigslist provides local classifieds and forums for jobs, housing, for sale, services, local community, and events.
Writer Jobs - November 2018 Indeed.co.za. Writing Jobs - on the South African Writer's Network (SAWN). Craigslist: south bay area jobs, apartments FOREWORD BY THE MINISTER Revised White Paper on Arts, Culture and Heritage Final Version (October 2013) 8 P a g e INTRODUCTION BY THE DEPUTY MINISTER.
My favorite city essay neighbors essay about crime essay technology and communication values. Short energy essay guidelines essay on spring 116 Writer Jobs in South Africa Adzuna. REVISED WHITE PAPER ON ARTS, CULTURE AND HERITAGE. All Creative Writing jobs in South Africa on Careerjet.co.za, the search engine for jobs in South Africa.
Jobs for creative writing south africa - MasterPBN. Anna Davis Anna is the founder and Director of the Curtis Brown Creative writing school. She is the author of five novels, published around the world in 20 languages:. 13 Insanely Cool Resumes That Landed Interviews At Google. Creative writing jobs south africa. The Writing Prompt: Take an event from history and write a fictional account describing a conspiracy theory about what "REALLY" happened. Or, if you prefer, write. How These 13 Insanely Creative Resumes Got People Interviews At Google And Other Cool Places. Online Creative Writing jobs in South Africa Careerjet.co.za. Creative writing jobs in south africa to write about wedding speech order canada. Reported to have a chance to choose activities and moni managed teams and innovation.
Craigslist: vermont jobs, apartments, for sale, services.
Creative Writing Jobs In South Africa , Creative Writing. Job search Inspiring careers on the Guardian Execution for real Creative Writing job offers in South Africa. Enter your city or postal code in the where box to show results in your area. Please
Prof. Anusuya Chinsamy-Turan is a South African vertebrate paleontologist known for her expertise and developments in the study of the microstructure of fossil teeth. Creative Writing jobs in South Africa Careerjet.co.za. Writer jobs now available. Content Writer, Excellent spelling and creative writer. Content Writer salaries in South Africa.
116 Writer Jobs in South Africa available on Adzuna, South Africa s job search engine. Discover over 50,000 new job ads every. Creative Writing Jobs in South Africa. Support in designing creatives. First experience in creative thinking, business plan writer montreal marketing and channel. Most Competitive Jobs In America - Business Insider. Film and Television News and Jobs for Professional Filmmakers. Find Film Production Companies and Crew for your next Production. From choreographers to sports agents, these are the 10 most competitive jobs in America.
Student Work and paid Part time Jobs throughout South Africa. National Union of Mineworkers (South Africa) - Wikipedia. Writer Find Jobs Gumtree Classifieds South Africa. Creative Writing Summer Programme Institute. Are you looking for freelance writing jobs? Working independently is a great way to supplement your income or build up full-time. Rhodes University is a 114-year old academic institution in 2018 ,with a reputation for academic excellence.This is South African University, is located.
How to land freelance writing jobs in South Africa. This programme builds on a rich literary tradition at Cambridge and is designed for those wishing to develop their existing writing skills, either for professional. All Online Creative Writing jobs in South Africa on Careerjet.co.za, the search engine for jobs in South Africa. Colleges Help: Creative writing jobs in south africa.
Rhodes University-Where Leaders Learn. Published authors teach our creative writing courses. Craigslist: sheboygan, WI jobs, apartments Find your next role on Guardian Jobs. Browse vacancies in charities, schools, government, social care, media, marketing


R/DimReduction.R
methodsDimReduction.Rd
Wrapper function for dimensionality reduction methods
methodsDimReduction(Y, ndim, distY = dist(Y, method = dist.method), dist.method = "euclidean", method = c("DiffusionMap", "DRR", "ICA", "LLE", "Isomap", "LaplacianEigenmap", "MDS", "PCA", "kPCA", "nMDS", "tSNE", "UMAP"), optN = NULL, verbose = FALSE, params = NULL)
| Y | \[N x P\] data matrix for which the dimensionality of P should be reduced |
|---|---|
| ndim | maximum dimensionality [integer] to retain in the data; large values can cause long computation times. |
| distY | [dist] object of class dist containing pairwise distances of Y used for methods DiffusionMap, Isomap, MDS and nMDS; if non specified, stats::dist with Euclidean distance applied to supplied Y. |
| dist.method | [character] method for computing the distance matrix; one of
euclidean, maximum, manhattan, canberra, binary or minkowski; see
|
| method | Dimensionality reduction method [character] to be applied; one of DiffusionsMaps, DRR, ICA, LLE, Isomap, LaplacianEigenmap, MDS, PCA, kPCA, nMDS and tSNE. |
| optN | optimal number [integer] of neighbours to consider for dimensionality reduction; relevant for methods LLE, LaplacianEigenmaps, Isomap and tSNE. |
| verbose | [logical] If set, progress messages are printed to standard out. |
| params | [list] optional additional parameters for dimensionality reduction methods; see details. |
named list with dimensionality reduced phenotypes (reducedY) and object returned by specified dimensionality reduction method (results) with additional output, see details.
methodsDimReduction wraps around the following implementations of
the dimensionality reduction methods it provides:
* Diffusion Map: diffuse
* Dimensionality reduction by regression (DRR): drr
* Independent component analysis (ICA): fastICA
* Local liner embedding (LLE): lle
* Isomap: isomap
* Laplacian Eigenmap: spec.emb
and
make.kNNG
* Multi-dimensional scaling (MDS) : cmdscale
* Principal component analysis (PCA): prcomp
* Kernel PCA (kPCA): kpca
* non-metrix MDS (nMDS): metaMDS
* t- stochastic neighbourhood embedding (tSNE): Rtsne
* Uniform manifold approximation and projection (umap):
umap


The global DOM Element type.
The global DOM SVGElement type.
The document's active/focused element.
A key representing a DOM boundary.
The document title.
Add an event listener to the document.
A string representing the event type to listen for.
The function that receives a notification when an event of the specified type occurs.
If true, useCapture indicates that the user wishes to initiate capture.
Adopts a node from an external document.
The node to be adopted.
The adopted node able to be used in the document.
Appends a node to the parent, if provided, or the document.body otherwise.
The node to append.
The node to append to, otherwise the document.body.
Creates a new Comment node.
A string to populate the new Comment node.
A Comment node.
Creates a new CustomEvent.
A string representing the event type.
An options object specifying bubbles:boolean, cancelable:boolean and/or detail:Object information.
A CustomEvent.
Creates a new DocumentFragment.
A DocumentFragment.
Creates the specified HTML element or an HTMLUnknownElement if the given element name isn't a known one.
A string that specifies the type of element to be created.
The created element.
Creates a new MutationObserver.
A callback that will recieve the change records with the mutations.
A MutationObservere.
Creates an HTMLTemplateElement using the markup provided.
A string containing the markup to turn into a template. Note: This string must contain the template element as well.
The instance of HTMLTemplateElement that was created from the provided markup.
Creates a new Text node.
A string to populate the new Text node.
A Text node.
Dispatches an event on the document.
The event to dispatch.
Gives the values of all the CSS properties of an element after applying the active stylesheets and resolving any basic computation those values may contain.
The Element for which to get the computed style.
The computed styles.
Locates an element in the document according to its id.
The id to search the document for.
The found element.
Injects styles into the destination element, or the document.head if no destination is provided.
The css text to injext.
The destination element to inject the css text into. If not specified it will default to the document.head.
Indicates whether or not the styles should be prepended to the destination. By default they are appended.
The Style node that was created.
Gets the element that is the next sibling of the provided element.
The element whose next sibling is being located.
The next sibling Element of the provided Element.
Performs a query selector on the document and returns all located matches.
The query to use in searching the document.
A list of all matched elements in the document.
Remove an event listener from the document.
A string representing the event type to listen for.
The function to remove from the event.
Specifies whether the listener to be removed was registered as a capturing listener or not.
Removes the specified node from the parent node.
The node to remove.
The parent node from which the node will be removed.
Replaces a node in the parent with a new node.
The node to replace the old node with.
The node that is being replaced.
The node that the current node is parented to.
Generated using TypeDoc
Represents the core APIs of the DOM.


Core 1 - Identity, Values and Strength Activity
Explain a situation where you have had an ethical decision to make. Discuss how you weighed up the values involved in that decision, the decision you made and the consequences of the action you took.
In my first year at University I lived in one of the halls with a group of people I got along well with. One of our group had some social and emotional issues as well as some problems with self-control, occasionally becoming violent at the worst of times. Throughout the year we tried to support him in various ways. At the end of the year most of us decided to go flatting together and the dilemma arose on whether to invite him or not. He didn’t have other friends and he would no doubt struggle even more starting over with strangers again, as he seemed more comfortable with us than elsewhere. We decided to invite him to flat with us for the year. I no longer live with him, but I believe that living with helped him in the long run in dealing with some of the issues he faces. It was a complicated situation, but I like to think that my empathy helped me to make the right choice in this situation.
Describe how your culture has influenced your values and identity.
My culture growing up has developed me into a person who primarily values honesty, empathy and humility. I believe that a great deal of everyday social tensions and differences stem from a lack of proper communication or lack of honesty. My cultural influences have taught me the value of empathy and how beneficial it can be for your personal or professional relationships by making a conscious attempt to understand how those around you are feeling. My folks raised me in an environment that taught me humility, and the importance of taking pride in yourself without becoming arrogant.
Evaluate your strengths and limitations in terms of your learning and career development
I believe my greatest workplace strengths are my openness to learn, my easy-goingness and empathy. I am very open to feedback on my work and am comfortable asking questions and positioning myself as a learner. While working in group settings, I’m quite relaxed and get along well with most people. Should tensions arise, I try my best to take a constructive approach and sort through the tension respectfully.
My greatest limitation in a work environment is my confidence, as I often take my modesty too far in my self-evaluation and tend to undersell myself and my achievements. Another limitation of mine is my tendency to be a perfectionist. While I believe strongly in quality over quantity, I have in the past taken this too far and spent more time than necessary ‘perfecting’ my work.
Identify which of your strengths might help you in your learning journey and how they might intersect with learning obstacles.
I believe my openness to learning will be a great help in my learning. There are plenty of knowledgeable people both in the student cohort and the EDA staff. Seeking out and listening to their advice will help me develop into a successful programmer. I’m hoping my easygoingness and empathy make it easy for me to establish positive working relationships within my cohort.
Share an example from your experience of where you were trying to work productively with others, but there was resistance or tension. Discuss the strategies you used at that time, how effective they were, and your reflections on what other strategies you would try now, and why.
While studying at University, I ended up in group project with three others I hardly knew, two of whom were well known to dislike each other. It had a bit of an impact on the groups success at working together so me I brought it up with the other team member and we discussed it. We decided to tell the two who were fighting that we were going to go to our lecturer and ask if she could rearrange the groups. They agreed that was best, so we explained to the lecturer and she swapped the groups around, which definitely helped our group’s productivity. In hindsight I think what we did may have made for a better back up plan. If we’d handled it internally and told the two who were fighting that they had to stop the fighting and keep it professional for our project I think we could have had a more positive result. Our solution was not one that can often be applied to this sort of issue and I think it could have worked better for everyone to handle it internally.


Hyundai Venue Involved In A Horrific Crash In India – Details
by Surendhar MThe accident pictures of the Hyundai Venue in a heavy crash show how well the bodyshell has been kept intact
Despite being late to the party, Hyundai Motor India Limited (HMIL) launched the long-awaited Venue on May 21. After setting a record of 2,000 bookings in the very first day official reservations opened, the compact SUV went on to scale greater heights as it reached 50,000 reservations in no time.
As expected, the Venue outsold the segment’s mainstay lead Maruti Suzuki Vitara Brezza as well a few months ago. It is priced between Rs. 6.50 lakh and Rs. 11.10 lakh (ex-showroom) and comes loaded with several safety features too, apart from the Blue Link connectivity setting it apart from the rest of its rivals.
A Venue was unfortunately involved in a horrific accident and the pictures have been out revealing some key details. Although the front and rear ends are shattered, the bodyshell of the compact five-seater SUV remains intact. The initial reports indicate that there have been no casualties involved either.
The totalled Venue looks to be a top-spec variant as curtain airbags can be clearly seen. The SUV is built with 69% Advanced High Strength Steel (AHSS) and High Strength Steel (HSS) according to the brand to achieves prominent static and dynamic stiffness with improved structural rigidity.
As standard, the Venue offers dual front airbags, ABS (Anti-lock Braking System) with EBD (Electronic Brake-force Distribution), driver and co-driver seatbelt reminder, reversing sensors high-speed warning system, speed sensing auto door lock as well as impact sensing auto door unlock.
The top-of-the-line variants offer dual front airbags, front seat side-impact and side curtain airbags along with cornering lamp, automatic headlamps with escort function and ISOFIX child mounts. The three main safety and driver-assistive technologies include Vehicle Stability Management(VSM), Hill-start assist control(HAC), Electronic Stability Control(ESC).
Taking design inspiration from the latest crop of global Hyundai SUVs, the Venue is powered by an all-new 1.0-litre turbo three-cylinder petrol, a 1.2-litre MPI petrol or a 1.4-litre U2 CRDI diesel unit.


Measure Interest Before Building Products
Before you ever sell a product you should be marketing to everyone. Unlike traditional marketing, which includes branding, this is a different approach. You determine the interest of users before you ever try to sell your product.
Joel Gasgoine of Buffer did this before launching Buffer. He setup some simple landing pages to test the idea. Once the pages were created he sent out a tweet to create some traffic. These pages weren't created to sell something, They were used to gauge interest and gather emails. But, They didn't say, "If you're interested click this button," they were created to look like the product actually existed.
This is a great idea to test whether your product is valuable. It's promoted heavily in the lean startup method and I suggest doing it more than once. If you only test one idea, you have nothing to compare it against. Once you've done it a few times, you get faster with iteration and understand which product you should launch.
Be careful which one you choose. The product with the most traction may not be able to receive venture-based financing. Dan Martell talks about this when he pivoted FlowTown. His team tested three products and the one with the most traction wasn't the product they formed the company around.
It's hard to build anything that people care about and that is unique. Even though Timely was unique, grew, and people got it and it grew the best, even more so than the ambassador, which is the one we double downed on, there is also this element of creating a venture bankable business. I didn't feel that another Twitter tool or Facebook scheduling tool was the thing to bet the money on.
Product testing with landing pages can also be used with B2B businesses. Although B2B products serve niche markets, if they are needed, you can prove the demand with testing.
When testing B2B products, test against the user not the purchaser. It's common with B2B products that the purchaser isn't the actual user of the product. This is often why CEOs purchase software that is never used by the company. However, don't let this fool you. If you think getting a meeting with the CEO is the best way to test, you'd be wrong.
Seth Godin talks about starting in the middle rather than the top. He explains most people think it's important to get to the CEO, but it's not. If you get a meeting with the CEO, he will thank you for your time and then ask her team if it's a good purchasing decision. Seth and I are convinced starting in the middle is the right path to success.
You should be constantly marketing your product. But, you need to decide to do this initially, with intention. Start marketing the product before it's ever built. Utilize the marketing channel to gauge interest and identify the value propositions of the product.
Note: If your interested in a cheap way of testing, I created some simple Jekyll landing pages that can be hosted for free using Github pages. Feel free to fork and buy some ad traffic to test.


javanalysis
/
io.disassemble.javanalysis
/
javassist.CtClass
/
staticInitializer
staticInitializer
val
CtClass
.
staticInitializer
:
CtMethod
?
Gets a list of for this
CtClass
.


Marco Silva insists he is the right manager to improve Everton’s fortunes
Manager Marco Silva is determined to find a way to solve Everton’s problems on the pitch even though his future at the club hangs in the balance.
A 2-0 home defeat to bottom side Norwich made it six losses in nine league matches and leaves the Toffees just four points above the relegation zone.
Factor in the forthcoming month from hell – with Liverpool, Leicester (twice), Chelsea, Manchester United, Arsenal and Manchester City all to face in their next nine matches – and Silva’s position is precarious.
He was not helped by a large number of Everton fans joining the away supporters in a chorus of “sacked in the morning” towards the end of the game, which was decided by goals from Todd Cantwell and Dennis Srbeny – the Canaries’ first on the road in 10 hours and 20 minutes of league football.
Majority owner Farhad Moshiri has already sacked Roberto Martinez, Ronald Koeman and Sam Allardyce since assuming control of the club in February 2016.
“I respect all the reaction,” said Silva after hearing the crowd calling for him to go, with one fan loudly shouting “He’s gotta go Bill” across the Main Stand to chairman Bill Kenwright.
“But we have the confidence and we have to keep working hard to change because we came from good results before (three wins and a draw in the last five matches in all competitions).
“We are trying to look for some consistency as a team and the last few results we did that but we didn’t have the right performance to get the points.
“We have to keep working hard and avoid the type of mistakes we made this.
“If something goes against us in the game we have to show enough quality and be calm enough to take the right decisions.
“It is just myself and the players on the pitch who can solve that.
“My job is to analyse why this has happened again. I am concerned about what has happened on the pitch and what I can control is the situation and show my players why these things happened.”
Norwich’s climb off the foot of the table was almost reduced to a footnote with doubts circling about Silva’s future.
But having registered their first league win since beating Manchester City in September, boss Daniel Farke believes it could be a turning point.
“The first 12 games were disappointing in terms of points, not performances,” said the German.
“The main part of the season starts now and the main part of the season is when the table is made.
“When you come away from Everton with a clean-sheet win it is good for the mood.
“If I’m honest we deserve a bit of luck. It is good for the confidence.
“We are far away from competing for the Premier League title but if we repeat this performance on a weekly basis we have a chance of repeating a sensation at the end of the season.”


January 29-31, 2019 in Gilbert Arizona
Three days of lighting talks, coding sessions, and discussions on uPortal's future.
...


Navigate away and lose changes?


The bot may get stuck in ambiguity at several initial stages due to improper generation of training examples. At such times refresh the page or wait until it gets out from the situation