| CS 341 - Survey of Programming Languages
Scheme for Java Programmers |
| Index |
| About This Tutorial |
This tutorial is designed for the students of CS 341 at Gettysburg College. Students at this level have expertise in Java and C++ programming. Consequently, this tutorial is written for an upper-level Computer Science student with a mature understanding of these languages. Since many concepts overlap from one programming language to another, this tutorial will seem accelerated to and be unsuitable for beginning Computer Science students.
It is recommended that the student taking this tutorial first:
Dr. Scheme is installed on all lab computers. If you own a personal computer, you may also download Dr. Scheme from the Dr. Racket (formerly Dr. Scheme) home page.
On our UNIX systems, Dr. Scheme is started with the command "drscheme &". (The "&" causes the process to run in parallel so that you regain your terminal prompt.) On older Windows systems, navigate from the Start menu to the PLT Scheme program group and select DrScheme. With the most recent "Racket" version, simply include the line "#lang eopl" at the start of your code to select the language for the text "Essentials of Programming Languages".
| REPL: Read-Eval-Print Loop |
In the lower window is the prompt for the Read-Eval-Print Loop (REPL). Scheme is an interpreted language. In the early history of Scheme (and its close relative Lisp), interpreted languages were scorned for their slowness relative to compiled languages such as C. In modern times, with faster hardware and more sophisticated just-in-time (JIT) compiling technology, interpreted languages abound and are making a big impact in computing. Java, JavaScript, Perl, ActiveScript, and Python are but a few of many popular interpreted languages. Most significant applications have some form of interpreted scripting language that allows richer interactions with and extensions to the application.
Scheme's interpreter reads a Scheme expression, evaluates it, prints the result, and repeats the process until there is no more to be interpreted. The "> " prompt indicates that Dr. Scheme's interpreter is waiting to read the next expression. Enter the simple expression "123" at this prompt:
Welcome to DrScheme, version 4.2.4 [3m]. Language: Essentials of Programming Languages (3rd ed.); memory limit: 128 megabytes. > 123 123 >
Scheme reads the string expression "123", evaluates it to have the value 123, and prints the string representation of this value "123". A new prompt appears, awaiting the entry of the next expression.
| Operators and Operands |
As with most programming languages, the syntax of Scheme is specified inductively (see text section 1.1.1). That is, we start with base case or terminal symbols (e.g. fundamental data type values, operators, parentheses). Fundamental data type values are our simplest expressions. Additional inductive rules or productions then allow more complex expressions by defining how terminal symbols and expressions may legally be put together.
For example, consider the terminal symbols "(", ")", "+", "1", and "2". The Scheme language is defined such that we can compose an expression from these symbols to add 1 and 2 like this:
> (+ 1 2) 3 >
Try it. The general form for this binary expression is:
( <operator> <operand1> <operand2>)
We will use the terms operator, procedure, and function interchangeably. Also operand and argument are synonymous. If it is helpful, you may think of the previous form as ( <function> <argument1> <argument2>).
More generally, many Scheme expressions take on the form:
(<operator> <operand1> <operand2> ... <operandN>)
These operands may in turn be other arbitrarily complex expressions. That is, expressions may be nested to form more complex expressions:
> (+ 1 (* 2 3)) 7 > (- 4 (/ 10 5)) 2 > (+ (* 1 2) (- (+ 3 4) (/ 6 3))) 7
Expressions with the operator preceding the operands are said to have prefix notation (e.g. (+ 1 2) in Scheme). Expressions with the operator between operands have infix notation (e.g. 1 + 2 of standard mathematics). Expressions with the operator after the operands have postfix notation (e.g. 1 2 + of HP calculators, PostScript and other stack-based languages). Scheme expressions are in prefix notation with surrounding parentheses.
The operator and operands are each evaluated in turn from left to right. To see how Scheme evaluates basic expressions of Scheme, you can use the Stepper, which shows how an expression is evaluated one step at a time. First, enter the expression you'd like to evaluate stepwise in the upper half of the window (the file buffer). Next choose the menu option Language -> Choose Language -> How To Design Programs -> Beginning Student. (Change the language back to "Essentials of Programming Languages" when you're done using the Stepper.)
When you press the Step button, all of the Scheme expressions in that window will be evaluated stepwise. Try this with the three arithmetic expressions above.
When you're done using the Stepper, change the language back to "Essentials of Programming Languages (3rd ed.)".
Note: On Windows with the most recent version of Racket, simply include the
line "#lang eopl" at the start of your code to select the language for the text
"Essentials of Programming Languages".
| Identifiers, Whitespace, and Comments |
Identifiers are a sequence of letters, digits, and these characters: ! $ % & * + - . / : < = > ? @ ^ _ ~
The sequence of characters cannot begin with a character that could begin a number (e.g. 0-9, -, +, .).
Whitespace (e.g. spaces and newlines) may occur arbitrarily between tokens without changing program meaning. The purpose of whitespace is to make code more readable. For instance, one might format the last Scheme expression above as follows:
> (+ (* 1 2) (- (+ 3 4) (/ 6 3))) 7
Commonly, when lines get too long to follow visually/logically, indentation can greatly clarify the structure. Often, you will use whitespace to vertically align the start of operands.
The semicolon (;) is used to denote a comment. All text from a semicolon to the end of a line is ignored. There are no multiline comments.
| Fundamental Types |
There are nine types: boolean, char, number, pair, port, procedure, string, symbol, and vector. We will briefly describe a few types here. Other types merit further description in later sections.
Boolean
True and false are denoted #t and #f respectively. In Java, we use the infix operator "instanceof" to test class membership. Scheme has prefix operators to test type membership. These are named by following the type name with a question mark. For example:
> (boolean? 3.14) #f > (boolean? #f) #t > (number? #t) #f > (number? 42) #t
Such boolean operators are often called predicates and have names ending with "?" by Scheme programming convention. Other boolean operators include and, or and not:
> (and #t #f) #f > (or #t #f) #t > (and (not #f) (or #t #f)) #t
Numbers
The number type has several subtypes, each more specific than the previous: number, complex, real, rational, and integer. Each of these subtypes has its own corresponding type membership predicate (e.g. "rational?"). Scheme doesn't prescribe any single internal machine representation of numbers. Rather, it tries to present the programmer with the most abstract and exact numeric programming environment possible. To know whether a number's internal representation is exact or inexact, there are two predicates "exact?" and "inexact?". For example:
> (/ 2 3) 2/3 > (number? (/ 2 3)) #t > (rational? (/ 2 3)) #t > (integer? (/ 2 3)) #f > (exact? (/ 2 3)) #t > (sqrt (/ 2 3)) 0.816496580927726 > (exact? (sqrt (/ 2 3))) #f > (inexact? (sqrt (/ 2 3))) #tOf course, floating point operations like sqrt (square root) will yield inexact values from exact values. Also, operations involving both exact and inexact values will often yield inexact values.
Many useful number functions are described in R5RS section 6.2, including but not limited to: +, -, *, /, quotient, remainder, modulo, max, min, zero?, odd?, even?, positive?, negative?, abs, gcd, lcm, floor, ceiling, round, truncate, exp, log, sin, cos, tan, asin, sqrt, expt, number->string, and string->number.
Strings
As in Java, strings are sequences of characters enclosed within double-quotes (") and the backslash (\) acts as an escape character. String indices are zero-based.
Useful string functions are presented in R5RS section 6.3.5, including but not limited to: make-string, string-length, string-ref, string=?, string-ci=? ("ci" = case-insensitive), string<?, substring, string-append, and string-copy.
Characters
Characters are written using the notation #\<character> (e.g. #\a, #\B, #\?) or using the notation #\<character name> (e.g. #\space, #\newline).
Useful character functions are presented in R5RS section 6.3.4, including but not limited to: char=?, char-ci=? ("ci" = case-insensitive), char<?, char-whitespace?, char->integer, integer->char, and char-upcase.
> (substring "testing" 0 4) "test" > (substring "testing" 4 7) "ing" > (substring "testing" 4) "ing" > (string-ref "testing" 3) #\t
Symbols
Symbols are objects that are identical if and only if their names are spelled identically. To quote R5RS: "This is exactly the property needed to represent identifiers in programs, and so most implementations of Scheme use them internally for that purpose." As we shall see, Scheme is a powerful language that can construct new code and immediately execute such code. Thus, the code/data dichotomy of Java doesn't exist in Scheme: Data may in fact be executable code!
Symbols are represented exactly as identifiers. Within code, symbols are preceded by a single-quote (') or appear within a single-quoted data structure. For now, you can think of the single-quote as a way to say to Scheme, "Don't evaluate this (yet)!
> x reference to undefined identifier: x > 'x x > (symbol? 'x) #t
One can also form symbols using the quote operator:
> (quote x) x
| Variables and Assignments |
One may declare global variables (accessible from anywhere in the program) using the define operator. The value of a variable can be changed using the set! operator:
> (define answer 42) > answer 42 > (set! answer (* 6 9)) > answer 54
Believe it or not, you will rarely use these forms. If you find yourself using these a lot, there's a good chance that you should instead be using "let" local variable binding expressions (described later).
| Pairs and Lists |
The pair is the basis of all data structures in Scheme. A pair is constructed by using the cons operator (short for construct) with two operands:
> (cons 'a 'b) (a . b)
From the evaluated result notation, we see why pairs are also sometimes referred to as dotted pairs.
To get the first and second items of a pair, use the operators car and cdr (pronounced could-er), respectively:
> (car (cons 'a (quote b))) a > (cdr '(a . b)) b
The reason for the odd naming of these operators is historic and based in hardware. Steve Russell, implementer of the first Lisp interpreter, relates this sad chapter of programming history:
Such simple operators. Such bizarre names. Feel free to define operators "first" and "rest" to make your code more readable.Because of an unfortunate temporary lapse of inspiration, we couldn't think of any other names for the 2 pointers in a list node than "address" and "decrement", so we called the functions CAR for "Contents of Address of Register" and CDR for "Contents of Decrement of Register". After several months and giving a few classes in LISP, we realized that "first" and "rest" were better names, and we (John McCarthy, I and some of the rest of the AI Project) tried to get people to use them instead. Alas, it was too late! We couldn't make it stick at all. So we have CAR and CDR.
> (define first car) > (define rest cdr) > (first '(a . b)) a > (rest '(a . b)) b
Lists are constructed inductively in Scheme using cons and a special empty-list symbol '() which is similar Java's null.
Base case: An empty list '() is a list.
> (list? '()) #t
Induction step: A pair constructed of an element and a list is a list.
> (list? (cons 'a '())) #tThat is, add anything to the beginning of a list and it is still a list. This can be repeated arbitrarily, although it's often easy to create lists using the "list" construction operator. Indeed, there are several ways to notate a list.
> (cons 'a (cons 'b (cons 'c '()))) (a b c) > (list 'a 'b 'c) (a b c) > '(a . (b . (c . ()))) (a b c)Note that although lists are built from pairs and the empty-list symbol, list notation is much simplified from the equivalent pair notation form. Understanding how lists are defined, you can now see why "first" and "rest" are appropriate substitutes for "car" and "cdr": "car" gives you the first element of the list, and "cdr" gives you the rest of the list.
> (define first car) > (define rest cdr) > (first '(a b c)) a > (rest '(a b c)) (b c)Recall that we said anything can be added to the beginning of a list. That includes lists.
> (define list-of-lists (list '(a b c) '(d e f) '(g h i))) > (car (car list-of-lists)) a > (car (cdr (car list-of-lists))) bChaining car's and cdr's can get tedious, so Scheme defines a number of abbreviations based on the middle letters of the car/cdr chain (up to 4 long):
> (caar list-of-lists) a > (cadar list-of-lists) b > (caddar list-of-lists) cWhy all of this emphasis on lists? Scheme is a close relative of the language Lisp which is short for LISt Processing. Although Scheme does have a vector data type and loop structures for traversing vectors, it is more natural in this language to store data in lists and process such lists recursively. A programmer who becomes comfortable with Scheme will have a good command of recursive programming skills.
For practice, follow the examples above in extracting all of the letter symbols individually. For more challenging practice, consider the same exercise with a mixture of lists of lists and dotted pairs:
> (define challenge '(((a b) (c . d)) ((e . f) . (g h))))
| Lambda Expressions |
Imagine being able to create a method that (1) belongs to no class, and (2) can be passed around like data and applied arbitrarily. This is easily done in Scheme. Here is a simple unnamed procedure/function/operator that squares its single argument x:
> (lambda (x) (* x x)) #<procedure:41:3>
The procedure can of course be named (although it need not be):
> (define square (lambda (x) (* x x))) > (square 5) 25 > ((lambda (x) (* x x)) 5) 25
The lambda expression has the following form: (lambda <list of identifiers> <body expression>)
> (define add (lambda (x y) (+ x y))) > (add 2 3) 5
When applied to the correct number of operands, the lambda expression created variables with the given identifiers, binds them to the operands, and returns the body expression evaluated in this new variable context. Think of this simply as being like an unnamed method with a list of arguments and a main body that returns its value.
In the above example, the lambda expression creates a new variable x, binds it to the value 5, and evaluates (* x x) in this new context.
Why lambda? This comes from the notation of lambda calculus, a powerful formalism of theoretical computer science. When you really think about it, the lambda procedure is really mind-blowing. It's a procedure to create a procedure. In fact, you can create procedures to create procedures, and so on. The lambda calculus has the power to express all computation. It can compute anything computable by a Turing machine and vice versa. However, the usefulness of the lambda calculus is played out in all functional programming languages.
Consider the following interesting application. There is a handy procedure in Scheme called "map". It takes a procedure and a list as operands, and returns a new list containing the results of the applications:
> (map square '(1 2 3 4 5)) (1 4 9 16 25)
In fact, we could easily express map's functionality using lambda calculus:
> (define my-map (lambda (my-proc my-list) (if (null? my-list) '() (cons (my-proc (car my-list)) (my-map my-proc (cdr my-list)))))) > (my-map square '(1 2 3 4 5)) (1 4 9 16 25)Don't worry if you don't understand this now. We haven't covered "if" yet. We could express "if" in the lambda calculus, but then things would really look horrific. The ability to pass around procedures as data is a very powerful functionality. It also encourages a different functional style of programming which is more focused on the evaluation of expressions than the execution of commands. People with exposure to multiple programming paradigms (e.g object-oriented, functional, etc.), will ultimately become better programmers, able to see elegant solutions that would not occur to a programmer with a limited perspective on programming.
The "apply" operator takes an operator and a list of operands, returning the result of the expression (cons <operator> <operand-list>). Again, notice how the distinction between code and data is blurred:
> (apply + '(1 2 3 4 5)) 15 > (apply square '(5)) 25
If you simply want to evaluate an expression, the operator "eval" will do the trick:
> (eval '(+ 1 2)) 3At first, this may seem trivial, but consider that we may build up expressions to be evaluated as part of the program itself. Lists can be Scheme code. Scheme code is composed of lists.
> (eval (cons + (cons 1 (cons 2 '())))) 3In many other non-functional languages, you cannot execute data. Data cannot be procedural in nature. If you can pass procedures, there are often severe limitations. With Scheme, you are free to do really wild programming beyond the scope of this tutorial. Again, don't worry if you cannot appreciate this now. If you're open to seeing things differently, I believe you'll gain a deep appreciation of Scheme's merits with experience. Allow yourself to embrace a different way of thinking!
| Control Constructs |
if
The if construct is similar to the selection operator in Java, C, and C++. "The what?" you reply. The selection operator. It's often left as a "dusty corner" or "advanced topic" item in teaching these languages. The reason is that it has more of a Scheme/Lisp style than Java/C/C++ programmers are comfortable with. Here's a review of the selection operator:
<condition-expression> ? <true-expression> : <false-expression>
The value of this expression is the value of <true-expression> if the <condition-expression> evaluates to true. Otherwise, this expression has the value of <false-expression>. Here's an example use of the selection operator computing the absolute value of a number:
x = (y >= 0) ? y : -y;This allows one to more succintly express the equivalent form:
if (y >= 0) x = y; else x = -y;
Now we return our attention to Scheme. The "if" expression has the same meaning with the following form:
(if <condition-expression> <true-expression> <false-expression>)
For example, here's how one could create an absolute value procedure using lambda and if.
> (define abs-of-steele (lambda (x) (if (>= x 0) x (- x)))) > (abs-of-steele -1) 1 > (abs-of-steele 1) 1
To understand why this is a horrible pun, click here and here.
For your own exercise, similarly create a procedure "my-max" that takes two number parameters and return the greater one. Test it to see if it works for all cases.
and
The prefix "and" procedure has similar behavior to the infix "&&" in Java. Java has "lazy" or "short-circuiting" evaluation of &&, in that it stops evaluating subexpressions once it knows the value of the expression. For instance, if we're evaluating (A && B && C && .... && Z) left-to-right in Java and we find that B is false, we don't need any further evaluation to know that the entire expression is false. So we are "lazy" and we "short-circuit" the evaluation to an immediate "false" conclusion.
Scheme operates similarly with one exception: Any value that is not false (#f) is considered true. In the case where "and" does not have an operand evaluate to false, it returns the value of the last non-false expression. For example:
> (and #t #t #t #t) #t > (and #t 3.14 'squirrel) squirrel > (and 'false '() #f 'only-the-#f-is-false) #f > (and 'false '() 'only-the-#f-is-false) only-the-#f-is-false
Although not apparent at first, this allows you to evaluate a series of expressions, with the #f behaving as a simplistic exception signal, with the last expression providing a sort of return value if no such "exception" is encountered.
or
The Scheme "or" procedure is to Java's "||" as the "and" procedure is to Java's "&&".
> (or #f #f #f #f) #f > (or #f 42 #f) 42 > (or #t #f) #t
cond
The Scheme "cond" (short for conditional) procedure allows a sort of if-else chain case-handling functionality, but is syntactically much more compact. It has the form:
(cond (<condition1> <expression1>) (<condition2> <expression2>) ... (else <expressionN>))
In evaluating the cond expression, Scheme evaluates conditions in order until one has tested non-false or all have tested false. For the first that evaluates to a non-false value, the corresponding expression is evaluated as the value of the entire cond expression. If all conditions test false, then the else expression is evaluated. Here is Horstmann's Richter scale example in Scheme:
(define get-description (lambda (richter) (cond ((>= richter 8.0) "Most structures fall") ((>= richter 7.0) "Many buildings destroyed") ((>= richter 6.0) "Many buildings considerably damaged; some collapse") ((>= richter 4.5) "Damage to poorly constructed buildings") ((>= richter 3.5) "Felt by many people, no destruction") ((>= richter 0.0) "Generally not felt by people") (else "Negative numbers are not valid")))) > (get-description 4.2) "Felt by many people, no destruction" > (get-description 10) "Most structures fall" > (get-description -10000) "Negative numbers are not valid"
case
The Scheme "case" procedure is similar to but more powerful than the Java/C/C++ switch statement. It is similar in that it chooses from different code alternatives by comparing a value against constants. It is different in that (1) no break statements are need to prevent execution of subsequent cases, (2) one can group sets of related constants, and (3) one can base cases on all types with eqv? equivalence comparison (more on eqv? later). Here are a few examples:
(define get-type (lambda (data) (case data ((0 1 2 3 4 5 6 7 8 9) 'digit) ((#\A #\E #\I #\O #\U #\Y #\a #\e #\i #\o #\u #\y) 'vowel) (else (if (and (char? data) (char-alphabetic? data)) 'consonant 'other))))) > (get-type "Hawaii") other > (get-type 5) digit > (get-type #\o) vowel > (get-type #\s) consonant
As you can see, we compare equivalence of dissimilar types (e.g. strings can be compared to integers). One cannot do so in Java/C/C++ because the language is statically/strongly typed. Scheme is, by contrast dynamically/loosely typed. This means that types of variables are checked at runtime rather than at compile time.
There are interesting tradeoffs for static and dynamic typing. For static typing, you can catch type-mismatch errors at compile time, thus reducing the software testing burden. Additionally, code can run faster if it does not need to dynamically check types at runtime. On the other hand, type errors are not the most common in my experience. One can prototype software more rapidly without the programming burden of declaring and casting types everywhere. Strong typing can also seem overly bureaucratic and restrictive for some tasks.
Consider these tradeoffs carefully when choosing languages. Do you need to optimize runtime speed or speed to market? Does dynamic typing offer benefits for your particular programming task, or is the assurance of a strongly-typed system better for your product's reliability? Dynamically-typed languages are, in my opinion, much more fun to program with. The choice is yours. However, you should withhold judgment until you've gained expertise in both programming worlds.
begin
Just as you will find functional-style constructs in non-functional languages (e.g. the selection operator), you will find constructs that, while not necessary, borrow from other programming styles for convenience. The "begin" operator allows you to list a series of expressions to be evaluated, returning the value of the last one. In this sense, it is much like the "and" operator without false-termination.
Given the surface similarity of a begin expression and a method body with a return statement, one might think one would use begin heavily in Scheme. You might be surprised how little you use begin for our programming purposes. If you try to impose a Java-style to your Scheme programming, you'll likely complicate your task. Pay close attention to the examples we encounter, and try to start from square one stylistically.
> (begin 'task-a 'task-b 'task-c-with-return-value) task-c-with-return-value
do
The "do" operator provides Scheme's very flexible iteration construct. One can define, for any number of variables, their initial values and (optionally) the expressions that update them from one iteration to the next. When the termination condition tests false, the optional iterated expressions are evaluate, otherwise, the return-value is evaluated and becomes the value for the entire expression.(do ((var1 <initial-value1> [<next-value1>]) (var2 <initial-value2> [<next-value2>]) ... (varN <initial-valueN> [<next-valueN>])) (<termination-condition> <return-value>) [<iterated-expression1>] [<iterated-expression2>] ... [<iterated-expressionN>])
Here's an example of how one can sum a list of numbers:
> (do ((x '(1 2 3 4 5) (cdr x)) (sum 0 (+ sum (car x)))) ((null? x) sum)) 15
However, you will not likely use the loop construct very much. Scheme lends itself both in form and underlying function to the dominant use of recursion. Consider these two ways of writing a procedure to sum a list of numbers:
(define sum-list-do (lambda (lst) (do ((l lst (cdr l)) (sum 0 (+ sum (car l)))) ((null? l) sum)))) (define sum-list (lambda (l) (if (null? l) 0 (+ (car l) (sum-list (cdr l))))))
The first is iterative and makes use of more variables and syntactic components. The second is recursive and would be a more natural implementation choice for many Scheme programmers. Most of our programming tasks lend themselves to elegant recursive solutions, so be skeptical about the "need" for iteration you'll likely assume when starting out.
| Binding Constructs |
So far, we've introduced global variables with "define", and local variables with the lambda argument list. We haven't yet shown how to introduce local variables that aren't procedural arguments. There are three forms for doing so: "let", "let*", "letrec".
(let ((<var1> <binding-expression1>) (<var2> <binding-expression2>) ... (<varN> <binding-expressionN>)) <local-expression>)The binding expressions are all evaluated together in the surrounding outer variable context. Then they are assigned in some unspecified order to the local variables. The local expression is then evaluated with respect to the new local variable environment. It's helpful to think of the new local environment being built on top of the outer variable environment. If one of the local variable has the same name as a variable in the surrounding environment, it shadows the outer variable. Shadowing occurs in Java as well. Local variables and parameter variables shadow field variables. In many languages, locality determines scope priority.
Here are some examples:
> (let ((x 2) (y 3)) (+ x y)) 5 > (let ((x 2)) (let ((x 3) (y (+ x 4))) (+ x y))) 9
Look at the latter example more closely. Why isn't the answer 10? If we wish to have the local variables be created and bound in sequence, we use the "let*" operator. "let*" shares the same syntax, but has the meaning of performing a bunch of nested single-binding "let"s.
> (let ((x 2)) (let* ((x 3) (y (+ x 4))) (+ x y))) 10 > (let ((x 2)) (let ((x 3)) (let ((y (+ x 4))) (+ x y)))) 10
"let" is more natural if you're only referring to the outer variable context. "let*" is more natural if there are non-circular dependencies between variables such that they can be bound in sequence. But what if the variables are defined in terms of one another? In Scheme, you can recursively define variables using "letrec". Here's an example (based on a R5RS example) in which two variables holding procedures are defined according to one another:
(letrec ((even? (lambda (n) (or (zero? n) (odd? (- n 1))))) (odd? (lambda (n) (and (not (zero? n)) (even? (- n 1)))))) (even? 42)) #t
In general, prefer the simplest binding construct according to your needs.
| Equivalence |
There are three general equivalence predicates in Scheme: "eq?", "eqv?", and "equal?". "eq?" is most discriminating and strict in its interpretation of equality. "equal?" is the least discriminating and strict in its interpretation of equality. Detailed description of these can be found in R5RS, but in a nutshell:
For example:
> (eqv? 'a 'a) #t > (eqv? '() '()) #t > (eqv? '(a) '(a)) #f > (equal? '(a) '(a)) #t > (equal? '(- a (+ b 1)) '(- a (+ b 1))) #t
You'll generally use "=" for comparing exact numbers, "eqv?" for comparing simple objects, and "equal?" for comparing complex objects.
| More List Operators |
Since list-processing is the forte' of Scheme and Lisp, there are many useful list operators. Here are some basic examples:
> (length '(a b c)) 3 > (append '(a b c) '(d e f)) (a b c d e f) > (reverse '(a b c)) (c b a) > (list-tail '(a b c d e f) 3) (d e f) > (list-ref '(a b c d e f) 3) d > (memv 'c '(a b c d e f)) (c d e f) > (memv 'z '(a b c d e f)) #f > (define assoc-list '((a 1) (b 2) (c 3))) > (assv 'b assoc-list) (b 2) > (assv 'z assoc-list) #f
"list-ref" and "list-tail" can be used to access list elements or tail sublists by index. "memv" can be used to check list membership. "assv" takes a key and an association list (a.k.a. a-list) of key-value pairs and either returns the relevant pair or #f if the key is not present.
| Output |
As we will be making use of some non-standard input procedures in our programming, we will only cover simple output here.
> (write assoc-list) ((a 1) (b 2) (c 3)) > (write "string") "string" > (display "string") string > (write-char #\newline) > (newline) >
"write" will display any Scheme data in its standard representation form. Thus, a string which is written will be enclosed in double-quotes. The "display" operator will display string in their normal display representation as if each string character were written individually using "write-char". The "newline" operator simply writes a new line to the current output port. As noted earlier, a port is a basic data type. More details on input/output can be found in R5RS section 6.6.
| Next Steps |
We haven't covered Scheme's library exhaustively (e.g. vectors). Nor have we covered it's semantics or implementation restrictions in rigorous detail. What we have accomplished is a blitz introduction that should give you a good starting foundation for practice. Learning is experiential. Echoing Socrates, Charlie Peacock sang, "We can only possess what we experience." Reading about Scheme is nothing like programming Scheme.
Your real education begins as you approach problems, simple or complex, and translate your solutions into Scheme code. At first, there will be a disconnect between how you think and the how you program Scheme. As all programming languages, Scheme cannot change what it is. However, your mind can change and will learn to translate thoughts into a very different paradigm than it is used to. This stretching exercise of the mind will give you a broader view of programming, a great comfort with recursion, and, if you're open to it, a yearning for functional programming.
| Online Resources |
© 2003 Todd Neller


The Central Pennsylvania Open Source Conference (CPOSC) is a one-day technical conference about all things open source.
Founded in 2008, the conference has long provided a time and place for the community of technologists to converge, converse and connect. As the technology footprint in Central PA continues to grow, so too grows the need for information and experiences to be shared and discussed among developers and users alike.
This dialogue serves as an integral component in cementing Central PA as a recognized hub of technological innovation.
CPOSC is held in historic Downtown Lancaster, Pennsylvania.
CPOSC 2017 will be held on the ground floor at The Ware Center at Millersville University in Downtown Lancaster, PA!
Located in the heart of the City’s arts district, The Ware Center at Millersville University Lancaster is the City’s community center dedicated to fostering civic engagement, encouraging collaboration and promoting innovation for the enrichment of the Lancaster region.
With its beautiful glass facade and welcoming presence on Prince Street, The Ware Center provides the Lancaster community with state-of-the-art facilities for a wide variety of performance, learning and cultural events.
Founded in 2008, the conference has long provided a time and place for the community of technologists to converge, converse and connect. As the technology footprint in Central PA continues to grow, so too grows the need for information and experiences to be shared and discussed among developers and users alike.
This dialogue serves as an integral component in cementing Central PA as a recognized hub of technological innovation.
CPOSC is held in historic Downtown Lancaster, Pennsylvania.
CPOSC 2017 will be held on the ground floor at The Ware Center at Millersville University in Downtown Lancaster, PA!
Located in the heart of the City’s arts district, The Ware Center at Millersville University Lancaster is the City’s community center dedicated to fostering civic engagement, encouraging collaboration and promoting innovation for the enrichment of the Lancaster region.
With its beautiful glass facade and welcoming presence on Prince Street, The Ware Center provides the Lancaster community with state-of-the-art facilities for a wide variety of performance, learning and cultural events.
The Ware Center
at Millersville University
42 N Prince St
Lancaster, PA 17603
Someone from the CPOSC team will get back to you as soon as possible.
at Millersville University
42 N. Prince Street,
Lancaster, PA 17603
111 N. Prince Street,
Lancaster, PA 17603
24 E. King Street,
Lancaster, PA 17602


| crashrpt | ||
| A crash reporting system for Windows applications |
Assume it is required to remotely debug some application logics error. Such an error, for example, infinite loop in a worker thread, may not cause program crash. To collect the information about error that doesn't cause crash, a software developer might provide an ability to generate error report manually on user demand, for example on a key combination press.
The crGenerateErrorReport() function allows to generate an error report manually. When you generate an error report manually, the caller process is not terminated and continues its execution. To send the error report, CrashRpt creates another process named CrashSender.exe.
The silent mode is designed for server applications or services that do not need to interact with user on crash. The silent mode should not be used for regular GUI applications. For regular interactive applications, a user should provide his/her consent to allow sending the error report.
You can pass command line parameters to the executable being restarted using CR_INSTALL_INFO::pszRestartCmdLine, but can't specify another executable for restart. Only the same executable can be restarted that was used to start the current process.
The application is restarted only if at least 60 seconds have elapsed since its start up. This is done to avoid cyclic restarts of an application that crashes right on its start up. Also, the application is restarted only if the user does provide his/her consent.
If you generate an error report manually with automatic restart feature enabled, the caller process is not terminated automatically and another instance of client application is launched. If you want to avoid starting the second instance of the client application, specify the CR_EXCEPTION_INFO::bManual flag.
You can specify custom icon for CrashRpt dialogs by specifying CR_INSTALL_INFO::pszCustomSenderIcon structure member. The value of this parameter should be absolute path to the module containing the icon resource, followed by resource identifier separated by comma. For example, specifying this with "C:\\WINDOWS\\System32\\user32.dll, 1" results in the following appearance (see the figure below).
Custom Icon
Sending Error Report Mandatory
Showing User E-mail and Problem Description Fields


I woke up, but my feet had left the ground. Was I still dreaming? Is this my ikigai?
Hi, there! I'm a speaker, software architect, programmer, writer, voluntaryist, and transhumanist. I also make videos, take photos, build private cities and work with blockchain technology. I do a little bit of everything.
Welcome to Basilar
Basilar is a very easy way to get started with Markdown to HTML generation ...
February 2021 - 1 min read
Markdown Sample (demo)
This sample is taken from the markdown-it demo ...
February 2020 - 1 min read


Abhijit TripathyUndergraduate StudentDepartment Of Computer Science and Engineering, School Of Studies in Engineering and Technology, Guru Ghasidas University Chattisgarh,India,495009 |
I am an aspiring Machine Learning Engineer and AI developer,having a keen
interest in problem solving, data structures, algorithms, discrete mathematics,
number theory and statistical analysis.
Also I like to solve cryptographic problems and take part in coding challenges
organised monthly on different competitive programming sites.
Currently, I am in search of some machine learning projects to work
in real-time and learn from them.
My specialization interest include,
|
|
|
|
|
Chapter Leader (GirlScript Foundation) |
|
Jun 2020 - Present |
|
DSA Developer Intern (OpenGenus Foundation) |
|
Jun 2020 - Present |
|
Data Analytics and Research Intern (Wealthy Waste) |
|
May 2020 - Jun 2020 |
|
Mission Advocate (Widhya) |
|
July 2020 - Present |
|
Problem Setter (Cutshort) |
|
July 2020 - Present |
|
Management Team Member (The Uplift Project) |
|
May 2020 - Present |
|
Technical Content Writer (Geeks For Geeks) |
|
May 2020 - Present |
|
Fellow (Incubate IND) |
|
July 2020 - Present |
| Skill's Name | Grip | Skill's Name | Grip |
| C++ Programming | ⭐⭐⭐⭐⭐ | Technical Writing | ⭐⭐⭐⭐⭐ |
| Python Programming | ⭐⭐⭐⭐⭐ | Blogging | ⭐⭐⭐⭐ |
| Machine Learning | ⭐⭐⭐⭐ | Micro-Economics | ⭐⭐⭐ |
| Web Development | ⭐⭐⭐ | Git & Github | ⭐⭐⭐⭐ |


Home
435A2 - Assignment 2 Homepage
Week 2
View ‣
Week 3
View ‣
Week 4
View ‣
Week 5
View ‣
Week 6
View ‣
Week 7
View ‣
Week 8
View ‣


Sound Cast
Music Library
Add Music
Songs
Music Player
Add Music
Title
Uplaod Music Thumbnail
Upload Music
Upload


munchmates
Making personalized discovery of transitory food experiences effortless.
Sign up for our mailing list for launch updates!
Sign up for our mailing list for launch updates!
Thank you for your support! :)
Click the cookie to take our survey for a chance at a box of homemade chocolate chip cookies!


欢迎回来 , 快分享你的idea吧
Before the phantom of False morning died, Methought a Voice within the Tavern cried, "When all the Temple is prepared within, Why nods the drowsy Worshipper outside?" ————Omar Khayyam
认证中...


Interface ILatitudePayClient
Interface for the ILatitudePayClient, provided to make testing via mocks/stubs etc. easier.
Inherited Members
Namespace: Yort.LatitudePay.InStore
Assembly: Yort.LatitudePay.InStore.dll
Syntax
public interface ILatitudePayClient : IDisposable
Methods
| Improve this Doc View SourceCancelPurchaseAsync(LatitudePayCancelPurchaseRequest)
Cancels a (pending) payment plan previously requested via CreatePosPurchaseAsync(LatitudePayCreatePosPurchaseRequest).
Declaration
Task<LatitudePayCancelPurchaseResponse> CancelPurchaseAsync(LatitudePayCancelPurchaseRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| LatitudePayCancelPurchaseRequest | request | A LatitudePayCancelPurchaseRequest containing the token of the payment plan to cancel. |
Returns
| Type | Description |
|---|---|
| Task<LatitudePayCancelPurchaseResponse> | An instance of a LatitudePayCancelPurchaseResponse indicating if the cancellation was successful. |
Remarks
This only cancels pending/unapproved payment plans. If a plan has been accepted/approved you must refund it instead of cancel it.
See Also
CreatePosPurchaseAsync(LatitudePayCreatePosPurchaseRequest)
Creates a new 'payment plan'.
Declaration
Task<LatitudePayCreatePosPurchaseResponse> CreatePosPurchaseAsync(LatitudePayCreatePosPurchaseRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| LatitudePayCreatePosPurchaseRequest | request | A LatitudePayCreatePosPurchaseRequest instance specifying options for the payment plan to be created. |
Returns
| Type | Description |
|---|---|
| Task<LatitudePayCreatePosPurchaseResponse> | A LatitudePayCreatePosPurchaseResponse instance containing details of the pending payment plan. |
See Also
CreateRefundAsync(LatitudePayCreateRefundRequest)
Refunds a previously approved payment plan.
Declaration
Task<LatitudePayCreateRefundResponse> CreateRefundAsync(LatitudePayCreateRefundRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| LatitudePayCreateRefundRequest | request | A LatitudePayCreateRefundRequest instance containing details of the refund and payment plan to refund against. |
Returns
| Type | Description |
|---|---|
| Task<LatitudePayCreateRefundResponse> | A LatitudePayCreateRefundResponse instance indicating if the refund was successful and details of the refund created. |
Remarks
You can only refund a previously accepted payment plan. Use CancelPurchaseAsync(LatitudePayCancelPurchaseRequest) to cancel a payment plan that is pending.
A refund can be full or partial, and multiple partial refunds can be made. You can only refund up to the total amount of the original payment plan, across all refunds.
GetConfigurationAsync(LatitudePayConfigurationRequest)
Gets configuration information for the current merchant account, specifying the supported currency, minimum and maximum purchase values etc.
Declaration
Task<LatitudePayConfigurationResponse> GetConfigurationAsync(LatitudePayConfigurationRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| LatitudePayConfigurationRequest | request | A LatitudePayConfigurationRequest that specifies options for the data returned. |
Returns
| Type | Description |
|---|---|
| Task<LatitudePayConfigurationResponse> | A LatitudePayConfigurationResponse instance. |
GetPurchaseStatusAsync(LatitudePayPurchaseStatusRequest)
Gets the status of a payment plan previously requested via CreatePosPurchaseAsync(LatitudePayCreatePosPurchaseRequest).
Declaration
Task<LatitudePayPurchaseStatusResponse> GetPurchaseStatusAsync(LatitudePayPurchaseStatusRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| LatitudePayPurchaseStatusRequest | request | A LatitudePayPurchaseStatusRequest instance containing the token of the payment plan who's status should be queried. |
Returns
| Type | Description |
|---|---|
| Task<LatitudePayPurchaseStatusResponse> | A LatitudePayPurchaseStatusResponse instance containing the status and other details of the plan. |


cfcUnit Basics
Introduction
What is Unit testing?
Getting Started
Writing Tests
Creating Test Suites
Test Case Assertions
Extensions
Ant Task
Eclipse Integration
CFUnit Integration
Resources
Online
Books


--- layout: post title: Businesses and cameras date: 2005-02-26 00:00:00 categories: business mobile social ---
Business users want devices without digital cameras: "We also need devices without digital cameras. You'd think it a simple request, but this is a hot enterprise topic. Most firms won't let cameras anywhere near their business."
I think you'll find that's "want", not "need". In the same way that teachers want children to not be texting each other during class, and the music industry wants you to not record CDs from your friends or use Kazaa. Genies, bottles, etc.
I also wonder if there's a disconnect here between what business *users* want, and what business *representatives* want. I've never heard any individual bemoan the fact that they were given a cameraphone for their work.
And I don't see how this can be about industrial espionage or trade secrets.


VanillaDB is a collection of simple-to-read, fast, and extensible database system components aiming to lower the barrier of new-system prototyping and/or learning the database internals.
Most relational database systems today are too complicated for practitioners, especially newcomers, to leverage and build creative systems/components upon. One main problem is that these systems have been optimized for decades, thus the source code is highly sophisticated and hard to understand. VanillaDB rewrites some key components of a distributed relational database system with the following goals in mind:
The source code of VanillaDB is released under the Apache 2.0 license. And we are happy to hear your feedback or feature requests at<EMAIL_ADDRESS>VanillaDB is ideal for:
For instructors, we offer extra coding labs that help students get hands-on experience in some important modules (e.g., query planning, transaction processing, etc.). Please contact<EMAIL_ADDRESS>for more details.
VanillaDB has been used as a testbed in some research work (e.g., T-Part in Proc. of SIGMOD’16) and teaching materials in some DB courses (e.g., the “Cloud Database Systems” offered by National Tsing Hua University, Taiwan). It also serves as the core engine in some advanced systems (e.g., ElaSQL, a deterministic, distributed relational databases systems for OLTP workloads).
Currently, VanillaDB consists of two sub-projects, namely the VanillaCore and VanillaComm. The former is a single-node relational database engine and the latter provides the group communication primitives for distributed database systems.
Get VanillaCoreA new sub-project called VanillaBench is on the way.
To cite VanillaDB, please add the following to your BibTex:
@inproceedings{shwu2016tpart, title={T-Part: Partitioning of Transactions for Forward-Pushing in Deterministic Database Systems}, author={Shan-Hung Wu and Tsai-Yu Feng and Meng-Kai Liao and Shao-Kan Pi and Yu-Shan Lin}, booktitle={Proceedings of the 2016 ACM SIGMOD International Conference on Management of Data (SIGMOD)}, year={2012}, organization={ACM} }
VanillaCore is a single node, multi-threaded relational database engine that partially supports the SQL-92 standard and offers connectivity via JDBC, embedding, or (Java-based) stored procedures.
Threads v.s. connections v.s. transactions, thread-local v.s. thread-safe components, etc.
SQL parsing and validation, planning, algebra, plan/scan trees, etc.
Block-level v.s. file-level access, O_DIRECT on Linux, etc.
Buffering user data, write-ahead-logging (WAL), log caching, etc.
Physical schema design, efficient buffer utilization, etc.
Strict Two-Phase Locking (S2PL), deadlock detection/avoidance, lock granularity, phantom, isolation levels, etc.
Physical logging, transaction rollback, UNDO-only recovery, UNDO-REDO recovery, logical logging, physiological logging, ARIES, checkpointing, etc.
Hash and B-tree indexing, index locking, etc.
VanillaComm is a collection of reliable group communication primitives (e.g., total-ordering) that can benefit the distributed database systems (e.g., eager-replication, NewSQL database systems). It is based on the Appia framework and handles node/machine failure transparently.
VanillaBench eases the database system benchmarking by partially implementing some common benchmarks (e.g., TPC-C, TPC-E, or YCSB). Coming soon.
Copyright © by vanilladb.org. All rights reserved.
Please contact<EMAIL_ADDRESS>if you have any question.


The Art of Hacking is a series of video courses that is a complete guide to help you get up and running with your cybersecurity career. You will learn the key tenets and the fundamentals of ethical hacking and security penetration testing techniques. These video courses provide step-by-step real-life scenarios. You will see first hand how an ethical hacker performs initial reconnaissance of a victim and assess systems and network security controls security posture.
This website has been created to provide supplemental material to reinforce some of the critical concepts and techniques that the student has learned and links a GitHub repository that hosts scripts and code that help you build your own hacking environment, examples of real-life penetration testing reports, and more.
The following are the different video courses that will be part of the Art of Hacking series:
These courses serve as comprehensive guide for any network and security professional who is starting a career in ethical hacking and penetration testing. It also can help individuals preparing for the Offensive Security Certified Professional (OSCP), the Certified Ethical Hacker (CEH), and any other ethical hacking certification. This course helps any cyber security professional that want to learn the skills required to becoming a professional ethical hacker or that want to learn more about general hacking methodologies and concepts.
Visit the Author's Page to obtain more information about the authors of each of these courses.
These video courses are published by Pearson, but this website is maintained and supported by the lead author of the series (Omar Santos).


This site is a web interface for the Mesh network on campus.
Click the points on the map for more information on a specific router, and a thumbnail if available.
Use the Thumbnails link to view clickable thumbnails that will redirect you to a page with more controls over that particular camera.
All thumbnails are clickable links for further controls over their corresponding camera.
When viewing a video stream, use the arrows on your keyboard to control the camera's pan/tilt feature.


I have used Valium quite a few times.  It's a wonderful all-purpose drug. I am very sensitive to any kind of drug and allergic to some (I can't even drink). Valium is perfectly tolerated by my system. 2.5 mg is perfect if you need to get to sleep with out a 'hangover' the next day. By hangover I mean it feels like it would be impossible to get out of bed, although once you do get up, you feel fine. I have found no difference in quality of sleep in the higher doses, only more of the hangover effect.
I have also found Valium to be useful for nausea. I've taken 2.5mg for it, and it works quick and well.
I do not know what dose it takes to trip out, but I don't think I could stay awake to find out. I have taken some after being stoned, and I got the impression it wouldn't be a good combonation. At least for me, I felt like if I had taken any more I might have gone on a bad trip. I think I took maybe half a mg.
Overall, I think this is a perfectly safe drug to experiment with.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


What kind of triangle can you make?
Side1
Side1
Side1
Which way do I sway?
Equilateral
Isosceles
Scalene


--- layout: default title: About permalink: about ---
I've always had a passion for technology, but it took a few years post college to find my way to web development. I currently work at BTI360 on a full stack web application built with Angular and Node. I have a lot to learn, but this is where I want to be.
Feel free to say hello@kellyripple.com.


This is a prototype app that provides visual cues on an Android device to notify the driver if he/she needs to pull into the static scale of a weigh station after passing over the Weigh In Motion Scale.
DownloadThis document provides the instructions to use Smart Roadside Initiative (SRI) applications including mobile and web-based SRI applications which include smartphone-enabled information exchange and notification and software components at inspection sites will present aggregated information in the form of client-side electronic dashboards to support jurisdiction-specific decision-making about enforcement actions, and to support inspections and reporting.
Download


Planet Sick-Boy: http://www.sick-boy.com "We Put the SIN in Cinema"
© Copyright 2001 Planet Sick-Boy. All Rights Reserved.
John Frankenheimer's The Manchurian Candidate was released just 13 months before President Kennedy was assassinated. The film, which was not instantly touted as a masterpiece, was yanked from theatres out of respect for Kennedy, especially since Lee Harvey Oswald was rumored to have watched Candidate before heading off to the book depository.
When it was re-released 25 years later, Candidate was widely hailed as one
of the greatest political thrillers ever, as well as being
head-and-shoulders better than any of the other slop out there at the time
(1987 was the year Mannequin, Dirty Dancing, and Throw Momma From the Train
were up for Oscars. and
It's easy to understand why filmgoers didn't immediately embrace Candidate, which was one of the first films to take on McCarthyism. The US was hip-deep in the Cold War, so viewers were probably a little shaken by a film that had the audacity to be this cynical and border this close to political satire. Since Oscar loves controversy, Candidate was, for the most part, ignored at the 1963 ceremony, which was hosted by the film's star, Frank Sinatra. Editor Ferris Webster and co-star Angela Lansbury netted the film's only two nominations, and neither won. Of course, the competition was stiff in The Year of the Epic (Best Picture nominees included Lawrence of Arabia, To Kill a Mockingbird, The Music Man, Mutiny on the Bounty, and the Saving Private Ryan of its time, The Longest Day).
After a brief prologue that establishes a group of American soldiers fighting for freedom in 1952 Korea, Candidate quickly treats viewers to one of the greatest scenes in the history of cinema. The men, led by Bennett Marco (Sinatra), have been tricked by their translator, Chunjin (Henry Silva from Ghost Dog), and led to Manchuria, where each has been brainwashed by a Communist group called The Pavlov Institute.
The scene, which is most likely what led to Webster's editing nomination, begins in what appears to be a ladies' garden club party in the Spring Lake Hotel in New Jersey. A sign reads "Fun With Hydrangeas" as the camera pans across the room, showing Marco and his soldiers as bored onlookers to a gardening demonstration led by a fragile old woman. As the camera works its way in a circular clockwise motion, we see a room full of elderly women dressed in pretty floral dresses. But when the camera comes full circle (it' s all done in one shot), things have drastically changed.
Although Marco's troops remain in their seats, their surroundings are now completely different. Giant photos of Stalin and Chairman Mao hang on the wall; the elderly speaker has been replaced with a burly Asian man named Dr. Yen Lo (Khigh Dhiegh); his audience has transformed from gardening hobbyists to Chinese, Korean, and Soviet bigwigs; and the hydrangea lecture has become a demonstration of hypnotism (the soldiers only think they're in Jersey). Dr. Lo displays the overwhelming success he has achieved with Marco's men, choosing Raymond Shaw (Laurence Harvey) to participate in a disturbing experiment. Lo has Shaw explain that he's never killed a man before, but then instructs the soldier to execute two of his war buddies. Shaw does so without question.
The rest of the film takes place two years later, where Marco has been reassigned to Army Intelligence in Washington and Shaw has returned home a war hero and winner of the Congressional Medal of Honor for wiping out an entire company of Chinese infantry (or so the brainwashing story goes). He's greeted at the airport by his mother (Lansbury) and stepfather (James Gregory, Ulysses S. Grant from Wild Wild West), a Republican Senator with his eye on the 1956 Presidential Election. Shaw's return home is a carefully orchestrated public relations coup for Senator Iselin, although we quickly learn that his better half is, as Bob Dylan sang in "Maggie's Farm," the brains behind Pa.
While Marco has nightmares about the Spring Lake Hotel and the Pavlov Institute, Shaw is still a hypnotized killer who kick-starts his dark side whenever he sees a certain playing card. He's a pawn in a political game being played by someone very close to him. Marco knows something is afoul, but will he be able to deprogram his friend before he completes his final mission? Is Marco also a brainwashed killing machine? He has a very strange conversation on a train with a character played by Janet Leigh. None of it makes any sense, which leads viewers to believe it's all a secret subliminal code. Don't expect answers to all of these questions because you won't get them.
While Sinatra logs his best performance here since The Man With the Golden Arm, Lansbury steals the show as Shaw's mother from hell. Harvey, who was nominated for Best Actor (for Room at the Top) the year before Candidate was released, does well as the slightly robotic killer.
Frankenheimer's direction, from the opening credits to the edge-of-your-seat Hitchcockian finale, has never been better as he peppers the film with American flags, eagles, and various images of Abraham Lincoln (no doubt foreshadowing the closing scene --- ironically, the director drove Bobby Kennedy to the California hotel where he was assassinated in 1968). There's a terrific fight sequence between Sinatra and Silva, and an excellent scene in which the director uses a television set to portray a scene from several different angles.
Frankenheimer, who is now 71 and has recently directed both Reindeer Games and Ronin (and is, allegedly, the father of Pearl Harbor director Michael Bay), crafted one of the finest Cold War thrillers ever made. It ranks right up there with Fail Safe as films that ended up being a lot more frightening than the actual Cold War itself.
Candidate was based on Richard Condon's novel of the same name (he also wrote Prizzi's Honor) and adapted by George Axelrod (Breakfast at Tiffany' s).  But I didn't always hate her. When I was a child, I only kind of disliked her"), to the bizarre (Leigh: "I was one of the original Chinese workmen who laid the track on this stretch"), to the amazingly racist (Sinatra: "I can see that Chinese cat standing there and smiling like Fu Manchu").
========== X-RAMR-ID: 29176 X-Language: en X-RT-ReviewID: 227454 X-RT-TitleID: 1013227 X-RT-SourceID: 595 X-RT-AuthorID: 1146
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


New Mayo lakeside hotel seeks to build spa facilities
THE new hotel being constructed on the site of the former Healy's Hotel in Pontoon is looking to have spa facilities.
A planning application has been lodged by Pontoon Anglers Hotel Ltd. for a two-storey extension to the hotel plan previously granted, which includes spa treatment facilities, a hotel reception and two additional bedrooms.
Documents submitted to Mayo County Council show the spa area will have a sauna, steam room, treatment rooms and relaxation area with a viewing terrace providing views of Lough Cullin. Adjacent to a valley woodland, its location and design offers privacy.
The two additional bedrooms are on the first floor, bringing the number of bedrooms in the hotel to 18.
The function room is extended to the north to provide table seating for 96 people.
Work has taken place on the site and the old hotel is demolished.


?6
7
8
9
10
^
Jt
v
The
Newark
copyright
reserved
botanical
Garden
PLANTS
OF
JAMAICA
Upper
slopes
or
Mount
Dlafcolo;
altitude
500-800
meters
/?Ñ#
//
WILLIAM
R.
MAXON
.
No.
A
I
LL
ELLSWORTH
P.
KILLIPI^¡^ectors
o
.
'
February
2S-j8,
,930
Lisianthius
longifolius
L.
R.
E.
WEAVER,
JR.
1970
Duke
University
Herbarium
|
^
^
^
[£j
yQ
Det.-rev.
M.
Thiv
(B)
2001
lb24t.6b
1624686
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Unique Visitors
New User
Tweets
Comments
Search Traffic
Pageviews
Sales
textAngular is a super cool WYSIWYG Text Editor directive for AngularJS
Features:
Code at GitHub: Here
New Users
Net Profit


Number of Months: {{pack.noOfMonths}}
Discount precentage: {{pack.precentage}}
Admission Wave off: {{pack.isAdmissionWaveOff}}


Welcome to the HTSget reference server.
This server serves the publicly available Tabula-Muris dataset on AWS according to the HTSget protocol.


Use # keys to navigate to sections
Over the past five years at NewDealDesign I have worked with companies like Ford, Uber, Postmates, Walmart, LG, and Lenovo. During this time I led the Experience Design team, building the interaction design practice in both physical and digital projects. In my work I merge my background in digital products with my studies in interaction design and my passion for human psychology.
Autonomous Delivery Robot
Industrial and Experience Design of Serve, deployed 2020 in pilot programs in West Hollywood.
Interaction architecture, Interface design language, Prototyping, Experience concepting.
Team: Erik Askin, Ben Wong, Alex Destasio, Maiya Jensen, Jay Murallon
A 6 month sprint to a working prototype for the real streets of LA, our focus was to tie in as much human empathy into the design as possible. Working closely with the industrial design team, I helped construst the interaction architecture and designed concepts focused on Serve's personality, Postmates last mile delivery robot.
We developed the foundation for interaction using 3 levels — 1ft for customers and curious onlookers, 5ft for passing foot traffic, and 30ft for vehicles. We built the visual interaction language for these three interaction states in a full journeymap for navigating, customer facing interactions, and public street facing interactions.
Connected AED
Industrial and Experience Design
Research, Interaction design, Experience design, App design
Team: Tony Smith, Alexis Destasio, Chloe Georgiades, Eliza Tehan
Avive is the first FDA approved connected AED. Smaller and more affordable than traditional AEDs, Avive's vision is consumerize AEDs to create "4 minute cities".
The core of Avive's experience is its connectedness. Rapid Response teams are able to see the locations of all Avive AEDs and can alert communities if a cardiac arrest emergency is happening nearby. By doing so, they are able to use community support network to decrease the time to shock, greatly increasing patient's chance of survival.
The interaction design of Avive's AED was critical and could be the difference between life and death. Our team led the research and testing through rapid rounds of iteration with first time users and were able to decrease the time to shock from 2 min 30 sec to under 1 min 30 sec.
AI Storytelling for Kids
Industrial and Experience Design Concept Project
Interaction design, Experience concepting. Storytelling, Website
Team: Tony Smith, Alex Chow
Spot is a hand-held tool for children’s discovery, a concept project combining AI technology and storytelling interactions. Spot is a CV camera and pico projector with a platform to create personal stories built on children’s personal explorations.
Spot is carried around outdoors, ‘collecting objects’ in nature by pointing at them. Spot identifies these objects and shares a story about it to the child.
At the end of the day, Spot can be placed in its dock and project a bedtime story that weaves together the objects found that day using AI for narrative structure.
Envisioning the next home living experience for a "full stack" real estate development company.
Smart Home App and In Home Digital experience for new building developments and ADUs.
Team: Eliza Tehan, Feild Craddock
For a technology filled, fully connected home, we aimed to create a warmer, human digital experience, in contrast to a feature packed complex systems. Life-like animations. Intentional interactions for sensitive home controls like unlocking doors and opening garages. Shortcuts for everyday controls. Altogether making the experience feel like home.
The App uses Quick Cards for a lighter navigation that creates no mental load. With your most important actions easily accessible and your home controls front and center. Above your cards, your Life List shows any important notifications.
The Life List becomes the voice of your home, slowly learning to take care of everything you need for the house, like a proactive to-do list. Subtly learning and conversing with you to learn your 'comfort levels', behaviors, and preferences in a less techy way.
A whole design system between home, panels, and app.
Disaster Relief Concept
Quilt is an emergency ad hoc support system that desiged to assist initial disaster relief efforts that the city infrastructure will not address. It addresses social isolation in urban areas and the willing community that will want to step up to help but often don't know how.
Autonomous Mobility Concept
Rolla is a concept vehicle that is the future version of SF's historic cable cars. As a system, Rolla can run pre-programmed routes to augment public transportation, be called on demand through the ride-hailing app, or function as a branded experience allowing local business to have Rolla bring patrons to their doorstep.
Rolla is a mass-transit alternative system combing a hop on, hop off, low-speed autonomous electric vehicle with a ride-hailing App and central server, together acting as an alternative mass- transit for urban centers.
Hailing a Rolla brings back the ad-hoc nature of quick urban transport that keeps you connected with the pulse of the city. Rolla can detect paying customers that show a hailing gesture and will slow down to pick you up.
My work focuses on humanizing technology. Our interactions with autonomous vehicles, robots, interfaces, smart systems, can take cues from our rich makeup as humans. Often I search for a human mental model, or a unique micro interaction that makes an engagement warmer or surprising. My time at NewDealDesign has allowed me to pursue this interest in designing new interactions and bringing personality to interfaces. I continue to learn new ways to bring technology experiences to life and look forward to the work ahead.


This page gives you an overview how to consume Frameworks out of a XCode Application. This feature is available starting with version 1.3.0 of the Maven Xcode Plugin.
1. The used framework is already deployed in an available Maven Repository.
2. Your project specifies a dependency to the framework to use in the dependencies section of the pom.xml.
<dependency> <groupId>com.sap.tip.production.prototype.xcodeprojects</groupId> <artifactId>MyFramework</artifactId> <version>1.0.0-SNAPSHOT</version> <type>xcode-framework</type> </dependency>
1. Maven initialize
1. In the XCode IDE, drag and drop the framework you need into your project.
After adding the reference to the framework, you will see the framework in your project and automatically linked into Build Phases > Link Binary with Libraries section.
2. Or, if you prefer, you could go the other way round:
Go to Build Phases > Link Binary with Libraries section and click on the "+".
Choose the framework to add:
and navigate in the file system to it and click on "Open"
As a result, the framework is linked and displayed into your project as referenced


Your Logo
Home
Services
About Us
Book An Appointment
Croker H.C
Technology Divsion
Laptops
Mal-ware Removal
Virus Removal
Blue Screen Fix
Hardware Upgrade
Setup
Desktops
Computer Setup
Hardware Upgrade
Virus Removal
Mal-ware Removal
Network Setup
Mobile Devices
Device Setup
Screen Repair
Unlocking due to being locked out


Ext.NET
5.3.0
.NET Component Framework for Enterprise Level Apps
Ext.Net.IToolbarItem Interface Reference
More...
Inheritance diagram for Ext.Net.IToolbarItem:
Detailed Description
The documentation for this interface was generated from the following file:
IToolbarItem.cs
Ext
Net
IToolbarItem
Generated by
1.8.20


Miss Universe contestant representing Vietnam to wear iced coffee-inspired costume for competition
by Jessica NapoliHoang Thuy, the young woman representing Vietnam in the 2019 Miss Universe pageant, will be wearing quite the elaborate costume on stage.
She is set to depict "Ca Phe Phin Sua Da” (iced coffee with condensed milk), a very popular drink in the Southeast Asian country.
MISS UNIVERSE WINNER IS CATRIONA GRAY, 24, FROM PHILIPPINES
The costume was created by designer Tran Nguyen Minh Duc. It features a bedazzled jumpsuit with tons of beading detail. It also has a large spoon prop, filter headpiece and cup skirt, but Thuy reportedly found that difficult to walk in.
"Filter coffee with condensed milk is a favourite drink of many international friends. I believe I will give my best performance with this costume at the Miss Universe contest," Thuy said according to Vn Express.
In 2018, the woman representing Vietnam wore a food-inspired costume. H’Hen Nie donned a banh mi (bread) costume and she finished in the Top 5.
MISS UNIVERSE PAULINA VEGA: 'WHEN I WON THE CROWN, IT WAS LIKE WINNING THE WORLD CUP!'
Thuy will be competing against Cheslie Kryst, who is representing the United States after being crowned Miss USA 2019.
She told Fox News after winning the title in May, “I prepared and I knew that I could be Miss USA,” she explained. “That’s what I wanted, and that was my goal. But actually winning is a whole other experience."
"You know, when they called my name, my mind kind of went blank. All I could think was, ‘They’re about to put the crown on my head. Where’s my mom?’ And I was looking for her in the audience.  But it was an amazing moment, and very surreal."
The 68th Miss Universe show features 93 contestants from around the world. It will air Sunday, December 8 on Fox and Telemundo from Tyler Perry Studios in Atlanta. Steve Harvey is serving as host for the fifth consecutive year.
“We have always been proud to give a global platform to diverse, ambitious and strong young women – our leaders of tomorrow," said Paula M. Shugart, president of The Miss Universe Organization.
MISS USA 2019 CROWNS FULL-TIME ATTORNEY CHESLIE KRYST AS WINNER
Catriona Gray from the Philippines won the crown in 2018.


Please send a MESSAGE to the United Nations. Please show Your support to the Save the King of the Jungle. Lions are a Beautiful cat. It's a shame Lions are disappearing in a few decades. Lets stop this trophy hunters. Let's try to get the United Nations attention, So that the United Nations will fund and protect this precious species.


F1 Analysis
Jupyter File
Code on GitHub
- About: Pandas was used in Jupyter Notebooks to explore 13 different CSVs of motorsport data, dating back to 1950. By merging, sorting, filtering, cleaning, and visualizing the data using packages such as Seaborn, I was able to gain insight on individual driver statistics, frequency of track use, and see the progression of the sport.
- Packages:


--- title: "Pros and Cons of Outsourcing Software Design and Development" excerpt: "In today’s global and fast-paced economy, outsourcing provides enriching opportunities for companies that save both time and money. However, in order to make the most of these third parties, it is important to understand their advantages as well as their disadvantages." published: "17 February 2014" tags: ["The Need for a Broad Range of Services for RightSourcing"] ---
In today’s global and fast-paced economy, outsourcing provides enriching opportunities for companies that save both time and money. However, in order to make the most of these third parties, it is important to understand their advantages as well as their disadvantages.
Outsourcing parts of development are beneficial to companies in gaining access to specialized skills such as usability experts, systems architects, and graphic designers. When it comes to software development skills, there are various talent pools spread out globally with technical skills related to geographic specialization.
Third parties from certain areas help cut back labor costs, with no reduction in technical skills, which is helpful for lengthy projects. Moreover, having experts from outsourced teams lends a fresh perspective and helps avoid technical pitfalls that otherwise cost both time and money.
Third parties can:
1. Recruit, since they have in-house staff recruiters ready
2. Deploy development infrastructure by supporting the current process with:
1. Managing Projects
2. Building Systems
3. Testing Systems
4. Tracking Bugs
3. Provide Engineering Management, since the management personnel and senior technology personnel are already in place
The greatest setback with outsourcing is when the third party company fails. To prepare for this setback before hand, it is important to put in place preventative measures that give access to the company's developed product and personnel, should it fail.
More common problems include:
1. "Double-dipping", where third parties assign "full time" resources to multiple customers
2. Intellectual property theft
3. Communication barriers across different cultures
4. Delays and poor implementation due to inefficient management
The best way to avoid the pitfalls tied to outsourcing is to make the outsourced team integrated into the company, so that its successes and failures become tied to the overall team effort.


---
layout: base
---
{% include breadcrumbs-band.html page_type="Downloads" page_type_slug="download" %}
{% include release-notes/14-0.html %}
{% include release-notes/13-0.html %}
{% include release-notes/12-1.html %}
{% include release-notes/12-0.html %}
{% include release-notes/11-0.html %}
{% include release-notes/10-0.html %}
{% include release-notes/9-4.html %}
{% include release-notes/9-3.html %}
{% include release-notes/9-2.html %}
{% include release-notes/9-1.html %}
{% include release-notes/9-0.html %}
{% include release-notes/8-2.html %}
{% include release-notes/8-1.html %}
{% include release-notes/8-0.html %}
{% include release-notes/7-2.html %}
{% include release-notes/7-1.html %}
{% include release-notes/7-0.html %}


{% extends "base.html" %} {% comment %} Page not found error template Author: Jonathan Karr<EMAIL_ADDRESS>Affiliation: Covert Lab, Department of Bioengineering, Stanford University Created: 2014-03-24 {% endcomment %} {% block content %}
We don't have any URLs matching {{request_path}}.
If you continue to see this error message please contact us at wholecell@lists.stanford.edu.


MABOROSI (1995)
"Why did he do it? It's like a riddle."
3.5 out of ****
Starring Makiko Esumi, Takashi Naitoh, Gohki Kashiyama Directed by Hirokazu Kore-eda Written by Yoshihisa Ogita Cinematography by Masao Nakabori
Some movies want to explain everything. They approach some of life's most profound issues--love, faith, mortality--and try to give us a neatly-packaged answer in a couple of hours. Sometimes this even results in great movies. But there are other, wiser films, which don't try to explain everything, but undertake the harder task of observing life, watching events unfold, standing back and illuminating the nuances of existence, without theorizing or philosophizing.
Hirokazu Kore-eda's remarkable first feature, MABOROSI, is one of those movies which is content to watch from a distance. It plays like a series of stills, one beautifully composed shot after another, observing the life of a woman whose first husband commits suicide, leaving her alone with a three-month-old son, and who remarries a few years later.
There are obvious ways of dealing with this subject matter: tearful scenes of mourning, angry outbursts, denial. Kore-eda isn't interested. We never see the woman, Yumiko (played perfectly by Makiko Esumi), crying over the death of her husband. Infinitely more powerful is a long-shot of Yumiko and her son (Gohki Kashiyama) boarding a train platform several years later, preparing to leave the city and join the new husband in his little Japanese fishing community; we watch them, dressed in black, walk slowly up the steps and along the platform, the sky grim and overcast. What does it mean? It doesn't 'mean' anything. What does it convey? It conveys volumes, and does so in the language of pure cinema.
That is one of the great pleasures of MABOROSI, that it says so much by saying so little, by merely contemplating the everyday rituals and routines of life. Yumiko's changing moods are reflected in the visual compositions, not simply in her 'character arc.' Later in the film, after she has lived with her new husband (Takashi Naitoh) for some time, we see the family seated in front of their house, looking at the sea. The husband and son eat slices of watermelon, laughing as they spit the seeds out; Yumiko watches and smiles. This scene conveys subtly, without fanfare, the pleasure she has found in her new life; everything we need to know is up there on the screen, in the little gestures and details, and nothing needs to be said aloud. In this movie, it is not grand speeches and melodramatic confrontations that are important, it's things like scrubbing the steps or teaching a child to ride a bike.
Kore-eda and cinematographer Masao Nakabori use light and shadow masterfully, without the benefit of off-screen lighting (as far as I could tell). In the first third of the film--the build-up to the suicide and its aftermath--most scenes are shot in darkness, or on cloudy, grey days. There isn't much sunshine. The second third, as Yumiko finds some measure of happiness again, is sunnily lit, reflecting her changing circumstances, and the final third becomes grey again, rainy, stormy, as the unresolved grief from her first husband's death preoccupies her once more, and she seeks an answer that doesn't exist--the dead never explain themselves. There is also, in most scenes, a balance of light and dark. Indoor scenes are either brightly lit inside with darkness outside, or shadowy within and light without. This mix of light and dark reflects the balanced tone of the film--and of life, for that matter--augmented by Ming Chang Chen's spare score.
Some of the shots are perfect. Two children run beside a lake, their reflections in the still water, the sky looming above: the image is unforgettable. And my favourite visual shows a line of mourners walking along the shoreline, silhouetted by a narrow ribbon of ocean, dwarfed by land below and sky above. Both these images show human figures trapped by water, caught between the vast reaches of heaven and earth, and this poetic re-fashioning of images (such as the various shots of bicycles and trains) serves to develop and deepen the film's themes, and the feelings it evokes.
The only problem, really, is that this approach demands considerable patience from the viewer. This is not a movie to see when you're in the mood for something light and entertaining, nor is it a movie for impatient viewers. But if one has the patience to accept Kore-eda's approach, it is deeply rewarding. The most obvious point of reference is Kieslowski's BLUE, but MABOROSI is, I think, even better. The final third in particular is absorbing, moving, and, in its finest moments, sublime, possessing a grace and wisdom few films strive for, much less achieve.
A Review by David Dalgleish (February 10/98<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


TIFF2RGBA
Section: User Commands (1)Updated: November 2, 2005
Index Return to Main Contents
NAME
tiff2rgba - convert a TIFF image to RGBA color spaceSYNOPSIS
tiff2rgba [ options ] input.tif output.tifDESCRIPTION
Tiff2rgba converts a wide variety of TIFF images into an RGBA TIFF image. This includes the ability to translate different color spaces and photometric interpretation into RGBA, support for alpha blending, and translation of many different bit depths into a 32bit RGBA image. Internally this program is implemented using the TIFFReadRGBAImage() function, and it suffers any limitations of that image. This includes limited support for > 8 BitsPerSample images, and flaws with some esoteric combinations of BitsPerSample, photometric interpretation, block organization and planar configuration. The generated images are stripped images with four samples per pixel (red, green, blue and alpha) or if the -n flag is used, three samples per pixel (red, green, and blue). The resulting images are always planar configuration contiguous. For this reason, this program is a useful utility for transform exotic TIFF files into a form ingestible by almost any TIFF supporting software.OPTIONS
- -c
- Specify a compression scheme to use when writing image data: -c none for no compression (the default), -c packbits for the PackBits compression algorithm, -c zip for the Deflate compression algorithm, -c jpeg for the JPEG compression algorithm, and -c lzw for Lempel-Ziv & Welch.
- -r
- Write data with a specified number of rows per strip; by default the number of rows/strip is selected so that each strip is approximately 8 kilobytes.
- -b
- Process the image one block (strip/tile) at a time instead of by reading the whole image into memory at once. This may be necessary for very large images on systems with limited RAM.
- -n
- Drop the alpha component from the output file, producing a pure RGB file. Currently this does not work if the -b flag is also in effect.
SEE ALSO
tiff2bw(1), TIFFReadRGBAImage(3t), libtiff(3)Libtiff library home page: http://www.remotesensing.org/libtiff/
Index
This document was created by man2html, using the manual pages.
Time: 05:29:11 GMT, December 24, 2015


Language results for term:
At search term index:
Potential solution:
Found Character:
At search term index:


Classifying Loans based on the risk of defaulting
A Short Introduction
Classification is one of the classical problems in Supervised Learning where we attempt to train a model to classify data points into n distinct classes. As I was browsing through datasets online, I came across one that contained information on 1000 loan applicants (from both urban and rural areas). One of the columns in the data table was whether or not the loan was approved. An idea immediately struck me:
What if we could build a model to predict whether an applicant’s loan would be approved or denied depending on his or her risk of defaulting?
This would be a garden-variety classification problem, where we have 2 distinct classes to group our data by: a loan approval or a loan denial.
It is important to not be hasty and start training models on the raw and unexplored data. Preprocessing the data not only helps us smooth out inconsistencies (missing values and outliers), but also gives us a comprehensive understanding of the data which in turn aids us in our model selection process.
This end-to-end Machine Learning project is primarily based on Python. I have used the following libraries to help me achieve the objective:
- Numpy for mathematical operations.
- Pandas for data exploration and analysis
- Matplotlib and Seaborn for data visualization
- Scikit-learn for model training, cross-validation, and evaluation metrics.
Importing the libraries
Let us perform all the necessary imports beforehand
Once we have all the libraries necessary, we can read the data in from CSV file using Pandas.
Understanding the Features
Before moving forward with the data exploration, I always like to understand the features that I will be dealing with on a superficial level. Doing this will help us put into words any mathematical interpretations we make. The following are the list of features that we have from our dataset:
- Loan ID: The ID given by the bank to the loan request.
- Gender: The gender of the primary applicant.
- Married: Binary variable indicating the marital status of the primary applicant.
- Dependents: Number of dependents of the primary applicant.
- Education: Binary variable indicating whether or not the primary applicant has graduated high school.
- Self_Employed: Binary variable indicating whether or not the individual is self-employed.
- Applicant Income: The income of the primary applicant.
- Co-Applicant Income: The income of the co-applicant.
- Loan Amount: The amount the applicant wants to borrow.
- Loan Amount Term: The term over which the applicant would repay the loan.
- Credit History: Binary variable representing whether the client had a good history or a bad history.
- Property Area: Categorical variable indicating whether the applicant was from an urban, semiurban, or a rural area.
- Loan Status: Variable indicating whether the loan was approved or denied. This will be our output (dependent) variable.
Of all these variables, I have chosen the Gender, Applicant Income, Loan Amount, and Property Area as the ones to delve deeper into. It is important to look at the data from multiple angles, i.e., independently and in relation to the other variables. This points out any red flags in the dstributions of the variables and also reveals interesting relationships amongst them.
Visualizing the data
Humans are visual creatures, and a majority of us process information better when we see it. Thus, when it comes to understanding our data, taking a visual approach is far more effective than manually crunching hundreds of rows worth of numbers. I have plotted visualizations that show the distributions of important features as well as interesting relationships between some of the features. How did I decide which features are important? I used the correlation matrix, where the value at (i, j) represents how strongly feature i is correlated to feature j.
We can use seaborn’s heatmap visualization to help us understand the correlation matrix.
Before we begin explorng our feature variables, I wanted to have a look at our dependent variable, i.e., the one we are attempting to predict using the model. Shown below is a simple countplot by class.
There is a clear imbalance between the classes, and that can be very dangerous! Our model may end up highly biased towards the majority class, which is not ideal when it comes to the model’s generalization capabilities. For that reason, we will perform feature scaling to ensure uniformity, and also make sure that the algorithm we use to build the model is ‘aware’ that the classes are imbalanced.
I was also curious about how the property area and the loan amount jointly affected the authorization of the loan. Let us have a look at a relational plot of the loan amount against approval separated by the property area.
It will help if we divide the data into approved and unapproved loans and look at the count of how many of those loan applications came from each property area.
From the looks of it, it looks like a higher fraction of the rural loan applications are denied. I calculated the ratio of approved loans from each property area, and the numbers corroborate our hypothesis.
- Urban Approval Ratio: 0.7368421052631579
- Semiurban Approval Ratio: 0.7822349570200573
- Rural Approval Ratio: 0.6448275862068965
Cleaning the data
Now that we’ve explored the data visually to better understand what we’re dealing with, its time to preprocess our data in order to make sure that the model we train is not subject to any noisy training instances (in the context of ML, the term “training instance” refers to a single data point that is part of the dataset used to train and test the model.) I have divided our preprocessing step into the following substeps:
- Check for and replace missing values if necessary.
- Remove unncessary features.
- Encode categorical features to make sure they are properly interpreted.
Note that data preprocessing is by no means formulaic, and the steps that I am about to take are subjective.
Training the model
Fin*ally, the exciting bit! We have our data prepared, and we shall serve it to our model to devour! The algorithm that I chose for this particular case was Logistic Regression. It is one of the simpler supervised learning algorithms, but has proven to be extremely reliant in a variety of instances.
Before we train the model, we shall utilize Scikit-learn’s inbuilt train-test split module to randomly split our dataset into training and testing subsets. We shall split it according to the 80-20 rule (this seems an arbitrary and scientifically ungrounded choice, but it is known to “just work” when it comes to training models).
Let us begin by instantiating a Logistic Regression object (we will be using scikit-learn’s module) and split the dataset in the aforementioned way.
Notice that we specify that the weights of the classes in question have to be balanced. This ensures that the classes are appropriately weighted, thereby eliminating any bias created by an imbalance in the classes. If you are curious as to how the classes are weighted, this article by Chris Albon provides a comprehensive explanation.
Before we pass in the data, let us perform feature scaling using Scikit-learn’s Standard Scaler.
Now that we have everything we need, we fit the model to the training data.
Evaluating the performance of the model
It is just as (if not more) important to evaluate the performance of algorithms as it is understanding and implementing them. I’ve provided a brief but comprehensive introduction to the confusion matrix and the three fundamental evaluation metrics for classification.
A Confusion matrix is simply a tabular visualization of the error rates of the matrix that is widely used to evaluate the performance of a classification algorithm. The rows of the matrix represent the actual label of the instance, while the columns reprsent the predicted label. In our case, we have a 2x2 matrix as we are performing binary classification. To generalize, an “n-ary” classification problem will have an nxn confusion matrix.
The (m, n) entry of the confusion matrix tells us how many instances whose correct label is class m was classified into class n. So, the diagonal entries of our matrix represents correct classifications and the rest represent the incorrect ones. In binary classification, the diagonal entries are commonly referred to as the true positives and the true negatives, and the other two are the false positives and false negatives.
Now that the model has been trained, we will use the test data that we sieved from the original dataset to evaluate how well our model generalizes to the data. I have divided the evaluation process in the following way:
- Vectorize the predictions made by the model and build a confusion matrix.
- Use the confusion matrix
At a glance, most of our classifications seem to be concentrated in the diagonal entries. An excellent start! Recall that we said the matrix gave us the error rates. But, its hard to gain a concrete numerical measure of the model’s performance from the matrix alone. Thus, we use the values from the matrix to compute the three fundamental classification performance measures: accuracy, precision, and recall.
- Precision:
- Recall
- Accuracy
Scikit-learn’s inbuilt metrics module lets us compute these metrics in a single line of code!
For our model, the metrics’ values turned out to be:
- Accuracy: 0.8116883116883117
- Precision: 0.875
- Recall: 0.8504672897196262
It is an accepted practice to use precision and recall in conjunction to gauge the performance of a classfication model as one could simply use instances that he or she knows would result in a correct prediction to gain a perfect precision score. In other words, if I have one training instance that I knew belonged to the positive class I would make sure that the model classifies only that instance into the positive class. The F1 score is a metric that is a harmonic sum of the precision and recall. It is a singular measure of a model’s performance and takes into account both the precision and recall, thus making sure that we do not have to go through the hassle of interpreting the numbers manually. Yet again, Scikit learn’s metrics module comes to the rescue!
F1 Score: 0.8625592417061612
Conclusion
Alright, awesome! We sucessfully trained a model that can predict the response to a loan applicant based on the data we have on them. To do this at scale would be futile for us humans, but the performance of the classifier shows us just how powerful these techniques can be. Classification is but one of the multitude of techniques available as part of the Predictive Modeling toolbox. I hope that this has proven to be an informative and engaging introduction to the topic. Happy coding!