Di bulan Ramadhan yang mana witir biasanya didirikan sebagai penamat kepada solat terawih. Jika kita bangkit bersahur dan punyai masa untuk terus menunaikan solat sunat lain, ia DIHARUSKAN tanpa perlu dimulai dengan satu rakaat witir. Tidak perlu pula ditutupi dengan witir lain selepas itu.
Wajar dituruti pandangan majoriti ulama yang MELARANG ditunaikan solat witir sekali lagi di akhir malam. Cukup sekali witir yang telah didirikan di akhir terawih bersama imam berteatan dengan saranan Nabi Muhammad s.a.w.
[source]
Thursday, July 25, 2013
Wednesday, July 24, 2013
MATLAB series: Neural Network Toolbox - newff
1) Calling newff function using the command;
net=newff(p,t,2);
will automatically scale the inputs and outputs to;
2) If you were to directly export the weight generated from
[net,tr]=train(net,p,t);
to your program (i.e. C++), you will end up getting different result as compared to results generated by MATLAB.
3) This behavior was resulted from the preprocessing function described in (1).
4) Hence, to use the weight in C++, you have to scale your input before multiply with weights and rescale your output to get the real output values.
For instance, to scale the input using mapminmax, you can use
y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin;
to get the scaled input between ymin = -1 and ymax = 1.
Finally, to scale the output back to original unit of the target, you can use
x = (xmax-xmin)*(y-ymin)/(ymax-ymin) + xmin;
5) Alternatively, you can disable the scaling preprocessing function by execute either of these command
net=newff(p,t,2);
%net.inputs{1}.processFcns = {};
%net.outputs{2}.processFcns = {};
6) The weights value generated can be directly exported to your C++ program.
Enjoy!!
UPDATE
preprocessing: mapstd
To scale the input:
y = (x-xmean) * (ystd/xstd) + ymean
To scale the output:
x = (y-ymean) * (xstd/ystd) + xmean
[sources: 1, 2]
net=newff(p,t,2);
will automatically scale the inputs and outputs to;
net.inputs{1}.processFcns = 'fixunknowns' 'removeconstantrows' 'mapminmax'
net.outputs{2}.processFcns
= 'removeconstantrows' 'mapminmax'2) If you were to directly export the weight generated from
[net,tr]=train(net,p,t);
to your program (i.e. C++), you will end up getting different result as compared to results generated by MATLAB.
3) This behavior was resulted from the preprocessing function described in (1).
![]() |
| network generated from newff(p,t,2) |
![]() |
| network with 2 nodes in hidden layer |
![]() |
| Process Input 1 from the default value of processFcns |
![]() |
| Process Output 1 from the default value of processFcns |
For instance, to scale the input using mapminmax, you can use
y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin;
to get the scaled input between ymin = -1 and ymax = 1.
Finally, to scale the output back to original unit of the target, you can use
x = (xmax-xmin)*(y-ymin)/(ymax-ymin) + xmin;
5) Alternatively, you can disable the scaling preprocessing function by execute either of these command
net=newff(p,t,2);
net.inputs{1}.processFcns =
{'fixunknowns' 'removeconstantrows'};
net2.outputs{2}.processFcns = {'removeconstantrows'};%net.inputs{1}.processFcns = {};
%net.outputs{2}.processFcns = {};
6) The weights value generated can be directly exported to your C++ program.
Enjoy!!
UPDATE
preprocessing: mapstd
To scale the input:
y = (x-xmean) * (ystd/xstd) + ymean
To scale the output:
x = (y-ymean) * (xstd/ystd) + xmean
[sources: 1, 2]
Friday, June 28, 2013
Matlab Installation in Windows 7: Version 2007 and older
To install Matlab 2007 on Windows 7
1) Change Windows 7 Theme to the classic one (windows classic)
2) Install Matlab.
To use Matlab with other windows 7 themes you have to change java used by matlab.
Update
1) in my case, jre7 will not work. Change back to original java provided by Matlab and turns out the program run perfectly.
1) download latest java version and install it.
2) go to C:\Program Files(x86)\MATLAB\R2007b\sys\java\jre\win32 you will find a file named jre1.6.0 rename it to Original_jre1.6.0
3) go to C:\Program Files\Java you will find file named jre7 (jetX for Xversion) copy to C:\Program Files(x86)\MATLAB\R2007b\sys\java\jre\win32
and rename it to jre1.6.0
Now you can use matlab with all themes. [1]
Change the Matlab locale
Unfortunately, there is no other way to change the Matlab locale except changing the user locale & system locale on Windows 7.
1) Go to Control Panel -> Region and Language
2) Formats Tab -> Choose your local
3) Administrative Tab -> Choose your local
4) Reboot
5) Enjoy your Matlab in your selected locale. [2]
1) Change Windows 7 Theme to the classic one (windows classic)
2) Install Matlab.
To use Matlab with other windows 7 themes you have to change java used by matlab.
Update
1) in my case, jre7 will not work. Change back to original java provided by Matlab and turns out the program run perfectly.
1) download latest java version and install it.
2) go to C:\Program Files(x86)\MATLAB\R2007b\sys\java\jre\win32 you will find a file named jre1.6.0 rename it to Original_jre1.6.0
3) go to C:\Program Files\Java you will find file named jre7 (jetX for Xversion) copy to C:\Program Files(x86)\MATLAB\R2007b\sys\java\jre\win32
and rename it to jre1.6.0
Now you can use matlab with all themes. [1]
Change the Matlab locale
Unfortunately, there is no other way to change the Matlab locale except changing the user locale & system locale on Windows 7.
1) Go to Control Panel -> Region and Language
2) Formats Tab -> Choose your local
3) Administrative Tab -> Choose your local
4) Reboot
5) Enjoy your Matlab in your selected locale. [2]
Wednesday, June 26, 2013
Officially Performed Full Roll Over
2013年 6月26日
水曜日
Around 07:45
福井県福井市大宮6-10-16LLハイム5、203号室
Saturday, June 22, 2013
Manjaro-xfce 0.8.6 Installation Notes
Basic Installation
1) Installation was pretty straight forward. Either run it from CD/DVD or boot from USB.
2) To create Live USB, a few choices of software are available for free.
-- USB Live Creator from pendrivelinux.com
-- Unetbootin
-- Linux Live USB Creator
3) All products did not provide Manjaro 0.8.6 as one of the choices in the selection list. Even some (Unetbootin if I'm not mistaken), did not even list Manjaro. For my case, I use Linux Live USB creator. Manjaro 0.8.5 was selected from the list and has been warned regarding the compatibility of the distro version. Just ignore the warning and the software will create your USB live based on Manjaro 0.8.5 settings. The creation of USB live only takes a few minutes. In case you want to use USB Live Creator, just select Arch Linux in the list. I think, there will be no problem [has not been tested].
4) In my case, I did dual booting along Windows 7. One thing for sure, I hate the fact that GRUB2 will overwrite windows MBR. Luckily, there is alternative and I have successfully install my 2nd OS without the need of replacing MBR with GRUB2 [1][2].
5) In [1], the author formatted one of the partition as FAT32. In my case, I skip this step. The partition of my laptop are as follows;
-- /dev/sda1 [Primary Partition] [ASUS reserved partition. Windows 7 boot loader] [NTFS]
-- /dev/sda2 [Primary Partition] [Windows 7] [NTFS]
-- /dev/sda3 [Primary Partition] [Manjaro; root, GRUB2, swap file] [ext4]
-- /dev/sda4 [Extended Partition]
-- /dev/sda5 [Logical Partition] [My Data 1] [NTFS]
-- /dev/sda6 [Logical Partition] [My Data 2] [NTFS]
6) Restart the PC and boot the USB live. Install from the launcher on the desktop.
7) In case you hate the CLI installer and want to run the installation process using terminal, type command below in terminal.
8) For my case, I installed the Manjaro in /dev/sda3 together with GRUB2. I skip the creation of swap partition for later configuration using swap file.
Windows 7 Dual-boot Configuration
1) Reboot into the USB live once again.
2) Open the terminal and type the following command to copy the first 512 bytes of data from the Linux root partition into windows NTFS partition.
3) Reboot your pc into Windows. Open command window as admin [type cmd in the search box, right click on the cmd and select to "Run as administrator"].
4) Copy linux.bin file into the windows boot partition (e.g. C:)
5) Type the following command inside cmd window. You can change the "Linux" name to any other name that suit you.
6) The command will give an alphanumeric identifier (e.g. d7294d4e-9837-11de-99ac-f3f3a79e3e93) that will be referred to as ID in the remaining steps.
7) Type the following command in the cmd window. The command first specify the partition where linux.bin resides. Then, specifying the path to linux.bin file followed by creating an entry for booting list after "Windows 7" option. The timeout can be set to any number in seconds.
8) If you want to delete the Linux option, you could do it by following commands. The first command will give you a list of IDs in the boot manager. Identify the ID and execute second command. [1][3][4].
9) Enjoy your newly installed Manjaro OS.
Post-installation Tweak
1) Make swap file [5].
2) Mount windows partition automatically using ntfs-2g and fstab [6][7]. The uid and gid can be found using the following command;
3) Font rendering tweak to make font look better. Use the general way as the easy way will give error result.
4) Setting NTP in Windows 7 to ensure time sync between OS. Ensure your Manjaro time is set to UTC
5) Optimize battery performance [8][9]. TLP tweak works like a charm..... improved my battery life about double of times as to compared without it.
6) Script to test the battery usage during sleep/suspend mode.
7) Further Arch Linux fine tuning post-installation guide. See also part III and part IV
8) Japanese input
9) Install dmenu
10) Edit grub bootloader to allow "hibernate". For my case, using swap file requires some modification as follows [10][11][12][13]:
Note the physical_offset of the first line (e.g. 190464). Then, open the grub bootloader with command:
Change the GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="resume=/dev/sda6 resume_offset=190464". Then automatically regenerate grub gile with:
Next is to add "resume" hook to mkinitcpio.conf:
put "resume" before "filesystems" at the HOOKS: line:
Finally rebuild the initrd image:
"linux39" must be chosen accordingly by typing:
11) Install Slim
1) Installation was pretty straight forward. Either run it from CD/DVD or boot from USB.
2) To create Live USB, a few choices of software are available for free.
-- USB Live Creator from pendrivelinux.com
-- Unetbootin
-- Linux Live USB Creator
3) All products did not provide Manjaro 0.8.6 as one of the choices in the selection list. Even some (Unetbootin if I'm not mistaken), did not even list Manjaro. For my case, I use Linux Live USB creator. Manjaro 0.8.5 was selected from the list and has been warned regarding the compatibility of the distro version. Just ignore the warning and the software will create your USB live based on Manjaro 0.8.5 settings. The creation of USB live only takes a few minutes. In case you want to use USB Live Creator, just select Arch Linux in the list. I think, there will be no problem [has not been tested].
4) In my case, I did dual booting along Windows 7. One thing for sure, I hate the fact that GRUB2 will overwrite windows MBR. Luckily, there is alternative and I have successfully install my 2nd OS without the need of replacing MBR with GRUB2 [1][2].
5) In [1], the author formatted one of the partition as FAT32. In my case, I skip this step. The partition of my laptop are as follows;
-- /dev/sda1 [Primary Partition] [ASUS reserved partition. Windows 7 boot loader] [NTFS]
-- /dev/sda2 [Primary Partition] [Windows 7] [NTFS]
-- /dev/sda3 [Primary Partition] [Manjaro; root, GRUB2, swap file] [ext4]
-- /dev/sda4 [Extended Partition]
-- /dev/sda5 [Logical Partition] [My Data 1] [NTFS]
-- /dev/sda6 [Logical Partition] [My Data 2] [NTFS]
6) Restart the PC and boot the USB live. Install from the launcher on the desktop.
7) In case you hate the CLI installer and want to run the installation process using terminal, type command below in terminal.
sudo setup
8) For my case, I installed the Manjaro in /dev/sda3 together with GRUB2. I skip the creation of swap partition for later configuration using swap file.
Windows 7 Dual-boot Configuration
1) Reboot into the USB live once again.
2) Open the terminal and type the following command to copy the first 512 bytes of data from the Linux root partition into windows NTFS partition.
dd if=/dev/sda3 of=/run/media/<user>/<partition-name>/linux.bin bs=512 count=1
3) Reboot your pc into Windows. Open command window as admin [type cmd in the search box, right click on the cmd and select to "Run as administrator"].
4) Copy linux.bin file into the windows boot partition (e.g. C:)
5) Type the following command inside cmd window. You can change the "Linux" name to any other name that suit you.
bcdedit /create /d “Linux” /application bootsector
6) The command will give an alphanumeric identifier (e.g. d7294d4e-9837-11de-99ac-f3f3a79e3e93) that will be referred to as ID in the remaining steps.
7) Type the following command in the cmd window. The command first specify the partition where linux.bin resides. Then, specifying the path to linux.bin file followed by creating an entry for booting list after "Windows 7" option. The timeout can be set to any number in seconds.
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path \linux.bin
bcdedit /displayorder {ID} /addlast
bcdedit /timeout 15
8) If you want to delete the Linux option, you could do it by following commands. The first command will give you a list of IDs in the boot manager. Identify the ID and execute second command. [1][3][4].
bcdedit
bcdedit /delete {ID}
9) Enjoy your newly installed Manjaro OS.
Post-installation Tweak
1) Make swap file [5].
2) Mount windows partition automatically using ntfs-2g and fstab [6][7]. The uid and gid can be found using the following command;
sudo nano /etc/passwd
3) Font rendering tweak to make font look better. Use the general way as the easy way will give error result.
4) Setting NTP in Windows 7 to ensure time sync between OS. Ensure your Manjaro time is set to UTC
hwclock --systohc --utc
5) Optimize battery performance [8][9]. TLP tweak works like a charm..... improved my battery life about double of times as to compared without it.
6) Script to test the battery usage during sleep/suspend mode.
7) Further Arch Linux fine tuning post-installation guide. See also part III and part IV
8) Japanese input
9) Install dmenu
sudo pacman -S dmenu
10) Edit grub bootloader to allow "hibernate". For my case, using swap file requires some modification as follows [10][11][12][13]:
sudo filefrag -v /swapfile
Note the physical_offset of the first line (e.g. 190464). Then, open the grub bootloader with command:
sudo nano /etc/default/grub
Change the GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="resume=/dev/sda6 resume_offset=190464". Then automatically regenerate grub gile with:
sudo grub-mkconfig -o /boot/grub/grub/cfg
Next is to add "resume" hook to mkinitcpio.conf:
sudo nano /etc/mkinitcpio.conf
put "resume" before "filesystems" at the HOOKS: line:
HOOKS="....... resume filesystems"
Finally rebuild the initrd image:
sudo mkinitcpio -p linux39
"linux39" must be chosen accordingly by typing:
ls -a /etc/mkinitcpio.d/
11) Install Slim
sudo pacman -S slim sudo systemctl enable slim.service -f
Thursday, June 20, 2013
Hardware :- Complete!
I'm very happy today.....
My effort for the past 1 month has not been wasted....
The circuit & hardware system just worked!!!
Well.... Give my self a BIGGGG HUGGG~!
~in the middle of running Manjaro xfce4 using live USB~
~in fact, writing this entry using built in firefox~
~decided to install on my laptop to use for entertainment purposes; no need to burden my CPU with unnecessary work~
~arrrh.... upgrading manjaro completed!! ~
~details on next entry~
My effort for the past 1 month has not been wasted....
The circuit & hardware system just worked!!!
Well.... Give my self a BIGGGG HUGGG~!
~in the middle of running Manjaro xfce4 using live USB~
~in fact, writing this entry using built in firefox~
~decided to install on my laptop to use for entertainment purposes; no need to burden my CPU with unnecessary work~
~arrrh.... upgrading manjaro completed!! ~
~details on next entry~
Sunday, June 16, 2013
Linux Series - Arch Linux
Since my last post <distro hopper?>, I rarely boot OS other than Win 7.
Yesterday, out of no where I felt like wanted to try Arch Linux. I'm sure I was reading somewhere on Arch Linux but couldn't found the memory which probably embedded deep enough in my brain.
Anyway, I spent my whole Friday doing the installation stuff.
I was wondering what is Arch Linux all about. Without much thinking, I started to download the ISO image and walllaaahh!!.... Virtual box installation.... USB live... and so on....
Basically, what I've learnt within about 36 hours is that..... Arch Linux is really cool....
If you want to control everything (~you could say everything) you want to put into your customized OS... then, Arch Linux might be the one suit you best...
I like ubuntu very much.... ever since version 7.04 if I'm not mistaken.... up until now.... So, I could say that I quite comfortable with debian base linux.. It just that... I want something new.... something that could give me the WoW!! thing like the first time I use ubuntu.... You know.... command line... terminal.... sudo stuff....
Well, I have successfully installed basic Arch Linux with Xfce4 Desktop Environment.... not really complete though.... Then I thought.... I don't have time for this... I mean.... stuff is really cool but you have to spend considerable time to learn something new..... pacman... yaourt.... packer.... systemd...
[pacman is very nice and I think I like it better than any other distro package manager that I have used so far.... ]
Then.... I googled the linux distribution ... finding the Arch Linux based distro... I still love and willing to learn more on Arch Linux.... I stumble upon Chakra and Manjaro..... Watched Chakra review on youtube... Manjaro as well....
It seems that Chakra does not suit me well... because the path they have taken that deviate away from the original Arch Linux motto....
Well.... now I have Arch Linux 64 and Manjaro 64 on my Virtual Box.... Frankly speaking... I like Manjaro... love it at first use.... Manjaro with Xfce4.... simple... fast.. clean... and geeky!! yeah...
Yesterday, out of no where I felt like wanted to try Arch Linux. I'm sure I was reading somewhere on Arch Linux but couldn't found the memory which probably embedded deep enough in my brain.
Anyway, I spent my whole Friday doing the installation stuff.
I was wondering what is Arch Linux all about. Without much thinking, I started to download the ISO image and walllaaahh!!.... Virtual box installation.... USB live... and so on....
Basically, what I've learnt within about 36 hours is that..... Arch Linux is really cool....
If you want to control everything (~you could say everything) you want to put into your customized OS... then, Arch Linux might be the one suit you best...
I like ubuntu very much.... ever since version 7.04 if I'm not mistaken.... up until now.... So, I could say that I quite comfortable with debian base linux.. It just that... I want something new.... something that could give me the WoW!! thing like the first time I use ubuntu.... You know.... command line... terminal.... sudo stuff....
Well, I have successfully installed basic Arch Linux with Xfce4 Desktop Environment.... not really complete though.... Then I thought.... I don't have time for this... I mean.... stuff is really cool but you have to spend considerable time to learn something new..... pacman... yaourt.... packer.... systemd...
[pacman is very nice and I think I like it better than any other distro package manager that I have used so far.... ]
Then.... I googled the linux distribution ... finding the Arch Linux based distro... I still love and willing to learn more on Arch Linux.... I stumble upon Chakra and Manjaro..... Watched Chakra review on youtube... Manjaro as well....
It seems that Chakra does not suit me well... because the path they have taken that deviate away from the original Arch Linux motto....
Well.... now I have Arch Linux 64 and Manjaro 64 on my Virtual Box.... Frankly speaking... I like Manjaro... love it at first use.... Manjaro with Xfce4.... simple... fast.. clean... and geeky!! yeah...
![]() |
| XP, OS X, Mint, Arch Linux, Manjaro in action |
![]() |
| [Manjaro] Updating with simple command:- sudo pacman -Su |
How do I describe Arch Linux (~and its derivatives distro) in simple word....
Awesome
Subscribe to:
Posts (Atom)





