Posts

Showing posts from December 31, 2018

Joseph L. Hooper

Image
Joseph Lawrence Hooper (* 22. Dezember 1877 in Cleveland, Ohio; † 22. Februar 1934 in Washington, D.C.) war ein US-amerikanischer Politiker. Zwischen 1925 und 1934 vertrat er den Bundesstaat Michigan im US-Repräsentantenhaus. Werdegang | Im Jahr 1891 kam Joseph Hooper mit seinen Eltern nach Battle Creek in Michigan, wo er die öffentlichen Schulen besuchte. Nach einem anschließenden Jurastudium und seiner im Jahr 1899 erfolgten Zulassung als Rechtsanwalt begann er dort in seinem neuen Beruf zu arbeiten. Zwischen 1901 und 1903 war er Gerichtsbeauftragter ( Court Commissioner ) für das Calhoun County; dort fungierte er außerdem von 1903 bis 1907 als Bezirksstaatsanwalt. Von 1916 bis 1918 war Hooper juristischer Vertreter der Stadt Battle Creek. Politisch war Hooper Mitglied der Republikanischen Partei. Nach dem Tod des Kongressabgeordneten Arthur B. Williams wurde er bei der fälligen Nachwahl für den dritten Sitz von Michigan als dessen Nachfolger in das US-Repräsentantenhaus in Washing

Identity Server 4 AddInMemoryIdentityResources

Image
0 I was wondering if somebody can explain to me what AddInMemoryIdentityResources is used for when registering identity server during startup. From the examples they have shown it looks like this (note the code between comments): services.AddIdentityServer() .AddDeveloperSigningCredential() .AddInMemoryPersistedGrants() //******************** .AddInMemoryIdentityResources(Config.GetIdentityResources()) //******************** .AddInMemoryApiResources(configurationManager.GetApiResources()) .AddInMemoryClients(configurationManager.GetClients()) .AddAspNetIdentity<User>(); Then the config file is something like this: public static IEnumerable<IdentityResource> GetIdentityResources() return new List<IdentityResource> new IdentityResources.OpenId(), new IdentityResources.Profile(), ; Now, I thought that when you declare a client you define the scopes which basically say you are allowed to pass username, id, etc... However, then what is the point of this

How to handle double “~” in Python path?

Image
-1 The user input a path, so in Unix, he/she may enter ~/../../~ . And I want Python to convert that to a absolute path. How to do that? The os.path.expanduser() can only expand the first ~ , but not the following ones ~ So you will only get os.path.expanduser(~/../../~) = /Users/somebody/../../~ Thanks python path share | improve this question asked Nov 11 '18 at 19:28 Han XIAO 402 2 11 Bash also only expands ~ if it's the first character in the path, just like os.path.expanduser() – Thierry Lathuille Nov 11 '18 at 19:34 @ThierryLathuille great. Thanks for pointing this out! – Han XIAO Nov 11 '18 at 19:35 @ThierryLathuille don't think it as a stupid question though. – Han XIAO Nov 11 '18 at 19:36 add a comment  |  -1 The user input a path, so in Unix, he/she may enter ~/../../~ . And I want Python to convert that to a absolute path. How to do that? The os.pa