Why CBO is better than RBO? | #dailyDBA 38

0:01 #dbaChallenge: In Oracle RAC, will one node query execution check execution plan with another node?

Questions Picked-up For This Episode:

01:27 What recommendations do you have when it comes to indexes?

04:09 How to write better queries so that if there is any change at application end, no changes must be done at db end?

06:52 Why CBO is better than RBO?

09:17 What is the impact of Exadata, Cloud and SAAS products on DBA jobs?

13:57 How to define which column to create index on?

16:32 #dba Challenge!

Bonus Question
17:11 How to identify fake dba vs experienced dba?

#dailyDBA #dbaGenesis

Your comments encourage us to produce quality content, please take a second and say ‘Hi’ in the comments and let me and my team know what you thought of the video … p.s. It would mean the world to me if you hit the subscribe button ;)

DBA Genesis provides all you need to build and manage effective Oracle technology learning. We designed DBA Genesis as a simple to use yet powerful online Oracle learning system for students. Each of our courses is taught by an expert instructor, and every course is available with a challenging project to push you out of your comfort zone!!

DBA Genesis is currently the fastest & the most engaging learning platforms for DBAs across the globe. Take your database administration skills to next level by enrolling into your first course.

Start your DBA Journey Today !!

#cbo #rbo

What is GEEK

Buddha Community

Why CBO is better than RBO? | #dailyDBA 38

Why CBO is better than RBO? | #dailyDBA 38

0:01 #dbaChallenge: In Oracle RAC, will one node query execution check execution plan with another node?

Questions Picked-up For This Episode:

01:27 What recommendations do you have when it comes to indexes?

04:09 How to write better queries so that if there is any change at application end, no changes must be done at db end?

06:52 Why CBO is better than RBO?

09:17 What is the impact of Exadata, Cloud and SAAS products on DBA jobs?

13:57 How to define which column to create index on?

16:32 #dba Challenge!

Bonus Question
17:11 How to identify fake dba vs experienced dba?

#dailyDBA #dbaGenesis

Your comments encourage us to produce quality content, please take a second and say ‘Hi’ in the comments and let me and my team know what you thought of the video … p.s. It would mean the world to me if you hit the subscribe button ;)

DBA Genesis provides all you need to build and manage effective Oracle technology learning. We designed DBA Genesis as a simple to use yet powerful online Oracle learning system for students. Each of our courses is taught by an expert instructor, and every course is available with a challenging project to push you out of your comfort zone!!

DBA Genesis is currently the fastest & the most engaging learning platforms for DBAs across the globe. Take your database administration skills to next level by enrolling into your first course.

Start your DBA Journey Today !!

#cbo #rbo

Android Vs iOS - Which is Better for App Development?

Welcome to our Android tutorial, in this tutorial, we are here with something that is a very hot topic of all time. In this article, we are going to discuss a very interesting topic that is Android VS iOS. We know that these days iOS is on fire, and so is Android. The growth rate of both the operating systems has been increasing rapidly for the last few years. Regardless of this, the growth of Android is found to be on the totally next level. So, we are very well prepared here to jot down the difference between Android and iOS

#android tutorials #android vs ios #difference between android and ios #ios vs android which is better #which is better ios or android #why android is better than ios

Leonard  Paucek

Leonard Paucek

1667070360

Grocery CRUD: A PHP Codeigniter Framework Library

Grocery CRUD

Grocery CRUD is a PHP and Codeigniter Framework library that creates a full functional CRUD system without the need to customise JavaScript or CSS.

.gitignore

.htaccess
.buildpath
.settings/
.project
.idea/
system/
assets/grocery_crud/themes/bootstrap
application/.htaccess
application/cache/
application/config/migration.php
application/config/autoload.php
application/config/config.php
application/config/constants.php
application/config/memcached.php
application/config/database.php
application/config/doctypes.php
application/config/foreign_chars.php
application/config/hooks.php
application/config/index.html
application/config/mimes.php
application/config/profiler.php
application/config/routes.php
application/config/smileys.php
application/config/user_agents.php
application/controllers/index.html
application/controllers/examples2.php
application/controllers/build.php
application/controllers/welcome.php
application/views/example2.php
application/core/
application/errors/
application/helpers/
application/hooks/
application/index.html
application/language/
application/libraries/index.html
application/libraries/grocery_crud_extended.php
application/logs/
assets/uploads/images/
application/models/index.html
application/third_party/
application/views/index.html
application/views/welcome_message.php
application/views/errors/*
index.php
license.txt
bootstrap-v4

change_log.txt

v1.6.4
    - #491: Fixing issue when we use set_read_fields with a column that doesn't exist at the database
    - Updating jQuery version to 2.x
v1.6.3
   - #465: Translation for Spanish Uruguay by @mlopezcoria
   - #470: Update Polish translation by @tikky
   - #468: Remove PHP 7.3 warnings
   - #38: Bug fix: required_fields doesn't work for relation_n_n fields
   - #469: datatables theme - update table fails after delete
v 1.6.2
    - #442: Searching in grid with value 0 is not working
    - #458: Updated Lithuanian language by @dgvirtual
    - #463: Updated Spanish language by @CarlosPinedaT
    - Security fix
v 1.6.1
    - #441: Adding clone functionality - contribution from @portapipe
v 1.6.0
    - #211: Bug if use where clause and try to "search all" the fields
    - #432: Bootstrap Theme issues with filtering when we are using set_relation with multiple fields
    - #353: Adding callback_read_field function
    - #433: Preview click with fancybox to work the same across all the themes
v 1.5.9
    - #420: set_relation with brackets is causing ambiguous column name when the field name exists at the basic table
    - #413: Unexpected error when there are non english chars and a datetime field as column
    - #406: Export button to work without the need of a popup window or new tab
    - Clean-up redundant JavaScript load if it is not required.
    - Remove Export as a flash plugin for security reasons and instead add a download link
v 1.5.8
    - #382: Adding custom error message for set_rules()
    - Two new lang strings for the multiple delete confirmation
    - #388: Chosen select have 100% width at flexigrid theme
v 1.5.7
   - #331: Have a configurable XSS clean option to prevent XSS attacks
   - #370: A faster way to calculate the totals
v 1.5.6
   - Unset bootstrap with more CSS unsets
   - Languages updates (Portuguese, Italian, Spanish)
   - #367: Missing translation for Search {column_name}
v 1.5.5
   Add Croatian language - translated by: Siniša Dragičević Martinčić
   - Small CSS fixes: Datetime and date picker was overflowing in some languages
   - Removing uniform.js
v 1.5.4
   Changes for compatibility without jQuery Migrate
v 1.5.3
   #141 - Max length for decimal numbers (pull request from @dodge107)
   #335 - Unable to locate the model you have specified: grocery_crud_model (pull request: #336 from @P8H)
v 1.5.2
   Add lithuanian language - translated by alex@gnosi.lt
   Fix compatibility issues with Codeigniter 3
   Add "More" lang string for the datagrid listing
v 1.5.1
	#290 - Added functionality to define upload file types per field (pull request from @syrys)
	#305 - Update french.php and add translation for date format (pull request from @bvrignaud)
	New function unset_bootstrap that removes JS and CSS of the new bootstrap theme
v 1.5.0
	#211 - Bug if use where clause.
	#197 - Properly sanitize filenames for uploads.
	#237 - Set Timepicker to 24 hour format.
    #294 - Javascript bug with set_subject().
	Add a new method unset_view that is just an alias to unset_read method.
	Multiple delete fields for flexibility for future themes.
	Fixing the bug of jquery form plugin with returning the textarea as required.
	Add $subject_plural as a second parameter to the set_subject method.
	Multiple search fields for flexibilty for future themes:
	     - Multiple simple search
	     - Multiple relation search
	     - Multiple relation_n_n search
	More configuration preferences
	    - Setting environment (e.g. production)
	    - Setting default theme (e.g. datatables)
	Add 2 new functions:
		- unset_read_fields
		- set_read_fields
v 1.4.1
	#231 - Read page not showing relations.
	#233 - File upload uniqueid not unique.
v 1.4.0
	#170 - Problem with more than one date inputs at the dialog.
	#148 - New theme twitter-bootstrap
	#150 - Optimizing the SELECT statement for counting rows.
	#144 - Unique fields as new functionallity for unique fields in the database.
	#129 - Small bug uploading images.
	#142 - Extras doesn't work properly when the field doesn't exist in the database
	#158 - New method name set_crud_url_path. This method is useful when the path is not specified correctly.
	#163 - Custom field type label for true_false. Like hidden, enum and set.
	Noty Jquery Plugin to load when you delete a record.
	Upgrading Jquery to Jquery 1.10.2
	Multiple grids in one page.
	New language: Catalan.
	Add "view" as new action.
	Small bug fixes:
		- #165 - add_action "url_has_http" issue
		- #166 - Improved file upload error handling
		- #167 - add_action method in Twitter_Bootstrap theme, doesn't update the dropdown properly
v 1.3.3
	#102 - Unsigned field type bug.
	#103 - Multiple columns search filtering at datatables.
	#113 - Relation n_n missing when unset field.
	Adding languages: Bengali, Slovak, Korean.
	Stop supporting Codeigniter version 2.1.1 with ugly workarounds.
	Use fancybox for previewing the thumbnails at the list page.
	Transliteration characters for uploaded files.
	Updating jQuery Plugins and third party addons:
		- Updating jQuery to version 1.8.2
		- jQuery UI Library to v1.9.0.
		- Timepicker Addon for jQuery UI Datepicker to v1.0.5.
		- jQuery UI Multiselect and adding localization files for it.
		- jQuery Numeric plugin to v1.3.1.
		- jQuery Chosen plugin to v0.9.8.
		- Updating CKEditor to v3.6.5 with minimum setup.
		- Updating TinyMCE to v3.5.7.
v 1.3.2
	#98 - Add more field types.
			- Dropdown field type.
			- Multiselect field type
	#101 - Size of a request header field exceeds server limit for datatables.
	#97 - Add new method and functionality - unset_jquery_ui
	#46 - Supporting IE7.
	#95 - Export and print doesn't remove the html tags.
v 1.3.1
	Updating "Export","Print" and "Minimize/Maximaze" lang strings
	Renewing to the latest tinymce version
	Jquery version 1.8.1
	Fixing small bugs
v 1.3
	#73 - Jquery version 1.8.0
	#88 - Where clause in set_relation_n_n.
	#87 - Templating system to the  set_relation_n_n method.
	#82 - Have a thumbnail after uploading an image.
	Adding Czech Language.
	Internationalisation for datepicker ui and datetime picker.
	#86 - Print functionality to both flexigrid and datatables theme.
	#85 - Export functionality to both flexigrid and datatables theme.
	Print functionality to datatables theme.
	Having CKEditor as the default texteditor for grocery CRUD.
	Adding Markitup texteditor. Really useful editor for developers.
	#68 - set_relation doesn't work as expected when the third field (title name) is the same on two or more set_relation methods.
	#80 - method order_by doesn't work correctly on datatables theme.
	More configuration values:
		- Choose text-editor between 'ckeditor','tinymce' or 'markitup'.
		- Choose text-editor type between 'minimal' or 'full'.
		- Character limiter at the columns of the list page.
v 1.2.3
	Compatible with Codeigniter version 2.1.1
	Adding Hungarian language.
	Adding new method: field_type. For now it is just an alias to the change_field_type method.
	#49 - Adding new method: set_primary_key.
	#27 - Adding value to enum and set of the change_field_type method.
	#44 - Changing the date format at the list table. For example the 10 Jan 2003 has to be 10/01/2003.
	#56 - Field type true_false now uses default value.
	#42 - Insert ids to all the inputs for easy Javascript changes.
	Bug fixes:
		#30 - Change field type doesn't work if the field is not at the table.
		#38 - required_field doesn't work for relation_n_n fields.
v 1.2.2
	Adding Dutch language.
	Adding a new method "unset_back_to_list".  Unsets everything that has to do with buttons or links with go back to list message.
	#23 - When we use $crud->where() method it doesn't work as expected with the search of flexigrid.
	#28 - Change the hardcoded JavaScripts and CSS with variables.
	#25 - Adding a new method "unset_list".  Unsets the first list and the ajax_list and gives an exception error for the user that tries to access it.
	Adding a new button/feature "save and go back to list". When a user press the button "save and go back to list" it is automatically redirect you to the list page when a successful save is done.
	Adding the default_per_page at the config file. This specifies the first visit per page that a user should see at the list page. For example 25 rows per page.
	#13 - The list search and ordering is not working with the n-n relation columns.
	Small bug fixes:
		#20 - Pressing tab and enter after adding a date or a datetime field it clears the date.
		#21 - By default the texteditor transform the utf8 to html entities.
		#22 - Doesn't recognize that a tinyint 1 or int 1 can just take a numeric value more than 1.
v 1.2.1.1
	Small bug fixes:
		#18 - Returning $this to all the callbacks methods.
		"set" type doesn't work properly.
v.1.2.1
	Adding languages: Afrikaans, Danish, Japanese, Romanian.
	Adding 3 new methods. unset_fields, unset_add_fields and unset_edit_fields.
	Renewing Javascripts: tinymce.
	Issue #14 - In firefox browser if you add more than one textarea. Only the last textarea works properly.
	Issue #16 - Flexigrid's Search string get garbled with multibyte string.
	Adding the "set" field type.
	Adding the "readonly" field type.
	Adding lang strings: "set_relation_title", "list_record", "form_inactive", "form_active";
v.1.2
	Adding languages: Arabic, Chinese, European Portuguese, German , Persian, Polish, Indonesian, Turkish, Ukrainian.
	Adding date format to the auto date fields. The format can be dd/mm/yyyy or mm/dd/yyyy or the old-one yyyy-mm-dd.
	Adding date-time format to the auto date-time fields. The format is chosen by the default date format (uk-date , us-date or sql-date).
	Adding a new uploader. Works with the most common browsers. Internet Explorer 8+, Mozilla Firefox, Google Chrome, Opera, Safari.
	Changing the interface of the form inputs. Now all the text inputs looks like bootstrap's inputs.
	Adding a where clause at the 4th argument to the simple set_relation method.
	Adding order by clause at the 5th argument to the simple set_relation method.
	Adding 3 new callbcaks, callback_upload, callback_before_upload, callback_after_upload.
	BUG fix - unset_jquery function now works properly.
	BUG fix #9 (The form's clear functionallity don't work properly after the insert).
	RENAMING METHODS:
		callback_escape_insert to callback_insert,
		callback_escape_update to callback_update,
		callback_escape_delete to callback_delete
	RENAMING CLASSES:
		grocery_Field_Types to grocery_CRUD_Field_Types
		grocery_Model_Driver to grocery_CRUD_Model_Driver
		grocery_Form_validation to grocery_CRUD_Form_validation
		grocery_Layout to grocery_CRUD_Layout
		grocery_States to grocery_CRUD_States
		grocery_Model to grocery_CRUD_Model
v.1.1.8
	Add new jquery version 1.7.1
	Changing the drop-down list of the set_relation. Now the drop-down list has unique design for all the browsers, is searchable and also can be empty.
	Changing the layout or relation n-n (only without the ordering field). The new one, is much more user friendly and easier to handle lot of data.
	Adding languages: Italian, Russian.
	Small BUG fixes:
		- Auto-recognize enum fields for CI 2.1
		- Don't print " " if a value is empty, is useless
		- Smal but important CSS Fixes.
		- #7 set_relation BUG conflict when a field name appears twice.
	Manipulating NULL data. Automatically add NULL to a NULL-able field when it's empty.
v.1.1.7
	Multilingual functionality, adding languages: Bulgarian, French, Portuguese, Spanish,  Thai.
	Fixing issue #3, replace mysql_escape_string() with str_replace. This function has been DEPRECATED as of PHP 5.3.0.
	Fixing issue #5, set_relation with multiple fields don't work with NULL-able fields.
	Fixing issue #6, unique_hash issue (not unique when having same method name in 2 diff. controllers).
	Changing license. Grocery CRUD is released with dual licensing, using the GPL v3 (license-gpl3.txt) and the MIT license (license-mit.txt).
v.1.1.6
	New feature: Multilingual functionality.
	Remember the search text and the field name at the list that user had insert.
	Method set_relation - New feature to add more than one fields to the title of the related table.
	Adding Timestamp as an automatic date and time field.
	Change the business logic of adding js and css files. This is really useful for a FUTURE feature with multiple tables in the same view.
	A temporary solution for the search for All that have a relation_n_n.
	Small Bug fix - adding tinyint as a type to autogenerate the true_false type (active-inactive) for tinyint at CI 2.1
	Fixing issue #1 - flexigrid width was always 960px. Now has always 100% width.
v.1.1.4
	Bug Fix - When you have unset edit and unset delete in your actions and also you have insert one or more add_action, the column Actions disapeared.
	Adding a new field type named "password". This is a simple transformation of the field input from text to password and it hides the password from the list grid.
	Changing state name insert and update to... "insert" and "update" and not "add" and "edit" that was till this revision.
	Fully compatible with codeigniter 2.1 - Changing the library of CI_Form_Validation and adding it into the library of grocery CRUD for stability.
v.1.1.3
	Changing the functionality of the private method _theme_view. Now it's not dependent with the Loader of codeigniter.
		So every template controller, HMVC, e.t.c. can work well with grocery CRUD now.
	Changing the library core and make it more minimal and more powerful.
	New method unset_jquery. Very useful, if you already have the jquery library at your basic template.This is good to avoid jquery conflicts.
	BUG fix - No more conflicts between flexigrid tables. There was a cookie conflict between different lists.
	BUG fix - The set relation now works if you add the same table name twice.
	Renaming the folder public to assets.
	Grocery CRUD is now ready to be a spark.
	Changing the functionality and the javascript of the uploader. There is no need to have $config['enable_query_strings'] set to true anymore.
v.1.1.2
	Renaming the label "Tools" to "Actions".
	Creation of new field type : "hidden" to add hidden fields. You can also add a value to the hidden field.
	Updating Javascripts: datatables, file_uploader.
	Disable sorting of the row "Actions" on datatables theme and fix the actions hover on paging that didn't work.
	Adding new feature/function add_action. Adds icons and urls for custom "actions".
	Adding .htaccess files to the views of themes for security reasons.
v.1.1
	Bug Fix - Datetime picker now works fine to an empty input. It also works fine to the add operation.
	When the edit and the delete is unset then dissapear the column Tools.
	The default library/model is not in a third party but has been moved in the main codeigniter foldering for better functionality and to use it in both CI 1.7.x and CI 2.0.x .
	Delete the grocery Exceptions Library. Everyone can create his own exception library . It was just an example.
	Add new jquery version 1.6.2 and renewing some plugins.
	Remove php short tags.
	No direct script access allowed on the views.
	Renaming function set_relation_1_n to set_relation_n_n. The functionality has not change.
	Removing the libraries MY_Output.php and MY_Loader.php from the core folder.
	Removing the folder template. The template was just an example and confused lot of people.
	Fully compatible with Codeigniter versions 1.7.x , 2.0.0 - 2.0.3.
	Creation of new field type : "invisible". Very useful if you use callbacks.

For more information, visit http://www.grocerycrud.com


Download Details:

Author: scoumbourdis
Source Code: https://github.com/scoumbourdis/grocery-crud

License: GPL-3.0 and 2 other licenses found

#codeigniter #php 

Maptable: Converts any Dataset to An interactive Set Of Components

MapTable

MapTable's primary function is to convert any dataset to a customizable set of components of Map, Filters and Table:

  • Map - A fully customizable (zoom & pan) choropleth or heat map rendered using SVG. The map can be exported to a stand alone SVG for external consumption. The map can include markers based on lat/lon with tooltips. Markers and Map are dynamically update based on filters.
  • Table - A tabular representation of your dataset which can be sorted by header rows. Primary sort is the first click and secondary sort is the second click when shift is held down. This also dynamically responds to filters.
  • Filters - A programmatically generated list of drop downs and input fields to drill down into your dataset

This library was originally conceived to render the home page and next generation of IXP directory for Packet Clearing House (PCH).

You can also browse other code samples and examples

Dependencies

* Only used if you need a map

Install

Here is minimum amount of HTML to render a MapTable with Map, Filter and Table.

<div id='vizContainer'></div>

<script src="d3.min.js"></script> <!-- You can import it from cdnjs.com or bower-->
<script src="topojson.min.js"></script> <!-- You can remove this line if you're not using the map --> <!-- You can import it from cdnjs.com or bower -->
<script src="maptable.min.js"></script> <!-- You can import it from cdnjs.com or bower -->
<script>
  var viz = d3.maptable('#vizContainer')
              .csv('dataset.csv')
              .map({ path: 'world-110m.json' }) // You can remove this line if you want to disable the map
              .filters() // You can remove this line if you want to disable filters
              .table() // You can remove this line if you want to disable the table
              .render(); // This is important to render the visualization
</script>

MapTable is available on cdnjs.com. Remember though, cool kids concatenate their scripts to minimize http requests.

If you want to style the MapTable elements with some existing styles, you can prepend the above HTML with:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="../maptable.css">

Declaring MapTable elements

To create a visualization (Map or/and Table or/and Filters) of your dataset, you need to provide first the container of your visualization

<div id='vizContainer'></div>

The default order of the 3 components is Map, Filters and Table. If you want to place the components in a different order, you can put them on the main container:

<div id='vizContainer'>
  <div id='mt-map'></div>
  <div id='mt-filters' class='panel panel-default'></div>
  <div id='mt-table'></div>
</div>

You instantiate the MapTable library into the viz variable based on the #vizContainer ID you declared in the DOM:

<script>
  var viz = d3.maptable('#vizContainer'); // #vizContainer is the css selector that will contain your visualization
</script>

The MapTable viz declaration in the above example is a chain of functions. The possible functions that you can use are:

  • viz.json(jsonPath[, preFilter]) with jsonPath as string and preFilter as function that filters the dataset upfront.
  • viz.csv(csvPath[, preFilter]) with csvPath as string and preFilter.
  • viz.tsv(tsvPath[, preFilter]) with tsvPath as string and preFilter.
  • viz.columns(columnDetails) with columnDetails as a JS dictionary. You can add/remove it of you want to customize your columns or create virtual columns based on the data.
  • viz.map(mapOptions) with mapOptions as a JS dictionary. You can add/remove it of you want a map on your visualization.
  • viz.filters(filtersOptions) with filtersOptions as a JS dictionary. You can add/remove it of you want filters on your visualization.
  • viz.table(tableOptions) with tableOptions as a JS dictionary. You can add/remove it of you want a table on your visualization.
  • viz.render([onComplete]) that closes the chain and renders the visualization. Don't forget this! It can take an optional callback function onComplete, that's executed when MapTable finishes rendering its components. For example if you have function alertTest(){ alert('test!'); } you would call it with viz.render(alertTest).

Example with preFilter

var viz = d3.maptable('#vizContainer')
        .json('dir_data.json', (d) => parseInt(d.traffic) > 0)
        .map({ path: 'countries.json' })
        .render();

Import datasets

Datasets can be defined by using one of the these three sources:

# viz.json(url)

Import JSON file at the specified url with the mime type "application/json".

# viz.csv(url)

Import CSV file at the specified url with the mime type "text/csv".

# viz.tsv(url)

Import TSV file at the specified url with the mime type "text/tab-separated-values".

Map datasets

To plot lands and countries on the map, we're using TopoJSON library. The map can be generated through this tool: topojson-map-generator.

Dataset requirements

In order to plot your dataset on a map, there are minimum set of columns needed.

If you're planning to add markers on your map, you would need to provide latitude, longitude of your markers. You can also edit these keys name using the map options longitudeKey, latitudeKey.

[
    {"longitude": "13.23000", "latitude": "-8.85000"},
    {"longitude": "168.32000", "latitude": "-17.75000"},
]

If you're planing to add country related information, you should provide consistent country information on your dataset from the TopJSON file. You should provide at least one of these types on your mapOptions:

  • countryIdentifierKey: (string, default: 'country_code') Column name of country identifier (from the dataset). It goes as pair with the option countryIdentifierType.
  • countryIdentifierType: (string, default: 'iso_a2') Country identifier type that we're using to attach data to countries on the map. The available types are:
    • iso_a2 (default): ISO_3166-1_alpha-2 country code format
    • iso_a3: ISO_3166-1_alpha-3 country code format
    • name: Country name that came from the GeoJSON map file.
    • continent: Continent name that came from the GeoJSON map file.

For example for this dataset:

[
  {"country_code": "MAR", "Country Name": "Morocco", "bar": "foo"},
  {"country_code": "FRA", "Country Name": "France", "bar": "foo"},
]

You would use these options:

{
  countryIdentifierKey: 'country_code',
  countryIdentifierType: 'iso_a3'
}

or

{
  countryIdentifierKey: 'Country Name',
  countryIdentifierType: 'name'
}

Columns details

By default, MapTable imports all the columns and detects their format automatically. As well, you can customize behaviors of specific columns and create virtual columns.

# viz.columns(columnDetails) with columnDetails as a JS dictionary. You can add/remove it of you want to customize your columns or create virtual columns based on the data.

columnsDetails format

  • <PUT_YOUR_COLUMN_KEY>: (Object) Provide the columns key here to apply the options below to it. If this key is not defined in yoru dataset, then it will be dynamically added as virtual column:
    • nowrap: (bool, default: false) When present, it specifies that the content inside a that column should not wrap.
    • title: (string, default: columnKey) What we show as column name in filters and table.
    • filterMethod: (string, default: 'field') Column format type, used for filtering. Available options:
      • field: filter by keyword
      • dropdown: exact match using a dropdown
      • compare: filter using comparison (≥, ≤, between ....)
    • virtual: (function(d), default: null) To create a new column that doesn't exists in the dataset, and we'd like to show it on the table or filters. You can also use it if you want to transform an existing column.
    • cellContent: (function(d), default: null) Function that transforms an existing content using other rows. (for example to change the color depending on the data).
    • dataParse: (function(d), default: null) Function that return the formatted data used to sort and compare cells.
    • filterInputType: (string, default: 'text') HTML input type that we're using for the filters for that specific column (e.g. date, number, tel ...)

Example (adding nowrap and type to the region column key):

.columns({
  region: {
    nowrap: true,
    filterMethod: 'dropdown'
  }
})

Naming conventions

For the below examples, we define viz as the variable that loads MapTable.

Functions that have d as parameter, means that d is a JS dictionary that contains data for one row.

Functions that have groupedData as parameter, means that groupedData is a JS dictionary { key: 'groupedByKey', values: [ {d}, ... ] } that contains the key that have been used to group the data, and the matching values related to that grouping.

Map

#viz.map(mapOptions) with mapOptions as a JS dictionary. You can add/remove it of you want a map on your visualization.

Options

path: (string, required) URL of the TOPOJSON map, you can get them from Mike Bostock's repo: world atlas and us atlas. Or use this tool to generate these files as we did on the examples.

onComplete: (function, default: null) Callback function when the map first loaded.

onRender: (function, default: null) Callback function when the map finished rendering.

width: (integer, default:'window.innerWidth') Map Width.

height: (integer, default:'window.innerHeight') Map Height.

saveState: (bool, default: true) Save zoom state into the URL

zoom: (bool, default: true) Enable zoom on the map (when scrolling up/down on the map).

filterCountries: (function(country)) Filter countries follow a specific condition. Example:

```js
  filterCountries: (country) => country.id !== 'AQ', // to remove Antarctica from the map
  ```

title: (object, default: see below) Add a title within the map.

  • title.bgColor: (string, default: '#000000') Title font size.
  • title.fontSize: (integer, default: 12) Title font size.
  • title.fontFamily: (string, default: 'Helevetica, Arial, Sans-Serif') Title font family.
  • title.content: (function(countShown, countTotal, filtersDescription) Function to define how the title is rendered
  • title.source: (function())_ Function to define how the HTML in the title. Example:
title: {
  bgColor: "#F5F5F5",
  fontSize: "11",
  content: function(countShown, countTotal, filtersDescription) {
    if (countShown === 0 || countTotal === 0) out = "No data shown";
    else if (countShown < countTotal) out = 'Showing <tspan font-weight="bold">' + countShown + '</tspan> from <tspan font-weight="bold">' + countTotal + "</tspan>";
    else out = '<tspan font-weight="bold">' + countTotal + "</tspan> shown";

    if (filtersDescription !== '') out += " — " + filtersDescription;
    return out;
  },
  source: function() {
    return 'Source: <a xlink:href="http://www.example.com" target="_blank"><tspan font-weight="bold">example.com</tspan></a>';
  }
},

scaleZoom: ([integer, integer], default: [1, 10]) The map zoom scale.

scaleHeight: (float, default: 1.0) Ratio to scale the map height.

autoFitContent: (bool, default: true) Enable auto zoom to focus on the active markers.

fitContentMargin: (integer, default: 10) Padding in pixels to leave when we filter on a specific area.

ratioFromWidth: (float, default: 0.5) Ratio between the height and the width: height/width, used to deduce the height from the the width.

countryIdentifierKey: (string, default: 'country_code') Column name of country identifier (from the dataset). It goes as pair with the option countryIdentifierType.

countryIdentifierType: (string, default: 'iso_a2') Country identifier type that we're using to attach data to countries on the map. The available types are:

  • iso_a2 (default): ISO_3166-1_alpha-2 country code format
  • iso_a3: ISO_3166-1_alpha-3 country code format
  • name: Country name that came from the GeoJSON map file.
  • continent: Continent name that came from the GeoJSON map file.

longitudeKey: (string, default: 'longitude') Column name of the longitude (from the dataset).

latitudeKey: (string, default: 'latitude') Column name of the latitude (from the dataset).

exportSvg: (string, default: null) URL endpoint to download the current visualization as SVG. Read more on the section export SVG. (more details on a the section "Export as SVG")

exportSvgClient: (bool, default: false) Show button to download the current visualization as SVG using only the client browser instead of querying the backend (in the opposite of exportSvg). You'll need to download FileSaver.js and add a <script src="filesaver.min.js"> to make it work. You may also use the CDN version in your <script> source.

watermark: (object, default: null) Add a watermark within the map.

watermark.src: (string) URL of the image (svg, png, jpg).

watermark.width: (integer) Image width.

watermark.height: (integer) Image height.

watermark.position: (string) Watermark position (top|middle|bottom) (left|middle|right). e.g. bottom left.

watermark.style: (string) Additional css style for the watermark.

Example:

watermark: {
  src: 'https://example.com/image.svg',
  width: 130,
  height: 60,
  position: "bottom left",
  style: "opacity:0.1"
},

markers: (object, enabled by default) Add markers on the map. Set it to false to disable it.

markers.customTag: (function(markerObject)), default: null) This is more advanced feature. If you'd like to override the default market tag (svg:circle) to something different (like an image), you can use this callback function to append to the markerObject your custom implementation (see below example). x and y are coordinates in pixels of the marker.

markers.attrX: (string, default: 'cx') Attribute to position the marker on the X-Axis

markers.attrY: (string, default: 'cy') Attribute to position the marker on the Y-Axis

markers.attrXDelta: (integer, default: 0) Left relative margin of the marker

markers.attrYDelta: (integer, default: 0) Top relative margin of the marker

markers.groupBy: (function(groupedData)) Given groupedData (the current row), function that returns a value that we group markers by. See this example for an implementation example.

markers.tooltipClassName: (string, default: 'mt-map-tooltip popover bottom') Class name of the tooltip used for markers (we're using bootstrap).

markers.tooltip: (function(groupedData)) Function that returns html that we would use as content for the tooltip. We recommend you to use the bootstrap popover..

markers.attr: (object) The markers are by default SVG circle, you can custumize the radius, color or stoke of these markers here. You can use the attribute r to set the radius or fill for the color. More details on possible attributes here. We'll use r as example in the following documentation.

  • markers.attr.r: _(string or integer)_To set a static value
  • markers.attr.r: (function) To represent the radius value based on the dataset, see this example on how we set the marker color fill based on the dataset.
  • markers.attr.r: (object) Use an object with the following keys to correlate the value of the radius with the dataset
    • markers.attr.r.aggregate: (object) Information on how we aggregate data. See this example to understand how we adjusted the radius of the markers based on the dataset.
    • markers.attr.r.aggregate.key: (string) Which column we'll use to aggregate the value (it need to be a number)
    • markers.attr.r.aggregate.mode: (enum('sum', 'count', 'avg', 'min', 'max', '50percentile', '95percentile'), default to 'count') what aggreation function we'll use.
    • markers.attr.r.aggregate.scale: (enum('linear', 'rank', 'sqrt', 'pow2', 'pow3', 'log'), default: 'linear') what scale we'll aggregate the data.
    • markers.attr.r.min: (string or integer) Attribute value for the minimum value on the scale
    • markers.attr.r.max: (string or integer) Attribute value for the maximum value on the scale
    • markers.attr.r.empty (string or integer) Attribute value if no data is linked to that country
    • markers.attr.r.rollup: DEPRECATED (use aggregate instead) (function(groupedData), default: groupedData => groupedData.length) Function for the values we're attaching to the country and attribute. return value needs to be an array that contains rows that match that country or marker. Defaults to values.length, the count of matching markers
    • markers.attr.r.transform: (function(value, allRows), default: value) Function for changing the value for the current country. Can only accept value transform(value) to do a simple Math.log(value) call or be defined to use more advanced logic with transform(value, allRows) and then iterate over allRows (all rows from your csv/tsv/json) to calculate relative values like percentile. (It's recommended to use aggreggate if you want to have a different scale).

countries: (object, enabled by default) Add countries on the map. You can not use this with map.heatmap. Set it to false to disable it.

countries.tooltip: (function(groupedData)) Function that returns html that we would use as content for the tooltip. We recommend you to use the bootstrap popover. The parameter is groupedData (check above on the naming conventions for more details).

countries.attr: (object) The countries are by default SVG path, you can custumize the color or stoke here. You can use the attribute fill to set the color. More details on possible attributes here. We'll use fill as example in the following documentation.

  • countries.attr.fill: (string or integer) To set a static value
  • countries.attr.fill: (function) To represent the color value based on the dataset.
  • countries.attr.fill: (object) Use an object with the following keys to correlate the value of the radius with the dataset
    • countries.attr.fill.aggregate: (object) Information on how we aggregate data. See this example to understand how the countries colors change based on the number of markers per country (choropleth).
    • countries.attr.fill.aggregate.key: (string) Which column we'll use to aggregate the value (it need to be a number)
    • countries.attr.fill.aggregate.mode: (enum('sum', 'count', 'avg', 'min', 'max', '50percentile', '95percentile'), default to 'count') what aggreation function we'll use.
    • countries.attr.fill.aggregate.scale: (enum('linear', 'rank', 'sqrt', 'pow2', 'pow3', 'log10'), default: 'linear') what scale we'll aggregate the data.
    • countries.attr.fill.min: (string or integer) Attribute value for the minimum value on the scale
    • countries.attr.fill.max: (string or integer) Attribute value for the maximum value on the scale
    • countries.attr.fill.minNegative: (string or integer, optional) Attribute value for the minimum (closest to 0) negative value. Use this and maxNegative if you want to show different colors on the map for negative values. It is optional. see this example for an implementation example.
    • countries.attr.fill.maxNegative: (string or integer, optional) Attribute value for the maximum (farthest from 0) negative.
    • countries.attr.fill.empty (string or integer) Attribute value if no data is linked to that country
    • countries.attr.fill.legend: (bool, default: false) show or hide the legend
    • countries.attr.fill.rollup: (function(groupedData), default: groupedData => groupedData.length) DEPRECATED (use aggregate instead) Function for the values we're attaching to the country and attribute. return value needs to be an array that contains rows that match that country or marker. Defaults to values.length, the count of matching countries
    • countries.attr.fill.transform: (function(value, allRows), default: value) Function for changing the value for the current country. Can only accept value transform(value) to do a simple Math.log(value) call or be defined to use more advanced logic with transform(value, allRows) and then iterate over allRows (all rows from your csv/tsv/json) to calculate relative values like percentile. (It's recommended to use aggreggate if you want to have a different scale).

heatmap: (object, default: null) Add a heatmap on the map - we use concentrated circles on every location in the dataset. You can not use this with map.countries.. See this example for an implementation example.

heatmap.weightByAttribute: (function(d), default: null) Which attribute we would weight the gradient. it takes a anonymous function that exposes d as one row, and expect a float as returned value.

heatmap.colorStrength: (float, default: 1) Adjusts heatmap color strength, (0 make things transparent, 1 normal behavior, > 1 to make the color darker)

heatmap.weightByAttributeScale: ('log' or 'linear', default: 'linear') Which scale we would use for the weight (only if weightByAttribute is set).

heatmap.mask: (bool, default: true) Mask the heatmap with countries so heatmap doesn't go over oceans

heatmap.circles: (object) Properties of the circles that makes the heatmap gradient

heatmap.circles.color: (string, default: "#FF0000") The color in HEX of the heatmap circles.

heatmap.circles.blur: (float, default: 4.0) Blur radius that we apply on the heatmap.

heatmap.borders: (object) Enable country borders. Set to false to disable it.

heatmap.borders.stroke: (integer, default: 1) Country border stroke width.

heatmap.borders.opacity: (integer, default: 0.1) Country border stroke opacity.

heatmap.borders.color: (string, default: "#000") Country border stroke color.

Example

heatmap: {
  weightByAttribute: function(d) {
    return parseInt(d.traf, 10);
  },
  weightByAttributeScale: 'log',
  circles: {
    color: '#0000FF',
    blur: 6.0,
  },
  borders: {
    opacity: 0.2,
  },
},

Filters

# viz.filters(options) with filtersOptions as a JS dictionary. You can add/remove it of you want filters on your visualization.

Options

  • show: ([string, ...], default: null) Set the order and the columns that we want to see in the filters.
  • saveState: (bool, default: true) Save filters state into the URL

Table

If you want to add a table on your visualization:

# viz.table(tableOptions) with tableOptions as a JS dictionary. You can add/remove it of you want a table on your visualization.

Options

  • show: ([string, ...], default: null) Set the order and the columns that we want to see in the table.
  • onComplete: (function, default: null) Callback function when the table first loaded.
  • onRender: (function, default: null) Callback function when the table finished rendering.
  • className: (string, default: 'table table-striped table-bordered') Table class name
  • rowClassName: (function(d), default: null) Function that returns the row class name depending on its content. Useful to highlight rows.
  • defaultSorting: (object or table or object, default: see below) How we sort things on the table. You can specify a an array of two objects for secondary sorting.
    • defaultSorting.key: (string, default: ) default sorting on which column.
    • defaultSorting.mode: (string, default: 'asc') sorting mode: asc for ascending, desc for descending.
  • collapseRowsBy: ([string, ...], default: null) Array of columns that we want to be collapsed.

Export as SVG

You can enable this feature via exportSvg and set it to a URL. This will allow users download the map on their computer as an SVG. However, you would need to set up a server endpoint that is going to allow users download the SVG file.

The sample code for a PHP server is located in /server/exportSvg.php. Contributions are welcomed for implementations of in other languages.

In the version 1.4.0 exportSvgClient was added to use only the browser to export the SVG.

Credits

  • Mohammed Elalj @melalj - Original Author & Lead Architect
  • Ashley Jones @Ths2-9Y-LqJt6 - Feature Requester & Deliverer, QA, Love, Release Engineer

Contribute

You are welcomed to fork the project and make pull requests.

Set up your development environment

Requirements

Install any items with "sudo":

  • NodeJs, type npm -v on your terminal to check if you have it. node.js 4 and npm 2 versions or higher required.
  • Gulp sudo npm install -g gulp
  • Bower sudo npm install -g bower

Getting Started

Run these commands as your unprivileged user you're doing your development as:

  1. Run npm install to install dependencies
  2. Run bower install to download Browser Javascript libraries
  3. Run gulp to start the local dev environment on http://localhost:5000
  4. Edit files in ./dev and they will be automatically compiled to ./src
  5. To have production ready files, run: gulp dist. All built files are located in the folder ./dist
  6. Enjoy 🍻

Todo

  •  Publish v1
  •  Write unit tests 🙏
  •  Improve documentation (spell, formulation, emoji...)
  •  Secondary sorting
  •  Append SVG filters to the map and use them as styling
  •  Legend gradient transformation (if we used the log scale)
  •  Have multiple legends depending on the attribute
  •  Legend marker radius

Release History

  • Version 1.7.3 November 26 2018
    • Changed the rank worked so that value of 0 is included in ranks.
  • Version 1.7.2 November 15 2018
    • Change first click on column head to be Descending instead of Ascending - Issue #95
    • Fix some corner cases this.legendCountry[attrKey] is not defined in GeoMap.js - Issue #96
  • Version 1.7.1 November 14 2018
    • Fix Excessive updates to window history - Issue #93
  • Version 1.7.0 November 14 2018 (Also includes items in unreleased 1.6.1)
    • Allow map to be re-rendered with a column sort - Issue #88
    • Fix cellContent: function(d) is called twice for every cell - Issue #87
    • Fix Examples JS errors, padding - Issue #86
    • Support secondary sorting in defaultSorting - Issue #78
    • Provide dataset to map.title.content function to have better customizations - Issue #77
    • Be able to set a property (like attr.fill) of an attribute based on the data - Issue #76
  • Version 1.6.0 July 16 2018
    • Add ability to support secondary sorting in defaultSorting - Issue #78
    • Add ability to provide dataset to map.title.content function to have better customizations - Issue #77
    • Add ability to set a property (like attr.fill) of an attribute (eg marker) based on the data - Issue #76
    • Fix first column as defaultSorting - Issue #71
    • Fix sorting, virtual columns demo - Issue #70
  • Version 1.5.3 June 19 2018
  • Version 1.5.2 June 18 2018
  • Version 1.5.1 May 22 2017
  • Version 1.5.0 May 22 2017
  • Version 1.4.0 December 20 2016
  • Version 1.3 September 26 2016
    • Allow fancier math on country values in map.countries.attr.fill.transform() in GeoMap.js - Issue #32
  • Version 1.2.1 September 21 2016
    • Fix bad use of attrValue in GeoMap.js - Issue #30
  • Version 1.2 September 20 2016
    • Allow custom colors for negative values - PR #29
    • Correctly render legend markers - Issue #27
    • Fix countries.attr documentation add add new minNegative and maxNegative docs.
  • Version 1.1.1 July 14 2016
    • Tweak sorting when clicking column headers - PR #23
    • Scrolling up when we click on New filter - Issue #20
    • Fix poor render on first load - PR #22
  • Version 1.1 June 22 2016
  • Version 1.0.2 May 16 2016
    • Fix dev environment for Ubuntu - Issue #11
    • Restore example directory for use with development - Issue #11
    • Fix some npm packaging breakage - Issue #11
  • Version 1.0.1 March 25 2016
    • First Full featured release
  • Version 1.0.0 December 9 2014
    • Initial commit

Author: Packet-Clearing-House
Source Code: https://github.com/Packet-Clearing-House/maptable 
License: MIT license

#javascript #3d #map #table 

Simple Java Mail: Simple API, Complex Emails

Simple Java Mail

Simple Java Mail is the simplest to use lightweight mailing library for Java, while being able to send complex emails including CLI support, authenticated socks proxy(!), attachments, embedded images, custom headers and properties, robust address validation, build pattern and even DKIM signing, S/MIME support and external configuration files with property overriding, Spring support and Email conversion tools. Just send your emails without dealing with RFCs.

The Simple Java Mail library is a thin layer on top of Jakarta Mail that allows users to define emails on a high abstraction level without having to deal with mumbo jumbo such as 'multipart' and 'mimemessage'.

simplejavamail.org

Simple Java Mail is also available in Maven Central:

<dependency>
    <groupId>org.simplejavamail</groupId>
    <artifactId>simple-java-mail</artifactId>
    <version>7.1.1</version>
</dependency>

Latest Progress

v7.1.0 - v7.1.1

  • v7.1.1 (27-March-2022)#387 Bug: memory leak in SMPT connection pool when 3rd party deallocation failed with exception
  • v7.1.0 (25-January-2022)#379 Maintenance: Adjust dependencies and make Java 9+ friendly

v7.0.1 - v7.0.2

  • v7.0.2 (25-January-2022): #329 Enhancement: Exceptions cause error-level logging in addition to rethrowing the exception, but should just include the message in a custom exception
  • v7.0.2 (25-January-2022): #378 Bug: package org.simplejavamail.internal.modules causes split package problem in Java9+
  • v7.0.1 (22-January-2022): #375 Bug: batch-module gives error when there is a custom mailer

v7.0.0 (2-January-2022)

It has been two years since the last major release, but 7.0.0 finally here!

What's new

Major features:

  • #322 Simple Java Mail migrated to Java 8 finally (see notes below)
  • #295 And also switched to JavaMail's successor Jakarta Mail 2.0.1 (see notes below)
  • #323 Solved the great CLI performance problem (now executes near instantly)
  • #319 Replaced the underlying regex-based email-address validation library with the lexer based JMail, which is faster, correcter, documented better and is more up-to-date with RFC's
  • #367 The sendMail/testConnection methods now have proper support for CompletableFuture

Bugfixes:

  • #352 Bug: names regex groups are not supported in Android JVM
  • #326 Bug: NullPointer when parsing Outlook Message with nested empty Outlook message
  • #330 Bug: cli expected --mailer arguments duplicated 3 times
  • #324 Bug: Add back missing log4j2 for CLI library

Maintenance:

  • #368 Resolve log4j (Java8) vulnerability in Simple Java Mail's CLI module
  • #330 Improved feedback from failing CLI commands
  • #327 Implement toString() for Mailer instances for debugging purposes

About the migration

Updating to Java8/Jakarta 2.0.1 posed a challenge as the 3rd party S/MIME library java-utils-mail-smime has been abandoned/archived while developing Simple Java Mail. Furthermore, it was still under LGPL3 license while everything else is ApacheV2.

Thankfully, I obtained permissions from the maintainers -as well as original developers from decades ago on SourceForge- to take both java-utils-mail-smime and java-utils-mail-dkim under my wings at Simple Java Mail and change the licensing model! You can now post issues and pull requests here:

v6.7.0 - v6.7.6

  • v6.7.6 (22-January-2022): #375 Bug: batch-module gives error when there is a custom mailer
  • v6.7.5 (26-December-2021): #338 Enhancement: Also return AsyncResponse from plain Mailer.sendEmail(singleArgument) as async can be configured through MailerBuilder now
  • v6.7.4 (25-December-2021): #331 Enhancement: Coalesce empty SMTP server arguments to null to support CLI better
  • v6.7.3 (25-December-2021): #335 Bugfix: Precondition nonNull check also checks nonEmpty and breaks on clearEmailAddressCriteria
  • v6.7.2 (25-December-2021): #318 Maintenance: Allow zero data attachments so Outlook message conversions don't crash and burn
  • v6.7.1 (25-December-2021): #346 Bugfix: Add option to parse MimeMessage without fetching attachment data from server - Properly return named datasource without fetching all the data if unwanted
  • v6.7.0 (25-December-2021): #356 Enhancement: Improve for support for Android < 8.0 (Fix NoClassDefFoundError)
  • v6.7.0 (25-December-2021): #351 Bugfix: emlToEmail() and mimeMessageToEmail() break on mesages with duplicate names and legacy empty nested messages
  • v6.7.0 (25-December-2021): #347 Maintenance: Reduce log-spam and prevent exception on every module availability check
  • v6.7.0 (25-December-2021): #346 Feature: Add option to parse MimeMessage without fetching attachment data from server

v6.6.0 - v6.6.2

  • v6.6.2 (23-December-2021): #365 Security: Resolve log4j vulnerability in Simple Java Mail
  • v6.6.1 (12-June-2021): #321 Enhancement: Ignore malformed recipient addresses and continue parsing email data
  • v6.6.0 (1-June-2021): #320 Enhancement: Added default S/MIME signing to Mailer level and fixed crippling performance bug

v6.5.0 - v6.5.4

v6.5.4 (22-May-2021): #315 Enhancement: Nested attachments of Outlook message attachments are now preserved as standard EML MimeMessage attachments

NOTE: This removes the Kryo dependency

v6.5.3 (4-May-2021): #314 Bugfix: Nested attachments of Outlook message attachments are now preserved, by utilizing Kryo

NOTE: This add Kryo as extra dependency to the outlook-module (and is subsequently removed in 6.5.4)

v6.5.2 (15-April-2021): #311 Bugfix: text/calendar as string -> ClassCastException (if calendar type is not Inputstream)

v6.5.1 (10-April-2021): #307 / #310 Bugfix: embedded image resource name got mangled

v6.5.0 (16-February-2021): #298 Enhancement: Nested Outlook messages aren't discarded anymore, but parsed to serialized Email objects

v6.5.0 (16-February-2021): #292 Bugfix: NullPointerException in SmimeUtilFixed when protocol is missing (which is valid)

v6.5.0 (16-February-2021): #289 Bugfix: Support multiple headers with same key

This release breaks all GET/SET api regarding headers used as map (Map<String, T> -> Map<String, Collection<T>>) This release might break api in the rare case you relied on the attachment list and you have nested Outlook .msg attachments (previously omitted in the results)

v6.4.0 - v6.4.5

  • v6.4.5 (13-Februari-2021): #306 Maintenance: Update outlook-message-parser to 1.7.9
  • v6.4.5 (13-Februari-2021): #304 Regression bugfix: batch-module needed for sending mails async, basic version should work without
  • v6.4.5 (13-Februari-2021): #303 Bugfix: EML Attachments are modified/have the wrong size
  • v6.4.4 (25-October-2020): #294 Always invoke async success/exception handlers even if set after sending email (behaving more like promises/futures)
  • v6.4.4 (25-October-2020): #291 On Exception only log the email ID at error level and log the whole email at trace level
  • v6.4.4 (25-October-2020): #290 Only perform expensive logging logic if respective logging level is enabled
  • v6.4.3 (6-August-2020): #284 Improved support for Calendar attachments created by gMail
  • v6.4.3 (6-August-2020): #283 Bugfix: Fix support for reading Calendar attachments with quoted-printable transfer-type
  • v6.4.2 (3-August-2020): #281 Bugfix: Fix support for reading Calendar attachments
  • v6.4.1 (26-July-2020): #252 Bugfix: Added missing support for S/MIME enveloped signing
  • v6.4.0 (19-July-2020): #268 Immediately resolve InputStreams when building emails, don't reuse
    • This primarily affects the builder api for S/MIME and DKIM signing / encryption.

v6.3.0 - v6.3.2 (11-July-2020 - 12-July-2020)

  • #271 Bugfix: Attachment (file)names with special characters should not be encoded
  • #248 Bugfix: MimeMessageHelper: use complete filename as resource name
  • #279 Allow extra Session properties configured through simplejavamail.properties
  • #277 Add API for using custom SSLSocketFactory

v6.2.0 (9-July-2020)

This release adds the following major new feature:

  • #260 Add support for dynamic datasource resolution (file/url/classpath) for embedded images in HTML body

v6.1.0 (5-July-2020)

  • #264 Switch from AssertionError to IllegalStateException
  • Bumped outlook-message-parser from 1.7.3 to 1.7.5
    • bugfix for parsing chinese unsent Outlook messages
    • bugfix Outlook attachments with special characters in the name
  • Bumped email-rfc2822-validator from 2.1.3 to 2.2.0
    • bugfix properly handle brackets in email addresses when allowed
  • Bumped log4j-core from 2.6.1 to 2.13.2

v6.0.2 - v6.0.5 (21-January-2020 - 13-June-2020)

  • #270 Bug: CLI module missing Jetbrains @Nullable annotation dependency needed in runtime
  • #262 Bug: Executor settings passed to the builder are ignored
  • #249 Bug: MimeMessageParser doesn't handle multiple attachments with the same name correctly
  • #245 Bug: JDK9+ Incorrect JPMS Automatic-Module-Name
  • #246 Bug: Sending async emails with and without the Batch module cause lingering threads

v6.0.0-rc1 - v6.0.1 (18-December-2019 - 24-January-2020)

After almost two years of development the next major release 6.0.0 is finally here! And what a doozy it is, with the following major new features:

The core library is now even smaller compared to the 5.x.x series going from 183kb to 134kb!

Here's the complete list of changes:

New features and enhancements

  • #183 To manage all the optional dependencies and related code, Simple Java Mail should be split up into modules
  • #156 Add CLI support
  • #214 Support more advanced batch processing use cases
  • #187 Simple Java Mail should have optional support for signed S/MIME attachments
  • #121 Introduce interfaces for validation and sending, so these steps can be customized
  • #144 Simple Java Mail should tailor the MimeMessage structure to specific needs
  • #138 Add support for Calendar events (iCalendar vEvent)
  • #235 Be able to fix the sent date for a new email
  • #232 Improve encoding of attachment file names
  • #222 Add config property support for trusting hosts and verifying server identity
  • #212 Authenticated proxy server started even if already running, raising exception
  • #207 Implement more comprehensive ThreadPoolExecutor and expose config options
  • #211 SpringSupport should expose the intermediate builder for customization
  • #193 Simple Java Mail should use default server ports when not provided by the user

Bugs solved

  • #242 Renamed log4j2.xml to log4j2_example.xml so it doesn't clash with project config
  • #241 EmailConverter.outlookMsgToEmail duplicates recipients
  • #239 List of Recipients not ordered as added (insertion order not maintained)
  • #236 Message ID should be mapped from Outlook messages as well
  • #210 Connection/session timeout properties not set when not sending in batch mode
  • #201 When parsing Outlook message, FROM address should default to a dummy address when missing
  • #200 When parsing Outlook message, attachment name doesn't fallback on filename if proper name is empty
  • #161 When reading (chinese) .msg files, HTML converted from RTF is completely garbled (encoding issue)
  • #159 Can not parse email with blank email address headers
  • #139 Multiple Bodyparts of same Content-Type not supported for text/html & text/plain within Multipart/mixed or Multipart/alternative
  • #151 Attachment's file extension overwritten by resource's invalid extension

Maintenance updates

  • #165 Move away from Findbugs (unofficial JSR-305) annotations
  • #164 The DKIM dependency has been updated to benefit from the newer Apache V2 license
  • #164 The DKIM dependency has been updated to benefit from the newer Apache V2 license
  • #184 Update JavaMail dependency to 1.6.2, adding support for UTF-8 charset
  • #186 Update JavaMail dependency to 1.6.2, adding support for authenticated HTTP web proxy
  • #146 Added OSGI manifest and switched to spotbugs

Included changes from outlook-message-parser

  • v6.0.1, v1.7.3: #27 When from name/address are not available (unsent emails), these fields are filled with binary garbage
  • v6.0.1, v1.7.2: #26 To email address is not handled properly when name is omitted
  • v6.0.0, v1.7.1: #25 NPE on ClientSubmitTime when original message has not been sent yet
  • v6.0.0, v1.7.1: #23 Bug: _nameid directory should not be parsed (and causing invalid HTML body)
  • v6.0.0, v1.7.0: #18 Upgrade Apache POI 3.9 -> 4.x (but managed back for Simple Java Mail due to incompatibility with Java 7)
  • v6.0.0, v1.6.0: #21 Multiple TO recipients are not handles properly
  • v6.0.0, v1.5.0: #20 CC and BCC recipients are not parsed properly
  • v6.0.0, v1.5.0: #19 Use real Outlook ContentId Attribute to resolve CID Attachments
  • v6.0.0, v1.4.1: #17 Fixed encoding error for UTF-8's Windows legacy name (cp)65001
  • v6.0.0, v1.4.0: #9 Replaced the RFC to HTML converter with a brand new RFC-compliant convert! (thanks to @fadeyev!)
  • v6.0.0, v1.3.0: #14 Dependency problem with Java9+, missing Jakarta Activation Framework
  • v6.0.0, v1.3.0: #13 HTML start tags with extra space not handled correctly
  • v6.0.0, v1.3.0: #11 SimpleRTF2HTMLConverter inserts too many 
    tags
  • v6.0.0, v1.3.0: #10 Embedded images with DOS-like names are classified as attachments
  • v6.0.0, v1.3.0: #9 SimpleRTF2HTMLConverter removes some valid tags during conversion
  • v6.0.0, v1.2.1: Ignore non S/MIME related content types when extracting S/MIME metadata
  • v6.0.0, v1.2.1: Added toString and equals methods to the S/MIME data classes
  • v6.0.0, v1.1.21: Upgraded mediatype recognition based on file extension for incomplete attachments
  • v6.0.0, v1.1.21: Added / improved support for public S/MIME meta data
  • v6.0.0, v1.1.20: #7 Fix missing S/MIME header details that are needed to determine the type of S/MIME application
  • v6.0.0, v1.1.19: Log rtf compression error, but otherwise ignore it and keep going and extract what we can.

A big shout out to @dnault (runtime javadoc), @remkop (picocli) and @markenwerk (S/MIME and DKIM) for working with me to make the libraries work with JDK7+ and do what Simple Java Mail needed! Finally a great many thanks the numerous contributors on Simple Java Mail as well as outlook-message-parser - this release would not be there without you.

v5.5.0 - v5.5.1

  • v5.5.1 (20-October-2019): #230 Bugfix: Missing address value in address headers (ie. Return-Path) not handled properly, resulting in Exception
  • v5.5.0 (15-October-2019): #229 Bugfix: Timeouts not working for synchronous sendMail calls.

If you had connection properties configured for non-async send jobs, only now they will actually start to take effect.

v5.4.0 (28-August-2019)

  • #221 API bugfix: server identity verification should not be tied to host trusting
  • #226 Bug fix: Attachments with spaces in name are not handled properly
  • #218 Enhancement: make Email serializable
  • #227 Enhancement: Make parsing recipients from EML file more lenient
  • #225 Enhancement: Clarify dependency on Jakarta Activation: DataSources no longer work on Java 9+

v5.3.0 (16-August-2019)

  • #215 Bug: Current DKIM header canonicalization can lead to invalid DKIM

Note this release should have no impact, but nonetheless is a minor update so you can determine for yourself if this update would cause issues. The release changes DKIM header canonicalization from SIMPLE to RELAXED.

v5.2.1 (16-August-2019)

  • #219 Bug: MimeMessageParser rejects attachments with duplicate names

v5.2.0 (7-July-2019)

  • #213 Update from javax.mail:1.6.0 to jakarta.mail:1.6.3

Note that dependencies that switched as well have been updated as part of this change. This includes the optional DKIM library and the email validation library:

  • net.markenwerk:utils-mail-dkim (1.1.10 -> 1.2.0)
  • com.github.bbottema:emailaddress-rfc2822 (1.1.2 -> 2.1.3)

v5.1.1 - v5.1.7

  • v5.1.7 (22-May-2019): #171 Header validation tripping on known safe emails due to References header
  • v5.1.6 (27-April-2019): #204 A Concurrent exception when an async process starts when the previous connection pool didn't shutdown in time
  • v5.1.6 (27-April-2019): #204 B Exceptions in threads are now caught and logged and don't bubble up anymore. Note that more comprehensive exception handling will be available in 6.0.0 (#148).
  • v5.1.5 (24-April-2019): #202 Fixed ConcurrentModificationException when moving invalid embedded images as regular attachments
  • v5.1.4 (5-April-2019): #163 Fixed missing mimetype for attachments when parsing Outlook messages where mimeTag was not included
  • v5.1.3 (15-Januari-2019): Updated to newer rfc-validator version, which fixed a regression bug in that library
  • v5.1.2 (9-Januari-2019): #189 Bugfix for missing timeout config for .testConnection() function
  • v5.1.1 (22-December-2018): #190 Fix for transitive dependency clash because of emailaddress-rfc2822 library

v5.1.0 (21-November-2018)

  • #179 You can now test the connection to the SMTP server

v5.0.1 - v5.0.8

  • v5.0.8 (27-Oktober-2018): #178 Fix the annoying vulnerability Github report about spring-core
  • v5.0.7 (27-Oktober-2018): #175 Attachment names are not always parsed properly from MimeMessage
  • v5.0.6 (3-Oktober-2018): #167 Email addresses validated despite cleared validation validation criteria
  • v5.0.5 (3-Oktober-2018): #137 When replying to an email with HTML, the result body is empty
  • v5.0.4 (22-September-2018): #168 Properties aquired through ConfigLoader should be typed explicitly and converted if necessary
  • v5.0.3 (11-April-2018): #136 ServerConfig class should be public API
  • v5.0.2 (7-April-2018): #135 trustingAllHosts should be public on the Builder API
  • v5.0.2 (7-April-2018): #131 NamedDataSource should implement EncodingAware
  • v5.0.1 (10-March-2018): #130 java.lang.ClassNotFoundException: net.markenwerk.utils.mail.dkim.DkimMessage. Solves the issue of missing optional class DKIM even when not used

v5.0.0 (14-Februari-2018)

Also see the migration notes

New features

  • #116 You can now test the connection to the SMTP server
  • #115 Create mailers with a very robust MailerBuilder API, able to ignore defaults as well
  • #114 Create emails with a very robust EmailBuilder API, able to ignore defaults as well. Now includes support for InternetAddress. Also copy emails.
  • #107 You can now easily forward or reply to emails!

Security updates

  • #111 Protocol properties for SMTPS are now applied properly
  • #105 SMTP tries to upgrade to TLS while SMTP_TLS now enforces it and for both SMTP_TLS and SMTPS, mail.smtp.ssl.checkserveridentity is set to true

Maintenance updates

Complete Javadoc overhaul. Navigating the Javadoc should be much more consistent now (builder API being the single public source of truth).

  • #122 The email-rfc2822-validator library has been made a proper Maven dependency (not packaged along anymore)
  • #120 The DKIM library has been made an optional proper Maven dependency (not packaged along anymore)
  • #119 Switched optional Spring dependency version to property and now testing with 4.3.11.RELEASE
  • #113 Updated the underlying JavaMail to 1.6.0

Bugfixes

  • #110 Trusted hosts should be space-delimited
  • #109 Email headers should be allowed to be empty (now conversion errors can occur as well)
  • #103 Converting to MimeMessage results in an invalid Content-Disposition for attachments

v4.4.5 (2-September-2017)

  • #101 API backwards compatibility update, reinstate old addRecipient API as deprecated (sorry for removing it abruptly)

v4.4.4 (23-August-2017)

API usability release. This relase streamlined the recipient setters, breaking backwards compatibility (but straightforward to fix)

  • #95 Feature: Add support native API for setting Return-Receipt-To header
  • #93 Feature: Add support native API for setting Disposition-Notification-To header
  • #91 Feature: Add support for parsing preformatted email addresses that include both name and address
  • #94 Bugfix: A single EmailBuilder would build emails that all share the same collections for recipients, attachments and embedded images
  • #98 Bugfix: Subject and body content should be optional

v4.3.0 (12-August-2017)

Security and timeout release.

This version safeguards against SMTP injection attack from external values entering the library through Email instance. Also, this release introduces default/configurable timeouts for connecting, reading and writing when sending an email.

  • #89 Support multiple delimited recipient addresses sharing the same TO/CC/BCC name
  • #88 Safeguard subject property (and others) against SMTP CRLF injection attacks
  • #85 Apply configurable timeouts when sending emails
  • #83 Parse INLINE attachments without ID as regular attachments when converting (mostly applicable to Apple emails)

v4.2.3 (21-May-2017)

#79: Enhancement: define custom message ID on the Email object

#74: v4.2.3-java-6-release: A java6 version with limited capabilities: I've released a customised java6 release with a customised outlook-message-parser 1.1.16-java6-release. This is the last java6 release I will do, as it is simply too much manual labor to create a limited second edition.

For this edition, I've removed the JDK7 Phaser completely which has the following consequences:

  • If authenticated proxy is used, the bridging proxy server will not be shut down automatically (and might not run the second time)
  • If mails are sent in async mode, the connection pool will not be shut down anymore by itself

v4.2.2 (10-May-2017)

  • #73: Patch: fix for sending emails in async mode, which makes sure the connection pool is always closed when the last known email has been sent. Without this fix, the connection pool keeps any parent process running (main thread or Tomcat for example) until a hard kill.

v4.2.1 (12-Feb-2017)

Patch: streamlined convenience methods for adding recipients.

v4.2.0 (12-Feb-2017)

Major feature: Using the EmailConverter you can now convert between Outlook .msg, EML, MimeMessage and Email!

  • #66: Feature: convert email to EML
  • #65: Feature: read outlook messages from .msg file
  • #64: Feature: Added support for logging-only mode that skips the actual sending of emails
  • #63: Feature: Already including in previous patch update: Spring support (read properties from Spring context)
  • #69: Enhancement: Expanded EmailBuilder API to inlude more options for setting (multiple) recipients
  • #70: Enhancement: Most public API now have defensive null-checks for required fields (Fail Fast support)
  • #68: Bugfix: Name should be required for embedded images (added safeguards)
  • #67: Bugfix: Error when name was omitted for attachment
  • minor: added methods on AttachmentResource that reads back the content as (encoded) String
  • other: internal testing is now done using Wiser SMTP test server for testing live sending emails

Note: Starting this release, there will always be a Java6 compatible release as well versioned: "x.y.z-java6-release"

v4.1.3 (28-Jan-2017)

  • #61: Feature: Add support for providing your own Properties object
  • #63: Feature: Spring support (read properties from Spring context)
  • #58: Bugfix: Add support for non-English attachment and embedded image names
  • #62: Bugfix: Empty properties loaded from config should be considered null

NOTE: ConfigLoader moved from /internal/util to /util

v4.1.2 (07-Nov-2016)

  • #52: bug fix for windows / linux disparity when checking socket status
  • #56: bug fix for IOException when signing dkim with a File reference

v4.1.1 (30-Jul-2016)

  • #50: bug fix for manual naming datasources

v4.1.0 (22-Jul-2016)

  • #48: Added programmatic support trusting hosts for SSL connections
  • #47: Honor given names, deduce extension from datasource name, and more robust support for parsing mimemessages

v4.0.0 (05-Jul-2016)

  • #41: added support for fast parallel batch processing
  • #42: added support for config files
  • #43: removed logging implementation dependencies from distribution and documented various sample configs
  • #39: simplified and renamed packages to reflect the domain name of the new website: simplejavamail.org
  • #38: added support for anonymous proxy
  • #38: added support for authenticated proxy

NOTE: All packages have been renamed to "org.simplejavamail.(..)" NOTE: Switched to Java 7

v3.1.1 (11-May-2016)

Major feature: DKIM support!

  • #36: Added proper toString and equals methods for the Email classes
  • #33: Added support for DKIM domain key signing

NOTE: this is the last release still using Java 6. Next release will be using Java 7. /edit: starting with 4.2.0 every release will now have a "x.y.z-java6-release" release as well

v3.0.2 (07-May-2016)

  • #35: added proper .equals() and .toString() methods
  • #34: Fixed bug when disposition is missing (assume it is an attachment)
  • other: added findbugs support internally

v3.0.1 (29-Feb-2016)

  • #31: Fixed EmailAddressCriteria.DEFAULT and clarified Javadoc

v3.0.0 (26-Feb-2016)

  • #30: Improved the demonstration class to include attachments and embedded images
  • #29: The package has been restructured for future maintenance, breaking backwards compatibility
  • #28: Re-added improved email validation facility
  • #22: Added conversion to and from MimeMessage. You can now consume and produce MimeMessage objects with simple-java-mail

v2.5.1 (19-Jan-2016)

  • #25: Added finally clause that will always close socket properly in case of an exception

v2.5 (19-Jan-2016)

  • #24: Updated dependencies SLF4J to 1.7.13 and switched to the updated javax mail package com.sun.mail:javax.mail 1.5.5

v2.4 (12-Aug-2015)

  • #21: builder API uses CC and BCC recipient types incorrectly

v2.3 (21-Jul-2015)

  • #19: supporting custom Session Properties now and emergency access to internal Session object.

v2.2 (09-May-2015)

  • #3: turned off email regex validation by default, with the option to turn it back on
  • #7: fixed NullPointerException when using your own Session instance
  • #10: properly UTF-8 encode recipient addresses
  • #14: switched to SLF4J, so you can easily use your own selected logging framework
  • #17: Added fluent interface for building emails (see here for an example)

v2.1 (09-Aug-2012)

  • fixed character encoding for reply-to, from, to, body text and headers (to UTF-8)
  • fixed bug where Recipient was not public resulting in uncompilable code when calling email.getRecipients()

v2.0 (20-Aug-2011)

  • added support for adding open headers, such as 'X-Priority: 2'

v1.9.1 (08-Aug-2011)

  • updated for Maven support

v1.9 (6-Aug-2011)

  • added support for JavaMail's reply-to address
  • made port optional as to support port defaulting based on protocol
  • added transport strategy default in the createSession method
  • tightened up thrown exceptions (MailException instead of RuntimeException)
  • added and fixed Javadoc

v1.8

  • Added support for TLS (tested with gmail)

v1.7 (22-Mar-2011)

Added support for SSL! (tested with gmail)

  • improved argument validation when creating a Mailer without preconfigured Session instance

known possible issue: SSL self-signed certificates might not work (yet). Please let me know by e-mail or create a new issue

v1.6

Completed migration to Java Simple Mail project.

  • removed all Vesijama references
  • updated TestMail demonstration class for clarification
  • updated readme.txt for test run instructions
  • included log4j.properties

v1.4 (15-Jan-2011)

vX.X (26-Apr-2009)

  • Initial upload to Google Code.

Download Details:
Author: bbottema
Source Code: https://github.com/bbottema/simple-java-mail
License:

#java