Skip to content

Instantly share code, notes, and snippets.

View claraj's full-sized avatar

Clara claraj

  • Minneapolis College
  • Minneapolis, MN
View GitHub Profile
@claraj
claraj / email.md
Last active September 19, 2020 13:28
How to ask for help by email and get a faster response

Hi all! I'm happy to help you with code by email. To help me troubleshoot, please answer as many questions as possible when you email me.

Asking for help by email - things you should include in your message

  1. What class are you in?
  2. What lab or project are you working on?
  3. What specifically are you trying to do?
  • Example: I'm trying to get the code on slide 42 of Week 9's slides to work
  • Example: I'm working on my final project and I'm trying to get the Save button in the main app window working, it should save the data entered into my database
  1. What's not working? What error messages do you see?
@claraj
claraj / git_submodule_fix.md
Last active November 7, 2025 03:14
Fixing git submodule AKA git repo inside another git repo

Problem, and symptoms:

You experience one or more of these symptoms

  • you have code in a directory but it's not being pushed to GitHub. You just see an empty directory icon
  • you see this message when you add code to your git repository from the command prompt
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
<!-- civicsQuiz-->
<!DOCTYPE html>
<lang=”en”>
<head>
<title> Civics Quiz </title>
<!--for bootstrap-->
<meta charset = “utf-8”>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
title Express and Vue
participantgroup SERVER
participant Vue app files
database Database
participant API Server
participant Express Server
end
@claraj
claraj / map_filter.js
Last active March 17, 2020 17:08
Map, filter, spread operator
// More examples https://medium.com/poka-techblog/simplify-your-javascript-use-map-reduce-and-filter-bd02c593cc2d
let cats = ['Hello Kitty', 'Maru', 'Garfield', 'Soymilk', 'Miles', 'Meridith']
// Mapping - creating a new array built from elements of an existing array
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
let uppercaseCats = cats.map( function(cat) {
return cat.toUpperCase()
})
@claraj
claraj / map_filter.js
Created March 17, 2020 16:00
Map, filter, spread operator
let cats = ['Hello Kitty', 'Maru', 'Garfield', 'Soymilk', 'Miles', 'Meridith']
// Mapping - creating a new array built from elements of an existing array
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
let uppercaseCats = cats.map( function(cat) {
return cat.toUpperCase()
})
// Arrow function, full version
@claraj
claraj / map_filter.js
Created March 17, 2020 16:00
Map, filter, spread operator
let cats = ['Hello Kitty', 'Maru', 'Garfield', 'Soymilk', 'Miles', 'Meridith']
// Mapping - creating a new array built from elements of an existing array
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
let uppercaseCats = cats.map( function(cat) {
return cat.toUpperCase()
})
// Arrow function, full version
function fetchingData( done ) {
fetch(`https://api.worldbank.org/v2/country/${countryCode}?format=json`)
.then(res => res.json())
.then(countryData => {
console.log(countryData);
console.log(countryData[1][0]['capitalCity']);
let capCity = countryData[1][0]['capitalCity'];
done(capCity)
})
.catch(err => {
import sqlite3
db = 'example.sqlite'
def execute(sql, *params):
with sqlite3.connect(db) as con:
cur = con.execute(sql, params)
return cur.rowcount
import java.util.List;
/**
* Created by clara on 1/16/20.
*/
public class TicketMasterResponse {
public Embedded _embedded;
@Override
public String toString() {