<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7759186964959066961</id><updated>2025-07-19T09:14:20.716+08:00</updated><category term="MySQL"/><category term="Linux"/><category term="Java"/><category term="MSSQL"/><category term="Windows 2008 R2"/><title type='text'>IT Technical Tips &amp;amp; Solutions</title><subtitle type='html'>In my blog, i would discuss the problem i face in daily routine. Following are some of them:&#xa;mysql error, mysql replication, mysql database corrupted repair, innodb tablespace corruption, mysql storage engines, mysql optimization and tuning, reinstall mysql linux server, linux command for dummies, linux administration tips, mysql administration tips, Linux server benchmarking</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>107</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-8512675913927238226</id><published>2024-11-20T23:40:00.003+08:00</published><updated>2024-11-20T23:40:28.820+08:00</updated><title type='text'>Choose between Laravel Sanctum Cookie-Based Vs Token Based and Laravel Sanctum Token Based vs Laravel Passport</title><content type='html'>&lt;p&gt;&amp;nbsp;Laravel Sanctum is a package that offers both cookie-based and token-based authentication for Laravel applications:&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cookie-based authentication&lt;/p&gt;&lt;p&gt;This is a good choice for traditional web applications, especially when the front-end and API are on the same domain. Sanctum uses Laravel&#39;s built-in cookie-based session authentication services, which provide CSRF protection and session authentication. This approach is ideal for single-page applications (SPAs) that need to communicate with a Laravel API.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Token-based authentication&lt;/p&gt;&lt;p&gt;This is a more secure and scalable option than cookie-based authentication. Sanctum can be used to generate and manage API tokens, authenticate users, and protect API routes. This approach is more suitable for applications that need fast authorization or more interaction between the client and server.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here are some other considerations when choosing between cookie-based and token-based authentication:&lt;/p&gt;&lt;p&gt;Domain&lt;/p&gt;&lt;p&gt;If the front-end and API are on different domains, cookie-based authentication may not be suitable.&lt;/p&gt;&lt;p&gt;Third-party API consumption&lt;/p&gt;&lt;p&gt;If the application involves third-party API consumption, you&#39;ll need to decide between Passport and Sanctum for API token authentication.&lt;/p&gt;&lt;p&gt;OAuth2&lt;/p&gt;&lt;p&gt;If the application requires the full range of OAuth2 features, Passport is the right choice.&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/8512675913927238226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2024/11/choose-between-laravel-sanctum-cookie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/8512675913927238226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/8512675913927238226'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2024/11/choose-between-laravel-sanctum-cookie.html' title='Choose between Laravel Sanctum Cookie-Based Vs Token Based and Laravel Sanctum Token Based vs Laravel Passport'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-7021462576399396297</id><published>2022-03-04T18:13:00.002+08:00</published><updated>2022-03-04T18:13:12.584+08:00</updated><title type='text'>Golang: Dynamic Array sample</title><content type='html'>&lt;p&gt;sample code of dynamic array in Golang.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;// You can edit this code!&lt;/p&gt;&lt;p&gt;// Click here and start typing.&lt;/p&gt;&lt;p&gt;package main&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;import &quot;fmt&quot;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;type Arr struct {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;arr []string&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;type SError struct {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;code&amp;nbsp; &amp;nbsp; int32&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;message string&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func main() {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;newArr := &amp;amp;Arr{arr: []string{&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;e&quot;, &quot;f&quot;, &quot;g&quot;}}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;fmt.Println(newArr.size())&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;str, err := newArr.get(8)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if err != nil {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fmt.Println(err)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;} else {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fmt.Printf(&quot;item value = %s&quot;, str)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;newArr.set(10, &quot;asssss&quot;)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;err = newArr.removeAt(10)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if err != nil {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fmt.Println(err)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;} else {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fmt.Printf(&quot;removed with index :&amp;nbsp; %v&quot;, newArr.arr)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;err = newArr.remove(&quot;fasd&quot;)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if err != nil {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fmt.Println(err)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;} else {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;fmt.Printf(&quot;remove with string: %v&quot;, newArr.arr)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func (arr *Arr) get(i int) (string, *SError) {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if i &amp;gt; arr.size()-1 || i &amp;lt; 0 {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return &quot;&quot;, &amp;amp;SError{code: 5, message: fmt.Sprintf(&quot;Error accesing index %d from array.&quot;, i)}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return arr.arr[i], nil&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func (arr *Arr) set(i int, v string) *SError {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if i &amp;gt; arr.size()-1 || i &amp;lt; 0 {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return &amp;amp;SError{code: 4, message: fmt.Sprintf(&quot;%d not exists in the array.&quot;, i)}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;arr.arr[i] = v&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return nil&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func (arr *Arr) add(v string) {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;arr.arr = append(arr.arr, v)&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func (arr *Arr) removeAt(i int) *SError {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if i &amp;gt; arr.size()-1 || i &amp;lt; 0 {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return &amp;amp;SError{code: 3, message: fmt.Sprintf(&quot;Error removing index %d from array.&quot;, i)}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;arr.arr = append(arr.arr[:i], arr.arr[i+1:arr.size()]...)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return nil&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func (arr *Arr) remove(v string) *SError {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if arr.size() == 0 {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;return &amp;amp;SError{code: 1, message: &quot;Array is empty&quot;}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;// find the index&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;for k, val := range arr.arr {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;if val == v {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;// and removeAt&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;arr.removeAt(k)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;return nil&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return &amp;amp;SError{code: 2, message: fmt.Sprintf(&quot;Error removing %s from array.&quot;, v)}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;func (arr *Arr) size() int {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return len(arr.arr)&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/7021462576399396297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2022/03/golang-dynamic-array-sample.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/7021462576399396297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/7021462576399396297'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2022/03/golang-dynamic-array-sample.html' title='Golang: Dynamic Array sample'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-231785143721675919</id><published>2020-10-20T19:34:00.007+08:00</published><updated>2020-10-20T19:34:51.838+08:00</updated><title type='text'>to copy a file from a docker container to host</title><content type='html'>&lt;p&gt;&lt;i&gt;&lt;b&gt;shell&amp;gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-variant-caps: inherit; font-variant-ligatures: inherit; white-space: inherit;&quot;&gt;docker cp &amp;lt;containerId&amp;gt;:/file/path/within/container /host/path/target&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;where to get your docker container id?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-variant-caps: inherit; font-variant-ligatures: inherit; white-space: inherit;&quot;&gt;&lt;i&gt;&lt;b&gt;shell&amp;gt; docker ps&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;and you will get to see similar output in your command prompt as following:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: var(--black-800); font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;CONTAINER ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IMAGE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COMMAND&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CREATED&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;STATUS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PORTS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NAMES&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;fff29505492e&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localstack_redis:latest&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;docker-entrypoint.s…&quot;&amp;nbsp; &amp;nbsp;2 weeks ago&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Up 8 hours&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.0.0.0:6379-&amp;gt;6379/tcp&amp;nbsp; &amp;nbsp;gifted_wozniak&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;2e99dabb5692&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localstack_mysql:latest&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;docker-entrypoint.s…&quot;&amp;nbsp; &amp;nbsp;2 weeks ago&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Up 8 hours&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.0.0.0:3306-&amp;gt;3306/tcp&amp;nbsp; &amp;nbsp;vibrant_chandrasekhar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;7438b2ef7cbb&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localstack_prom2teams:latest&amp;nbsp; &amp;nbsp;&quot;sh prom2teams_start…&quot;&amp;nbsp; &amp;nbsp;2 weeks ago&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Up 8 hours&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8089/tcp&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cranky_merkle&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Case : to copy a file in your docker location such as /tmp/target.txt from localstack_mysql:latest.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;shell&amp;gt; docker cp&amp;nbsp;&lt;span style=&quot;font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px;&quot;&gt;2e99dabb5692:&lt;/span&gt;/tmp/target.txt c:/tmp/&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/231785143721675919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2020/10/to-copy-file-from-docker-container-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/231785143721675919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/231785143721675919'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2020/10/to-copy-file-from-docker-container-to.html' title='to copy a file from a docker container to host'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-1286902780194413966</id><published>2020-06-16T14:44:00.001+08:00</published><updated>2020-06-16T14:44:48.520+08:00</updated><title type='text'>To Delete all data from Kafka Topic - in a manual way</title><content type='html'>&lt;div style=&quot;box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, system-ui, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;
&lt;div&gt;
to delete the data inside the topic:&lt;/div&gt;
&lt;div&gt;
Steps:&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;stop the Kafka server &amp;amp; zookeeper&lt;/li&gt;
&lt;li&gt;go into this folder - &amp;gt; gerrit\backend\docker\zk-single-kafka-single\kafka1\data&lt;/li&gt;
&lt;li&gt;and delete all the &quot;XXX&quot; topic folder&amp;nbsp;&lt;/li&gt;
&lt;li&gt;start the kafka &amp;amp; zookeeper&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/1286902780194413966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2020/06/to-delete-all-data-from-kafka-topic-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/1286902780194413966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/1286902780194413966'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2020/06/to-delete-all-data-from-kafka-topic-in.html' title='To Delete all data from Kafka Topic - in a manual way'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-1856553281101661232</id><published>2020-05-22T03:18:00.000+08:00</published><updated>2020-05-22T03:21:04.434+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java: To read file from JAR file classpath </title><content type='html'>if the *.xml file and .config or even some other file are located in different jars, make sure you use&lt;br /&gt;
&lt;br /&gt;
resource.getInputStream()&lt;br /&gt;
&lt;br /&gt;
NOT&lt;br /&gt;
&lt;br /&gt;
resource.getFile()&lt;br /&gt;
&lt;br /&gt;
when you are loading a file from inside a jar.</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/1856553281101661232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2020/05/to-read-file-from-jar-file-classpath.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/1856553281101661232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/1856553281101661232'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2020/05/to-read-file-from-jar-file-classpath.html' title='Java: To read file from JAR file classpath '/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-127671189794150394</id><published>2019-10-06T02:00:00.002+08:00</published><updated>2019-10-06T02:00:27.659+08:00</updated><title type='text'>Install Maven in Mac OSX</title><content type='html'>to install maven in Mac OSX, the easiest way is to use &lt;a href=&quot;https://brew.sh/&quot;&gt;Homebrew&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
OR using the following steps:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Download maven from&amp;nbsp;&lt;a href=&quot;https://maven.apache.org/&quot;&gt;https://maven.apache.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;unzip the apache maven zip file into a location when you fix /User/XXX/Desktop/dev/apache-maven-X.X.X&lt;/li&gt;
&lt;li&gt;then you would need to add the maven folder into your user&#39;s MacOSX path using vi or other text editor tools&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;shell&amp;gt;&amp;nbsp;&lt;span style=&quot;background-color: rgba(128, 128, 128, 0.05); color: #242121; font-family: &amp;quot;Source Code Pro&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;vi ~/.bash_profile&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
file content&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;export M2_HOME=/path/to/your/maven/folder .&amp;nbsp; (e.g: /User/XXX/Desktop/dev/apache-maven-X.X.X)&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;export PATH=$PATH:$M2_HOME/bin&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;save the file by press &quot;ESC&quot; button, then type this command -&amp;gt; &quot;:wq!&quot;&lt;/li&gt;
&lt;li&gt;you would need to refresh the system PATH using following command&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;i&gt;shell&amp;gt; source ~/.bash_profile&lt;/i&gt;&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;after that, type shell&amp;gt; mvn --version&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: rgba(128, 128, 128, 0.05); color: #242121; font-family: &amp;quot;Source Code Pro&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: rgba(128, 128, 128, 0.05); color: #242121; font-family: &amp;quot;Source Code Pro&amp;quot;, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace; font-size: 0.9em;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/127671189794150394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2019/10/install-maven-in-mac-osx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/127671189794150394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/127671189794150394'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2019/10/install-maven-in-mac-osx.html' title='Install Maven in Mac OSX'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-1655675170595744022</id><published>2018-12-12T23:43:00.001+08:00</published><updated>2018-12-12T23:43:44.685+08:00</updated><title type='text'>Spring: Clean up CacheManager Java code</title><content type='html'>&lt;br /&gt;
If you had use @Cacheable for your java method, and would like clear the cache on run time.&lt;br /&gt;
AND If you are able to execute a groovy script, following solution is for you&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Groovy Script&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;import org.springframework.cache.CacheManager;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;cacheManager = spring.getBean(&quot;cacheManager&quot;);&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;for(String name:cacheManager.getCacheNames()){&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cacheManager.getCache(name).clear();&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;}&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/1655675170595744022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2018/12/spring-clean-up-cachemanager-java-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/1655675170595744022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/1655675170595744022'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2018/12/spring-clean-up-cachemanager-java-code.html' title='Spring: Clean up CacheManager Java code'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-159081262666926570</id><published>2016-06-19T18:28:00.005+08:00</published><updated>2016-06-19T18:41:58.945+08:00</updated><title type='text'>Best Implementation for hasCode method</title><content type='html'>&lt;div style=&quot;background-color: white; border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #242729; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;All relevant fields from the object should be included in the hashCode method. Derived fields may be excluded. In general, any field used in the equals method must be used in the hashCode method.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #242729; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #242729; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;
Proposed in&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Josh Bloch&lt;/em&gt;&#39;s&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Effective Java&lt;/em&gt;&lt;/strong&gt;&amp;nbsp;in item 8. The best thing is to look it up there because the author explains there why the approach is good.&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border: 0px; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 17px; font-weight: 400; line-height: 1.3; margin: 0px 0px 1em; padding: 0px; word-wrap: break-word;&quot;&gt;
A short version&lt;/h3&gt;
&lt;ol style=&quot;background-color: white; border: 0px; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin: 0px 0px 1em 30px; padding: 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; padding: 0px;&quot;&gt;
Create a&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;int result&lt;/code&gt;&amp;nbsp;and assign a&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;non-zero&lt;/strong&gt;&amp;nbsp;value.&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; padding: 0px;&quot;&gt;
For&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;every field&lt;/em&gt;&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;f&lt;/code&gt;&amp;nbsp;tested in the&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;equals()&lt;/code&gt;&amp;nbsp;method, calculate a hash code&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;c&lt;/code&gt;&amp;nbsp;by:&lt;/div&gt;
&lt;ul style=&quot;border: 0px; list-style-type: disc; margin: 0px 0px 0px 30px; padding: 0.5em 0px 0px;&quot;&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is a&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;boolean&lt;/code&gt;: calculate&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;(f ? 0 : 1)&lt;/code&gt;;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is a&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;byte&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;char&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;short&lt;/code&gt;&amp;nbsp;or&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;int&lt;/code&gt;: calculate&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;(int)f&lt;/code&gt;;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is a&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;long&lt;/code&gt;: calculate&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;(int)(f ^ (f &amp;gt;&amp;gt;&amp;gt; 32))&lt;/code&gt;;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is a&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;float&lt;/code&gt;: calculate&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Float.floatToIntBits(f)&lt;/code&gt;;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is a&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;double&lt;/code&gt;: calculate&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;Double.doubleToLongBits(f)&lt;/code&gt;&amp;nbsp;and handle the return value like every long value;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is an&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;object&lt;/em&gt;: Use the result of the&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;hashCode()&lt;/code&gt;&amp;nbsp;method or 0 if&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;f == null&lt;/code&gt;;&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; word-wrap: break-word;&quot;&gt;If the field f is an&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;array&lt;/em&gt;: see every field as separate element and calculate the hash value in a&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;recursive fashion&lt;/em&gt;&amp;nbsp;and combine the values as described next.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px 0px 0.5em; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; padding: 0px;&quot;&gt;
Combine the hash value&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;c&lt;/code&gt;&amp;nbsp;with&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;result&lt;/code&gt;:&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; margin-top: 0.5em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;37&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; c&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li style=&quot;border: 0px; margin: 0px; padding: 0px; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;border: 0px; clear: both; padding: 0px;&quot;&gt;
Return&amp;nbsp;&lt;code style=&quot;background-color: #eff0f1; border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin: 0px; padding: 1px 5px; white-space: pre-wrap;&quot;&gt;result&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
This should result in a proper distribution of hash values for most use situations.&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;@Override&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; 
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; hashCode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// Start with a non-zero constant. Prime is preferred&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;17&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// Include a hash for each field.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// Primatives&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;booleanField &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                   &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 1 bit   » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; byteField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                                &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 8 bits  » 32-bit &lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; charField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                                &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 16 bits » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; shortField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                               &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 16 bits » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; intField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                                 &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 32 bits » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;longField &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;longField &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 64 bits » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;Float&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;floatToIntBits&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;floatField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;         &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 32 bits » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;long&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; doubleFieldBits &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;Double&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;doubleToLongBits&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;doubleField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// 64 bits (double) » 64-bit (long) » 32-bit (int)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;)(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;doubleFieldBits &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;^&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;doubleFieldBits &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;32&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;));&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// Objects&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;Arrays&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;hashCode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;arrayField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;              &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// var bits » 32-bit&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; referenceField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;hashCode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// var bits » 32-bit (non-nullable)   &lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;31&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;                                           &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;border: 0px; color: #858c93; margin: 0px; padding: 0px;&quot;&gt;// var bits » 32-bit (nullable)   &lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;nullableReferenceField &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
            &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; nullableReferenceField&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;hashCode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;());&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; result&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
OR&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;lang-java prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border: 0px; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;border: 0px; color: #7d2727; margin: 0px; padding: 0px;&quot;&gt;@Override&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; hashCode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(){&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; color: #2b91af; margin: 0px; padding: 0px;&quot;&gt;Objects&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;hashCode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;firstName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; color: #101094; margin: 0px; padding: 0px;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;lastName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; color: #303336; margin: 0px; padding: 0px;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; color: #242729; font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 15px; line-height: 19.5px; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;div style=&quot;color: #242729; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;
OR&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;color: #242729; font-family: arial, &amp;quot;helvetica neue&amp;quot;, helvetica, sans-serif; font-size: 15px; line-height: 19.5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;public class Person {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;String name;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;int age;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;boolean smoker;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;public int hashCode() {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// you pick a hard-coded, randomly chosen, non-zero, odd number&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// ideally different for each class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return new HashCodeBuilder(17, 37).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;append(name).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;append(age).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;append(smoker).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;toHashCode();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #242729; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; margin-bottom: 1em; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 19.5px;&quot;&gt;&lt;span style=&quot;color: #242729;&quot;&gt;If required, the superclass &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;hashCode()&lt;/span&gt;&lt;span style=&quot;color: #242729;&quot;&gt; can be added using &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;appendSuper(int)&lt;/span&gt;&lt;span style=&quot;color: #242729;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/159081262666926570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2016/06/best-implementation-for-hascode-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/159081262666926570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/159081262666926570'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2016/06/best-implementation-for-hascode-method.html' title='Best Implementation for hasCode method'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-3315493406979285623</id><published>2014-12-10T08:36:00.004+08:00</published><updated>2014-12-10T08:36:55.656+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MSSQL"/><title type='text'>Import CSV into MSSQL database</title><content type='html'>&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
Use the MSSQL command following, to import the CSV file into the Microsoft SQL (MSSQL) table&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;b&gt;&lt;u&gt;MSSQL command:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;BULK&lt;br /&gt;INSERT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[dbo].[TABLE_NAME]&lt;/span&gt;&lt;span style=&quot;border: 0px; color: blue; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;FROM&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: red; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;c:\files.csv&#39;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: blue; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;border: 0px; color: grey; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;FIELDTERMINATOR&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: blue; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: red; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;,&#39;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: grey; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ROWTERMINATOR&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: blue; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: red; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&#39;\n&#39;&lt;/span&gt;&lt;span style=&quot;border: 0px; color: grey; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 16px; font-weight: bold; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/3315493406979285623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2014/12/import-csv-into-mssql-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3315493406979285623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3315493406979285623'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2014/12/import-csv-into-mssql-database.html' title='Import CSV into MSSQL database'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-2171237820418068659</id><published>2014-11-24T23:19:00.001+08:00</published><updated>2014-11-24T23:19:38.065+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows 2008 R2"/><title type='text'>Windows 2008 R2 can&#39;t see the created ODBC connection from ODBC manager</title><content type='html'>32-bit ODBC on Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
Heterogeneous data access requires having the right drivers. If you have to use 32-bit ODBC drivers, you won’t find then when you start the Microsoft ODBC Administrator because it is 64-bit.&lt;br /&gt;
The 32-bit ODBC Administrator is found here: &lt;b&gt;C:\Windows\SysWOW64\odbcad32.exe&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You might want to make a shortcut for it to make it easy to find. You’ll need to use it when make 32-bit ODBC data connections.</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/2171237820418068659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2014/11/windows-2008-r2-cant-see-created-odbc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2171237820418068659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2171237820418068659'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2014/11/windows-2008-r2-cant-see-created-odbc.html' title='Windows 2008 R2 can&#39;t see the created ODBC connection from ODBC manager'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-348887791718831479</id><published>2013-01-16T00:20:00.001+08:00</published><updated>2014-11-24T23:19:50.069+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>[MySQL] Invalid query: Thread stack overrun: 4904 bytes used of a 131072 byte stack, and 128000 bytes needed. Use &#39;mysqld -O thread_stack=#&#39; to specify a bigger stack.</title><content type='html'>&lt;div dir=&quot;ltr&quot;&gt;&lt;div style&gt;&lt;font color=&quot;#000000&quot; face=&quot;Times&quot; size=&quot;3&quot;&gt;If you happened to get error as following while you are calling the Stored Procedure&lt;/font&gt;&lt;/div&gt;&lt;div style&gt;&lt;font color=&quot;#000000&quot; face=&quot;Times&quot; size=&quot;3&quot;&gt;&lt;br&gt;  &lt;/font&gt;&lt;/div&gt;&lt;span style=&quot;color:rgb(0,0,0);font-family:Times;font-size:medium&quot;&gt;&lt;b&gt;&lt;u&gt;ERROR SHOWN:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;color:rgb(0,0,0);font-family:Times;font-size:medium&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color:rgb(0,0,0);font-family:Times;font-size:medium&quot;&gt;Query: &lt;/span&gt;&lt;br style=&quot;color:rgb(0,0,0);font-family:Times;font-size:medium&quot;&gt;  &lt;span style=&quot;color:rgb(0,0,0);font-family:Times;font-size:medium&quot;&gt;CALL detailReport2(&amp;quot;admin777f5a4d5b4e1415af6b2761d75d212c&amp;quot;, &amp;quot;01/01/2013&amp;quot;, &amp;quot;31/01/2013&amp;quot;, &amp;quot;ahmad.alias&amp;quot;, &amp;quot;&amp;quot;);&lt;/span&gt;&lt;div&gt;  &lt;span style=&quot;color:rgb(0,0,0);font-family:Times;font-size:medium&quot;&gt;Invalid query: &lt;b&gt;Thread stack overrun: 4904 bytes used of a 131072 byte stack, and 128000 bytes needed.&lt;/b&gt; Use &amp;#39;mysqld -O thread_stack=#&amp;#39; to specify a bigger stack. &lt;/span&gt;&lt;div&gt;  &lt;font color=&quot;#000000&quot; face=&quot;Times&quot; size=&quot;3&quot;&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style&gt;&lt;b&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style&gt;&lt;br&gt;&lt;/div&gt;&lt;div style&gt;1. Stop your MySQL server&lt;/div&gt;&lt;div style&gt;2. edit your my.cnf file, to add a new line or modify the existing line as following:&lt;/div&gt;  &lt;div style&gt;&lt;br&gt;&lt;/div&gt;&lt;div style&gt;&lt;u&gt;file my.cnf&lt;/u&gt;&lt;/div&gt;&lt;div style&gt;thread_stack = 256K&lt;br&gt;&lt;/div&gt;&lt;div style&gt;&lt;br&gt;&lt;/div&gt;&lt;div style&gt;3. Resume your MySQL server, you shall solve the issue/ error now&lt;/div&gt;&lt;div style&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/348887791718831479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2013/01/mysql-invalid-query-thread-stack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/348887791718831479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/348887791718831479'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2013/01/mysql-invalid-query-thread-stack.html' title='[MySQL] Invalid query: Thread stack overrun: 4904 bytes used of a 131072 byte stack, and 128000 bytes needed. Use &#39;mysqld -O thread_stack=#&#39; to specify a bigger stack.'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-804711403051135148</id><published>2012-11-29T09:42:00.001+08:00</published><updated>2014-12-10T08:37:31.913+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>[Centos Linux] Configure Network interface : eth0/1</title><content type='html'>&lt;div style=&quot;font-family:arial,sans-serif;font-size:13px&quot;&gt;&lt;div&gt;1. to bring a network card up :: &lt;/div&gt;&lt;div&gt;&lt;b&gt;shell&amp;gt; /sbin/ifconfig eth0 up&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;2. configure the network card from the following location::::&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;shell&amp;gt; /etc/sysconfig/network-scripts/ifcfg-&amp;lt;interface-name&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;IPADDR=10.10.29.66&lt;/div&gt;&lt;div&gt;NETMASK=255.255.255.192&lt;/div&gt;&lt;div&gt;ONBOOT=yes&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;  3. configure network file&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;shell&amp;gt; vi /etc/sysconfig/network&lt;/b&gt;&lt;/div&gt;&lt;div&gt;NETWORKING=yes&lt;/div&gt;&lt;div&gt;HOSTNAME=&lt;a href=&quot;http://www1.nixcraft.in/&quot; target=&quot;_blank&quot;&gt;www1.nixcraft.in&lt;/a&gt;&lt;/div&gt;&lt;div&gt;GATEWAY=10.10.29.65&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;4. Afterward, you may restart the network by execute the following command&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;shell&amp;gt;/sbin/service network restart&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/804711403051135148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/11/centos-linux-configure-network.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/804711403051135148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/804711403051135148'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/11/centos-linux-configure-network.html' title='[Centos Linux] Configure Network interface : eth0/1'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-8542400735365128159</id><published>2012-09-11T11:28:00.003+08:00</published><updated>2014-11-24T23:19:50.077+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>MySQL Replication Error: Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT</title><content type='html'>&lt;br /&gt;
&lt;b&gt;Environment:&lt;/b&gt; MySQL Replication Slave Server&lt;br /&gt;
&lt;b&gt;Error:&lt;/b&gt;&lt;br /&gt;
Could not execute Update_rows event on table &lt;b&gt;&lt;u&gt;&lt;table&gt;&lt;/table&gt;
&lt;/u&gt;&lt;/b&gt;; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event&#39;s master log mysql-bin.003169, end_log_pos 1006784578&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;br /&gt;
Shall you face any issue as above when you execute&amp;nbsp;&lt;b&gt;mysql&amp;gt;show slave status;&lt;/b&gt;
&lt;br /&gt;
the solution is as simple as following&lt;br /&gt;
&lt;b&gt;shell&amp;gt; stop slave;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;shell&amp;gt; start slave;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/8542400735365128159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/09/environment-mysql-replication-slave.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/8542400735365128159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/8542400735365128159'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/09/environment-mysql-replication-slave.html' title='MySQL Replication Error: Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-2673632124260337158</id><published>2012-08-22T12:01:00.000+08:00</published><updated>2014-12-10T08:37:31.902+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>hyperic agent behind firewall</title><content type='html'>If a hyperic agent is setup behind a firewall, however the hyperic server is setup not within the firewall.&lt;br /&gt;
Please open/allow the &quot;&lt;b&gt;RPC&lt;/b&gt;&quot; services in the firewall rules.&lt;br /&gt;
The hyperic agent need it to contact to the hyperic server.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/2673632124260337158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/08/hyperic-agent-behind-firewall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2673632124260337158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2673632124260337158'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/08/hyperic-agent-behind-firewall.html' title='hyperic agent behind firewall'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-6356150535850370185</id><published>2012-07-10T01:00:00.001+08:00</published><updated>2012-08-24T02:29:28.235+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>uninstall mysql in linux - via RPM</title><content type='html'>&lt;div&gt;
If you would like to uninstall MySQL server from your redhat/centos linux using RPM, following the below steps:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Double confirm if Mysql is install via RPM, command as follow&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Shell&amp;gt;&amp;nbsp;&lt;/b&gt;&lt;span id=&quot;internal-source-marker_0.22755590174347162&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;i&gt;rpm -qa | grep -i mysql&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Expecting output result as following &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;u&gt;Output 1:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Shell&amp;gt;&amp;nbsp;&lt;/b&gt;&lt;span id=&quot;internal-source-marker_0.22755590174347162&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;i&gt;rpm -qa | grep -i mysql&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;  &lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-devel-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-test-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-server-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-client-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-shared-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-shared-compat-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;MySQL-embedded-x.x.xx-1.rhel5&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; font-style: italic; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;div style=&quot;display: inline!important;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;2. If you are getting similar &lt;b&gt;OUTPUT 1&lt;/b&gt; as your result from step 1, you may run the following command to completely remove the MYSQL from your redhat/centos linux&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;&lt;b&gt;shell&amp;gt;&lt;/b&gt; &lt;span id=&quot;internal-source-marker_0.22755590174347162&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;i&gt;rpm -e MySQL-*&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;vertical-align: baseline;&quot;&gt;  &lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;3. After your step 2, you are expecting to already removed the MySQL installation.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;you may check if your MySQL data directory (datadir) is still there. Normal MySQL data directory (datadir) locate at /var/lib//mysql&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/6356150535850370185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/07/mysql-uninstall-linux-via-rpm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/6356150535850370185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/6356150535850370185'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/07/mysql-uninstall-linux-via-rpm.html' title='uninstall mysql in linux - via RPM'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-2912662828795531131</id><published>2012-05-17T15:53:00.001+08:00</published><updated>2012-05-17T15:53:04.045+08:00</updated><title type='text'>apache running services - lt-httpd -k start -DSSL</title><content type='html'>a weird case i ever experience today, maybe it sounds weird to me only.&lt;div&gt;a normal running apache server would have the following output(&lt;b&gt;&lt;u&gt;Output1&lt;/u&gt;&lt;/b&gt;), when you run linux command shell&amp;gt; ps -ef | grep httpd&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;u&gt;&lt;b&gt;Output1:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;root      1373     1  0 15:34 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;&lt;div&gt;&lt;div&gt;apache    1375  1373  0 15:34 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;  &lt;div&gt;apache    1376  1373  0 15:34 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;&lt;div&gt;apache    1377  1373  0 15:34 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;&lt;div&gt;apache    1378  1373  0 15:34 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;  &lt;div&gt;apache    1379  1373  0 15:34 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;&lt;div&gt;root      1387 26065  0 15:34 pts/6    00:00:00 grep httpd&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;My Case:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;However, i only have following output (&lt;b&gt;&lt;u&gt;Output2&lt;/u&gt;&lt;/b&gt;), when i run linux command &lt;b&gt;shell&amp;gt;&lt;/b&gt; &lt;i&gt;ps -ef | grep httpd&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Output2:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;apache   30008     1  0 Mar27 ?        00:00:00 /usr/sbin/.libs/lt-httpd -k start -DSSL&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;When i try to restart the apache server via command &lt;b&gt;shell&amp;gt;&lt;/b&gt; &lt;i&gt;/sbin/service httpd restart&lt;/i&gt; &lt;/div&gt;&lt;div&gt;i get the following error show (&lt;b&gt;&lt;u&gt;Output3&lt;/u&gt;&lt;/b&gt;),&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;  &lt;div&gt;&lt;u&gt;&lt;b&gt;Output3:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Stopping httpd:                                            [&lt;font color=&quot;#ff0000&quot;&gt;FAILED&lt;/font&gt;]&lt;/div&gt;&lt;div&gt;Starting httpd: [Thu May 17 14:47:56 2012]&lt;/div&gt;&lt;div&gt;(98)Address already in use: make_sock: could not bind to address [::]:80&lt;/div&gt;  &lt;div&gt;(98)Address already in use: make_sock: could not bind to address &lt;a href=&quot;http://0.0.0.0:80&quot;&gt;0.0.0.0:80&lt;/a&gt;&lt;/div&gt;&lt;div&gt;no listening sockets available, shutting down&lt;/div&gt;&lt;div&gt;Unable to open logs&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The &lt;b&gt;lt-httpd &lt;/b&gt;service is part of the Apache server&amp;#39;s service, hence i make up the decision to kill the process &lt;b&gt;shell&amp;gt;&lt;/b&gt; &lt;i&gt;kill 30008&lt;/i&gt;&lt;/div&gt;&lt;div&gt;After the process being killed, i&amp;#39;m able to start and stop my apache server again.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Explanation:&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The reason of why only one and the only &amp;quot;/usr/sbin/.libs/lt-httpd -k start -DSSL&amp;quot; in the services list, if because due to the incomplete startup of the apache server after the physical server restart. Which then had causing the port 80 being hold by the handicapped apache service.&lt;/div&gt;  &lt;div&gt;Because the restart features of the apache not able to shutdown the handicapped apache service, hence it always throw exceptions/error when you trying to restart/stop the apache server.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;*Welcome any comments to share your point of view. Thanks very much.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/2912662828795531131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/05/apache-running-services-lt-httpd-k.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2912662828795531131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2912662828795531131'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/05/apache-running-services-lt-httpd-k.html' title='apache running services - lt-httpd -k start -DSSL'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-3418875153933596784</id><published>2012-05-09T02:05:00.001+08:00</published><updated>2014-12-10T08:37:31.906+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>how to check in linux if port is occupied?</title><content type='html'>shell&amp;gt; netstat -a | grep &amp;lt;portno&amp;gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;result should be somethings similar as following&lt;/div&gt;&lt;div&gt;_________________________________________________________________________________&lt;/div&gt;&lt;div&gt;&lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821446054 /var/run/dovecot/login/default&lt;/div&gt;  &lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821446052&lt;/div&gt;&lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821446037&lt;/div&gt;&lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821446036&lt;/div&gt;&lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821442460 /var/run/dovecot/login/default&lt;/div&gt;  &lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821442450&lt;/div&gt;&lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821442430&lt;/div&gt;&lt;div&gt;unix  3      [ ]         STREAM     CONNECTED     3821442429&lt;/div&gt;&lt;div&gt;________________________________________________________________________________&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/3418875153933596784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/05/how-to-check-in-linux-if-port-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3418875153933596784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3418875153933596784'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/05/how-to-check-in-linux-if-port-is.html' title='how to check in linux if port is occupied?'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-3634045142676882919</id><published>2012-02-08T15:47:00.001+08:00</published><updated>2014-12-10T08:37:31.910+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Linux - login FTP to transfer file to FTP server</title><content type='html'>1. change the location of the current working directory into the directory where the files you are ready to upload&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;              shell&amp;gt; cd /home/xxxx/&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;2. login into ftp server&lt;/div&gt; &lt;div&gt;&lt;b&gt;              shell&amp;gt; ftp &lt;a href=&quot;http://ftp.xxx.com&quot;&gt;ftp.xxx.com&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;3. server will prompt &amp;quot;&lt;b&gt;Name (ftp.xxx.com:user):&lt;/b&gt;&amp;quot;&lt;/div&gt;&lt;div&gt;    which from here, you would need to type in your FTP username, following with &lt;/div&gt; &lt;div&gt;    &amp;quot;&lt;b&gt;Password:&lt;/b&gt;&amp;quot; after you pressed Enter.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;4. FTP server will show message as following if user successfully login&lt;/div&gt;&lt;div&gt;  &lt;b&gt; 230 User &lt;a href=&quot;mailto:ee@xxx.com&quot;&gt;ee@xxx.com&lt;/a&gt; logged in&lt;/b&gt;&lt;/div&gt; &lt;div&gt;&lt;b&gt;   Remote system type is UNIX.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;   Using binary mode to transfer files.&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;5. you are ready to transfer file from local to FTP server now.&lt;/div&gt;&lt;div&gt;6. In case you are transfer MySQL server installation rpm files&lt;/div&gt; &lt;div&gt;  &lt;b&gt;             ftp&amp;gt; mput MySQL-*.rpm&lt;/b&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;  IF, you are transferring one file, use following instead&lt;/div&gt;&lt;div&gt;&lt;b&gt;               ftp&amp;gt; put MySQL-client-5.5.9-1.linux2.6.x86_64.rpm&lt;/b&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;7. Message will prompt, after Enter from step 6 &lt;/div&gt;&lt;div&gt;              &amp;quot;&lt;b&gt;mput MySQL-client-5.5.9-1.linux2.6.x86_64.rpm?&lt;/b&gt;&amp;quot;&lt;/div&gt;&lt;div&gt; press Enter, and the transfer start&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;8. to check if the file is exists in the FTP server, do as following &lt;/div&gt;&lt;div&gt;               &lt;b&gt;ftp&amp;gt; ls&lt;/b&gt; &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;9. After confirm everythings is ok, disconnect from FTP server&lt;/div&gt;&lt;div&gt;&lt;b&gt;               ftp&amp;gt; quit&lt;/b&gt;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/3634045142676882919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/02/linux-login-ftp-to-transfer-file-to-ftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3634045142676882919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3634045142676882919'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/02/linux-login-ftp-to-transfer-file-to-ftp.html' title='Linux - login FTP to transfer file to FTP server'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-7681149727577003508</id><published>2012-01-18T10:35:00.001+08:00</published><updated>2014-12-10T08:55:57.932+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>Safely rename a database command</title><content type='html'>&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;margin-top:0px;margin-bottom:10px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-image:initial;overflow-x:auto;overflow-y:auto;width:auto;max-height:600px;line-height:18px;text-align:left&quot;&gt; &lt;code style=&quot;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:rgb(255,255,255)&quot;&gt;&lt;font face=&quot;arial, helvetica, sans-serif&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial&quot;&gt;shell&amp;gt; mysqladmin -u root -pXXXX &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;color:rgb(0,0,139)&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial&quot;&gt; spm_new&lt;br&gt; shell&amp;gt; mysqldump -u root -pXXXXX SPM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial&quot;&gt; mysql -u root -pXXXX spm_new &amp;amp;&lt;/span&gt;&lt;/font&gt;&lt;/code&gt;&lt;/pre&gt; &lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;margin-top:0px;margin-bottom:10px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-image:initial;overflow-x:auto;overflow-y:auto;width:auto;max-height:600px;line-height:18px;text-align:left&quot;&gt; &lt;font face=&quot;arial, helvetica, sans-serif&quot;&gt;first, create the new database (with no tables)&lt;/font&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;margin-top:0px;margin-bottom:10px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-image:initial;overflow-x:auto;overflow-y:auto;width:auto;max-height:600px;line-height:18px;text-align:left&quot;&gt; &lt;font face=&quot;arial, helvetica, sans-serif&quot;&gt;secondly, use mysqldump to dump from the original database to the new db. if you connect remotely into the server. Please do allow the mysqldump process to run in background by adding  &amp;quot;&amp;amp;&amp;quot; &lt;/font&gt;&lt;/pre&gt; &lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;margin-top:0px;margin-bottom:10px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-image:initial;font-family:Consolas,Menlo,Monaco,&amp;#39;Lucida Console&amp;#39;,&amp;#39;Liberation Mono&amp;#39;,&amp;#39;DejaVu Sans Mono&amp;#39;,&amp;#39;Bitstream Vera Sans Mono&amp;#39;,&amp;#39;Courier New&amp;#39;,monospace,serif;overflow-x:auto;overflow-y:auto;width:auto;max-height:600px;line-height:18px;text-align:left&quot;&gt; &lt;br&gt;&lt;/pre&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/7681149727577003508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/01/safely-rename-database-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/7681149727577003508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/7681149727577003508'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/01/safely-rename-database-command.html' title='Safely rename a database command'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-5368111502303402317</id><published>2012-01-10T12:14:00.001+08:00</published><updated>2012-08-24T02:29:28.229+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>MySQL Replication - slave status showing LastSQLError</title><content type='html'>&lt;div&gt;If you would need to skip the SQL command from reflect into the slave server, do as following&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;STEPS:&lt;/div&gt;&lt;div&gt;1. mysql&amp;gt; stop slave;&lt;/div&gt;&lt;div&gt;2. mysql&amp;gt;SET GLOBAL sql_slave_skip_counter = 1;&lt;/div&gt; &lt;div&gt;3. mysql&amp;gt; start slave;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;you should be able to see the slave process change into healthy state again.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/5368111502303402317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/01/mysql-replication-slave-status-showing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/5368111502303402317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/5368111502303402317'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/01/mysql-replication-slave-status-showing.html' title='MySQL Replication - slave status showing LastSQLError'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-8549032736916253707</id><published>2012-01-09T14:32:00.001+08:00</published><updated>2013-05-28T10:53:43.418+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>MySQL - ERROR 13 (HY000): Can&#39;t get stat of &#39;/mnt/sharing/success_20111201.csv&#39; (Errcode: 13)</title><content type='html'>&lt;div&gt;
I was tried to restore the CSV file into one of my table, however i face the following error&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ERROR 13 (HY000): Can&#39;t get stat of &#39;/mnt/sharing/&amp;lt;file&amp;gt;.csv&#39; (Errcode: 13)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Follow the following solution to solve your issue,&lt;/div&gt;
&lt;div&gt;
1. move the file into a location where your &quot;mysql&quot; user have the permission to read and write&lt;/div&gt;
&lt;div&gt;
2. in your mysql shell ( after you had login MySQL server via mysql client )&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; e.g:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &lt;b&gt;mysql &amp;gt;&lt;/b&gt;&amp;nbsp;&lt;i&gt;load data local infile &#39;/tmp/success_20111201.csv&#39; into table `nplay_temp`.`sms_out_message` fields terminated by &#39;\t&#39; optionally enclosed by &#39;&quot;&#39; lines terminated by &#39;\n&#39; (`id`, `nplay_user_id`, `price`, `is_ucs`, `creation_date`, `last_modified`, `wappush_link`, `retry_count`, `msisdn`, `message`, `delivered_time`, `state`, `mcc`, `operator_code`, `service_name`, `action`, `ticket_id`, `scheduled_time`, `short_code`, `charge_msisdn`, `meta_data`)&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/8549032736916253707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/01/mysql-error-13-hy000-cant-get-stat-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/8549032736916253707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/8549032736916253707'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/01/mysql-error-13-hy000-cant-get-stat-of.html' title='MySQL - ERROR 13 (HY000): Can&#39;t get stat of &#39;/mnt/sharing/success_20111201.csv&#39; (Errcode: 13)'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-3324668816479672094</id><published>2012-01-05T14:39:00.001+08:00</published><updated>2012-08-24T02:29:28.223+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>to repair a corrupted myisam table</title><content type='html'>first, to make sure the table not in use. &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;you may use the mysql client utility ready by mysql server installation &amp;quot;mysqlcheck&amp;quot; to do the repair &lt;/div&gt;&lt;div&gt;sample command as follow:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;shell&amp;gt; &lt;b&gt;mysqlcheck -u &amp;lt;user_name&amp;gt; -p&amp;lt;password&amp;gt; --auto-repair &amp;lt;database_name&amp;gt; &amp;lt;table_name&amp;gt; &amp;amp;&lt;/b&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/3324668816479672094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2012/01/to-repair-corrupted-myisam-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3324668816479672094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/3324668816479672094'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2012/01/to-repair-corrupted-myisam-table.html' title='to repair a corrupted myisam table'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-670138959528905988</id><published>2011-12-19T10:15:00.001+08:00</published><updated>2011-12-19T10:15:01.515+08:00</updated><title type='text'>undefined symbol: apr_atomic_xchgptr</title><content type='html'>When compiling SVN server, and you get this error &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;undefined symbol: apr_atomic_xchgptr&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;for my cases, it&amp;#39;s due to the SVN library pointing the /usr/lib64 rather than apache&amp;#39;s apr, hence you need to recompile your SVN server by pointing your library to where your apache APR located&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/670138959528905988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2011/12/undefined-symbol-apratomicxchgptr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/670138959528905988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/670138959528905988'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2011/12/undefined-symbol-apratomicxchgptr.html' title='undefined symbol: apr_atomic_xchgptr'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-907076608080783281</id><published>2011-12-16T14:14:00.001+08:00</published><updated>2011-12-16T14:14:45.510+08:00</updated><title type='text'>To find the installed path for a package in Linux</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color:rgb(255,255,255)&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;Try this:&lt;/span&gt;&lt;br style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;rpm -ql packagename&lt;/span&gt;&lt;br style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;&lt;br style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;To find a file anywhere on your system:&lt;/span&gt;&lt;br style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;locate filename&lt;/span&gt;&lt;br style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:13px&quot;&gt;find / -name filename&lt;/span&gt;&lt;/span&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/907076608080783281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2011/12/to-find-installed-path-for-package-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/907076608080783281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/907076608080783281'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2011/12/to-find-installed-path-for-package-in.html' title='To find the installed path for a package in Linux'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7759186964959066961.post-2835511693571484226</id><published>2011-12-09T11:53:00.001+08:00</published><updated>2011-12-09T11:53:52.867+08:00</updated><title type='text'>Fixing a php.ini configuration file location problem</title><content type='html'>&lt;font class=&quot;Apple-style-span&quot; face=&quot;arial, helvetica, sans-serif&quot;&gt;to request the server to change the location where it should read the php.ini from?&lt;/font&gt;&lt;div&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;arial, helvetica, sans-serif&quot;&gt;&lt;br&gt; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;arial, helvetica, sans-serif&quot;&gt;Just add an entry in httpd.conf (/etc/httpd/conf/httpd.conf) as following:&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;arial, helvetica, sans-serif&quot;&gt;&lt;br&gt; &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;note&quot; style=&quot;font-size: medium; width: 65em; margin-left: 10px; white-space: pre-wrap; background-color: rgb(255, 255, 255); &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; face=&quot;arial, helvetica, sans-serif&quot;&gt;&lt;b&gt;PHPIniDir  &amp;quot;/etc&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;/pre&gt; &lt;pre class=&quot;note&quot; style=&quot;font-size: medium; width: 65em; margin-left: 10px; white-space: pre-wrap; background-color: rgb(255, 255, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, sans-serif; &quot;&gt;&lt;br&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;note&quot; style=&quot;font-size: medium; width: 65em; margin-left: 10px; white-space: pre-wrap; background-color: rgb(255, 255, 255); &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, helvetica, sans-serif; &quot;&gt;* make sure your php.ini is under /etc/php.ini&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://blue2tech.blogspot.com/feeds/2835511693571484226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blue2tech.blogspot.com/2011/12/fixing-phpini-configuration-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2835511693571484226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7759186964959066961/posts/default/2835511693571484226'/><link rel='alternate' type='text/html' href='http://blue2tech.blogspot.com/2011/12/fixing-phpini-configuration-file.html' title='Fixing a php.ini configuration file location problem'/><author><name>blue</name><uri>http://www.blogger.com/profile/05611189985322432408</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>