Basic Operations
Type an atomic symbol or name (e.g. H or Hydrogen) and press ENTER to create an atom. Click on an atom to select or grab it; click on the background to unselect. Click on an unselected atom with another atom selected to form a single bond; consecutive left clicks will increase bond order, while right clicks will decrease bond order or destroy bonds. Press DELETE to delete the currently selected atom.
Movement and Selection
Use the scroll wheel to zoom in and out; the window will pan towards the cursor location, so zoom can be used to pan as well. Hold the middle mouse button to rotate the system in 3D around the selected atom, or around the cursor if no atom is selected. Hold SHIFT to display formal charges, rotate around the center of the selected molecule (WIP), delete entire molecules, and form ionic bonds with the selected atom as the cation.
Advanced Bonding
Hold SHIFT and press Up or Down to change the charge of the selected atom. Press Left and Right to select bonds with the primary pointer; hold CTRL and click bonds and atoms to (de)select them with the secondary pointer. Press TAB to select the atom at the other end of the currently selected bond. Press + (SHIFT and =) to equally distribute all secondary-selected bonds that belong to the current primary-selected atom; press - to reverse this process (new bond orders will be chosen randomly).
Advanced Creation
Multiple atoms created in the same action will be automatically single-bonded together around the first atom, including numbers for multiple atoms of the same type (e.g. 'CH4'); use a space to change focus to the last atom entered, or a space followed by a lowercase e to increase bond order. Enter 'Close' or 'Return' to return to the selected atom, 'Close' forming a single bond (e.g. CHC e HC HC e HC HC e HClose will form a benzene ring). Enter ' cap' after an element to place it on every atom that does not fulfill the octet rule or its variants (e.g. 'H cap'). Enter ' clr' after an element to delete every instance of that element (e.g. 'H clr').


Reports loops which could be replaced with the Arrays.setAll() or Arrays.fill() calls.
This inspection suggests replacing loops with Arrays.setAll() if the language level of the project or module is 8 or higher.
Replacing loops with Arrays.fill() is possible with any language level.
For example:
for (int i=0; i<array.length; i++) {
array[i] = calc(i);
}
Will be replaced with:
Arrays.setAll(array, this::calc);
New in 2017.1


Lightbox called directly from JavaScript on page load.
<button class="play-5">Click to re-open</button>
<script>
// with a button to re-open it later
$('.play-5').yu2fvl({ open: true });
// just to open once, no element linked to it
// if you open it directly with no element linked to it
// the "vid" parameter is required
$.yu2fvl({ vid: "AbTUw7aTITg", open: true });
</script>


Development Portfolio Highlights
A brief bio
I was born in Naples, Florida and attended university at American University in Washington, DC. Besides coding, other interests are traveling and learning Korean and Chinese. In university I spent a semester as an exchange student in Korea at Yonsei University.


Impact of foreign keys absence on replicating slaves
In this post I describe what happens when a slave’s Foreign Key setup is different from that of the master. I’m in particular interested in a setup where the slave has a subset of the master’s foreign keys, or no foreign keys at all. I wish to observe whether integrity holds.
Making the changes
Which foreign keys do we have and how do we drop them? If you want to do this by hand, well, good luck! Fortunately, common_schema provides with quite a few handy views and routines to assist us. Consider viewing the existing foreign keys on sakila:
master> SELECT create_statement FROM common_schema.sql_foreign_keys WHERE TABLE_SCHEMA=‘sakila’; +————————————————————————————————————————————————————————————————-+ | create_statement | +————————————————————————————————————————————————————————————————-+ | ALTER TABLEsakila
.address
ADD CONSTRAINTfk_address_city
FOREIGN KEY (city_id
) REFERENCESsakila
.city
(city_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.city
ADD CONSTRAINTfk_city_country
FOREIGN KEY (country_id
) REFERENCESsakila
.country
(country_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.customer
ADD CONSTRAINTfk_customer_address
FOREIGN KEY (address_id
) REFERENCESsakila
.address
(address_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.customer
ADD CONSTRAINTfk_customer_store
FOREIGN KEY (store_id
) REFERENCESsakila
.store
(store_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.film
ADD CONSTRAINTfk_film_language
FOREIGN KEY (language_id
) REFERENCESsakila
.language
(language_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.film
ADD CONSTRAINTfk_film_language_original
FOREIGN KEY (original_language_id
) REFERENCESsakila
.language
(language_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.film_actor
ADD CONSTRAINTfk_film_actor_actor
FOREIGN KEY (actor_id
) REFERENCESsakila
.actor
(actor_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.film_actor
ADD CONSTRAINTfk_film_actor_film
FOREIGN KEY (film_id
) REFERENCESsakila
.film
(film_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.film_category
ADD CONSTRAINTfk_film_category_category
FOREIGN KEY (category_id
) REFERENCESsakila
.category
(category_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.film_category
ADD CONSTRAINTfk_film_category_film
FOREIGN KEY (film_id
) REFERENCESsakila
.film
(film_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.inventory
ADD CONSTRAINTfk_inventory_film
FOREIGN KEY (film_id
) REFERENCESsakila
.film
(film_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.inventory
ADD CONSTRAINTfk_inventory_store
FOREIGN KEY (store_id
) REFERENCESsakila
.store
(store_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.payment
ADD CONSTRAINTfk_payment_customer
FOREIGN KEY (customer_id
) REFERENCESsakila
.customer
(customer_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.payment
ADD CONSTRAINTfk_payment_rental
FOREIGN KEY (rental_id
) REFERENCESsakila
.rental
(rental_id
) ON DELETE SET NULL ON UPDATE CASCADE | | ALTER TABLEsakila
.payment
ADD CONSTRAINTfk_payment_staff
FOREIGN KEY (staff_id
) REFERENCESsakila
.staff
(staff_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.rental
ADD CONSTRAINTfk_rental_customer
FOREIGN KEY (customer_id
) REFERENCESsakila
.customer
(customer_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.rental
ADD CONSTRAINTfk_rental_inventory
FOREIGN KEY (inventory_id
) REFERENCESsakila
.inventory
(inventory_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.rental
ADD CONSTRAINTfk_rental_staff
FOREIGN KEY (staff_id
) REFERENCESsakila
.staff
(staff_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.staff
ADD CONSTRAINTfk_staff_address
FOREIGN KEY (address_id
) REFERENCESsakila
.address
(address_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.staff
ADD CONSTRAINTfk_staff_store
FOREIGN KEY (store_id
) REFERENCESsakila
.store
(store_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.store
ADD CONSTRAINTfk_store_address
FOREIGN KEY (address_id
) REFERENCESsakila
.address
(address_id
) ON DELETE RESTRICT ON UPDATE CASCADE | | ALTER TABLEsakila
.store
ADD CONSTRAINTfk_store_staff
FOREIGN KEY (manager_staff_id
) REFERENCESsakila
.staff
(staff_id
) ON DELETE RESTRICT ON UPDATE CASCADE | +————————————————————————————————————————————————————————————————-+
Most of the foreign key constraints use RESTRICT for DELETE (meaning you are not allowed to delete a parent row when children exist), and CASCADE for UPDATE (meaning changes to parent will propagate to children). This is good, since I want to test behavior of both RESTRICT and CASCADE.


Easily fit any model to a set of x, y data. Several preset models are provided, you can start with one of these and modify it to your liking. When you click "Optimize", your model is parsed using the powerful math.js expression parser. Then the parameters are optimized using the Nelder-Mead (simplex) method to find a local minimum of the squared error. In some cases, you may need to press "Optimize" more than once. For models with many parameters, you may need to provide some good guess values in the "Parameters" field.


Linux and MacOS support is here! Check out the MacOS sample and the Linux/MacOS/Windows Terminal/Console App. Grab the NuGet for Device.Net.LibUsb.
The most common Linux/Windows cross platform library is called LibUsb. There is a C# wrapper for it called LibUsbDotNet. This library wrapper is leveraged in Device.Net.LibUsb to bring Linux and MacOS support to your Device.Net based app. As long as you use the IDevice interface across platforms, code will be 100% compatible. The IDevice implementation is below.
Please install LibUsb! If it is not installed on your machine, the samples will not work!
In the long term, I'm still looking to build a Linux, and MacOS library from the ground up without the LibUsb dependency, so please get it contact if you'd like to contribute. But, For now, Device.Net.LibUsb will get you over the hump.
public class LibUsbDevice : IDevice
{
#region Fields
private UsbEndpointReader _UsbEndpointReader;
private UsbEndpointWriter _UsbEndpointWriter;
private int ReadPacketSize;
private SemaphoreSlim _WriteAndReadLock = new SemaphoreSlim(1, 1);
#endregion
#region Public Properties
public UsbDevice UsbDevice { get; }
public int VendorId => GetVendorId(UsbDevice);
public int ProductId => GetProductId(UsbDevice);
public int Timeout { get; }
public bool IsInitialized { get; private set; }
public ConnectedDeviceDefinitionBase ConnectedDeviceDefinition => throw new NotImplementedException();
public string DeviceId => UsbDevice.DevicePath;
#endregion
#region Events
public event EventHandler Connected;
public event EventHandler Disconnected;
#endregion
#region Constructor
public LibUsbDevice(UsbDevice usbDevice, int timeout)
{
UsbDevice = usbDevice;
Timeout = timeout;
}
#endregion
#region Implementation
public void Dispose()
{
//TODO: Release the device...
// UsbDevice.Dispose();
}
public async Task InitializeAsync()
{
await Task.Run(() =>
{
//TODO: Error handling etc.
UsbDevice.Open();
//TODO: This is far beyond not cool.
if (UsbDevice is MonoUsbDevice monoUsbDevice)
{
monoUsbDevice.ClaimInterface(0);
}
else if (UsbDevice is WinUsbDevice winUsbDevice)
{
//Doesn't seem necessary in this case...
}
else
{
((IUsbDevice)UsbDevice).ClaimInterface(0);
}
_UsbEndpointWriter = UsbDevice.OpenEndpointWriter(WriteEndpointID.Ep01);
_UsbEndpointReader = UsbDevice.OpenEndpointReader(ReadEndpointID.Ep01);
ReadPacketSize = _UsbEndpointReader.EndpointInfo.Descriptor.MaxPacketSize;
IsInitialized = true;
});
}
public async Task<byte[]> ReadAsync()
{
await _WriteAndReadLock.WaitAsync();
try
{
return await Task.Run(() =>
{
var buffer = new byte[ReadPacketSize];
_UsbEndpointReader.Read(buffer, Timeout, out var bytesRead);
return buffer;
});
}
finally
{
_WriteAndReadLock.Release();
}
}
public async Task WriteAsync(byte[] data)
{
await _WriteAndReadLock.WaitAsync();
try
{
await Task.Run(() =>
{
_UsbEndpointWriter.Write(data, Timeout, out var bytesWritten);
});
}
finally
{
_WriteAndReadLock.Release();
}
}
public async Task<byte[]> WriteAndReadAsync(byte[] writeBuffer)
{
await WriteAsync(writeBuffer);
return await ReadAsync();
}
#endregion
#region Public Static Methods
public static int GetVendorId(UsbDevice usbDevice)
{
if (usbDevice is MonoUsbDevice monoUsbDevice)
{
return monoUsbDevice.Profile.DeviceDescriptor.VendorID;
}
else
{
return usbDevice.UsbRegistryInfo.Vid;
}
}
public static int GetProductId(UsbDevice usbDevice)
{
if (usbDevice is MonoUsbDevice monoUsbDevice)
{
return monoUsbDevice.Profile.DeviceDescriptor.ProductID;
}
else
{
return usbDevice.UsbRegistryInfo.Pid;
}
}
#endregion
}
Here is a cross platform Terminal/Console sample (Linux, MacOS, Windows):
internal class Program
{
#region Fields
private static TrezorExample _DeviceConnectionExample = new TrezorExample();
#endregion
#region Main
private static void Main(string[] args)
{
//Register the factory for creating Usb devices. This only needs to be done once.
#if (LIBUSB)
LibUsbUsbDeviceFactory.Register();
#else
WindowsUsbDeviceFactory.Register();
WindowsHidDeviceFactory.Register();
#endif
_DeviceConnectionExample.TrezorInitialized += _DeviceConnectionExample_TrezorInitialized;
_DeviceConnectionExample.TrezorDisconnected += _DeviceConnectionExample_TrezorDisconnected;
Go(Menu());
new ManualResetEvent(false).WaitOne();
}
private static async Task Go(int menuOption)
{
switch (menuOption)
{
case 1:
try
{
await _DeviceConnectionExample.InitializeTrezorAsync();
await DisplayDataAsync();
_DeviceConnectionExample.Dispose();
}
catch (Exception ex)
{
Console.Clear();
Console.WriteLine(ex.ToString());
}
Console.ReadKey();
break;
case 2:
Console.Clear();
DisplayWaitMessage();
_DeviceConnectionExample.StartListening();
break;
}
}
#endregion
#region Event Handlers
private static void _DeviceConnectionExample_TrezorDisconnected(object sender, EventArgs e)
{
Console.Clear();
Console.WriteLine("Disconnnected.");
DisplayWaitMessage();
}
private static async void _DeviceConnectionExample_TrezorInitialized(object sender, EventArgs e)
{
try
{
Console.Clear();
await DisplayDataAsync();
}
catch (Exception ex)
{
Console.Clear();
Console.WriteLine(ex.ToString());
}
}
#endregion
#region Private Methods
private static int Menu()
{
while (true)
{
Console.Clear();
Console.WriteLine("Console sample. This sample demonstrates either writing to the first found connected device, or listening for a device and then writing to it. If you listen for the device, you will be able to connect and disconnect multiple times. This represents how users may actually use the device.");
Console.WriteLine();
Console.WriteLine("1. Write To Connected Device");
Console.WriteLine("2. Listen For Device");
var consoleKey = Console.ReadKey();
if (consoleKey.KeyChar == '1') return 1;
if (consoleKey.KeyChar == '2') return 2;
}
}
private static async Task DisplayDataAsync()
{
var bytes = await _DeviceConnectionExample.WriteAndReadFromDeviceAsync();
Console.Clear();
Console.WriteLine("Device connected. Output:");
DisplayData(bytes);
}
private static void DisplayData(byte[] readBuffer)
{
Console.WriteLine(string.Join(' ', readBuffer));
Console.ReadKey();
}
private static void DisplayWaitMessage()
{
Console.WriteLine("Waiting for device to be plugged in...");
}
#endregion
}
Here is a simple Mac sample.
public partial class ViewController : NSViewController
{
TrezorExample TrezorExample = new TrezorExample();
public ViewController(IntPtr handle) : base(handle)
{
}
public async override void ViewDidLoad()
{
base.ViewDidLoad();
LibUsbUsbDeviceFactory.Register();
await TrezorExample.InitializeTrezorAsync();
var buffer = await TrezorExample.WriteAndReadFromDeviceAsync();
var alert = new NSAlert
{
MessageText = $"Got it! {buffer[0]},{buffer[1]},{buffer[2]}. Warning: Make sure you unplug and replug before trying again.",
AlertStyle = NSAlertStyle.Informational
};
alert.AddButton("OK");
var returnValue = alert.RunModal();
}
public override NSObject RepresentedObject
{
get
{
return base.RepresentedObject;
}
set
{
base.RepresentedObject = value;
// Update the view, if already loaded.
}
}
}
HIDSharp is another cross platform library that looks promising. It seems to have providers for MacOS and Linux. I haven't tested this, but I'd really like to hear from anyone who has tried it.


JUNIOR SOFTWARE ENGINEER
National Capital Region
3 years experiences
Php. 35,000 - Php. 50,000
JOB Qualification
Male
A degree in computer science, engineering or equivalent
Practical experience in Core and Enterprise JAVA Development
Experience in relational database systems and SQL
Firm grasp of version control software like SVN, CVS or GIT


---
sort_order: 35
tei_id: rdx_b5h9g.p.idm202663136
annotation_count: 0
images:
small-thumbnail: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pcjdr/mini-thumbnail/
json: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pcjdr/info/
full: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pcjdr/fs/
page: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pcjdr/single-page/
thumbnail: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pcjdr/thumbnail/
title: Page 35
number: 35
---
{% raw %}JACOB HODGES. 27{% endraw %}
{% raw %}letters on other pages of the Bible, and{% endraw %}
{% raw %}soon learned to understand the difference{% endraw %}
{% raw %}between letters which resembled each{% endraw %}
{% raw %}other, till he comprehended their force{% endraw %}
{% raw %}when combined in words.{% endraw %}
{% raw %}Being informed of the great truths which{% endraw %}
{% raw %}were contained in the Bible, which ht{% endraw %}
{% raw %}might yet read for himself and more fully{% endraw %}
{% raw %}understand, Jacob was stimulated to con¬{% endraw %}
{% raw %}stant exertion, till he was able to study out{% endraw %}
{% raw %}short sentences alone, which the chaplain{% endraw %}
{% raw %}in his frequent visits to his cell would{% endraw %}
{% raw %}explain and apply to his individual case.{% endraw %}
{% raw %}It was not long before more than com¬{% endraw %}
{% raw %}mon interest was manifested by Jacob for{% endraw %}
{% raw %}his spiritual condition. He awoke to the{% endraw %}
{% raw %}melancholy fact that he was a lost and{% endraw %}
{% raw %}ruined sinner. It was from the faithful{% endraw %}
{% raw %}instructions of the chaplain that he re¬{% endraw %}
{% raw %}ceived his first religious impressions, and{% endraw %}
{% raw %}they were from the beginning of a pecu¬{% endraw %}
{% raw %}liarly marked and decided character.{% endraw %}
{% raw %}He repeatedly gave to his friends a{% endraw %}
{% raw %}minute account of the operations of his{% endraw %}
{% raw %}mind and his religious experience while{% endraw %}


09-Apr-2017 | Milku
Actually, no, there is too much disruption to my routine.
Marilyn vos Savant is an American who is known for having the highest recorded IQ, according to the Guinness Book of Records. I found a quote attributed to her that says:
"Be in the habit of getting up bright and early on the weekends. Why waste such precious time in bed?"
Oh, Marilyn, I don't regard my time in bed as wasted. I sleep. I check out my food stash. I sleep... Well, I would sleep if those humans of mine didn't hang around and disturb me. They seemed to be awake earlier than usual this weekend. I heard something mentioned about church cleaning. Get to the back of the queue, church! My cage cleaning should take priority.
There was more disruption than usual. A Grandma was visiting and my humans were keen for me to meet her. I was given the 'opportunity' to run around a big box so she could say "hello".
Then there was something on TV called a Grand National. It looked like lots of horses running around and jumping over hedges. The man on the TV sounded very excited about it all. But what's the big deal about running and jumping?
At least there was a different treat on offer yesterday. I got a taste of a mealworm. I didn't leave that hanging around for very long. Delicious! Far more tasty than the tired old leaf that one of the big humans poked into my cage. Apparently, it's a palm, because it's Palm Sunday. I don't know why those humans think palms are so special.  They should try having Hamster Sunday!