A547_Lecture+Slides_Chapter+5_SV
slides3_05

Using fgets to read from the keyboard
Getting numbers from strings
• Once we've got a string with a number in it (either from a file or from the user typing) we can use atoi or atof to convert it to a number • The functions are part of stdlib.h
File handling in C
• In C we use FILE * to represent a pointer to a file. • fopen is used to open a file. It returns the special value NULL to indicate that it couldn't open the file.
FILE *fptr; char readfname[1000]; fgets (readfname,1000,stdin); fptr= fopen (readfname,"w"); /* oopsie - file name also has \n */
Even experienced programmers can make this error
char numberstring[]= "3.14"; int i; double pi; pi= atof (numberstring); i= atoi ("12"); Both of these functions return 0 if they have a problem
Organization

Models of Software Systems Fall 2004ObjectivesScientific foundations for software engineering depend on the use of precise, abstract models and logics for characterizing and reasoning about properties of software systems. There are a number of basic models and logics that over time have proven to be particularly important and pervasive in the study of software systems. This course is concerned with that body of knowledge. It considers many of the standard models for representing sequential and concurrent systems, such as state machines, algebras and traces. It shows how different logics can be used to specify properties of software systems, such as functional correctness, deadlock freedom, and internal consistency. Concepts such as composition mechanisms, abstraction relations, invariants, non-determinism, and inductive and denotational descriptions are recurrent themes throughout the course.By the end of the course you should be able to understand the strengths and weaknesses of certain models and logics, including state machines, algebraic and trace models, and temporal logics. You should be able to apply this understanding to select and describeabstract formal models for certain classes of systems. Further, you should be able to reason formally about the elementary properties of modeled systems.OrganizationLectures. Classes meet Monday & Wednesday, 5:30-6:50 am, in Newell-Simon 1305.Communication. We will be using the CMU Blackboard System this year for distributing most course materials, providing a general course bulletin board, and keeping track of student email addresses. In addition you can useOffice Hours: The instructor and the TAs have weekly office hours, listed above. We are also available other times by appointment.1.Email: We welcome email about the course at any time.2.Readings. Most lectures will have a reading assignment that we expect you to complete before you come to class. There is one required textbook for the course: Concurrency: State Models and Java Programs, by Magee and Kramer [MK99]. In addition, there is an optional companion text Using Z: Specification, Refinement, and Proof, by Woodcock and Davies [WD96]. This text is available on-line at /.An optional reference book may also be useful: The Z Notation: A Reference Manual, Second Edition, by J. M. Spivey (available on the web through /~mike/zrm). Some readings are in the form of handouts to supplement lectures; other additional readings are technical papers. These will be made available as needed throughout the course. Finally, for supplementary detail, there are a number of books noted in the References section at the end of this document.Homework Assignments. The course is organized around (roughly) weekly homework assignments and a set of three projects. The purpose of the assignments and projects is to give you practice in using the models, logics, and tools of the course. We encourage you to discuss your homework with other students, but the final write-up must be your own work.To give you the most opportunities to learn from the homework assignments, we will allow you to redo problems that didn't receive a passing grade. A redone homework must be turned in at the class following the one on which it is handed back. Problems done correctly the first time will be given more weight in the final grade.Projects. We will be assigning three group projects that are designed to give you a chance to apply the ideas of the course tosemi-realistic case studies. Each project will be completed by a team. Team members are expected to participate equally in the projects.We will distribute a team peer evaluation at the end of the semester.On-line materials. Most of the course materials will be available electronically via the CMU Blackboard System(/blackboard/). You will find copies of the lecture slides, handouts, homework, and readings. It will be your responsibility to make copies of these to bring to class or to use for homework.Some of the course materials have web sites. These are:Using Z: /Concurrency: State Models and Java Programs: /concurrency/The Z Notation: /~mike/zrm/PhD Option. Students taking the course for PhD credit students will be required to complete a course project. This project is described in separate handout.Exams. There will be a (take-home) mid-term (handed out Wednesday, October 20, due back Friday, October 22 by 5:00 p.m.) and a formal (in-class) final examination. Both exams will be open-book.Grading. The course grade will be determined as a combination of five factors: homework assignments (30%), projects (30%), midterm exam (15%), and final exam (25%). Final grades may be adjusted based on instructors judgment.Bold refers to Using Z [WD96].*Marks classes that follow a holiday.。
计算机网络 Chapter_5_V6.01

datagram transferred by different link protocols over different links: e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link each link protocol provides different services e.g., may or may not provide rdt over link
datagram controller datagram controller
sending host
datagram
receiving host
frame
sending side: encapsulates datagram in frame adds error checking bits, rdt, flow control, etc.
• Error detection not 100% reliable! • protocol may miss some errors, but rarely • larger EDC field yields better detection and correction
otherwise
Link Layer 5-11
transportation analogy:
trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne
tourist = datagram transport segment = communication link transportation mode = link layer protocol travel agent = routing algorithm
Chapter5p2

• 34. pretty 漂亮的
• (beautiful“美丽”的最普遍用词,不用于男性, 语气强)
• (pretty多用于小孩、妇女和细小的东西, 语气弱)
• (good-looking好看的,语气弱,可修饰男 性或女性)
• (handsome帅气的,主要用于男性)
• 35. quiet 安静的 • 36. reliable 可靠的 • 37. safe 安全的 • 38. smart 聪明的 • 39. soft 柔软的、柔和的 • 40. spicy 辣的 • 42. talkative 健谈的、多嘴的 • 43. useful 有用的 • 44. talented 有天赋的
SBS BOOK2
L/O/G/O
Unit 5
Look and say
1. What’s wrong with the tap?
2. Should we leave the tap dripping or do
something to stop it?
Why?
3. What should you do to
• 10. fast 快的 • 11. friendly 友好的 • 12. good —- better 好的 • 13. handsome 帅的(指男子) • 14. healthy 健康的 • 15. honest 诚实的、正直的 • 16. hospitable 好客的 • 27. intelligent 聪明的,有智力的
save water? I should…
should + verb 应该做…
safer
bicycle
motorcycle
more useful
more honest
讲座英文推荐作文范文

讲座英文推荐作文范文英文回答:In the realm of public speaking, lectures stand as a formidable and influential form of discourse. They offer a platform for experts and thought leaders to share their insights, research findings, or perspectives on a given topic with an audience. As such, they play a pivotal role in the dissemination of knowledge, the stimulation of intellectual discourse, and the shaping of societal understanding.The effectiveness of a lecture hinges on several key elements, including the speaker's mastery of the subject matter, their ability to articulate their ideas clearly and persuasively, and their capacity to captivate and engage the audience. A well-crafted lecture captivates listeners by drawing them into the speaker's world of ideas, leaving them informed, inspired, and eager to explore the subject further.In choosing a topic for a lecture, the speaker must consider the audience's interests, knowledge level, and the overall purpose of the event. The lecture's structure should be clear and logical, with an engaging introduction that grabs the audience's attention, a body that presents the main arguments and supporting evidence, and a conclusion that summarizes the key points and leaves a lasting impression.Effective delivery involves not only the speaker's verbal communication but also their non-verbal cues. Maintaining eye contact, using gestures appropriately, and modulating the voice can significantly enhance the audience's engagement and comprehension. Moreover, incorporating audio-visual aids, such as slides or videos, can further enhance the learning experience by providing visual representations of complex concepts and data.In recent years, the advent of online platforms has expanded the reach and accessibility of lectures. Webinars and virtual conferences allow speakers to connect withaudiences worldwide, breaking down geographical barriers and enabling knowledge sharing on a global scale. However, delivering an engaging and effective online lecture requires careful consideration of audience engagement techniques, such as interactive polls, Q&A sessions, and breakout rooms, to maintain active participation and foster a sense of community among attendees.Regardless of the format, the ultimate goal of alecture is to inform, inspire, and provoke thought. It is an opportunity for speakers to share their expertise, challenge assumptions, and encourage a deeper understanding of the world around us. Through the careful planning, engaging delivery, and thoughtful incorporation of audience-centered techniques, lectures continue to serve as a powerful vehicle for knowledge dissemination and intellectual growth.中文回答:一场成功的演讲由以下几个关键元素决定,演讲者对主题的掌握程度、清晰而有说服力地表达思想的能力,以及吸引观众并与之互动。
Lecture Slides.ppt

August 17, 2005
The 2005 Imperial Oil Summer Institute for Computer Studies Teachers
Presentation Outline
• Computer Engineering at UW • Computer Engineering Education Trends • UW Initiatives for Improving Computer Engineering Education • What Can You Do At Your School? • Conclusions
Computer Engineering: Education Trends and Initiatives The 2005 Imperial Oil Summer Institute for Computer Studies Teachers, Waterloo, Ontario, Canada
பைடு நூலகம்
Computer Engineering: Education Trends and Initiatives The 2005 Imperial Oil Summer Institute for Computer Studies Teachers, Waterloo, Ontario, Canada
Third and Fourth Year
• In third and fourth year, the laboratory studies require substantial engineering analysis and design
– A few students are simply unable to make this transition – Critical thinking skills are essential
LectureSlides.ppt

Introduction
© 2007 Pearson Addison-Wesley. All rights reserved
Chapter 0: Introduction
• 0.1 The Role of Algorithms • 0.2 The Origins of Computing Machines • 0.3 The Science of Algorithms • 0.4 Abstraction • 0.5 An Outline of Our Study • 0.6 Social Repercussions
© 2007 Pearson Addison-Wesley. All rights reserved
0-19
Ethical Theories
• Consequence based: What leads to the greatest benefit?
• Duty based: What are my intrinsic obligations?
© 2007 Pearson Addison-Wesley. All rights reserved
0-12
Computer Science
• The science of algorithms • Draws from other subjects, including
– Mathematics – Engineering – Psychology – Business Administration – Psychology
© 2007 Pearson Addison-Wesley. All rights reserved
0-4
History of Algorithms
lecture5[1]PPT课件
![lecture5[1]PPT课件](https://img.taocdn.com/s3/m/95f759b3ddccda38366bafad.png)
Engels: The Great Time
这是一次人类从来没有经历过的 最伟大的,进步的变革,是一个 需要巨人而且产生了巨人--在 思维能力,热情和性格方面,在 多才多艺和学识渊博方面的巨人 的时代.给现代资产阶级统治打 下基础的人物,决不受资产阶级 的局限.相反地,成为时代特征 的冒险精神,或多或少地推动了 这些人物.
Hamlet’s puzzle
人是怎么一回事:理想多么 崇高!能力多么无限!在形 状同行动上多么敏捷而可羡! 在举动上多么像天使!在体 会上多么像个神!是世界上 的奇迹!是万物的精英!但 是,对于我,这烂泥捏成的 究竟是个什么?我看见人简 直不能喜欢.“一个被毁掉 了的高贵心胸”
Respond to Hamlet from a Humanist
Luther’s Reform: Free Theology from Politics
路德的改革和体现这种改革的德意志各公国的革命,通过清除教会的 权能打破了教会法和世俗法这种罗马天主教的二元制。在路德主义获 得成功的地方,教会逐渐地被作为无形的、无政治意义的和无法律意 义的东西;仅有的主权和法律(政治意义上的)是世俗王国或公国的 主权和法律。事实上,刚好在此前,马基雅维里曾以一种新的方式使 用“国家”一词,用来表示纯粹的世俗社会秩序。路德教的改革者们 在一种意义上是马基雅维里派:他们对人能够创造反映永久法的人法 的权力这一点持怀疑态度,他们明确否认发展人法是教会的任务。这 种路德派的怀疑论使法律实证主义的法律理论的出现成为可能,它把 国家的法律视为在道德上中立的,是一种手段而不是目的,是一种表 现主权政策和确保服从它的办法。但法律的世俗化和实证主义法律理 论的出现只是路德宗教改革对西方法律传统贡献的一个方面。另一个 方面是同等重要的:通过使法律摆脱神学教条和基督教教会的直接影 响,这种宗教改革能够使法律经历一种新的和有前途的发展。用德国 伟大的法学家鲁道夫·索姆的话讲:“路德的改革不仅使对信仰的革新 而且也是对世界--宗教生活世界和法律世界--的革新”。 Berman
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A547/B732: Strategic Tax Planning
Dave Greene and Ajay Mehrotra
Noves for Class #4
LO # Restated
Tax-exempt
5% 3% (8% – 5%) None 3% 37.5% (3%/8%)
Explicit tax rate Total tax rate
37.5% (3%/8%) 37.5%
0% (None/8%) 37.5%
1% / 8% = 12.5% 37.5%
Risk Premia complicates matters
9 Congress gives out tax bennies, but the market sets the price (the rate of implicit tax that is paid through lower pretax returns). The implicit tax rate is the same for everyone, regardless of their marginal explicit tax rate. Congress giveth, but they can taketh away, too…a tax disadvantaged asset is worth less (and will have to pay a higher yield = NEGATIVE implicit taxes) PPE: implicit taxes may not be observable, b/c we don’t have a BENCHMARK Implicit taxes are not paid to IRS, but to a TRANSFER AGENT Yields differ because of taxes, but also because of RISK. You can’t calculate the implicit taxes until you strip out the risk premium. High tax bracket TPs should pay implicit taxes; low bracket TPs should not. Taking implicit taxes into consideration increases PROGRESSIVITY It may be possible to exploit differential tax treatment to create a sure profit. This is what we call TAX ARBITRAGE.
Let’s have an auction. Here are the facts.
• • • • 1 year time horizon Only 2 investments exist: Bond A and Bond B Both bonds have a $1,000 face and will pay $100 in interest at the EOY Mommy always liked you better Congress likes Bond A better than Bond B, and has 5 alternative ways of conveying their feelings – Interest on A is exempt from tax, OR – ½ of interest on A is exempt from tax, OR – Purchasers of Bond A get a 10% tax credit (based on the face amount of the bond) against their income tax in the year of purchase, OR – Purchasers of Bond A get to deduct the cost of the bond against their TI in the year of purchase (but this doesn’t reduce their AB in the bond), OR – Purchasers are taxed on 1/3 of income in year of receipt (+ 1/3 in Yrs #2 + #3) Bond B sells for $1,000…what would you pay for Bond A in each alternative Oops…Teams 1-5 have a 10% tax rate, Teams 6-10 = 25%
• Already talked about double/triple tax (DRD discussion in Class 3) • Partnerships (and S Corps) are flow-through entities…no entity level tax is paid • The choice of entity depends on – Comparison of tax rates on “owners” (Tp) vs. corporations (Tc) – Duration (n) that funds will stay in the “business” (P/S or corporation) – Tax that will be paid on extraction of funds from corporation (Ts) – Non-tax factors – Note: PT ROR (R) is also a factor in the calculations, but presumably is the same for both investments
• •
Principles of Te and Ti (ignoring risk premia)
• • • For a fully taxable asset, there are no implicit taxes (Ti = 0) For a fully tax-exempt asset, there are no explicit taxes (Te = 0) Implicit taxes = extent to which the pretax return on an asset is less than the pretax return on the benchmark, i.e. a fully taxable asset (Ti = Rb – R). – Ti always has to be derived or inferred. Explicit taxes = extent to which the pretax return on an asset is greater than that on a tax-exempt asset. (Te = R – Re). – Note, this would rarely (if ever) be the same as the statutory rate. One would expect it to be < the statutory rate because the “marginal investor” is not subject to the highest tax rate. SW calculates the Ti rate with respect to Rb. This is necessary to satisfy the condition that SW has set that Ti + Te should be the same for all assets (assuming perfectly competitive markets)
10 11 12 13 14 16 17
SW says there are 5 flavors of tax favoritism for investment assets
• And those would be…? – Full tax exemption muni bonds – Partial tax exemption (or a lower tax rate) capital gains – Tax credit Investment tax credit, targeted jobs credit, R&E credit, low income housing credit – Tax deductions faster than rate of decline in economic value MACRS depreciation – Income taxed at a later time than when it becomes “economic income” Unrealized income
• In the real world, there are two reasons why the R ≠ r – Taxes – Risk How does risk affect the price of an asset and why?
•
On Monday: Organizational form and tax planning…Chapter 4
•
•
Apply the rules of the road to a scenario (Table 5.1 format, slightly reordered, new facts)
Fully taxable Pretax return Implicit tax Explicit tax Total tax Implicit tax rate Explicit tax rate Total tax rate 8% Tax-exempt 5% Partially Tax Exempt 6%