未分類

GPUマイニングをやってみました

グラフィックカードを2個購入したので、GPUマイニングをやってみました。

続きを読む

Tips for Excel calculation

Today I would like to share some important tips about excel calculation. Sometimes, we change today date but it change automatically arriving today date when we open the file.

In this time, how to fix it.

How to Change Excel Calculation Options

Select the data we want to change and go the Excel ribbon > Formulas tab > Calculation group, click the Calculation Options button and select one of the following options:

Automatic (default) – tells Excel to automatically recalculate all dependent formulas every time any value, formula, or name referenced in those formulas is changed.

Manual – turns off automatic calculation in Excel. Open workbooks will be recalculated only when you explicitly do.

How to force recalculation in Excel

To manually recalculate all open worksheets and update all open chart sheets, go to the Formulas tab > Calculation group, and click the Calculate Now button.

Hope you find it interesting and useful.

By Ami



個人用ファイルサーバー機の作成(トラブルに遭遇)

前回搭載したハードディスクを使用して
mdadmのソフトウェアRAIDを組む予定でした。
RAID10アレイは問題無く組めたのですが、
アレイの再構築処理完了後、再起動をかけると
起動時に以下の画像のメッセージが表示されるようになりました。

前回搭載したHDDのS.M.A.R.T値でエラーが見つかったようです。
実際S.M.A.R.T値がどうなっているのか、
Windowsを起動して、Crystal disc info を使用して確認してみました。
健康状態が異常と表示されており、
シークエラーレートの現在値が20台、最悪値が1となっていました。
(画像のHDDの他にも4台のHDDが同じような症状で異常と表示)

ディスクに異常があるようですが、
1時間ほどアイドル状態で放置しておくと
以下の画像のように徐々に現在値が改善されているように見えます。

このまま復活するのではないかと思い更に放置すると、

現在値が100まで回復、健康状態も正常となりました。

根本的な原因はまだ見つけられていませんが、
Raidアレイ再構築時の長時間の書き込み処理で
磁気ヘッドの移動になんらかの異常がでているのではないでしょうか。

冷却ファン等の振動が原因なのであれば、8台中5台に異常が出て、
3台は正常というのも不可解です。

ちなみに前回落下させた4台のHDDの内、
エラーが出ているのは1台、他の4台は落下させていないHDDです。

このままだと、ファイルサーバーとして使用するのは不安ですので、
早めに原因を見つけたいです。

水曜担当:Tanaka



Magic methods in PHP – Part 1

When we are developing web systems using PHP, we might encounter to use magic methods in PHP a lot. Today I would like to talk about some important magic methods provided by PHP.

Actually there are lots of magic methods in PHP. For example,

  • __construct()
  • __destruct()
  • __call($fun, $arg)
  • __callStatic($fun, $arg)
  • __get($property)
  • __set($property, $value)
  • __isset($content)
  • __unset($content)
  • __sleep()
  • __wakeup()
  • __toString()
  • etc..

But we don’t use all of the things unless it’s necessary. I will only write about a few methods which are mostly used in my experience.

Construct

If you define this method in your class, it will be called automatically when an object is instantiated. The purpose of this method is to assign some default values to the properties of the object. This method is also called a constructor.

<?php
class Student {
    private $name;
 
    public function __construct($name) 
    {
        $this->name = $name;
    }
}
 
$student = new Student('yuuma');
?>

Destruct

The __destruct () method is called destructor and is called when the object is destroyed. Generally also called when script stops or exits. The purpose of this method is to provide an opportunity to save the state of the object or any other cleaning you want to do.

<?php
class Student {
    private $name;
 
    public function __construct($name) 
    {
        $this->name = $name;
    }
 
    public function __destruct() 
    {
        echo 'This will be called when the class has been closed';
        // file close, removing session etc.
    }
}
 
$student = new Student('yuuma');
?>

Set

The magic __set () method is called when you try to set data on properties of inaccessible or non-existent objects. The purpose of this method is to set additional object data for which you have not explicitly defined object properties.

<?php
class Student {
    protected $data = array();
 
    public function __set($name, $value) 
    {
        $this->data[$name] = $value;
    }
}
 
$student = new Student();
//  __set() called
$student->name = 'yuuma';

As you can see from the example above, we are trying to set the property of the name, which does not exist. And so the __set () method is called. The first argument to the __set () method is the name of the property that is being accessed, and the second argument is the value we are trying to set.

Get

In the case of the __set () method example in the previous section, we discussed how to set values for non-existent properties. The __get () method is the exact opposite. The magic __get () method is called when you try to read data from properties of inaccessible or non-existent objects. The purpose of this method is to provide values for these properties.

<?php
class Student {
    private $data = array();
 
    public function __set($name, $value) 
    {
        $this->data[$name] = $value;
    }
 
    public function __get($name) 
    {
        If (isset($this->data[$name])) {
            return $this->data[$name];
        }
    }
}
 
$student = new Student();
 
//  __set() called
$student->name = 'yuuma';   
 
//  __get() called
echo $student->name;                      
?>

I would like to write more but I think the article is a little bit long for now. So I will write a part 2 in next week relating with this week article. So see you next week.

By Yuuma



初めまして


Hello Everyone,
I am ami, which is my Japanese name. My actual name is Khin Moh Moh Naing.
I am a web developer, loves to fix bugs and passionate in learning new technologies.

I graduated from Computer University from Mandalay in Myanmar with a degree in Computer Science.
Since I graduated from university, I am continuously working as a web developer.
I have been working in the industry of technology for over 2 years with the languages PHP and Laravel.

At the end of 2020 I started to join Gigas Japan and it’s such a great pleasure to meet you all.

One of my dreams is to work in Japan and want to study modern technologies and Japanese working culture.
In the future, I am also interested in Mobile Development. Currently I am working in web related system.
I am not very well communication in Japanese language but I will keep learning Japanese and try to improve my Japanese skills.
I will be writing tech related articles every Friday.

It’s nice to meet to you again everyone. よろしくお願いいたします。

By Ami




アプリ関連ニュース

お問い合わせはこちら

お問い合わせ・ご相談はお電話、またはお問い合わせフォームよりお受け付けいたしております。

tel. 06-6454-8833(平日 10:00~17:00)

お問い合わせフォーム