Soal-soal Ujian Masuk Programmer Perusahaan 2015(Part 2)
Ini adalah sambungan dari ujian part 1.
Jangan Lupa Lihat Perkenalan Algorithma
Javascript
Set Index in javascript
The selected Index property sets or returns the index of the selected option in a drop-down list.
var x = document.getElementById("mySelect").selectedIndex;var y = document.getElementById("mySelect").options;alert("Index: " + y[x].index + " is " + y[x].text);
Refference:
js Regular expression
Untuk Js Regular expression karena terlalu banyak anda bisa melihat sendiri di link di bawah.
function to get cookieRefference:
Set cookies in javascript
function to set cookie
function setCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+d.toUTCString(); document.cookie = cname + "=" + cvalue + "; " + expires;}
function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i<ca.length; i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length,c.length); } return "";}
function to check cookie
function checkCookie() { var username=getCookie("username"); if (username!="") { alert("Welcome again " + username); }else{ username = prompt("Please enter your name:", ""); if (username != "" && username != null) { setCookie("username", username, 365); } }}
Refference:
var x = document.getElementById("mySelect").selectedIndex;
var y = document.getElementById("mySelect").options;
alert("Index: " + y[x].index + " is " + y[x].text);
Untuk Js Regular expression karena terlalu banyak anda bisa melihat sendiri di link di bawah.
function to get cookieRefference:
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires;
}
function getCookie(cname) {
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
}
return "";
}
function checkCookie() {
var username=getCookie("username");
if (username!="") {
alert("Welcome again " + username);
}else{
username = prompt("Please enter your name:", "");
if (username != "" && username != null) {
setCookie("username", username, 365);
}
}
}
SQL
- Indexing in SQL
CREATE INDEX index_name
ON table_name (column_name)
contoh:
CREATE INDEX daftarPeserta ON m_user (nama_lengkap)
Kegunaan indexing adalah dengan adanya indexing mempercepat pencarian data karena applikasi tidak perlu melakukan pencarian di setiap table.
Refference:
- How to tuning Database
- Cara membuat maksimal kinerja database ada banyak sebagian besar bisa anda lihat di referensi yang saya gunakan di bawah. Membuat indexing adalah salah satu cara untuk mengoptimalkan kinerja database atau pada artikel ini di sebut tuning database. Caranya mengurangi duplikasi data dan dump data. Sekarang anda bisa menggunakan graphql untuk mengurangi request dan respond dari client dan server secara terus menerus.
Refference:
- How to optimize query
- Transaction Table
- Anda harus mengerti dalam pembuatan table ada master dan ada transaction. Table master berfungsi sebagai parent dan transaction berfungsi sebagai turunan dari parent. Contoh gampangnya adalah table master adalah table ms_user yang berisi kota, tempat dan tanggal kelahiran. Table master jarang sekali berubah sedangkan table transaction contohnya ms_user_access berisi password, pertanyaan forgotten password, email yang cenderung bisa berubah.
- SELECT TOP
- contoh: SELECT TOP number nilai FROM ms_user_score
Refference:
- SELECT DISTINCT
- contoh: SELECT DISTINCT city FROM ms_user
->SELECT DISTINCT berfungsi untuk mendapatkan record yang berbeda sebagai contoh ada beberapa user yang tinggal di jakarta selatan maka record select distinct hanya menampilkan satu kali jakarta selatan.
Refference:
- SQL Transaction
Refference:
- SQL Index
- contoh: CREATE INDEX NameIndex FROM ms_user (FirstName)
Refference:
- The Difference between Drop Table and Delete Table
-> Jika delete Table anda hanya mendelete record sedangkan Drop table anda menghapus table.
contoh:
- delete: DELETE FROM ms_user WHERE id_user = 1
- drop: DROP FROM ms_user
Refference:
- SQL SubQuery
contoh:
- SELECT FROM ms_user WHERE (SELECT id FROM ms_user_personal WHERE id = 1)
Refference:
- SQL select database
contoh :
- mysql : USE test_database; (jika anda menggunakan console)
Refference:
- mysql_fetch_assoc => adalah fungsi mysql yang mengembalikan data dalam bentuk array
Refference:
Shell Or Console
1.what is bash => Bash adalah shell, bahasa command untuk GNU operating sistem.
2. rename /inner.folder/{1,2,3,4,5}.txt into {1,2,3,4}.dat
3.create,rename, open, delete file.
- Create Folder => mkdir test
- Create File => touch test.txt
- Rename => mv test.php wew.php (ini filenya berubah namanya)
- Open => touch test.php
- Delete => rm test.php
server
1.apa itu ssh? => aplikasi pengganti remote login seperti telnet, rsh, dan rlogin, yang jauh lebih aman. Fungsi utama aplikasi ini adalah untuk mengakses mesin secara remote. Sama seperti telnet, SSH Client menyediakan User dengan Shell untuk remote ke mesin.
2.uploading using ssh => scp server1/path server2/path (link)
3. access log => anda bisa menggunakan command vim,less, cat,less.
4. monitoring => tail -f access_log.log
Practical:
Source:
soal-soal ujian web programmer 2014
Sekian pengalaman saya ketika mencoba mencari-cari pekerjaan dan dapat beberapa ujian yang bentuknya seperti beberapa yang di atas moga-moga bermanfaat.
Did you realize there's a 12 word sentence you can communicate to your partner... that will induce deep feelings of love and impulsive appeal for you deep inside his heart?
ReplyDeleteThat's because deep inside these 12 words is a "secret signal" that triggers a man's instinct to love, worship and protect you with all his heart...
12 Words Who Fuel A Man's Desire Response
This instinct is so hardwired into a man's brain that it will drive him to try better than before to to be the best lover he can be.
In fact, triggering this influential instinct is so binding to achieving the best ever relationship with your man that once you send your man one of the "Secret Signals"...
...You'll soon notice him expose his heart and mind for you in a way he never expressed before and he will recognize you as the one and only woman in the galaxy who has ever truly attracted him.
Best content & valuable as well. Thanks for sharing this content.
ReplyDeleteApproved Auditor in DAFZA
Approved Auditor in RAKEZ
Approved Auditor in JAFZA
i heard about this blog & get actually whatever i was finding. Nice post love to read this blog
Approved Auditor in DMCC