我在印度编号系统中显示以下代码.
var x=125465778;
var res= x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
Run Code Online (Sandbox Code Playgroud)
得到这个输出:125,465,778.
我需要这样的输出:12,54,65,778.
请帮我解决这个问题.
我正在遵循django中的教程并获得以下错误.
找到了一些解决方案,但它没有解决我的错误.教程链接就是这个.
我获得的错误如下.在复制问题之前,请帮我解决这个问题.我正在学习python和django服务,所以它会帮助很多.
ImportError at /polls/
cannot import name include
Request Method: GET
Request URL: http://localhost:8000/polls/
Django Version: 1.3.1
Exception Type: ImportError
Exception Value:
cannot import name include
Exception Location: /home/next/Desktop/MBS/python_files/progs/django_examples/mysite/../mysite/urls.py in <module>, line 3
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/home/next/Desktop/MBS/python_files/progs/django_examples/mysite',
'/usr/local/lib/python2.7/dist-packages/PyQRCode-1.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/setuptools-22.0.0-py2.7.egg',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-couch',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
Server time: Mon, 6 Jun 2016 00:03:30 -0500
Run Code Online (Sandbox Code Playgroud)
编辑1:我将附上两者的urls.py,这样有助于识别
在民意调查/ urls.py中
from django.conf.urls import …Run Code Online (Sandbox Code Playgroud) 我在学习Python之后正在学习PostgreSQL。我关注tutorialspoint.com 网站。
没有问题,直到我创建一个触发器并且它像一个魅力一样工作。
但是当我尝试删除(即删除)触发器时,出现以下错误。
DROP TRIGGER example_trigger;
ERROR: syntax error at or near ";"
LINE 1: DROP TRIGGER example_trigger;
^
Run Code Online (Sandbox Code Playgroud)
我不确定为什么会收到此错误。请帮帮我。这是常见的还是我错了?
database postgresql syntax-error sql-drop postgresql-triggers
database ×1
django ×1
javascript ×1
jquery ×1
postgresql ×1
python ×1
sql-drop ×1
syntax-error ×1