Skip to content

Instantly share code, notes, and snippets.

View datduyng's full-sized avatar

Dominic Nguyen datduyng

View GitHub Profile
  • create class name 'cart'
Cart attribute
  int dx:
  int dy: 
  int state;
  int x,y; track coordinate on matrix
 /*
@datduyng
datduyng / Demo.java
Created November 6, 2018 20:18 — forked from cbourke/Demo.java
auto-posted gist
package cse.unl;
import java.time.LocalDate;
public class Demo {
public static void main(String args[]) {
LocalDate dateOfBirth = LocalDate.of(1990, 7, 9);
Student s1 = new Student(35140602, "Chris", "Bourke", 4.0, dateOfBirth);
@datduyng
datduyng / fileIO-H.md
Created November 6, 2018 20:17 — forked from cbourke/fileIO-H.md
auto-posted gist

File I/O

  • A file is a unit of stored memory, usually on disk
  • A file can also be... directories, buffers (standard input/output are files), a socket could be a file, a program is a file
  • You can write to and read from a file
  • Files may be plaintext or binary (or plaintext but not intended for human consumption: EDI, XML, JSON, base-64 encoding)
  • The basic steps to follow are:
    1. Open the file
    2. Process the file

String Processing

  • Strings represent data that may need to be processed
  • Common to deal with CSV (Comma separated value) or similar formatted data
  • Standard library functions can help, but processing involves designing algorithms

More Convenience functions in C

  • There is a ctype.h library that provides several "check" functions for single characters: isalpha(c), isdigit(c), islower(c), isupper(c), isspace(c), conversion: toupper(c), tolower(c), etc.

Eduzon

  • What is Eduzon? It is a learning tools to help indivduals with desire to learn other language.

How it work?

  • User input a story, words and sentences of supported languages. Eduzon's back end will try it best to mask an incredible video with voice and picture to help one learn by visualizing.
  • Working Flowchart

flow

@datduyng
datduyng / loops-H.md
Created October 16, 2018 21:38 — forked from cbourke/loops-H.md
auto-posted gist

CSCE 155H - Computer Science I Honors

Loops

An introduction to loop control structures.

  • We need a way to repeatedly execute blocks of code
  • There are three basic elements to a loop control structure:
    • An initialization (where the loop starts)
    • A continuation condition (how long should the loop continue or when should it stop)
@datduyng
datduyng / strings-155H.md
Created October 16, 2018 21:38 — forked from cbourke/strings-155H.md
auto-posted gist

CSCE 155H - Computer Science I Honors

Fall 2018

Strings

  • Strings are ordered sequences of characters (may be ASCII or Unicode)
  • Different languages represent strings differently
  • Most languages provide a standard library of functions/methods to process strings

Strings in C

@datduyng
datduyng / arrays-155H.md
Created October 12, 2018 05:08 — forked from cbourke/arrays-155H.md
auto-posted gist

CSCE 155H - Computer Science I Honors

Arrays

  • It is rare to only deal with one piece of data
  • Usually, more than one number, string, object, etc.
  • Collections of data can be stored in arrays
  • In general:
    • arrays have a single identifier (name)
      • You can access individual elements in an array using an index
@datduyng
datduyng / functions-H.md
Created October 12, 2018 05:08 — forked from cbourke/functions-H.md
auto-posted gist

CSCE 155H - Computer Science I Honors

Functions & Methods

  • A function is a reusable unit of code that may take input(s) and may produce an output
  • Already familiar with functions: main(), printf(), sqrt(), etc.
  • Functions facilitate code reuse, you don't have to copy-pasta the same code over and over
  • Procedural abstraction: functions allow us to ignore the small details of how a certain block of code or algorithm works
  • Functions encapsulate functionality into reusable abstract code blocks
  • Standard libraries and functions have a lot of design, optimization, testing, debugging, etc. behind them, USE them