热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

一个很好的emacs配置文件范例

2019独角兽企业重金招聘Python工程师标准一个很好的emacs配置文件范例(custom-set-variables;;custom-set-variableswasa

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

一个很好的 emacs 配置文件范例

(custom-set-variables;; custom-set-variables was added by Custom.;; If you edit it by hand, you could mess it up, so be careful.;; Your init file should contain only one such instance.;; If there is more than one, they won't work right.'(TeX-engine (quote xetex))'(TeX-shell "/bin/bash")'(TeX-view-program-list nil)'(TeX-view-program-selection (quote (((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-pdf "xpdf") (output-html "xdg-open"))))'(gud-gdb-command-name "gdb --annotate=1")'(inhibit-startup-screen t)'(initial-buffer-choice t)'(initial-frame-alist (quote ((menu-bar-lines . 1))))'(initial-scratch-message "")'(large-file-warning-threshold nil)'(org-agenda-files (quote ("~/Desktop/todo.org")))'(org-agenda-include-diary t)'(org-log-into-drawer t)'(safe-local-variable-values (quote ((encoding . utf-8) (ruby-compilation-executable . "ruby") (ruby-compilation-executable . "ruby1.8") (ruby-compilation-executable . "ruby1.9") (ruby-compilation-executable . "rbx") (ruby-compilation-executable . "jruby")))))(custom-set-faces;; custom-set-faces was added by Custom.;; If you edit it by hand, you could mess it up, so be careful.;; Your init file should contain only one such instance.;; If there is more than one, they won't work right.'(default ((t (:inherit nil :stipple nil :inverse-video nil :background "#242424" :foreground "#E6E1DC" :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 150 :width normal :foundry "apple" :family "Consolas"))))'(dired-directory ((t (:inherit font-lock-function-name-face :foreground "Green")))));;; Emacs general behavior setup
(setq backup-inhibited t)
(tool-bar-mode -1)
(setq user-full-name "Huang Liang")
(setq user-mail-address "lhuang@thoughtworks.com")
(setq tramp-default-user "lhuang" tramp-default-host "shell01.kp.realestate.com.au")
(setenv "PATH"(concat (getenv "PATH") ":" "/usr/local/bin" ":" "/usr/texbin" ":" "/opt/local/bin"));; nice scrolling
(set-scroll-bar-mode nil)
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil)))
(setq mouse-wheel-progressive-speed t)
(setq scroll-margin 0scroll-conservatively 100000scroll-preserve-screen-position t);; suppress bell sound
(setq visible-bell 1)
(setq ring-bell-function 'ignore);; mode line settings
(line-number-mode t)
(column-number-mode t)
(size-indication-mode t);;Allow you to type just "y" instead of "yes" when you exit
(fset 'yes-or-no-p 'y-or-n-p)
;;set auto fill mode
(setq default-major-mode 'text-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill);;; Common Lisp with Slime
(set-language-environment "utf-8");;; Set Aspell
(setq-default ispell-program-name "/opt/local/bin/aspell")(add-to-list 'load-path "~/.emacs.d")
(add-to-list 'load-path "~/.emacs.d/elpa")(require 'package)
(defvar package-archives '("tromey" . "http://tromey.com/elpa/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil t)(url-retrieve"https://github.com/dimitri/el-get/raw/master/el-get-install.el"(lambda (s)(end-of-buffer)(eval-print-last-sexp))))(defun ruby-mode-hook ()(autoload 'ruby-mode "ruby-mode" nil t)(add-to-list 'auto-mode-alist '("Capfile" . ruby-mode))(add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))(add-to-list 'auto-mode-alist '("Rakefile" . ruby-mode))(add-to-list 'auto-mode-alist '("\\.rake\\'" . ruby-mode))(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))(add-to-list 'auto-mode-alist '("\\.ru\\'" . ruby-mode))(add-hook 'ruby-mode-hook '(lambda ();;; setup rsense(setq rsense-home "/usr/local")(add-to-list 'load-path (concat rsense-home "/etc"))(require 'rsense)(setq ruby-deep-arglist t)(setq ruby-deep-indent-paren nil)(setq c-tab-always-indent nil)(require 'inf-ruby)(require 'ruby-compilation)(define-key ruby-mode-map (kbd "C-.") 'ac-complete-rsense)(add-to-list 'ac-sources 'ac-source-rsense-method)(add-to-list 'ac-sources 'ac-source-rsense-constant)(define-key ruby-mode-map (kbd "C-c C-e") 'run-rails-test-or-ruby-buffer)(define-key ruby-mode-map (kbd "M-r") 'run-rails-test-or-ruby-buffer)(define-key ruby-mode-map (kbd "M-n") 'ruby-end-of-block)(define-key ruby-mode-map (kbd "M-p") 'ruby-beginning-of-block)(define-key ruby-mode-map (kbd "s-n") 'ruby-forward-sexp)(define-key ruby-mode-map (kbd "s-p") 'ruby-backward-sexp))))(defun rhtml-mode-hook ()(autoload 'rhtml-mode "rhtml-mode" nil t)(add-to-list 'auto-mode-alist '("\\.erb\\'" . rhtml-mode))(add-to-list 'auto-mode-alist '("\\.rjs\\'" . rhtml-mode)))(defun yaml-mode-hook ()(autoload 'yaml-mode "yaml-mode" nil t)(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))(add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode)))(defun css-mode-hook ()(autoload 'css-mode "css-mode" nil t)(add-hook 'css-mode-hook '(lambda ()(setq css-indent-level 2)(setq css-indent-offset 2))))(defun is-rails-project ()(when (textmate-project-root)(file-exists-p (expand-file-name "config/environment.rb" (textmate-project-root)))))(defun run-rails-test-or-ruby-buffer ()(interactive)(if (is-rails-project)(let* ((path (buffer-file-name))(filename (file-name-nondirectory path))(test-path (expand-file-name "test" (textmate-project-root)))(command (list ruby-compilation-executable "-I" test-path path)))(pop-to-buffer (ruby-compilation-do filename command)))(ruby-compilation-this-buffer)))(defun auctex-hook ()(setq TeX-engine 'xetex)(TeX-global-PDF-mode t) ; PDF mode enable, not plain(define-key LaTeX-mode-map (kbd "TAB") 'TeX-complete-symbol)(setq TeX-auto-save t)(setenv "PATH" (concat (getenv "PATH") ":/usr/local/texlive/2010/bin/universal-darwin:/usr/local/bin"))(setq exec-path (append exec-path '("/usr/local/texlive/2010/bin/universal-darwin"))))(defun smex-hook ()(smex-initialize)(global-set-key (kbd "M-x") 'smex)(global-set-key (kbd "M-X") 'smex-major-mode-commands);; This is your old M-x.(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command))(defun slime-hook ()
;;; Note that if you save a heap image, the character
;;; encoding specified on the command line will be preserved,
;;; and you won&#39;t have to specify the -K utf-8 any more.(setq inferior-lisp-program "/opt/local/bin/sbcl -K utf-8")(setq slime-net-coding-system &#39;utf-8-unix)(add-hook &#39;lisp-mode-hook &#39;slime-mode)(require &#39;slime)(load "slime-indentation.el")(slime-setup &#39;(slime-indentation slime-repl))(define-key slime-mode-map (kbd "C-c C-b") &#39;slime-eval-buffer)(define-key slime-mode-map (kbd "C-c C-c") &#39;slime-eval-defun))(defun ac-hook ()(ac-config-default))(defun paredit-hook ()(add-hook &#39;emacs-lisp-mode-hook (lambda () (paredit-mode &#43;1)))(add-hook &#39;lisp-mode-hook (lambda () (paredit-mode &#43;1)))(add-hook &#39;lisp-interaction-mode-hook (lambda () (paredit-mode &#43;1)))(add-hook &#39;clojure-mode-hook (lambda () (paredit-mode &#43;1)))(add-hook &#39;scheme-mode-hook (lambda () (paredit-mode &#43;1)))(define-key paredit-mode-map (kbd ")") &#39;paredit-close-parenthesis)(define-key paredit-mode-map (kbd "M-)") &#39;paredit-close-parenthesis-and-newline)) (defun clojure-hook ()(require &#39;clojure-mode)(define-key slime-mode-map (kbd "C-c C-b") &#39;slime-eval-buffer)(define-key slime-mode-map (kbd "C-c C-c") &#39;slime-eval-defun)(define-clojure-indent(describe &#39;defun)(testing &#39;defun)(given &#39;defun)(using &#39;defun)(with &#39;defun)(context &#39;defun)(it &#39;defun)(do-it &#39;defun)(should &#39;defun)(should-not &#39;defun)(should&#61; &#39;defun)(should-not&#61; &#39;defun)(should-fail &#39;defun)(should-throw &#39;defun)(should-not-throw &#39;defun)))(defun mmm-mode-hook ()(setq mmm-global-mode &#39;maybe)(setq mmm-submode-decoration-level 0)(mmm-add-group&#39;fancy-rhtml&#39;((html-css:submode css-mode:face mmm-code-submode-face:front "")))(setq mweb-filename-extensions &#39;("rhtml" "htm" "html" "erb" "rjs"))(multi-web-global-mode 1))(defun yasnippet-hook ()(require &#39;yasnippet)(setq yas/snippet-dirs &#39;("~/.emacs.d/el-get/yasnippet/snippets" "~/.emacs.d/snippets"))(yas/global-mode 1))(defun cucumber-mode-hook () (setq feature-default-language "en")(setq feature-default-i18n-file "~/.emacs.d/el-get/cucumber/i18n.yml");; load bundle snippets(yas/load-directory "~/.emacs.d/el-get/cucumber/snippets/feature-mode/")(load "feature-mode")(add-to-list &#39;auto-mode-alist &#39;("\\.feature$" . feature-mode)))(defun coffee-mode-hook ()(add-hook &#39;coffee-mode-hook&#39;(lambda() (set (make-local-variable &#39;tab-width) 2)))(setq coffee-js-mode &#39;js2-mode)(define-key coffee-mode-map (kbd "C-c C-c") &#39;coffee-compile-buffer))(defun mark-multiple-hook ()(require &#39;inline-string-rectangle)(global-set-key (kbd "C-x r t") &#39;inline-string-rectangle)(require &#39;mark-more-like-this)(global-set-key (kbd "C-<") &#39;mark-previous-like-this)(global-set-key (kbd "C->") &#39;mark-next-like-this)(global-set-key (kbd "C-*") &#39;mark-all-like-this)(require &#39;rename-sgml-tag)(define-key sgml-mode-map (kbd "C-c C-r") &#39;rename-sgml-tag))(defun ack-hook ()(autoload &#39;ack-and-a-half-same "ack-and-a-half" nil t)(autoload &#39;ack-and-a-half "ack-and-a-half" nil t)(autoload &#39;ack-and-a-half-find-file-same "ack-and-a-half" nil t)(autoload &#39;ack-and-a-half-find-file "ack-and-a-half" nil t);; Create shorter aliases(defalias &#39;ack &#39;ack-and-a-half)(defalias &#39;ack-same &#39;ack-and-a-half-same)(defalias &#39;ack-find-file &#39;ack-and-a-half-find-file)(defalias &#39;ack-find-file-same &#39;ack-and-a-half-find-file-same))(defun ess-hook ()(add-to-list &#39;ac-sources &#39;ac-source-R)(setq ess-use-auto-complete t))(defun workgroups-hook ()(require &#39;workgroups)(setq wg-prefix-key (kbd "C-c w"))(workgroups-mode 1)(setq wg-morph-on nil)(wg-load "~/.emacs.workgroups"))(defun js2-hook ()(setq js-indent-level 4indent-tabs-mode nil)(setq indent-line-function &#39;js-indent-line)(add-to-list &#39;auto-mode-alist &#39;("\\.js$" . js2-mode)))(defun slime-js-hook ()(add-hook &#39;js2-mode-hook(lambda ()(slime-js-minor-mode 1)))(add-hook &#39;css-mode-hook(lambda ()(define-key css-mode-map "\M-\C-x" &#39;slime-js-refresh-css)(define-key css-mode-map "\C-c\C-r" &#39;slime-js-embed-css))))(require &#39;package)
(setq package-archives (cons &#39;("tromey" . "http://tromey.com/elpa/") package-archives))
(package-initialize)(add-to-list &#39;load-path "~/.emacs.d/el-get/el-get")
(require &#39;el-get)(setq el-get-sources&#39;((:name color-theme-merbivore:type git:url "git://github.com/exceedhl/color-theme-merbivore.git":load "color-theme-merbivore.el")(:name ruby-mode :type elpa:load "ruby-mode.el":after (lambda () (ruby-mode-hook)))(:name inf-ruby :type elpa)(:name ruby-compilation :type elpa)(:name css-mode :type elpa :after (lambda () (css-mode-hook)))(:name textmate:type git:url "git://github.com/defunkt/textmate.el":load "textmate.el")(:name rhtml:type git:url "https://github.com/crazycode/rhtml.git":features rhtml-mode:after (lambda () (rhtml-mode-hook)))(:name yaml-mode :type git:url "http://github.com/yoshiki/yaml-mode.git":features yaml-mode:after (lambda () (yaml-mode-hook)));; (:name mmm-mode;; :features mmm-mode;; :after (lambda () (mmm-mode-hook)))(:name multi-web-mode:type git:url "https://github.com/fgallina/multi-web-mode.git":features multi-web-mode:after (lambda () (multi-web-mode-hook)))(:name smex :load "smex.el":after (lambda () (smex-hook)))(:name workgroups:url "https://github.com/tlh/workgroups.el.git":load "workgroups.el":after (lambda () (workgroups-hook)))(:name slime:url "https://github.com/antifuchs/slime.git":after (lambda () (slime-hook)))(:name ac-slime:type git:url "https://github.com/purcell/ac-slime.git":load "ac-slime.el":after (lambda () (add-hook &#39;slime-mode-hook &#39;set-up-slime-ac)(add-hook &#39;slime-repl-mode-hook &#39;set-up-slime-ac)))(:name slime-js:type git:url "https://github.com/swank-js/slime-js.git":load "slime-js.el":after (lambda () (slime-js-hook)))(:name paredit :type elpa:load "paredit.el":after (lambda () (paredit-hook)))(:name yasnippet :type git:url "https://github.com/capitaomorte/yasnippet.git":after (lambda () (yasnippet-hook)))(:name cucumber:type git:url "https://github.com/michaelklishin/cucumber.el.git":load "feature-mode.el":after (lambda () (cucumber-mode-hook)))(:name coffee-mode:after (lambda () (coffee-mode-hook)))(:name fastnav:type git:url "https://github.com/gleber/fastnav.el.git")(:name mark-multiple:type git:url "https://github.com/magnars/mark-multiple.el.git":after (lambda () (mark-multiple-hook)))(:name expand-region:type git:url "https://github.com/magnars/expand-region.el.git")(:name auto-complete:after (lambda () (ac-hook)))(:name clojure-mode:after (lambda () (clojure-hook)))(:name ack-and-a-half:type git:url "https://github.com/jhelwig/ack-and-a-half.git":after (lambda () (ack-hook)))(:name ess:after (lambda () (ess-hook)))(:name js2-mode:type git:load "js2-mode.el":url "https://github.com/mooz/js2-mode.git":after (lamba () (js2-hook)));; (:name auctex;; :build &#96;("./autogen.sh" "rm -rf /tmp/auctex" "mkdir /tmp/auctex" ,(concat "./configure --with-texmf-dir&#61;/tmp/auctex --with-lispdir&#61;&#96;pwd&#96; --with-emacs&#61;" el-get-emacs) "make");; :after (lambda () (auctex-hook)))(:name anything:load "anything-config.el")))
(setq my-packages (append &#39;(ido-hacks magit color-theme nxhtml coffee-mode ace-jump-mode) (mapcar &#39;el-get-source-name el-get-sources)))
(el-get &#39;sync my-packages);;; Muse
(require &#39;muse-init);;; Buffer switch
(global-set-key (kbd "C-x C-b") &#39;ibuffer)
(autoload &#39;ibuffer "ibuffer" "List buffers." t)(require &#39;ebs)
(ebs-initialize)
(global-set-key [(control tab)] &#39;ebs-switch-buffer)(require &#39;ido)
(ido-mode t)
(setq ido-enable-flex-matching t) ;; enable fuzzy matching;;; set recent-jump
(setq recent-jump-threshold 4)
(setq recent-jump-ring-length 10)
(global-set-key (kbd "s-P") &#39;recent-jump-backward)
(global-set-key (kbd "s-N") &#39;recent-jump-forward)
(require &#39;recent-jump)
(recent-jump-mode 1);;; number-window mode
(autoload &#39;window-number-meta-mode "window-number""A global minor mode that enables use of the M- prefix to select
windows, use &#96;window-number-mode&#39; to display the window numbers in
the mode-line."t)
(window-number-meta-mode 1)
(window-number-define-keys window-number-meta-mode-map "s-");;; set mic-paren
(require &#39;mic-paren)
(paren-activate) ;;; speedbar
;; (require &#39;sr-speedbar);;; peepopen
(require &#39;peepopen)
(textmate-mode)
(define-key *textmate-mode-map* (kbd "s-t") nil)
(setq ns-pop-up-frames nil);;; uniquify filename
(require &#39;uniquify)
(setq uniquify-buffer-name-style &#39;post-forward);;; set pending delete mode
(pending-delete-mode t);; show-paren-mode: subtle highlighting of matching parens (global-mode)
(show-paren-mode &#43;1)
(setq show-paren-style &#39;parenthesis);;; Global key bindings
(global-set-key (kbd "s-t") &#39;ido-switch-buffer)
(global-set-key (kbd "s-o") &#39;delete-other-windows)
(global-set-key (kbd "s-O") &#39;delete-window)
(global-set-key (kbd "") &#39;delete-char)
(global-set-key (kbd "s-d") &#39;kill-whole-line)
(global-set-key (kbd "s-p") &#39;backward-sexp)
(global-set-key (kbd "s-n") &#39;forward-sexp)
(global-set-key (kbd "M-p") &#39;backward-list)
(global-set-key (kbd "M-n") &#39;forward-list)
(global-set-key (kbd "M-u") &#39;backward-up-list)
(global-set-key (kbd "M-U") &#39;down-list)
(global-set-key (kbd "M-C-n") &#39;make-frame)
(global-set-key (kbd "") &#39;scroll-up-command)
(global-set-key (kbd "") &#39;scroll-down-command)
(global-set-key (kbd "C-c d e") &#39;kill-sexp)
(global-set-key (kbd "C-c d a") &#39;backward-kill-sexp)
(global-set-key (kbd "") &#39;end-of-buffer)
(global-set-key (kbd "") &#39;beginning-of-buffer)
(global-set-key (kbd "s-/") &#39;comment-region)
(global-set-key (kbd "s-?") &#39;uncomment-region)
(global-set-key (kbd "C-c f f") &#39;ack)
(global-set-key (kbd "C-c f o") &#39;occur)
(global-set-key (kbd "M-\\") &#39;just-one-space)
(global-set-key (kbd "M-|") &#39;delete-horizontal-space)
(global-set-key "\M-z" &#39;fastnav-zap-up-to-char-forward)
(global-set-key "\M-Z" &#39;fastnav-zap-up-to-char-backward)
(global-set-key "\M-m" &#39;fastnav-mark-to-char-forward)
(global-set-key "\M-M" &#39;fastnav-mark-to-char-backward)
(global-set-key (kbd "s-j") &#39;ace-jump-mode)
;; (global-set-key "\M-j" &#39;fastnav-jump-to-char-forward)
(global-set-key "\M-J" &#39;fastnav-jump-to-char-backward)
(global-set-key (kbd "s-r") &#39;repeat)
(global-set-key (kbd "s-w") &#39;er/expand-region)
(global-set-key (kbd "") &#39;delete-frame)
;; (global-set-key (kbd "s-w") &#39;)
;; (global-set-key (kbd "s-q") &#39;quit-window)
(global-set-key [f5] &#39;slime-js-reload);;; Org mode key bindings
(global-set-key "\C-cl" &#39;org-store-link)
(global-set-key "\C-cc" &#39;org-capture)
(global-set-key "\C-ca" &#39;org-agenda)
(global-set-key "\C-cb" &#39;org-iswitchb)
;; MobileOrg settings
;; Set to the location of your Org files on your local system
(setq org-directory "~/Desktop")
;; Set to the name of the file where new notes will be stored
(setq org-mobile-inbox-for-pull "~/Desktop/todo.org")
;; Set to /MobileOrg.
(setq org-mobile-directory "~/Dropbox/MobileOrg");;; open previous and next line
;; Behave like vi&#39;s o command
(defun open-next-line (arg)"Move to the next line and then opens a line.See also &#96;newline-and-indent&#39;."(interactive "p")(end-of-line)(open-line arg)(next-line 1)(when newline-and-indent(indent-according-to-mode)));; Behave like vi&#39;s O command
(defun open-previous-line (arg)"Open a new line before the current one. See also &#96;newline-and-indent&#39;."(interactive "p")(beginning-of-line)(open-line arg)(when newline-and-indent(indent-according-to-mode)));; Autoindent open-*-lines
(defvar newline-and-indent t"Modify the behavior of the open-*-line functions to cause them to autoindent.")(global-set-key (kbd "") &#39;open-next-line)
(global-set-key (kbd "") &#39;open-previous-line);;; move deleted file to trash bin
(setq delete-by-moving-to-trash t);; (setq cursor-type &#39;bar)
(put &#39;dired-find-alternate-file &#39;disabled nil);;; set shell mode
(defun shell-mode-hook ()(interactive)(setq sh-basic-offset 2sh-indentation 2))
(add-hook &#39;sh-mode-hook &#39;shell-mode-hook);;; bind .m to octave mode
(add-to-list &#39;auto-mode-alist &#39;("\\.m$" . octave-mode));;; set color theme
(setq color-theme-is-global nil)
(defun color-theme-undo ()(interactive)(color-theme-reset-faces)(color-theme-snapshot));; backup current color theme
(fset &#39;color-theme-snapshot (color-theme-make-snapshot));;; set chinese font
(defun set-my-font (frame)(set-fontset-font (frame-parameter frame &#39;font) &#39;han &#39;("STHeiTi" . "unicode-bmp")))(defun hide-menu-bar-line-in-console ()(if (display-graphic-p)(modify-frame-parameters frame &#39;((menu-bar-lines . 1)))(modify-frame-parameters frame &#39;((menu-bar-lines . 0)))))(require &#39;server)
(defun my-frame-config (frame)(if (server-running-p)(with-selected-frame frame(if (display-graphic-p)(progn(set-my-font frame)(color-theme-merbivore))(color-theme-undo))(blink-cursor-mode)(hide-menu-bar-line-in-console))))(my-frame-config (selected-frame))
(add-hook &#39;after-make-frame-functions &#39;my-frame-config);;; For standalone window mode
;; (color-theme-merbivore)
;; (set-my-font nil)

from&#xff1a;https://github.com/exceedhl/my-emacs/blob/master/.emacs#L6


转载于:https://my.oschina.net/freeblues/blog/103167


推荐阅读
  • 本文详细介绍了如何在Linux系统中搭建51单片机的开发与编程环境,重点讲解了使用Makefile进行项目管理的方法。首先,文章指导读者安装SDCC(Small Device C Compiler),这是一个专为小型设备设计的C语言编译器,适合用于51单片机的开发。随后,通过具体的实例演示了如何配置Makefile文件,以实现代码的自动化编译与链接过程,从而提高开发效率。此外,还提供了常见问题的解决方案及优化建议,帮助开发者快速上手并解决实际开发中可能遇到的技术难题。 ... [详细]
  • 计算 n 叉树中各节点子树的叶节点数量分析 ... [详细]
  • 分布式开源任务调度框架 TBSchedule 深度解析与应用实践
    本文深入解析了分布式开源任务调度框架 TBSchedule 的核心原理与应用场景,并通过实际案例详细介绍了其部署与使用方法。首先,从源码下载开始,详细阐述了 TBSchedule 的安装步骤和配置要点。接着,探讨了该框架在大规模分布式环境中的性能优化策略,以及如何通过灵活的任务调度机制提升系统效率。最后,结合具体实例,展示了 TBSchedule 在实际项目中的应用效果,为开发者提供了宝贵的实践经验。 ... [详细]
  • 在Java编程中,为了提高代码的可读性和执行效率,建议优先使用局部变量来存储方法的返回值,而不是多次调用同一个方法。这样不仅可以减少方法调用的开销,还能避免潜在的性能问题。此外,使用局部变量还可以增强代码的可维护性和调试便利性。 ... [详细]
  • 如何使用 net.sf.extjwnl.data.Word 类及其代码示例详解 ... [详细]
  • 本文深入探讨了RecyclerView的缓存与视图复用机制,详细解析了不同类型的缓存及其功能。首先,介绍了屏幕内ViewHolder的Scrap缓存,这是一种最轻量级的缓存方式,旨在提高滚动性能并减少不必要的视图创建。通过分析其设计原理,揭示了Scrap缓存为何能有效提升用户体验。此外,还讨论了其他类型的缓存机制,如RecycledViewPool和ViewCacheExtension,进一步优化了视图复用效率。 ... [详细]
  • PHP中元素的计量单位是什么? ... [详细]
  • jQuery Flot 数据可视化插件:高效绘制图表的专业工具
    jQuery Flot 是一款高效的数据可视化插件,专为绘制各种图表而设计。该工具支持丰富的图表类型和自定义选项,适用于多种应用场景。用户可以通过其官方网站获取示例代码和下载资源,以便快速上手和使用。 ... [详细]
  • BZOJ4240 Gym 102082G:贪心算法与树状数组的综合应用
    BZOJ4240 Gym 102082G 题目 "有趣的家庭菜园" 结合了贪心算法和树状数组的应用,旨在解决在有限时间和内存限制下高效处理复杂数据结构的问题。通过巧妙地运用贪心策略和树状数组,该题目能够在 10 秒的时间限制和 256MB 的内存限制内,有效处理大量输入数据,实现高性能的解决方案。提交次数为 756 次,成功解决次数为 349 次,体现了该题目的挑战性和实际应用价值。 ... [详细]
  • MySQL性能优化与调参指南【数据库管理】
    本文详细探讨了MySQL数据库的性能优化与参数调整技巧,旨在帮助数据库管理员和开发人员提升系统的运行效率。内容涵盖索引优化、查询优化、配置参数调整等方面,结合实际案例进行深入分析,提供实用的操作建议。此外,还介绍了常见的性能监控工具和方法,助力读者全面掌握MySQL性能优化的核心技能。 ... [详细]
  • DHCP三层交换机设置方式全局模式和接口模式设置方式和命令resetsave回车输入yreboot输入n输入y重启后就恢复默认设置了默认用户名密码adminAdmin@huawei ... [详细]
  • C#中实现高效UDP数据传输技术
    C#中实现高效UDP数据传输技术 ... [详细]
  • Node.js 教程第五讲:深入解析 EventEmitter(事件监听与发射机制)
    本文将深入探讨 Node.js 中的 EventEmitter 模块,详细介绍其在事件监听与发射机制中的应用。内容涵盖事件驱动的基本概念、如何在 Node.js 中注册和触发自定义事件,以及 EventEmitter 的核心 API 和使用方法。通过本教程,读者将能够全面理解并熟练运用 EventEmitter 进行高效的事件处理。 ... [详细]
  • 题目难度:★★☆☆☆ 类型:算法你是一名经验丰富的窃贼,计划对一条街道上的房屋进行盗窃。每栋房屋内都存放有一定数量的现金,但你的行动受到一个关键限制:相邻房屋安装了相互连接的报警系统,因此不能连续偷窃两间相邻的房屋。为了最大化收益,你需要设计一种高效的算法来确定最佳的盗窃方案。本文将通过 Python 代码实现这一问题的优化解决方案,并详细解析其背后的数学原理和算法思路。 ... [详细]
  • 在进行网络编程时,准确获取本地主机的IP地址是一项基本但重要的任务。Winsock作为20世纪90年代初由Microsoft与多家公司共同制定的Windows平台网络编程接口,为开发者提供了一套高效且易用的工具。通过Winsock,开发者可以轻松实现网络通信功能,并准确获取本地主机的IP地址,从而确保应用程序在网络环境中的稳定运行。此外,了解Winsock的工作原理及其API函数的使用方法,有助于提高开发效率和代码质量。 ... [详细]
author-avatar
shilohqiu_144
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有