关于编程学习的方面,请达人帮忙。万分感谢

我是一名大二的学生。因为在我们大二刚上的时候换了一名专业老师。所以对学习方面就有所怠慢了。上课开始玩游戏了。也不好好听课了。现在因为一些原因和女朋友约好以后一起去北京生活。并且今天知道她要报北京工大的研究生。所以决定发愤图强。。改过自新。。但是又不好意思去问那个新老师(他看我也不顺眼)

所以请教网上的达人。可以帮我琢磨一下好一点的学习计划、我因为大一的时候感兴趣所以学的还不错。大一大概是班里前五名。现在是后几名了。

嗯。我们学的是C#和SQL以及.NET。现在我掌握的是SQL的基本语法。C#的一部分。ADO的一部分。我们现在的进度。额。。他们别人现在是自己正在全面的做一个论坛。

所以有没有达人可以帮我想一下。我的理解能力不错。能利用的时间大概是下午4点后。早上7点前。拜托。。帮帮忙。。。
...额。主要就是能不能帮我列个计划?。。我这人做事情很是东一榔头。西一棒槌的。这次是打算好好努力的。。。。。计划最好能详细一点。用什么书。要看什么。掌握什么。。。。标准什么。。

◎字串运算子
String Operator Purpose
x Returns a string consisting of the string on the left of the operand, repeated the number of times of the right operand.
. Concatenates the two strings on both sides of the operator.
eq Returns True if the two operands are equivalent, False otherwise.
ne Returns True if the two operands are not equal, False otherwise.
le Returns True if the operand on the left is stringwise less than the operand on the right of the operator. Returns False otherwise.
lt Returns True if the operand on the left is stringwise less than or equal to the operand on the right of the operator. Returns False otherwise.
ge Returns True if the operand on the left is stringwise greater than or equal to the operand on the right of the operator. Returns False otherwise.
gt Returns True if the operand on the left is stringwise greater than the operand on the right of the operator. Returns False otherwise.
cmp Returns -1, 0, or 1 if the left operand is stringwise less than, equal to, or greater than the right operand.
, Evaluates the left operand, the evaluates the right operand. It returns the result of the right operand.
++ Increments the string by one alphabetic value.

◎数值运算子
Value Operator Purpose
+ Computes the additive value of the two operands.
- Computes the difference between the two operands.
* Computes the multiplication of the two operands.
/ Computes the division between the two operands.
% Computes the modulus(remainder) of the two operands.
= = Returns Ture if the two operands are equivalent, False otherwise.
!= Returns Ture if the two operands are not equal, False otherwise.
<= Returns Ture if the operand on the left is numerically less than or equal to the operand on the right of the operator. Returns False otherwise.
=> Returns Ture if the operand on the left is numerically greater than or equal to the operand on the right of the operator. Returns False otherwise.
< Returns Ture if the operand on the left is numerically less than the operand on the right of the operator. Returns False otherwise.
> Returns Ture if the operand on the left is numerically greater than the operand on the right of the operator. Returns False otherwise.
< = > Returns -1 if the left operand is less than the right, +1 if is it greater than, and 0(False) otherwise.
&& Performs a logical AND operation. If the left operand is True m then the right operator is not evaluated.
|| Performs a logical OR operation. If the left operand is True m then the right operator is not evaluated.
& Returns the valueof the two operators bitwise ANDed.
| Returns the valueof the two operators bitwise ORed.
^ Returns the valueof the two operators bitwise XORed.
++ Increment operator. Increments the variable's value by 1.
-- Decrement operator. Decrements the variable's value by 1.
** Computes the power of the left-hand value to the power of the rihght-hand value.
+= Adds the value of the right-hand operand to the value of the left-hand operand.
-+ Subtracts the value of the right-hand operand to the value of the left-hand operand.
*= Mlutiplies the value of the left-hand operand to the value of the right-hand operand.
>> Shifts the left operand right by the number of bits that is specified by the right operand.
<< Shifts the left operand left by the number of bits that is specified by the right operand.
~ Performs a 1s complement of the operator. This is a unary operator.

(b) Scalar Array:
纯量阵列,阵列内的每一个元素都是Scalar variable。宣告及使用方式如下:

# 纯量阵列以 @ 开头。
my @array;
my @array=qw(a b c d);

# qw 函数会将其后的每个元素用逗点隔开,效果就像下面这行。
my @array=("a","b","c","d");

# 当然你也可以一个个元素宣告,下面就是存取每一个元素的方法。
# 因为阵列中的每一个元素都是纯量变数,所以要以 $ 开头,
# 刚开始容易搞混,请注意。
$array[0]="a"; $array[1]="b"; $array[2]="c"; $array[3]="d";

# 使用for loop印出阵列内每个元素的值。
for($i=0; $i<=$#array; $i++) {
print "$array[$i]\n";
}

看到$#array这个奇怪的东东没? 这是Perl的一个特殊用法,代表这个阵列最后一个元素的注标。由於Perl不必事先宣告变数,也不必预先宣告阵列的大小,甚至可以随时增加新元素,那我们怎麼知道这个阵列到底有多大呢? 透过这个特殊变数我们可以得知这个这个阵列最后一个元素的注标,自然而然也就知道这个阵列究竟有多大了。另外Perl只定义了一维阵列的语法,二维以上只能用指标间接来达成。

(c) Hash Array(Associative Array):
杂凑阵列也叫做相关阵列,它和一般阵列没什麼不同,差别只是在它的索引值用的是字串,而非一般阵列所用的整数值,因此相关阵列不像一般阵列一样有次序的概念,它没有所谓的第一项资料这种说法。它就相当於把一堆变数组合成一个group,然后我们可以透过索引字串存取这个group每一个元素的值。相关阵列的宣告及使用方式如下:

# 相关阵列是以 % 符号开头的。
my %hash;

# => 这个符号是Perl5新增的,是为了相关阵列量身定做的,
# 因为索引和元素值都是纯量,若使用 => 这个符号,
# (索引=>元素值) 两两对应,就不容易发生失误。
my %hash=("i1"=>"aaa","i2"=>"bbb","i3"=>"ccc");

# 上面这行的效果和下面这行是一样的。
my %hash=("i1","aaa","i2","bbb","i3","ccc");

# 下面是存取每个元素的方法,注意是用大括号把索引括起来哦。
# 习惯上索引值用单引号、元素值用双引号括起来。
$hash{'i1'}="aaa"; $hash{'i2'}="bbb"; $hash{'i3'}="ccc";

# 下面是使用相关阵列的三个例子:
foreach $key (keys %hash) {
print "$hash{$key}\n";
}
foreach $value (values %hash)
while(($key,$value)=each %hash)

Perl有上述三个函数可对相关阵列做运算:keys函数可取出相关变数的索引值,组成一纯量阵列,注意这些由keys函数取出的索引值没有次序性;values函数可取出相关变数的元素值;each函数则会取出(索引、元素)对。使用者可视情况而用。

(d) References(Pointer):
Perl 5新增了参考指标的资料型态,使Perl和C一样可借由指标建立一些复杂的资料结构。普通程式是用不到指标这玩意的,下面也只是简单介绍一下,看不懂的人可不必深究。

⊙如何取得变数的位址?

$scalarRef=\$scalarVar;
$arrayRef=\@arrayVar;
$hashRef=\%hashVar;
$funcRef=\&funcName;

⊙如何使用指标?

print $$scalarRef;
print "@$arrayRef";
print $hashRef->{$key};
&$funcRef;

⊙Anonymous Array References:(二维阵列)

$arrayRef=[[1,2,3,4],a,b,[x,y,z],c];
print "$arrayRef->[0][0]\t$arrayRef->[2]\t$arrayRef->[3][2]\n";

⊙Anonymous Hash References:

$hashRef={a=>aa,b=>bb,c=>cc};
print "$hashRef->{a}\t$hashRef->{b}\t$hashRef->{c}\n";

(2) 控制叙述(Control Statements)

(a) Conditional Control Statements:
Perl的条件控制叙述和C语言很像,让使用者很快就能掌握它。不过Perl比C语言又另外多了些实用的语法,我用底线标出来,大家一看便知:

# Expression 就是条件叙述式,Perl和C一样没有定义布林资料型态(Boolean data type),
# 因此 0 是false、非0 是ture。另外要注意字串运算子和数值运算子要分清楚哦。
# Code Segment 就是用大括号括起来的一堆指令,也就是一个Block。
if (Expression) {Code Segment}
if (Expression) {Code Segment} else {Code Segment}
if (Expression) {Code Segment} elsif (Expression) {Code Segment} else {Code Segment}
# elsif 就是 else if

# 如果指令(statement)只有一项,我们可以使用倒装句法,看起来比较简洁。
statement if (Expression);
# unless 就是if not
statement unless (Expression);
例:
print "HELLO!\n" if ($name eq "friend");
$x-=10 if ($x == 100);

看吧! C 语言有的Perl大部分都有,学过 C 的人可以毫不费力的学会Perl。

(b) Loop Control Statements:
Perl的回圈控制叙述也和C语言很像,当然,照例Perl也另外多了些实用的语法:
# 注意:纯量变数前面要加个 $ 字号,这一点和C语言不一样哦。
for($i=0; $i<=10; $i++) {Code Segment}

# foreach 是承袭UNIX的shell script来的,
# 第一个引数是纯量变数,第二个引数要用括号括起来,里面是一个纯量阵列,
# 顾名思义它就是把阵列中的每个元素依序传给第一个引数,直到全部传完。
# 它和 for($i=0; $i<=$#array; $i++) 用法虽然不同,但目的都是要取出阵列的每个元素。
foreach $i (@array) {Code Segment}

# 其实在Perl中,for和foreach是可以混著用的,就看个的人习惯了。
# 下面这行就等於上面第一个叙述,不过简洁多了,大家可以试著用用看。
for $i (0..10) {Code Segment}

# while控制回圈和后置回圈。
while($i<=10) {Code Segment}
do {Code Segment} while(Expression);

# Perl也有和C语言的break和continue一样的指令,Perl叫它做 last 和 next (较口语化)。
# last是跳出现在所在的回圈,next则是跳过下面的指令直接执行下一次的回圈。
while(chomp($i=<STDIN>)) {
next if ($i == 5);
last unless ($i > 10);
}

Perl还有提供label(标记)的语法,也就是 goto 指令,不过有经验的programer并不喜欢用它,我也不建议大家使用,所以就此按下不讲。有兴趣的人请自行查阅。还有一点值得注意的是Perl没有提供像C语言一样的 switch 叙述,不过Perl的pattern match的功能非常强,所以我建议你直接用 if else 叙述来做就好了。

(3) 副程式(Subroutines)

(a) Syntax: sub NAME {Code}

(b) 呼叫副程式: &NAME(para1, para2,...)

(c) 参数传递: @_
Perl和C一样是采用Call by value的方式,不过因为Perl不用事先宣告变数,所以建立副程式的时候也不用宣告要传递什麼参数。当主程式在传递参数给副程式时,Perl会把括号括起来的参数按顺序放在一个特殊的全域变数 @_ 阵列中,然后副程式就可以随意使用阵列 @_ 里的参数,例如 $_[0] 是第一个参数, $_[1] 是第二个,或是用 my ($a1,$a2,$a3,...) = @_;来取出各个参数,当然 my @arg=@_; 或 my %arg=@_; 也是可以的。由於Perl的语法非常活泼,使得程式在维护时特别棘手,因此写注解成为一项很重要的工作。我建议你最好在每个副程式前面加上对这段副程式的描述,特别是需要传递的参数要注明清楚。

(d) Variable Localization:my or local
通常我们在程式中定义的变数都是全域变数,所以在副程式中若要把变数区域化则要加上 my 或 local 关键字,例如: my $x=3;,若副程式所用的变数名不小心和主程相同,Perl会以目前正在执行的副程式里的变数为优先。

(4) I/O和档案处理

(a) Syntax:
open(FILEHANDLE,"Expression");
close(FILEHANDLE);
这里的Expression是一个叙述加上档案名称,若Expression只有档案名称没有加上叙述,则预设是唯读。Expressions叙述如下:

Expression Effect
open(FH, "<filename") Opens filename for reading.
open(FH, "+<filename") Opens filename for both reading and writing.
open(FH, ">filename") Opens filename for writing.
open(FH, "+>filename") Opens filename for both reading and writing.
open(FH, ">>filename") Appends to filename.
open(FH, "command|") Runs the command and pipes its output to the filehandle.
open(FH, "command|") Pipes the output along the filehandle to the command.
open(FH, "-") Opens STDIN.
open(FH, ">-") Opens STDOUT.
open(FH, "<&=N") Where N is a number, this performs the equivalent of C's fdopen for reading.
open(FH, ">&=N") Where N is a number, this performs the equivalent of C's fdopen for writing.

例:
# 开启$filename这个档案,若开启失败则印出die后面的讯息,并结束程式。
open(FILE, $filename) || die "Can't open file $filename : $!\n";
# 下面是一个十分精简的写法,和 while($_=<FILE>){print "$_";} 是等效的。
print while(<FILE>);
# 档案开启后要记得随手关闭,这才是写程式的好习惯。
close(FILE);
# $!和$_都是Perl的特殊变数,下面会介绍的。

(b) Input:
Perl没有特别用来输入的函数,因为Perl在执行程式时,会自动开启标准输入装置,其filehandle定为STDIN,所以在Perl中要输入资料的方法就是使用<STDIN>:
# Perl不会自动去掉结尾的CR/LF,跟C语言不同,所以要用chomp函数帮你去掉它。
# 大家常常会忘记这个动作,导致结果跟你想的不一样,要特别注意一下。
$input=<STDIN>; chomp $input;
# 下面是较简洁的写法。
chomp($input=<STDIN>);

(c) Output: print "variables or 字串";
Perl也有printf()函数,语法和C语言一模一样,我就不多做介绍了。Perl另外有个print函数,比printf()更方便、更好用,包你爱不释手。 Output不外乎是输出到萤幕或档案,用例子来说明比较容易了解。
# 不用再指定变数的data type,这样不是比printf()方便多了吗?
print "Scalar value is $x\n";
# . 是字串加法的运算子,上下这两行是等效的。
print "Scalar value is " . $x . "\n";

# 输出到档案的方法。
print FILE "print $x to a file.";

# 下面是print的特殊用法,学自shell script的用法:
print<<XXX;

这招叫做 here document,XXX可以是你取的任何识别字,
在识别字之间的字都会按照你所写的样子输出,就像<pre>标签一样。
而当一行的开头是XXX你取的这个识别字时,才会停止输出。

XXX

Perl 也有和 C 一样以 "\" 开头的特殊字元:

\t tab
\n newline
\r return
\f form feed
\b backspace
\a alarm(bell)
\e escape
\033 octalchar
\x1b hex char
\c[ control char
\l lowercase next char
\u uppercase next char
\L lowercase till \E
\U uppercase till \E
\E end case modification
\Q quoteregexp metacharacters till \E

另外需要说明的是 Perl 融合了 unix shell script 的使用惯例,以双引号("")括起来的字串会先经过展开,但反斜线(\)后面的字元则不展开,当作一般字元看待。而以单引号('')括起来的字串完全不会展开,以反单引号(``)括起来的字串会把它当作命令列指令一样执行,等於system()一样。初学者常常会搞混,但习惯之后就会觉得不这样分清楚反而不行哩。举个例吧:

$x="ls -l";
print "$x"; # Output ls -l
print "\$x"; # Output $x
print '$x'; # Output $x
print `$x`; # Output files in this directory

(5) Regular Expressions
Regular Expression通常是用来寻找特定的字串样式(pattern),也就是所谓格式辨认(pattern-matching)的功能。它的运算子是『=~』和『!~』,可以把它念做match和not match。

Syntax: $string =~ /regular expression/expression modifier

例:$sentence =~ /Hello/
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-05-09
1、早6点最好能早起温书,俗话说温故而知新吗。
2、⑤觉起来复习,你不是说学的时C#和SQL吗?所以多买点这种类型的书啦。
3、晚自习有不懂问题尽量请教老师,不要怕,这也许会增加老师对你的好感。
自己安排的计划是最好的,只要你肯学。我简单做了一下你一天的学习计划,希望采纳。还有,我最恨别人说额这字。
第2个回答  2010-05-09
那就是三方面。

C# 基础的语法,语句结构,循环体之类的,可以看《C#程序设计》 机械工业出版社的

sql 建库建表,表之间的关系三阶范式,以及触发器,储存过程等等。
参见 《SQL技术与网络数据库开发详解》 清华大学出版社

ASP.NET 的基础知识,比如常用控件的使用方法 像数据显示常用的控件Gridview DataList 等等,连接数据库,XML,JS,等等
这个推荐你找找网上的教程,很多很多 买书不值得,每本书角度不同。

你要学大概就这三方面,重要的还是你要坚持。学习只能靠自己!本回答被网友采纳
第3个回答  2010-05-09
兄弟 买本书 高级一点 如高级编程 设计思想 设计模式 慢慢的 你就成为能手 高手 骨灰级高手 拥有美好的前途 稳定的收入 成功的一生
第4个回答  2010-05-09
我只学过C++,而且都是为了过二级,不过我三级也过了,呵呵,但是你学的是专业的,我并不是这个专业,所以不好意思了
相似回答
大家正在搜