$.get('http://ip.taobao.com/service/getIpInfo.php?ip=','json',function(res){ p=JSON.parse(res); p=p.data; for(var key in p){ console.log(key + " -> " + p[key]); } })
$.get('http://ip.taobao.com/service/getIpInfo.php?ip=','json',function(res){ p=JSON.parse(res); p=p.data; for(var key in p){ console.log(key + " -> " + p[key]); } })
The lift story of Rose Frantzen
Rose Frantzen, a relatively young artist, has got a very unususal style as a comtemporary impressionist. However, she lead an arduous life during the days at school. She attended art school, but was told by one of her instructions that she wasn’t good at illustration and should go into advertising instead. She had to take both advertising and fine art classes until she was convinced that her work is good enough so that she could be an artist. Another thing is that she had to paint others’ portraits at somewhere like art fairs just to make monery to buy paint for her more serious work. No matter how hard it was, she never stopped pursuing of impressionism art. Eventually she is doing extremely well.
Most of us would have been discouraged if we had to face challenges and difficulties like that. The key point is that you keep at it and never give up.
Expercts from TPO 1 Listening Part 1 Section 2
Repair support for Ubuntu everyday usage
https://askubuntu.com/questions/218377/install-remove-language-show-only-english-no-other-choice
http://www.linuxdiyf.com/linux/20344.html
https://askubuntu.com/questions/455682/14-04-chinese-ibus-input-no-options
sudo apt-get –reinstall install language-selector-gnome
sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4
ibus restart
im-config -s ibus
sudo ibus-setup
How to compile OpenGL applications with GLUT
Set environment variables $CPATH$
and LIBRARY_PATH
to locate glut.h
and glut32.lib
.
If they are not set, use option -I'[include_path]'
and -L'[library_path]'
.
g++ [source_file] -o [target_file] -lfreeglut -lopengl32 -Wl,–subsystem,windows
Create a new build system.
{
“cmd”: [“g++”, “${file}”, “-o”,”${file_path}/${file_base_name}”,”-lfreeglut”,”-lopengl32”,”-lglu32”,”-Wl,–subsystem,windows”],
“working_dir”: “${file_path}”,
“variants”:
[
{
“name”: “Run”,
“cmd”: [“cmd”,”/C”,”${file_path}/${file_base_name}.exe &pause”]
}
]
}
Help about configurationsCMakeLists
## OpenGL
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
## OpenGL
FIND_PACKAGE(GLUT REQUIRED)
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR})
TARGET_LINK_LIBRARIES([project_name] ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
The application was unable to start correctly (0xc000007b). Click OK to close the application.
Make sure to link with the correct (64-bit) version of the library, and there is the correct (64-bit) dll available on the path.
常见的错误:
No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://xxx.com‘ is therefore not allowed access.
禁止跨域请求是浏览器的安全机制的一部分,不能随便绕开。
即便采用axios
,本质上仍是XMLHttpRequest
,会遇到同样的问题。
在不能触及被请求端的后端的前提下,需要使用代理来启用Access-Control-Allow-Origin
。
现在有了一种便捷手段:https://bird.ioliu.cn/
Visual Studio for Mac offline installation
Note that the recent release is no longer a preview version.
When trying out the Visual Studio Mac downloader from Microsoft, you will find it with “network error” and not pushing forward anymore.
However, disconnect the network and it will give in, providing with offline downloading links.
It was not possible to complete an automatic installation. This might be due to a problem with your network, proxy servers or an unsolvable installation conflict. At this point, you can continue the installation by manually downloading and installing the independent pieces. The list below shows each component that you need to install.
Mono Framework
Download the Mono Framework v5.0.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.
Android SDK
Download the Android SDK for Mac OS X version 24.4.1, open the downloaded archive and copy the contents of the folder found at its root directory (most probably named android-sdk-macosx) to the /Users/semprathlon/Library/Developer/Xamarin/android-sdk-macosx directory.
Click here in order to start the Android SDK Manager application. In the GUI make sure the following components are installed or selected for installation:
- Android SDK Tools
- Android SDK Platform-tools
- Android SDK Build-tools
- Android API 15
- Android API 19
- Android API 21
Once all the required components are selected (you can select others as well, if you wish) start the installation.
If you cannot see /Users/semprathlon/Library/Developer/Xamarin/android-sdk-macosx in Finder please click here to reveal the directory in Finder.
Download the Android NDK for Mac OS X version r10e, open the downloaded archive and copy the contents of its root directory (most probably named android-ndk-r10e) to the /Users/semprathlon/Library/Developer/Xamarin/android-ndk directory.
When the Android SDK installation is finished you might want to start the Android Emulator Manager and create as many emulator images as you might need for your development. This step can be performed at any time, on an as-needed basis.
Visual Studio
Download the Visual Studio v7.0.0 archive to any directory on your disk, double-click it and then drag and drop the Visual Studio icon to the Applications folder.
Xamarin.Android
Download the Xamarin.Android v7.3.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.
Xamarin.iOS
Download the Xamarin.iOS v10.10.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.
Xamarin.Mac
Download the Xamarin.Mac v3.4.0 archive to any directory on your disk, double-click it and follow the instructions on screen. Please accept all the defaults during the installation, including the target drive.
只需从/var/opt/gitlab/nginx/conf/nginx.conf
中提取关键配置,插入到系统nginx.conf
之中。
将/etc/gitlab/gitlab.rb
中的nginx['enable']
禁用,unicorn['enable']
启用。
sudo gitlab-ctl reconfigure
git fetch [origin branch-name]
git reset –hard [origin/branch-name]
git clean -df
https://segmentfault.com/q/1010000002590371
git remote -v
git remote add upstream URL
git fetch upstream
git merge upstream/master
https://segmentfault.com/q/1010000000115900
git reset –hard HEAD~1
git push –force
iptables -L -n
Check /etc/sysconfig/iptables
and edit the rules, then restart the iptable service to make it work.
service iptables restart
See /usr/local/apache-tomcat/conf/server.xml
ps aux | grep nginx
/usr/local/nginx/conf/nginx.conf
listen 8080 default_server;
listen [::]:8080 default_server ipv6only=on;
error adding listener addr=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket
chown git gitlab.socket
adding listener failed addr=127.0.0.1:8080 (in use)
gitlab-ctl tail unicorn
systemctl unmask firewalld
systemctl start firewalld
systemctl status firewalld
sudo firewall-cmd –permanent –add-service=http
# gitlab socket 文件地址 upstream gitlab { server unix://var/opt/gitlab/gitlab-rails/sockets/gitlab.socket; } server { listen *:8080; server_name gitlab.semprathlon.net; # server_tokens off; # don't show the version number, a security best practice root /opt/gitlab/embedded/service/gitlab-rails/public; # Increase this if you want to upload large attachments # Or if you want to accept large git objects over http client_max_body_size 250m; # individual nginx logs for this gitlab vhost access_log /var/log/gitlab/nginx/gitlab_access.log; error_log /var/log/gitlab/nginx/gitlab_error.log; location / { # serve static files from defined root folder;. # @gitlab is a named location for the upstream fallback, see below try_files $uri $uri/index.html $uri.html @gitlab; } # if a file, which is not found in the root folder is requested, # then the proxy pass the request to the upsteam (gitlab unicorn) location @gitlab { # If you use https make sure you disable gzip compression # to be safe against BREACH attack proxy_read_timeout 300; # Some requests take more than 30 seconds. proxy_connect_timeout 300; # Some requests take more than 30 seconds. proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Frame-Options SAMEORIGIN; proxy_pass http://gitlab; } # Enable gzip compression as per rails guide: http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression # WARNING: If you are using relative urls do remove the block below # See config/application.rb under "Relative url support" for the list of # other files that need to be changed for relative url support location ~ ^/(assets)/ { root /opt/gitlab/embedded/service/gitlab-rails/public; # gzip_static on; # to serve pre-gzipped version expires max; add_header Cache-Control public; } error_page 502 /502.html; }
gitlab-ctl tail
gitlab.socket permission denied
sudo usermod -aG gitlab-www git
http://www.doocr.com/articles/58b1599ee21ae505cb93a717
chgrp -R gitlab-www /var/opt/gitlab/gitlab-rails
chown -R www /var/opt/gitlab/gitlab-rails
https://askubuntu.com/questions/210210/pkg-config-path-environment-variable
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
sudo ldconfig