Skip to content

Instantly share code, notes, and snippets.

View amelieykw's full-sized avatar

amelieykw amelieykw

  • Sophia Antipolis, France
View GitHub Profile
@amelieykw
amelieykw / 0 - Overview.md
Last active April 18, 2024 17:31
[Python - Storing User Passwords Securely: hashing, salting, and Bcrypt] #Python #storepassword #securityofpython

explain the theory of "how to store user passwords securely" with some example code in Python using a Bcrypt library

@amelieykw
amelieykw / 0 - Problem.md
Last active July 28, 2023 02:37
[Encrypting passwords for use with Python and SQL Server] #Python #encryption #encyptionPassword #password
  • Background : SQL Server Authentication + my Python scripts
  • Problem : don't want a clear text password stored in the Python scripts
  • Requirement : secure the passwords
@amelieykw
amelieykw / 0 - Understanding Cookies and Sessions.md
Last active July 23, 2018 14:47
Understanding Cookies and Sessions] #Cookie #Session

Cookies and Sessions are inextricably intertwined, and fundamental to creating rich, interactive internet applications.

What we will be covering in this tutorial:

  • What is a "cookie"
  • What is a "session"
  • Setting and reading cookies
  • Using sessions
  • Troubleshooting
  • Further reading
@amelieykw
amelieykw / Django Official Website.md
Last active July 19, 2018 09:43
[Django - JsonResponse] #Django #JsonResponse
@amelieykw
amelieykw / 0 - What are Web Service?.md
Last active July 19, 2018 09:28
[Web Service] #WebService #XML #SOAP

Web services are open standard (XML, SOAP, HTTP, etc.) based web applications that interact with other web applications for the purpose of exchanging data.

To summarize, a complete web service is, therefore, any service that −

  • Is available over the Internet or private (intranet) networks
  • Uses a standardized XML messaging system
  • Is not tied to any one operating system or programming language
  • Is self-describing via a common XML grammar
  • Is discoverable via a simple find mechanism
@amelieykw
amelieykw / SOAP - Simple Object Access Protocol.md
Last active July 19, 2018 08:57
[RPC, RMI, SOAP - REST web service] #RPC #RMI #SOAP #REST #webService

SOAP:

  • Simple Object Access Protocol
  • XML-based messaging protocol for exchanging information among computers
  • an application of the XML specification

the initial focus of SOAP is remote procedure calls transported via HTTP.

Other frameworks including CORBA, DCOM, and Java RMI provide similar functionality to SOAP, but SOAP messages are written entirely in XML and are therefore uniquely platform- and language-independent.

SOAP Message Structure

@amelieykw
amelieykw / ModelChoiceField.md
Last active July 18, 2018 15:07
[Django - Forms Field - ModelChoiceField] #ModelChoiceField #Django #Forms #Field
class ModelChoiceField(**kwargs)[source]
  • Default widget: Select
  • Empty value: None
  • Normalizes to: A model instance.
  • Validates that the given id exists in the queryset.
  • Error message keys: required, invalid_choice

Allows the selection of a single model object, suitable for representing a foreign key.

@amelieykw
amelieykw / 0 - Introduction to 2D Array.md
Last active July 17, 2018 19:38
[Java - 2D Array] #Java #2DArray #tutorial #interview #Array

Similar to a one-dimensional array, a two-dimensional array also consists of a sequence of elements. But the elements can be laid out in a rectangular grid rather than a line.

An Example

// "static void main" must be defined in a public class.
public class Main {
    private static void printArray(int[][] a) {
        for (int i = 0; i < a.length; ++i) {
            System.out.println(a[i]);
        }
@amelieykw
amelieykw / 0 - Introduction to Array.md
Last active July 17, 2018 10:52
[Java - Array & ArrayList] #Java #Array #tutorial #interview #Array

An array is a basic data structure to store a collection of elements sequentially.

But elements can be accessed randomly since each element in the array can be identified by an array index.

An array can have one or more dimensions.

Here we start with the one-dimensional array, which is also called the linear array.

@amelieykw
amelieykw / 0 - Table of Contents.md
Last active July 16, 2018 22:33
[Java - Get/Search in ArrayList] #Java #Get #Search #ArrayList #tutorial #interview
  • Get Sub List of ArrayList
  • Get the index of last occurrence of the element in the ArrayList
  • Get element from ArrayList
  • Get the index of first occurrence of the element in the ArrayList
  • Check whether element exists in ArrayList