我从控制器那里得到了我的数据,如下所示.
控制器:
$http.get('json/projects.json').success(function(data) {
$scope.projects = data;
});
Run Code Online (Sandbox Code Playgroud)
我在json文件中的数据是这样的:
JSON:
{
...
projects = ['hello world', 'www.google.com', 'hello world.']
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<div ng-repeat='p in projects'> {{p}} </div>
Run Code Online (Sandbox Code Playgroud)
我的问题是如何将"www.google.com"显示为链接而不是简单的文字?
我有一个包含 2,760,000 行的表。在mysqlworkbench中,从原始表中选择*需要36秒。
我想使用 python 中的现有表创建另一个表(使用my_func()转换值)。
但是,当我在命令行中运行它时,它似乎永远不会完成。
sql = "SELECT ID, Eye, Values FROM my_original_table"
curQuery.execute(sql)
for row in curQuery.fetchall():
dat = list(row)
id = dat.pop(0)
eye = dat.pop(0)
values = dat.pop(0)
v = my_func(values)
if v != None :
sql = "INSERT INTO new_table VALUES ( '%s', '%s', %d );" % (id, eye, v)
print(sql)
curExe.execute(sql)
db.commit()
Run Code Online (Sandbox Code Playgroud)
但是,如果我将LIMIT 0,10添加到我的第一个选择 sql (如下所示),它运行良好。所以,这意味着我的程序是正确的。但这是否意味着如果没有“限制”,数据太多,我的计算机无法处理?我该如何解决这个问题?
sql = "SELECT ID, Eye, Values FROM ETCEpisodeVisualAcuity LIMIT 0,10"
Run Code Online (Sandbox Code Playgroud)