1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

概要

paiza.ioでelixirやってみた。
練習問題やってみた。

練習問題

zipをダウンロードして、解凍して、読め。

サンプルコード

:inets.start
:ssl.start

{:ok, {_status, _headers, body}} = :httpc.request('http://hp.vector.co.jp/authors/VA005129/support/arc/cswz.zip')
#|> IO.inspect
{:ok, file} = File.open("test.zip", [:write])
IO.binwrite(file, body)
File.close(file)
zip = "test.zip"
zip
|> String.to_char_list
|> :zip.unzip
#|> IO.inspect
File.read("CS.TKW")
|> IO.inspect



実行結果

{:ok,
 "<SenseCase=1>\r\nabstract\r\nas\r\nbase\r\nbool\r\nbreak\r\nbyte\r\ncase\r\ncatch\r\nchar\r\nchecked\r\nclass\r\nconst\r\ncontinue\r\ndecimal\r\ndefault\r\ndelegate\r\ndo\r\ndouble\r\nelse\r\nenum\r\nevent\r\nexplicit\r\nextern\r\nfalse\r\nfinally\r\nfixed\r\nfloat\r\nfor\r\nforeach\r\ngoto\r\nif\r\nimpliit\r\nin\r\nint\r\ninterface\r\ninternal\r\nis\r\nlock\r\nlong\r\nnamespace\r\nnew\r\nnull\r\nobject\r\noperator\r\nout\r\noverride\r\nparams\r\nprivate\r\nprotected\r\npublic\r\nreadonly\r\nref\r\nreturn\r\nsbyte\r\nsealed\r\nshort\r\nsigned\r\nsizeof\r\nstackalloc\r\nstatic\r\nstring\r\nstruct\r\nswitch\r\nthis\r\nthrow\r\ntrue\r\ntry\r\ntypedef\r\nunit\r\nulong\r\nunchecked\r\nunsafe\r\nushort\r\nusing\r\nvirtual\r\nvoid\r\nvolatile\r\nwhile\r\n"}

成果物

以上。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?