css/Bootstrap/html Flashcards

1
Q

Appannie only accepts requests from

A

https

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

the appannie api domain is

A

https://api.appannie.com/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Python: The requests library allows you to

A

connect to APIs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A site designed for testing API calls is

A

http://httpbin.org/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

requests: r = requests.get(“http://httpbin.org/get”) returns a

A

response object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

requests: To return the status code of a response object, type

A

r.status_code for the code

or

r.ok for a check on all of them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

requests: To return the header of a response object, type

A

r.headers
or
r.headers.keys()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Python: Most APIs return

A

JSON data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

requests: To return just one value from the header by passing in the key name, type

A

r.headers[“Key name”]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

requests: To see the text of a response object, type

A

r.text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

requests: To return the text of a response object in json format, type

A

r.json()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

requests: To create an object through an API usually requires a

A

POST request and a payload of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

requests: payloads are usually

A

dictionaries
eg,
payload = {“content”: “My string”, “user_id”: 1000}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

requests: To create a post request, type

A

r = requests.post(“http://httpbin.org/”, params=payload)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

API: A RESTful API request is fundamentally just

A

a url with parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

requests: To send data in a payload where a key represents a list, type

A

payload = {list_name[]: [1000, 2000]}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

requests: To send a delete request, type

A

r = requests.delete(“http://httpbin.org/delete”, params=payload)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

requests: To see if your request was redirected, type

A

r.history

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

requests: To disallow redirects for a request, type

A

r = requests.get(“http://httpbin.org”, allow_redirects=False)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

APIs usually do authentication through

A

public and private keys.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The two main type of authentication for websites (not APIs), use for authentication are

A

HTTPBasicAuth and HTTPDigestAuth

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

requests: to create a request with a HTTPBasicAuth, type

A

from requests.auth import HTTPBasicAuth

r = requests.get(“http://httpbin.org”, auth=HTTPBasicAuth(“username”, “password”))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

requests: requests also support authentication through

A

oauth

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

json: To parse a list of dicts into a df, type

A
for x in r.json()["proposals"]:
    df = df.append([[
            x["costToComplete"], 
            x["freeShipping"], 
            x["gradeLevel"]["id"],
            x["gradeLevel"]["name"]
        ]], ignore_index=True)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

requests: To authenticate with OAuth, type

A

from requests_oauthlib import OAuth1
auth = OAuth1(“YOUR_APP_KEY”, “YOUR_APP_SECRET”, “USER_OAUTH_TOKEN”, “USER_OAUTH_TOKEN_SECRET”)

r = requests.get(“http://endpoint.com”, auth=auth)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

json: When parsing json, if you see a dictionary inside of a value, just

A

ignore the container key name and make the next column the value from the dictionary by using [“Inner KeyName”]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Python: to concat a string with a var you must

A

explicitly make the var a string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

API: To send a get request with a Authorization Bearer key, type

A
headers = {"Authorization":"Bearer MYREALLYLONGTOKENIGOT"}
r = requests.get("endpoint.com", headers=headers, params=payload)

Note: Bearer must be capitalized.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

requests: the end point does not

A

need a trailing question mark or slash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Appannie: The create an app annie category payload is for Games / Strategy, type

A

“categories”:”Overall > Games > Strategy”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Appannie: When passing in the “date”:”yyyy-mm-dd” parameter with “granularity”:”monthly”

A

The report generated counts forwards a month from the date inputted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Appannie: Weekly granularity always starts on

A

sunday

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

appannie: Granularity means

A

the time span

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

A free app mockup site is

A

ninjamock

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

twitter ads must have a

A

link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

pandas: to use read_csv there cannot be

A

any non utf-8 characters in the file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

datetime: the datetime character for the hour of a 24hour clock is

A

“%H”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

python: To import python libraries that are in a different directory, type

A

import sys

sys.path.insert(0, ‘/users/student/desktop/’)

import file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

html: a headline tag is

A

<h1></h1>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

html: To start an html file, type

A

-!DOCTYPE html>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

To make the cursor go directly to the end of the line, type

A

command right arrow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

html: By default, you should set the encoding in the head tags by typing

A
  • head>
  • meta charset=”utf-8”>
  • /head>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

html: first level headlines should be place in the

A
header element
-header>
<h1>Home</h1>
<h2>Contact</h2>
-/header>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

html: You should place paragraphs inside

A

<p></p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

html: The footer of your site should go in

A

-footer>
Company, LLC
-/footer>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

html: Sections of your page should be placed in

A

-section>-section>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

html: Place paragraphs inside

A

<p></p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

html: the format for an html entity is that they

A

start with an ampersand and end with a semi colon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

flask: if you save two cookies by the same name the second will

A

overwrite the first one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

json: To parse json into a dict, type

A

json.loads(my_json)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

json: To turn a dict into json, type

A

json.dumps(my_dict)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

json: The json library is used to

A

turn json into dicts and dicts into json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

The format for json is,

A

Dict surrounded by single quotes

Every key is a string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

flask: To import the module for sending messages to the user, type

A

from flask import flash

app = Flask(\_\_name\_\_)
app.secret_key = "bunchofrandomcharacters"
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

html: To create an bullet point list, type

A
  • ul>
  • li>List Item 1-/li>
  • li>List Item 2-/li>
  • /ul>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

html: to create an image, type

A

-img src=”/imagepath”, alt=””>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

css: To import the stylesheet to the html page, type

A
  • head>
  • link rel=”stylesheet” href=”css/main.css”>
  • /head>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

css: To apply styling to anchor tags inside nav tags, type

A

nav a {
color: blue;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

css: To remove all underlines from links, type

A

text-decoration: none;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

css: To create a divider for css selection purposes, type

A

-div>-/div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

To select a large amount of code

A

place cursor above it, hold shift and then click below it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

To indent a block of text

A

highlight it and press command, square bracket

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

css: To select a div with the id=”wrapper”, type

A
#wrapper {
    color: blue;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

css: To change the color of the background, type

A

background: blue;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

css: To set the maximum width of an element, type

A

max-width:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

css: To set how close to the browsers edge an element will reach, type

A

margin: 0px auto;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

css: for “margin: 0px auto;” the first number controls

A

the top and bottom margins

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

css: To increase the space around the border from within an element, type

A

padding: 5% 5%;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

css: to center align text, type

A

text-align: center;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

css: to center a wrapper div, type

A

margin: 0 auto;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

css files end in

A

.css

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

in html, staying consistent with tabs and spaces

A

does not matter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

to use the “and” operator, type

A

if my_var == 5 and my_var2 == 10:

print(“yes”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

bootstrap by default is

A

responsive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

you can get bootstrap by simply

A

including it in the -link rel= through a CDN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

bootstrap: to automatically make images responsive, typw

A

-img src=”my_image.png” class=”img-responsive” alt=””>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

bootstrap: To automatically centre a page element, type

A
  • div class=”container”>

- /div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

bootstrap: To make a certain text line look the most important, type

A
  • p class=”lead”>

- /p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

bootstrap: to align text, type

A
  • p class=”text-left”>-/p>
  • p class=”text-center”>-/p>
  • p class=”text-right”>-/p>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

bootstrap: To import bootstrap, type

A

-link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css”>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

css: the css import should be in the order

A

bootstrap, google font, styles.css

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

bootstrap: To create a clean pill navigation, type

A
  • ul class=”nav nav-pills”>
  • li>-a href=”“>Page 1-/a>-/li>
  • li>-a href=”“>Page 2-/a>-/li>
  • /ul>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

bootstrap: bootstrap places items on the page using a

A

grid system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

bootstrap: the number of columns the grid usually has is

A

12

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

bootstrap: To create a new row in the grid with two columns, type

A
  • div class=”row”>
    • div class=”col-md-5”> My content
    • /div>
    • div class=”col-md-7”> My content
    • /div>
  • /div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

css: To select multiple elements together, type

A

h1, h2, h3 {
color: blue;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

css: To lower some text, type

A
#my_text {
    margin-top: 100px;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
88
Q

css: to set the styling of a class, type

A

.my_class {
color: blue;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q

css: To apply two classes to one element, type

A

-div class=”class1 class2”>-/div>

.class1.class2 {
color: blue;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q

css: To create a border on an image, type

A

border: 8px solid #333333;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
91
Q

css: After you import the google fonts, to set the font on some text, type

A

into styles.css

h1 {
font-family: “Fontname”, backup-font;
}

The link and the instructions are all provided upon checkout from google.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
92
Q

css: each browsers default styling is stored in what’s called the

A

user agent stylesheet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

css: When there are to selectors on the same element, the one that prevails is the one with

A

higher specificity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
94
Q

pythonanywhere: To see new changes I have to

A

both save and reload.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
95
Q

pandas: iterrows is a

A

generator which yields both index and packed rows

for index, row in df.iterrows():
prin(row[“c1”], row[“c2”])

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

bootstrap: to create a modal, type

A

Launch demo modal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
97
Q

Hexadecimal means

A

base 16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
98
Q

css: colors start with a

A

#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

css: The color white is

A

ffffff

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
100
Q

css: All id attributes must be

A

unique on the same page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
101
Q

css: To select a class tag that is within an anchor tag that is within a nav tag, type

A

nav a.myclass {
color: blue;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
102
Q

css: a sudo class is

A

a way to select an element in a specific state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
103
Q

css: to select the color of an anchor tag inside a nav tag on hover, type

A

nav a:hover {
color: blue;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
104
Q

css: The hexidecimal color black is

A

000000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
105
Q

css: To write a comment, type

A

/* my comment */

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
106
Q

the url for google fonts is

A

www.google.com/fonts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
107
Q

css: a common backup font for a google font is

A

sans-serif

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
108
Q

css: By default, 1em is

A

16 pixels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
109
Q

css: To set a font size relative to the default, type

A

font-size: 1.5em;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
110
Q

css: to unbold a headline, type

A

h1 {
font-weight: normal;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
111
Q

css: to change the amount of space between lines, type

A

line-height: 0.8em;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
112
Q

css: To pull other elements closer on the top, type

A

margin: -15px 0 0;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
113
Q

css: To add padding just to the top, type

A

padding-top: 10px;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
114
Q

Pandas: To make columns with categorical data be stored more efficiently, type

A

df[“Categorical Column”] = df[“Categorical Column”].astype(“category”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
115
Q

Pandas: To fill a columns nans with the mean, type

A
mean = df['column'].mean()
df['column'] = df['column'].fillna(mean)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

bootstrap: By default, you should centre all the page elements by

A

putting everything inside the body inside a <div class="container"> </div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
117
Q

bootstrap: To create a header with a light grey line underneath, type

A
  • header class=”page-header”>
    • p>My Header-/p>
  • header>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
118
Q

bootstrap: In order for class=”nav nav-tabs” to work, the <ul> must be</ul>

A

all anchor tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
119
Q

bootstrap: To pull the navigation to the right, type

A

class=”nav nav-pills pull-right”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
120
Q

bootstrap: To make a navigation option look active, type

A

-li class=”active”>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
121
Q

bootstrap: To create a large green button, type

A

-a href=”” class=”btn btn-success btn-lg”>My Button Text-/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
122
Q

bootstrap: To group two buttons together, type

A
  • p class=”btn-group”>
  • a href=”” class=”btn btn-success btn-lg”>My Button Text-/a>
  • a href=”” class=”btn btn-success btn-lg”>My Button Text-/a>
  • /p>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
123
Q

bootstrap: the md in class=”col-md-6” controls

A

at what device size the elements in a row will switch from stacked to horizontal (when expanding window)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
124
Q

bootstrap: If you want to use columns that total less than 12 you need to

A

offset the columns to make them look even

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
125
Q

bootstrap: To offset columns, type

A

<div></div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
126
Q

bootstrap: a nested column must be put inside the

A

divs of its parent col-md

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
127
Q

bootstrap: To create a large text input area, type

A
  • div class=”form-horizontal”>
    • div class=”form-group”>
      • div class=”col-md-6”>
        • textarea class=”form-control” rows=”20” placeholder=”Notes” required>
      • /div>
    • /div>
  • /div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
128
Q

bootstrap: To make two column trade positions for medium sized browsers, type

A
  • div class=”col-md-6 col-md-push-6”>

- div class=”col-md-6 col-md-pull-6”>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
129
Q

bootstrap: to hide an element for extra small screens, type

A

class=”hidden-xs”
or
class=”col-md-6 hidden-xs”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
130
Q

bootstrap: To make images rounded, thumbnail of circular, type

A

class=”img-rounded”
class=”img-circle”
class=”img-thumbnail”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
131
Q

bootstrap: google jquery and bootstraps javascript should be placed

A

right before body end with the jquery first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
132
Q

bootstrap: to make a collapsing nav bar, type

A
  • div class=”nav navbar-default navbar-fixed-top navbar-header”>
    • div class=”container”>
      • button type=”button” class=”navbar-toggle” data-toggle=”collapse” data-target=”.navbar-collapse”>
        • span class=”icon-bar”>
        • span class=”icon-bar”>
      • /button>
      -a href=”” class=”navbar-brand text-muted”>My Brand-/a>
       - div class="collapse navbar-collapse">		   - ul class="nav navbar-nav navbar-right">
        - li class="active">-a href="">Contact
         - li>-a href="">FAQ-/a>-/li>
         - li>-a href="">Buy Now-/a>-/li>
      - /ul>   - /div>
    • /div>
  • /div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
133
Q

bootstrap: To add a dropdown menu to one of the navigation options, type

A
  • li class=”dropdown”>-a data-toggle=”dropdown” data-target=””> My Drobdown -b class=”caret”>-/b>-/a>
  • ul class=”dropdown-menu”>
  • li>-a href=”“>Item 1-/a>-/li>
  • li>-a href=”“>Item 2-/a>-/li>
  • /ul>
  • /li>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
134
Q

bootstrap: To use a glyph icon, type

A

-b class=”glyphicon glyphicon-name”>-/b>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
135
Q

bootstrap: To create a divider in a dropdown menu, type

A

-li class=”divider”>-/li>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
136
Q

html5: you can now record audio into

A

the chrome browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
137
Q

mysql: To see all the databases from with the sql console, type

A

SHOW DATABASES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
138
Q

mysql: To see all the tables in a specific database, type

A

SHOW TABLES IN databasename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
139
Q

mysql: To create a new table in a specific database, type

A

CREATE TABLE databasename.New_Table_Name (column VARCHAR(50));

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
140
Q

mysql: Column names cannot be

A

just a number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
141
Q

mysql: To see which user I am signed in as, type

A

SELECT user(), current_user();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
142
Q

mysql: To enter another database, type

A

USE databasename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
143
Q

mysql: To delete a database, type

A

USE databasename;

DROP DATABASE databasename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
144
Q

mysql: To close a mysql console, type

A

EXIT;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
145
Q

python: list(range(0,5)) returns

A

[0, 1, 2, 3, 4]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
146
Q

css: using -10px to push an element the opposite direction only works on the

A

margin property

147
Q

regex: The operator for “or” is

A

|

148
Q

regex: The regex /hi/ with return true for any string that

A

contains “hi” anywhere in it.

149
Q

regex: To match on all “ar”, “arr”, “arrr”, type the regex

A

/ar+/

150
Q

regex: to match to a character within a range from a-c, type

A

[a-c]

151
Q

regex: To make regex case insensitive, you must type

A

i after the final slash e.g. /hi/i

152
Q

regex: To match with whitespace, such as a space, tab or new line, type

A

\s

153
Q

regex: to match a character on a range of a-z and 1-2 and whitespace (case insensitive), type

A

/[\w\s]+/

154
Q

regex: To match on any letter, type

A

\w

155
Q

css: To remove the bullet points from a -li>, type

A

li {
list-style-type: none;
}

156
Q

bootstrap: To use bootstraps main cdn do not use

A

the optional theme.

157
Q

css: To make a class override other classes acting on the same element despite not having highest specificity, type

A
!important;
e.g.
.button {
	background: #fff !important;
}
158
Q

bootstrap: When adding bootstrap to layout.html remember to

A

add the viewport meta tag in the head

159
Q

bootstrap: To create a login form, type

A
  • h2 class=”form-signin-heading”>Please Sign In-/h2>
  • form action=”” method=”post” class=”form-signin”>
  • input type=”email” placeholder=”Email” class=”form-control” name=”username”>
  • input type=”password” placeholder=”Password” class=”form-control” name=”password”>
  • button class=”btn btn-lg btn-primary btn-block” type=”submit”>Sign in-/button>
  • /form>
160
Q

bootstrap: To create a good looking file upload button, type

A

-label class=”btn btn-primary” for=”my-file-selector”>
-input id=”my-file-selector” type=”file” style=”display:none;”>
Button Text
-/label>

161
Q

bootstrap: To make a file upload that displays the filename you are uploading, type

A

-div style=”position:relative;”>
-a class=’btn btn-primary’ href=’javascript:;’>
Choose File…
-input type=”file” style=’position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0);-ms-filter:”progid:DXImageTransform.Microsoft.Alpha(Opacity=0)”;opacity:0;background-color:transparent;color:transparent;’ name=”file_source” size=”40” onchange=’$(“#upload-file-info”).html($(this).val());’>
-/a>
-span class=’label label-info’ id=”upload-file-info”>-/span>
-/div>

162
Q

boostrap: to increase the size of a glyphicon, type

A

font-size: 1.5em;

163
Q

bootstrap: You should imbed scripts into the template only

A

after the jquery and bootstrap javascript imports

164
Q

bootstrap: When invoking javascript that is stored in the static folder make sure the contents of the folder

A

does not have script tags around it.

165
Q

bootstrap: To make a horizontal button group that spans the entire width of the div, type

A
  • div class=”btn-group btn-group-justified” role=”group” aria-label=”…”>
    • div class=”btn-group” role=”group”>
      • a href=”” class=”btn btn-default”>Left-/a>
    • /div>
    • div class=”btn-group” role=”group”>
      • a href=”” class=”btn btn-default”>Right-/a>
    • /div>
  • /div>
166
Q

css: To make the image used as a background stay centered in an element, use the property

A

background-position: center;

167
Q

css: To create good looking charts, use

A

highcharts

168
Q

css: To round the corners of a div, type

A

border-radius: 25px;

169
Q

css: To add a shadow to the bottom of a div, type

A

box-shadow:0px 1px 1px grey;

170
Q

css: The order of the classes in class=

A

does not matter

171
Q

css: If you are using a sticky header, to make sure it doesn’t cover page content, you should

A

create a class
.move-down {
margin-top: 50px;
}

and add that class to the bodies main “container” div.

172
Q

css: To find a site to choose color scheme

A

google flat ui colors

173
Q

bootstrap: To install jquery and jqueryui, type before body end tag

A
  • script src=”http://code.jquery.com/jquery-2.1.4.min.js”>-/script>
  • script src=”http://code.jquery.com/ui/1.11.4/jquery-ui.js”>-/script>
174
Q

bootstrap: nav bar collapsing only works if you have

A

jquery installed.

175
Q

bootstrap: To center align text, type

A

-p class=”text-center”> Text -/p>

176
Q

bootstrap: the class=”sr-only”

A

hides an element from all users except the visually impaired using screen readers.

177
Q

bootstrap: To make a table striped, type

A

-table class=”table table-striped”>

178
Q

css: To make a button span the full width of its div, type

A

display: block;
width: 100%;

179
Q

css: To remove the border from a bootstrap button, type

A

border: 0px;

180
Q

bootstrap: To increase the opacity of a bootstrap modals background, type

A

.modal-backdrop {
opacity: 0.8 !important;
}

181
Q

css: To make an element appear behind other elements, use the property.

A

z-index: -1;

182
Q

css: To center text and images inside a div, use the div property

A

text-align: center;

183
Q

html: To prepopulate a form input, add the attribute

A

value=”value”

184
Q

css: To create a fixed background image from cloudfront, type

A

background-image: url(‘http://d24d6ca2ggyz18.cloudfront.net/file.jpg’);
background-repeat: no-repeat;
background-size: 100%;
background-attachment: fixed;

185
Q

css: The property that controls the indent of text is called

A

text-indent

186
Q

bootstrap: To make a form with inline labels, type

A
  • form action=”” method=”” class=”form-horizontal”>
    • div class=”form-group”>
      • label for=”input_id” class=”col-sm-3 control-label”>Field Label
      • div class=”col-sm-9”>
      • input class=”form-control” id=”input_id” type=”text”>
      • /div>
    • /div>
187
Q

css: To crop an image with css, type

A
  • div class=”cropper”>
    • img src=”http://your-source.com” alt=”alt” />
  • /div>
.cropper { 
    width: 418px; 
    height: 240px; 
    overflow: hidden; 
}
.cropper img { 
    width: 100%;
}
188
Q

css: The trick to cropping an image to make it the correct size but maintain the aspect ratio is to

A

make it the background of a div and then have the original img tag inside of it with the opacity of 0 so you can still copy and paste and SEO.

189
Q

css: When using four numbers for the margin properties values, they associate with the sides

A

top, right, bottom, left

190
Q

css: When using three numbers for the margin properties values, they associate with the sides

A

top, right/left, bottom

191
Q

html: To make an -a> tag open the link in a new tag, type

A

target=”_blank”

192
Q

html: buttons are

A

tags, so you must put the label of it before a /button

193
Q

css: To make a div it’s own scrollable section, type

A

overflow: auto;

194
Q

html: To make the form action point to the same URL as current with something appended,

A

do not start the action with a slash.

195
Q

html: To make a form action url set the entire folder path and not just append,

A

start the path with a slash

196
Q

Bootstrap: when creating a complicated table using the row and col-md-x classes

A

It helps to create the closing div and indent the contents right after opening the div and before entering the content in order to mentally keep track.

197
Q

html: To make a link no follow, add the attribute

A

rel=”nofollow”

198
Q

css: To give the background two overlapping images, type

A

background: url(http://cdn.com/image1), url(http://cdn.com/image2);

199
Q

css: when using background: url(http://cdn.com/image1), url(http://cdn.com/image2); the first image

A

shows up on top.

200
Q

css: To go into the css file of a page element from the chrome console,

A

click on the page element, hold control, click on the relevant class on the right css pane

201
Q

css: To preload two images, type

A

body:after{
display:none;
content: url(http://cdn.com/image1.jpg) url(http://cdn.com/image2.jpg);
}

202
Q

html: To make a pop up that either confirms or cancels a link click, add the attribute

A

onclick=”return confirm(‘string’);”

203
Q

html: To make a pop up that either confirms or cancels a form submit, add the attribute

A

onsubmit=”return confirm(‘string’);”

204
Q

css: block type page elements

A

take up an entire line and create a new line above and below them

205
Q

css: inline type page elements

A

fir inside their parent and only take the space they need.

206
Q

css: The sections of the element box model are

A

content, padding, border, margin

207
Q

css: To set the width of a border, type

A

border-width: 10px;

208
Q

css: To set the style of a border, type

A

border-style: solid;

209
Q

css: To set the color of a border, type

A

border-color: #ffffff;

210
Q

css: To set the borders width, style and color in a shorter way, type

A

border: 10px solid #ffffff;

211
Q

css: To set the height of a line, type

A

line-height: 1.2;

212
Q

css: To set all the margins to be equal, type

A

margin: auto;

213
Q

css: The most common display values are

A

none, block, inline, inline-block

214
Q

css: set an element to display: none; will

A

make it take no space on the page and therefore disappear

215
Q

css: The three main parts of responsive design are

A

fluid images, fluid grids, and media queries

216
Q

css: To add the code that makes a site responsive

A

add a new file called responsive.css and import it below styles.css to if any media queries are met it will override the standard styles.

217
Q

css: To set css for when a screen width is more than 480px, type

A

@media screen and (min-width: 480px) {

}

218
Q

css: To override the properties affecting an element only under a media query condition

A

create a class in the media query with the preferred properties and add the class to the page element. This way the new class is undefined until the condition is met at which point it overrides the previous class.

219
Q

css: To apply properties to an nth page element that matches the css selector, type

A

li:nth-child(3n) {

}

220
Q

css: To make the background image of a div fill the whole container, type

A

background-size: cover;

221
Q

css: To set the horizontal position of an element to not move, type

A

position: absolute;

222
Q

css: To give a link a nice underline, type

A

text-decoration: none;

border-bottom: 2px solid #fff;

223
Q

css: Sometimes to make a parent div contain its children divs within its height, you must type

A

position: relative

224
Q

css: To set the border radius on just the top left corner, type

A

border-top-left-radius: 0.3em;

225
Q

css: The four types of positions are

A

fixed, absolute, relative, static

226
Q

css: To specify that the text in <p> elements will never wrap, type</p>

A

white-space: nowrap;

227
Q

css: To create a media query with more than one condition that can or must be met, type

A

@media only screen and (min-width: 768px), @media only screen and (min-width: 768px) and (orientation: landscape) {
}

228
Q

css: To customize the styles for every bootstrap breakpoint, type

A
into responsive.css
@media only screen and (min-width : 1400px) {
  /*set max-width ~1500px */
}
@media only screen and (max-width : 1200px) {
}
@media only screen and (max-width : 992px) {
}
@media only screen and (max-width : 768px) {
}
@media only screen and (max-width : 480px) {
    /*set font-size ~1em */
}
@media only screen and (max-width : 320px) {
}

Note:
Must put css selector (e.g. #css-id) inside the media query
Make the logo change color in each media query for development

229
Q

css: a shortcut in text editors to comment out highlighted text is

A

command slash

230
Q

css: To convert all text to uppercase using css, type

A

text-transform: uppercase;

231
Q

css: The main element positions and their meanings are

A

fixed (stays in one part of the computer screen, eg, by levels)
relative (stays in one part of the parent div)
absolute (stays fixed on one part of the page)

232
Q

css: In order to use z-index, you must

A

specify the position: of the elements being stacked BEFORE the z-index.

233
Q

css: To blur an image, type

A

-webkit-filter: blur(5px);

234
Q

css: When you are floating the elements, and one of them gets caught rather than going to the next line, you must

A

add the clear property

clear: both;

235
Q

css: By default, html elements are positioned as

A

static

236
Q

css: you can use the relative position property to

A

offset an element.

237
Q

css: using the relative position property to offset an element

A

moves if relative to where it would have been had you left the position as static

238
Q

css: Setting the position to absolute

A

removes it from the documents flow and makes it be contained in it’s parent div

239
Q

css: z-index will not work on

A

elements with position: static; (which is the default)

240
Q

css: To move an element with position: relative; above its top border, type

A

top: -10px;

241
Q

css: The psuedo class for when an element is being clicked is

A

:active

242
Q

css: The easiest way to see the break point when making a design responsive is to

A

make each media query’s body background alternate black and white

243
Q

html5: To add arbitrary attributes to html tags, you must

A

prefix the attribute name with “data-“

244
Q

css: To allow only up and down scrolling in a div, add the property

A

overflow-y: auto;

245
Q

bootstrap: To make the content stretch to the width of the entire page, use the div class

A

container-fluid

246
Q

html: To make an image a link, just

A

surround it with a tags and set the href as an attribute of the a tag.

247
Q

css: To give an h1 tag a border-bottom underline that does not span the whole screen, type

A

h1 {
display: inline-block;
border-bottom:2px solid;
}

248
Q

css: To keep the style separate between one app and another

A

give the main container div of the app a class name and then use that class name before all of the css selectors in it’s styles.css

249
Q

html: To create a meta description, type

A

-meta name=”description” content=””>

250
Q

html: To create a title tag, type

A

-title>string-/title>

251
Q

html: The favicon should be placed

A

on your server in that static folder, since some user agent expect it there and not on a CDN.

252
Q

html: To add a favicon to base.html, type

A

-link rel=”shortcut icon” type=”image/png” href=”{% static “app_name/favicon.ico” %}”/>

253
Q

css: when giving a div a position: you must also

A

give it a side distance, in order for it to show. e.g. top, right, bottom, left.

254
Q

css: To make a flat button like levelsio you just

A

add a bottom border of slightly darker shade to a button

255
Q

css: You must place the background-position: property

A

after the background: url() property so that the image is loaded after before you effect it.

256
Q

css: to change the cursor a user has when over an element, use the property

A

cursor: url(http://path/image.png) auto

257
Q

css: To easily make a div with an arrow, go to

A

http://cssarrowplease.com/

258
Q

css/jquery: To unhide an element that has, display:none; type

A

$(“.css-class”).css(“display”, “initial”);

259
Q

jqueryui: always add the jqueryui import script

A

after the regular jquery import script.

260
Q

css: To center align an element that has position:absolute; type

A

position:absolute;
bottom:0px;
z-index:2;
right:0;
left:0;
margin-left:auto;
margin-right:auto;
text-align:center;

261
Q

css: To eliminate the styling on a link, the two css selectors you must override are

A

a, a:hover

262
Q

css: separating styles between pages is

A

necessary, so they do not compete with eachother

263
Q

css: To set a full page background image, type

A
body {
  background: url(images/bg.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
264
Q

css: When making a backdrop div to cover the whole screen

A

No not use position:fixed; since it doesn’t scroll properly, so use position:absolute with both a min-height and height:100%;

265
Q

html: To refresh a page every set number of seconds, type

A

-meta http-equiv=”Refresh” content=”100”>

266
Q

html: You can set the height and width of an image using

A

html attributes. e.g. height=”100” width=”200”

267
Q

css: When creating a mobile first site

A

it’s easiest to arrange of the elements with a distance from the top. e.g. top: 20px;

268
Q

html: The meta tags all sites should have are

A
  • meta charset=”utf-8”>
  • title>string-/title>
  • meta name=”Description” content=”string”>
  • link rel=”icon” type=”image/png” href=”http://cdn.com/favicon.ico”>
269
Q

css: for the background-position property, the options for the first and second arguments are

A

1st: left, right, center
2nd: top, bottom, center

270
Q

html: To create a favicon from an image go to

A

http://www.favicon-generator.org/

271
Q

html: the typical size of a favicon is

A

16x16

272
Q

css3: To give an element an animation, type

A

.css-class {
position: relative;
-webkit-animation: animation-name 5s infinite;
animation: animation-name 5s infinite;
}

@keyframes animation-name {
    from {transform:rotate(0deg);left:-1000px; top:0px;}
    to {transform:rotate(360deg);left:0px; top:0px;}
    0%   {background-color: red;}
    25%  {background-color: yellow;}
    50%  {background-color: blue;}
    100% {background-color: green;}
}

@-webkit-keyframes animation-name {
from {transform:rotate(0deg);left:-1000px; top:0px;}
to {transform:rotate(360deg);left:0px; top:0px;}
0% {background-color: red;}
25% {background-color: yellow;}
50% {background-color: blue;}
100% {background-color: green;}
}
note: For motion animations, changing top works better than margin

273
Q

html5: If rendering html5 video you should

A

convert the video into mp4, webm, and ogg and add them as fallbacks inside the video tags

  • source src=”http://cdn.com/video.webm” type=”video/webm”>
  • source src=”http://cdn.com/video.ogg” type=”video/ogg”>
274
Q

html5: To stream a video from a cdn onto the page, type

A
  • video id=”video-player” preload=”metadata” autoplay loop controls muted>
    • source src=”http://cdn.com/video.mp4” type=”video/mp4”>
  • /video>
275
Q

css: To place an icon inside of a forms input field, type

A
  • div id=”input_container”>
    • input type=”text”>
    • img src=”https://cdn.com/icon.png”>
  • /div>

Then give the input tag some padding-left

276
Q

css: To improve the legibility of small text, add the property

A

text-rendering: optimizeLegibility;

277
Q

css: To make the background of a div into a gradated color, type

A

background: linear-gradient(180deg, red, red, red, black);

278
Q

html: Sometimes if your video tags aren’t playing the video, ensure

A

the video is H.264 encoded

279
Q

css: One way to make a slide out side menu is

A

to create the whole menu with a lower z-index and then on click have the page body move to the right

280
Q

css: When setting widths and heights, opt for

A

using min and max rather than absolute

281
Q

css: To make a container div adjust to contain its inner contents

A

use display: inline-block;

282
Q

css: To increase or decrease space between letters, use

A

letter-spacing: 2px;

283
Q

css: To change the font of an entire page

A

add an “add-font” class to the body tag and make the chosent font !important

284
Q

javascript: To submit a file upload immediately after the user selects it, type

A

document.getElementById(“my-id”).onchange = function() {
document.getElementById(“my-id”).submit();
};

285
Q

bootstrap: To make a file upload that looks like a bootstrap button, type

A

-span class=”btn btn-primary btn-file”>
Browse-input type=”file”>
-/span>

.btn-file {
    position: relative;
    overflow: hidden;
}
.btn-file input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    filter: alpha(opacity=0);
    opacity: 0;
    outline: none;
    background: white;
    cursor: inherit;
    display: block;
}
286
Q

bootstrap: To change the color of a glyphicon

A

color: blue;

287
Q

html: To make a form field automatically have the cursor in it, add the attribute

A

autofocus

288
Q

css: To select and element by any attribute and value, type

A

[data-attribute=”value”] {

}

289
Q

css: To select and element by just the presence of a data attribute, type

A

[data-attribute] {

}

290
Q

css: A viewport is

A

the viewable area through the browser window

291
Q

css: To set the height of an div relative to the viewport, type

A

height: 50vh

292
Q

css: To set the width of an div relative to the viewport, type

A

width: 50vw

293
Q

css: To make a div into a flexbox, type

A

display : flex;

flex-flow: row;

294
Q

css: To use the full size of the browser viewport, type

A
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100%;
}
295
Q

css: A flexbox is

A

a container element that makes everything inside it stretch out to fill it entirely

296
Q

css: Some properties that make button text look better are

A

letter-spacing: 0.01em;
text-transform: uppercase;
font-weight: 700;

297
Q

css: To make an input and submit button box, type

A
.btn {
  background: #4AB969;
  border: none;
  padding: 10px 20px;
  text-align: center;
  min-width: 100px;
}
input {
  outline: none;
  padding: 12px;
  border: 1px solid #ccc;
}
form {
  display: flex;
  flex-direction: row;
  justify-content: stretch;
}
298
Q

css: To make an element be aligned to the right side of a div instead of the left, type

A

float: right;

299
Q

css: To make an element stretch out to fill its entire viewport container, type

A

flex: 1;
display: flex;
flex-direction: column;
height: 100vh;

300
Q

css: To center the content of a div with a flexbox, type

A

display: flex;
justify-content: center;
align-items: center;

301
Q

css: To remove the blue border that shows when you click on a button or input field, type

A

outline: none;

302
Q

html: To prevent the browser from auto suggesting values for input fields, type

A

autocomplete=”off”

303
Q

css: To style the label of a checkbox only if it is checked, type

A

input[type=checkbox]:checked + label {

}

304
Q

html: The same origin policy only applies to

A

javascript. A form can post to a different url.

305
Q

css: To create an overlay semi opaque div

A
.overlay {
  position: fixed;
  width: 100%;   
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(51,51,51,0.7);
  z-index: 2147483644;
}
306
Q

css: To make the border of an input field invisible, type

A

border: 1px solid transparent;

307
Q

css: Its best to set the fonts on

A

html, body {

308
Q

bootstrap: To make the buttons in a button group stretch out to fill their outer div

A

give each one style=”width:20%;”

309
Q

bootstrap: To make a bootstrap button small, add the class

A

btn-sm

310
Q

bootstrap: For free bootstrap themes go to

A

https://bootswatch.com/

311
Q

bootstrap: To import the windows 8 and IE10 workarounds from cdn, type

A

-script src=”https://maxcdn.bootstrapcdn.com/js/ie10-viewport-bug-workaround.js” type=”text/javascript”>-/script>

312
Q

html: To copy someones webpage template

A

copy their html
save their scripts files
save their css files
fix the paths to the scripts and css from where you put their page

313
Q

html: To return whatever is currently typed into a textarea use the property

A

.value

314
Q

html: To tell the browser that your text is performatted, type

A

-pre>-/pre>

315
Q

css: To create a footer that sticks to the bottom with bootstrap, use the syles

A
html {
  position: relative;
  min-height: 100%;
}
body {
  margin-bottom: 40px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40px;
  background-color: black;
}

note: The footer goes parallel

316
Q

css: The order of the properties

A

does matter

317
Q

css: To make the page render faster

A

move the style and script imports to before body end and minify them.

318
Q

html: A data URI is

A

a base64 encoded string that represents a file

319
Q

html: The format of a data URI is

A

data:[-MIME-type>][;charset=-encoding>][;base64],-data>

320
Q

html: Data URIs can be used in

A

img src or css background: url()

321
Q

html: Some things to consider when using data URIs is

A

mobile browsers are slow to render them
they do not get cached by the browser
they total size of the file will be a third bigger than the binary

322
Q

css: To make a div cause its inner text to wrap, type

A

word-wrap: break-word;

323
Q

html: When a form is also posting files, you must add the attribute

A

enctype=”multipart/form-data”

324
Q

bootstrap: To create a tooltip, type

A

-a href=”#” data-toggle=”tooltip” data-placement=”top” title=”string”>String-/a>

$(document).ready(function(){
$(‘[data-toggle=”tooltip”]’).tooltip();
});

325
Q

css: To import another stylesheet into a css file, type

A

@import url(“https://fonts.googleapis.com/css?family=Roboto:300”);

326
Q

css: Some clean, unannoying sans serif fonts are

A

Lato, Roboto, Open Sans Source, Droid Sans, Source Sans Pro, Proxima Nova

327
Q

bootstrap: To improve on bootswatch’s paper theme

A

make font Open Sans Source
add a card class
.card {
padding: 3% 5% 5% 5%;
background-color: #fff;
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
}
or
.card{
padding: 3% 5% 5% 5%;
position: relative;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 4 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

and make
background-color: #f9f9f9;

328
Q

html: To disable a link hre from requesting, type

A

href=”javascript:void(0);”

329
Q

css: To rotate an element, type

A
  • ms-transform: rotate(45deg);
    • webkit-transform: rotate(45deg)
      transform: rotate(45deg);
330
Q

bootstrap: To make a dropdown menu align with the right side, use the class

A

dropdown-menu dropdown-menu-right

331
Q

css: To allow for 3d animations, give the page a third dimension by typing

A

body {
-webkit-perspective: 800px;
}

332
Q

css: If you flip over an element you will see

A

its back side, which is visible by defaut

333
Q

css: To add css properties to the id set in the url e.g. site.com#css-id, type

A

.p:target {

}

334
Q

css: the styling for a google material design card is

A

position: relative;
display: inline-block;
vertical-align: top;
background-color: #fff;
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);

335
Q

html: To superscript from text, type

A

-sup>string-/sup>

336
Q

css: To style back text that is above a black background so it is visible, type

A

background: #eee;
padding: 5px;
opacity: 0.7;

337
Q

css: To make facebook style 3d button

A
button {
  padding: 10px 30px;
  min-width: 194px;
  text-align: center;
  font-weight: bold;
  background: -webkit-linear-gradient(#67ae55, #578843);
  background: linear-gradient(#67ae55, #578843);
  background-color: #69a74e;
  box-shadow: inset 0 1px 1px #a4e388;
  border-color: #3b6e22 #3b6e22 #2c5115;
  border: 1px solid;
  border-radius: 5px;
  cursor: pointer;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  outline:none;
}

button:hover {
background:-webkit-linear-gradient(#79bc64, #578843);
background:linear-gradient(#79bc64, #578843)}
}

338
Q

css: To make a video with an overlay dark grid, type

A
  • div class=”video-background-container”>
    - video preload=”auto” autoplay=”” loop=”” muted=”” class=”video-background”>
    - source type=”video/mp4” src=”http://cdn.com”>
    • /video>
    • /div>
    • div class=”grid-overlay”>-/div>
.video-background-container {
    position: absolute;
    top: 0px;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    overflow:hidden;
    -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
   -moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
   box-shadow: 4 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

.video-background {
width: 100%;
background: black;
}

.grid-overlay {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index:10;
    background: url("overaly.png") repeat;
}
339
Q

css: Button text usually has increased

A

letter spacing

340
Q

bootstrap: To make an element only visible on certain screen sizes, type

A

visible-md visible-sm

341
Q

css: To create the effect of a line across the whole screen with a word in the middle

A

create a 1px height grey div with width 100% on both sides of the span text.

342
Q

html: To make an image card with a title and button, type

A
  • div class=”card”>
  • img src=”image.jpg” class=”img-responsive” alt=””>
    • div class=”card-heading”>
      • h5 style=”display:inline-block;”>String-/h5>-button class=”btn btn-default pull-right”>-i class=”glyphicon glyphicon-option-vertical”>-/i>-/button>
  • /div>
  • /div>
343
Q

boostrap: To hide elements for certain screen sizes, use class

A

hidden-md

hidden-sm

344
Q

bootstrap: To select the second p tag in every container div, type

A

.container p:nth-child(2n) {

}

345
Q

bootstrap: since col-md-push-6 and col-md-pull-6 are applied to all screen sizes greater than specified, you must

A

hard code the correct column order for the small screen sizes, and then use col-md-push-6 to change the order for larger sizes

346
Q

bootstrap: The bootstrap examples often

A

extend bootstrap, so make sure to copy the extension when mimicking

347
Q

css: To make sure video backgrounds dont buffer,

A

keep them under 25 mb

348
Q

css: Video streams

A

do not work on tablets or phones so hide them

349
Q

css: To center a div… To center an element…

A

div: set its margin to 0 auto
element: set it’s parent to text-align: center;

350
Q

bootstrap: To eliminate the extra space on the right of the screen, add

A

.row {
padding-right: 0px;
margin-right: 0px;
}

351
Q

bootstrap: Bootstraps row class

A

add extra space to the right of the screen and must be extended

.row {
padding-right: 0px;
margin-right: 0px;
}

352
Q

The best workflow for creating a web app is

A

ninjamock wireframe
create the UI using normal bootstrap in a .html with styles in head and scripts in body
Change the bootstrap theme
create responsive.css

353
Q

jquery: To toggle the transparency of the navbar, type

A
$(document).scroll(function() { 
  console.log($(this).scrollTop())
    if($(this).scrollTop() > 4) {
      document.querySelector(".navbar").setAttribute("style","background:black;")
    } else {
      document.querySelector(".navbar").setAttribute("style","background:none;")
    }
})
354
Q

bootstrap: To open the image you clicked in a modal, type

A
  • div class=”modal fade” id=”imagemodal” tabindex=”-1” role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true”>
    • div class=”modal-dialog”>
      • div class=”modal-content”>
        • div class=”modal-body”>
          • img src=”” id=”imagepreview” class=”img-responsive” style=”margin:0 auto;”>
        • /div>
      • /div>
    • /div>
  • /div>

$(“.img-class”).on(“click”, function(event) {
$(‘#modal-img-tag’).attr(‘src’, $(event.target).attr(‘src’));
$(‘#imagemodal’).modal(‘show’);
});

355
Q

css: To append a string to the end a tag using css, type

A

tag:after {
content: “string”;
}

356
Q

css: top: 10%; doesn’t seems to

A

work on firefox, so just use px instead of %

357
Q

css: To make an animation hold its last keyframe, type

A

animation-fill-mode: forwards;

under where you choose the animation name and length

358
Q

Graphic design: the best site background color is

A

White because it always feel bigger in an a/b with something else

359
Q

Graphic design: Sometimes a div you put in a card

A

would look better on an open background instead

360
Q

html: You cannot run javascript

A

from a parent page into it’s child iframe, unless it is on the same domain as iframe
then:
document.querySelector(‘iframe’).contentWindow.targetFunction()

361
Q

html: To make a form submit from a new tab, type

A

target=”_new”

362
Q

html: To add a label to a form input that allows you to click on it and focus the input

A

give the input and id and create label tags with a for attribute set to the id of the input

363
Q

css: divs with the name .container usually

A

have a max-width and are intended to contain the content in the center

364
Q

css: to give an element multiple drop shadows, you can

A

comma separate them