<commit_before><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
</style>
<script src="http://api.map.baidu.com/api?v=2.0&ak=FIWdfO6PROWOlG7UplZpGKBw"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 
<title>上海艺术地图</title>
</head>
<body>
<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">

// 百度地图API功能
var map = new BMap.Map("allmap");            // 创建Map实例
map.centerAndZoom("上海",15);                     // 初始化地图,设置中心点坐标和地图级别。

$.ajax({
    url: "http://api.douban.com/event/location/shanghai?type=exhibition&max-results=50",
})
    .done(function( response ){
        console.log("received", response);
    })
    .fail(function() {
        alert("无法访问豆瓣同城API！");
    });<commit_msg>Using $.getJSON() to visit cross domain resources.<commit_after><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
</style>
<script src="http://api.map.baidu.com/api?v=2.0&ak=FIWdfO6PROWOlG7UplZpGKBw"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 
<title>上海艺术地图</title>
</head>
<body>
<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">

// 百度地图API功能
var map = new BMap.Map("allmap");            // 创建Map实例
map.centerAndZoom("上海",15);                     // 初始化地图,设置中心点坐标和地图级别。

// https://github.com/unixcrh/DOUBANTONGCHENG/blob/master/DouBanTongCheng/ContentVC.m
$.getJSON("https://api.douban.com/v2/event/list?loc=shanghai&type=exhibition&max-results=50&callback=?", function(result){
   //response data are now in the result variable
   console.log(result);
});
{'fraction_non_alphanumeric': 0.20728705071393402, 'fraction_numerical': 0.022156573116691284, 'mean_word_length': 4.477088948787062, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2670549', 'n_tokens_mistral': 849, 'n_tokens_neox': 830, 'n_words': 111}