Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cards.notification"> | |
<uses-sdk | |
android:minSdkVersion="17" | |
android:targetSdkVersion="17" /> | |
<application | |
android:allowBackup="true" |
package enum_example | |
import ( | |
"bytes" | |
"encoding/json" | |
) | |
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred | |
type TaskState int |
Responding to requests via simple route matching is built in to Go's net/http
standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe
to have the default request handler invoked on each request. For example:
package main
import (
{ | |
"main": "server/index.js", | |
"scripts": { | |
"dev": "nodemon --watch server server/index.js", | |
"build": "next build", | |
"start": "NODE_ENV=production node server/index.js" | |
}, | |
"dependencies": { | |
"apollo-boost": "^0.1.13", | |
"apollo-server": "^2.0.4", |
import React, { useState, useEffect, useContext } from 'react' | |
import createAuth0Client from '@auth0/auth0-spa-js' | |
const DEFAULT_REDIRECT_CALLBACK = () => | |
window.history.replaceState({}, document.title, window.location.pathname) | |
export const Auth0Context = React.createContext() | |
export const useAuth0 = () => useContext(Auth0Context) | |
let _initOptions |
When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!
Always use fewer utility classes when possible. For example, use mx-2
instead of ml-2 mr-2
and don't be afraid to use the simpler p-4 lg:pt-8
instead of the longer, more complicated pt-4 lg:pt-8 pr-4 pb-4 pl-4
.
Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use block lg:flex lg:flex-col lg:justify-center
instead of block lg:flex flex-col justify-center
to make it very clear that the flexbox utilities are only applicable at the
// assets/js/app.js | |
// ... | |
import Pickr from "./pickr" | |
const hooks = { | |
Pickr | |
} | |
// ... |
defmodule TravelerWeb.SearchbarLive do | |
use TravelerWeb, :live_view | |
alias Phoenix.LiveView.JS | |
alias Traveler.Places | |
def mount(_params, _session, socket) do | |
socket = assign(socket, places: []) | |
{:ok, socket, layout: false} | |
end |