Every court and judge, justice and clerk thereof, notaries public, certified court reporters and certified shorthand reporters, shall respectively have power to administer oaths and affirmations to witnesses and others concerning any thing or proceeding pending* before them, respectively, and to administer oaths and take affidavits and depositions within their respective jurisdictions, in all cases where oaths and affirmations are required by law to be taken.