Introduction to Basic Haskell Components (In Chinese)ChengHui Weng
In 2012, we had the first Chinese functional meetup about general functional programming techniques in Taipei. I gave this talk to introduce several classes in the famous Typeclassesopedia article.
My inspiration from reading *C++ Primer*, *Effective C++*, *More Effective C++*, *The C++ Standard Library* and some experience from coding.
Include:
* Debug
* C++ Syntax
* Habit && Optimization
* Trick
* Trap
* Reference
Introduction to Basic Haskell Components (In Chinese)ChengHui Weng
In 2012, we had the first Chinese functional meetup about general functional programming techniques in Taipei. I gave this talk to introduce several classes in the famous Typeclassesopedia article.
My inspiration from reading *C++ Primer*, *Effective C++*, *More Effective C++*, *The C++ Standard Library* and some experience from coding.
Include:
* Debug
* C++ Syntax
* Habit && Optimization
* Trick
* Trap
* Reference
隨著 Visual Studio 2017 即將正式釋出,C# 7.0 也隨之來到。身為這次的改版,將會帶來許多方便的新功能
if (int.TryParse(input, out var answer))
WriteLine(answer);
else WriteLine("Could not parse input");
一起讓我們來看看 C# 7.0 的威力吧。
This document provides instructions on configuring Linux security features such as SSH key-based authentication, firewall rules using iptables, SELinux concepts, and the Fail2ban utility. It discusses generating SSH keys, editing SSH configuration files, setting default firewall policies and rules for input, output, and forwarding, as well as network address translation rules. It also covers SELinux file and process context types and restoring default contexts. Lastly, it explains how to install, configure, and check the status of Fail2ban to automatically ban IPs with too many failed login attempts.
隨著 Visual Studio 2017 即將正式釋出,C# 7.0 也隨之來到。身為這次的改版,將會帶來許多方便的新功能
if (int.TryParse(input, out var answer))
WriteLine(answer);
else WriteLine("Could not parse input");
一起讓我們來看看 C# 7.0 的威力吧。
This document provides instructions on configuring Linux security features such as SSH key-based authentication, firewall rules using iptables, SELinux concepts, and the Fail2ban utility. It discusses generating SSH keys, editing SSH configuration files, setting default firewall policies and rules for input, output, and forwarding, as well as network address translation rules. It also covers SELinux file and process context types and restoring default contexts. Lastly, it explains how to install, configure, and check the status of Fail2ban to automatically ban IPs with too many failed login attempts.
Organ donation allows a person to pledge that after death, their organs can be donated to help terminally ill patients. The major organs that can be donated are the heart, lungs, liver, pancreas, kidneys, eyes, heart valves, skin, bones, bone marrow and connective tissues. One donor can potentially help many patients receive organ transplants. For organ donation to occur, the potential donor must meet the criteria for brain death while in the hospital connected to life support systems. Healthy organs should then be transplanted as soon as possible. Anyone can potentially be an organ donor regardless of age, gender or race. Organ donation is legal in India under the Transplantation of Human Organs Act and it provides termin
When performing an investigation it is helpful to be reminded of the powerful options available to the investigator. This document is aimed to be a reference to the tools that could be used.
The document provides information on systemd service management commands. It shows examples of using systemctl to start, stop, restart, and check the status of the httpd service. It also displays the output of systemctl status httpd which shows details about the loaded unit, active state, process IDs, and log entries for the Apache HTTP Server service.
This document provides a quick reference card for common commands and key bindings in the terminal multiplexer program TMUX. It summarizes commands for controlling TMUX at the command line, default key bindings, options for managing panes and windows, commands for clients and sessions, and the vi and emacs modes for copying and pasting text in TMUX.
Red Hat Enterprise Linux roadmap highlights included:
- RHEL 5 focusing on stability and basic hardware enablement, transitioning to production phase 2; RHEL 6 in production phase 1 with feature innovation and maintenance; RHEL 7 planned for 2013 with datacenter efficiency and virtualization/cloud enhancements.
- Upcoming KVM virtualization features focused on scalability, performance, and reliability like live migration and snapshots.
- Kernel developments emphasized optimizations for virtual memory, scheduling, resource management, networking and debugging tools.
- Hardware enablement discussed ongoing and planned support for Intel and ARM platforms, as well as power management and InfiniBand improvements.
This document discusses various topics related to using the UNIX shell for database administration tasks. It provides examples of common shell commands and techniques including piping, redirection, checking file attributes, conditional statements, loops, reading user input, finding open ports, common UNIX tools like grep, awk, and kill processes. It also discusses setting up aliases and choosing the right shell based on features.
This document is the manual for Cacti, an open source network monitoring and graphing tool. It contains instructions for installing Cacti on Unix and Windows systems, including required packages and configuration steps. It also provides basics on how Cacti works including retrieving and storing data, presenting graphs, and creating devices and graphs. Advanced topics covered include customizing data collection and storage using templates, scripts, and queries.
This course provides you with knowledge and skills in the areas of:
1. Sorting numbers
2. Sorting strings
3. Sorting arrays
4. Sorting hashes
This course does not cover sorting algorithms. Instead, it is about sorting various types of data in Perl.
This document contains sample questions and answers related to commonly used Unix/Linux commands like AWK, GREP, SED and CUT. It provides examples of how to use these commands to perform various text processing tasks like extracting/modifying fields, searching/replacing patterns, sorting files etc. Specifically, it lists 10 questions each for AWK, GREP, SED and 5 for CUT along with the corresponding commands as answers.
This document outlines the content of a Hadoop course taught by Mr. Kalyan, who has 7+ years of real-world experience and holds an M.Tech from IIT Kharagpur. The course covers introductory topics on big data and Hadoop, as well as detailed modules on HDFS, MapReduce, YARN, Pig, Hive, HBase, Zookeeper, and other Hadoop ecosystem technologies. It also includes hands-on instruction on installing and configuring Hadoop clusters in pseudo-distributed and fully-distributed modes.
The document contains a list of 7 URLs linking to software distributions:
- The first 4 URLs reference Hadoop, Hive, Python and Maven distributions.
- The remaining 3 URLs link to Tomcat, Hive and Java distributions.
This document discusses recommender systems and provides an overview of key concepts. It begins by discussing the Netflix Prize challenge to improve Netflix's recommendation system. It then covers major challenges in recommender systems like data sparsity and cold starts. Different evaluation metrics and classifications of recommender systems are defined. Similarity-based collaborative filtering recommender algorithms like user-based and item-based are described. The document concludes by discussing Mahout's recommender system implementations and an example CNTV recommendation system.
This lecture discusses the concept of Regular Expressions along with its usage in different tools such as grep, sed, and awk
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
- https://www.linkedin.com/in/ahmedelarabawy
here are some slides for introduction to C++. this slide is merely for basic understanding for C++. this powerpoint is written in Traditional Chinese(TW) and is owned by a group named "Awakening Lion" which I participate in.
10. Groovy is like a super version of Java. It can
leverage Java's enterprise capabilities but also has
cool productivity features like closures, DSL support,
builders and dynamic typing.
Groovy = Java – boiler plate code
+ optional dynamic typing
+ closures
+ domain specific languages
+ builders
+ meta programming
2010-10-9 10
24. Operator Method
a + b a.plus(b)
Operator Overloading a - b a.minus(b)
a * b a.multiply(b)
◦ Groovy支持的运算符 a ** b a.power(b)
◦ http://groovy.codehaus.org/Operators a / b a.div(b)
◦ http://groovy.codehaus.org/Operator+Overloading a % b a.mod(b)
a | b a.or(b)
◦ 例子: a & b a.and(b)
◦ 10 ** 3 = 1000 a ^ b a.xor(b)
◦ ~”.*http.*” (把一个String换成一个Pattern) a++ or ++a a.next()
a-- or --a a.previous()
a[b] a.getAt(b)
a[b] = c a.putAt(b, c)
a << b a.leftShift(b)
a >> b a.rightShift(b)
switch(a){ case(b): } b.isCase(a)
~a a.bitwiseNegate()
-a a.negative()
Safe Dereferencing +a a.positive()
◦ s?.size() a == b a.equals(b) or
◦ ===> null a.compareTo(b) == 0 **
a != b ! a.equals(b)
Autoboxing a <=> b a.compareTo(b)
a > b a.compareTo(b) > 0
a >= b a.compareTo(b) >= 0
a < b a.compareTo(b) < 0
a <= b a.compareTo(b) <= 0
2010-10-9 24
25. 5/3 = 1.66666667
5.intdiv(3) = 1
类型后缀
G java.math.BigInteger 55G
L java.lang.Long 55L
I java.lang.Integer 55I
G java.math.BigDecimal 3.14G
D java.lang.Double 3.14D
F java.lang.Float 3.14F
2010-10-9 25
26. class X
{
def field
def getField()
{
field += 1
}
}
x = new X()
x.field = 1
println x.@field // 1
println x.field // 2
2010-10-9 26
34. def r = 1..3
println r.class
===> groovy.lang.IntRange
r.each{println it}
===>
1
2
3
def r = 1 ..< 4
===> 1, 2, 3
def today = new Date()
===> Sat Dec 29 23:59:28 MST 2007
def nextWeek = today + 2
===> Sat Jan 05 23:59:28 MST 2008
(today..nextWeek).each{println it}
===>
Sat Dec 29 23:59:28 MST 2007
Sun Dec 30 23:59:28 MST 2007
Mon Dec 31 23:59:28 MST 2007
2010-10-9 34
35. def x = 1.23
switch ( x ) {
case "foo“:
println “String foo”
case ~/d+/:
println “String numbers”
case [4, 5, 6, 'inList']:
println “In List”
case 12..30:
println “In Range”
case Integer: 在Groovy中,类名表示class对象,即
println “A Integer” Integer == Integer.class
default:
println “Oops!”
}
2010-10-9 35
36. def hi = { println "Hi"}
hi()
===> Hi
def calculateTax = { taxRate, amount ->
return amount + (taxRate * amount)
}
println "Total cost: ${calculateTax(0.055, 100)}"
===> Total cost: 105.500
def tax = calculateTax.curry(0.1)
[10,20,30].each{
println "Total cost: ${tax(it)}"
}
===>
Total cost: 11.0
Total cost: 22.0
Total cost: 33.0
2010-10-9 36
37. how simple, elegant, and flexible your code is when you take advantage of
dynamic typing? But, is this risky business?
• You might mistype the method name when creating one of the helpers.
• Without the type information, how do you know what to send to your
method?
• What if you send a object(which haven’t the methods) to the method?
Programming with dynamic typing without having the discipline of unit
testing is playing with wildfire.
2010-10-9 37