Budget (airline) wedding: Couple gets married on Jetstar flight
by Lorna ThornberWhen a trans-Tasman couple couldn't decide on where to get married, they came up with an innovative compromise, tying the knot on a flight midway across the ditch.
Kiwi Cathy Valliant met her now-husband David, an Australian, playing a game called Airport City online.
"Our love of aviation is what brought us together," she says. "We chatted for more than a year and then I got up the courage to call him for his birthday and sing him happy birthday. It just evolved from there."
They first met in person in 2013 when Cathy made her first trip to Australia and, she says, it was literally love at first sight.
"We locked eyes and that was it!"
David planned to propose on a flight from Brisbane to Melbourne some three years later, but his nerves got the better of him, and so he waited until they were alone in the evening instead.
Cathy says they wanted their wedding to "symbolise our love for aviation, our love for Australia and New Zealand and our love for each other. I thought: I'll be cheeky and ask Jetstar. Without telling Dave, I posted on Jetstar's Facebook page with the ask."
Fortunately, the airline came to the party, arranging for the couple and their wedding party to sit at the front of a flight from Sydney to Auckland.
Jetstar employee Robyn Holt, who is also a marriage celebrant, wed the couple at 37,000 feet (10,000 metres) above the Tasman Sea. The marriage will be legally recognised in Australia.
One has to wonder though: Is the entire wedding party accompanying the couple on their honeymoon?
"It was the most amazing experience and something we will remember for the rest of our lives," Cathy says.
"I wish I'd met David 25 years ago. I feel our lives really started when we met... We definitely love planes. We even have a rule that whoever sees the first commercial flight on any day doesn't cook!"


Ruby blocks are a fundemental aspect of the Ruby programming language. Blocks are a chunk of code denoted by the
["b","d","f"].each { |x| p "Letter: #{x}" }
One way to create a method that uses a block is to work with the yield statement to pass it a block:
def block_test
puts "Hi, this is from the method!"
yield
puts "Hello, again, from the method!"
end
block_test { puts "Hello from the block!"}
Hi, this is from the method!
Hello from the block!
Hello, again, from the method!
The output of the block_test method shows how the yield statement inserts the code block into the method, when you call the method with a code block. The same method can be rewritten and output the same thing by inserting a block as an argument to the block_test method. You use the & sign to do this:
def block_test(&block)
puts "Hi, this is from the method!"
block.call
puts "Hello, again, from the method!"
end
block_test { puts "Hello from the block!"}
Hi, this is from the method!
Hello from the block!
Hello, again, from the method!
The output for this method that use &block as a parameter is the same as the one above that uses the yield statement. By using the call method on block, we are able to pass a piece of code into this method. It's important to keep in mind that a block parameter can only be used once in a method's argument list.
Unlike blocks, Procs are objects, specifically a class object, and are able to store a chunk of code that can be used over and over again. Because Procs are objects you can store them in a variable and call methods on it.
example_proc = Proc.new {puts "This is my example proc!"}
example_proc.call
This is my example proc!
I can use this example_proc variable as an argument in a method:
def a_method(proc)
proc.call
end
example_proc = Proc.new {puts "This is my example proc!"}
a_method(example_proc)
This is my example proc!
Lambdas are a type of Proc, but they differ in two primary ways. First, Lambdas require the exact number of arguments within it to be passed to it, when it is called, whereas Procs do not care how many arguments you pass to it. Procs can be passed zero arguments, even when it has arguments within it. If you try to call a Lambda without a needed argument, you will get an error. If you call a Proc without an argument, no error will occur.
lambda_var = lambda { |x, y| puts "#{x} plus #{y} equals #{x + y}" }
lambda_var.call
lambda_var.call(7, 3)
ArgumentError: wrong number of arguments (0 for 2)
7 plus 3 equals 10
The first call to lambda_var returns an ArgumentError. The second call returns the string with the 7 and 3 arguments passed through correctly.
proc_var = Proc.new { |x, y| puts "#{x} and #{y} are numbers" }
proc_var.call
proc_var.call(4,5,6)
proc_var.call(1)
and are numbers
4 and 5 are numbers
1 and are numbers
As we can see from the output above, Procs do not throw up and error is the incorrect number of arguments are passed. In our example we see how a Proc leaves the space where the arugument would be either blank if there aren't enough arguments or drops off any extra arguments.
The second primary way Lambdas and Procs differ is how they use return in a method. For example:
def proc_return
p = Proc.new {return "Hi!"}
p.call
return "What's up?!"
end
def lam_return
l = lambda {return "Hi!"}
l.call
return "What's up?!"
end
proc_return
"Hi!"
lam_return
"What's up?!"
Above I created two methods that are identical in almost every way except the first use a Proc and the second uses a Lambda. When each of the methods is called, we see how the return works differently in a method that uses either a Proc or a Lambda. For a Proc the return value is what is inside of the Proc's code block. For a Lambda the return value is the last line of the method. The method that uses the Lambda skips returning value in the Lambda code block and instead returns the value of the method.


Hyper Drumming by KenOne (Originally Invented by Q-bert) Dec 2nd, 2013 http://instagram.com/p/hV3b-ZE1Ax/ by djkenone http://instagram.com/p/hV4fsvE1Cb/ by djkenone
2Click Flare 応用編 by KenOne Dec 2nd, 2013 http://instagram.com/p/hZgcMdk1B-/ by djkenone http://instagram.com/p/hZhC4bE1DA/ by djkenone


KPI Editor
Executions
Dashboard
Aggregations
REGRESSION
Software Issues
Issue Count
PROGRESSION
Software Issues
Issue Count
SANITY
Software Issues
Issue Count


Parul ShahFounder and CEO of Homemade Delights This Is Parul Shah And I am 47 years old. |
| Year | Work |
|---|---|
| 2020 | Start Of Business |
| 2021 | Eventual Growth of The Business |
| 2022 | Expanding The Business |
| Name | Rating |
|---|---|
| Shashwat Shah | ★★★★★ |
| Nimesh Shah | ★★★★★ |
| Neshvi Shah | ★★★ |
| Harsh Shah | ★★★★ |


Menu
Welcome to Skyser !
Sign Up
Email
Password
First Name
Last Name
Billing Information
Phone Number
Home Address


Toggle navigation
MTR Datepicker
Demo
Docs
GitHub
Demo
Customize the datepicker
Only future dates
Smart AM/PM swithing
Customize Minutes
Min:
Max:
Step:
Customize Months
Min:
Max:
Step:
Customize Years
Min:
Max:
Step:
More customizable demo
Export formats


Parse a passwd file into a list of users.
Install with npm:
$ npm install --save parse-passwd
var parse = require('parse-passwd');
Example
// assuming '/etc/passwd' contains:
// doowb:*:123:123:Brian Woodward:/Users/doowb:/bin/bash
console.log(parse(fs.readFileSync('/etc/passwd', 'utf8')));
//=> [
//=> {
//=> username: 'doowb',
//=> password: '*',
//=> uid: '123',
//=> gid: '123',
//=> gecos: 'Brian Woodward',
//=> homedir: '/Users/doowb',
//=> shell: '/bin/bash'
//=> }
//=> ]
Params
content
{String}: Content of a passwd file to parse.returns
{Array}: Array of user objects parsed from the content.Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for avice on opening issues, pull requests, and coding standards.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
$ npm install -d && npm test
Brian Woodward
Copyright © 2016, Brian Woodward. Released under the MIT license.
This file was generated by verb-generate-readme, v0.2.0, on October 19, 2016.


Graham Norton to host 2020 BAFTA Awards
by Ciara WalshGraham Norton has been given a big new hosting gig.
Graham Norton has landed a huge new gig as host of the BAFTA Film Awards next year.
The TV chat show host will take over duties from Joanna Lumley for the 2020 ceremony on February 2, having overseen the event semi-regularly for the past 15 years.
Lumley has hosted for the past two years after taking over from regular presenter Stephen Fry in 2018.
"I'm delighted to be taking the helm of the biggest night in British Film, the audience at the Royal Albert Hall will be the biggest sofa I've ever faced," Graham told Bafta.org. "I'm honoured to be following in the fabulous footsteps of Stephen Fry and Joanna Lumley."
Chief Executive of BAFTA, Amanda Berry, added: "I am absolutely delighted that Graham Norton will host the EE British Academy Film Awards on Sunday February 2, 2020.
"He will bring his brilliance and unique brand of humour to the role. The Film Awards is transmitted around the world, and those audiences know him too."
Amanda added: "With Graham as our host I have no doubt we will deliver a very special celebration of the very best in film, and pay tribute to the most talented and creative people both in front of and behind the camera."
Graham is, of course, best known for his BBC One chat show, though admitted ahead of the latest season that he still had doubts about himself.
"I always get excited about returning to the chat show," he said. "Each time there's a slight sense of, 'Ooh can I still do this?'  There's a reason I've been doing it so long'. It's good to remind yourself of that occasionally."
Nominations for the 2020 BAFTA awards will be revealed on January 7, 2020, with the ceremony taking place on February 2.


Golden Tribute BlogSpot
by Shamika Fox
Posted on June 13, 2016 at 7:42 AM
Why is that when we are so close we tend to give up?
Success is the only option, we can not make excuses after excuses trying to justify our actions. We ust thrive for the accomplishments of our goals, we can not repeat the cycle of family memebers who did not graduate with Bachelors, Masters, and Doctoral degrees.
I've learned the hard way that success does not fall out of the great blue sky. If you want something you must make it a priority, you will make mistakes, it will be hard, but thats why pencils have erasers.
Excuses are as followed, excuses are the tools for the weak and incompetent which builds bridges to no where and monuments of nothingness. So when we make an excuse we are showing that we are not strong enough to hold on the massive force of work, then we give up.
You have to keep going because miracles happen the very moment you are about to give up.


|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rosehulman.soar.editor.soar.SoarCodeScanner
The SoarCodeScanner finds keywords and other attributes in a Soar code document as it is edited by the user. It makes use of the Soar parsing code of VisualSoar, written by Brad Jones using JavaCC and compiled into Java classes which have now been included in the edu.rosehulman.soar.editor tree.
| Nested Class Summary | |
private class |
SoarCodeScanner.SoarToken
|
| Field Summary | |
private SoarCodeScanner.SoarToken |
_currentToken
|
private IDocument |
_document
|
private int |
_documentStartLine
|
private IToken |
_identifier
|
private IToken |
_keyword
|
private SoarCodeScanner.SoarToken |
_lastToken
|
private IToken |
_name
|
private IToken |
_number
|
private IToken |
_other
|
private ColorProvider |
_provider
|
private int |
_tokenIndex
|
private java.util.List |
_tokenList
|
private SoarParserTokenManager |
_tokenMgr
|
private IToken |
_variable
|
| Constructor Summary | |
SoarCodeScanner()
Creates a code scanner which uses the Soar parsing implementaion provided by Brad Jones in VisualSoar to create Eclipse-style tokens, which can be used to manipulate the document. |
| Method Summary | |
int |
getTokenLength()
Returns the length of the last token read by this scanner. |
int |
getTokenOffset()
Returns the offset of the last token read by this scanner. |
IToken |
nextToken()
Returns the next token in the document. |
private SoarCodeScanner.SoarToken |
parseNextToken()
|
void |
setRange(IDocument document,
int offset,
int length)
Configures the scanner by providing access to the document range that should be scanned. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private ColorProvider _provider
private java.util.List _tokenList
private SoarCodeScanner.SoarToken _lastToken
private int _tokenIndex
private SoarCodeScanner.SoarToken _currentToken
private IDocument _document
private int _documentStartLine
private SoarParserTokenManager _tokenMgr
private IToken _keyword
private IToken _name
private IToken _number
private IToken _variable
private IToken _identifier
private IToken _other
| Constructor Detail |
public SoarCodeScanner()
| Method Detail |
public int getTokenLength()
getTokenLength
in interface ITokenScanner
ITokenScanner.getTokenLength()
public int getTokenOffset()
getTokenOffset
in interface ITokenScanner
ITokenScanner.getTokenOffset()
public IToken nextToken()
nextToken
in interface ITokenScanner
ITokenScanner.nextToken()
private SoarCodeScanner.SoarToken parseNextToken()
public void setRange(IDocument document, int offset, int length)
setRange
in interface ITokenScanner
ITokenScanner.setRange(IDocument,int,int)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Look: Game’s Manager Wack 100 Flexes Marriage Goals W/ His Wife In London
by Cyrus LanghorneRap executive Wack 100 always makes time for his day one. The hip-hop manager went online this week to give fans a sneak peek at how global his marriage goals are alongside his queen. Look and comment below!


About Us
We are Making Employer Not Employees
But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of
Our Teams
The Expert Team on ReveTive
Walter White
Chief Executive Officer
Sarah Johanson
Chief Technology Officer
Anna Anderson
Product Manager


“989. Daedalus and his nephew Talus invent the saw, the turning-lath, the wimble, the chip-ax, and other instruments of Carpenters and Joyners, and thereby give a beginning to those Arts in Europe. Daedalus also invented the making of Statues with their feet asunder, as if they walked.” — Isaac Newton, The Chronology Of Ancient Kingdoms Amended


{% extends 'base.html' %} {% load static %} {% block content %} Breast cancer Algorithms Introduction SVM KNN Random Forest Comparison About us Detector (current)


CustomShould add this category to the store. The second parameter is the value for numberOfItems. Add Category
|
Items:List of Items to be categorized
Apple
Orange
Banana
Tomato
Pepper
Wheat
Corn
Spinach
Cucumber
Carot
Potato
Grape
Lemon
Letuce
Peanut
|
Collection Count SummaryYou can't drop items onto this tree. |
CollectionDrop items onto this tree, but only on categories, should fail to let you drop on other items. |


| Field | Type | Label | Description |
| name | string |
|
|
| value | string |
|
| Field | Type | Label | Description |
| algorithm_name | string |
|
|
| algorithm_setting | AlgorithmSetting | repeated |
|
| Field | Type | Label | Description |
| name | string |
|
|
| experiment_spec | ExperimentSpec |
|
| Field | Type | Label | Description |
| algorithm | AlgorithmSpec |
|
|
| parameter_specs | ParameterSpecs |
|
|
| objective | ObjectiveSpec |
|
| Field | Type | Label | Description |
| max | string | Max Value |
|
| min | string | Minimum Value |
|
| list | string | repeated | List of Values. |
| step | string | Step for double or int parameter |
| Field | Type | Label | Description |
| trials | Trial | repeated | trials should be created in the next run. |
| Field | Type | Label | Description |
| experiment | Experiment |
|
|
| trials | Trial | repeated | all completed trials owned by the experiment. |
| request_number | int32 |
|
| Field | Type | Label | Description |
| name | string |
|
|
| value | string |
|
| Field | Type | Label | Description |
| type | ObjectiveType |
|
|
| goal | double |
|
|
| objective_metric_name | string |
|
| Field | Type | Label | Description |
| metrics | Metric | repeated |
|
| Field | Type | Label | Description |
| name | string |
|
|
| value | string |
|
| Field | Type | Label | Description |
| assignments | ParameterAssignment | repeated |
|
| Field | Type | Label | Description |
| name | string | Name of the parameter. |
|
| parameter_type | ParameterType | Type of the parameter. |
|
| feasible_space | FeasibleSpace | FeasibleSpace for the parameter. |
| Field | Type | Label | Description |
| parameters | ParameterSpec | repeated |
|
| Field | Type | Label | Description |
| name | string |
|
|
| spec | TrialSpec |
|
|
| status | TrialStatus |
|
| Field | Type | Label | Description |
| parameter_assignments | ParameterAssignments |
|
|
| run_spec | string |
|
| Field | Type | Label | Description |
| observation | Observation | The best observation in logs. |
| Name | Number | Description |
| UNKNOWN | 0 | Undefined type and not used. |
| MINIMIZE | 1 | Minimize |
| MAXIMIZE | 2 | Maximize |
| Name | Number | Description |
| UNKNOWN_TYPE | 0 | Undefined type and not used. |
| DOUBLE | 1 | Double float type. Use "Max/Min". |
| INT | 2 | Int type. Use "Max/Min". |
| DISCRETE | 3 | Discrete number type. Use "List" as float. |
| CATEGORICAL | 4 | Categorical type. Use "List" as string. |
| Method Name | Request Type | Response Type | Description |
| GetSuggestions | GetAdvisorSuggestionsRequest | GetAdvisorSuggestionsReply |
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| double | double | double | float | |
| float | float | float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
| sfixed32 | Always four bytes. | int32 | int | int |
| sfixed64 | Always eight bytes. | int64 | long | int/long |
| bool | bool | boolean | boolean | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |


Virtual Running
Adjust Speed
Go!
Custom RunnerUpload Runner Definition File (*.vrff)
Define New Custom Runner
Name: Next
Face image: Browse...
Next
Boost
Save
Back
Speed-o-Meter
Back
HelpIn the main box, choose a runner and a course. Then, adjust the number of laps, and click "Adjust Speed" to open the Speed-o-Meter. In the Speed-o-Meter, enter a starting speed value (lower = faster, higher = slower), or select a Fast Preset or Slow Preset. Check "Blastoff Ending" for a fun finish to your last lap. Keyboard Shortcurs:
Back
Available OfflineIn modern browsers such as yours, Virtual Running is available offline! Just bookmark this page and you can access it without an internet connection. Also, if you are using Firefox (or any other browser that decides to ask), make sure to click "Allow" if it asks you if you want to let this site store data on your computer. This is required for offline access. Back
SourceVirtual Running is developed as an open-source project, licensed under a BSD-style license. The source code is available on github. Back
Distance traveled: 0 m Time elapsed: 0 Laps completed: 0 Average mile time: 0 Mile time at current pace: 0 rate:
Readying:
|


December 24, 2017
The British use the term "header", but the American term "head-shot" the English simply refuse to adopt.


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Interface Summary | |
|---|---|
| DbEncrypt | Defines DB encryption support for encrypting and decrypting data using DB encryption features. |
| DbEncryptFunction | |
| IdGenerator | Generates unique id's for objects. |
| SqlLimiter | Adds SQL limiting to a query (such as LIMIT OFFSET). |
| SqlLimitRequest | The request object for the query that can have sql limiting applied to it (such as a LIMIT OFFSET clause). |
| Class Summary | |
|---|---|
| AbstractDbEncrypt | Base type for DB platform specific Encryption. |
| DatabasePlatform | Database platform specific settings. |
| DB2Platform | DB2 specific platform. |
| DB2SequenceIdGenerator | DB2 specific sequence Id Generator. |
| DbDdlSyntax | Used to support DB specific syntax for DDL generation. |
| DbIdentity | Defines the identity/sequence behaviour for the database. |
| DbType | Represents a DB type with name, length, precision, and scale. |
| DbTypeMap | Used to map bean property types to DB specific types for DDL generation. |
| H2DbEncrypt | H2 encryption support via encrypt decrypt function. |
| H2Platform | H2 specific platform. |
| H2SequenceIdGenerator | H2 specific sequence Id Generator. |
| LimitOffsetSqlLimiter | Adds LIMIT OFFSET clauses to a SQL query. |
| MsSqlServer2000Platform | Microsoft SQL Server 2000 specific platform. |
| MsSqlServer2005Platform | Microsoft SQL Server 2005 specific platform. |
| MySqlBlob | Support for blob, mediumblob or longblob selection based on the deployment length. |
| MySqlClob | Support for text, mediumtext or longtext selection based on the deployment length. |
| MySqlDbEncrypt | MySql aes_encrypt aes_decrypt based encryption support. |
| MySqlPlatform | MySQL specific platform. |
| Oracle10DbEncrypt | Oracle encryption support. |
| Oracle10Platform | Oracle10 and greater specific platform. |
| Oracle9Platform | Since Ebean v2.2.0 Oracle9 is no different from Oracle10. |
| OracleSequenceIdGenerator | Oracle specific sequence Id Generator. |
| PostgresDbEncrypt | Postgres pgp_sym_encrypt pgp_sym_decrypt based encryption support. |
| PostgresPlatform | Postgres v8.3 specific platform. |
| PostgresSequenceIdGenerator | Postgres specific sequence Id Generator. |
| RowNumberSqlLimiter | Adds the ROW_NUMBER() OVER function to a query. |
| RownumSqlLimiter | Add ROWNUM column etc around SQL query to limit results. |
| SequenceIdGenerator | Database sequence based IdGenerator. |
| SimpleSequenceIdGenerator | A very simple Database sequence based IdGenerator. |
| SQLitePlatform | |
| SqlLimitResponse | The resulting SQL from a SqlLimit process. |
| Enum Summary | |
|---|---|
| IdType | The types of Identity generation that can be defined. |
Database platform specific support
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


CHAPTER VII
In addition to meaning work, we have stated that psychologically the word Karma also implies causation. Any work, any action, any thought that produces an effect is called a Karma. Thus the law of Karma means the law of causation, of inevitable cause and sequence. Wheresoever there is a cause, there an effect must be produced; this necessity cannot be resisted, and this law of Karma, according to our philosophy, is true throughout the whole universe. Whatever we see, or feel, or do, whatever action there is anywhere in the universe, while being the effect of past work on the one hand, becomes, on the other, a cause in its turn, and produces its own effect. It is necessary, together with this, to consider what is meant by the word "law". By law is meant the tendency of a series to repeat itself. When we see one event followed by another, or sometimes happening simultaneously with another, we expect this sequence or co-existence to recur. Our old logicians and philosophers of the Ny‚y‚ school call this law by the name of Vy‚pti. According to them, all our ideas of law are due to association. A series of phenomena becomes associated with things in our mind in a sort of invariable order, so that whatever we perceive at any time is immediately referred to other facts in the mind. Any one idea or, according to our psychology, any one wave that is produced in the mind-stuff, Chitta, must always give rise to many similar waves. This is the psychological idea of association, and causation is only an aspect of this grand pervasive principle of association. This pervasiveness of association is what is, in Sanskrit, called Vy‚pti. In the external world the idea of law is the same as in the internal — the expectation that a particular phenomenon will be followed by another, and that the series will repeat itself. Really speaking, therefore, law does not exist in nature. Practically it is an error to say that gravitation exists in the earth, or that there is any law existing objectively anywhere in nature. Law is the method, the manner in which our mind grasps a series of phenomena; it is all in the mind. Certain phenomena, happening one after another or together, and followed by the conviction of the regularity of their recurrence — thus enabling our minds to grasp the method of the whole series — constitute what we call law.
The next question for consideration is what we mean by law being universal. Our universe is that portion of existence which is characterized by what the Sanskrit psychologists call Desha-k‚la-nimitta, or what is known to European psychology as space, time, and causation. This universe is only a part of infinite existence, thrown into a peculiar mould, composed of space, time, and causation. It necessarily follows that law is possible only within this conditioned universe; beyond it there cannot be any law. When we speak of the universe, we only mean that portion of existence which is limited by our mind — the universe of the senses, which we can see, feel, touch, hear, think of, imagine. This alone is under law; but beyond it existence cannot be subject to law, because causation does not extend beyond the world of our minds. Anything beyond the range of our mind and our senses is not bound by the law of causation, as there is no mental association of things in the region beyond the senses, and no causation without association of ideas. It is only when "being'' or existence gets moulded into name and form that it obeys the law of causation, and is said to be under law; because all law has its essence in causation. Therefore we see at once that there cannot be any such thing as free will; the very words are a contradiction, because will is what we know, and everything that we know is within our universe, and everything within our universe is moulded by the conditions of space, time, and causation. Everything that we know, or can possibly know, must be subject to causation, and that which obeys the law of causation cannot be free. It is acted upon by other agents, and becomes a cause in its turn. But that which has become converted into the will, which was not the will before, but which, when it fell into this mould of space, time, and causation, became converted into the human will, is free; and when this will gets out of this mould of space, time, and causation, it will be free again. From freedom it comes, and becomes moulded into this bondage, and it gets out and goes back to freedom again.
The question has been raised as to from whom this universe comes, in whom it rests, and to whom it goes; and the answer has been given that from freedom it comes, in bondage it rests, and goes back into that freedom again. So, when we speak of man as no other than that infinite being which is manifesting itself, we mean that only one very small part thereof is man; this body and this mind which we see are only one part of the whole, only one spot of the infinite being. This whole universe is only one speck of the infinite being; and all our laws, our bondages, our joys and our sorrows, our happinesses and our expectations, are only within this small universe; all our progression and digression are within its small compass. So you see how childish it is to expect a continuation of this universe — the creation of our minds — and to expect to go to heaven, which after all must mean only a repetition of this world that we know. You see at once that it is an impossible and childish desire to make the whole of infinite existence conform to the limited and conditioned existence which we know. When a man says that he will have again and again this same thing which he is hating now, or, as I sometimes put it, when he asks for a comfortable religion, you may know that he has become so degenerate that he cannot think of anything higher than what he is now; he is just his little present surroundings and nothing more. He has forgotten his infinite nature, and his whole idea is confined to these little joys, and sorrows, and heart-jealousies of the moment. He thinks that this finite thing is the infinite; and not only so, he will not let this foolishness go. He clings on desperately unto Trishn‚, and the thirst after life, what the Buddhists call Tanh‚ and Tiss‚. There may be millions of kinds of happiness, and beings, and laws, and progress, and causation, all acting outside the little universe that we know; and, after all, the whole of this comprises but one section of our infinite nature.
To acquire freedom we have to get beyond the limitations of this universe; it cannot be found here. Perfect equilibrium, or what the Christians call the peace that passeth all understanding, cannot be had in this universe, nor in heaven, nor in any place where our mind and thoughts can go, where the senses can feel, or which the imagination can conceive. No such place can give us that freedom, because all such places would be within our universe, and it is limited by space, time, and causation. There may be places that are more ethereal than this earth of ours, where enjoyments may be keener, but even those places must be in the universe and, therefore, in bondage to law; so we have to go beyond, and real religion begins where this little universe ends. These little joys, and sorrows, and knowledge of things end there, and the reality begins. Until we give up the thirst after life, the strong attachment to this our transient conditioned existence we have no hope of catching even a glimpse of that infinite freedom beyond. It stands to reason then that there is only one way to attain to that freedom which is the goal of all the noblest aspirations of mankind, and that is by giving up this little life, giving up this little universe, giving up this earth, giving up heaven, giving up the body, giving up the mind, giving up everything that is limited and conditioned. If we give up our attachment to this little universe of the senses or of the mind, we shall be free immediately. The only way to come out of bondage is to go beyond the limitations of law, to go beyond causation.
But it is a most difficult thing to give up the clinging to this universe; few ever attain to that. There are two ways to do that mentioned in our books. One is called the "Neti, Neti" (not this, not this), the other is called "Iti" (this); the former is the negative, and the latter is the positive way. The negative way is the most difficult. It is only possible to the men of the very highest, exceptional minds and gigantic wills who simply stand up and say, "No, I will not have this," and the mind and body obey their will, and they come out successful. But such people are very rare. The vast majority of mankind choose the positive way, the way through the world, making use of all the bondages themselves to break those very bondages. This is also a kind of giving up; only it is done slowly and gradually, by knowing things, enjoying things and thus obtaining experience, and knowing the nature of things until the mind lets them all go at last and becomes unattached. The former way of obtaining non-attachment is by reasoning, and the latter way is through work and experience. The first is the path of Jn‚na-Yoga, and is characterized by the refusal to do any work; the second is that of Karma-Yoga, in which there is no cessation from work. Every one must work in the universe. Only those who are perfectly satisfied with the Self, whose desires do not go beyond the Self, whose mind never strays out of the Self, to whom the Self is all in all, only those do not work. The rest must work. A current rushing down of its own nature falls into a hollow and makes a whirlpool, and, after running a little in that whirlpool, it emerges again in the form of the free current to go on unchecked. Each human life is like that current. It gets into the whirl, gets involved in this world of space, time, and causation, whirls round a little, crying out, "my father, my brother, my name, my fame", and so on, and at last emerges out of it and regains its original freedom. The whole universe is doing that. Whether we know it or not, whether we are conscious or unconscious of it, we are all working to get out of the dream of the world. Man's experience in the world is to enable him to get out of its whirlpool.
What is Karma-Yoga? The knowledge of the secret of work. We see that the whole universe is working. For what? For salvation, for liberty; from the atom to the highest being, working for the one end, liberty for the mind, for the body, for the spirit. All things are always trying to get freedom, flying away from bondage. The sun, the moon, the earth, the planets, all are trying to fly away from bondage. The centrifugal and the centripetal forces of nature are indeed typical of our universe. Instead of being knocked about in this universe, and after long delay and thrashing, getting to know things as they are, we learn from Karma-Yoga the secret of work, the method of work, the organising power of work. A vast mass of energy may be spent in vain if we do not know how to utilise it. Karma-Yoga makes a science of work; you learn by it how best to utilise all the workings of this world. Work is inevitable, it must be so; but we should work to the highest purpose. Karma-Yoga makes us admit that this world is a world of five minutes, that it is a something we have to pass through; and that freedom is not here, but is only to be found beyond. To find the way out of the bondages of the world we have to go through it slowly and surely. There may be those exceptional persons about whom I just spoke, those who can stand aside and give up the world, as a snake casts off its skin and stands aside and looks at it. There are no doubt these exceptional beings; but the rest of mankind have to go slowly through the world of work. Karma-Yoga shows the process, the secret, and the method of doing it to the best advantage.
What does it say? "Work incessantly, but give up all attachment to work." Do not identify yourself with anything. Hold your mind free. All this that you see, the pains and the miseries, are but the necessary conditions of this world; poverty and wealth and happiness are but momentary; they do not belong to our real nature at all. Our nature is far beyond misery and happiness, beyond every object of the senses, beyond the imagination; and yet we must go on working all the time. "Misery comes through attachment, not through work." As soon as we identify ourselves with the work we do, we feel miserable; but if we do not identify ourselves with it, we do not feel that misery. If a beautiful picture belonging to another is burnt, a man does not generally become miserable; but when his own picture is burnt, how miserable he feels! Why? Both were beautiful pictures, perhaps copies of the same original; but in one case very much more misery is felt than in the other. It is because in one case he identifies himself with the picture, and not in the other. This "I and mine" causes the whole misery. With the sense of possession comes selfishness, and selfishness brings on misery. Every act of selfishness or thought of selfishness makes us attached to something, and immediately we are made slaves. Each wave in the Chitta that says "I and mine" immediately puts a chain round us and makes us slaves; and the more we say "I and mine", the more slavery grows, the more misery increases. Therefore Karma-Yoga tells us to enjoy the beauty of all the pictures in the world, but not to identify ourselves with any of them. Never say "mine". Whenever we say a thing is "mine", misery will immediately come. Do not even say "my child" in your mind. Possess the child, but do not say "mine". If you do, then will come the misery. Do not say “my house," do not say "my body". The whole difficulty is there. The body is neither yours, nor mine, nor anybody's. These bodies are coming and going by the laws of nature, but we are free, standing as witness. This body is no more free than a picture or a wall. Why should we be attached so much to a body? If somebody paints a picture, he does it and passes on. Do not project that tentacle of selfishness, "I must possess it". As soon as that is projected, misery will begin.
So Karma-Yoga says, first destroy the tendency to project this tentacle of selfishness, and when you have the power of checking it, hold it in and do not allow the mind to get into the ways of selfishness. Then you may go out into the world and work as much as you can. Mix everywhere, go where you please; you will never be contaminated with evil. There is the lotus leaf in the water; the water cannot touch and adhere to it; so will you be in the world. This is called "Vair‚gya", dispassion or non-attachment. I believe I have told you that without non-attachment there cannot be any kind of Yoga. Non-attachment is the basis of all the Yogas. The man who gives up living in houses, wearing fine clothes, and eating good food, and goes into the desert, may be a most attached person. His only possession, his own body, may become everything to him; and as he lives he will be simply struggling for the sake of his body. Non-attachment does not mean anything that we may do in relation to our external body, it is all in the mind. The binding link of "I and mine" is in the mind. If we have not this link with the body and with the things of the senses, we are non-attached, wherever and whatever we may be. A man may be on a throne and perfectly non-attached; another man may be in rags and still very much attached. First, we have to attain this state of non-attachment and then to work incessantly. Karma-Yoga gives us the method that will help us in giving up all attachment, though it is indeed very hard.
Here are the two ways of giving up all attachment. The one is for those who do not believe in God, or in any outside help. They are left to their own devices; they have simply to work with their own will, with the powers of their mind and discrimination, saying, "I must be non-attached". For those who believe in God there is another way, which is much less difficult. They give up the fruits of work unto the Lord; they work and are never attached to the results. Whatever they see, feel, hear, or do, is for Him. For whatever good work we may do, let us not claim any praise or benefit. It is the Lord’s; give up the fruits unto Him. Let us stand aside and think that we are only servants obeying the Lord, our Master, and that every impulse for action comes from Him every moment. Whatever thou worshippest, whatever thou perceivest, whatever thou doest, give up all unto Him and be at rest. Let us be at peace, perfect peace, with ourselves, and give up our whole body and mind and everything as an eternal sacrifice unto the Lord. Instead of the sacrifice of pouring oblations into the fire, perform this one great sacrifice day and night — the sacrifice of your little self. "In search of wealth in this world, Thou art the only wealth I have found; I sacrifice myself unto Thee. In search of some one to be loved, Thou art the only one beloved I have found; I sacrifice myself unto Thee." Let us repeat this day and night, and say, "Nothing for me; no matter whether the thing is good, bad, or indifferent; I do not care for it; I sacrifice all unto Thee." Day and night let us renounce our seeming self until it becomes a habit with us to do so, until it gets into the blood, the nerves, and the brain, and the whole body is every moment obedient to this idea of self-renunciation. Go then into the midst of the battlefield, with the roaring cannon and the din of war, and you will find yourself to be free and at peace.
Karma-Yoga teaches us that the ordinary idea of duty is on the lower plane; nevertheless, all of us have to do our duty. Yet we may see that this peculiar sense of duty is very often a great cause of misery. Duty becomes a disease with us; it drags us ever forward. It catches hold of us and makes our whole life miserable. It is the bane of human life. This duty, this idea of duty is the midday summer sun which scorches the innermost soul of mankind. Look at those poor slaves to duty! Duty leaves them no time to say prayers, no time to bathe. Duty is ever on them. They go out and work. Duty is on them! They come home and think of the work for the next day. Duty is on them! It is living a slave's life, at last dropping down in the street and dying in harness, like a horse. This is duty as it is understood. The only true duty is to be unattached and to work as free beings, to give up all work unto God. All our duties are His. Blessed are we that we are ordered out here. We serve our time; whether we do it ill or well, who knows? If we do it well, we do not get the fruits. If we do it ill, neither do we get the care. Be at rest, be free, and work. This kind of freedom is a very hard thing to attain. How easy it is to interpret slavery as duty — the morbid attachment of flesh for flesh as duty! Men go out into the world and struggle and fight for money or for any other thing to which they get attached. Ask them why they do it. They say, "It is a duty”. It is the absurd greed for gold and gain, and they try to cover it with a few flowers.
What is duty after all? It is really the impulsion of the flesh, of our attachment; and when an attachment has become established, we call it duty. For instance, in countries where there is no marriage, there is no duty between husband and wife; when marriage comes, husband and wife live together on account of attachment; and that kind of living together becomes settled after generations; and when it becomes so settled, it becomes a duty. It is, so to say, a sort of chronic disease. When it is acute, we call it disease; when it is chronic, we call it nature. It is a disease. So when attachment becomes chronic, we baptise it with the high sounding name of duty. We strew flowers upon it, trumpets sound for it, sacred texts are said over it, and then the whole world fights, and men earnestly rob each other for this duty's sake. Duty is good to the extent that it checks brutality. To the lowest kinds of men, who cannot have any other ideal, it is of some good; but those who want to be Karma-Yogis must throw this idea of duty overboard. There is no duty for you and me. Whatever you have to give to the world, do give by all means, but not as a duty. Do not take any thought of that. Be not compelled. Why should you be compelled? Everything that you do under compulsion goes to build up attachment. Why should you have any duty? Resign everything unto God. In this tremendous fiery furnace where the fire of duty scorches everybody, drink this cup of nectar and be happy. We are all simply working out His will, and have nothing to do with rewards and punishments. If you want the reward, you must also have the punishment; the only way to get out of the punishment is to give up the reward. The only way of getting out of misery is by giving up the idea of happiness, because these two are linked to each other. On one side there is happiness, on the other there is misery. On one side there is life, on the other there is death. The only way to get beyond death is to give up the love of life. Life and death are the same thing, looked at from different points. So the idea of happiness without misery, or of life without death, is very good for school-boys and children; but the thinker sees that it is all a contradiction in terms and gives up both. Seek no praise, no reward, for anything you do. No sooner do we perform a good action than we begin to desire credit for it. No sooner do we give money to some charity than we want to see our names blazoned in the papers. Misery must come as the result of such desires. The greatest men in the world have passed away unknown. The Buddhas and the Christs that we know are but second-rate heroes in comparison with the greatest men of whom the world knows nothing. Hundreds of these unknown heroes have lived in every country working silently. Silently they live and silently they pass away; and in time their thoughts find expression in Buddhas or Christs, and it is these latter that become known to us. The highest men do not seek to get any name or fame from their knowledge. They leave their ideas to the world; they put forth no claims for themselves and establish no schools or systems in their name. Their whole nature shrinks from such a thing. They are the pure S‚ttvikas, who can never make any stir, but only melt down in love. I have seen one such Yogi who lives in a cave in India. He is one of the most wonderful men I have ever seen. He has so completely lost the sense of his own individuality that we may say that the man in him is completely gone, leaving behind only the all comprehending sense of the divine. If an animal bites one of his arms, he is ready to give it his other arm also, and say that it is the Lord's will. Everything that comes to him is from the Lord. He does not show himself to men, and yet he is a magazine of love and of true and sweet ideas.
Next in order come the men with more Rajas, or activity, combative natures, who take up the ideas of the perfect ones and preach them to the world. The highest kind of men silently collect true and noble ideas, and others — the Buddhas and Christs — go from place to place preaching them and working for them. In the life of Gautama Buddha we notice him constantly saying that he is the twenty-fifth Buddha. The twenty-four before him are unknown to history, although the Buddha known to history must have built upon foundations laid by them. The highest men are calm, silent, and unknown. They are the men who really know the power of thought; they are sure that, even if they go into a cave and close the door and simply think five true thoughts and then pass away, these five thoughts of theirs will live through eternity. Indeed such thoughts will penetrate through the mountains, cross the oceans, and travel through the world. They will enter deep into human hearts and brains and raise up men and women who will give them practical expression in the workings of human life. These Sattvika men are too near the Lord to be active and to fight, to be working, struggling, preaching and doing good, as they say, here on earth to humanity. The active workers, however good, have still a little remnant of ignorance left in them. When our nature has yet some impurities left in it, then alone can we work. It is in the nature of work to be impelled ordinarily by motive and by attachment. In the presence of an ever active Providence who notes even the sparrow's fall, how can man attach any importance to his own work? Will it not be a blasphemy to do so when we know that He is taking care of the minutest things in the world? We have only to stand in awe and reverence before Him saying, "Thy will be done". The highest men cannot work, for in them there is no attachment. Those whose whole soul is gone into the Self, those whose desires are confined in the Self, who have become ever associated with the Self, for them there is no work. Such are indeed the highest of mankind; but apart from them every one else has to work. In so working we should never think that we can help on even the least thing in this universe. We cannot. We only help ourselves in this gymnasium of the world. This is the proper attitude of work. If we work in this way, if we always remember that our present opportunity to work thus is a privilege which has been given to us, we shall never be attached to anything. Millions like you and me think that we are great people in the world; but we all die, and in five minutes the world forgets us. But the life of God is infinite. "Who can live a moment, breathe a moment, if this all-powerful One does not will it?" He is the ever active Providence. All power is His and within His command. Through His command the winds blow, the sun shines, the earth lives, and death stalks upon the earth. He is the all in all; He is all and in all. We can only worship Him. Give up all fruits of work; do good for its own sake; then alone will come perfect non-attachment. The bonds of the heart will thus break, and we shall reap perfect freedom. This freedom is indeed the goal of Karma-Yoga.


filter_dramaLearn to Create a Doodle Draw Game on Android
In this tutorial, we will walk through the major steps to deploy a doodle recognition model from PyTorch on Android. Because the code base is relatively large, we will cover the most important parts you need to understand for the model to work correctly. You can access our example project to start crafting.
filter_dramaNDArray — — a Java based N-Dim array toolkit
In this tutorial, we will walk through how you can leverage the NDArray from DJL to write your NumPy code in Java and apply NDArray into a real-world application.
filter_dramaDetecting pneumonia from chest x-ray images in Java
In this post, we illustrate how artificial intelligence can assist clinical decision making with a focus on enterprise deployment. This work leverages a model trained using Keras and TensorFlow with this Kaggle kernel. In this blog post, we will focus on generating predictions with this model using Deep Java Library (DJL), an open-source library to build and deploy DL in Java.
filter_dramaDeep Java Learning Einführung – Teil 1: NDManager & NDArray
Nach unserer ersten Vorstellung von Amazons neuem Deep Learning Frameworks für Java, DJL, wollen wir nun in einer Reihe von Anfängerposts Schritt für Schritt die Grundlagen von Deep Learning unter Java mit DJL vorstellen. Hierbei soll es nicht um das schnelle Kopieren von Code Snippets, sondern um das wirkliche Verständnis des Frameworks und der Konzepte […]
filter_dramaAmazon DJL – ein neues Deep Learning Framework für Java
Wer auf der JVM und insbesondere in Java mit neuronalen Netzen und Deep Learning experimentieren wollte, für die gab es bisher nur wenig Auswahl. Wer ausschließlich auf Java setzen wollte, kam bisher an DL4J nicht vorbei. Wenn es die JVM, aber nicht unbedingt Java sein muss, kommt auch noch das Scala Frontend von MXNet in Frage. Wen schließlich ein wenig Python nicht schreckt, die kann eine Hybrid Lösung aus TensorFlow und Java probieren, wie wir bereits in früheren Artikeln erläutert haben.
We are excited to announce the Deep Java Library (DJL), an open source library to develop, train and run Deep learning models in Java using intuitive, high-level APIs. If you are a Java user interested in learning Deep learning, DJL is a great way to start learning. If you’re a Java developer working with Deep learning models, DJL will simplify the way you train and run predictions. In this post, we will show how to run a prediction with a pre-trained Deep learning model in minutes.
filter_dramaImplement Object Detection with PyTorch in Java in 5 minutes
While there are a variety of options to serve PyTorch models in production, there are only a few options to deploy PyTorch models natively in Java. Previously, users could write a Java wrapper around the PyTorch C++ API or use the experimental PyTorch Java bindings. Amazon’s Deep Java Library (DJL) now offers the PyTorch and Java community a simpler option with its easy to use high-level APIs. By abstracting the complexity involved in ML and bundling tedious data processing routines, DJL simplifies running predictions with a PyTorch model down to a few lines of code. In our two-part blog series, we demonstrate how users can run inference with PyTorch. First with pre-trained PyTorch models, then with user-generated PyTorch models.
filter_dramaAdopting machine learning in your microservices with DJL (Deep Java Library) and Spring Boot
Many AWS customers—startups and large enterprises—are on a path to adopt machine learning and deep learning in their existing applications. The reasons for machine learning adoption are dictated by the pace of innovation in the industry, with business use cases ranging from customer service (including object detection from images and video streams, sentiment analysis) to fraud detection and collaboration. However, until recently, the adoption learning curve was steep and required development of internal technical expertise in new programming languages (e.g., Python) and frameworks, with cascading effect on the whole software development lifecycle, from coding to building, testing, and deployment. The approach outlined in this blog post enables enterprises to leverage existing talent and resources (frameworks, pipelines, and deployments) to integrate machine learning capabilities.
filter_dramaMachine Learning in Java With Amazon Deep Java Library
Today, many of these solutions are primarily developed in Python using open source and proprietary ML toolkits, each with their own APIs. Despite Java's popularity in enterprises, there aren’t any standards to develop machine learning applications in Java. JSR-381 was developed to address this gap by offering Java application developers a set of standard, flexible and Java-friendly APIs for Visual Recognition (VisRec) applications such as image classification and object detection. JSR-381 has several implementations that rely on machine learning platforms such as TensorFlow, MXNet and DeepNetts. One of these implementations is based on Deep Java Library (DJL), an open source library developed by Amazon to build machine learning in Java. DJL offers hooks to popular machine learning frameworks such as TensorFlow, MXNet, and PyTorch by bundling requisite image processing routines, making it a flexible and simple choice for JSR-381 users.


The MyBatis configuration contains settings and properties that have a dramatic effect on how MyBatis behaves. The high level structure of the document is as follows:
These are externalizable, substitutable properties that can be configured in a typical Java Properties file instance, or passed in through sub-elements of the properties element. For example:
<properties resource="org/mybatis/example/config.properties"> <property name="username" value="dev_user"/> <property name="password" value="F2Fa3!33TYyg"/> </properties>
The properties can then be used throughout the configuration files to substitute values that need to be dynamically configured. For example:
<dataSource type="POOLED"> <property name="driver" value="${driver}"/> <property name="url" value="${url}"/> <property name="username" value="${username}"/> <property name="password" value="${password}"/> </dataSource>
The username and password in this example will be replaced by the values set in the properties elements. The driver and url properties would be replaced with values contained from the config.properties file. This provides a lot of options for configuration.
Properties can also be passed into the SqlSessionFactoryBuilder.build() methods. For example:
SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, props); // ... or ... SqlSessionFactory factory = new SqlSessionFactoryBuilder.build(reader, environment, props);
If a property exists in more than one of these places, MyBatis loads them in the following order:
Thus, the highest priority properties are those passed in as a method parameter, followed by resource/url attributes and finally the properties specified in the body of the properties element.
Since the MyBatis 3.4.2, your can specify a default value into placeholder as follow:
<dataSource type="POOLED"> <!-- ... --> <property name="username" value="${username:ut_user}"/> <!-- If 'username' property not present, username become 'ut_user' --> </dataSource>
This feature is disabled by default. If you specify a default value into placeholder, you should be enable this feature by adding a special property as follow:
<properties resource="org/mybatis/example/config.properties"> <!-- ... --> <property name="org.apache.ibatis.parsing.PropertyParser.enable-default-value" value="true"/> <!-- Enable this feature --> </properties>
NOTE Also If you are used already the ":" as property key(e.g. db:username) or you are used already the ternary operator of OGNL expression(e.g. ${tableName != null ? tableName : 'global_constants'}) on your sql definition, you should be change the character that separate key and default value by adding a special property as follow:
<properties resource="org/mybatis/example/config.properties"> <!-- ... --> <property name="org.apache.ibatis.parsing.PropertyParser.default-value-separator" value="?:"/> <!-- Change default value of separator --> </properties>
<dataSource type="POOLED"> <!-- ... --> <property name="username" value="${db:username?:ut_user}"/> </dataSource>
These are extremely important tweaks that modify the way that MyBatis behaves at runtime. The following table describes the settings, their meanings and their default values.
| Setting | Description | Valid Values | Default |
|---|---|---|---|
| cacheEnabled | Globally enables or disables any caches configured in any mapper under this configuration. | true | false | true |
| lazyLoadingEnabled | Globally enables or disables lazy loading. When enabled, all relations will be lazily loaded. This value can be superseded for an specific relation by using the fetchType attribute on it. | true | false | false |
| aggressiveLazyLoading | When enabled, any method call will load all the lazy properties of the object. Otherwise, each property is loaded on demand (see also lazyLoadTriggerMethods). | true | false | false (true in ≤3.4.1) |
| multipleResultSetsEnabled | Allows or disallows multiple ResultSets to be returned from a single statement (compatible driver required). | true | false | true |
| useColumnLabel | Uses the column label instead of the column name. Different drivers behave differently in this respect. Refer to the driver documentation, or test out both modes to determine how your driver behaves. | true | false | true |
| useGeneratedKeys | Allows JDBC support for generated keys. A compatible driver is required. This setting forces generated keys to be used if set to true, as some drivers deny compatibility but still work (e.g. Derby). | true | false | False |
| autoMappingBehavior | Specifies if and how MyBatis should automatically map columns to fields/properties. NONE disables auto-mapping. PARTIAL will only auto-map results with no nested result mappings defined inside. FULL will auto-map result mappings of any complexity (containing nested or otherwise). | NONE, PARTIAL, FULL | PARTIAL |
| autoMappingUnknownColumnBehavior |
Specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.
|
NONE, WARNING, FAILING | NONE |
| defaultExecutorType | Configures the default executor. SIMPLE executor does nothing special. REUSE executor reuses prepared statements. BATCH executor reuses statements and batches updates. | SIMPLE REUSE BATCH | SIMPLE |
| defaultStatementTimeout | Sets the number of seconds the driver will wait for a response from the database. | Any positive integer | Not Set (null) |
| defaultFetchSize | Sets the driver a hint as to control fetching size for return results. This parameter value can be override by a query setting. | Any positive integer | Not Set (null) |
| safeRowBoundsEnabled | Allows using RowBounds on nested statements. If allow, set the false. | true | false | False |
| safeResultHandlerEnabled | Allows using ResultHandler on nested statements. If allow, set the false. | true | false | True |
| mapUnderscoreToCamelCase | Enables automatic mapping from classic database column names A_COLUMN to camel case classic Java property names aColumn. | true | false | False |
| localCacheScope | MyBatis uses local cache to prevent circular references and speed up repeated nested queries. By default (SESSION) all queries executed during a session are cached. If localCacheScope=STATEMENT local session will be used just for statement execution, no data will be shared between two different calls to the same SqlSession. | SESSION | STATEMENT | SESSION |
| jdbcTypeForNull | Specifies the JDBC type for null values when no specific JDBC type was provided for the parameter. Some drivers require specifying the column JDBC type but others work with generic values like NULL, VARCHAR or OTHER. | JdbcType enumeration. Most common are: NULL, VARCHAR and OTHER | OTHER |
| lazyLoadTriggerMethods | Specifies which Object's methods trigger a lazy load | A method name list separated by commas | equals,clone,hashCode,toString |
| defaultScriptingLanguage | Specifies the language used by default for dynamic SQL generation. | A type alias or fully qualified class name. | org.apache.ibatis.scripting.xmltags.XMLLanguageDriver |
| defaultEnumTypeHandler | Specifies the TypeHandler used by default for Enum. (Since: 3.4.5) | A type alias or fully qualified class name. | org.apache.ibatis.type.EnumTypeHandler |
| callSettersOnNulls | Specifies if setters or map's put method will be called when a retrieved value is null. It is useful when you rely on Map.keySet() or null value initialization. Note primitives such as (int,boolean,etc.) will not be set to null. | true | false | false |
| returnInstanceForEmptyRow | MyBatis, by default, returns null when all the columns of a returned row are NULL. When this setting is enabled, MyBatis returns an empty instance instead. Note that it is also applied to nested results (i.e. collectioin and association). Since: 3.4.2 | true | false | false |
| logPrefix | Specifies the prefix string that MyBatis will add to the logger names. | Any String | Not set |
| logImpl | Specifies which logging implementation MyBatis should use. If this setting is not present logging implementation will be autodiscovered. | SLF4J | LOG4J | LOG4J2 | JDK_LOGGING | COMMONS_LOGGING | STDOUT_LOGGING | NO_LOGGING | Not set |
| proxyFactory | Specifies the proxy tool that MyBatis will use for creating lazy loading capable objects. | CGLIB | JAVASSIST | JAVASSIST (MyBatis 3.3 or above) |
| vfsImpl | Specifies VFS implementations | Fully qualified class names of custom VFS implementation separated by commas. | Not set |
| useActualParamName | Allow referencing statement parameters by their actual names declared in the method signature. To use this feature, your project must be compiled in Java 8 with -parameters option. (Since: 3.4.1) | true | false | true |
| configurationFactory | Specifies the class that provides an instance of Configuration. The returned Configuration instance is used to load lazy properties of deserialized objects. This class must have a method with a signature static Configuration getConfiguration(). (Since: 3.2.3) | A type alias or fully qualified class name. | Not set |
An example of the settings element fully configured is as follows:
<settings> <setting name="cacheEnabled" value="true"/> <setting name="lazyLoadingEnabled" value="true"/> <setting name="multipleResultSetsEnabled" value="true"/> <setting name="useColumnLabel" value="true"/> <setting name="useGeneratedKeys" value="false"/> <setting name="autoMappingBehavior" value="PARTIAL"/> <setting name="autoMappingUnknownColumnBehavior" value="WARNING"/> <setting name="defaultExecutorType" value="SIMPLE"/> <setting name="defaultStatementTimeout" value="25"/> <setting name="defaultFetchSize" value="100"/> <setting name="safeRowBoundsEnabled" value="false"/> <setting name="mapUnderscoreToCamelCase" value="false"/> <setting name="localCacheScope" value="SESSION"/> <setting name="jdbcTypeForNull" value="OTHER"/> <setting name="lazyLoadTriggerMethods" value="equals,clone,hashCode,toString"/> </settings>
A type alias is simply a shorter name for a Java type. It's only relevant to the XML configuration and simply exists to reduce redundant typing of fully qualified classnames. For example:
<typeAliases> <typeAlias alias="Author" type="domain.blog.Author"/> <typeAlias alias="Blog" type="domain.blog.Blog"/> <typeAlias alias="Comment" type="domain.blog.Comment"/> <typeAlias alias="Post" type="domain.blog.Post"/> <typeAlias alias="Section" type="domain.blog.Section"/> <typeAlias alias="Tag" type="domain.blog.Tag"/> </typeAliases>
With this configuration, Blog can now be used anywhere that domain.blog.Blog could be.
You can also specify a package where MyBatis will search for beans. For example:
<typeAliases> <package name="domain.blog"/> </typeAliases>
Each bean found in domain.blog , if no annotation is found, will be registered as an alias using uncapitalized non-qualified class name of the bean. That is domain.blog.Author will be registered as author. If the @Alias annotation is found its value will be used as an alias. See the example below:
@Alias("author") public class Author { ... }
There are many built-in type aliases for common Java types. They are all case insensitive, note the special handling of primitives due to the overloaded names.
| Alias | Mapped Type |
|---|---|
| _byte | byte |
| _long | long |
| _short | short |
| _int | int |
| _integer | int |
| _double | double |
| _float | float |
| _boolean | boolean |
| string | String |
| byte | Byte |
| long | Long |
| short | Short |
| int | Integer |
| integer | Integer |
| double | Double |
| float | Float |
| boolean | Boolean |
| date | Date |
| decimal | BigDecimal |
| bigdecimal | BigDecimal |
| object | Object |
| map | Map |
| hashmap | HashMap |
| list | List |
| arraylist | ArrayList |
| collection | Collection |
| iterator | Iterator |
Whenever MyBatis sets a parameter on a PreparedStatement or retrieves a value from a ResultSet, a TypeHandler is used to retrieve the value in a means appropriate to the Java type. The following table describes the default TypeHandlers.
NOTE Since version 3.4.5, The MyBatis has been supported JSR-310(Date and Time API) by default.
| Type Handler | Java Types | JDBC Types |
|---|---|---|
| BooleanTypeHandler | java.lang.Boolean, boolean | Any compatible BOOLEAN |
| ByteTypeHandler | java.lang.Byte, byte | Any compatible NUMERIC or BYTE |
| ShortTypeHandler | java.lang.Short, short | Any compatible NUMERIC or SHORT INTEGER |
| IntegerTypeHandler | java.lang.Integer, int | Any compatible NUMERIC or INTEGER |
| LongTypeHandler | java.lang.Long, long | Any compatible NUMERIC or LONG INTEGER |
| FloatTypeHandler | java.lang.Float, float | Any compatible NUMERIC or FLOAT |
| DoubleTypeHandler | java.lang.Double, double | Any compatible NUMERIC or DOUBLE |
| BigDecimalTypeHandler | java.math.BigDecimal | Any compatible NUMERIC or DECIMAL |
| StringTypeHandler | java.lang.String | CHAR, VARCHAR |
| ClobReaderTypeHandler | java.io.Reader | - |
| ClobTypeHandler | java.lang.String | CLOB, LONGVARCHAR |
| NStringTypeHandler | java.lang.String | NVARCHAR, NCHAR |
| NClobTypeHandler | java.lang.String | NCLOB |
| BlobInputStreamTypeHandler | java.io.InputStream | - |
| ByteArrayTypeHandler | byte[] | Any compatible byte stream type |
| BlobTypeHandler | byte[] | BLOB, LONGVARBINARY |
| DateTypeHandler | java.util.Date | TIMESTAMP |
| DateOnlyTypeHandler | java.util.Date | DATE |
| TimeOnlyTypeHandler | java.util.Date | TIME |
| SqlTimestampTypeHandler | java.sql.Timestamp | TIMESTAMP |
| SqlDateTypeHandler | java.sql.Date | DATE |
| SqlTimeTypeHandler | java.sql.Time | TIME |
| ObjectTypeHandler | Any | OTHER, or unspecified |
| EnumTypeHandler | Enumeration Type | VARCHAR any string compatible type, as the code is stored (not index). |
| EnumOrdinalTypeHandler | Enumeration Type | Any compatible NUMERIC or DOUBLE, as the position is stored (not the code itself). |
| InstantTypeHandler | java.time.Instant | TIMESTAMP |
| LocalDateTimeTypeHandler | java.time.LocalDateTime | TIMESTAMP |
| LocalDateTypeHandler | java.time.LocalDate | DATE |
| LocalTimeTypeHandler | java.time.LocalTime | TIME |
| OffsetDateTimeTypeHandler | java.time.OffsetDateTime | TIMESTAMP |
| OffsetTimeTypeHandler | java.time.OffsetTime | TIME |
| ZonedDateTimeTypeHandler | java.time.ZonedDateTime | TIMESTAMP |
| YearTypeHandler | java.time.Year | INTEGER |
| MonthTypeHandler | java.time.Month | INTEGER |
| YearMonthTypeHandler | java.time.YearMonth | VARCHAR or LONGVARCHAR |
| JapaneseDateTypeHandler | java.time.chrono.JapaneseDate | DATE |
You can override the type handlers or create your own to deal with unsupported or non-standard types. To do so, implement the interface org.apache.ibatis.type.TypeHandler or extend the convenience class org.apache.ibatis.type.BaseTypeHandler and optionally map it to a JDBC type. For example:
// ExampleTypeHandler.java @MappedJdbcTypes(JdbcType.VARCHAR) public class ExampleTypeHandler extends BaseTypeHandler<String> { @Override public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException { ps.setString(i, parameter); } @Override public String getNullableResult(ResultSet rs, String columnName) throws SQLException { return rs.getString(columnName); } @Override public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException { return rs.getString(columnIndex); } @Override public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { return cs.getString(columnIndex); } }
<!-- mybatis-config.xml --> <typeHandlers> <typeHandler handler="org.mybatis.example.ExampleTypeHandler"/> </typeHandlers>
Using such a TypeHandler would override the existing type handler for Java String properties and VARCHAR parameters and results. Note that MyBatis does not introspect upon the database metadata to determine the type, so you must specify that it’s a VARCHAR field in the parameter and result mappings to hook in the correct type handler. This is due to the fact that MyBatis is unaware of the data type until the statement is executed.
MyBatis will know the the Java type that you want to handle with this TypeHandler by introspecting its generic type, but you can override this behavior by two means:
Associated JDBC type can be specified by two means:
When deciding which TypeHandler to use in a ResultMap, the Java type is known (from the result type), but the JDBC type is unknown. MyBatis therefore uses the combination javaType=[TheJavaType], jdbcType=null to choose a TypeHandler. This means that using a @MappedJdbcTypes annotation restricts the scope of a TypeHandler and makes it unavailable for use in ResultMaps unless explicity set. To make a TypeHandler available for use in a ResultMap, set includeNullJdbcType=true on the @MappedJdbcTypes annotation. Since Mybatis 3.4.0 however, if a single TypeHandler is registered to handle a Java type, it will be used by default in ResultMaps using this Java type (i.e. even without includeNullJdbcType=true).
And finally you can let MyBatis search for your TypeHandlers:
<!-- mybatis-config.xml --> <typeHandlers> <package name="org.mybatis.example"/> </typeHandlers>
Note that when using the autodiscovery feature JDBC types can only be specified with annotations.
You can create a generic TypeHandler that is able to handle more than one class. For that purpose add a constructor that receives the class as a parameter and MyBatis will pass the actual class when constructing the TypeHandler.
//GenericTypeHandler.java public class GenericTypeHandler<E extends MyObject> extends BaseTypeHandler<E> { private Class<E> type; public GenericTypeHandler(Class<E> type) { if (type == null) throw new IllegalArgumentException("Type argument cannot be null"); this.type = type; } ...
EnumTypeHandler and EnumOrdinalTypeHandler are generic TypeHandlers. We will learn about them in the following section.
If you want to map an Enum, you'll need to use either EnumTypeHandler or EnumOrdinalTypeHandler.
For example, let's say that we need to store the rounding mode that should be used with some number if it needs to be rounded. By default, MyBatis uses EnumTypeHandler to convert the Enum values to their names.
Note EnumTypeHandler is special in the sense that unlike other handlers, it does not handle just one specific class, but any class that extends EnumHowever, we may not want to store names. Our DBA may insist on an integer code instead. That's just as easy: add EnumOrdinalTypeHandler to the typeHandlers in your config file, and now each RoundingMode will be mapped to an integer using its ordinal value.
<!-- mybatis-config.xml --> <typeHandlers> <typeHandler handler="org.apache.ibatis.type.EnumOrdinalTypeHandler" javaType="java.math.RoundingMode"/> </typeHandlers>
But what if you want to map the same Enum to a string in one place and to integer in another?
The auto-mapper will automatically use EnumOrdinalTypeHandler, so if we want to go back to using plain old ordinary EnumTypeHandler, we have to tell it, by explicitly setting the type handler to use for those SQL statements.
(Mapper files aren't covered until the next section, so if this is your first time reading through the documentation, you may want to skip this for now and come back to it later.)
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.apache.ibatis.submitted.rounding.Mapper"> <resultMap type="org.apache.ibatis.submitted.rounding.User" id="usermap"> <id column="id" property="id"/> <result column="name" property="name"/> <result column="funkyNumber" property="funkyNumber"/> <result column="roundingMode" property="roundingMode"/> </resultMap> <select id="getUser" resultMap="usermap"> select * from users </select> <insert id="insert"> insert into users (id, name, funkyNumber, roundingMode) values ( #{id}, #{name}, #{funkyNumber}, #{roundingMode} ) </insert> <resultMap type="org.apache.ibatis.submitted.rounding.User" id="usermap2"> <id column="id" property="id"/> <result column="name" property="name"/> <result column="funkyNumber" property="funkyNumber"/> <result column="roundingMode" property="roundingMode" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/> </resultMap> <select id="getUser2" resultMap="usermap2"> select * from users2 </select> <insert id="insert2"> insert into users2 (id, name, funkyNumber, roundingMode) values ( #{id}, #{name}, #{funkyNumber}, #{roundingMode, typeHandler=org.apache.ibatis.type.EnumTypeHandler} ) </insert> </mapper>
Note that this forces us to use a resultMap instead of a resultType in our select statements.
Each time MyBatis creates a new instance of a result object, it uses an ObjectFactory instance to do so. The default ObjectFactory does little more than instantiate the target class with a default constructor, or a parameterized constructor if parameter mappings exist. If you want to override the default behaviour of the ObjectFactory, you can create your own. For example:
// ExampleObjectFactory.java public class ExampleObjectFactory extends DefaultObjectFactory { public Object create(Class type) { return super.create(type); } public Object create(Class type, List<Class> constructorArgTypes, List<Object> constructorArgs) { return super.create(type, constructorArgTypes, constructorArgs); } public void setProperties(Properties properties) { super.setProperties(properties); } public <T> boolean isCollection(Class<T> type) { return Collection.class.isAssignableFrom(type); }}
<!-- mybatis-config.xml --> <objectFactory type="org.mybatis.example.ExampleObjectFactory"> <property name="someProperty" value="100"/> </objectFactory>
The ObjectFactory interface is very simple. It contains two create methods, one to deal with the default constructor, and the other to deal with parameterized constructors. Finally, the setProperties method can be used to configure the ObjectFactory. Properties defined within the body of the objectFactory element will be passed to the setProperties method after initialization of your ObjectFactory instance.
MyBatis allows you to intercept calls to at certain points within the execution of a mapped statement. By default, MyBatis allows plug-ins to intercept method calls of:
The details of these classes methods can be discovered by looking at the full method signature of each, and the source code which is available with each MyBatis release. You should understand the behaviour of the method you’re overriding, assuming you’re doing something more than just monitoring calls. If you attempt to modify or override the behaviour of a given method, you’re likely to break the core of MyBatis. These are low level classes and methods, so use plug-ins with caution.
Using plug-ins is pretty simple given the power they provide. Simply implement the Interceptor interface, being sure to specify the signatures you want to intercept.
// ExamplePlugin.java @Intercepts({@Signature( type= Executor.class, method = "update", args = {MappedStatement.class,Object.class})}) public class ExamplePlugin implements Interceptor { public Object intercept(Invocation invocation) throws Throwable { return invocation.proceed(); } public Object plugin(Object target) { return Plugin.wrap(target, this); } public void setProperties(Properties properties) { } }
<!-- mybatis-config.xml --> <plugins> <plugin interceptor="org.mybatis.example.ExamplePlugin"> <property name="someProperty" value="100"/> </plugin> </plugins>
The plug-in above will intercept all calls to the "update" method on the Executor instance, which is an internal object responsible for the low level execution of mapped statements.
NOTE Overriding the Configuration Class
In addition to modifying core MyBatis behaviour with plugins, you can also override the Configuration class entirely. Simply extend it and override any methods inside, and pass it into the call to the SqlSessionFactoryBuilder.build(myConfig) method. Again though, this could have a severe impact on the behaviour of MyBatis, so use caution.
MyBatis can be configured with multiple environments. This helps you to apply your SQL Maps to multiple databases for any number of reasons. For example, you might have a different configuration for your Development, Test and Production environments. Or, you may have multiple production databases that share the same schema, and you’d like to use the same SQL maps for both. There are many use cases.
One important thing to remember though: While you can configure multiple environments, you can only choose ONE per SqlSessionFactory instance.
So if you want to connect to two databases, you need to create two instances of SqlSessionFactory, one for each. For three databases, you’d need three instances, and so on. It’s really easy to remember:
To specify which environment to build, you simply pass it to the SqlSessionFactoryBuilder as an optional parameter. The two signatures that accept the environment are:
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environment); SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environment, properties);
If the environment is omitted, then the default environment is loaded, as follows:
SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader); SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, properties);
The environments element defines how the environment is configured.
<environments default="development"> <environment id="development"> <transactionManager type="JDBC"> <property name="..." value="..."/> </transactionManager> <dataSource type="POOLED"> <property name="driver" value="${driver}"/> <property name="url" value="${url}"/> <property name="username" value="${username}"/> <property name="password" value="${password}"/> </dataSource> </environment> </environments>
Notice the key sections here:
The default environment and the environment IDs are self explanatory. Name them whatever you like, just make sure the default matches one of them.
transactionManager
There are two TransactionManager types (i.e. type="[JDBC|MANAGED]") that are included with MyBatis:
<transactionManager type="MANAGED"> <property name="closeConnection" value="false"/> </transactionManager>
NOTE If you are planning to use MyBatis with Spring there is no need to configure any TransactionManager because the Spring module will set its own one overriding any previously set configuration.
Neither of these TransactionManager types require any properties. However, they are both Type Aliases, so in other words, instead of using them, you could put your own fully qualified class name or Type Alias that refers to your own implementation of the TransactionFactory interface.
public interface TransactionFactory { void setProperties(Properties props); Transaction newTransaction(Connection conn); Transaction newTransaction(DataSource dataSource, TransactionIsolationLevel level, boolean autoCommit); }
Any properties configured in the XML will be passed to the setProperties() method after instantiation. Your implementation would also need to create a Transaction implementation, which is also a very simple interface:
public interface Transaction { Connection getConnection() throws SQLException; void commit() throws SQLException; void rollback() throws SQLException; void close() throws SQLException; Integer getTimeout() throws SQLException; }
Using these two interfaces, you can completely customize how MyBatis deals with Transactions.
dataSource
The dataSource element configures the source of JDBC Connection objects using the standard JDBC DataSource interface.
There are three build-in dataSource types (i.e. type="[UNPOOLED|POOLED|JNDI]"):
UNPOOLED – This implementation of DataSource simply opens and closes a connection each time it is requested. While it’s a bit slower, this is a good choice for simple applications that do not require the performance of immediately available connections. Different databases are also different in this performance area, so for some it may be less important to pool and this configuration will be ideal. The UNPOOLED DataSource is configured with only five properties:
Optionally, you can pass properties to the database driver as well. To do this, prefix the properties with driver., for example:
This will pass the property encoding, with the value UTF8, to your database driver via the DriverManager.getConnection(url, driverProperties) method.
POOLED – This implementation of DataSource pools JDBC Connection objects to avoid the initial connection and authentication time required to create a new Connection instance. This is a popular approach for concurrent web applications to achieve the fastest response.
In addition to the (UNPOOLED) properties above, there are many more properties that can be used to configure the POOLED datasource:
JNDI – This implementation of DataSource is intended for use with containers such as EJB or Application Servers that may configure the DataSource centrally or externally and place a reference to it in a JNDI context. This DataSource configuration only requires two properties:
Similar to the other DataSource configurations, it’s possible to send properties directly to the InitialContext by prefixing those properties with env., for example:
This would send the property encoding with the value of UTF8 to the constructor of the InitialContext upon instantiation.
You can plug any 3rd party DataSource by implementing the interface org.apache.ibatis.datasource.DataSourceFactory:
public interface DataSourceFactory { void setProperties(Properties props); DataSource getDataSource(); }
org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory can be used as super class to build new datasource adapters. For example this is the code needed to plug C3P0:
import org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory; import com.mchange.v2.c3p0.ComboPooledDataSource; public class C3P0DataSourceFactory extends UnpooledDataSourceFactory { public C3P0DataSourceFactory() { this.dataSource = new ComboPooledDataSource(); } }
To set it up, add a property for each setter method you want MyBatis to call. Follows below a sample configuration which connects to a PostgreSQL database:
<dataSource type="org.myproject.C3P0DataSourceFactory"> <property name="driver" value="org.postgresql.Driver"/> <property name="url" value="jdbc:postgresql:mydb"/> <property name="username" value="postgres"/> <property name="password" value="root"/> </dataSource>
MyBatis is able to execute different statements depending on your database vendor. The multi-db vendor support is based on the mapped statements databaseId attribute. MyBatis will load all statements with no databaseId attribute or with a databaseId that matches the current one. In case the same statement is found with and without the databaseId the latter will be discarded. To enable the multi vendor support add a databaseIdProvider to mybatis-config.xml file as follows:
<databaseIdProvider type="DB_VENDOR" />
The DB_VENDOR implementation databaseIdProvider sets as databaseId the String returned by DatabaseMetaData#getDatabaseProductName(). Given that usually that string is too long and that different versions of the same product may return different values, you may want to convert it to a shorter one by adding properties like follows:
<databaseIdProvider type="DB_VENDOR"> <property name="SQL Server" value="sqlserver"/> <property name="DB2" value="db2"/> <property name="Oracle" value="oracle" /> </databaseIdProvider>
When properties are provided, the DB_VENDOR databaseIdProvider will search the property value corresponding to the first key found in the returned database product name or "null" if there is not a matching property. In this case, if getDatabaseProductName() returns "Oracle (DataDirect)" the databaseId will be set to "oracle".
You can build your own DatabaseIdProvider by implementing the interface org.apache.ibatis.mapping.DatabaseIdProvider and registering it in mybatis-config.xml:
public interface DatabaseIdProvider { void setProperties(Properties p); String getDatabaseId(DataSource dataSource) throws SQLException; }
Now that the behavior of MyBatis is configured with the above configuration elements, we’re ready to define our mapped SQL statements. But first, we need to tell MyBatis where to find them. Java doesn’t really provide any good means of auto-discovery in this regard, so the best way to do it is to simply tell MyBatis where to find the mapping files. You can use classpath relative resource references, fully qualified url references (including file:/// URLs), class names or package names. For example:
<!-- Using classpath relative resources --> <mappers> <mapper resource="org/mybatis/builder/AuthorMapper.xml"/> <mapper resource="org/mybatis/builder/BlogMapper.xml"/> <mapper resource="org/mybatis/builder/PostMapper.xml"/> </mappers>
<!-- Using url fully qualified paths --> <mappers> <mapper url="file:///var/mappers/AuthorMapper.xml"/> <mapper url="file:///var/mappers/BlogMapper.xml"/> <mapper url="file:///var/mappers/PostMapper.xml"/> </mappers>
<!-- Using mapper interface classes --> <mappers> <mapper class="org.mybatis.builder.AuthorMapper"/> <mapper class="org.mybatis.builder.BlogMapper"/> <mapper class="org.mybatis.builder.PostMapper"/> </mappers>
<!-- Register all interfaces in a package as mappers --> <mappers> <package name="org.mybatis.builder"/> </mappers>
These statement simply tell MyBatis where to go from here. The rest of the details are in each of the SQL Mapping files, and that’s exactly what the next section will discuss.


Target holding 2-day preview Black Friday sale this weekend
Target is also getting ahead of the holidays, announcing its 'holi-deals' this weekend.
The Black Friday Preview sale will run on Friday and Saturday.
The retailer says the sale will offer four times more deals than it did last year.
The retailer will also begin its Black Friday sales on Thanksgiving Day.
Stores will open at 5 a.m. on turkey day and will stay open until 1 a.m.
Then on Black Friday, November 29th, Target will re-open at 7 a.m.


Module: Aws::ConnectWisdomService::Types
Instance Attribute Summary
-
#app_integrations ⇒ Types::AppIntegrationsConfiguration
rw
Configuration information for Amazon AppIntegrations to automatically ingest content.
-
#knowledge_base_association ⇒ Types::KnowledgeBaseAssociationData
rw
The knowledge base where output data is sent.
-
#knowledge_base_id ⇒ String
rw
The identifier of the knowledge base.
-
#query ⇒ Types::QueryRecommendationTriggerData
rw
Data associated with the QUERY RecommendationTriggerType.
Instance Attribute Details
#app_integrations ⇒ Types::AppIntegrationsConfiguration (rw)
Configuration information for Amazon AppIntegrations to automatically ingest content.
# File 'gems/aws-sdk-connectwisdomservice/lib/aws-sdk-connectwisdomservice/types.rb', line 2173
class SourceConfiguration < Struct.new( :app_integrations, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class AppIntegrations < SourceConfiguration; end class Unknown < SourceConfiguration; end end
#knowledge_base_association ⇒ Types::KnowledgeBaseAssociationData (rw)
The knowledge base where output data is sent.
# File 'gems/aws-sdk-connectwisdomservice/lib/aws-sdk-connectwisdomservice/types.rb', line 173
class AssistantAssociationOutputData < Struct.new( :knowledge_base_association, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class KnowledgeBaseAssociation < AssistantAssociationOutputData; end class Unknown < AssistantAssociationOutputData; end end
#knowledge_base_id ⇒ String
(rw)
The identifier of the knowledge base.
# File 'gems/aws-sdk-connectwisdomservice/lib/aws-sdk-connectwisdomservice/types.rb', line 152
class AssistantAssociationInputData < Struct.new( :knowledge_base_id, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class KnowledgeBaseId < AssistantAssociationInputData; end class Unknown < AssistantAssociationInputData; end end
#query ⇒ Types::QueryRecommendationTriggerData (rw)
Data associated with the QUERY RecommendationTriggerType.
# File 'gems/aws-sdk-connectwisdomservice/lib/aws-sdk-connectwisdomservice/types.rb', line 1830
class RecommendationTriggerData < Struct.new( :query, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Query < RecommendationTriggerData; end class Unknown < RecommendationTriggerData; end end


This app will convert your text into Morse Code and will send the encoded message to your Bolt Wi-Fi Module.


--- layout: page title : Collaborators header : Collaborators tagline: Crowdsourcing Disruption group: navigation --- {% include JB/setup %}


--- layout: post title: Who knew about Google Translate in Google Spreadsheets? date: 2014-10-01 10:28:03.000000000 +01:00 type: post published: true status: publish categories: [] tags: [] meta: _syntaxhighlighter_encoded: '1' _edit_last: '1' _wpas_done_all: '1' _thumbnail_id: '3025' tmac_last_id: '618797291818725380' author: David Simpson excerpt_separator: ---
Well, likely loads of people, but I certainly didn't. Here's the function typed in the demo gif:
=GOOGLETRANSLATE($A$2, "en", B2)
That's
=GOOGLETRANSLATE(text, [source_language], [targetlanguage])
This could be handy if you're into mass translating your tweets, or anything else suitably obscure.


Gesture Feedback
Do a "thumbs up" or "thumbs down" gesture to let us know how you feel!
Video stream not available.
Take photo


This document gives a template for EPICS V4 html documents. The first sentence or paragraph of the Abstract must summarize the subject succinctly.
Two or three paragraphs are required; the abstract should not just be a single sentence.
For more information about EPICS, please refer to the home page of the Experimental Physics and Industrial Control System.
This is the 12 April 2012 version of the Template document. For instance, if the document were the one about Normative Types, this section might say, "this version reverts NTNamedValue to a congruent array system, rather than one in which the value is itself an array type; NTMatrix is max 2-dimentional, and much text has been added to describe alarms, display and control standard optional fields."
A continuing notable absence from this document is how Normative Types should identify themselves as such. At present, the name of the structure which encapsulates the type conforming to a Normative Type, may be named with the name of the type. For instance, a structure that should be interpreted as a NTTable, should be named "NTTable." But whether this shall be the standard for self-identity is not yet decided.
This version is an editors draft towards the First Public Working Draft. The First Public Working Draft will be intended for the EPICS community to review and comment. Resulting comments will drive subsequent revisions of the Normative Types specification and the EPICS V4 Working Group's reference implementations of software that helps create, populate and exchange Normative Type PVData.
Comments are welcome, though bear in mind this is a pre-public release version.
The terms MUST, MUST NOT, SHOULD, SHOULD NOT, REQUIRED, and MAY when highlighted (through style sheets, and in uppercase in the source) are used in accordance with RFC 2119 [RFC2119]. The term NOT REQUIRED (not defined in RFC 2119) indicates exemption.
All EPICS V4 documents SHOULD have an introduction. Refer to bibliographic references with the "a" tag "bib" class, eg this is a reference to the EPICS PVData Java bibliographic reference bib:pvdata.