苏州培训网 > 苏州JAVA培训机构 > 苏州其然软件开发培训
首页 培训网 最新资讯 热门问答

苏州其然软件开发培训

13013833891 免费试听

您当前的位置: 苏州IT认证培训 > 苏州JAVA培训 > 张家港java开发培训学习班

张家港java开发培训学习班_JAVA培训

¥详询

班制:周末班

苏州其然软件开发
上课(咨询)地址:苏州市昆山市震川西路111号名仕大厦
报名咨询 预约试听
课程介绍
张家港java开发培训学习班
其然IT 教育环境

张家港java开发培训学习班

张家港java开发培训学习班

java入门要注意什么

张家港java开发培训学习班

学习java就像是一个种花的过程,不断地为其施肥浇水,它才会茁壮成长。 而我们学习java,就要不断的充实自己、提升自己,才能获得更多机会。很多开始学习java编程的小白,经常就会被概念、定义什么的搞糊涂。当分类 、对象、接口、构造函数等等各种专业名词出现的时候,你一定是脑子里好像一片空白,根本就搞不懂这些字眼的意思和关系,而且,这种情况下,很 容易导致你丧失自信心,开始逃避、拒绝,这些小白经常遇到的情况在我刚接触java的时候也遇见了,但是好在我足够幸运,遇见了诚筑说。我现在已 经是公司的项目经理了,今天,我为大家来总结了一些经验和建议,希望能够帮助到大家。

一点:熟练基本的j2seAPI

除去java语言本身的语法之外呢,要懂得并且熟练j2seAPI的API也是非常有 必要的,在这里,就建议大家首先去掌握字符串的处理、异常的处理、容器、输入输出、线程等,这些相对来说较为重要的。还有就是API的内容是非 常庞大的,关于API,一定要懂得查询API的文件说明,在了解了其作用用途或者目的才能够进行相对于的程序。

二点:稳固java的语法基础

学习java一定要学会使用java的程序语言,用来编写程序,但是学习程序语 言就要熟悉语法是怎么使用的。程序语言其实也是一种语言,不过跟人类的语言不同,这种语言是要和计算机沟通交流,那怎么做才能熟悉这种语言呢 ,我给出的建议是多看别人写的程序,了解人家是怎么用java来解决问题的。然后再找类似的程序去练习了,这样就能够从实际操作中检验自己是否真 的知道该怎么去解决问题了。

三点:加入贴吧论坛多参与讨论

根据我当时的经验,在大家学习的过程中,如果有人可以参与话题,共同讨 论的话,会加快你学习的速度。所以大家可以和我一样,找一个技术讨论的地方,贴吧啊,论坛啊都可以,在这里进行讨论,毕竟大家有着共同的目标 和理想,有着共同的话题可聊,这样的话,又大大节省了学习的时间。

学完基本的java语法呢,现在就该用java来进行实际的编程了,假如你需要 编写窗口程序,那就学Swing窗口设计;假如你要编写数据库什么的,那就学JDBC等等。

JavaWeb开发

张家港java开发培训学习班

JavaWeb开发

  • 01HTML5与CSS3

    • 1.B/S架构

    • 2.HTML基本使用

    • 3.HTML DOM

    • 4.CSS选择器

    • 5.常用样式

    • 6.盒子模型与布局

    • 7.HTML5新特性

    • 8.CSS3新特性

  • 02JavaScript

    • 1.JavaScript基本语法

    • 2.JavaScript流程控制

    • 3.数组、函数、对象的使用

    • 4.JavaScript事件绑定/触发

    • 5.JavaScript事件冒泡

    • 6.JavaScript嵌入方式

    • 7.JavaScript DOM操作

    • 8.DOM API

  • 03jQuery

    • 1.jQuery快速入门

    • 2.jQuery语法详解

    • 3.jQuery核心函数

    • 4.jQuery对象/JavaScript对象

    • 5.jQuery选择器

    • 6.jQuery 文档处理

    • 7.jQuery事件

    • 8.jQuery动画效果

  • 04AJAX&JSON

    • 1.AJAX技术衍生

    • 2.XMLHttpRequest使用

    • 3.同步请求&异步请求

    • 4.JSON语法

    • 5.Java JSON转换

    • 6.JavaScript JSON转换

    • 7.jQuery 基本AJAX方法

    • 8.底层$.ajax使用

  • 05XML

    • 1.XML用途

    • 2.XML文档结构

    • 3.XML基本语法

    • 4.DOM&SAX解析体系

    • 5.DOM4j节点查询

    • 6.DOM4j文档操作

    • 7.xPath语法

    • 8.xPath快速查询

  • 06bootstrap

    • 1.bootstrap快速使用

    • 2.栅格系统

    • 3.表单、表格、按钮、图片

    • 4.下拉菜单

    • 5.按钮组使用

    • 6.导航条

    • 7.分页、进度条

  • 07Web服务器基础

    • 1.HTTP协议

    • 2.HttpWatch

    • 3.Tomcat服务器搭建

    • 4.Tomcat目录结构解析

    • 5.Tomcat端口配置

    • 6.Tomcat启动&停止

    • 7.Tomcat&Eclipse整合

    • 8.Eclipse配置优化

  • 08Servlet

    • 1.Servlet体系

    • 2.Servlet生命周期

    • 3.ServletConfig&ServletContext

    • 4.请求&响应

    • 5.重定向&转发

    • 6.中文乱码解决方案

    • 7.项目路径问题

  • 09JSP

    • 1.JSP语法

    • 2.JSP原理

    • 3.JSP脚本片段&表达式

    • 4.JSP声明&指令

    • 5.JSP九大隐含对象

    • 6.域对象使用

  • 10JSTL

    • 1.JSTL简介

    • 2.JSTL-核心标签库

    • 3.JSTL-函数标签库

    • 4.JSTL-fmt标签库

    • 5.自定义标签库使用

    • 6.自定义标签库原理

  • 11EL

    • 1.EL表达式简介

    • 2.EL使用

    • 3.EL取值原理

    • 4.EL的11大隐含对象

    • 5.EL2.2与3.0规范

    • 6.EL逻辑运算

    • 7.函数库深入

  • 12Cookie&Session

    • 1.Cookie机制

    • 2.Cookie创建&使用

    • 3.Session原理

    • 4.Session失效

    • 5.Url重写

    • 6.Session活化&钝化

    • 7.Token令牌应用

  • 13Filter&Listener

    • 1.Filter原理

    • 2.Filter声明周期

    • 3.Filter链

    • 4.Filter登录验证

    • 5.Filter事务控制

    • 6.Listener原理

    • 7.八大监听器使用

    • 8.Listener监听在线用户

  • 14国际化

    • 1.国际化原理

    • 2.ResourceBundle&Locale

    • 3.国际化资源文件

    • 4.日期/数字/货币国际化

    • 5.页面动态中英文切换

    • 6.页面点击链接中英文切换

    • 7.fmt标签库的使用

  • 15文件上传

    • 1.文件上传原理

    • 2.commons-io&commons-fileupload

    • 3.文件上传参数控制

    • 4.文件上传路径浏览器兼容性解决

    • 5.文件**原理

    • 6.文件**响应头

    • 7.文件**中文乱码&浏览器兼容性

Android系统Recovery工作原理3-- 升级包的制作


>

 ㈡ 下面我们分析ota_from_target_files这个python脚本是怎样生成**终zip包的。先讲这个脚本的代码贴出来如下:

import sys      if sys.hexversion 0x02040000:     PRint >> sys.stderr, "Python 2.4 or newer is required."     sys.exit(1)      import copy   import errno   import os   import re   import sha   import subprocess   import tempfile   import time   import zipfile      import common   import edify_generator      OPTIONS common.OPTIONS   OPTIONS.package_key "build/target/product/security/testkey"   OPTIONS.incremental_source None   OPTIONS.require_verbatim set()   OPTIONS.prohibit_verbatim set(("system/build.prop",))   OPTIONS.patch_threshold 0.95   OPTIONS.wipe_user_data False   OPTIONS.omit_prereq False   OPTIONS.extra_script None   OPTIONS.worker_threads      def MostPopularKey(d, default):     """Given dict, return the key corresponding to the largest    value.  Returns  default  if the dict is empty."""     [(v, k) for (k, v) in d.iteritems()]     if not x: return default     x.sort()     return x[-1][1]         def IsSymlink(info):     """Return true if the zipfile.ZipInfo object passed in represents    symlink."""     return (info.external_attr >> 16) == 0120777         class Item:     """Items represent the metadata (user, group, mode) of files and    directories in the system image."""     ITEMS {}     def __init__(self, name, dir=False):       self.name name       self.uid None       self.gid None       self.mode None       self.dir dir          if name:         self.parent Item.Get(os.path.dirname(name), dir=True)         self.parent.children.append(self)       else:         self.parent None       if dir:         self.children []        def Dump(self, indent=0):       if self.uid is not None:         print "%s%s %d %d %o" ("  "*indent, self.name, self.uid, self.gid, self.mode)       else:         print "%s%s %s %s %s" ("  "*indent, self.name, self.uid, self.gid, self.mode)       if self.dir:         print "%s%s" ("  "*indent, self.descendants)         print "%s%s" ("  "*indent, self.best_subtree)         for in self.children:           i.Dump(indent=indent 1)       @classmethod     def Get(cls, name, dir=False):       if name not in cls.ITEMS:         cls.ITEMS[name] Item(name, dir=dir)       return cls.ITEMS[name]       @classmethod     def GetMetadata(cls, input_zip):          try:         See if the target_files contains record of what the uid,         gid, and mode is supposed to be.         output input_zip.read("META/filesystem_config.txt")       except KeyError:         Run the external  fs_config  program to determine the desired         uid, gid, and mode for every Item object.  Note this uses the         one in the client now, which might not be the same as the one         used when this target_files was built.         common.Run(["fs_config"], stdin=subprocess.PIPE,                        stdout=subprocess.PIPE, stderr=subprocess.PIPE)         suffix False: "", True: "/"         input "".join(["%s%s\n" (i.name, suffix[i.dir])                          for in cls.ITEMS.itervalues() if i.name])         output, error p.communicate(input)         assert not error          for line in output.split("\n"):         if not line: continue         name, uid, gid, mode line.split()         cls.ITEMS.get(name, None)         if is not None:           i.uid int(uid)           i.gid int(gid)           i.mode int(mode, 8)           if i.dir:             i.children.sort(key=lambda i: i.name)          set metadata for the files generated by this script.       cls.ITEMS.get("system/recovery-from-boot.p", None)       if i: i.uid, i.gid, i.mode 0, 0, 0644       cls.ITEMS.get("system/etc/install-recovery.sh", None)       if i: i.uid, i.gid, i.mode 0, 0, 0544        def CountChildMetadata(self):       """Count up the (uid, gid, mode) tuples for all children and      determine the best strategy for using set_perm_recursive and      set_perm to correctly chown/chmod all the files to their desired      values.  Recursively calls itself for all descendants.        Returns dict of {(uid, gid, dmode, fmode): count} counting up      all descendants of this node.  (dmode or fmode may be None.)  Also      sets the best_subtree of each directory Item to the (uid, gid,      dmode, fmode) tuple that will match the most descendants of that      Item.      """          assert self.dir       self.descendants {(self.uid, self.gid, self.mode, None): 1}       for in self.children:         if i.dir:           for k, in i.CountChildMetadata().iteritems():             d[k] d.get(k, 0)           else:           (i.uid, i.gid, None, i.mode)           d[k] d.get(k, 0)            Find the (uid, gid, dmode, fmode) tuple that matches the most       descendants.          First, find the (uid, gid) pair that matches the most       descendants.       ug {}       for (uid, gid, _, _), count in d.iteritems():         ug[(uid, gid)] ug.get((uid, gid), 0)   count       ug MostPopularKey(ug, (0, 0))          Now find the dmode and fmode that match the most descendants       with that (uid, gid), and choose those.       best_dmode (0, 0755)       best_fmode (0, 0644)       for k, count in d.iteritems():         if k[:2] != ug: continue         if k[2] is not None and count >= best_dmode[0]: best_dmode (count, k[2])         if k[3] is not None and count >= best_fmode[0]: best_fmode (count, k[3])       self.best_subtree ug   (best_dmode[1], best_fmode[1])          return        def SetPermissions(self, script):       """Append set_perm/set_perm_recursive commands to  script  to      set all permissions, users, and groups for the tree of files      rooted at  self ."""          self.CountChildMetadata()          def recurse(item, current):         current is the (uid, gid, dmode, fmode) tuple that the current         item (and all its children) have already been set to.  We only         need to issue set_perm/set_perm_recursive commands if we re         supposed to be something different.         if item.dir:           if current != item.best_subtree:             script.SetPermissionsRecursive("/" item.name, *item.best_subtree)             current item.best_subtree              if item.uid != current[0] or item.gid != current[1] or              item.mode != current[2]:             script.SetPermissions("/" item.name, item.uid, item.gid, item.mode)              for in item.children:             recurse(i, current)         else:           if item.uid != current[0] or item.gid != current[1] or                  item.mode != current[3]:             script.SetPermissions("/" item.name, item.uid, item.gid, item.mode)          recurse(self, (-1, -1, -1, -1))         def CopySystemFiles(input_zip, output_zip=None,                       substitute=None):     """Copies files underneath system/ in the input zip to the output    zip.  Populates the Item class with their metadata, and returns    list of symlinks.  output_zip may be None, in which case the copy is    skipped (but the other side effects still happen).  substitute is an    optional dict of {output filename: contents} to be output instead of    certain input files.    """        symlinks []        for info in input_zip.infolist():       if info.filename.startswith("SYSTEM/"):         basefilename info.filename[7:]         if IsSymlink(info):           symlinks.append((input_zip.read(info.filename),                            "/system/"   basefilename))         else:           info2 copy.copy(info)           fn info2.filename "system/"   basefilename           if substitute and fn in substitute and substitute[fn] is None:             continue           if output_zip is not None:             if substitute and fn in substitute:               data substitute[fn]             else:               data input_zip.read(info.filename)             output_zip.writestr(info2, data)           if fn.endswith("/"):             Item.Get(fn[:-1], dir=True)           else:             Item.Get(fn, dir=False)        symlinks.sort()     return symlinks         def SignOutput(temp_zip_name, output_zip_name):     key_passWords common.GetKeyPasswords([OPTIONS.package_key])     pw key_passwords[OPTIONS.package_key]        common.SignFile(temp_zip_name, output_zip_name, OPTIONS.package_key, pw,                     whole_file=True)         def AppendAssertions(script, input_zip):     device GetBuildProp("ro.product.device", input_zip)     script.AssertDevice(device)         def MakeRecoveryPatch(output_zip, recovery_img, boot_img):     """Generate binary patch that creates the recovery image starting    with the boot image.  (Most of the space in these images is just the    kernel, which is identical for the two, so the resulting patch    should be efficient.)  Add it to the output zip, along with shell    script that is run from init.rc on first boot to actually do the    patching and install the new recovery image.      recovery_img and boot_img should be File objects for the    corresponding images.      Returns an Item for the shell script, which must be made    executable.    """        common.Difference(recovery_img, boot_img)     _, _, patch d.ComputePatch()     common.ZipWriteStr(output_zip, "recovery/recovery-from-boot.p", patch)     Item.Get("system/recovery-from-boot.p", dir=False)        boot_type, boot_device common.GetTypeAndDevice("/boot", OPTIONS.info_dict)     recovery_type, recovery_device common.GetTypeAndDevice("/recovery", OPTIONS.info_dict)        Images with different content will have different first page, so     we check to see if this recovery has already been installed by     testing just the first 2k.     HEADER_SIZE 2048     header_sha1 sha.sha(recovery_img.data[:HEADER_SIZE]).hexdigest()     sh """#!/system/bin/sh  if applypatch -c %(recovery_type)s:%(recovery_device)s:%(header_size)d:%(header_sha1)s; then    log -t recovery "Installing new recovery image"    applypatch %(boot_type)s:%(boot_device)s:%(boot_size)d:%(boot_sha1)s %(recovery_type)s:%(recovery_device)s %(recovery_sha1)s %(recovery_size)d %(boot_sha1)s:/system/recovery-from-boot.p  else    log -t recovery "Recovery image already installed"  fi  """  boot_size : boot_img.size,            boot_sha1 : boot_img.sha1,            header_size : HEADER_SIZE,            header_sha1 : header_sha1,            recovery_size : recovery_img.size,            recovery_sha1 : recovery_img.sha1,            boot_type : boot_type,            boot_device : 

体验课预约试听

倒计时

12:00:00

课程热线:

13013833891
在线咨询

客服在线时间:早上9点~下午6点,其他时间请在线预约报名或留言,谢谢!

苏州JAVA

免费体验课开班倒计时

11: 41: 09

稍后会有专业老师给您回电,请保持电话畅通

咨询电话:13013833891
推荐机构 全国分站 更多课程

本周仅剩 个试听名额

请键入信息,稍后系统将会把领奖短信发至您的手机

申请试听名额

已有10254人申请免费试听

01电话咨询 | 13013833891

QQ:1413838287
加盟合作:0755-83654572