Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" | |
version="2.0"> | |
<persistence-unit name="org.hibernate.tutorial.jpa" transaction-type="RESOURCE_LOCAL"> | |
<description> | |
Persistence unit for the JPA tutorial of the Hibernate Getting Started Guide | |
</description> | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> |
package org.halyph.barcode; | |
import java.awt.Color; | |
import java.awt.Graphics2D; | |
import java.awt.geom.AffineTransform; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; |
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.
------------------------------------- | |
Translated Report (Full Report Below) | |
------------------------------------- | |
Process: FSNotes [47340] | |
Path: /Applications/FSNotes.app/Contents/MacOS/FSNotes | |
Identifier: co.fluder.FSNotes | |
Version: 6.0.5 (553) | |
Code Type: ARM-64 (Native) | |
Parent Process: launchd [1] |
import scala.xml._ | |
// To convert a Maven pom.xml to build.sbt: | |
// 1) Place this code into a file called PomToSbt.scala next to pom.xml | |
// 2) Type scala PomtoSbt.scala > build.sbt | |
// The dependencies from pom.xml will be extracted and place into a complete build.sbt file | |
// Because most pom.xml files only refernence non-Scala dependencies, I did not use %% | |
val lines = (XML.load("pom.xml") \\ "dependencies") \ "dependency" map { dependency => | |
val groupId = (dependency \ "groupId").text | |
val artifactId = (dependency \ "artifactId").text |
#!/bin/bash | |
echo -e "\033[0mCOLOR_NC (No color)" | |
echo -e "\033[1;37mCOLOR_WHITE\t\033[0;30mCOLOR_BLACK" | |
echo -e "\033[0;34mCOLOR_BLUE\t\033[1;34mCOLOR_LIGHT_BLUE" | |
echo -e "\033[0;32mCOLOR_GREEN\t\033[1;32mCOLOR_LIGHT_GREEN" | |
echo -e "\033[0;36mCOLOR_CYAN\t\033[1;36mCOLOR_LIGHT_CYAN" | |
echo -e "\033[0;31mCOLOR_RED\t\033[1;31mCOLOR_LIGHT_RED" | |
echo -e "\033[0;35mCOLOR_PURPLE\t\033[1;35mCOLOR_LIGHT_PURPLE" | |
echo -e "\033[0;33mCOLOR_YELLOW\t\033[1;33mCOLOR_LIGHT_YELLOW" |
Manifest mf = new Manifest(); | |
mf.read(Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/MANIFEST.MF")); | |
Attributes atts = mf.getMainAttributes(); | |
System.out.println("Version: " + atts.getValue("Implementation-Version")); | |
System.out.println("Build: " + atts.getValue("Implementation-Build")); |
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x