Method stub

A method stub[1] is a short and simple placeholder for a method that is not yet written for production needs. Generally, a method stub contains just enough code to allow it to be used – a declaration with any parameters, and if applicable, a return value.[2]

A method stub may be used to implement an interface that is defined but for which the implementation is not available.

Example

In the following example pseudocode, the function ReadThermometer returns a particular value even though ultimately it is supposed to read a value from a hardware source. It returns a valid value, allowing consuming code to be runnable. The function ignores the input parameter source which is common for a stub.

function ReadThermometer(Source source)
    return 28
end function

Distributed computing

In distributed computing, stub is like a mock objectsimulates existing code, such as a procedure on a remote machine. Such stubs can be useful in porting.

In RMI nomenclature, a stub on the client-side communicates with a skeleton on the server-side.[3]

Windows/DOS

In Windows and DOS, stub is like a shim – small interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).

See also

References

  1. ^ Nell B. Dale; Chip Weems (2004). Programming in C++. Jones & Bartlett Learning. p. 308. ISBN 978-0-7637-3234-9.
  2. ^ "stub". WEBOPEDIA. 23 March 1998. Retrieved 2012-08-28.
  3. ^ Freeman, Eric; Freeman, Elisabeth; Kathy, Sierra; Bert, Bates (2004). Hendrickson, Mike; Loukides, Mike (eds.). Head First Design Patterns (paperback). Vol. 1. O'REILLY. p. 440. ISBN 978-0-596-00712-6. Retrieved 2012-08-28.

Read other articles:

Halaman ini berisi artikel tentang kota di Australia. Untuk kegunaan lain, lihat Darwin (disambiguasi). DarwinWilayah UtaraGedung-gedung tinggi di Darwin dilihat dari Bayview pada tahun 2015DarwinLocation in AustraliaKoordinat12°26′17″S 130°50′28″E / 12.43806°S 130.84111°E / -12.43806; 130.84111Koordinat: 12°26′17″S 130°50′28″E / 12.43806°S 130.84111°E / -12.43806; 130.84111Jumlah penduduk147,255 (2019)[1]...

 

Greil MarcusMarcus di Festival SOS 4.8, Murcia, tahun 2014Lahir19 Juni 1945 (umur 78)San Francisco, CaliforniaKebangsaanAmerikaWarga negaraAmerikaPekerjaanPengarang, kritikus rock, jurnalisDikenal atasKritikus rock untuk Rolling Stone, Creem, the Village Voice, dan Pitchfork MediaSuami/istriJenny Marcus (1966–)[1] Greil Marcus (lahir 19 Juni 1945) adalah seorang pengarnag, jurnalis musik dan kritikus kebudayaan Amerika. Ia dikenal karena memproduksi esay sarjana dan kesusastra...

 

Часть серии статей о Холокосте Идеология и политика Расовая гигиена · Расовый антисемитизм · Нацистская расовая политика · Нюрнбергские расовые законы Шоа Лагеря смерти Белжец · Дахау · Майданек · Малый Тростенец · Маутхаузен ·&...

American physician and politician (1796–1865) For the judge, see Elisha Mills Huntington. Elisha Huntington19th Lieutenant Governor of Massachusetts[1]In officeJanuary 14, 1853 – January 12, 1854GovernorJohn H. CliffordPreceded byHenry W. CushmanSucceeded byWilliam C. Plunkett3rd Mayor of Lowell, Massachusetts[1]In officeApril 1840[2] – April 1842Preceded byHimself as Acting MayorSucceeded byNathaniel Wright5th Mayor of Lowell, MassachusettsIn o...

 

ShahHazrat Ibrahim Shah Sultan Balkhi(Rahmatullah Alaih)MahisawarThe mazar of MahisawarPersonalBornBalkh, modern-day AfghanistanDiedMahasthangarh, Pundravardhana (modern-day Bogura, Bangladesh)Resting placeMausoleum of Sultan Balkhi, Shibganj, BograReligionIslamParentShah Ali Asghar Balkhi (father)Other namesBolkhi MahisowarMuslim leaderBased inMahasthangarh, PundravardhanaPeriod in office16th century Hazrat Ibrahim Shah Sultan Balkhi (Rahmatullah Alaih) (Bengali: শাহ �...

 

National sports team This article is about the men's team. For the women's team, see Pakistan women's national cricket team. PakistanNickname(s)Shaheens (lit. 'Falcons')[1] Green Shirts[2] Men in Green[3] Cornered Tigers[4][5]AssociationPakistan Cricket BoardPersonnelTest captainShan MasoodOne Day captainBabar AzamT20I captainBabar AzamCoachAzhar Mahmood (interim)Batting coachMohammad YousufBowling coachSaeed Ajmal (spin bowling)Fielding coachAfta...

BVP M-80, adalah kendaraan tempur infanteri Yugoslavia beroda rantai, diproduksi dari tahun 1980 sampai runtuhnya negara itu pada 1990-an. Penelitian dan pengembangan M-80 awal dimulai pada tahun 1969, dengan pengujian prototipe selesai pertama pada tahun 1974. contoh pertama dari BVP M-80 diluncurkan pada tahun 1979 tetapi masuk penuh ke layanan terjadi pada tahun 1982. Sebuah model upgrade diresmikan setelah satu tahun dengan sebutan M-80A. Varian ini memiliki mesin yang lebih kuat dan arm...

 

Pour les articles homonymes, voir 56e régiment. Cet article est une ébauche concernant une unité ou formation militaire française. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Consultez la liste des tâches à accomplir en page de discussion. 56e régiment d’infanterie Insigne régimentaire du 56e régiment d’infanterie. Création 1635 Dissolution 1940 Pays France Branche Armée de terre Type Ré...

 

Pour les articles homonymes, voir 36e division. 36e division第36師団 Création 7 février 1939 Dissolution 1945 Pays Empire du Japon Branche Armée impériale japonaise Type Division d'infanterie Garnison Hirosaki Surnom Division Neige Guerres Seconde guerre sino-japonaiseCampagne de Nouvelle-Guinée modifier  La 36e division (第36師団, Dai-sanjū-roku shidan?) est une unité d'infanterie de l'armée impériale japonaise. Son nom de code est Division Neige (雪兵団, Yu...

Non lo faccio piùsingolo discograficoArtistaPeppino di Capri Pubblicazionefebbraio 1976 Duratamin : s Dischi1 GenerePopMusica d'autore EtichettaSplash Formati45 giri Peppino di Capri - cronologiaSingolo precedenteAmo/Love me as though there were no tomorrow(1975)Singolo successivoPazzo di te/Se io vado via(1976) Non lo faccio più/Vorrei, vorrei, vorrei è un singolo del cantautore italiano Peppino di Capri, pubblicato dall'etichetta discografica Splash nel 1976. Indice 1 Il disco 1.1 N...

 

مهرجان كان السينمائي 1961 البلد فرنسا  المكان كان، فرنسا الموقع الرسمي الموقع الرسمي تعديل مصدري - تعديل   مهرجان كان السينمائي لعام 1961 هو الدورة الـ14 للمهرجان عُقد في 3 إلى 18مايو من عام 1961،[1] حصل فيلم «الغياب الطويل» للمخرج الفرنسي هنري كولبي وفيلم «فيريديانا» للمخ...

 

زراعة عام أعمال تجارية زراعية علم الإنتاج النباتي حراجة زراعية علم الزراعة تربية الحيوان زراعة موسعة مزرعة نطاق حر زراعة آلية وزارة الزراعة زراعة مكثفة حيوان محاصيل زراعة عضوية زراعة معمرة زراعة بدون الحيوانات الزراعة المستدامة الجامعات زراعة حضرية تاريخ تاريخ الزراعة �...

Mountain in Kootenay NP, British Columbia, Canada Stanley PeakStanley Peak from Mt. Whymper, 2004Highest pointElevation3,155 m (10,351 ft)Prominence248 m (814 ft)ListingMountains of British ColumbiaCoordinates51°10′14″N 116°03′15″W / 51.17056°N 116.05417°W / 51.17056; -116.05417[1]GeographyCountryCanadaProvinceBritish ColumbiaProtected areaKootenay National ParkParent rangeBall RangeCanadian RockiesTopo mapNTS 82N1 Moun...

 

Ada usul agar artikel ini digabungkan dengan Institut Pertanian Bogor. (Diskusikan) Rektor Institut Pertanian BogorPetahanaArif Satriasejak 15 Desember 2017Menjabat selama5 TahunPemegang pertamaArif Satria (akademisi)Dibentuk1963 Rektor Institut Pertanian Bogor atau Rektor IPB adalah organ IPB yang memimpin penyelenggaraan dan pengelolaan IPB .[1] Rektor diangkat/diberhentikan oleh Majelis Wali Amanat untuk masa jabatan 5 tahun, setelah melalui proses pemilihan yang diadakan khus...

 

Physical or verbal attack of another person This article is about the criminal act. For tortious aspects of assault, see Assault (tort). For other uses, see Assault (disambiguation). Assailants redirects here. For the EP, see Assailants (EP). For the film, see Assailant (film). 1856 lithograph of the caning of Charles Sumner Criminal law Elements Actus reus Mens rea Causation Concurrence Scope of criminal liability Accessory Accomplice Complicity Corporate Principal Vicarious Severity of offe...

  لمعانٍ أخرى، طالع ييل (توضيح). ييل   الإحداثيات 36°06′53″N 96°41′54″W / 36.114722222222°N 96.698333333333°W / 36.114722222222; -96.698333333333   [1] تاريخ التأسيس 1895  تقسيم إداري  البلد الولايات المتحدة[2][3]  التقسيم الأعلى مقاطعة بايين  خصائص جغرافية  المساحة 2.35...

 

Monleale komune di Italia Tempat Negara berdaulatItaliaDaerah di ItaliaPiemonteProvinsi di ItaliaProvinsi Alessandria NegaraItalia Ibu kotaMonleale PendudukTotal562  (2023 )GeografiLuas wilayah9,62 km² [convert: unit tak dikenal]Ketinggian305 m Berbatasan denganBerzano di Tortona Montemarzino Sarezzano Volpeglino Montegioco Volpedo SejarahHari liburpatronal festival (en) Santo pelindungAmbrosius Informasi tambahanKode pos15059 Zona waktuUTC+1 UTC+2 Kode telepon0131 ID ISTAT006101 K...

 

Corrado del MonferratoSponsali di Corrado degli Aleramici e Isabella d'Angiò, sovrani di Gerusalemme (XIII secolo, Biblioteca Nazionale di Francia)Re di GerusalemmeStemma In carica24 novembre 1190[1] –28 aprile 1192(jure uxoris con Isabella di Gerusalemme) PredecessoreSibilla con Guido di Lusignano SuccessoreIsabella con Enrico II di Champagne Marchese del MonferratoIn carica1191 –1192 PredecessoreGuglielmo V SuccessoreBonifacio I NascitaMonferrato, 1140 circa MorteTir...

Islamic figure Kasim BabaTitleBabaPersonalBornFifteenth centuryResting placeKesriye (modern Kastoria, Greece); or in Kuç or Kapshticë, AlbaniaReligionIslamOrganizationOrderBektashi Part of a series on Bektashi OrderBektashi Order Historical figures Haji Bektash Veli Nesimi Balım Sultan Gül Baba Bektashi Dedebabate Sali Njazi Ali Riza Dede Kamber Ali Xhafer Sadik Abaz Hilmi Ahmet Myftar Baba Reshat Baba Mondi Bektashi sites Kryegjyshata Haji Bektash Veli Complex Arabati Baba Teḱe Durbal�...

 

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Vecsés District – news · newspapers · books · scholar · JSTOR (February 2017) (Learn how and when to remov...