This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $atret = date("d-m-Y", strtotime('-1 second',strtotime('+1 month',strtotime(date('m').'/01/'.date('Y').' 00:00:00'." -3 day")))); | |
| echo $atret; | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $date1 = "2014-06-29"; | |
| $date2 = "2014-07-02"; | |
| $diff = abs(strtotime($date2) - strtotime($date1)); | |
| $days = floor($diff /(60*60*24)); | |
| echo $days; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT DATE_FORMAT(`field_tgl`, '%Y-%m-%d') as tgl FROM table ORDER BY tgl | |
| tgl | |
| ---------- | |
| 2014-06-01 | |
| 2014-06-02 | |
| 2014-06-06 | |
| 2014-06-10 | |
| 2014-06-20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * FROM `table` WHERE CAST(`field_TANGGAL` AS DATE) = '2014-06-01' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT col, | |
| COUNT(dupe_col) AS dupe_cnt | |
| FROM TABLE | |
| GROUP BY col | |
| HAVING COUNT(dupe_col) > 1 | |
| ORDER BY COUNT(dupe_col) DESC | |
| 1 | |
| 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT COLUMN_NAME | |
| FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE TABLE_NAME = 'column_name' | |
| AND TABLE_SCHEMA='database_name' | |
| COLUMN_NAME | |
| ------------- | |
| id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #---------- create table ------------- | |
| CREATE TABLE contoh | |
| ( | |
| `no` int(2), | |
| `nama` varchar(255) | |
| ); | |
| #---------- end create table ------------- | |
| #---------- insert table ------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p>test</p> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| <script> | |
| $(function(){ | |
| $('p').click(function(){ | |
| $(this).cek({ | |
| warna : "red", | |
| ukuran: 15 | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; | |
| using Newtonsoft.Json.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // gcc -Wall -o hasil program.c | |
| // hasil -l nama_file | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <ctype.h> | |
| int main (int argc, char *argv[]){ | |
| // memastikan metode pengimputan terdiri dari 3 bagian |