Secure Storage
There are two secure storage areas you may find useful: the configuration storage area and the one-time programmable storage area.
Configuration Storage
On SC20260 (and SC20100), there is 128 KByte secure storage area is organized as 4096 blocks of 32 bytes each.
On SC13048 there is 8KB secure storage, organized as 256 blocks of 32 bytes each.
Configuration storage can be erased and modified. Performing an erase all
in TinyCLR Config will wipe out this area. As this area is comprised of a single sector of flash memory, only the whole storage area can be erased. Partial erases are not possible.
Tip
Needed NuGets: GHIElectronics.TinyCLR.Core, GHIElectronics.TinyCLR.Devices.SecureStorage
const uint STORAGE_SIZE = 32 * 1024;
var configStorage = new SecureStorageController(SecureStorage.Configuration);
var data = new byte[STORAGE_SIZE];
Debug.WriteLine("Configuration storage total size: " +
configStorage.TotalSize.ToString() + " bytes.");
Debug.WriteLine("Configuration storage block size: " +
configStorage.BlockSize.ToString() + " bytes.");
Debug.WriteLine("Checking if blank. . .");
var isBlank = true;
for (uint block = 0; block < configStorage.TotalSize / configStorage.BlockSize; block++) {
if (!configStorage.IsBlank(block)) isBlank = false;
}
if (isBlank) {
Debug.WriteLine("Configuration storage area is blank.");
}
else {
Debug.WriteLine("Erasing entire configuration storage area...");
configStorage.Erase();
}
Debug.WriteLine("Filling buffer...");
for (var i = 0; i < data.Length; i++) {
data[i] = (byte)(i % 255);
}
Debug.WriteLine("Writing buffer...");
var dataBlock = new byte[configStorage.BlockSize];
for (uint block = 0; block < data.Length / configStorage.BlockSize; block++) {
Array.Copy(data, (int)(block * configStorage.BlockSize), dataBlock, 0,
(int)(configStorage.BlockSize));
configStorage.Write(block, dataBlock);
}
Debug.WriteLine("Comparing buffer...");
for (uint block = 0; block < data.Length / configStorage.BlockSize; block++) {
for (var byteIndex = 0; byteIndex < configStorage.BlockSize; byteIndex++) {
configStorage.Read(block, dataBlock);
if (data[block * configStorage.BlockSize + byteIndex] != dataBlock[byteIndex]) {
Debug.WriteLine("Configuration storage data is corrupted!");
Thread.Sleep(Timeout.Infinite);
}
}
}
Debug.WriteLine("Configuration storage is good to go!!!");
One Time Programmable Area
Note
If all 32 bytes of any OTP flash block contain 0xFF, the block is considered unused. If you write only 0xFF to the contents of a block, the block will be regarded as unused and you will be able to rewrite the block.
The one time programmable (OTP) secure flash region is organized into 2048 blocks on SC20260 (or SC20100), and 64 blocks on SC13048 of 32 bytes each. Once you write to a block, that block can be read but never changed.
There is no way to modify written data. Erasing the entire device Erase All
in TinyCLR Config will not erase or modify this area.
The API for OTP storage is the same as for the configuration storage area, except that instantiation takes a different argument and the Erase
method is disabled.
OTP secure storage is instantiated as follows:
var otpStorage = new SecureStorageController(SecureStorage.Otp);
Note
SC13048 allows write one time on each block, even data all is 0xFF.


The Fudge Tutorial¶
| Release: | 4.2.2 |
|---|---|
| Date: | Jun 20, 2017 |
The Generalized Nuclear Data (GND) language is a proposed successor to the venerable
Evaluated Nuclear Data File (ENDF) format. Currently, GND can be expressed in either
the XML or HDF5 formats. The fudge
Python package provides tools to read, write,
manipulate and process nuclear reaction evaluations in either the ENDF format or GND
formats. You can find more about fudge
from the GND Project Page and about GND from C. Mattoon, et al.,
Nuclear Data Sheets, Volume 113, Issue 12, December 2012, Pages 3145–3171.
In this tutorial, we will work through the development of several simple fudge scripts that will:
- translate to/from the GND and ENDF nuclear reaction data formats;
- check the physics content of an evaluation in either GND or ENDF format;
- dig deeper into the GND hierarchy and the
fudge
code- outline a larger script for processing an evaluation for use in a transport code;
I will assume throughout this tutorial that you have correctly installed fudge (see Installation if you haven’t), the Python scripting language (version 2.7.x) and the Python extensions numpy and matplotlib. I will also assume that you have working knowledge of the Python scripting language and that you are involved in nuclear data enterprise in some fashion (so I don’t have to define things like “evaluation”).
Let’s begin with the most important thing. Make sure fudge is in your PYTHONPATH! You can do this a few different ways:
Using the bash shell, at the command line do:
$ export PYTHONPATH="/full/path/to/directory/containing/fudge"Add this export directive to your
.bashrc
file.Alternatively, you can amend the
sys.path
variable to point to the directory containing thefudge
python module inside any python script you write.
OK, with that settled, you can start with the section on translating between ENDF and GND.
Note
If you find yourself lost, the Python interpretor has excellent built-in help
(just type help( object )
to learn about an object. Then, of course, there
is the Fudge Documentation itself which should have been included with your
Fudge installation in doc/html/index.html
.
Contents:


{% extends "page-layout.html" %} {% block content %}
All branches in {{account}}/{{repo}} (sort by name, sort by date):


Home
Accomodations
Activities
Contact Information
Travel Arrangements
Activities
Welcome to our exciting activities
An exciting adventure is waiting for you at Kahala!


VSL // Looking Forward To Dessert
* Ice cream sandwiches
today’s Very Short List:
food 17 Jan 2014
When not coordinating accounts at Susan Magrino Agency, Alexa Jaccarino can be found exploring, reading, and tasting all things New York. TWITTER
Subscribe
* …but cupcakes are still cupcakes. These are infused with tea leaves, which you can expect to see showing up in lots of places other than your morning mug
* According to the editors at Eatocracy, 2014 “will be less about cross-breeding and more about layering.” Enter, the parfait
http://link.nyobserver.com/516ca68465217dc6e1b9a3a61ekn0.bxk/UQvKZm-oa4SYFKEqC0d9e very short list is a
delightful e-mail that shares
cultural gems from a
different curator every day.
If you have any problems reading this e-mail, click here
http://link.nyobserver.com/516ca68465217dc6e1b9a3a61ekn0.bxk/Tyk4O_EdCBvgSTIZC2a30
Subscribe
Forward
My Account
Unsubscribe
culture 14 Jan 2014
Dr. Mark Siddall on poisons that use their power for good.
tech 13 Jan 2014
John Clifford on design, yesterday and today.
food 10 Jan 2014
Ysanne helps us all grow our own food.
Editorial Policy
Privacy Policy
Contact Us
Press
Terms + Conditions
very fine print: ©2014
Observer VSL LLC.
321 West 44th Street, 6th Floor
New York, NY 10036 USA
All rights reserved.
Questions?<PHONE_NUMBER>.
This message was intended for<EMAIL_ADDRESS>If you believe this has been sent to you in error, please safely unsubscribe


Charades/Bowls!
Welcome to the open source charades/bowls solution!
This is the form:
Team 1
Team 2
Add Clue
Submit


Release Notes¶
2.3.1 (2021-04-13)¶
Highlights¶
Entities can be annotated with boolean datatypes, for example:
file = synapseclient.File('/path/to/file', parentId='syn123', synapse_is_great=True) syn.store(file)
synapseclient is additionally packaged as a Python wheel.
Bug Fixes¶
[SYNPY-829] - syn.store always updates annotations
[SYNPY-1033] - If versionComment is left blank, previous version comment populates
Improvements¶
[SYNPY-1120] - Build wheel distributions
[SYNPY-1129] - Support boolean annotations in Python client
2.3.0 (2021-03-03)¶
Highlights¶
The index_files_for_migration and migrate_indexed_files functions are added to synapseutils to help migrate files in Synapse projects and folders between AWS S3 buckets in the same region. More details on using these utilities can be found here.
This version supports login programatically and from the command line using personal access tokens that can be obtained from your synapse.org Settings. Additional documentation on login and be found here.
# programmatic syn = synapseclient.login(authToken=<token>)
# command line synapse login -p <token>
The location where downloaded entities are cached can be customized to a location other than the user’s home directory. This is useful in environments where writing to a home directory is not appropriate (e.g. an AWS lambda).
syn = synapseclient.Synapse(cache_root_dir=<directory path>)
A helper method on the Synapse object has been added to enable obtaining the Synapse certification quiz status of a user.
passed = syn.is_certified(<username or user_id>)
This version has been tested with Python 3.9.
Bug Fixes¶
[SYNPY-1039] - tableQuery asDataFrame() results with TYPE_LIST columns should be lists and not literal strings
[SYNPY-1109] - unparseable synapse cacheMap raises JSONDecodeError
[SYNPY-1110] - Cleanup on Windows console login
[SYNPY-1112] - Concurrent migration of entities sharing the same file handle can result in an error
[SYNPY-1114] - Mitigate new Rust compiler dependency on Linux via transitive cryptography dependency
[SYNPY-1118] - Migration tool erroring when it shouldn’t
New Features¶
[SYNPY-1058] - Accept oauth access token for authentication to use Synapse REST services
[SYNPY-1103] - Multipart copy integration
[SYNPY-1111] - Add function to get user certification status
Improvements¶
[SYNPY-885] - Public interface to customize CACHE_ROOT_DIR
[SYNPY-1102] - syncToSynapse adds empty annotation values
[SYNPY-1104] - Python 3.9 support
[SYNPY-1119] - Add source storage location option to storage migrate functions
2.2.2 (2020-10-18)¶
Highlights¶
This version addresses an issue with downloads being retried unsuccessfully after encountering certain types of errors.
A create_snapshot_version function is added for making table and view snapshots.
Bug Fixes¶
[SYNPY-1096] - Fix link to Synapse on PyPI
[SYNPY-1097] - downloaded files are reset when disk space exhausted
New Features¶
[SYNPY-1041] - Snapshot feature and programmatic clients
Improvements¶
[SYNPY-1063] - Consolidate builds to GitHub Actions
[SYNPY-1099] - Replace usage of deprecated PUT /entity/{id}/version endpoint
2.2.0 (2020-08-31)¶
Highlights¶
Files that are part of syncFromSynapse and syncToSynapse operations (
synapse get -r
andsynapse sync
in the command line client, respectively) are transferred in in parallel threads rather than serially, substantially improving the performance of these operations.Table metadata from synapse get -q is automatically downloaded to a users working directory instead of to the Synapse cache (a hidden folder).
Users can now pass their API key to synapse login in place of a password.
Bug Fixes¶
[SYNPY-1082] - Downloading entity linked to URL fails: module ‘urllib.parse’ has no attribute ‘urlretrieve’
Improvements¶
[SYNPY-1072] - Improve throughput of multiple small file transfers
[SYNPY-1073] - Parellelize upload syncs
[SYNPY-1074] - Parallelize download syncs
[SYNPY-1084] - Allow anonymous usage for public APIs like GET /teamMembers/{id}
[SYNPY-1088] - Manifest is in cache with synapse get -q
[SYNPY-1090] - Command line client does not support apikey
Tasks¶
[SYNPY-1080] - Remove Versionable from SchemaBase
[SYNPY-1085] - Move to pytest testing framework
[SYNPY-1087] - Improve synapseclient installation instructions
2.1.1 (2020-07-10)¶
Highlights¶
This version includes a performance improvement for syncFromSynapse downloads of deep folder hierarchies to local filesystem locations outside of the Synapse cache.
Support is added for SubmissionViews that can be used to query and edit a set of submissions through table services.
from synapseclient import SubmissionViewSchema project = syn.get("syn123") evaluation_id = '9876543' view = syn.store(SubmissionViewSchema(name='My Submission View', parent=project, scopes=[evaluation_id])) view_table = syn.tableQuery(f"select * from {view.id}")
Bug Fixes¶
[SYNPY-1075] - Error in Python test (submission annotations)
[SYNPY-1076] - Upgrade/fix Pandas dependency
Improvements¶
[SYNPY-1070] - Add support for submission views
[SYNPY-1078] - Improve syncFromSynapse performance for large folder structures synced to external paths
2.1.0 (2020-06-16)¶
Highlights¶
A
max_threads
property of the Synapse object has been added to customize the number of concurrent threads that will be used during file transfers.import synapseclient syn = synapseclient.login() syn.max_threads = 20
If not customized the default value is (CPU count + 4). Adjusting this value higher may speed up file transfers if the local system resources can take advantage of the higher setting. Currently this value applies only to files whose underlying storage is AWS S3.
Alternately, a value can be stored in the synapseConfig configuration file that will automatically apply as the default if a value is not explicitly set.
[transfer] max_threads=16
This release includes support for directly accessing S3 storage locations using AWS Security Token Service credentials. This allows use of external AWS clients and libraries with Synapse storage, and can be used to accelerate file transfers under certain conditions. To create an STS enabled folder and set-up direct access to S3 storage, see here.
The
getAnnotations
andsetAnnotations
methods of the Synapse object have been deprecated in favor of newerget_annotations
andset_annotations
methods, respectively. The newer versions are parameterized with a typedAnnotations
dictionary rather than a plain Python dictionary to prevent existing annotations from being accidentally overwritten. The expected usage for setting annotations is to first retrieve the existingAnnotations
for an entity before saving changes by passing back a modified value.annos = syn.get_annotations('syn123') # set key 'foo' to have value of 'bar' and 'baz' annos['foo'] = ['bar', 'baz'] # single values will automatically be wrapped in a list once stored annos['qwerty'] = 'asdf' annos = syn.set_annotations(annos)
The deprecated annotations methods may be removed in a future release.
A full list of issues addressed in this release are below.
Bug Fixes¶
[SYNPY-913] - Travis Build badge for develop branch is pointing to pull request
[SYNPY-960] - AppVeyor build badge appears to be failed while the builds are passed
[SYNPY-1036] - different users storing same file to same folder results in 403
[SYNPY-1056] - syn.getSubmissions fails due to new Annotation class in v2.1.0-rc
Improvements¶
[SYNPY-1036] - Make upload speeds comparable to those of the AWS S3 CLI
[SYNPY-1049] - Expose STS-related APIs
Tasks¶
[SYNPY-1059] - Use collections.abc instead of collections
2.0.0 (2020-03-23)¶
Python 2 is no longer supported as of this release. This release requires Python 3.6+.
Highlights:¶
Multi-threaded download of files from Synapse can be enabled by setting
syn.multi_threaded
toTrue
on asynapseclient.Synapse
object. This will become the default implementation in the future, but to ensure stability for the first release of this feature, it must be intentionally enabled.import synapseclient syn = synapseclient.login() syn.multi_threaded = True # syn123 now will be downloaded via the multi-threaded implementation syn.get("syn123")
Currently, multi-threaded download only works with files stored in AWS S3, where most files on Synapse reside. This also includes custom storage locations that point to an AWS S3 bucket. Files not stored in S3 will fall back to single-threaded download even if
syn.multi_threaded==True
.synapseutils.copy()
now has limitations on what can be copied:A user must have download permissions on the entity they want to copy.
Users cannot copy any entities that have access requirements.
contentTypes
andfileNames
are optional parameters insynapseutils.copyFileHandles()
Synapse Docker Repository(
synapseclient.DockerRepository
) objects can now be submitted to Synapse evaluation queues using theentity
argument insynapseclient.Synapse.submit()
. An optional argumentdocker_tag="latest"
has also been added tosynapseclient.Synapse.submit()
” to designate which tagged Docker image to submit.
A full list of issues addressed in this release are below.
Bugs Fixes¶
[SYNPY-271] - cache.remove fails to return the file handles we removed
[SYNPY-1032] - Support new columnTypes defined in backend
Tasks¶
[SYNPY-999] - Remove unsafe copy functions from client
[SYNPY-1027] - Copy function should copy things when users are part of a Team that has DOWNLOAD access
Improvements¶
[SYNPY-389] - submission of Docker repository
[SYNPY-537] - synapseutils.copyFileHandles requires fields that does not require at rest
[SYNPY-680] - synapseutils.changeFileMetaData() needs description in documentation
[SYNPY-682] - improve download speeds to be comparable to AWS
[SYNPY-807] - Drop support for Python 2
[SYNPY-907] - Replace `from <module> import …` with `import <module>`
[SYNPY-962] - remove ‘password’ as an option in default synapse config file
[SYNPY-972] - Link on Synapse Python Client Documentation points back at itself
1.9.4 (2019-06-28)¶
Bug Fixes¶
[SYNPY-881] - Synu.copy fails when copying a file with READ permissions
[SYNPY-888] - Docker repositories cannot be copied
[SYNPY-927] - trying to create a project with name that already exists hangs
[SYNPY-1005] - cli docs missing sub-commands
[SYNPY-1018] - Synu.copy shouldn’t copy any files with access restrictions
Improvements¶
[SYNPY-608] - Add how to contribute md to github project
[SYNPY-735] - command line for building a table
[SYNPY-864] - docstring for the command line client doesn’t have complete list of sub-commands available
[SYNPY-926] - allow forceVersion false for command line client
[SYNPY-1013] - Documentation of “store” command for Synapse command line client
[SYNPY-1021] - change email contact for code of conduct
1.9.3 (2019-06-28)¶
1.9.2 (2019-02-15)¶
In version 1.9.2, we improved Views’ usability by exposing set_entity_types() function to change the entity types that will show up in a View:
import synapseclient
from synapseclient.table import EntityViewType
syn = synapseclient.login()
view = syn.get("syn12345")
view.set_entity_types([EntityViewType.FILE, EntityViewType.FOLDER])
view = syn.store(view)
Bug Fixes¶
Tasks¶
1.9.1 (2019-01-20)¶
In version 1.9.1, we fix various bugs and added two new features:
Python 3.7 is supported.
Deprecation warnings are visible by default.
Features¶
Bug Fixes¶
[SYNPY-454] - Some integration tests do not clean up after themselves
[SYNPY-456] - Problems with updated query system
[SYNPY-515] - sphinx documentation not showing for some new classes
[SYNPY-526] - deprecate downloadTableFile()
[SYNPY-578] - switch away from POST /entity/#/table/deleterows
[SYNPY-594] - Getting error from dev branch in integration test against staging
[SYNPY-796] - fix or remove PyPI downloads badge in readme
[SYNPY-799] - Unstable test: Test PartialRow updates to entity views from rowset queries
[SYNPY-846] - error if password stored in config file contains a ‘%’
Tasks¶
[SYNPY-491] - Figure out custom release note fitlers
[SYNPY-840] - Install not working on latest python
[SYNPY-847] - uploadFileHandle should not be deprecated nor removed
[SYNPY-852] - Check and update docs.synapse.org to reflect the change in the Python client
[SYNPY-860] - vignette for how to upload a new version of a file directly to a synapse entity
[SYNPY-863] - Update public documentation to move away from the query services
[SYNPY-866] - Update Synapse logo in Python docs :)
[SYNPY-873] - consolidate integration testing to platform dev account
Improvements¶
[SYNPY-473] - Change syn.list to no longer use deprecated function chunkedQuery
[SYNPY-573] - synapse list command line shouldn’t list the parent container
[SYNPY-581] - <entity>.annotations return object is inconsistent with getAnnotations()
[SYNPY-612] - Rename view_type to viewType in EntityViewSchema for consistency
[SYNPY-777] - Python client _list still uses chunckedQuery and result seem out of date
[SYNPY-804] - Update styling in the python docs to more closely match the Docs site styling
[SYNPY-815] - Update the build to use test user instead of migrationAdmin
[SYNPY-848] - remove outdated link to confluence for command line query
[SYNPY-856] - build_table example in the docs does not look right
[SYNPY-858] - Write file view documentation in python client that is similar to synapser
[SYNPY-870] - Submitting to an evaluation queue can’t accept team as int
1.9.0 (2018-09-28)¶
In version 1.9.0, we deprecated and removed query() and chunkedQuery(). These functions used the old query services which does not perform well. To query for entities filter by annotations, please use EntityViewSchema.
We also deprecated the following functions and will remove them in Synapse Python client version 2.0. In the Activity object:
usedEntity()
usedURL()
In the Synapse object:
getEntity()
loadEntity()
createEntity()
updateEntity()
deleteEntity()
downloadEntity()
uploadFile()
uploadFileHandle()
uploadSynapseManagedFileHandle()
downloadTableFile()
Please see our documentation for more details on how to migrate your code away from these functions.
Bug Fixes¶
SYNPY-195 - Dangerous exception handling
SYNPY-261 - error downloading data from synapse (python client)
SYNPY-694 - Uninformative error in copyWiki function
SYNPY-805 - Uninformative error when getting View that does not exist
SYNPY-819 - command-line clients need to be updated to replace the EntityView ‘viewType’ with ‘viewTypeMask’
Tasks¶
Improvements¶
1.8.2 (2018-08-17)¶
In this release, we have been performed some house-keeping on the code base. The two major changes are:
making syn.move() available to move an entity to a new parent in Synapse. For example:
import synapseclient from synapseclient import Folder syn = synapseclient.login() file = syn.get("syn123") folder = Folder("new folder", parent="syn456") folder = syn.store(folder) # moving file to the newly created folder syn.move(file, folder)exposing the ability to use the Synapse Python client with single threaded. This feature is useful when running Python script in an environment that does not support multi-threading. However, this will negatively impact upload speed. To use single threaded:
import synapseclient synapseclient.config.single_threaded = True
Bug Fixes¶
SYNPY-535 - Synapse Table update: Connection Reset
SYNPY-603 - Python client and synapser cannot handle table column type LINK
SYNPY-688 - Recursive get (sync) broken for empty folders.
SYNPY-744 - KeyError when trying to download using Synapse Client 1.8.1
SYNPY-750 - Error in downloadTableColumns for file view
SYNPY-758 - docs in Sphinx don’t show for synapseclient.table.RowSet
SYNPY-760 - Keyring related error on Linux
SYNPY-766 - as_table_columns() returns a list of columns out of order for python 3.5 and 2.7
SYNPY-776 - Cannot log in to Synapse - error(54, ‘Connection reset by peer’)
SYNPY-795 - Not recognizable column in query result
Features¶
Tasks¶
1.8.1 (2018-05-17)¶
This release is a hotfix for a bug. Please refer to 1.8.0 release notes for information about additional changes.
1.8.0 (2018-05-07)¶
This release has 2 major changes:
The client will no longer store your saved credentials in your synapse cache (~/synapseCache/.session). The python client now relies on keyring to handle credential storage of your Synapse credentials.
The client also now uses connection pooling, which means that all method calls that connect to Synapse should now be faster.
The remaining changes are bug fixes and cleanup of test code.
Below are the full list of issues addressed by this release:
Bug Fixes¶
Tasks¶
1.7.5 (2018-01-31)¶
v1.7.4 release was broken for new users that installed from pip. v1.7.5 has the same changes as v1.7.4 but fixes the pip installation.
1.7.4 (2018-01-29)¶
- This release mostly includes bugfixes and improvements for various Table classes:
Fixed bug where you couldn’t store a table converted to a pandas.Dataframe if it had a INTEGER column with some missing values.
EntityViewSchema can now automatically add all annotations within your defined scopes as columns. Just set the view’s addAnnotationColumns=True before calling syn.store(). This attribute defaults to True for all newly created EntityViewSchemas. Setting addAnnotationColumns=True on existing tables will only add annotation columns that are not already a part of your schema.
You can now use synapseutils.notifyMe as a decorator to notify you by email when your function has completed. You will also be notified of any Errors if they are thrown while your function runs.
- We also added some new features:
syn.findEntityId() function that allows you to find an Entity by its name and parentId, set parentId to None to search for Projects by name.
The bulk upload functionality of synapseutils.syncToSynapse is available from the command line using: synapse sync.
Below are the full list of issues addressed by this release:
Improvements¶
SYNPY-267 - Update Synapse tables for integer types
SYNPY-304 - Table objects should implement len()
SYNPY-416 - warning message for recursive get when a non-Project of Folder entity is passed
SYNPY-482 - Create a sample synapseConfig if none is present
SYNPY-489 - Add a boolean parameter in EntityViewSchema that will indicate whether the client should create columns based on annotations in the specified scopes
SYNPY-494 - Link should be able to take an entity object as the parameter and derive its id
SYNPY-511 - improve exception handling
SYNPY-512 - Remove the use of PaginatedResult’s totalNumberOfResult
SYNPY-539 - When creating table Schemas, enforce a limit on the number of columns that can be created.
Bug Fixes¶
SYNPY-235 - can’t print Row objects with dates in them
SYNPY-272 - bug syn.storing rowsets containing Python datetime objects
SYNPY-297 - as_table_columns shouldn’t give fractional max size
SYNPY-404 - when we get a SynapseMd5MismatchError we should delete the downloaded file
SYNPY-425 - onweb doesn’t work for tables
SYNPY-438 - Need to change ‘submit’ not to use evaluation/id/accessRequirementUnfulfilled
SYNPY-496 - monitor.NotifyMe can not be used as an annotation decorator
SYNPY-521 - inconsistent error message when username/password is wrong on login
SYNPY-536 - pre-signed upload URL expired warnings using Python client sync function
SYNPY-555 - EntityViewSchema is missing from sphinx documentation
SYNPY-558 - synapseutils.sync.syncFromSynapse throws error when syncing a Table object
SYNPY-595 - Get recursive folders filled with Links fails
SYNPY-605 - Update documentation for getUserProfile to include information about refreshing and memoization
1.7.3 (2017-12-08)¶
Release 1.7.3 introduces fixes and quality of life changes to Tables and synapseutils:
Changes to Tables:
You no longer have to include the etag column in your SQL query when using a tableQuery() to update File/Project Views. just SELECT the relevant columns and etags will be resolved automatically.
The new PartialRowSet class allows you to only have to upload changes to individual cells of a table instead of every row that had a value changed. It is recommended to use the PartialRowSet.from_mapping() classmethod instead of the PartialRowSet constructor.
Changes to synapseutils:
Improved documentation
You can now use ~ to refer to your home directory in your manifest.tsv
We also added improved debug logging and use Python’s builtin logging module instead of printing directly to sys.stderr
Below are the full list of issues addressed by this release:
Bug Fixes¶
SYNPY-419 - support object store from client
SYNPY-499 - metadata manifest file name spelled wrong
SYNPY-504 - downloadTableFile changed return type with no change in documentation or mention in release notes
SYNPY-508 - syncToSynapse does not work if “the file path in “used” or “executed” of the manifest.tsv uses home directory shortcut “~”
SYNPY-516 - synapse sync file does not work if file is a URL
SYNPY-525 - Download CSV file of Synapse Table - 416 error
SYNPY-572 - Users should only be prompted for updates if the first or second part of the version number is changed.
Features¶
1.7.1 (2017-11-17)¶
Release 1.7 is a large bugfix release with several new features. The main ones include:
We have expanded the synapseutils packages to add the ability to:
Bulk upload files to synapse (synapseutils.syncToSynapse).
Notify you via email on the progress of a function (useful for jobs like large file uploads that may take a long time to complete).
The syncFromSynapse function now creates a “manifest” which contains the metadata of downloaded files. (These can also be used to update metadata with the bulk upload function.
File View tables can now be created from the python client using EntityViewSchema. See fileviews documentation.
The python client is now able to upload to user owned S3 Buckets. Click here for instructions on linking your S3 bucket to synapse.
We’ve also made various improvements to existing features:
The LARGETEXT type is now supported in Tables allowing for strings up to 2Mb.
The –description argument when creating/updating entities from the command line client will now create a Wiki for that entity. You can also use –descriptionFile to write the contents of a markdown file as the entity’s Wiki
Two member variables of the File object, file_entity.cacheDir and file_entity.files is being DEPRECATED in favor of file_entity.path for finding the location of a downloaded File
pandas dataframe`s containing `datetime values can now be properly converted into csv and uploaded to Synapse.
We also added a optional convert_to_datetime parameter to CsvFileTable.asDataFrame() that will automatically convert Synapse DATE columns into datetime objects instead of leaving them as long unix timestamps
Below are the full list of bugs and issues addressed by this release:
Features¶
SYNPY-53 - support syn.get of external FTP links in py client
SYNPY-179 - Upload to user owned S3 bucket
SYNPY-412 - allow query-based download based on view tables from command line client
SYNPY-487 - Add remote monitoring of long running processes
SYNPY-415 - Add Docker and TableViews into Entity.py
SYNPY-89 - Python client: Bulk upload client/command
SYNPY-413 - Update table views via python client
SYNPY-301 - change actual file name from python client
SYNPY-442 - set config file path on command line
Improvements¶
SYNPY-407 - support LARGETEXT in tables
SYNPY-360 - Duplicate file handles are removed from BulkFileDownloadRequest
SYNPY-187 - Move –description in command line client to create wikis
SYNPY-224 - When uploading to a managed external file handle (e.g. SFTP), fill in storageLocationId
SYNPY-315 - Default behavior for files in cache dir should be replace
SYNPY-381 - Remove references to “files” and “cacheDir”.
SYNPY-396 - Create filehandle copies in synapseutils.copy instead of downloading
SYNPY-403 - Use single endpoint for all downloads
SYNPY-435 - Convenience function for new service to get entity’s children
SYNPY-471 - docs aren’t generated for synapseutils
SYNPY-472 - References to wrong doc site
SYNPY-347 - Missing dtypes in table.DTYPE_2_TABLETYPE
SYNPY-463 - When copying filehandles we should add the files to the cache if we already donwloaded them
SYNPY-475 - Store Tables timeout error
Bug Fixes¶
SYNPY-190 - syn.login(‘asdfasdfasdf’) should fail
SYNPY-344 - weird cache directories
SYNPY-346 - ValueError: cannot insert ROW_ID, already exists in CsvTableFile constructor
SYNPY-351 - Versioning broken for sftp files
SYNPY-366 - file URLs leads to wrong path
SYNPY-393 - New cacheDir causes cache to be ignored(?)
SYNPY-409 - Python client cannot depend on parsing Amazon pre-signed URLs
SYNPY-418 - Integration test failure against 167
SYNPY-421 - syn.getWikiHeaders has a return limit of 50 (Need to return all headers)
SYNPY-423 - upload rate is off or incorrect
SYNPY-424 - File entities don’t handle local_state correctly for setting datafilehandleid
SYNPY-426 - multiple tests failing because of filenameOveride
SYNPY-427 - test dependent on config file
SYNPY-428 - sync function error
SYNPY-431 - download ending early and not restarting from previous spot
SYNPY-443 - tests/integration/integration_test_Entity.py:test_get_with_downloadLocation_and_ifcollision AssertionError
SYNPY-461 - On Windows, command line client login credential prompt fails (python 2.7)
SYNPY-465 - Update tests that set permissions to also include ‘DOWNLOAD’ permission and tests that test functions using queries
SYNPY-468 - Command line client incompatible with cache changes
SYNPY-470 - default should be read, download for setPermissions
SYNPY-483 - integration test fails for most users
SYNPY-484 - URL expires after retries
SYNPY-486 - Error in integration tests
SYNPY-488 - sync tests for command line client puts file in working directory
SYNPY-142 - PY: Error in login with rememberMe=True
SYNPY-464 - synapse get syn4988808 KeyError: u’preSignedURL’
1.6.1 (2016-11-02)¶
What is New¶
In version 1.6 we introduce a new sub-module _synapseutils_ that provide convenience functions for more complicated operations in Synapse such as copying of files wikis and folders. In addition we have introduced several improvements in downloading content from Synapse. As with uploads we are now able to recover from an interrupted download and will retry on network failures.
Improvements¶
We have improved download robustness and error checking, along with extensive recovery on failed operations. This includes the ability for the client to pause operation when Synapse is updated.
SYNPY-270 - Synapse READ ONLY mode should cause pause in execution
SYNPY-308 - Add md5 checking after downloading a new file handle
SYNPY-309 - Add download recovery by using the ‘Range’: ‘bytes=xxx-xxx’ header
SYNPY-353 - Speed up downloads of fast connections
SYNPY-356 - Add support for version flag in synapse cat command line
SYNPY-357 - Remove failure message on retry in multipart_upload
SYNPY-380 - Add speed meter to downloads/uploads
SYNPY-387 - Do exponential backoff on 429 status and print explanatory error message from server
SYNPY-390 - Move recursive download to Python client utils
Bug Fixes¶
SYNPY-154 - 500 Server Error when storing new version of file from command line
SYNPY-168 - Failure on login gives an ugly error message
SYNPY-253 - Error messages on upload retry inconsistent with behavior
SYNPY-261 - error downloading data from synapse (python client)
SYNPY-274 - Trying to use the client without logging in needs to give a reasonable error
SYNPY-331 - test_command_get_recursive_and_query occasionally fails
SYNPY-337 - Download error on 10 Gb file.
SYNPY-343 - Login failure
SYNPY-351 - Versioning broken for sftp files
SYNPY-352 - file upload max retries exceeded messages
SYNPY-358 - upload failure from python client (threading)
SYNPY-361 - file download fails midway without warning/error
SYNPY-362 - setAnnotations bug when given synapse ID
SYNPY-363 - problems using provenance during upload
SYNPY-382 - Python client is truncating the entity id in download csv from table
SYNPY-383 - Travis failing with paramiko.ssh_exception.SSHException: No hostkey
SYNPY-384 - resuming a download after a ChunkedEncodingError created new file with correct size
SYNPY-388 - Asynchronous creation of Team causes sporadic test failure
SYNPY-391 - downloadTableColumns() function doesn’t work when resultsAs=rowset is set for for syn.tableQuery()
SYNPY-397 - Error in syncFromSynapse() integration test on Windows
SYNPY-399 - python client not compatible with newly released Pandas 0.19


12 ounces spaghetti 4 tablespoons olive oil 1 cup (140 grams) chopped onion... 2 medium zucchini, chopped (1/2 pound) 2 medium yellow squash, chopped (1/2 pound) 3 garlic cloves, minced (1 tablespoon) 1/2 teaspoon dried oregano 1/4 teaspoon red pepper flakes 2 tablespoons tomato paste 1 (28-ounce) can whole peeled tomatoes One (12-ounce) jar roasted red peppers, drained and cut into 1/2-inch pieces (1 heaping cup) 2 to 3 teaspoons mushroom powder 5 cups (1/2 pound) spinach leaves Handful fresh basil leaves Salt and fresh ground black pepper Parmesan cheese or nutritional yeast for serving
$ 21.5


Rails 4.0 development has started a while back. It was merged into Rails’ master branch on Github in 2011. As the writing of this blog entry, the stable version of Rails is 3.2.8. Release candidate is at 3.2.9.rc1. Because 4.0 is not yet official available, you have to jump through hoops to get a Rails 4 application up and running.
Install Rails 4.0 gem
Create this Gemfile:
1 2 3 4 5 6 |
|
- This Gemfile specifies the master branch of Rails, which contains 4.0 beta.
- Gem activerecord-deprecated_finders is a dependency.
- Gem journey, the Rails router, is also required.
In the same directory of the Gemfile, issue bundle install
. This should install Rails 4.0.0.beta.
But running gem list rails
won’t show 4.0 being installed. So do this instead:
1 2 |
|
The Rails executable is at:
1
|
|
1
|
|
Now you can use this version of rails to generate an app named foo.
Create Rails 4.0 app
1
|
|
This command creates a typical rails app called foo and output an error about not being able to find Rails 4 gem, which should not be a surprise.
You will edit foo/Gemfile to make bundle install
work.
Add the two gems Rails depends on:
1 2 |
|
Change the source definition for the following gems:
1 2 3 |
|
To
1 2 3 |
|
Now you should be bundle install
, sit back and enjoy your new Rails 4.0 app.


*Monthly payment is $16.67 for every $1,000 you finance. Example down payment is 18.4%. Some customers will not qualify. Not available with some other offers. Take delivery by 11/30/15. See dealer for details.
**Select models receive a Customer Cash amount from $300-$2,200, in the continental United States excluding HI. Visit www.suzukicycles.com/offers to find your specific customer cash. Offer effective from participating authorized Suzuki dealer between 9/1/15 and 11/30/15.
At Suzuki, we want every ride to be safe and enjoyable. So always wear a helmet, eye protection and protective clothing. Never ride under the influence of alcohol or other drugs. Avoid excessive speeds. Never engage in stunt riding. Study your owner's manual and always inspect your Suzuki before riding. Take a riding skills course. For the course nearest you call the Motorcycle Safety Foundation at 1-800-446-9227.


{{item.fullnameTitle}}
Type {{type}} Type required.
Destination place Destination is required.
Select Dates Start date is required. End date is required. Invalid start date. Invalid end date.


Back
Product Management Links
A Product Manager’s Job
Becoming a Product Manager
User Research
Personas
Product Strategy
Roadmapping
Agile Methodologies
Product Launch
Data and Analytics
Design Sprint
Prototyping
Usability Tests
Working with Engineers
Team Organization
Leadership
Becoming Great
Team Organization
Understand how a typical product team is structured, how it operates and how it works with other teams.
Articles
Enter the Matrix - Organizing Product Management
Mark Tattersall
Product Organizational Structure
Marty Cagan
Good Product Team, Bad Product Team
Marty Cagan
The best Product Management model
Marty Cagan
How We Structure Our Teams At Basecamp
Jason Fried
The Most Important Thing Dropbox Did to Scale Product Management
Sean Lynch
The Power of the Elastic Product Team — Airbnb’s First PM on How to Build Your Own
Jonathan Golden
Lessons Learned From Scaling a Product Team
Paul Adams


Anything that uses wildcards...anything that uses a whole directory...test it out with a malicious ln
ln -s /root/ /var/dir/being_backed_up
ln /home/user/.ssh/authorized_keys /var/file_I_have_sudoedit_access_to
links are a awesome!
Just remember the differences between symbolic and normal links
A hard link then just creates another file with a link to the same underlying inode. When you delete a file it removes one link to the underlying inode. The inode is only deleted (or deletable/over-writable) when all links to the inode have been deleted.
A symbolic link is a link to another name in the file system.
For linking directories, you have to use a -s symbolic or soft link


AXIOM STYLING
Forms
Text input
Enter your name
.dark input
Enter your name
input.stretch
Enter your name
Enter your mother's maiden name
input.short
Enter your age
Enter your date of birth
Input with icon
input.short
Text Area
Enter a description
.dark textarea
Enter a description
Selects
Please select a security question...
What was the model of your first car?
What was the name of your first childhood pet?
What is your mother's maiden name?
What is the name of the high school you attended?
.dark select
Please select a security question...
What was the model of your first car?
What was the name of your first childhood pet?
What is your mother's maiden name?
What is the name of the high school you attended?
Horizontal form
Enter your name
Enter your age
Column sizing
2 column
.col-sm-6
.col-sm-6
3 column
.col-sm-4
.col-sm-4
.col-sm-4
4 column
.col-sm-3
.col-sm-3
.col-sm-3
.col-sm-3
Checkboxes
I agree
.dark.checkbox
I agree
Radios
Option one is this and that
Option two is this and that
Option three is this and that
.dark .radio
Option one is this and that
Option two is this and that
Option three is this and that
Buttons
Buttons
.btn.btn-primary
.btn.btn-loud
.btn.btn-default
.btn.btn-danger
Icon buttons
Inbox
More
Add
Back
Button groups
Home
Profile
Messages
Input with button
dropdown
More
Action
Another action
split button
Resend
Action
Another action
File Input
Select file
Change
Remove
Tabs
Home
Profile
Messages
.dark .tabs
Home
Profile
Messages
Toggle
No
Yes
.dark .rounded-toggle
No
Yes
Animations
Popup
IO
number
Insertion Order
Porta pellentesque
pulvinar
pellentesque port, phasellus? Risus egestas et porta, nisi.
Learn more
Horizontal sliding
Home
Profile
Messages
Home!
Profile!
Messages!
Vertical sliding
Home
Profile
Messages
Home!
Profile!
Messages!
Off canvas
.offcanvas-top
Show
.offcanvas-bottom
Show
.offcanvas-left
Show
.offcanvas-right
Show


CAREER OBJECTIVE
To work hard with full dedication and actively participate with the team for the achievement of organizational objective that can consistently develop my skills and allow me to grow personally and professionally along with the organization and to serve the organization with the best of my knowledge.
| Course | University | Institute | Year of pass | Percentage |
|---|---|---|---|---|
| B.E (Computer Science) | Deemed to be institute | Sri Siddartha insitute of technlogy,Tumakuru | 2021 | 8.05 |
| 12th | Karnataka State Board | Sarvodaya Pu college, Tumakuru | 2017 | 85.63 |
| 10th | Karnataka State Board | Vidya Education Society, Tumakuru | 2015 | 92.80 |


MicroDocs Server
MicroDocs core concept is the use of one central place to store the definitions of all projects. The MicroDocs server can keep track of different version of projects and organise projects in groups. With everything in one place, it is easy to keep the overview and enables you to do al lot of fancy stuff with your RestAPI definitions.
API Explorer
The MicroDocs server comes with a user friendly web interface to explore the definitions of all RestAPI endpoints. The interface also shows an overview of all the projects and their dependencies with other projects.
Setup with Docker
Docker is a virualisation tool, which makes it easy to run applications. To get started with Docker see this link.
If you have Docker up and running, you can start the MicroDocs server with the following command:
$ docker run --name microdocs -p 3000:3000 -d maxxton/microdocs
- The
--name microdocs
argument defines the name of the container. -p 3000:3000
sets the port mapping from 3000 on your host to 3000 inside the container.- You can also adds mapping of the storage folder inside the MicroDocs server by adding the
-v /my/data:/microdocs/microdocs-server/data
argument where/my/data
is the folder on your host to store the data and/microdocs/microdocs-server/data
is the folder inside the container where the data is located.
Configuration
You can alter the default configurations of the MicroDocs server, but you most likely don’t wanna do this. Everything is configured correctly to run in Docker.
But in case you do like to change it, the configuration file can be found in: /microdocs/microdocs-server/config.yml
.
In here you can changes thinks like server port, data folder or where to find the static html for the frontend.
Security
The MicroDocs server doesn’t have build in support for authentication and SSL (https). The best way to accomplisch this is to use a proxy in front of the MicroDocs server.
For example you run the MicroDocs server on port 3001 and blocks the port from outside in your firewall. Next you use a proxy server like Apache or Ngnix. Next you can forward port 3000 from the outside to 3001 of the MicroDocs server. Then you can configure the proxy to use authentication and SSL.
Problem detection
The MicroDocs definition has support for defining Rest clients. So service A has a client for communicating with service B. With these definitions MicroDocs can detect if there are breaking changes between a client and the actual endpoint. It checks for:
- Missing projects
- Missing endpoints
- Missing required parameters
- Incompatible request body
- Incompatible response body
Environments
In projects where you have different environments like development, staging and production, it is most likely that each environment is running different versions. To make things clear, you can publish project definitions to each environment. So you keep track of what is running where. And this makes it easier and more clear to detect problems per environment.


A free spirit. Anemos was Zelos's invarnation of her own spirint into physical form.
Hover
Anemos has the ability to hover. While hovering, she can can't any aerial attack or special attack. This is done by holding down the jump button and holding down on the main control stick.
Mini Vortex
Anemos creates a swirling vortex a short distance from her body. This can be angled up or down by pressing upwards or downwards on the control stick after activating the move. This move's hitbox pulls enemies towards Anemos.
Devestating Spiral
Anemos aims a vicious spiral downwards. Dealing a large amount of consecutive hits. This move has an internal cooldown so it cannot be spammed relentlessly
Concussion Blast
Anemos pull inward before releasing a powerup wave outwards. Can only be cast from the air and the hitbox only activates if you remain in the air.
Loop-De-Loop
Anemos does a quick loop followed by a swift rise, Anemos can act once the rise finishes, the loop itself has a hitbox on Anemos's head.
 While not doing much knockback, this move can be used to tack on a lot of damage and if timed right, deliver a killing blow just as it ends.
Anemos has a strong aresenal of aerial attacks and aerial specials. Her best use is by using her hover mechanic which allows her to cast aerial attacks very close to the ground. More specifically, by pressuring opponents with low aerials and proper use of her side and down special, you can usually force an opponent out of shield or to move backwards. This gives Anemos very good stage pressure. While Anemos does lack a grab, try to read opponents shield patterns, this way if you catch them shielding you can punish with a well placed Devestating Spiral to crack their shield. Anemos is also deadly when edge-guarding.


TL;DR The bill check no longer says that bills are missing when they're not.
A Chellow user (we'll call them Jem) said to me, 'When I run the bill check it says that some bills are missing when they aren't'.
Some background: when a bill check is run, you get back a report of the
differences between the actual bill (received from the supplier) and the
virtual bill (created by Chellow). You also get a list of missing bill
elements, for example, say the virtual bill has the element duos-fixed-gbp
,
but the actual bill doesn't, then the report will say that the duos-fixed-gbp
bill is missing.
So Jem was checking a single TRIAD bill that spanned an entire year. (It would have been so much easier if the supplier had just made it span March, but then we have to deal with whatever's thrown at us.) So Jem's bill only had TRIAD charges in, but all the other bills for that supply were present and correct, so the bill check should have given a clean bill of health, but in fact it was saying that some bills were missing. This kind of false positive was really annoying for Jem because it meant that they had to check for something that wasn't actually a problem.
To solve the problem we've had to make Chellow generate bills at the half-hourly level. That is to say, each half-hour has it's own virtual bill. That way we can accurately say if there are any missing bills. It was quite a big undertaking, but well worth it.


Silver Eye: Detector of elusive
𝌆
Hide Bounding Boxes
Legal ! You can use Advanced Setting
Stop ! You violate the laws!
Hide Bounding Boxes
Time:
Estimated Fps:
Input Size:
128 x 128
160 x 160
224 x 224
320 x 320
416 x 416
512 x 512
608 x 608
Input Size
Score Threshold:
-
+


I installed Arch Linux before but using archinstall script. archinstall
is a helper library which automates the installation. It is packaged with different pre-configured installers that work like a "guided" installer. Linux enthusiasts will oppose to this way of installing since Arch Linux is meant to be DIY.
Then I attempted to do the encrypted version using the same archinstall
. I am not happy with the result due to the following reasons.
It has very limited swap space size. archinstall
is creating 4GB swap by default and cannot find a way around it.
It doesn't wake up from hibernation. The only way to recover is through hard restart.
On this post, I will put the step by step guide I followed for an encrypted Arch Linux setup. I had three attempts before I get a working one. Common issue I have is along bootloader and missing resume hook to wake up from deep sleep. I learned my lessons the hard way!
This setup will create an LVM on LUKS with GRUB boot loader.
Read More →I attended recently a golang
programming training. Our instructor is a respected Golang developer himself William Kennedy who has trained thousands of developers worldwide in Go.
The class I attended teaches how to build production-level services in Go leveraging the power of Kubernetes. From the beginning, you will pair program with the Bill Kennedy walking through the design philosophies and guidelines for building services in Go. With each new feature that is added to the service, you will learn how to deploy to and manage the Kubernetes environment used to run the service.
I will outline here my install experience for the starter service. I installed it on my Mac during our training but this time, this is my Linux experience.
Read More →Docker is an open source project which allows us to deploy applications inside containers. A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and realiably from one computing environment to another. A docker container image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system librarries and settings.
It's been a while since I installed Docker desktop but hopefully it's a similar apt
or yum
install experience on yet another flavour of Linux.
We have microservices developed using Ruby on Rails. I have to install several of these microservices to run another Golang microservice. Being a ruby noob, I find it challenging to install since I think the README assumes every developer is seasoned Ruby programmer.
The other challenge I have is that Kali Linux has out-of-the-box ruby which version is lower than what its Gemfile requires. I have to uninstall the existing ruby and install rbenv. But the hurdle doesn't stop there.
Read More →I recently published Tomcat Manager Application to my existing tomcats. In a nutshell, the Tomcat Manager App is a web application packaged with the Tomcat server to provide basic functionality to manage our deployed web applications. I intentionally dropped them on the first instance I installed Tomcats since I lack the time to configure them.
Tomcat Manager App is a part of the existing Tomcat package so I just have to untar it and copy the manager folder to the existing Tomcat webapps folder.
In an instance, here's how you can test if there are memory leaks
$ curl -ku tomcatman:s3cret https://yourdomain.com/manager/text/findleaks?statusLine=true
OK - No memory leaks found
Read More →
As part of our training, we were given access to some courses on codebashing and Java being my primary course. We were generously given access to other courses which I will pursue during my spare time. I'm looking forward to complete other Java-related courses too and time-permitting, I'll try Golang and Ruby on Rails courses. That's a very optimistic wish but if access to this resources will remain, might as well consider it as opportunity.
Read More →My employer is issuing new laptops during pandemic (I'm not sure if this is part of the Work From Home (WFH) whenever possible initiative). Nevertheless, it's a good thing since we are getting MacBook instead of Windows machine. Don't get me wrong, Dell machines are reliable in general. The only thing missing on Windows is the opensource toolchain. And to be specific, I'm missing a good console that's pleasing to my eye while reading texts. With my git bash
, I have to type clear every time since texts overlap each other (a common experience after tailing a log file). Another specific I'm missing is the package manager though I survived with choco.
To my surprise, I received a brand spanking new MacBook Pro 2019. It has Intel Core i9 and AMD Radeon Pro with 4GB of GDDR6 memory, hardware specs that I'm really proud of!
What I'm about to write is my out-of-the-box experience and the commands I used to set it up.
Read More →We are planning to use AWS for our Java applications which is a step forward from the dedicated hosting that we currently have. Being on a corporate world, security is pretty tight and common ports are locked down including SSH port. This is a challenge since I have to SCP to deploy my jar and war files.
Luckily AWS allows to tunnel SSH through their session manager. I followed this guide to setup my connection. There are prerequisites to comply with and you need to have the correct role provisioned to your AWS login.
Read More →From letsencrypt.org:
To enable HTTPS on your website, you need to get a certificate from a Certificate Authority (CA). Let's Encrypt is a CA. In order to get a certificate for your website's domain from Let's Encrypt, you have to demonstrate control over the domain. With Let's Encrypt, you do this using software that uses the ACME protocol, which typically runs on your web host.
You will need SSH access to your web host to install a certbot
client. certbot
will automate certificate issuance and installation with no downtime.
On my machine, it added more Python dependencies.
$ sudo yum install certbot python2-certbot-apache
Read More →
If you're running the latest Ubuntu 18.04, then you don't need to add the PPA repository. If on lower version of Ubuntu, please add this PPA.
$ sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
$ sudo apt-get update
network-manager-l2tp-gnome
is required if running gnome
$ sudo apt-get install network-manager-l2tp
$ sudo apt-get install network-manager-l2tp-gnome
Read More →
This is from Spring Guides and it's their "hello websocket" application. This sends messages back and forth between a browser and the server using WebSocket.
$ spring init --dependencies=websocket --build=gradle --groupId=com.prototype websocket
Using service at https://start.spring.io
Project extracted to '~/idea/websocket'
Then I download all dependencies using gradle build
$ cd ~/idea/websocket
$ ./gradlew clean build
Download https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-websocket/2.1.0.RELEASE/spring-boot-starter-websocket-2.1.0.RELEASE.pom
Download https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starters/2.1.0.RELEASE/spring-boot-starters-2.1.0.RELEASE.pom
Download https://repo.maven.apache.org/maven2/org/springframework/spring-websocket/5.1.2.RELEASE/spring-websocket-5.1.2.RELEASE.pom
Download https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-web/2.1.0.RELEASE/spring-boot-starter-web-2.1.0.RELEASE.pom
.....
> Task :test
2018-11-03 11:56:46.459 INFO 12650 --- [ Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
BUILD SUCCESSFUL in 26s
6 actionable tasks: 5 executed, 1 up-to-date
Read More →
This assumes that Apache httpd is already running on the target Linux machine.
Install mod_sll
and openssl
. mod_ssl provides cryptography for Apache web server using SSL and TLS protocols while openssl is a toolkit that includes certificate management tool and share libraries which gives us various cryptogrpahic algorithms.
We have a legacy IVR (Interactive Voice Response) software running an Asterisk PBX Server. It executes AGI (Asterisk Gateway Interface) compliant protocol to launch external programs written in Python to control telephony channel, play audio, read DTMF (Dual Tone Multi Frequency) digits, etc. We ran into an issue when the payment gateway stopped supporting lower versions of TLS (Transport Layer Security). It requires TLSv1.2 as minimum version.
$ curl -Ivvv https://secure.payment.com
* About to connect() to secure.payment.com port 443
* Trying 185.n.n.n... connected
* Connected to secure.payment.com (185.n.n.n) port 443
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSLv2, Client hello (1):
Unknown SSL protocol error in connection to secure.payment.com:443
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to secure.payment.com:443
Read More →
We are migrating to MySQL Enterprise from community version. Currently I'm upgrading from 5.7.22 to 8.0.11. It's my bad not reading the upgrade strategy from Oracle themselves so I ended up with some issues.
What I did was uninstall the community version using yum remove
and install the following RPMs. I got them from Oracle website as trial.
We are moving from community to commercial. Sounds posh but if it doesn't, I always like the sound of going to fully supported not partially supported. Honestly, I don't know the extra benefits but here I am trying to install it on my local machine. If you want to try it, you can download the packages from Oracle Software Delivery Cloud. Please read the print since until now, I'm not sure how MySQL Enterprise is going to expire.
Read More →My company laptop comes like a present to me. It has 16GB of RAM and couple of SSDs on it. It's running Windows 10 Home Edition but I don't have issue with that since I'm going to use Linux. I'm originally CentOS but we will use Ubuntu going forward to make it a smooth Linux transition for non-seasoned Linux users.
The only issue I encountered with this laptop while installing Ubuntu is the graphics driver. The laptop has multiple graphics card (Intel and Nvidia) and the Nvidia driver is not supported on Ubuntu being proprietary.
Read More →jvisualvm
is a tool that provides a visual interface for viewing detailed information about Java technology-based applications while they are running. You can his to view data related to your local applications and those running on remote hosts. You can also capture data about JVM software instances and save the data to your local system.
There are couple of ways to use it, one is using jstatd
and the other is by JMX (Java management Extensions). I tried jstatd first but didn't work. The later worked on my CentOS machine using the visualvm I downloaded from visualvm.github.io.
Create a file called jstatd.all.policy
. If in production, make sure your server port are locked down to your local IP.
We were given the opportunity to replace an existing mobile app by a responsive website. Mobile apps are great but since we are paying a monthly subscription to third-party, we are better off building a responsive website supported in all platform. We have iOS and Android version of the app but having it build once then run on different platforms is an added benefit.
For this setup, we need springboot-cli
and ng-cli
. I won't detail how to have them installed but in my setup I used sdkman
for springboot-cli and npm
for ng-cli.
$ spring init --dependencies=web,h2,jpa,actuator,devtools mobile
Using service at https://start.spring.io
Project extracted to '/home/drmanalo/idea/mobile'
Read More →
On my new role, I have found out that we are publishing jars to a private repository. This is to speed up build by telling Maven to get from our private repository first before going out to public. To learn more about Nexus, I'm installing it on my personal laptop running CentOS 7.
$ wget http://download.sonatype.com/nexus/3/latest-unix.tar.gz
$ sudo tar xvf latest-unix.tar.gz -C /opt
$ sudo ln -s /opt/nexus-3.3.1-01/ /opt/nexus
Read More →
Before leaving my current role, I was tasked to migrate existing SVN repositories into git. It is exciting since I never did such thing in the past. Funny enough, I was challenged to install git-all
on one of our unregistered Red Hat box. I'm failing to run this command to make base repository accessible. I can raise a ticket to register the box but I'm worried waiting for resolution would take longer than doing the migration on a different machine.
rhn-channel --add --channel=rhel-x86_64-server-optional-6
Anyways, I have to install git-svn
to my personal laptop and do the migration.
$ sudo yum install git-svn
...
Running transaction
Installing : git-svn-<IP_ADDRESS>-6.el7_2.1.x86_64 1/1
Verifying : git-svn-<IP_ADDRESS>-6.el7_2.1.x86_64 1/1
Installed:
git-svn.x86_64 0:<IP_ADDRESS>-6.el7_2.1
Read More →
Just recently, I was tasked to support Apache Ofbiz (Open for Business) something not very exciting. The application is built on release 4 making Google search less efficient. The current release 16 is not that popular either let alone legacy versions. To have a better understanding of the framework, I'm going to follow this OFBiz Tutorial.
Just like any JVM application, you will need a JDK to run Ofbiz. It's build tool is ant
being Apache. Newer releases has maven
, ivy
and gradle
as build tool.
$ svn co http://svn.apache.org/repos/asf/ofbiz/branches/release15.12 ofbiz.15.12
...
U ofbiz.15.12
Checked out revision 1781334.
Read More →
Angular is one of many open source frameworks for developing web applications. I may have not seen all of them but this is the closest I think to Java and its metadata approach to programming. Another Javascript framework I wanted to use is nodejs but this is more than just a framework or library but a runtime environment if you like.
You will get this with any language you wanted to use, you need to set up its environment. node
and npm
is a must when writing Angular.
$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
Fetched 313 kB in 0s (484 kB/s)
## Run `apt-get install nodejs` (as root) to install Node.js v7.x and npm
$ sudo apt-get install nodejs
Fetched 10.9 MB in 2s (4,238 kB/s)
$ node -v
v7.3.0
$ npm -v
3.10.10
Read More →
This is how I implemented "Consuming a SOAP Web Service" from Spring Guides. For the RESTful world, SOAP is dead but it's pretty much alive and Spring is developing features for it. I'm not yet sure why the web service we are integrating to has extra requirements not available in REST but if you're wondering why companies are using SOAP, here is a good REST vs SOAP article.
To get started with SOAP, I have to add this to my existing Spring Boot POM.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-ws</artifactId>
</dependency>
The above Spring Boot starter will add the following dependencies.
Read More →Creating an exception in Java is a very slow operation. Expect that throwing an exception will cost you around 1-5 microseconds. Nearly all this time is spent on filling in the exception thread stack. The deeper the stack trace is, the more time it will take to populate it. If you take a peek on java.lang.Throwable
source, you will see the answer staring into your face.
public Throwable() {
fillInStackTrace();
}
public synchronized Throwable fillInStackTrace() {
if (stackTrace != null ||
backtrace != null /* Out of protocol state */ ) {
fillInStackTrace(0);
stackTrace = UNASSIGNED_STACK;
}
return this;
}
private native Throwable fillInStackTrace(int dummy);
Usually we throw an exception in case of unexpected problems. This means that we don’t use exceptions as part of the the repetitive if-then-else mess.
Read More →Before you are able to tweak your CentOS installation, you will need additional yum repositories.
# yum install epel-release
# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# yum update
Download and extract Super Flat Remix GNOME icons. After extracting, move folder Super Flat Remix
into your ~/.icons
folder.
Download and extract OSX Arc White theme. After extracting, move folder OSX-Arc-White
into your ~/.themes
folder.
I recently switched from ElementaryOS to CentOS. The install process went smoothly despite an initial issue while using a bootable SD card. I cannot detail the issue here but Google suggested using a DVD rather than SD card or any USB drive. Everything are working perfectly except I cannot go back to my Windows. It's embarassing to admit that we are using Windows for our open-source development but this is the reality. So when I'm away from work and testing things out, I'm rebooting to my CentOS and switch to Windows when I'm at work.
This is not grub2 specific issue by the way, grub2 should be able to add the loader but it has no knowledge of how to read ntfs partitions. The solution is install ntfs-3g
and rebuild grub2 after.
$ yum info ntfs-3g
Installed Packages
Name : ntfs-3g
Arch : x86_64
Epoch : 2
Version : 2016.2.22
Release : 1.el7
Size : 659 k
Repo : installed
From repo : epel
Summary : Linux NTFS userspace driver
Read More →
We are moving to enterprise Linux from Ubuntu to Red Hat, finally a dream come true for me being able to have some enterprise nix
experience. To prepare myself, I removed my ElementaryOS and installed CentOS. If I have enough cash I'll probably get one of those Linux Developer Suite.
As an exercise, I'm installing Java 1.8 and hopefully install more dockers
to my CentOS in the near future. A quick Google took me to techadmin's blog.
$ cd /opt/
$ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz"
$ tar xzf jdk-8u91-linux-x64.tar.gz
Read More →
This is a backup of my .bashrc
. I'm keeping it safe in case I'm rebuilding my machine.
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
# THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/kodi/.sdkman"
[[ -s "/home/kodi/.sdkman/bin/sdkman-init.sh" ]] && source "/home/kodi/.sdkman/bin/sdkman-init.sh"
# Strong red prompt
export PS1="\[$(tput setaf 1)\]\[$(tput bold)\][\u@\h \W]\\$ \[$(tput sgr0)\]"
Read More →
I have an existing Octopress blog which is probably near its useful days. Octopress which is Jekyll underneath the covers, is still one of the best static site generator. It has more community support and more written plugins. If I'm a Ruby guy, I will certainly stick with Octopress or Jekyll. But I'm not, being a Java developer. One of the biggest reason why I'm switching to jbake
is being able to run it on JVM. JBake is not as mature as Jekyll, it's Github inception was 17th of July 2012.
We are writing a new application and the team agreed to use JSP as view technology with Freemarker for email templates. To type less on our views, I decided to write custom JSP tags.
There are two approaches in making your custom JSP tag. One is by using a Java class extending one of the classes inside javax.servlet.jsp.tagext
and then writing your tld
Tag Library Descriptor which calls the class and defines other attributes needed by the custom tag. This is the neat way if you're a Java purist but harder to test since you need a mock servlet implementation with mock JSP writer to do your assertions.
The other approach is by writing a tag file that goes to WEB-INF/tags
folder by convention. The tag file is nothing but JSP code fragments with declared attributes of the required parameters for the tag to be able to perform its sole purpose. This is well-documented here JSP Tags 5.
My previous post is all about writing a simple Groovy CRUD application. It includes writing your views in Groovy as well though it doesn't involve where to put the files. But if you're a seasoned Java developer, you should know your way out.
What it lacks is how to test your Groovy classes which I'm about to document on this post.
This is a workaround assuming your Spring Boot application bootstraps more @Configuration
and you don't want to include them in your integration tests.
import org.junit.Test
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.test.context.ActiveProfiles
/**
* For integration tests
*/
@ActiveProfiles("dev")
@SpringBootApplication
class FakeLoader {
}
Read More →
I've been using Redmine as help desk and bug tracker since it has all the features/plugins you could ask for for a help desk or a bug tracker. But tracking bugs and issues has changed lately. When fixing bugs, you need to put in your estimate so you will have a pretty good idea how much effort you are putting into it. This is probably one of the reasons why RedmineCRM premium plugins exists. The lack of planning tools in RedmineCRM pushed me further to use Acunote. This is hosted online and free for a team of 5 users but 5 is very
limiting. Acunote also lacks the tooling support you will get from Jira, FogBugz and the likes.
Since I don't need enterprise solution at the moment so I'll give YouTrack a try. It's free for the first 10 users so I actually doubled what Acunote is offering for free. As with Jira, FogBugz or Acunote, it has hosted solution too.
$ wget https://download.jetbrains.com/charisma/youtrack-6.0.12634.jar
HTTP request sent, awaiting response... 200 OK
Length: 111007822 (106M) [binary/octet-stream]
Saving to: ‘youtrack-6.0.12634.jar’
100%[======================================>] 111,007,822 4.93MB/s in 26s
Read More →
Recently, I've been looking for a Jenkins alternative and the closest I found is TeamCity. It's not free as in free speech compared to Jenkins but the twenty build configs and three build agents is more than enough for my small projects.
TeamCity promised to work out-of-the-box just like Jenkins does so I'll give it a go. It's using Tomcat by default so I'm expecting a flat learning curve here.
Read More →I was trying to mount a GPT NTFS drive and get Error mounting /dev/sdb1 at /media/drmanalo/DATA: Command-line mount -t "ntfs" -o
Windows 8 is using hibernation mode which writes RAM contents to the hard drive before powering off to be able to restore to the same state as it was before shutdown.
$ sudo ntfsfix /dev/sdb1
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.
Read More →
Personal Package Archive is a collection of software not included in Ubuntu repositories by default. Typically these repositories focus on a single program, but they can include more depending on the person maintaining them. With PPAs, Ubuntu users can have access to bleeding-edge software without waiting for the next official release if ever the PPA made it to the official repository.
Here are my top PPAs...
$ sudo add-apt-repository ppa:team-xbmc/ppa
$ sudo apt-get update
$ sudo apt-get install kodi
Read More →
After testing elementary OS using VirtualBox, I am finally installing it to my desktop. Not that I don't like CentOS anymore but it will help me on my job to totally embrace Ubuntu.
Read More →There is a book of exactly the same title from manning.com. I don't have it yet but father Christmas will put it underneath my tree this Christmas.
What I do have is Spring Boot in Action which covers mixing Java with Groovy. This is what this post is all about. I am going to create a Spring Boot project but will primarily use groovy
.
$ mkdir paluwagan
$ cd paluwagan
$ mkdir static
$ spring init --dependencies web,h2,data-jpa,jdbc,groovy-templates --build gradle --packaging jar --extract
Using service at https://start.spring.io
Project extracted to '/home/drmanalo/workspace/paluwagan'
Read More →
firewalld provides a dynamically managed firewall with support for network/firewall zones to define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings and for ethernet bridges and has a separation of runtime and permanent configuration options. It also supports an interface for services or applications to add firewall rules directly.
The two important concepts of firewalld is zones and services.
A zone defines the trust level of the interface used for a connection. There are several pre-defined zones provided by firewalld.zone.
A service can be a list of local ports and destinations and additionally also a list of firewall helper modules automatically loaded if a service is enabled. Service configuration options and generic information about services are described in firewalld.service. The use of predefined services makes it easier for the user to enable and disable access to a service.
$ firewall-cmd --get-zones
block dmz drop external home internal public trusted work
In order from least trusted to most trusted, the pre-defined zones within firewalld are:
Read More →Spring Boot is an exciting new way to develop Spring applications with minimal friction from the framework itself. Auto-configuration eliminates much of the boilerplate configuration that infests traditional Spring applications. Spring Boot starters enable you to specify build dependencies by what they offer rather than explicit library names and version. The Spring Boot CLI takes Spring Boot’s frictionless development model to a whole new level by enabling quick and easy development with Groovy from the command line. Finally, the Actuator lets you look inside your running application to see what and how Spring Boot has done.
Above is an excerpt from Craig Walls' Spring Boot in Action which perfectly describe my feelings with the traditional Spring configuration and how Spring Boot modernise it.
My favourite part of Spring Boot is its CLI so I'll try creating a new project using CLI.
Read More →Jenkins is an opensource and probably the most popular continuous integration tool in the Java community. There are many plugins out there available to make your coding life easier. It supports almost all version control systems and can run all your Maven or Ant tasks.
To install and configure Jenkins on CentOS, we have to first make sure that Java is installed on your machine. If not, please refer to this post from if-not-true-then-false.com
$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
Resolving pkg.jenkins-ci.org (pkg.jenkins-ci.org)... <IP_ADDRESS>
Connecting to pkg.jenkins-ci.org (pkg.jenkins-ci.org)|<IP_ADDRESS>|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 75 [text/plain]
Saving to: â€˜/etc/yum.repos.d/jenkins.repoâ€™
$ sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
Read More →
Android system update is like pushed notifications where you cannot opt out. Rooted device actually can but I'm not rooting my device again since I had a bad experience with it. I kept ignoring this update but I woke up one morning in Android 5.0.2. This update is not compatible with my device as this drives it to the bend hence the reason I want to downgrade.
$ apt-cache search android-tools
android-tools-fsutils - Android ext4 utilities with sparse support
android-tools-adb - Android Debug Bridge CLI tool
android-tools-adbd - Android Debug Bridge Phone Daemon
android-tools-fastboot - Android Fastboot protocol CLI tool
You can only install android-tools-adb
for this purpose.
I installed JBoss Application Server 7 but it won't start on my Ubuntu machine. If I will run $JBOSS_HOME/bin/standalone.sh
,
here's how far I can get.
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss7
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m
-Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
-Djboss.server.default.config=standalone.xml
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
23:41:04,456 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
23:41:05,336 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
23:41:05,525 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
A bit of Googling suggested it is a Java 8 related issue and shouldn't happen if I'm going to downgrade to Java 7. Stackoverflow did suggest I can use Wildfly 8 for my latest version of Java.
Read More →Express Editions of Oracle are in rpm (Red Hat Package Manager). But since I turned away from my CentOS, I have to install it on Ubuntu using the hard way I suppose.
For the installation of Oracle 11g R2 Express Edition (XE), a couple of additional Linux packages are required. These packages can be installed using apt (goodbye yum).
$ sudo apt-get install alien libaio1 unixodbc
Download the Oracle 11g R2 Express Edition from the Oracle website. Make sure you select the Linux x64 version from Oracle website. Unzip the file after downloading.
$ unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
Read More →
I copied this startup script from liferay. You can use this script start and stop your tomcat instance just like any CentOS standard services.
Read More →vim is a versatile and powerful text editor for command-line environments. In *nix world, it would be very difficult to survive if you cannot edit files/configs without using vi. It was first dubbed as Vi iMitation but was later relabeled Vi IMproved. It is free and open source software and is released under a license that includes some charityware clauses. To pimp your vim, you will need to create a file called .vimrc
under your home folder.
set nocompatible
syntax on
set mouse=a
set showmatch
set autoindent
set smartindent
set backspace=2
set tabstop=4
set number
set smarttab
set shiftwidth=4
colorscheme torte
Read More →
This is a simple Ant build script I'm using for my Symfony2 blog. This has the following dependencies:
Read More →$ grails create-app qotd
| Application created at /home/drmanalo/intellij/qotd
$ cd qotd
$ grails run-app
> Configuring > 0/1 projects > root project > Resolving dependencies ':classpath1/1 projects > Resolving dependencies ':agent' > Resolving dependencies ':versio:compileJava UP-TO-DATE
> Building 16% > :compileGroovy > Resolving dependencies ':compile' > Resolving :compileGroovy
Download https://repo.grails.org/grails/core/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
> Building 16% > :compileGroovy > Resolving dependencies 'detachedConfiguration4:processResources
:classes
:findMainClass
> Building 83% > :bootRun > Resolving dependencies ':runtime' > Resolving depend:bootRun
Download https://repo.grails.org/grails/core/commons-io/commons-io/2.2/commons-io-2.2.jar
Grails application running at http://localhost:8080
Read More →
From my Java best practices training, my instructor gave us an example of the factory pattern using Shape object with draw() method. The Shape interface is further implemented by a base class called ShapeFactory which decides what kind of shape it is going to create using some business intelligence you put into the factory.
The example is spot on but I found another good example from our hands-on exercise which I'm about to share. Not just because I'm a Star Wars fan but the way factory is being used.
package com.robots;
import java.awt.Color;
import java.awt.Point;
import java.util.List;
import com.robots.parts.Part;
public interface Robot {
void move(int distance, Direction direction);
List<Part> getParts();
String getName();
Point getXY();
void setXY(Point p);
double dist(Robot r2);
Color getColor();
int getSerial();
}
Read More →
Observer Pattern has been around Java since version JDK 1.0. One of the nice thing about having it inside the language is you only have to subclass it and just worry about its implementation logic.
Here are the key benefits of the observer pattern.
Observer
nor Observable
know class type of the otherObservable
can communicate with any Observer
Observer
can register for state change events on any Observable
Observable
indirectly broadcasts to all registered Observers
This is from one of our exercises which is a card game called Tehi. This is not the complete program but what it shows here is how are you going to use the observer pattern. First you will notice CardDeck extends Observable
and the abstract CardViewer implements Observer
. The concrete classes FutureCardsViewer and PastCardViewers then has update method which is the glue that attached them to the Observable
.
I took this from my Java best practices notes training. This is a verbatim of the switches I used as part of our exercises.
In many cases an application can meet performance goals with the default garbage collector. For sufficiently large applications that scale to large numbers of threads, processors, sockets, or a large amount of memory choosing an appropriate garbage collector will make a difference.
-XX:+UseSerialGC
-XX:+UseParNewGC -XX:+UseConcMarkSweepGC
-XX:+UseG1GC
-XX:+AggressiveHeap
-XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseAdaptiveSizePolicy
-XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+UseAdaptiveSizePolicy -XX:GCTimeRatio=9
-XX:+UseG1GC -Xmx30m
-XX:+UseSerialGC -Xmx30m
Read More →
Here is a simple batch script to backup my project folder every 18:30. I wish I could run this in cron but my development machine is running Windows.
@SETLOCAL
@ECHO OFF
@REM ----- begin backup ------------------------------------------------
@REM path is handled by mklink done initially
@REM SET reads whitespaces too!
SET file=workspace.7z
SET source=C:\Users\dhonnee.manalo\git\workspace\
@REM ----- 7za merges with old archive
@REM ----- workaround is to delete first
7za a -t7z %file% %source%
ECHO Compression finished!
@REM ----- end backup --------------------------------------------------
@REM ----- copy to x:drive ---------------------------------------------
SET destination=\\remote_server\dev\dhon.manalo\workspace\
copy %file% %destination% /Y
ECHO Backup finished!
@REM ------- END backup.bat ------------------
Read More →
I bought the Web Designer Issue 233 being interested with jQuery effects but it turned out that I will find something far more interesting. I found a gem inside the magazine, it was a ruby! This issue discussed how to start learning rails. As rails website define it, Ruby on Rails® is an open-source web framework that’s optimised for programmer happiness and sustainable productivity. It lets you write beautiful code by favouring convention over configuration.
To be able to setup rails, we need to setup the dependencies first. The first requirement is ruby of course.
$ apt-add-repository ppa:brightbox/ruby-ng
$ apt-get update
$ apt-get install ruby2.2
$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
Read More →
I was trying to improve an existing Spring project to be able to inject Hibernate's SessionFactory but get confused where to put my Hibernate XML configuration. I initially put it within <context-param/>
but was surprised Spring is not creating my sessionFactory bean. Then I tried it under <init-param/>
but the result is the same, there's no sessionFactory bean. I tried putting my Hibernate configuration on both locations and it worked. I still don't understand why hence I asked my friend Google.
I found this post from Late Night Developer which helped me understand why there are two places for my custom XML configurations.
Read More →The most important thing to understand is that there are 2 layers of application contexts, and they each have default XML files to load beans from.
Spring Security 3.0 introduced the ability to use Spring EL expressions as an authorisation mechanism. Expression-based access control is built on the same architecture but allows complicated boolean logic to be encapsulated in a single expression. This comes handy when you want to secure a Controller method or even the entire Controller. JSP has native support for this feature using
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
FreeMarker don't so you need to do more than just importing a tag library.
Read More →I was using FreeMarker with my previous project as my email templating engine but for now I'm using it for all my views. I will show here the macros that bind a Spring form.
One might wonder why I'm leaving JSP but the whole truth is I'm typing less with FreeMarker. I read this post from stackhunter.com and among the 10 reasons mentioned I like these:
Just saw this issue while concatenating fields in Oracle.
SELECT LISTAGG(column_name, ', ') WITHIN GROUP (ORDER BY column_name) alias FROM table_name;
ORA-01489: result of string concatenation is too long
01489. 00000 - "result of string concatenation is too long"
*Cause: String concatenation result is more than the maximum size.
*Action: Make sure that the result is less than the maximum size.
SELECT RTRIM(XMLAGG(XMLELEMENT(e, column_name, ',').EXTRACT('//text()') ORDER BY column_name).GETCLOBVAL(), ',') alias FROM table_name;
Read More →
Redmine is a flexible project management web application written using Ruby on Rails framework.
To install redmine, you have to check if you have ruby
installed. To install ruby with ease, use RVM
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm install ruby 2.3.1
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Read More →
I installed Centos7 as minimal for a basic LAMP server but then I decided to switch to Gnome instead of pure command line environment. If you're interested how I did it, groupinstall has the perfect recipe.
$ yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
Read More →
Oracle JDBC is not available from Maven's online repository therefore you have to download it from the Oracle website and add the JAR to your local Maven repository. I will not detail how and where to download it but the last time I checked it, it requires login to Oracle website.
After downloading the JAR, you have to open your console and issue mvn install:install-file
. Please refer below for the complete syntax. -Dfile requires fullpath.
After I prototyped a Spring standalone application with a deployment-friendly runnable jar, I want to prototype another Spring standalone application with added complexity, Hibernate persistence I mean. I'm going to use H2 to avoid 3rd party database dependency.
Just like my previous post, I'm going to use maven-archetype-generate
and will add Spring dependencies later on.
$ mvn archetype:generate -DgroupId=com.manalo.prototype -DartifactId=persistence -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom
[INFO]
[INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.manalo.prototype
[INFO] Parameter: packageName, Value: com.manalo.prototype
[INFO] Parameter: package, Value: com.manalo.prototype
[INFO] Parameter: artifactId, Value: persistence
[INFO] Parameter: basedir, Value: /home/drmanalo/workspace
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: /home/drmanalo/workspace/persistence
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.401s
[INFO] Finished at: Thu Sep 04 23:17:16 BST 2014
[INFO] Final Memory: 14M/150M
[INFO] ------------------------------------------------------------------------
Read More →
Creating a Spring standalone application is a challenge to me without using Spring Boot. I used to have web.xml
to bootstrap my application but being standalone left me thinking which XML or configuration file will bootstrap it.
I'm prototyping maven-archetype-generate
and will add Spring dependencies later on hoping I will achieve my goal.
$ mvn archetype:generate -DgroupId=com.manalo.rabbitmq -DartifactId=rabbitmq -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom
[INFO]
[INFO] maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.manalo.rabbitmq
[INFO] Parameter: packageName, Value: com.manalo.rabbitmq
[INFO] Parameter: package, Value: com.manalo.rabbitmq
[INFO] Parameter: artifactId, Value: rabbitmq
[INFO] Parameter: basedir, Value: /home/drmanalo/workspace
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: /home/drmanalo/workspace/rabbitmq
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:54.171s
[INFO] Finished at: Wed Aug 26 19:34:57 BST 2014
[INFO] Final Memory: 14M/150M
[INFO] ------------------------------------------------------------------------
Read More →
Cisco ASA includes a very nice debugging feature called packet-tracer
. You can inject and trace a packet as it travels through different phases and quickly determine whether or not the packet will pass through. I'm using this quite often to verify traffic passing through ACL rules, NAT rules and VPN but its uses is not limited to these.
packet-tracer input <source interface> <protocol> <source IP> <source port> <destination IP> <destination port> [detailed]
Read More →
I'm putting here my working VPN configuration for ASA 5505 on ASA Version 8.4(7). All upper case values need changing to suit your business requirements and personal taste. IP addresses are mere examples.
object network OBJ_REMOTE_VPN_ENDPOINT
subnet <IP_ADDRESS> <IP_ADDRESS>
description OBJ_REMOTE_VPN_ENDPOINT is a label
object network OBJ_INSIDE_SERVER1
host <IP_ADDRESS>
description OBJ_INSIDE_SERVER1 is a label
object network OBJ_INSIDE_HOST1
host <IP_ADDRESS>
description OBJ_INSIDE_HOST1 is a label
object network OBJ_NATTED_INSIDE_HOST1
host <IP_ADDRESS>
description OBJ_NATTED_INSIDE_HOST1 is a label
Read More →
This Cisco dialup VPN configuration worked for ASA 5505 running on version 8.4(7). All upper case letters are labels and should be changed according to your standards and taste. IP addresses are representational.
object network OBJ_VPN_ENDPOINT1
subnet <IP_ADDRESS> <IP_ADDRESS>
description OBJ_VPN_ENDPOINT1 is a label
ip local pool VPN_DHCP_POOL1 <IP_ADDRESS>-<IP_ADDRESS>
Read More →
This is my working Cisco dialup configuration. IP addresses and wildcard masks are fictitious.
Read More →When enabling Cisco router's http server, it automatically generates a self-signed certificate which is good but when you decided to turn off the http server, it will then leave a self-signed certificate making running-config a bit messy. Here are the steps to remove the self-signed certificated if it's no longer needed.
Read More →


Half Ogre |
| Description | No further information available |
| Stat Adjustments | strength+3, intelligence-1, charisma-1, wisdom-1, max strength adj.+3, max intelligence adj.-1, max charisma adj.-1, max wisdom adj.-1 |
| Bonus Abilities | Butchering(35%) |
| Bonus Languages | Gigantic(50%) |
| Life expectancy | 78 years |
| Starting Equipment | a large patchy tunic, some torn leggings, a knitted weapon belt |
| Qualifying Classes |
Apprentice
Artisan
Assassin
Barbarian
Beastmaster
Burglar
Cleric
Delver
Doomsayer
Druid
Fighter
Gaoler
Mer
Minstrel
Missionary
Necromancer
Pirate
Ranger
Sailor
Scholar
Shaman
SkyWatcher
Templar
Thief
Trapper
|