Category language

.NET

C# vs .NET C# is not the only language we can run under .NET, but in 99% of the cases it runs under .NET. .NET is a framework that enables running applications wrtitten in C#. Some other .NET-compatible programming languages…

LINQ (Language Integrated Query)

LINQ is a set of technologies that allow simple and efficient querying over different kinds of data. It allows filtering, ordering and transforming the collection elements, and more. LINQ can work with other types of collections like databases or XML…

C# Learning Note

Solution vs Project A solution is simply a collection of projects. DLL DLL stands for Dynamic Link Library. The executable file (exe file) uses the DLL file. So if we remove the DLL, the *.exe would no longer work. Any…

java不同的版本对比

Java 8 vs Java 7 Java 8 相比 Java 7 是一次革命性的升级,它引入了函数式编程的思想。以下是 5 个最核心的新特性及代码对比,帮助你直观理解: 1. Lambda 表达式 (Lambda Expressions) 这是 Java 8 最具标志性的改动。它简化了匿名内部类的写法,使代码更简洁。 2. Stream API Stream API 极大地改变了处理集合(Collection)的方式,将以往繁琐的 for 循环和条件判断转化成了声明式的链式调用。 3. Optional 类 为了解决令人头疼的 NullPointerException (NPE),Java 8 引入了 Optional 容器,强制开发者显式地处理空值。…

Python

一些设计理念 基本数据类型 字符串 整数int 浮点数float 布尔类型bool 空置类型 NoneType 用type确定数据类型 条件语句 if的用法 数据结构 list list.append(element): 将元素加到最后listinsert(position, element): 将元素加到特定位置del list[0]:将在特定位置上的元素删除list.pop(): 将最后一个元素删除并返回list.pop(position): 将特定位置上的元素删除list.remove(element): 将列表里出现的第一个该元素删除list.sort()(reverse=True): 将原始列表排序sorted(list): 排序但是不影响原来列表内部元素顺序list.reverse(): 列表反转,会影响元素顺序len(list): 返回列表长度list comprehension: my_list = [val * 3 for val in range(1, 10)]list slice: copy_list = original_list[:]…

Java Optional: Is It Useful?

Introduction Java Optional is a container class that encapsulates an optional value, which was introduced by Java 8. However, I still see lots of colleagues not leveraging it in their work. Maybe it’s too hard to use? Or maybe we…