Monday 8 April 2024

Arti Kata : Pengertian Dikte

dikte : diktatoris; bertindak secara tepat apa yang didengarnya; mendikte berarti menyuruh atau memerintah seseorang tanpa memberi kesempatan membantah kepada orang yang diperintahkan.

Penggunaan kata who, whom, whose, which dalam bahasa Inggris

A. Penggunaan WHO vs WHOM

Relative pronoun who dan whom dua-duanya berarti “siapa” kalau digunakan dalam kalimat tanya dan noun clause. However, who dan whomdua-duanya akan berarti “yang” kalau digunakan dalam adjective clause.

Dalam formal writing or speaking, penggunaan who dan whom sedikit berbeda.

a. Penggunaan WHO vs WHOM dalam kalimat tanya

Dalam kalimat tanya (interrogative),who digunakan untuk menanyakan subject kalimat.

Pola penggunaan who adalah sebagai berikut:

Who + verb + object + …?

  1. Who has this great car? (Siapa punya mobil bagus ini?).
  2. Who was the first human to set foot on the moon surface? (Siapa orang yang pertama kali menginjakkan kaki di permukaan bulan?).
  3. Who will accompany you to the party? (Siapa yang akan menemani kamu ke pesta itu?).

Kalau ketiga kalimat tanya di atas dijawab, maka akan terlihat bahwa who memang menggantikan subject kalimat.

Penggunaan WHICH dalam noun clause

Pola penggunaan which noun atau which one dalam noun clause pada prinsipnya sama dengan pola pada kalimat tanya.

  1. I’d like to know which bank got robbed. (Aku ingin tahu bank yang mana yang dirampok). Noun clause sebagai object kalimat.
  2. Can you predict which candidate will win the contest? (Dapatkah memprediksi kandidat yang mana yang akan memenangkan kontes?). Noun clause sebagai object kalimat.
  3. I am wondering which books are on sale now. (Aku ingin tahu buku-buku yang mana yang sedang diobral sekarang). Noun clause sebagai object kalimat.
  4. Which countries have been considered as developed ones can be read on Chapter three. (Negara-negara yang mana yang telah dianggap negara-negara maju dapat dibaca pada Bab 3). Noun clause sebagai subject kalimat.
  5. We put the two glasses so close that we don’t know which juice is mine and which juice is his. (Kami menaruh kedua gelas (berisikan jus) begitu dekat sehingga kami tidak tahu jus yang mana jusku dan jus yang mana jus dia).
  6. I can’t decide which homework must be done now. (Aku tidak dapat memutuskan PR yang mana yang harus dikerjakan sekarang?).
  7. My father always asks me which language I prefer to study. (Ayahku selalu bertanya kepadaku bahasa yang mana yang aku lebih suka pelajari).
  8. I want to make sure which juice you just drank. (Jus yang mana yang kamu minum tadi?).
  9. Please tell me which places you will choose for your vacation! = Which ones will you choose for your vacation? (Katakan padaku tempat-tempat yang mana yang akan kamu pilih untuk liburanmu?).

Dengan menggantikan noun setelah which dengan one atau ones (jika nounnya plural) maka diperoleh kalimat-kalimat berikut:

  1. I’d like to know which one got robbed. (Aku ingin tahu bank yang mana yang dirampok). Noun clause sebagai object kalimat.
  2. Can you predict which one will win the contest? (Dapatkah memprediksi kandidat yang mana yang akan memenangkan kontes?). Noun clause sebagai object kalimat.
  3. I am wondering which ones are on sale now (Aku ingin tahu buku-buku yang mana yang sedang diobral sekarang). Noun clause sebagai object kalimat.
  4. Which ones have been considered as developed ones can be read on Chapter three? (Negara-negara yang mana yang telah dianggap negara-negara maju dapat dibaca pada Bab 3). Noun clause sebagai subject kalimat.
  5. We put the two glasses so close that we don’t know which one is mine and which juice is his? (Kami menaruh kedua gelas (berisikan jus) begitu dekat sehingga kami tidak tahu jus yang mana jusku dan jus yang mana jus dia).
  6. I can’t decide which one must be done now? (Aku tidak dapat memutuskan PR yang mana yang harus dikerjakan sekarang?)
  7. My father always asks me which one I prefer to study. (Ayahku selalu bertanya kepadaku bahasa yang mana yang aku lebih suka pelajari).
  8. I want to make sure which one you just drank. (Aku ingin meyakinkan jus yang mana yang kamu minum tadi?).
  9. Please tell me which ones you will choose for your vacation!  (Katakan padamu tempat-tempat yang mana yang akan kamu pilih untuk liburanmu?).

Dan jika kita perhatikan (khususnya contoh 7-9),  kalimat tanya berubah menjadi kalimat positif (affirmative) atau juga dalam kalimat negatif,  jika digunakan sebagai noun clause. Inilah yang disebut dengan embedded question yang telah banyak dibahas pada topik: Cara Membuat Embedded Questions. Dan cara membuat noun clause dapat dibaca pada topik: Noun clauses.

C. Penggunaan WHICH dalam adjective clause

Dalam adjective clause, which hanya dapat digunakan untuk menggantikan benda.Which tidak pernah digunakan untuk menggantikan orang walaupun dalam informal speaking sekali pun.

Pola penggunaan which dalam adjective clause (relative clause) adalah sebagai berikut:

which + verb +… (jika which menggantikan subject kalimat)

which + subject + verb +… (jika which menggantikan object kalimat)

Yang juga perlu diperhatikan ketika menggunakan which dalam adjective clause adalah tipe benda yang digantikannya atau diacunya. Jika benda yang digantikannya atau diacunya singular dan uncountable maka verb yang mengikuti which juga harus singular, sebaliknya jika benda yang digantikannya atau diacunya  plural (jamak) maka verb yang mengikuti which juga harus plural.

Contoh:

  1. The books which were on sale last week have been sold out. (Buku-buku yang diobral minggu lalu telah terjual habis). Which menggantikan plural noun: the books.
  2. The photos which you gave me twenty-five years ago still look good in my photo album. (Foto-foto yang kamu berikan aku 25 tahun yang lalu masih tampak bagus di album fotoku).
  3. The book which is on the table is mine. (Buku yang di atas meja itu adalah bukuku). Which menggantikan singular noun: the book.
  4. We are studying sentences which contain adjective clauses. (Kita sedang mempelajari kalimat-kalimat yang mengandung adjective clause).
  5. The movie which we saw last week wasn’t very good.

Kelima contoh kalimat ini mengandung restrictive clause, yaitu adjective clause yang tidak dapat dihilangkan dari kalimat, sebab kalau dihilangkan makna kalimatnya menjadi berubah atau menimbulkan pertanyaan bagi lawan bicara. Dalam hal ini, which dapat digunakan secara interchangable dengan THAT.

  1. The books that were on sale last week have been sold out. (Buku-buku yang diobral minggu lalu telah terjual habis).
  2. The photos that you gave me twenty-five years ago still look good in my photo album. (Foto-foto yang kamu berikan aku 25 tahun yang lalu masih tampak bagus di album fotoku).
  3. The book that is on the table is mine. (Buku yang di atas meja itu adalah bukuku).
  4. We are studying sentences that contain adjective clauses. (Kita sedang mempelajari kalimat-kalimat yang mengandung adjective clause).
  5. The movie that we saw last week wasn’t very good.

Tetapi, which dan that tidak interchangable pada nonrestrictive clause, yaitu adjective clause  yang hanya memberi informasi tambahan yang tidak begitu penting kepada noun yang diterangkannya. Jika dihilangkan dari kalimat, makna kalimatnya tidak berubah dan tidak menimbulkan  pertanyaan atau tidak membuat lawan bicara bingung.

Contoh:

  1. The fish, which cannot survive without water, should be kept underwater all the time. (Ikan itu, yang tidak dapat hidup tanpa air, harus selalu berada di dalam air).
  2. Sea water, which is salty, is where sea weeds grow. (Air laut, yang rasanya asin, adalah tempat rumput laut tumbuh).
  3. A horse, which has four legs, runs faster than a man, who has two legs.

Ajective clause pada ketiga contoh ini adalah nonrestrictive clause (perhatikan: adjective clause ini diletakan di antara koma pembuka dan koma penutup). Dalam hal ini, which tidak dapat digantikan dengan that.

  1. My father has this great car. Atau disingkat:  My father does.
  2. Neil Armstrong was the first human to set foot on the moon surface. Atau : Neil Armstrong was.
  3. My cousin will. (Sepupuku).

Whom dalam kalimat tanya (interrogative) digunakan untuk untuk menanyakan object kalimat. Whom tidak pernah digunakan untuk menggantikan subject kalimat. Pola penggunaan whom adalah sebagai berikut:

Whom + auxiliary/kata bantu + subject + verb + …?

  1. Whom do you love more? (Siapa yang lebih kamu cintai?).
  2. For whom did he buy that necklace? For his girl friend? (Untuk siapa dia membeli kalung itu? Untuk pacarnya?).
  3. With whom will you go to the party? (Dengan siapa kamu akan pergi ke pesta itu?).

Walaupun letak whom di awal kalimat, whom ini sebenarnya menanyakan atau menggantikan object kalimat. Perhatikan jawaban dari ketiga pertanyaan di atas berikut ini. (Yang dicetak tebal adalah kata-kata yang digantikan oleh whom dan berfungsi sebagai object kalimat.

  1. I love you more. (Aku lebih mencintai kamu).
  2. No, It was not for his girl friend. He bought that necklace for his sister. (Bukan, kalung itu bukan untuk pacarnya. Dia membeli kalung itu untuk adiknya). Dalam kalimat ini that necklace adalah direct object, sedangkan his sister adalah indirect object.
  3. I will go to the party with my cousin. (Aku akan pergi ke pesta itu dengan sepupuku).

b. Penggunaan WHO vs WHOM dalam noun clause dan adjective clause

Penggunaan who dalam noun clause dan adjective clause adalah sama dengan penggunaan who pada kalimat tanya, yaitu untuk menggantikan orang yang posisinya sebagai subject kalimat.

  1. Would you tell me who has this car? (noun clause)
  2. Neil Armstrong, who was the first human to set foot on the moon surface, is from the United States. (adjective clause).
  3. I’d like to know who will accompany you to the party. (noun clause).

Dan begitu juga dengan penggunaan whom. Pada noun clause dan adjective clause,whom digunakan untuk menggantikan orang yang posisinya sebagai object kalimat. Bedanya dengan kalimat tanya adalah tidak digunakannya atau tidak dilakukan inversi auxiliary ke depan subject kalimat. Dengan kata lain, setelah whom langsung diikuti oleh subject kalimat. Pola ini telah banyak dibahas pada topik: How to Address Questions dan Cara Membuat Embedded Questions.

  1. Please tell me whom you love more! (Tolong kasi tahu aku siapa yang lebih kamu cintai). Noun clause. Perhatikan: kata bantu DO dihilangkan karena kata bantu DO tidak digunakan dalam embedded question.
  2. Do you know for whom he bought that necklace? (Apakah kamu tahu untuk siapa dia membeli kalung itu?). Noun clause.
  3. My cousin with whom I will go to the party is very pretty? (Sepupuku orang yang akan aku ajak ke pesta itu adalah sangat cantik). Adjective clause.

Remember: Selalu gunakan rules di atas in FORMAL writing or formal speaking (misalnya dalam ujian di sekolah dan test TOEFL).

In informal writing or speaking, however, native English speakers lebih sering menggunakan who untuk menggantikan object kalimat.

  1. Please tell me who you love more!
  2. Do you know who he bought that necklace for ?
  3. My cousin who I will go to the party with is very pretty?

Selain itu, bule juga sering menggunakan THAT untuk menggantikan orang yang posisinya sebagai subject dan object kalimat.

  1. The first human that set foot on the moon surface was Neil Armstrong. Adjective clause.
  2. You’d better get dressed now because the beautiful girl that you told me last night will come over to our place in less than an hour. (Kamu sebaiknya ganti pakaian sekarang sebab cewek cantik yang kamu bilang ke aku tadi malam akan mampir ke tempat (rumah) kita dalam waktu kurang dari satu jam).

B. Penggunaan WHOSE

Relative pronoun whose jika digunakan dalam kalimat tanya juga berarti “siapa”, sedangkan jika digunakan dalam noun clause dan adjective clause biasanya diterjemahkan menjadi “nya”. Hal ini tergantung pada konteks kalimat.

a. Penggunaan WHOSE dalam kalimat tanya

Berbeda dengan penggunaan who dan whom, penggunaan whose pada umumnya diikuti oleh noun (i.e. whose + noun), dan digunakan untuk menyatakan kepemilikan  (siapa yang punya) noun tersebut. Pola kalimat tanya yang menggunakan whoseadalah:

Whose noun + verb + object + …? (jika yang ditanyakan adalah subject kalimat; Lihat contoh1&2 di bawah)

Whose noun + auxilliary/kata bantu + verb + object + …? (jika yang ditanyakan adalah object kalimat; Lihat contoh 3-4)

  1. Whose car is this? (Mobil siapa ini?) = Who has this car?
  2. Whose money got stolen? (Uang siapa yang dicuri?) = Who has the money that got stolen?
  3. Whose book did you copy? (Buku siapa yang kamu copy?) = Who has the book (that) you copied?
  4. Whose cloth are you wearing? (Bajunya siapa yang sedang kamu pakai?) = Who has the cloth (that) you are wearing?

b. Penggunaan WHOSE dalam noun clause dan adjective clause

Dalam noun clause dan adjective clause, makna whose pada prinsipnya sama denganhis, her, its, dan their.

  1. I know the man whose car was parked in front of your house. (Aku tahu cowok yang mobilnya diparkir di depan rumahmu). Adjective clause. whose car = his car.
  2. The juries are still debating whose performance was the best. (Para juri masih sedang berdebat performa siapa yang terbaik). Noun clause. whose performance = his/her performance.
  3. Some Indonesian people have historic sculptures whose values are inestimable in their house. (Beberapa orang Indonesia punya patung-patung bersejarah yang nilainya tidak dapat diprediksi (saking mahalnya) di rumah mereka).  Adjective clause. whose values = their values.
  4. We will leave the apartment whose rent will soon be sharply increased . (Kami akan meninggalkan (pindah dari) apartement yang sewanya akan segera dinaikkan secara tajam. whose rent = its rent.

 

Source : https://www.facebook.com/notes/belajar-bahasa-inggris/who-whom-whose-which-that-what/265719196774599

Sunday 7 April 2024

Arti Kata : Pengertian Diktator

Diktator adalah seorang pemimpin negara yang memerintah secara otoriter/tirani dan menindas rakyatnya. Biasanya seorang diktator naik takhta dengan menggunakan kekerasan, seringkali dengan sebuah kudeta. Tetapi ada pula diktator yang naik takhta secara demokratis. Contoh yang paling terkenal adalah Adolf Hitler.

Seringkali diktator dibedakan dengan despot. Seorang despot berkuasa secara sewenang-wenang pula, tetapi kadangkala ada pula despot yang 'baik'.

Source : http://id.wikipedia.org/wiki/Diktator

Arti Kata : Pengertian Abolisi

Abolisi adalah suatu tindakan untuk menghentikan penyusutan & pemeriksaan suatu perkara, dimana pengadilan belum menjatuhkan keputusan terhadap perkara tersebut.

Friday 5 April 2024

Solution ModuleNotFoundError: No module named 'psycopg2'

 Solution ModuleNotFoundError: No module named 'psycopg2',

To solve this problem try following command :

pip install psycopg2


Hope this can help,

Create database connection using Python and SQLAlchemy

SQLAlchemy is an awesome Object-Relational Mapping (ORM) library that allows us to interact with databases using Python. I will provide you with my step-by-step notes on how to create a database using Python and Alchemy.

Prerequisites:

Before you begin you have to make sure you have the necessary tools installed.

  1. Python
  2. SQLAlchemy (install via pip: pip install sqlalchemy)

Awesome. Now let’s begin!

Step 1: Import necessary modules

Let's start by creating a new Python script and importing the necessary modules.

from sqlalchemy import create_engine, Column, Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

Step 2: Establish a database connection

Create a database connection using SQLAlchemy’s create_engine function. Replace 'your_database_url' with the URL of your database.

  • For PostgreSQL, the URL format is similar to MySQL:
# PostgreSQL database URL
database_url = 'postgresql://username:password@host/database_name'
  • For MySQL, you need to provide the necessary credentials (username, password, host, and database name) in the URL format:
# MySQL database URL
database_url = 'mysql+pymysql://username:password@host/database_name'

For MySQLite, he URL would be:

engine = create_engine('sqlite:///your_database_name.db')

Note: Replace 'username''password''host', and 'database_name' with your MySQL or PostgreSQL credentials and database information. It's good to remember the database needs to be installed and running before you are connecting to it.

Step 3: Define your data mode

To create your data model, make a Python class that inherits from the Base. Each attribute of the class represents a column in the relevant database table. You can include additional columns as you see fit.

class User(Base):
__tablename__ = 'users'

id = Column(Integer, primary_key=True)
username = Column(String(50), unique=True, nullable=False)
email = Column(String(100), unique=True, nullable=False
password = Column(String(100), unique=True, nullable=False)
created_at = Column(DateTime, default=datetime.datetime.utcnow)

Step 4: Create the database tables

With the data model defined, create the database tables using the create_all method of the Base class:

Base.metadata.create_all(engine)

Step 5: Insert data into the database

To insert data into your database, first, create a session using SQLAlchemy’s sessionmaker:

Session = sessionmaker(bind=engine)
session = Session()

Step 6: Adding and creating objects

Hurray! Now, you can create objects and add them to your database.

# Example: Inserting a new user into the database
new_user = User(username='Sandy', email='sandy@gmail.com', password='cool-password')
session.add(new_user)
session.commit()

Step 7: Query data from the database

To retrieve data from the database, use the session’s query method:

# Example: Querying all users from the database
all_users = session.query(User).all()

# Example: Querying a specific user by their username
user = session.query(User).filter_by(username='Sandy').first()

Step 8: Close the session

Remember to close the session once you’re done working with the database:

session.close()

SQL vs SQLAlchemy

If we were to compare SQLAlchemy and plain SQL, we could notice the difference in how they interact with data and the advantages they offer.

  1. Abstraction level:
  • SQLAlchemy: Provides a high-level abstraction with Object-Relational Mapping (ORM). It eliminates the need to write raw SQL queries.
  • Plain SQL: Requires us to write raw SQL queries and manually handle the mapping between Python data and the database tables.

2. Portability:

  • SQLAlchemy: Offers database abstraction allowing us to easily switch between different database URLs.
  • Plain SQL: Often writes database-specific queries, requiring us to rewrite the queries to match a new database’s syntax when switching systems.

3. Safety and security:

  • SQLAlchemy: Provides protection against SQL injection attacks. SQL injection is a type of code injection that targets data-driven applications by inserting malicious SQL statements into an entry field. SQLAlchemy handles parameter binding and query construction to prevent these attacks.
  • Plain SQL: Vulnerable to SQL injection if user-provided data is not properly sanitized. To sanitize is to program our system to detect malicious bugs that can harm our database.

4. Code maintainability and readability:

  • SQLAlchemy: Enhances the maintainability and readability of code, just like regular Python code is used for interacting with databases.
  • Plain SQL: Queries can become long and complex, and potentially impact our code’s readability and maintainability.

5. Database schema management:

  • SQLAlchemy: Simplifies schema management and version control by providing tools for managing database schemas using Python classes.
  • Plain SQL: Requires manual handling of schema changes using SQL migration scripts or external tools.

Migration scripts are SQL scripts made by users in ApexSQL Source Control. They help configure changes, handle overrides and more.

After everything has been said and done, our SQLAlchemy code should resemble the following example:

# Step 1: Import the necessary modules

from sqlalchemy import create_engine, Column, Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import datetime


# Step 2: Establish a database connection

database_url = 'sqlite:///your_database_name.db'

# Create an engine to connect to a SQLite database
engine = create_engine(database_url)

#will return engine instance
Base = declarative_base()

# Step 3: Define your data model
class User(Base):
__tablename__ = 'users'

id = Column(Integer, primary_key=True)
username = Column(String(50), unique=True, nullable=False)
email = Column(String(100), unique=True, nullable=False)
created_at = Column(DateTime, default=datetime.datetime.utcnow)

# Step 4: Create the database tables
Base.metadata.create_all(engine)

# Step 5: Insert data into the database
Session = sessionmaker(bind=engine)
session = Session()

# Example: Inserting a new user into the database
new_user = User(username='Sandy', email='sandy@gmail.com', password='cool-password')
session.add(new_user)
session.commit()

# Step 6: Query data from the database
# Example: Querying all users from the database
all_users = session.query(User).all()

# Example: Querying a specific user by their username
user = session.query(User).filter_by(username='Sandy').first()

# Step 7: Close the session
session.close()

Conclusion:

Great job! You have successfully mastered the art of creating a database with Python and SQLAlchemy.

Things to remember:

  • Engine: It establishes a connection to the database and handles the communication behind the scenes for us.
  • Declarative Base: We utilize SQLAlchemy's declarative base to establish a link between our Python classes and the corresponding database tables.
  • Sessions: We use this tool to manage our database interactions and it offers us methods to effectively manage CRUD operations.
  • Querying: This tool allows us to create intricate database queries through Python methods.
  • Relationships: With SQLAlchemy, we can establish connections between various classes that represent database relationships such as one-to-many, many-to-one, and many-to-many.
  • Mapping: Using SQLAlchemy, we also have the ability to map attributes of our Python classes to columns in our corresponding database tables.

If you are looking for a flexible library to manage databases in your Python projects, SQLAlchemy is a great choice. It provides a user-friendly and robust interface to handle all your database-related tasks with ease.


Source : https://medium.com/@sandyjtech/creating-a-database-using-python-and-sqlalchemy-422b7ba39d7e

Arti Kata : Pengertian Aktual

aktual adalah  1) berdasarkan kenyataan; benar-benar terjadi, 2) baru terjadi, sedang sangat digemari, sedang menjadi pembicaraan: majalah itu memuat berita-berita yang --; aktual; mengaktualkan adalah v menj adikan aktual; menjadikan betul-betul terlaksana; pengaktualan n aktualisasi aktualisasi n perihal mengaktualkan; pengaktualan: kejadian itu dapat diwujudkan dengan pengisahan yang meyakinkan.

Source : http://selaputs.blogspot.com/2010/12/definisi-pengertian-arti-aktual.html

Arti : Kata Pengertian Bongsor

Berikut Pengertian bongsor yang dapat anda gunakan sebagai dasar dari anda memahami dan mengartikan kata-kata berbahasa Indonesia dengan baik dan benar:
Pengertian bongsor adalah a cak besar (gemuk dan tinggi); besar dan tingginya luar biasa, terutama kalau dibandingkan dng usianya (tt manusia, binatang, tumbuh-tumbuhan)

Source : http://artikata.com/arti-322313-bongsor.html