Skip to content

Instantly share code, notes, and snippets.

View santattech's full-sized avatar

santattech santattech

View GitHub Profile
@santattech
santattech / serialize.dart
Created July 4, 2023 04:49
Flutter JSON serialization
import 'dart:convert';
import 'dart:core';
void main() {
var json = {
'data': [
{'id': 1, 'attributes': {'name': "Ram"}}, {'id': 2, 'attributes': {'name': "Shyam"}}
]
};
@santattech
santattech / pg_colaltion_version.md
Last active June 2, 2023 08:00
Postgres collation version issue

Postgres collation version issue

What is PG collation?

A collation is an SQL schema object that maps an SQL name to operating system locales. A collation specifies the bit patterns that represent each character in a dataset and determine the rules used to sort and compare data. Collation attributes can have an impact on query results because they govern how sorting and comparison operations function.

How do I get collation in PostgreSQL?

To find the collation of the database, you need to query pg_database : select datname, datcollate from pg_database;

What was the error?

Recently I have updated my OS version from Ubunutu 20 to Ubuntu 22. After that whenever I tried to create a database in my Postgresql, it throws error. Below is the error shown:

@santattech
santattech / Important_links.md
Last active February 19, 2022 14:46
Few important links
@santattech
santattech / Local-Docker_error.md
Created February 4, 2022 12:35
Fixing local docker

Basic Interview Questions

C

  • What is data type in C?
  • What is sizeOf function in C?
  • What is syntax of ternary operator in C?
  • Difference between = and ==
  • What is pointer?
  • What is NULL pointer?