Install JDK8 in Fedora

Hi! 🙂

In this post, I will show you how to install JDK8 in Fedora.

JDK8 is a development environment for building applications, applets, and components using the Java programming language.

1.- Download the JDK8 from Oracle page in this link: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

 

2.- Write these lines on your terminal


sudo alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_161/jre/bin/java 200000

sudo alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.8.0_161/jre/bin/javaws 200000

sudo alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86__64 /usr/java/jdk1.8.0_161/jre/amd64/libnpj2.so 200000

sudo alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_161/bin/javac 200000

sudo alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0_161/bin/jar 200000

 

Advertisements

What is Circle CI? – For Beginners

Today I learned about a new software, is about Circle CI, that is a platform to “give every developer state-of-the-art automated testing and continuous integration tools”

This platform could connect with your Github account.

  1. You need to create a repository from your Github

2. Check the repository in CircleCI

3. Check the projects in Circle CI

4. Commit in Github

5. You can view the html file

6. And this is how appear

You will find my code in my Github Repository.

How to use GTK with Javascript

Today in this post, I will show how to program in Javascript(GJS) with GTK

Is very important to read this website for more information about the project GJS

First, you need to create a file .js, next the code that start the document always  is :

#!/usr/bin/gjs

This is very important because is the standardized form to write the first line.

Then you can write all the code respecting the syntaxis about Javascript

For example:

Labeles, Butoons, Grid, etc

You can find more in this website: 

This is my first code:

You can find more examples in my Github Repository here

How to program in C in line commands – Linux

In this post, I will show you how to program in C, without any IDE

FIrst, we have to create a .c file, include all the libraries ant he write the code, like this

 

 

 

Then, to compile the code, you need to write this

FInally, the code is execute!

I will explain the 3 lines code

  1. First with “gcc -c” is for compile all the code, if there’re error will show in the terminal
  2. Second,  with “-o .exe” is for to create a file object and the file executable
  3. Third, we goning to run the file executable with “./”

You can find more excercise in my Github Repository here

Create a Shop Cart with C

In this post, I will show you how to create a Shoping Cart with C, using Stuctures, pointers and procedures and functions.

We have 2 Structures:  “Product” and “Bill” here stay all the atributtes about Products and Bills, like id, name, price, qty, etc

Also we have the procedures and functions that will be implemented for the functionalities of Shoping Cart

You can find the code in Github repository here

A Shoping cart with C

  1. To Compile

gcc -c ShopingCart.c

2. To Run

gcc ShopingCart.o -o ShopingCart.exe

3. To Execute

./ShopingCart.exe

Where is the Bugs in Gnome?

Normally, the Bugf of some software is in Bugzilla

But also the bugs in Gnome is in Gitlab, only you need to search “Gnome” and then search the project that you want to contribute, in my case I’ve been searched “Todo”. Next, go to the left side in “issues”

For Newcomers, you can view if some issue is a Bug, a Feature, the status, etc..

Searching a project

Project issues

How to use GTK with Python

Before you need this programs:

1.Python3

There’s many OS that already have Python python --version

2. Gtk

3. Pyobject

dnf search pyobject3-devel

The example is a box that you could choose some language and with a click, this redirection a web

You need to create a python file, in my case “box.py”

To run you write:
python3 box.py

The screen is like this

You can find the code in my Github repository here

Newcomers in Gnome – Clone a Project

If you want to contribute with code in App’s Gnome you need to visit this page: https://wiki.gnome.org/Newcomers/ You will find the process that you need to do for contribute (In 4 steps)

  1. Choose a Project

First, you need to choose a project that you want to contribute

2. Build a Project

Second, you need to download the software “Builder” that is a platform to clone the projects in Gnome. In my case I choose the project “To-do”: https://gitlab.gnome.org/GNOME/gnome-todo.git

3. Solve a project

Third, you need to choose what code you improve

4. Submit Patch

Finally, you need to submit your new code.

 

What is GTK and how to use with C

GTK is the GUI toolkit used in Gnome applications. GTK+ was originally written for the Gimp (GNU Image Manipulation Program — http://www.gimp.org), but has become a general-purpose library. GTK+ depends on glib.

You could use GTK with C, Python, Javascript and more. In this post I will show you, how use it with C.

Lets start!

In this example, I do a box with 4 checkboxes and 2 bottons. My file name is caja1.c

To compile you need to write:

$gcc $(pkg-config --cflags gtk+-3.0) -o caja1 caja1.c $(pkg-config --libs gtk+-3.0)

To run you write:

./caja1

This is the box

You can find the code in my Github repository.

Here you will find all the documentation about GTK – Gnome