Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, November 09, 2018

How to "Manually" clear cache and data in your Android Virtual Device (AVD) using linux (Ubuntu, Kali, etc.)


AVD (Android Virtual Device) is an android device that run in your computer otherwise it is called Android Emulator. In this case we are using AVD from Android Studio. You can download the AVD emulator and SDK from their official website.

AVD commonly used in programming android program. While using VS code to program an android software using Android Studio, React Native, Flutter dart, etc. AVD sometimes begin laggy, slow to run and sometimes stop booting. So clearing the data will boost it faster and fix the problem.

Here is the step to manually clear your AVD data.

Close your AVD first

Open your terminal and run Nautilus or other Explorer Programs

Go to Home -> .android -> avd -> [your avd name].avd

delete some of .img.qcow2

cache.img.qcow2
encryptionkey.img.qcow2
userdata-qemu.img.qcow2


Done, you can boot to your AVD.

Thanks for visiting.

Friday, October 26, 2018

Enable your webcam in android emulator using linux terminal


While using linux,webcam do not activate automatically as a camera in your android emulator. It will give you a random block image while running front camera and back camera. So.. You can avtivate it by using this command.

First go to your android emulator directory, this is mine

cd /android-sdk/tools/

run your emulator using this code

./emulator -camera-front webcam0 -avd AVDNAME

-camera-front-webcam0 = front camera using webcam0
-camera-back-webcam0 = back camera using webcam0

you can change webcam0 to your webcam device id

Done, yo can use your webcam in android emulator

Wednesday, February 21, 2018

Download Dev Cpp / Dev C++ 4.9.9.2 - Simple and fast C++ IDE

Hasil gambar untuk devcpp logo

Hasil gambar untuk devcpp

DevCpp is an IDE to create .cpp program language, same as other IDE this IDE has it own feature. Here is the feature.

Feature 
  • Tool Manager 
  • Print support 
  • Find and replace facilities 
  • Support GCC-based compilers 
  • Integrated debugging (using GDB) 
  • Support for multiple languages (localization) 
  • Class Browser 
  • Code Completion 
  • Package manager, for easy installation of add-on libraries 
  • CVS Support 
  • To-Do List 
  • CPU Window
  • Debug variable Browser 
  • Project Manager 
  • Customizable syntax highlighting editor 
  • Quickly create Windows, console, static libraries and DLLs 
  • Support of templates for creating your own project types 
  • Makefile creation 
  • Edit and compile Resource files 
Requirement
As the title DevCpp can be used better in a low end pc with spec:
  • 32 mb RAM
  • Windows 95 or higher
  • The executables compiled by Dev-C++ will need MSVCRT.DLL (comes with Windows 95 OSR 2 or higher).
This program is Freeware, you can be free to download, edit or modified. Unless other windows apps you need read the term of service carefully.

Now here is the download link of Dev C++ 4.9.9.2

Download Joomla_3.8.5-Stable-Full_Package



Download Joomla_3.8.5-Stable-Full_Package

Gambar terkait

Hasil gambar untuk joomla 3 interface

Hasil gambar untuk joomla 3 interface

Hasil gambar untuk joomla 3 interface

Joomla is one kind of CMS (Content Management Sytem) for website. CMS is program that construct from some programming language to help you on making and manage your website. With CMS you can create some themes, and write articles freely, this is just like an Operating System on you website.

Joomla first version born on 2005 and now lots of upgrade have been done by its developer. Joomla also a freeware that you can use and share it. Joomla is mobile friendly and user friendly CMS to create your website.

Here you can download Joomla version 3.8.5. Stable full version
GoogleDrive (13 mb)

Tuesday, February 20, 2018

Download Sublime text 3 For your windows 7/8/8.1/10 Free



Sublime text is a text editor for multy function. It can be used to just texting as usual or to write a progamming language. Sublime text compatible with C++, C#, Python, C, Ruby, html, php, CSS, Js, and other. This is pure text editor.

This is some of Sublime Text 3 features:

GOTO ANYTHING
Use Goto Anything to open files with only a few keystrokes, and instantly jump to symbols, lines or words.

Triggered with Ctrl+P, it is possible to:

Type part of a file name to open it.
Type @ to jump to symbols, # to search within the file, and : to go to a line number.
These shortcuts can be combined, so tp@rf may take you to a function read_file within a file text_parser.py. Similarly, tp:100 would take you to line 100 of the same file.

GOTO DEFINITION
Using information from syntax definitions, Sublime Text automatically generates a project-wide index of every class, method and function. This index powers Goto Definition, which is exposed in three different ways:

A popup is displayed when hovering over a symbol
Pressing F12 when the caret is on a symbol
The Goto Symbol in Project functionality
Symbol indexing can be customized on a per-syntax basis via configuration files, allowing users to tailor the feature to their needs.

MULTIPLE SELECTIONS
Make ten changes at the same time, not one change ten times. Multiple selections allow you to interactively change many lines at once, rename variables with ease, and manipulate files faster than ever.

Try pressing Ctrl+Shift+L to split the selection into lines and Ctrl+D to select the next occurrence of the selected word. To make multiple selections with the mouse, take a look at the Column Selection documentation.

COMMAND PALETTE
The Command Palette holds infrequently used functionality, like sorting, changing the syntax and changing the indentation settings. With just a few keystrokes, you can search for what you want, without ever having to navigate through the menus or remember obscure key bindings.

Show the Command Palette with Ctrl+Shift+P.

POWERFUL API AND PACKAGE ECOSYSTEM
Sublime Text has a powerful, Python API that allows plugins to augment built-in functionality.

Package Control can be installed via the command palette, providing simple access to thousands of packages built by the community.

CUSTOMIZE ANYTHING
Key bindings, menus, snippets, macros, completions and more - just about everything in Sublime Text is customizable with simple JSON files. This system gives you flexibility as settings can be specified on a per-file type and per-project basis.

SPLIT EDITING
Get the most out of your wide screen monitor with split editing support. Edit files side by side, or edit two locations in the one file. You can edit with as many rows and columns as you wish. Take advantage of multiple monitors by editing with multiple windows, and using multiple splits in each window.

Take a look at the View ▶ Layout menu for split editing options. To open multiple views into the one file, use the File ▶ New View into File menu item.

INSTANT PROJECT SWITCH
Projects in Sublime Text capture the full contents of the workspace, including modified and unsaved files. You can switch between projects in a manner similar to Goto Anything, and the switch is instant, with no save prompts - all your modifications will be restored next time the project is opened.

PERFORMANCE
Sublime Text is built from custom components, providing for unmatched responsiveness. From a powerful, custom cross-platform UI toolkit, to an unmatched syntax highlighting engine, Sublime Text sets the bar for performance.

CROSS PLATFORM
Sublime Text is available for Mac, Windows and Linux. One license is all you need to use Sublime Text on every computer you own, no matter what operating system it uses.

Sublime Text uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native functionality on each platform.

credit: souce

Dowload Sublime text 3 for Windows Free
GoogleDrive

Friday, February 09, 2018

How to fix : the reference to entity "version" must end with the ';' delimiter.


Lets begin with a short story. One day i want to make a fanspage about my blog so i decide to create it with the same name as my blog. I just create it a bit time and its complete. Now i dont talk about creating a fanspage, it will be in other post. After create a fanspage i start to make a page plugin. I have follow the instruction but get an error while saving the javascript code. This is from the developer fb.


here the code in the red rectangle

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.12&appId=1789352757996862&autoLogAppEvents=1';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
While it pasted in the theme and start to saving, i get the error:
on this problem i just add some amp;  to the code
from: js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.12&appId=1789352757996862&autoLogAppEvents=1';
to: js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&amp;version=v2.12&amp;appId=1789352757996862&amp;autoLogAppEvents=1';
So it will be
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&amp;version=v2.12&amp;appId=1789352757996862&amp;autoLogAppEvents=1';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
And now the problem fixed
This is just a few trick for How to fix : the reference to entity "version" must end with the ';' delimiter.
Thanks for visiting, see you on next post ^^

Sunday, April 02, 2017

Python Programming - Concept of object movement using key arrow / WASD

Game Preview

Pygame is look like a cartesius diagram that flipped vertically. Thats mean the Y-axis positive is on bottom and the negative Y-axis is on the top side. So the Pygame coordinate will look like this image.

Pygame Coordinate
From thats coordinate now we understand about how a object should do to move UP, DOWN, RIGHT, and LEFT. In this syntax i will shown to you how to make an object move using arrow or WASD keys.
here is the syntax:



Now I will explain as many as i can.
  •  Basic syntax   
You need to know about drawing circle, making a workspace, whats will happen when the key pressed, how to make color, and other. I dont need to describe this because you can learn about it in other basic post.
  • Movement 
    Xcoord = (playerCoord[A]['x']) #This to for shorter the player X coordinate
    Ycoord = (playerCoord[A]['y']) #This to for shorter the player Y coordinate
    if move == STOP:
        newCoord = {'x':Xcoord, 'y':Ycoord}  #Dont add a move while looping
    elif move == UP and Ycoord>25:
        newCoord = {'x':Xcoord, 'y':Ycoord-2} #For each looping the Y coordinate is reduction by 2 point so the object will move to up
    elif move == DOWN and Ycoord<ywindow-25:
        newCoord = {'x':Xcoord, 'y':Ycoord+2} #For each looping the Y coordinate is added by 2 point so the object will move to down
    elif move == LEFT and Xcoord>25:
        newCoord = {'x':Xcoord-2, 'y':Ycoord} #For each looping the X coordinate is reduction by 2 point so the object will move to left
    elif move == RIGHT and Xcoord<xwindow-25:
        newCoord = {'x':Xcoord+2, 'y':Ycoord} #For each looping the X coordinate is added by 2 point so the object will move to right
    else:
        newCoord = {'x':Xcoord, 'y':Ycoord}  #Dont add a move while looping same as stop

I think that all a concept to create this basic movement. For more information you can ask me in comment. Thanks for visiting ^^

Friday, November 25, 2016

Python - Drawing tree

Python - Drawing tree

Result:


without many word, now, here is the syntax:

#! usr/bin/python
def up(x):                                    #making subprogram
    i=0
    blank=" "
    star="*"
    while i<=many:
        print blank*x,star*i*2+star
        i+=1
        x-=1
while True:                                 #looping input
    many=input("Enter the tree tall: ")
    x=many
    if many>0:
        print up(many)
    else:
        print "wrong high"

This work on python 2.7, any problem just write it on comment..
Thanks for visiting

What is python? How to create a python program?

What is python? How to create a python program?



Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. (Source: www.python.org)

From the description then we know python different with c/c++,pascal, and other programming language using IDE. After installing python you will just get the interpreter and an IDLE, you can start write program using that. Here the steps:

1. Open windows search and search for keyword "IDLE" you will get result IDLE(Python GUI) - just open it.

2. The window shuld be like this


you won't able to write the syntax because it is the shell. If you want to create a program you should create a new file, just go to File - New or press CTRL+N. 
Now you will get a new window.


3. Start write a simple program

    print "Hello world"

4. Run the program using F5 or tab Run. You need to save the file on .py formatting before running the program. After save sucess full, the shell will launch again to showing the result.

5. DONE. Just practice for other syntax to advance your skill

- A wiseman always write a comment #Mine *awkward quotes xD

Wednesday, November 23, 2016

A Simple Game Using Python "Guess Number"

Now i'll explain a simple game using python, in this syntax i'm using python version 2.7 so, this is need a little modification if you want running it on python version 3.

The game is challenge you how to find a random number thats you able for set the range, when you try to guess it and you get the number is higher, you will get the result "Your number too hight" or otherwise your predicted number is lower, the result is "Your number too small".

Other feature is you can set how many tries that you allowed to do, when you reach the limit, you will get "How stupid you are.." as a result.

And while you get the right number you will know how many tries you did, and the program will ask to continue playing, reset the game, or close the game.

Now the syntax:


#!/usr/bin/python

import random
z=3
while z<5:
    print "|||------------------------------------|||"
    print " ||           Welcome!!                ||"
    print "  |------------------------------------|"
    print "Guess the number game STARTED"
    nama=raw_input("Enter your nickname: ")
    A=input("Your min number on range: ")
    B=input("Your max number on range: ")
    maks=input("Your max tries: ")
    print
    print "The number which predicted by",nama,"have range between",A,"and",B
    print "Your max tries are",maks,"tries"
    print "  ---------"
    print "< GOOD LUCK >"
    print "  ---------"
    while True:
        C=random.randint(A,B)
        x=0
        print "--------------------------------------------------"
        print "Your random number selected!!"
        while True:
            angka=input("Guess the number is? ")
            x+=1
            if x>maks:
                print "How stupid you are.."
                break
            if angka==C:
                print
                print "Congratulations!!",nama," right, on",x,"tries"
                print "The number is ",angka
                print
                break
            elif angka<C:
                print "Your number too small"
            elif angka>C:
                print "Your number too big"
        lagi=''
        while lagi!='y' and lagi!='Y' and lagi!='t' and lagi!='T' and lagi!='n' and lagi!='N':
            lagi=raw_input('(y) to play again, (t) to reset the game, (n) to quit : ')
        if lagi in ['t','T']:
            print
            break
        if lagi in ['n','N']:
            print
            z=10
            break


This all i can give to you, if you get aa error problem, just wirte it on comment and i will answer it.
Thanks for visiting..