由买买提看人间百态

topics

全部话题 - 话题: indentity
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
h*****a
发帖数: 1718
1
来自主题: Programming版 - python要把@当作矩阵乘法算符
我觉得python没有{}和end写起来挺舒服的。少写几个字符不是坏事,而且通过强制
indentation可读性确实增强了。
S*A
发帖数: 7142
2
来自主题: Programming版 - 14位在世的最好的程序员
C 语言 K & R 已经非常老了,gcc 有 K & R 的 option 但是现在的
C 早就换写法了,适应新的编译器。我所知道的唯一还用 K & R 的
项目是 vim。
linux kernel 的代码规范有自己的风格。
如果你跑 indent 程序,有个风格option 就叫 linux.
但是代码规范还是比较外在的,
一个烂代码,就算风格很规范,还是烂代码。
Linus 是写代码是超级厉害的,关键是优美,简洁和高效
同时兼顾。代码体现出的 taste 才是最难得得。
龙猫在这里说 Linus 代码不怎样,实在是无知得可笑。
C*******a
发帖数: 448
3
来自主题: Programming版 - 哪个大型应用系统用python写的啊?
应该看到python本身的优点,
如诸多人诟病的indentation和__private,
其实即是形式即内容的宗旨。
python和R都可视为shell。
S*A
发帖数: 7142
4
来自主题: Programming版 - Scala有一点不好
非常赞同!迂腐非常贴切。
我另外一个观察就是,人们比较容易理解符合
execution flow 的代码。汇编不好读其中一个原因
就是跳来跳去人脑为了理解程序需要记住很多中间
状态。人脑是比较擅长理解过程式的状态,先做个,
下一部做那个,然后这个就变成了那个。
所以结构化的 if else,用空格 indent 来标明程序
机构,就是让程序的代码的阅读结构更加接近
execution flow。帮助人们理解,这一块是干什么的。
人脑不擅长高度抽象的推演和。有些描述很通用很
抽象,例如 meta class 这种,很多人理解就很费力。
人们通常需要看到这个抽象的东西如何实例话才能
理解。
Haskell 的整个就是代码非常不符合 execution flow。
这个给理解和调试都带来困难。Lisp 这类的语言出现
比 C 什么的早很多,甚至有硬件直接支持 Lisp 的。
但是一直推广比不上 C 这样的语言。这是其中一个
原因,这类 FP 比过程式语言难写难维护。
D***n
发帖数: 6804
5
来自主题: Programming版 - 请不要盲目崇拜FP语言
那把n行代码同时往左移动n个空格的快捷键是什么?
把某个程序块自动Indent 2次的快捷键是什么?
这些常见的问题还是1-2秒的事情,你的IDE快捷键呢?
z****e
发帖数: 54598
6
来自主题: Programming版 - 请不要盲目崇拜FP语言
选择,然后tab不就行了
自动indent 2你按照你的习惯调整一下参数就好了
你说的这些vi命令你找个菜鸟问问
问问他知道不知道
顺便,没看到有人说eclipse有vim plugin么?
z****e
发帖数: 54598
7
来自主题: Programming版 - 请不要盲目崇拜FP语言
不是报在ide上那就是ide的问题
eclipse从几百个文件中grep出你需要的字串用最简单的查找功能就可以实现
你就是没用过,别吹了
你没事移动五个空格干什么?
你非要这么做,把indent调整成5就好了
不过一般人都是4
g*********9
发帖数: 1285
8
看过kafka的原代码,那叫一痛苦,indent居然只有两个空格,真不像专业人士写的。
代码质量很一般,也就搞big data的用用还行,丢点数据无所谓,和tibco EMS的可靠
性没法比。
big data里可能hadoop核心代码质量最高。
z****e
发帖数: 54598
9
scala推荐的indent就是两个空格
g*********e
发帖数: 14401
10

linkedin use 2 space indent, i think google fb all do.
p*u
发帖数: 2454
11
u can always format local files by uself, indentation or whatever.
d****i
发帖数: 4809
12
来自主题: Programming版 - 我觉得学C的话还是K&R最好
经典的葵花宝典。原汁原味,大牛写的。谭的东西太中国化了(当然不能否认他的书的
普及作用)。学了K&R,才知道为什么会有K&R style的缩进格式,比如C, C++, Java,
JavaScript中用
if (condition == true) {
a = 1;
} else {
a = 0;
}
This is called K&R indentation style, which is used predominantly in C
family languages with curly bracket used such as C, C++, Java, JavaScript,
Objective-C, Perl, PHP, etc. (C# being an exception due to MS's exception to
the rest of the world)
另外,学了K&R这本书,才对UNIX系统和C在Unix上的编译过程有了初步的认识。
k****i
发帖数: 101
13
来自主题: Programming版 - python自动缩进出错 快疯了
请教一个简单问题,我用mac自带的python的idle新建了一个file,输代码时候每次换
行就自动跳到下一行的缩进7个table位置。我查了idle的indentation width还是4,并
没有改变。google和百度搜半天没找到答案
s*******k
发帖数: 71
14
来自主题: Software版 - Re: how to beautify a text file on unix?

Depends on how you define "beautify"... if you have some C source code and
want to add in syntax color printing, font change, greyscale, or if you have
a plain text file which you want to print to a PS file, then you can try
enscript, mpage, a2ps, indent, txt2ps, psbook (the psutils package), on
windows you can try prettyprint, fineprint, printfile, etc. If you want your
text file to somehow have long legs, dancing eyelashes, big eyes plus
other certain desirable features, try dumping your comp
r****y
发帖数: 26819
15
来自主题: Software版 - 大家推荐个webpage editor吧
html编辑器这个话题啊,有不少说道。
首先,要支持color syntax吧。这是最起码的。
其次,对程序员方便的功能,indent啊。
另外,我喜欢source formatting。尤其是javascript的formatting。
最后,我喜欢folding。
要这么说起来,还是visual studio 2008最好。
z*****n
发帖数: 7639
16
I got one problem in verbatim environment: the table indents cannot be d
isplayed and all lines starts from the
beginning of left inside \verbatim.
Another problem is that both verbatim and listings cannot
automatically wrap the too-long lines, thus always make the output messy
.
T*******n
发帖数: 493
17

Do you mean "tab stops", i.e., what is usually associated with eight spaces?
In (La)TeX the ASCII TAB character is treated like a regular space, so it
is not expanded. You should take a look at using the fancyvrb package
http://www.ctan.org/tex-archive/macros/latex/contrib/fancyvrb/
and also read pages 160-161 in "The LaTeX Companion" 2nd edition.
You could put the verbatim environment within a quote environment to
have the verbatim text indented.
None of the verbatim environments will wrap li
l***r
发帖数: 7
18
like the following:
line 1
line 2
thanks
T*******n
发帖数: 493
19
If you only want to do this for a single paragraph, you can try
the "quote" or "quotation" (the latter is better for multiple paragraphs).
i*i
发帖数: 918
20
{\leftskip 1in
your
paragraphs
}
T*******n
发帖数: 493
21
来自主题: TeX版 - About text width for one page

Try the minipage environment (you can optionally specify the
height), followed by a \clearpage if needed.
Try either minipage or \parbox, or define your own environment
using something like the following to make the special paragraph
indented 0.5 inch on both left and right sides (negative length will
make the paragraph wider than normal text width):
\newenvironment{specialpar}%
{\list{}{\setlength{\leftmargin}{0.5in}\setlength{\rightmargin}{0.5in}}\item
}%
{\endlist}
\begin{specialpar}
tex
z*****n
发帖数: 7639
22
来自主题: TeX版 - A question
How to make the indent of a line of text after
linebreak(\\) different from the normal setting?
I want this:
hello\\world!
to be:
hello
world!
if the spaces before the second line can be
replaced by, for example dots, would be even better.
thx
m******e
发帖数: 212
23
来自主题: TeX版 - 怎么调节item的indentation?
有个enumitem package可以用,但是beamer似乎有冲突。
有没有办法自己加入一些语句来实现?多谢!
m******e
发帖数: 212
24
来自主题: TeX版 - 怎么调节item的indentation?
用\setlength{\leftmargini}{0.5em} 好像可以
g*********r
发帖数: 124
25
可以试试 titletoc 宏包
t****y
发帖数: 361
q**j
发帖数: 10612
27
来自主题: TeX版 - 请问如何调整段落格式。
我想搞成每一段都顶头开始,然后每个段落之间空一行。
(by default,第一段顶头开始,以后每段indent,然后不空行。)
请问怎么搞?多谢。
X*****r
发帖数: 2521
28
MATLAB里面好像是control + i
叫做smart indent
winedt有吗?
或者别的editor软件有这个功能吗?
每次都写的乱糟糟的,要是能自动缩进就清楚多了
I***i
发帖数: 14557
29
If you don't want any indent for ALL the paragraphs, then add the following
in the preamble
\setlength{\parindent}{0pt}
w***a
发帖数: 432
30
\usepackage{indentfirst}
t***n
发帖数: 67
31
use (c-set-offset 'substatement-open 0)
and (setq c-basic-offset 4) if you want four space indent.
G**T
发帖数: 388
32
thx.
l******t
发帖数: 8
33
If you only want to beautify one file,
you can use emacs to help you.
select all
ESC
Ctrl+\
bz
发帖数: 1770
34
user expand or indent when you think you feel it is the right time to do it.
c**t
发帖数: 2744
35
来自主题: Windows版 - [转载] 没有auto indent 了?
UltraEdit; PsPad; TextPad.... tons of sw
b*****i
发帖数: 491
36
xslt code
=========
http://www.w3.org/1999/XSL/Transform">











阅读全帖
b*****i
发帖数: 491
37
xslt code
=========
http://www.w3.org/1999/XSL/Transform">











阅读全帖
p****p
发帖数: 3360
38
If you still have EndNote format (EndNote fields etc are still there) in the
Word file, you should be able to indent after the ref numbers. I can do it
with no problems. So I don't know how to help you now. :-(
K****n
发帖数: 5970
39
NB!
写code要注意indention
找对象要叫对名字
其实你github那道题的readme.rm,英语也可以稍微改改
你看除了我都没人给你挑毛病了,我看我们都要低调了
为了面试生统,这里已经套出了个现成的题 -- implement linear regression,我
们已经把各种link都贴出来了,不如你来看看,我之前写的答案到底对不对。顺着这个
思路,再多推两道题:用gradient method再implement linear regression;用
gradient method 把logistic regression也implement一遍?
我们程序怨实在是太没有credit了,我要从这个thread move on了。
这个之前说的threading啊,除了python,.net和java之类的都是可以用好多核的,
multithreading还是比multiprocessing有好处的,比如计算那20000个mean,如果能分
享在memory里,就比multiprocess更快一点儿点儿。
祝面试成功!
大哥大姐过年好!
G***G
发帖数: 16778
40
来自主题: Biology版 - python为何要用嵌入来表示循环
other language used bracket to define the beginning and the ending of
a loop.
why does python prefer indent?
is this an advance or fault?
i**********a
发帖数: 1402
41
来自主题: Biology版 - python为何要用嵌入来表示循环
我觉得Indentation比较简洁,看见一堆大括号就头疼。有时候不对齐根本看不清。
G***G
发帖数: 16778
42
这个indent应该很容易改正。为何python不改成大括号呢?
每次,我要调试循环体,都很不方便。
另外,书写程序时,也不敢分块。怕造成循环冲突。
其他语言,可以分块,一块一块的。快与快之间,用几个空白行就方便阅读了。

基本
K**R
发帖数: 193
43
你用visual studio 2015 community 版本 加个package 没有indent
s********n
发帖数: 235
44
来自主题: Chemistry版 - Paper help! THanks!
Title: Harder than Diamond: Superior Indentation Strength of Wurtzite BN and
Lonsdaleite
Author(s): Pan, ZC; Sun, H; Zhang, Y, et al.
Source: PHYSICAL REVIEW LETTERS Volume: 102 Issue: 5 Article Number:
055503 Published: 2009
many thanks!
x********[email protected]
p******y
发帖数: 496
45
来自主题: Chemistry版 - AFM大概多少钱?
比如parksystem的XE100或者veeoco的multimode,加上能测电阻电流分布和nano
indentation的option
请教各位大致的价格范围,$100k? $200k? $300k?
谢谢!
j**u
发帖数: 6059
46

MATLAB editor里面有非常完善的功能,你选择菜单里面的Text,就有increase/
decrease
indent,也可以选择大段代码后用快捷键一起操作。其实我对MATLAB的编辑器是很喜欢
的。
b*********h
发帖数: 46
47
来自主题: Computation版 - 只会用matlab,该怎么办?
嘻嘻,俺的matlab code也挺整齐好看的。。。indent,换行,逗号,分号啥的都对齐了
想起来原来上班的地方,一个多年编程的老中科学家,学了几天matlab,感慨万千的对
俺说,matlab和C的最大区别就是,C的index从0开始,matlab从1开始。。。后来才知道
他研究的是fft。。。
lp
发帖数: 22
48
来自主题: Economics版 - Senseless in SeattleII (NYTIMES)
It doesn't work, either. I hate technology. Oh, no, it seems to work, but
from the posting interface, it didn't. No, maybe it still doesn't.
Anyway, I have tried different indentations. Let me submit myself to the
fate, then.



December 8, 1999
FOREIGN AFFAIRS / By THOMAS L. FRIEDMAN
Senseless in Seattle II
Related Ar
a********d
发帖数: 9
49
I need to understand some basics regarding how the optical discs (DVD, CD)
work. For examples, what is an S-curve exactly? When one says "OPU pick up
unit receives reflected optical signals", where exactly do the reflected
signal come from, the coated layer of the indentation "pits", or the
protective layer behind the coat of the data layer? What about multi-layer
discs? What does bit rate mean in the context of optical disc? Thanks!
w*****r
发帖数: 348
50
来自主题: EE版 - two latex questions
I have two latex questions hoping someone can help:
1. Is there anyway to make blank space right after "\\", I have tried \
hspace and \indent, none of them works.
2. For the reference, the index of ninth reference is not aligned to the
first eight, is there anyway to fix this?
The class file I have used is "acm_proc_article-sp.cls"
Thanks a lot in advance
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)