全部 文章 问答 分享 共找到16个相关内容
[文章] 乔布斯2005年斯坦福大学毕业演讲
FromStanfordReport,June14,2005ThisisthetextoftheCommencementaddressbySteveJobs,CEOofAppleComputerandofPixarAnimationStudiosDeliveredonJune12,2005.Iamhonoredtobewithyoutodayatyourcommencementfromoneofthefinestuniversitiesintheworld.Inevergraduatedfromcollege.Truthbetold,thisistheclosestI'veevergottentoacollegegraduation.TodayIwanttotellyouthreestoriesfrommylife.That'sit.Nobigdeal.Justthreestories.Thefirststoryisaboutconnectingthedots.IdroppedoutofReedCollegeafterthefirst6months,butthenstayedaroundasadrop-inforanother18monthsorsobeforeIreallyquit.SowhydidIdropout?ItstartedbeforeIwasborn.Mybiologicalmotherwasayoung,unwedcollegegraduatestudent,andshedecidedtoputmeupforadoption.ShefeltverystronglythatIshouldbeadoptedbycollegegraduates,soeverythingwasallsetformetobeadoptedatbirthbyalawyerandhiswife.ExceptthatwhenIpoppedouttheydecidedatthelastminutethattheyreallywantedagirl.Somyparents,whowereonawaitinglist,gotacallinthemiddleofthenightasking:"Wehaveanunexpectedbabyboy;doyouwanthim?"Theysaid:"Ofcourse."Mybiologicalmotherlaterfoundoutthatmymotherhadnevergraduatedfromcollegeandthatmyfatherhadnevergraduatedfromhighschool.Sherefusedtosignthefinaladoptionpapers.SheonlyrelentedafewmonthslaterwhenmyparentspromisedthatIwouldsomedaygotocollege.And17yearslaterIdidgotocollege.ButInaivelychoseacollegethatwasalmostasexpensiveasStanford,andallofmyworking-classparents'savingswerebeingspentonmycollegetuition.Aftersixmonths,Icouldn'tseethevalueinit.IhadnoideawhatIwantedtodowithmylifeandnoideahowcollegewasgoingtohelpmefigureitout.AndhereIwasspendingallofthemoneymyparentshadsavedtheirentirelife.SoIdecidedtodropoutandtrustthatitwouldallworkoutOK.Itwasprettyscaryatthetime,butlookingbackitwasoneofthebestdecisionsIevermade.TheminuteIdroppedoutIcouldstoptakingtherequiredclassesthatdidn'tinterestme,andbegindroppinginontheonesthatlookedinteresting.Itwasn'tallromantic.Ididn'thaveadormroom,soIsleptonthefloorinfriends'rooms,Ireturnedcokebottlesforthe5¢depositstobuyfoodwith,andIwouldwalkthe7milesacrosstowneverySundaynighttogetonegoodmealaweekattheHareKrishnatemple.Ilovedit.AndmuchofwhatIstumbledintobyfollowingmycuriosityandintuitionturnedouttobepricelesslateron.Letmegiveyouoneexample:ReedCollegeatthattimeofferedperhapsthebestcalligraphyinstructioninthecountry.Throughoutthecampuseveryposter,everylabeloneverydrawer,wasbeautifullyhandcalligraphed.BecauseIhaddroppedoutanddidn'thavetotakethenormalclasses,Idecidedtotakeacalligraphyclasstolearnhowtodothis.Ilearnedaboutserifandsanseriftypefaces,aboutvaryingtheamountofspacebetweendifferentlettercombinations,aboutwhatmakesgreattypographygreat.Itwasbeautiful,historical,artisticallysubtleinawaythatsciencecan'tcapture,andIfounditfascinating.Noneofthishadevenahopeofanypracticalapplicationinmylife.Buttenyearslater,whenweweredesigningthefirstMacintoshcomputer,itallcamebacktome.AndwedesigneditallintotheMac.Itwasthefirstcomputerwithbeautifultypography.IfIhadneverdroppedinonthatsinglecourseincollege,theMacwouldhaveneverhadmultipletypefacesorproportionallyspacedfonts.AndsinceWindowsjustcopiedtheMac,itslikelythatnopersonalcomputerwouldhavethem.IfIhadneverdroppedout,Iwouldhaveneverdroppedinonthiscalligraphyclass,andpersonalcomputersmightnothavethewonderfultypographythattheydo.OfcourseitwasimpossibletoconnectthedotslookingforwardwhenIwasincollege.Butitwasvery,veryclearlookingbackwardstenyearslater.Again,youcan'tconnectthedotslookingforward;youcanonlyconnectthemlookingbackwards.Soyouhavetotrustthatthedotswillsomehowconnectinyourfuture.Youhavetotrustinsomething—yourgut,destiny,life,karma,whatever.Thisapproachhasneverletmedown,andithasmadeallthedifferenceinmylife.Mysecondstoryisaboutloveandloss.Iwaslucky—IfoundwhatIlovedtodoearlyinlife.WozandIstartedAppleinmyparentsgaragewhenIwas20.Weworkedhard,andin10yearsApplehadgrownfromjustthetwoofusinagarageintoa$2billioncompanywithover4000employees.Wehadjustreleasedourfinestcreation—theMacintosh—ayearearlier,andIhadjustturned30.AndthenIgotfired.Howcanyougetfiredfromacompanyyoustarted?Well,asApplegrewwehiredsomeonewhoIthoughtwasverytalentedtorunthecompanywithme,andforthefirstyearorsothingswentwell.Butthenourvisionsofthefuturebegantodivergeandeventuallywehadafallingout.Whenwedid,ourBoardofDirectorssidedwithhim.Soat30Iwasout.Andverypubliclyout.Whathadbeenthefocusofmyentireadultlifewasgone,anditwasdevastating.Ireallydidn'tknowwhattodoforafewmonths.IfeltthatIhadletthepreviousgenerationofentrepreneursdown-thatIhaddroppedthebatonasitwasbeingpassedtome.ImetwithDavidPackardandBobNoyceandtriedtoapologizeforscrewingupsobadly.Iwasaverypublicfailure,andIeventhoughtaboutrunningawayfromthevalley.Butsomethingslowlybegantodawnonme—IstilllovedwhatIdid.TheturnofeventsatApplehadnotchangedthatonebit.Ihadbeenrejected,butIwasstillinlove.AndsoIdecidedtostartover.Ididn'tseeitthen,butitturnedoutthatgettingfiredfromApplewasthebestthingthatcouldhaveeverhappenedtome.Theheavinessofbeingsuccessfulwasreplacedbythelightnessofbeingabeginneragain,lesssureabouteverything.Itfreedmetoenteroneofthemostcreativeperiodsofmylife.Duringthenextfiveyears,IstartedacompanynamedNeXT,anothercompanynamedPixar,andfellinlovewithanamazingwomanwhowouldbecomemywife.Pixarwentontocreatetheworldsfirstcomputeranimatedfeaturefilm,ToyStory,andisnowthemostsuccessfulanimationstudiointheworld.Inaremarkableturnofevents,AppleboughtNeXT,IreturnedtoApple,andthetechnologywedevelopedatNeXTisattheheartofApple'scurrentrenaissance.AndLaureneandIhaveawonderfulfamilytogether.I'mprettysurenoneofthiswouldhavehappenedifIhadn'tbeenfiredfromApple.Itwasawfultastingmedicine,butIguessthepatientneededit.Sometimeslifehitsyouintheheadwithabrick.Don'tlosefaith.I'mconvincedthattheonlythingthatkeptmegoingwasthatIlovedwhatIdid.You'vegottofindwhatyoulove.Andthatisastrueforyourworkasitisforyourlovers.Yourworkisgoingtofillalargepartofyourlife,andtheonlywaytobetrulysatisfiedistodowhatyoubelieveisgreatwork.Andtheonlywaytodogreatworkistolovewhatyoudo.Ifyouhaven'tfoundityet,keeplooking.Don'tsettle.Aswithallmattersoftheheart,you'llknowwhenyoufindit.And,likeanygreatrelationship,itjustgetsbetterandbetterastheyearsrollon.Sokeeplookinguntilyoufindit.Don'tsettle.Mythirdstoryisaboutdeath.WhenIwas17,Ireadaquotethatwentsomethinglike:"Ifyouliveeachdayasifitwasyourlast,somedayyou'llmostcertainlyberight."Itmadeanimpressiononme,andsincethen,forthepast33years,Ihavelookedinthemirroreverymorningandaskedmyself:"Iftodaywerethelastdayofmylife,wouldIwanttodowhatIamabouttodotoday?"Andwhenevertheanswerhasbeen"No"fortoomanydaysinarow,IknowIneedtochangesomething.RememberingthatI'llbedeadsoonisthemostimportanttoolI'veeverencounteredtohelpmemakethebigchoicesinlife.Becausealmosteverything—allexternalexpectations,allpride,allfearofembarrassmentorfailure-thesethingsjustfallawayinthefaceofdeath,leavingonlywhatistrulyimportant.RememberingthatyouaregoingtodieisthebestwayIknowtoavoidthetrapofthinkingyouhavesomethingtolose.Youarealreadynaked.Thereisnoreasonnottofollowyourheart.AboutayearagoIwasdiagnosedwithcancer.Ihadascanat7:30inthemorning,anditclearlyshowedatumoronmypancreas.Ididn'tevenknowwhatapancreaswas.Thedoctorstoldmethiswasalmostcertainlyatypeofcancerthatisincurable,andthatIshouldexpecttolivenolongerthanthreetosixmonths.Mydoctoradvisedmetogohomeandgetmyaffairsinorder,whichisdoctor'scodeforpreparetodie.Itmeanstotrytotellyourkidseverythingyouthoughtyou'dhavethenext10yearstotelltheminjustafewmonths.Itmeanstomakesureeverythingisbuttonedupsothatitwillbeaseasyaspossibleforyourfamily.Itmeanstosayyourgoodbyes.Ilivedwiththatdiagnosisallday.LaterthateveningIhadabiopsy,wheretheystuckanendoscopedownmythroat,throughmystomachandintomyintestines,putaneedleintomypancreasandgotafewcellsfromthetumor.Iwassedated,butmywife,whowasthere,toldmethatwhentheyviewedthecellsunderamicroscopethedoctorsstartedcryingbecauseitturnedouttobeaveryrareformofpancreaticcancerthatiscurablewithsurgery.IhadthesurgeryandI'mfinenow.ThiswastheclosestI'vebeentofacingdeath,andIhopeitstheclosestIgetforafewmoredecades.Havinglivedthroughit,Icannowsaythistoyouwithabitmorecertaintythanwhendeathwasausefulbutpurelyintellectualconcept:Noonewantstodie.Evenpeoplewhowanttogotoheavendon'twanttodietogetthere.Andyetdeathisthedestinationweallshare.Noonehaseverescapedit.Andthatisasitshouldbe,becauseDeathisverylikelythesinglebestinventionofLife.ItisLife'schangeagent.Itclearsouttheoldtomakewayforthenew.Rightnowthenewisyou,butsomedaynottoolongfromnow,youwillgraduallybecometheoldandbeclearedaway.Sorrytobesodramatic,butitisquitetrue.Yourtimeislimited,sodon'twasteitlivingsomeoneelse'slife.Don'tbetrappedbydogma—whichislivingwiththeresultsofotherpeople'sthinking.Don'tletthenoiseofothers'opinionsdrownoutyourowninnervoice.Andmostimportant,havethecouragetofollowyourheartandintuition.Theysomehowalreadyknowwhatyoutrulywanttobecome.Everythingelseissecondary.WhenIwasyoung,therewasanamazingpublicationcalledTheWholeEarthCatalog,whichwasoneofthebiblesofmygeneration.ItwascreatedbyafellownamedStewartBrandnotfarfromhereinMenloPark,andhebroughtittolifewithhispoetictouch.Thiswasinthelate1960's,beforepersonalcomputersanddesktoppublishing,soitwasallmadewithtypewriters,scissors,andpolaroidcameras.ItwassortoflikeGoogleinpaperbackform,35yearsbeforeGooglecamealong:itwasidealistic,andoverflowingwithneattoolsandgreatnotions.StewartandhisteamputoutseveralissuesofTheWholeEarthCatalog,andthenwhenithadrunitscourse,theyputoutafinalissue.Itwasthemid-1970s,andIwasyourage.Onthebackcoveroftheirfinalissuewasaphotographofanearlymorningcountryroad,thekindyoumightfindyourselfhitchhikingonifyouweresoadventurous.Beneathitwerethewords:"StayHungry.StayFoolish."Itwastheirfarewellmessageastheysignedoff.StayHungry.StayFoolish.AndIhavealwayswishedthatformyself.Andnow,asyougraduatetobeginanew,Iwishthatforyou.StayHungry.StayFoolish.Thankyouallverymuch.
2020-05-10 23:23 · 乔布斯 / 演讲 / 英文 / 程序员读书 / 学习
[文章] 不管是不是程序员,英语、数学、计算机一辈子都不能丢
这里推荐几篇演讲给大家乔布斯2005年斯坦福大学毕业演讲比尔·盖茨在哈佛大学毕业典礼上的演讲甲骨文总裁拉里·埃里森在耶鲁大学的演讲(史上最强的演讲)不要把你的时间浪费在别人身上,活着就是为了必变世界!
2020-05-11 00:08 · 英语 / 计算机 / 数学 / 程序员读书 / 杂谈
[问答] 『央视新闻』大发顶级导师稳定回血-搜狐焦点

篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议,

2022-02-24 23:24 · 大发
[问答] 《新闻联播》大发导师回血技巧方案-搜狐财经

篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议,

2022-02-24 23:24 · 大发
[问答] 「央视新闻」大小单双6期必中方法《手机搜狐网》


 篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议。

2022-02-24 23:22 · 大发
[问答] 【央视新闻】带人回血最稳最厉害的导师「手机搜狐网」

 篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议,

2022-02-24 23:28 · 回血
[问答] 央视新闻《带人最稳最靠谱的回血导师》手机搜狐网

 篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议,

2022-02-25 10:54 · 回血
[问答] 『新闻联播』大发平台邀请码大全《手机搜狐网》


 篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议。

2022-02-24 23:29 · 大发
[问答] 【央视新闻】大小单双导师带赚钱「手机搜狐网」

 篮网主帅纳什透露,哈登与格里芬均会出战与湖人队的圣诞大战,克拉克顿已能够出战,本布里已经解除了健康安全协议,

2022-02-24 23:29 · 回血
[文章] 国一 flatMap 原来是这样用的
知识点通过本篇文章,你可以学到flatMap扩展函数的使用distinctBy扩展函数的使用加减操作符的使用缘起首先,我们看看用到的实体类的结构:Person接口interfacePerson{valid:Intvalname:String}Student数据类dataclassStudent(overridevalid:Int,overridevalname:String):PersonTeacher数据类dataclassTeacher(overridevalid:Int,overridevalname:String,valstudentList:List<Student>):Person我们可以看到,Teacher类和Student类都同时实现了Person接口,然后Teacher类还多了一个studentList属性。简单来说,老师和学生都是人类,然后每个老师可能会管理多个学生。那么,如果我们想要知道一共有多少人,以及每个人的id和姓名,我们可以怎么做呢?数据源原始数据如下:[{"id":1234,"name":"张老师","studentList":[{"id":2234,"name":"王麻子"},{"id":2235,"name":"狗蛋"}]},{"id":1235,"name":"李老师","studentList":[{"id":2236,"name":"赵雪梅"},{"id":2237,"name":"马冬梅"}]},{"id":1236,"name":"王老师","studentList":[{"id":2237,"name":"李华"},{"id":2238,"name":"胖虎"}]}]代码实现首先,我们将以上的json数据反序列化成List<Teacher>。valteacherList=gson.fromJson<List<Teacher>>(json,object:TypeToken<List<Teacher>>(){}.type)然后,我们就可以使用Kotlin给我们提供的flatMap扩展函数方便的转换成List<Person>这样的数据结构了。valpersonList=teacherList.flatMap{listOf(it)+it.studentList}Tips:这里我们使用了Kotlin中的加减操作符重载,实现了List+List这样的效果。源码如下:/***Returnsalistcontainingallelementsoftheoriginalcollectionandthenallelementsofthegiven[elements]collection.*/publicoperatorfun<T>Collection<T>.plus(elements:Iterable<T>):List<T>{if(elementsisCollection){valresult=ArrayList<T>(this.size+elements.size)result.addAll(this)result.addAll(elements)returnresult}else{valresult=ArrayList<T>(this)result.addAll(elements)returnresult}}拿到了personList之后,我们就可以调用personList.size获取到总人数了,遍历personList集合我们就能拿到每个人的id和姓名信息了。到这里,我们的需求似乎就已经解决了(只是使用了一个flatMap操作符?Kotlin的语法糖也太甜了吧!)代码优化可是,实际情况是同一个学生可能被多位老师所管理,那么这样拿到的数据就可能会有冗余。这个时候我们可以通过id对集合再去个重嘛~valpersonList=teacherList.flatMap{listOf(it)+it.studentList}.distinctBy{it.id}Tips:这里我们使用Kotlin给我们提供的distinctBy扩展函数,通过id进行去重处理。源码如下:/***Returnsalistcontainingonlyelementsfromthegivencollection*havingdistinctkeysreturnedbythegiven[selector]function.**Amongelementsofthegivencollectionwithequalkeys,onlythefirstonewillbepresentintheresultinglist.*Theelementsintheresultinglistareinthesameorderastheywereinthesourcecollection.**@samplesamples.collections.Collections.Transformations.distinctAndDistinctBy*/publicinlinefun<T,K>Iterable<T>.distinctBy(selector:(T)->K):List<T>{valset=HashSet<K>()vallist=ArrayList<T>()for(einthis){valkey=selector(e)if(set.add(key))list.add(e)}returnlist}如果对你有帮助的话,欢迎一键三连+关注哦~
2023-09-24 19:12 · Kotlin / 扩展函数 / flatMap / distinctBy / 操作符
[文章] 与 flatMap 相反的 groupBy 函数
知识点通过本篇文章,你可以学到groupBy扩展函数的使用缘起还是和之前类似的接口定义和实体类:之前的文章国一flatMap原来是这样用的Person接口interfacePerson{valtype
2023-10-30 23:17 · Kotlin / 扩展函数 / groupBy
[文章] 程序员必做的文史题目
5,雅典王子忒修勇闯克里特岛斩杀米诺牛的时候采用了以下哪种算法?a,动态规划;b,穷举;c,记忆化搜索;d,Dijkstra算法。
2019-10-21 12:37 · 搞笑 / 程序员 / 日常
[文章] 奥巴马精彩演讲:我们为什么要上学?
andgotascholarshiptoBrownUniversity--isnowingraduateschool,studyingpublichealth,onherwaytobecomingDr.JazminPerez.例如德克萨斯州罗马市的贾敏佩雷兹
2020-08-02 10:03 · 我们为什么要上学 / 奥巴马 / 美国
[文章] 搭建简单的监控系统(Grafana)
localhostprometheus]#ss-naltp|grep9090LISTEN0128[::]:9090[::]:*users:(("prometheus",pid=50994,fd=9))普罗米修软件界面
2021-02-18 21:10 · Prometheus
[文章] java微服务开发(监控篇)
Prometheus看这个标题应该是两个玩意有一说一确实是两个东西一个是prometheus:开源监控报警系统一个是granfana:网络架构和应用分析中最流行的时序数据展示工具Prometheus是啥音译:普罗米修这就是这个监控的核心组件了监控和报警一体的他也有一个简单的
2020-08-10 22:22 · Grafana / Prometheus / docker / dockercoompose / cadvisor
[文章] ElasticSearch安装以及相关操作
10660000988","13800000000","建设银行","建设银行建设银行建设银行建设银行",0,2,"鄂尔多&
2021-01-21 21:31 · ElasticSearch
  • 1