Search this site

Friday, April 19, 2019

pip error main(?)

I just upgrade my pip in raspdebian and I got this error when I run pip

Error message

Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in
    from pip import main
ImportError: cannot import name 'main'

I already tried to reinstall pip from apt but it didn't solve the problem

In the end, I found something

type in terminal
nano  /usr/bin/pip
that will open pip file like this
import sys
from pip import main
if __name__ == '__main__':
     sys.exit(main())

1. Change "from pip import main" to "from pip import __main__"
2. Change "sys.exit(main())" to "sys.exit(__main__._main())"

The result is like this
import sys
from pip import __main__
if __name__ == '__main__':
     sys.exit(__main__._main())
exit nano and save

and you can use your pip again

Sunday, February 3, 2019

Change phpmyadmin's URL in ubuntu

A few years ago I put some note for windows here
and now I will make one for ubuntu

So for example, I want to change my phpmyadmin link
default: 127.0.0.1/phpmyadmin and I want to change it to 127.0.0.1/myownlink

we need to change 1 setting in apache2
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
change the alias
Alias /phpmyadmin /usr/share/phpmyadmin
to
 Alias /myownlink /usr/share/phpmyadmin

then we need to activate and restart apache2 (maybe only restart apache2 will do it)
 sudo a2enconf phpmyadmin.conf
 sudo systemctl reload apache2.service

done yey \o/ 

MySQL in ubuntu 18.04 (update)

It was a long time ago, I make a post (or my personal note) about how to install MySQL in ubuntu
and it seems now, the version and how to install is already changed so I make this post.

previous post here

Step:
0. apt get update (start with this)
sudo apt-get update
1. Installing MySQL
sudo apt-get install mysql-server
1.1. mysql secure installation (optional but recommended)
sudo mysql_secure_installation
2. Installing apache2
sudo apt-get install apache2
3. Installing phpmyadmin
sudo apt-get install phpmyadmin
4. connect apache2 and phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
5. activate it
sudo a2enconf phpmyadmin.conf
6. restart apache
sudo systemctl reload apache2.service

ok done

Wednesday, September 12, 2018

Arduino nano suddenly get error: avrdude: stk500_getsync() (Solved)

I am still new in arduino things
I use the arduino IDE from windows store with auto update on.

So basically what happen is like this:
My PC using Arduino IDE v1.8.5 because I never close that window so it never update.
And then when I try to upload a program from my laptop which is use Arduino IDE v1.8.7, I got these error

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x53
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x65
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x75
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x70
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x50
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x44
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0d
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x72
An error occurred while uploading the sketch
After doing some googling (thanks Mr. google), I found out that this error means that you computer has connection problem with your arduino, meanwhile I didn't do anything since the last time.

The same error happened after I update my IDE in my PC from v1.8.5 to v1.8.7

Finally, I found out that I used the wrong processor
So basically there are update in bootloader of nano and I need to use the ATmega328(Old Bootloader) instead of ATmega328

And that fix all my connection problem
I hope this can help, for someone who still use the old nano bootloader

Thursday, May 31, 2018

Install Jupyter in windows 10

As my previous diary is about jupyter here

so now I will make a note how to install jupyter in windows 10 (my current OS)
I assume you already have anaconda installed

To install jupyter we need to do this step
python  -m pip install jupyter

I think it will be the same in linux, but I haven't try it yet

pip install jupyter
And done


Then after that you can run it by type
jupyter notebook
on you command prompt

It will open http://localhost:8888/ in your browser

Jupyter python

So I started to use python 1 year ago,
usually I just write the code in notepad++ (really?)
yeah it is notepad++
not because I don't need any IDE, but just because I am too lazy to install it
and notepad++ is enough for me (I just need the colors things - for now)

Then I saw some of my friend use jupyter, so I will try to use it
why?
because I curious about ipython, i from internet maybe, I am not sure
but maybe it will be fun

It is for debugging perline/cell and make a beautiful doc in your doc

I already put how to install jupyter in windows 10 here

Tuesday, February 4, 2014

Enable login in phpmyadmin

Now I want to enable login in my phpmyadmin

First change root password (both) using phpmyadmin
Then after you change it, it will send you an error message
Open this file
C:\xampp\phpMyAdmin\config.inc.php
Change the line 19
$cfg['Servers'][$i]['auth_type'] = 'config';
To
$cfg['Servers'][$i]['auth_type'] = 'cookie';
And also line 23
$cfg['Servers'][$i]['AllowNoPassword'] = true;
To
$cfg['Servers'][$i]['AllowNoPassword'] = false;
After that restart you apache
Done
 

Change phpmyadmin's URL in XAMPP windows

I just setting my phpmyadmin in windows
I installed it using XAMPP

And I want to change the phpmyadmin's URL
default: 127.0.0.1/phpmyadmin and I want to change it to 127.0.0.1/myownlink

It's not hard
just open this file
C:\xampp\apache\conf\extra\httpd-xampp.conf
 In line 99
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
Change it to
 Alias /myownlink "C:/xampp/phpMyAdmin/"

And don't forget to restart your apache in XAMPP
Done

Wednesday, January 29, 2014

Power Saver in Ubuntu

After I move to ubuntu 13.10 from windows 7
I have some problem
one of them is power saver in ubuntu
If my windows can stay 3 hour with battery only then my ubuntu only 1 hour

One of my friends tell me to install power top
it is a software for linux to save your power

sudo apt-get install powertop

And run in terminal

sudo powertop

you can choose which process you want to save

Sunday, January 26, 2014

Apache can't restart

When I restart apache, I get this message:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
The solution is

  • sudo nano /etc/apache2/httpd.conf or apache2.conf
  • Add: ServerName localhost
  • And restart apache: sudo /etc/init.d/apache2 restart

Source: link

Installing apache, PHP5, and MySQL in ubuntu

Well, this blog will be my own note for something like this.
I hope this also help someone who still don't know how to install it.

Step:
1. sudo su (must be root)
2. Installing MySQL

  • apt-get install mysql-server mysql-client
  • To check: type mysql in terminal

3. Installing Apache2

  • apt-get install apache2
  • To check: go to your browser and open your IP for example localhost (if you using xampp) or http://192.168.0.100 
  • Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the/etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d. 

4. Installing PHP5

  • apt-get install php5 libapache2-mod-php5
  • After that restart apache
  • /etc/init.d/apache2 restart 
  • To check: go to /var/www and make info.php like this

phpinfo();
?>

  •  And open it with your browser IP/info.php or http://192.168.0.100/info.php

5. MySQL support PHP5

  • we need MySQL for PHP5 support
  • apt-cache search php5
  • pick anything you need
  • apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
  • After that restart apache again
  • /etc/init.d/apache2 restart
  • To check: reopen info.php and it will show some new module

6. Install phpmyadmin

  • to help us to manage mysql
  • apt-get install phpmyadmin
  • To check: go to your browser, open your IP/phpmyadmin or http://192.168.0.100/phpmyadmin

Source: link

Saturday, October 19, 2013

Play Media Player Format in Ubuntu

This time I will post about play media player format (mp3,mp4,ect) in ubuntu
because by default ubuntu will not download the codec

Step:
  1. Open Ubuntu Software Center
  2. In search, type: restricted extras
  3. Choose Ubuntu restricted extras
  4. Install
  5. And now you can play your music and video file

(source: link)

Can't boot Windows 7 after installing ubuntu

At first I install windows 7 and after that I install ubuntu 13.10.
But after install it, I can't boot to my old windows

Here is the step to fix this problem:
(source: link)
  1. Boot in ubuntu
  2. Open your terminal (just search terminal)
  3. type:
    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  4. Enter your password and enter.
  5. type:
    sudo apt-get install -y boot-repair && (boot-repair &)
  6. It will make you install boot-repair in ubuntu
  7. Repair your boot file
  8. Restart
  9. Try to boot to your windows 7

Ubuntu Installation (Dual Boot)

First I've install Windows 7 in my laptop and now I want to add Ubuntu 13.10 (Saucy Salamander).
And this is my first time to install dual boot ubuntu.

This is the step of installation:
  1. From windows 7 you need to prepare (and format) the primary partition for ubuntu partition (I using EaseUS Partition. You can download it from here). Ubuntu using ext2 format. Note: ubuntu only allow 4 primary partition so change all your data partition as logical partition
  2. After that you can install your ubuntu via DVD or flashdisk (I using DVD). You can read the installation step here. For step 4 using try something else and choose your partition that you have prepared in number 1.
  3. And now you have Windows and ubuntu in your computer.

Wednesday, July 17, 2013

Fall anime 2013 v1

wow in this link there are a lot of second season animes in Fall 2013

Magi, Kuroko no Basuke, Valvrave, Freezing, Infinite Stratos, White Album (I still haven't watch this one)

And also some good OVAs

KissXSis, Yahari, Yakuindomo

And don't forget the movies

Chuunibyou, Code Geass:Akito, Kara no Kyoukai, Madoka, and Persona

link: http://i4.minus.com/ibpnru1wwuvbln.jpg


Tuesday, July 9, 2013

The World God Only Knows III v0.1

Actually I rather disappointed because they didn't make some conquers
I want to see how Keima conquer Yui

As its title it will start with Goddess Arc

And also this is the third anime that make us don't understand all of the story if we don't read the manga
(another is Hayate season 3 and Rozen Maiden season 3)
And coincidentally this is also season 3 of TWGOK

Hmm...
Also I like the first season opening than this
because it seems the opening is not TWGOK opening
(just my thought)

Saturday, July 6, 2013

To Aru Kagaku no Railgun S v0.1

Just watch to aru kagaku no railgun S episode 13

yeah maybe episode 15 is Touma vs Accelerator
and next episode (episode 14) is going to be epic ending like before

And it seems the code of the project is still the same
although they postpone it once

Also I just know that there is two sister there and Touma has meet them before

To be honest I like this point of view (from science) than To Aru Majutsu no Index
Maybe because I like science
lol

Friday, July 5, 2013

Rozen Maiden 2013 v0.1

I just watching (or skimming) the rozen maiden 2013 episode 1

And it summary all the chapter from the Rozen Maiden's manga

For someone who don't read it maybe don't really understand
because it is different from the previous two season
(actually the first and second season is not have the same plot with the manga)

It seems this season will be focus on Rozen Maiden II's plot
(you can hear that they say seven Rozen Maiden and not six and you can see who is the seventh Rozen Maiden)
So maybe it will be a good story
(I've read it but I feel so sorry for Hina Ichigo -> one of my favorite doll)

But actually I like the first and second season's art than this
I don't know is it because I just still don't familiar with it or not

And I also just realize that Suigintou's voice actor is Rie Tanaka
(same with Maria in Hayate no Gotoku and Lacus Clyne in Gundam Seed)
link: http://en.wikipedia.org/wiki/Rie_Tanaka

Wednesday, August 8, 2012

Promise

Because I don't know what will I post in this blog
then one of my friend tell me that he will go to comiket genco
and after I look at the stuff
wow it is very awesome and cool for me
althought maybe you can't tell that I am an otaku

then I'll post this
Now in 8th August 2012
I promise someday I will go to Japan
and go buy some otaku's stuff

Tuesday, July 17, 2012

Punctuation is powerful!

An English professor wrote the
words, "Woman without her man
is nothing" on the blackboard and
directed his students to punctuate
it correctly. The men wrote:
"Woman, without her man, is
nothing." The women wrote:
"Woman: Without her, man is
nothing."
Punctuation is powerful!