customization

Customize UISearchDisplayController

给你一囗甜甜゛ 提交于 2019-12-03 03:42:01
alt text http://img210.imageshack.us/img210/5992/searchdisplaycontroller.png Are the following objects customizable? 1. UISearchBar Scope Buttons (UISegmentedController) 2. UIResultsTableView 3. Keyboard (at least so it's colored black) alt text http://img527.imageshack.us/img527/9775/searchdisplaycontrollerz.png I was able to change the segmented control by a sort-of hack code: - (void)searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller { for (UIView *subview in self.view.subviews) { for (UIView *subview2 in subview.subviews) { if ([subview2 isKindOfClass:

How do I customize text color in IPython?

自闭症网瘾萝莉.ら 提交于 2019-12-03 01:37:24
I'd like to customize the color of text in IPython, but am not sure how to do it. I know that in Python, I can do this by ending sys.ps1 and sys.ps2 with an ANSI color code such as sys.ps1=">>> \001\033[0m\033[34m\002" But the corresponding approach, using PromptManager.in_template , does not work for IPython. For example c = get_config() c.PromptManager.in_template = 'In [{count}] : {color.Blue}' has no effect on the color of text after the prompt. Is there a way to change the color of text in IPython? The prompt explicitly sets the color of input to colors.in_normal . If you want to change

How to custom display prompt in KornShell to show hostname and current directory?

纵饮孤独 提交于 2019-12-02 23:46:00
I am using KornShell (ksh) on Solaris and currently my PS1 env var is: PS1="${HOSTNAME}:\${PWD} \$ " And the prompt displays: hostname:/full/path/to/current/directory $ However, I would like it to display: hostname:directory $ In other words, how can I display just the hostname and the name of the current directory, i.e. tmp or ~ or public_html etc etc? From reading the ksh man page you want PS1="${HOSTNAME}:\${PWD##*/} \$ " Tested on default ksh on SunOS 5.8 Okay, a little old and a little late, but this is what I use in Kornshell: PS1='$(print -n "`logname`@`hostname`:";if [[ "${PWD#$HOME}"

How do you extend article document class in LaTeX?

ぃ、小莉子 提交于 2019-12-02 23:12:29
I don't really need a lot of changes to the default article document class. All I want is: redefine page margins (I want them to be the same on all pages, but different from the default values); use title page; add more elements on the title page ( title , author and date is not enough for me, I want company and company logo to be on the title page as well); change styles of the sections , subsections and subsubsections (I don't want the numbers to be shown, otherwise - they're good). Perhaps, there are some packages that could be helpful in this case? There are a number of packages that can

Bash: call script with customized keyboard shortcuts?

和自甴很熟 提交于 2019-12-02 21:27:33
Lets say I have a script, " myscript.sh ", with contents being simply echo $PWD . I'd like to bind somehow this script to a key combo in bash ( gnome-terminal ) - so that when I press this key combination, the output of " myscript.sh " is inserted ("pasted") at the cursor position in the terminal. Apparently, bash history and line manipulation is handled by readline - and the references I got for bash keyboard shortcuts, do reference readline : bash keyboard shortcuts Bash Reference Manual: Bindable Readline Commands I've also seen in Bash Reference Manual: Readline Init File Syntax that the

Modifying Window Button Colors in Mac OS X

最后都变了- 提交于 2019-12-02 21:07:40
How can I modify the red/yellow/green window buttons for close/minimize/zoom in Mac OS X? There must be an editable resource or plist somewhere. Here are the buttons I'm talking about: For red/green colorblind individuals, those colors can be maddening. I wish they chose the actual bluish shade of green used in a traffic light instead of the puke grass green. That grassy green is indeterminable from the red. Changing the theme to graphite is a poor alternative, so any other method is much preferred. Okay, after a long and seemingly endless research cycle, I've located where the window buttons

How do I turn on text wrapping by default in VS Code

╄→гoц情女王★ 提交于 2019-12-02 21:00:14
Usually when I use VS Code, very first thing I do on new document is command: "Toggle Word Wrap" or Alt + Z . I tried looking into User Settings, but I didn't find any relevant entries. Is there some way to have text wrapping 'on' for every document by default? Katherine The setting is now "editor.wordWrap": "on" which I set to "on" (the default is "off") and that activates word wrap on all my documents in Visual Studio Code. See the release notes about Word Wrap changes for more info. Have a look at the setting editor.wrappingColumn (see the docs for more information) Update 2017-04-06:

Customize Applescript app icon

送分小仙女□ 提交于 2019-12-02 20:56:00
I have created my AppleScript , tested it, saved it as an .app and it works. Now, how do I set a custom icon for it? I have done a bit of googling and tried a few different things but cannot get it to work. The app is mainly for me and maybe some people I know to make workflows easier so having a nice little icon makes a huge difference. Can anyone help with this please? Basically you need an .icns icon file. Open your application with right-click > Show Package Contents Navigate to Contents > Resources Delete applet.icns Drag the custom icon file into the Resources folder Rename the icon file

MATLAB Environment Tweaks [closed]

随声附和 提交于 2019-12-02 20:47:14
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . How have you tweaked the MATLAB environment to better suit your needs? One tweak per answer. I run "format compact" to remove all those frustrating blank lines spacing out my output. Oh so simple, but makes it so much nicer to me. I use a function idetitle() that can change the window title of the Matlab GUI itself. Useful in a development environment where I'm running several Matlab

Rails: creating a custom data type / creating a shorthand

霸气de小男生 提交于 2019-12-02 20:34:13
I am wondering how I could create a custom data type to use within the rake migration file. Example: if you would be creating a model, inside the migration file you can add columns. It could look like this: def self.up create_table :products do |t| t.column :name, :string t.timestamps end end I would like to know how to create something like this: t.column :name, :my_custom_data_type The reason for this to create for example a "currency" type, which is nothing more than a decimal with a precision of 8 and a scale of 2. Since I use only MySQL, the solution for this database is sufficient enough