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
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> |
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 mask to convert the integer to binary. | |
void printBin( int num ){ | |
int mask = 1 << 7; // 10000000 | |
for( int i = 0; i < 8; ++i ){ | |
printf( "%d", ((( num & mask ) == 0 )? 0:1) ); | |
mask >>= 1; | |
} | |
printf( "\n" ); | |
} |
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
#include<iostream> | |
#include<cstdio> | |
struct a{ | |
int val; | |
}; | |
int main(){ | |
/* Pointer's calculation: |
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
#include"avl.h" | |
#include<algorithm> | |
namespace Tree{ | |
// constructor | |
AVLTree::AVLTree( void ){ } | |
// destructor | |
AVLTree::~AVLTree( void ){ | |
this->TreeDestory( this->root ); |
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
1. GROUP_CONCAT() | |
SELECT GROUP_CONCAT( <cols> [ SEPARATOR <"char"> ] ) FROM <table>; | |
SELECT GROUP_CONCAT( <cols> [ SEPARATOR <"char"> ] [ ORDER BY <cols>] ) FROM <table>; | |
2. GROUP BY vs ORDER BY | |
**ORDER BY** alters the order in which items are returned. | |
**GROUP BY** is used to organize results according to the structure of the data returned. | |
The results are indexed alphabtically. | |
```GROUP BY``` is defined as a way of aggregating records by the specified columns which allow you to perform aggregation functions on non-grouped columns |
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
package Thirty; | |
import java.util.Arrays; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Main{ | |
public static void main( String [] args ){ |