1, Windows do CSV file by default is the GBK character set, and MySQL set the default is the UTF8 character set, so to convert the file to UTF8 format.Iconv-f gbk-t utf8/tmp/file name. csv-o/tmp/file name 2.csv2. Import with SQL commandLoad data infile '/tmp/mailut2.csv ' into table db1.d fields terminated by ', ' lines terminated by ' \ n ' ignore 1 lines (ID, E
PHP implementation of simple mock JSON script sharing, Phpmockjson script
There are now too many ways to mock, but it might be easier to use this as a temporary mock-up when it is time to connect to the remote server to test the true return, if there is no node on the machine and PHP.Copy CodeThe code is as follows:/*** Mock
Script Source:
Copy Code code as follows:
SET ANSI_NULLS on
Go
SET QUOTED_IDENTIFIER ON
Go
CREATE Procedure[dbo]. [Serializejson] (
@ParameterSQL as VARCHAR (MAX)
)
As
BEGIN
DECLARE @SQL NVARCHAR (MAX)
DECLARE @XMLString VARCHAR (MAX)
DECLARE @XML XML
DECLARE @Paramlist NVARCHAR (1000)
SET @Paramlist = N ' @XML XML OUTPUT '
SET @SQL = ' with preparetable (xmlstring) '
SET @SQL = @SQL + ' as ' ('
SET @SQL = @SQL + @Parame
JS Write code Generation script, JSON to generate the corresponding go type ObjectUsed for JSON conversionJS script is not very dependent, can run directlyChange the file as needed before executingExamplevarTopname= "Data";varDefaulttype= "string";varbson=true;//corresponding MongoDBvarjson=true;//HTTP ResponsevarSchem
Read JSON file data online There are many ways to use Simplejson, the introduction of Simplejson refer to the following links: Http://wiki.unity3d.com/index.php/SimpleJSON, Import the relevant files for Simplejson before you use them.JSON file name: Achieve.json, File contents:{"30002": {"achieve_id": 30002, "achieve_name": "Streak", "Achieve_race": 3, "Achieve_type": $, "achieve_des": " Qualifying consecutive victories 10 "," Achieve_gold ":" Achieve
One, there are two ways to pass Sjon to the page, one is Ajax use, and the other is directly rendered in the page:views.py#Coding:utf-8 fromDjango.shortcutsImportRenderImportJSON#Create your views here.defAddjson (Request): List_= ['List Collection','render json to template'] Dict_= {'site':'Dictionary Address','author':'self-study person'} returnRender (Request,'addjson.html',{'jsonlist': Json.dumps (List_),'Dict': Json.dumps (dict_)})#Remembe
Project path: Https://code.csdn.net/langresser/excel2jsonA python script that automatically transforms the configuration in Excel into JSON format.1. This is for unity, but a little modification can be run in any environment2, Excel content requirements for the form of key-value pairs, specifically, you can refer to the instructions in the script.3, read the code
First, we'll introduce a JSON script in the foreground to facilitate the serialization of the JS object
Then we declare a class in the foreground, put the value you want to save into the class, and finally serialize
Copy Code code as follows:
function Save () {
var examid = ' var yearterm = $ ("#var Examtype = $ ("#var examdate = $ ("#ExamDate"). Val ();
var examname = $ ("#ExamName"). Val
inheritedcustomize his own object.6.JS type inside (except for object)number (numeric type, no int, long Double,etc) Boolean string array date RegExp function7. Clear the difference between = = and = = =, recommend = = =8.NaN• Not a number• Operating results for undefined or erroneousnan equals nothingNan = = = Nan is False nan!== Nan is True9.Arraysarray inherits from Object. indexes is converted to strings and used as names for retrieving values. very efficient for Sparse arrays. not very eff
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.