Project challenges notes

Forced forced to practice a few words, some of Baidu can easily solve the problem, each blog site to answer questions stereotyped is not a problem. . I do not even remember how to solve ,, As for Google to spend some good answers and its own technical problems and more time and effort will focus on recording it, and sometimes there will be the integration of knowledge, methods, resources, these tend to indicate the reference.

 

 

 

1. The problem with the data transfer form the form

BACKGROUND Demand: acquiring latitude and longitude of all data in the database spot instances, to "88.200638", "43.959542" format to return the distal end, and push the object into an array, as incoming data InMap2.0 API layer object;

. Realization of ideas: 1 format data processing function in view to obtain two list of latitude and longitude are recorded, with about locals () parameters in order to direct calls to the front end by {} function django form; 2 at the front end a write cycle. create a json objects, each json record a spot position;

image

Problems encountered: how to extract a single database data to generate a list; 2 how the regular expression to the list each application.

image

As used tools and characteristics: regular expression (data format), the lambda expression (need to provide an input parameter to the function arguments, to facilitate the preparation of the first parameter map function), map function (re performing each list. search () function)

To single quotes regular expression:

image

push json array into operation:

image

2.

 

Guess you like

Origin www.cnblogs.com/heikejingxiao/p/11241883.html