Error establishing a database connection
Try this: sudo service mysql restart If you can successfully restart your mysql service, but still cannot see your wordpress, then I wish you good luck.
Try this: sudo service mysql restart If you can successfully restart your mysql service, but still cannot see your wordpress, then I wish you good luck.
[youtube &w=640&h=360] can’t agree more
If you are reading Writing your first Django app, part 6, the code won’t work until you put in the following code from https://docs.djangoproject.com/en/1.8/howto/static-files/ (in the section named Serving static files during development) to the urls.py file. from django.conf import settings from django.conf.urls.static import static urlpatterns = [ # ... the rest of your URLconf goes here ... ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) Basically your urls.py needs to know where to route the static file requests. =) ...
It took me a while to figure out how to do this correctly. There is too much noise from google search… Here are my settings for everything to display correctly in my admin site w/ Django 1.8. settings.py USE_TZ = True TIME_ZONE = 'US/Pacific' HUMAN_TIME_FMT = '%Y-%m-%d %H:%M:%S %p' HUMAN_TIME_FMT is optional, I put it there for my own usage. models.py from django.conf import settings from django.db import models from django.utils import timezone class Sync(models.Model): sync_start = models.DateTimeField('sync starts') sync_end = models.DateTimeField('sync ends') def __str__(self): fmt = settings.HUMAN_TIME_FMT my_dt1 = timezone.localtime(self.sync_start).strftime(fmt) my_dt2 = timezone.localtime(self.sync_end).strftime(fmt) return 'From ' + my_dt1 + ' => ' + my_dt2 More to read: # https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-TIME_ZONE # http://en.wikipedia.org/wiki/List_of_tz_database_time_zones # http://strftime.org/ ...
If after switching to iphone 6 your google voice mail all of a sudden stops working, keep reading. This may have something to do with the new internal settings in iphone 6 with iOS 8. To the general public, simply need to know that the instructions from google voice to dial **004*1[GV-Number]# is not going to work. You would see error messages Setting Registration Failed. I tried it on my iphone 6 and it works now. Assuming your number is 1-650-789-1234. Simple do this: ...
牛耕田回來,躺在欄裡,疲憊不堪地喘著粗氣,狗跑過來看牠。 「唉,老朋友,我實在太累了。」牛訴著苦,「明天我真想歇一天。」 狗告別牛後,在牆角遇到了貓。 狗說:「夥計,我剛才去看了牛,這位大哥實在太累了,牠說牠想歇一天。也難怪,主人給牠的活兒太多太重了。」 貓轉身對羊說:「牛抱怨主人給牠的活兒太多太重,牠想歇一天,明天不幹活兒了。」 羊對雞說:「牛不想給主人幹活兒了,牠抱怨牠的活兒太多太重。唉,也不知道別的主人對他的牛是不是好一點兒。」 雞對豬說:「牛不準備給主人幹活兒了,牠想去別的主人家看看。也真是,主人對牛一點兒也不心疼,讓牠幹那麼多又重又髒的活兒,還用鞭子粗暴地抽打牠。」 晚飯前,婦人給豬餵食,豬向前一步,說:「女主人,我向你反映一件事。牛的思想最近很有問題,妳得好好教育牠。牠不願再給主人幹活兒了,牠嫌主人給牠的活兒太重太多太髒太累了。牠還說要離開主人,到別的主人那裡去。」 得到豬的報告,晚飯桌上,婦人對主人說,「牛想背叛你,牠想換一個主人。背叛是不可饒恕的,你準備怎麼處置牠?」 「對待背叛者,殺無赦!」主人咬牙切齒地說道。 可憐,一頭勤勞而實在的牛,就這樣被傳言「殺」死了。
In case you have the same issue. It turns out the iPhoto app won’t run on Yosemite. The new photo app is called Photos with a new app icon. This is how to fix it. 1. Make sure in your osx App Store app, there is iPhoto under Purchases 2. Open Finder, delete your iPhoto app. (You will probably need to put in your admin password). Don’t clean up your trash can yet. 3. Then restart. 4. Once log back in, open App Store, go to Purchases, install iPhoto. It will take a while to download. 5. The new app is call Photos with a circular icon. Once verify you could clean up your trash can. ...
To install: brew install groovy Sample code (name this file test.groovy) #!/usr/bin/env groovy println "Hello from the shebang line" def i = 0 def s = "abc" assert i == 1 assert s.equals("abcd") To run the test: groovy test.groovy You will see that the test fails. And it will tell you where. =) My version is Groovy Version: 2.4.3 JVM: 1.6.0_65 Vendor: Apple Inc. OS: Mac OS X. If you want to get rid of this annoying warning WARNING: Module [groovy-nio] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods], rename that library by ...
If git push keeps asking you for user/pass, chances are that you did a git clone using HTTPS. Fix that by going to your repo page on github, then click on the SSH link below the clone URL field, then copy that URL over (something like git@github.your_username/your_repo_name.git). Then update your local git repo with something like the following command git remote set-url origin git@github.your_username/your_repo_name.git ref: http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password
If you are reading this, chances are that you need to deal with unstructured data. =) First, install mongodb using homebrew! brew install mongodb Now we need to set up a dir for mongodb to keep its data. For simplicity, we will just use its default db path /data/db. We will need to change the permission of that dir to your username and your group. Run ls -ld ~ to get that info. ...