- 博客(207)
- 收藏
- 关注
原创 type information - Using Class Literals
previous articleIf we reimplement PetCreator using lcass literals, the result is cleaner in many ways:// typeinfo/pets/LiteralPetCreator.java// (c)2017 MindView LLC: see Copyright.txt// We make no guarantees that this code is fit for any purpose.//
2020-12-30 23:56:12
249
1
原创 jenv: version `1.8‘ is not installed
when to use java it prompts jenv: version `1.8' is not installed, the details are as follows: % java -versionjenv: version `1.8' is not installedjenv: version `1.8' is not installed % jenv exec bashjenv: version `1.8' is not installedjenv: vers..
2020-12-28 23:41:00
889
原创 Atom-platformio-ide-terminal 2.10.0-Some installed packages could not be loaded because they contain
prebuild-install WARN install connect ETIMEDOUT 192.30.253.112:443gyp ERR! configure error gyp ERR! stack Error: Python executable "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh" is v3.7.4, which is not supported by gyp.gy.
2020-12-26 21:46:48
752
1
原创 nable to download: Error 403, Error: Forbidden for url, when use coursera_dl download lecture
My coursera_dl version 0.11.5When use$ coursera-dl -u <your-email> -p <your-pwd> the-lecture -ca CAUTHIt also prompts bellow error:coursera_dl version 0.11.5Traceback (most rece...
2020-04-07 20:44:05
1019
原创 Mac Atom - Could not determine java version from '11.0.1'
when run./gradlew :typeinfo:Shapesthe terminal prompt:FAILURE: Build failed with an exception.* What went wrong:Could not determine java version from '11.0.1'.* Try:Run with --stacktra...
2019-12-31 23:58:11
804
原创 SyntaxError: Non-ASCII character '\xe4' in file today.py on line 2, but no encoding declared;
error detail:% python today.py File "today.py", line 2SyntaxError: Non-ASCII character '\xe4' in file today.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for ...
2019-11-03 19:38:55
486
原创 error: gpg failed to sign the data fatal: failed to write commit object'
step 1. test ~ % echo "test" | gpg --clearsignWarning: Failed to set locale category LC_NUMERIC to en_CN.Warning: Failed to set locale category LC_TIME to en_CN.Warning: Failed to set locale ca...
2019-11-03 17:52:51
742
原创 windows 10 32bit 配置Python编程环境
确认系统架构点击桌面左下角的搜索按钮,输入cmd运行命令行界面(Command Prompt); 在命令行界面输入wmic CPU get DataWidth ↩︎,返回的是 CPU 的架构,64 或 32 位; 在命令行界面输入wmic OS get OSArchitecture ↩︎,返回的是 Windows 操作系统架构,64 或 32 位。确认 PowerShell...
2019-10-27 15:04:41
1223
原创 pip3 install jupyterlab - pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=
pip3 install jupyterlabCollecting jupyterlab Downloading https://files.pythonhosted.org/packages/2c/89/a4e048f198867f19d2a9f40d08c946d760ab06dd39d774940a20da47b5f9/jupyterlab-1.1.4-py2.py3-none-an...
2019-10-26 15:33:34
710
原创 understanding the difference between null and '\u0000' in java
public class MyClass { public static void main(String args[]) { char c = '\u000'; // [1] System.out.println("\u000:" + c); }}above code jdk is 1.8 or above 1.8.[1]'s error...
2019-10-22 23:06:20
393
原创 Batch IF .exe is running, IF not start it
tasklist | findstr /i "appName.exe" > nul && echo Yeah || echo NopeThe command(s) after&&on the same line will run whenfindstrfound the"appName.exe"and skip the command(s)...
2019-10-22 22:40:02
127
原创 windows pe for Windows 10 docs
windows pe info urls:basic infosWindows PE (WinPE) Windows PE (WinPE) for Windows10 is a small operating system used to install, deploy, and repair Windows10 for desktop editions (Home, Pro, En...
2019-10-13 11:56:34
411
原创 type information - Checking Before a Cast
In C++, the classic cast "(Shape)" does not perform RTTI (Runtime type information, discovers and uses type information while a program is running). It simply tells the compiler to treat the object a...
2019-10-02 23:15:21
220
原创 type information - The cast() Method
/** * Casts an object to the class or interface represented * by this {@code Class} object. * * @param obj the object to be cast * @return the object after casting, or nu...
2019-10-01 17:04:31
210
原创 use the nohup command without getting nohup out + sql tip
command tipwe can combine file descriptors together: 2>&1 means "send standard error wherever standard output is going". That means that we get a single stream of output that includes both sta...
2019-09-30 23:10:31
145
原创 type information - Generic Class Syntax
The benefit of Class<?> is it indicates we aren’t just using a non-specific class reference by accident, or out of ignorance.The reason for adding the generic syntax to Class references is onl...
2019-08-19 00:14:46
230
原创 Slow speed on git clone
There are three tricks I try for a quick cloning:update hosts file a. add192.30.253.112 github.com192.30.253.113 github.com151.101.185.194 github.global.ssl.fastly.netto your /etc/ho...
2019-08-07 19:56:35
464
原创 type information - Generic Class References
A Class reference points to a Class object, which manufactures instances of classes and contains all the method code for those instances. It also contains the statics for that class. So a Class refere...
2019-07-21 23:41:20
166
原创 type information - Class Literals :a second way to produce the reference to the Class object
Class LIteral, likeFacyToy.classsimler safer since it's checked at compile time (and thus does not have to be placed in a try block). more efficient because it eliminates the forName() method ca...
2019-07-21 23:23:10
154
原创 type information - The Class Object
The class loader first checks to see if the Class Object for that type is loaded. If not, the default class loader finds the .class file with that name (an add-on class loader might, for example, look...
2019-07-02 23:13:41
170
原创 type information - The Need for RTTI
RTTI: Runtime type information, discovers and uses type information while a program is running.It has two forms:assumes we have all the types available at compile time the reflection mechanism, ...
2019-06-24 22:57:38
162
原创 strings - Scanner Delimiters
By default, a Scanner splits input tokens along whitespace, but we can also specify our own delimiter pattern in the form of a regular expression.example 1:// strings/ScannerDelimiter.java// (c)...
2019-06-23 23:30:46
116
原创 Tess4J Use Example
Tesseract is ocr engine once developed by HP. Currently it is an opensource project sponsored by Google. The software is capable of taking a picture and transforming it into text. It supports a wide ...
2019-06-15 21:35:13
1092
原创 strings - Inspired by Unix’s grep
readAllLinespublic staticList<String>readAllLines(Pathpath) throws IOExceptionRead all lines from a file. Bytes from the file are decoded into characters...
2019-06-12 00:26:38
166
原创 strings - split(), Replace Operations
splitpublicString[]split(CharSequenceinput, intlimit)Splits the given input sequence around matches of this pattern.The array returned by this method contains each sub...
2019-06-04 21:07:24
162
原创 strings - Pattern 9 Flags
Modifier and Type Constant Field Value publicstaticfinalint CANON_EQ 128 publicstaticfinalint CASE_INSENSITIVE 2 publicstaticfinalint COMMENTS 4 publicstatic...
2019-05-29 23:26:48
201
原创 strings - Macher - start() and end() and related methods
startpublicintstart()Returns the start index of the previous match.Specified by:startin interfaceMatchResultReturns:The index of the first character matchedThrows:IllegalStateExce...
2019-05-20 23:37:29
188
原创 strings - final class Matcher's Groups
Groups are regular expressions set off by parentheses that can be called up later with their group number. Group 0 indicates the whole expression match, group 1 is the first parenthesized group, etc. ...
2019-05-15 23:45:04
135
原创 strings - Pattern and Matcher
A simple example for use Pattern and Matcher// strings/TestRegularExpression.java// (c)2017 MindView LLC: see Copyright.txt// We make no guarantees that this code is fit for any purpose.// Visi...
2019-05-13 23:23:08
113
原创 strings - Quantifiers
Quantifiersallow you to specify the number of occurrences to match against. For convenience, the three sections of the Pattern API specification describing greedy, reluctant, and possessive quantifie...
2019-05-09 23:28:01
145
原创 strings - Creating Regular Expressions
[ ^abc ] Any character except a, b, or c (negation)[ abc [ hij ] ] Any of a, b, c, h, i, j (same as a|b|c|h|i|j) (union)[ a-z && [ hij ] ] Either h, i, or j (inte...
2019-05-08 23:40:54
147
原创 strings - Regular Expressions - Basics
In Java, \\ means "I'm inserting a regular expression backslash, so the following character has special meaning." To insert a literal backslash, we say \\\.// strings/IntegerMatch.java// (c)2017 M...
2019-05-04 23:44:18
208
原创 strings - String.format()
Java 5 also took a cue from C's sprintf(), which is used to create Strings. String.format() is a static method which takes all the same arguments as Formatters format() but returns a String. It can c...
2019-05-03 18:59:44
315
原创 strings - Formatter Conversions
Format String SyntaxEvery method which produces formatted output requires aformat stringand anargument list. The format string is aStringwhich may contain fixed text and one or more embeddedfo...
2019-05-03 18:33:33
211
原创 strings - Formatting Output
One of the long-awaited features that finally appeared in Java 5 is output formatting in the style of C’s printf() statement. Not only does this allowfor simplified output code, but it also gives Jav...
2019-05-03 16:02:39
210
原创 strings - Unintended Recursion
// strings/InfiniteRecursion.java// (c)2017 MindView LLC: see Copyright.txt// We make no guarantees that this code is fit for any purpose.// Visit http://OnJava8.com for more book information....
2019-05-03 14:45:05
145
原创 Strings - Overloading + vs. StringBuilder
// strings/Concatenation.java// (c)2017 MindView LLC: see Copyright.txt// We make no guarantees that this code is fit for any purpose.// Visit http://OnJava8.com for more book information.public...
2019-04-30 23:40:23
104
原创 files - Reading & Writing Files
// files/ListOfLines.java// (c)2017 MindView LLC: see Copyright.txt// We make no guarantees that this code is fit for any purpose.// Visit http://OnJava8.com for more book information.import jav...
2019-04-29 23:42:53
178
原创 files - Finding Files, PathMacher
// files/Find.java// (c)2017 MindView LLC: see Copyright.txt// We make no guarantees that this code is fit for any purpose.// Visit http://OnJava8.com for more book information.// {ExcludeFrom...
2019-04-27 15:39:20
191
原创 warning: type specifier missing, defaults to 'int' [-Wimplicit-int
We can either tell the compiler to use the C language standard C90 (ANSI), which was modern when the book was written. Do it by using parameter-std=c90or-ansito the compiler, like this:$ cc -an...
2019-04-25 21:51:25
12571
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人