This is a creation in
Article, where the information may have evolved or changed.
28. Toad Notes Go language--concurrency simple example
Concurrency sample
Package Main
Import (
"FMT"
"Time"
)
Func Ready (W string, sec Int64) {
secs: =time. Duration (SEC) * time. Second
Time. Sleep (secs)
Fmt. Println (W, "is ready!")
}
Func Main () {
Goready ("Tee", 2)
Goready ("Coffee", 1)
Fmt. Println ("I ' mwaiting")
secs: =time. Duration (2) * time. Second
Time.
This is a creation in
Article, where the information may have evolved or changed.
2. Toad Notes Go language--bag
Each Go program is made up of packages.
The entry that runs the program is the package main.
This program uses and imports the package "FMT" and "Math/rand".
By convention, the package name is consistent with the last directory of the import path. For example, the "Math/rand" package is started by the Packages Rand statement
Code
Package M
This is a creation in
Article, where the information may have evolved or changed.
33. Toad Notes Go language--switch keywords
The switch of Go is very flexible. The expression does not have to be a constant or an integer, and the process is performed from top to bottom until a match is found, and if switch does not have an expression, it matches true. This creates a possibility--using switch to write if-else-if-else judgment sequences.
It does not mat
This is a creation in
Article, where the information may have evolved or changed.
14. Toad Notes Go language--Detail summary One
Slice and arrays differ in declaration: When declaring an array, the length of the array is indicated in square brackets or used ... Automatic
The length is calculated, and when the slice is declared, there is no character in the square brackets.
There are several useful built-in functions for slice:
L Len Gets the length of
This is a creation in
Article, where the information may have evolved or changed.
34. Toad Notes Go language--built-in functions
A few functions are predefined, which means that you can use them without referencing any packages.
Close new Paniccomplex delete make recover real len append print imag cap copy println
Close is used for channel communication. Use it to close the channel.
Delete is used to remove an instance from the map.
Len and cap are av
This is a creation in
Article, where the information may have evolved or changed.
7. Toad Notes Go language--if,switch,defer
If
The IF statements do not appear to be the same as in C or Java, except that they do not have ' () ' (even forcing them to be used), and ' {} ' is required.
Package Main
Import (
"FMT"
"Math"
)
Func sqrt (x float64) string {
If x
RETURNSQRT (-X) + "I"
}
Returnfmt. Sprint (Math. SQRT (x))
}
Func Main () {
Fmt. Println (sqrt (2)
This is a creation in
Article, where the information may have evolved or changed.
4.go Open Source Groupcache Project Toad notes--about StrConv
A StrConv package is an assignment that converts a string, such as converting a character to an integer number.
1 Test Code
Package Main
Import (
"FMT"
"StrConv"
)
funcMain () {
varorigString="666"
varanint
varnewSString
FMT. Printf ("Thesizeofintsis:%d\n", StrConv. IntSize)
An,_=strconv. Atoi
Title: Give a map, find the largest sub-matrix in this map, so that the sub-matrix does not contain the letter ' R '.Idea: The simple suspension line method to find the maximum sub-matrix, or not with the weight, very good. Long time no write hanging line, review.CODE:#include Bzoj 3039 Jade Toad Hall Suspension line method
AllocationLet's take a look at the code below:#include "Stdio.h"#include "Stdlib.h"void Main (){int I,*pi;float F,*PF;PI = (int *) malloc (sizeof(int));PF = (float *) malloc (sizeof(float));*pi=1024;*pf=3.14;printf ("integer =%d,float =%f\n", *PI,*PF);Free (PI);Free (PF);}The code toad can be compiled and run through VS2012, and the small partners can run through any C compiler.Output Result:such as 1:The malloc function can request the required spac
Toad Export Data dictionary, export all table structure of database into HTMThe first step:Step two: Select the databaseStep three: Select paths and set other configurationsFourth step: After the successful build, the system will pop up a prompt to ask whether to open.The resulting table frame effect is as follows:A data dictionary is often required to write software documents, and this method can be used to quickly extract the table structure.Toad Ex
During the development of Oracle applications, accessing database objects and writing SQL programs is tedious and time-consuming, and the day-to-day management of the database requires a lot of SQL scripts to complete. Quest software provides an efficient Oracle Application development tool-toad for this purpose. In the new version of Toad, the DBA module is also included to help the DBA complete a number o
Toad version is "Toad for Oracle 12.1"This connection window will be available every time you open toad, but my two connections below are now unused, but the delete option is not found.650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/87/3F/wKioL1fY8gqxyberAAAZVTZIU3c114.png-wh_500x0-wm_3 -wmp_4-s_12899380.png "title=" 1.PNG "alt=" Wkiol1fy8gqxyberaaazvt
Tags: Toad for Oracle Oarcle garbled Toad for Oracle Chinese display garbledData storage When the Chinese display is normal, in Toad for Oracle client and page display are garbled!!!Cause: A problem that occurs when data is in storage.Solution:Increment in system variable: variable name: Nls_lang variable Value: American_america. Zhs16gbkThen restart
1.
Can ' t Initialize OCI. Erro-1
There are two situations: one is to ensure that the Toad run with administrator privileges, my system is resolved using this method, and the second is to add Oracle's Bin directory to the path of the environment variable
2.
Ora-01254:tns: Unable to resolve the specified connection identifier ...
This problem is because the path to the Toad installation contains (), a
Label:First, the problem to be solved:Select rowid,acct_id,state_date from acct; Modified, 1) SQL indicates ROWID, can be displayed 2) time format shown as YYYYMMDD HH24:MI:SS 3) for numbers that are very long, do not use scientific notation to display
Installation and Environment (toad and Plsql coexist)
TOAD 64BIT, Plsql DEVELOPER 32BIT, respective oracleinstant CLIENTToad Select the O
Tags: Oracle database structure PDM docOne, the SQL that uses Toad to export the database structure:menu [DataBase]---[Export]----[Generate Schema Script],Second, open the window, the frame is checked by default, just fill in the Save path;Third, open PowerDesigner, menu [Reverse Engineer]----[Database],Iv. Pop-up window fill in the Model name and select the Oracle versionSelect the SQL file you just saved in the next window, then click OKVI. database
It is inconvenient to knock SQL statements in Hive and the table data displayed after a large amount of data is very poor readability.Later, a plugin with hive was found in Eclipse marketplaceHere are the steps for installing Toad for Cloud databases and connecting to hiveClick the Download buttonThe URL of the installation is given hereOpen EclipseEnter the name (custom) of the software in the Name field, enter the URL in the location, click OK, and
Tags: Oracle alt img Specifies session HTTP using 9.png technologyOpen Toad,1, menu bar session->new Connection .... Open the following window:2, after entry, menu Datebaseàsechema brower ... Find Table Space tabAfter opening, the following interface is displayed:Then switch to another tab: Date Feiles ()After a bit of opening:Click here to open:After specifying, click OKThe next step is to create the user:This allows you to use the database with the
Method 1: Yesterday in order to manage some information of the database, the first time with Toad for Oracle this software. Did not expect to encounter the first use: "Can" T initialize OCI. Error-1 ".
This error is identified because there is no additional path in the system variable, the solution is as follows: In the system variable path, configure the environment variable C:\oracle\product\10.2.0\db_1\BIN; So you can log in.
Method 2: Right-cli
1. Define a SQL class HelloDROP JAVA SOURCE newxzxt. " Hello "; CREATE OR REPLACE and RESOLVE JAVA SOURCE NAMED newxzxt. " Hello "as import java.lang.*; public class Hello {public static string say (String args) { System.out.println (args); return args; } } /2. The SQL class above the stored procedure callCREATE OR REPLACE Procedure newxzxt.prc_hehe ( p_name VARCHAR2) aslanguage Java name ' Hello.say (java.lang.String) ';3. Call the store
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.