2015-01-01から1年間の記事一覧
こんなかんじ Androidをおもしろくする会 : List View
ーーーーーー method obsolete、primitive intなどのエラーが int to stringをしたあとlengthを求めるときにでる 問題: int n = stdIn.nextInt(); Integer.toString(n); 解決: int n = stdIn.nextInt(); String n_string = Integer.toString(n); 代入して…
エラー: 入力した変数が代入されない 原因:入れる値の名前とそれを代入する先の変数が同じ名前。 Bank(int num, int pass, int money, String name){ number = num; password = pass; money = money; name = name; } 解決(全コード): class Bank { privat…
重回帰分析にてy = ax + bのを逆にするといけない。 間違えの例: R^2 = 0.97y = ypred予測結果の数X = sales_normmod = sm.OLS(y, X) # Describe modelres = mod.fit() # Fit modelprint res.summary() # Summarize model# show the intercept, etcprint re…
追加する: import datetimeimport mathimport sys Terminal: Python; コードを追加したときはexit()してもう一度やる Pythonで日本の祝日判定をするスクリプト - brainstormd.hatena.ne.jp もとのコード: http://www.h3.dion.ne.jp/~sakatsu/holiday_logic…
回帰分析 0:とは 定義: <a href="http://tokeigaku.blog.jp/python/numpy/%E9%87%8D%E5%9B%9E%E5%B8%B0%E5%88%86%E6%9E%90" data-mce-href="http://tokeigaku.blog.jp/python/numpy/%E9%87%8D%E5%9B%9E%E5%B8%B0%E5%88%86%E6%9E%90">Python…
参考: Python - matplotlib (+ pandas) によるデータ可視化の方法 (4) - Qiitaqiita.com コード: import MySQLdbfrom pylab import * import sysimport numpy as npimport matplotlib.pyplot as plt# newfrom pandas import * # Aminatoa = read_csv('mina…
やろうとしたこと(1): 天気と気温のクロス集計 使ったこと: pandas.crosstab — pandas 0.16.2 documentation 参考: Python - matplotlib (+ pandas) によるデータ可視化の方法 (4) - Qiitaqiita.com エラー: ValueError: If using all scalar values,…
参考: from pylab import * x = arange(1, 10, 0.1) y1 = sin(x) y2 = cos(x) # 上の行のグラフ subplot(211) plot(x, y1) xlabel("1") # 上の行のxlabel # 下の行のグラフ subplot(212) plot(x, y2) xlabel("2") # 下の行のylabel show() matplotlibのグラ…
ここからグラフの形をえらんで作れる: matplotlib を使う場合 グラフの例:Thumbnail gallery — Matplotlib 1.4.3 documentation import MySQLdbfrom pylab import *import sysimport numpy as npimport matplotlib.pyplot as pltimport datetimefrom matplo…
簡単な式や数字をグラフにする: 1: Pyplot tutorial — Matplotlib 1.4.3 documentation ----参照:numpy.arange — NumPy v1.9 Manual 2: Pythonのmatplotlibの使い方メモ | 未分類 | hydroculのメモ 3: 1.4. Matplotlib: 作図 — Scipy lecture notes 1:例 #…
matplotlib pygal -プレゼンなど用 ーー matplotlib インストール方法 Last login: Thu Jul 30 15:18:49 on ttys000 ➜ ~ pip install matplotlib /Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatfo…
<a href="http://labs.xica-inc.com/2014/06/7terms-to-understand-multiple-regression-analysis/" data-mce-href="http://labs.xica-inc.com/2014/06/7terms-to-understand-multiple-regression-analysis/">重回帰分析を理解するために知っておきた…
エラー: > ggplot(mau.payment.summary, aes(x = log_date, y = total.payment, fill=user_type))+geom_bar()+scale_y_continuous(label=comma)Error : Mapping a variable to y and also using stat="bin". With stat="bin", it will attempt to set the y…
問題:Rのパッケージがインストールできない 詳細 Rターミナル: > install.packages(plyr)Error in install.packages(plyr) : object 'plyr' not found (ここでGUI設定から"Install"へ) trying URL 'http://cran.ism.ac.jp/bin/macosx/mavericks/contrib/…
Rについて ・Rエディタにて データ参照 6pieces of info まで ーwhy, 設定どこ ・省略しているのはなに: r table [, c("")] p.104 以下のグラフ。 A, B の差+-を表したい。その計算方法がわからない。 分岐 方法:それぞれのlog_date について、test_case …
参考書: SBクリエイティブ:【ダウンロード】『ビジネス活用事例で学ぶ データサイエンス入門』事例用データとRのソースコード 環境構築: すべての参考:R - 事始め インストールする:
成功した記録: mysql> select restaurant_master.place_id, rating.place_id, AVG(rating) FROM restaurant_master LEFT JOIN rating ON restaurant_master.place_id = rating.place_id GROUP BY restaurant_master.place_id; エラー:ambiguous; mysql> se…
mysql LOAD DATA INFILEコマンドは実行できるがデータをインポートできなかったとき 例: mysql> LOAD DATA INFILE "/Users/HOka/abeja/Intern_Daily.csv" INTO table minatoA2 FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' lines terminated …
cvsファイルのデータをMySQLへ読み込む方法: mysql> LOAD DATA LOCAL INFILE "ファイルの絶対パス/ファイル名.csv" INTO table テーブル名小文字 FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' IGNORE 1 LINES; ー…
➜ ~ python Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = 1 >>> a 1 >>> a = "abc" >>> a 'abc' >>>…
不要な「,」などがあると以下のようなエラーが出ます。 エラーの出たチュートリアル:「データの追加」箇所 データベースによるデータ管理 | 東京大学グローバル消費インテリジェンス寄附講座 ーーーーーーーーーーーターミナル エラー文(1): Traceback …
データベースを使う課題のチュートリアルに沿っていたところ、 以下のようなエラーになってしまいました。 エラー:---------------ターミナル Traceback (most recent call last): File "testmysql.py", line 14, in <module> database=config.database, AttributeE</module>…
1:パソコン設定より、mysql をオンにする。 2:「mysql -u usernameをここにかく -p 」とTerminalで打つ 3:quitで閉じる <a href="http://www.dbonline.jp/mysql/connect/index1.html" data-mce-href="http://www.dbonline.jp/mysql/connect/index1.html">MySQLコマンドラインツールの起動 - MySQLコマンドラインツールの使い方</a>www.dbonline.jp 3:データベースの操作を練習 1. データ…
参考文献を読んだまとめ。 ・目的の明確化 Facebookでのコンテンツマーケティングは、長期的なファン、ブランドを作るために有効。短期的な顧客獲得のためには他の手法が効果的かもしれない。 SEO対策のためには現在のGoogleアルゴリズムであ、Twitterが一番…
WordPress.comではセキュリティのためプラグインを使えません。ということでした・・ WordPress.orgでサイトを作らなければいけない。
app/assets/images のなかの earth.pngをbackground-imageとしたいとき 解決: viewにて: <div class="intro-header" style="background-image:url(<%= asset_path "earth.jpg" %>)"> 失敗: stylesheet, cssにて /*background-image: url("earth.jpg");*/ /*background-image: url("../images/earth.jpg");*/</div>
これをやってもだめだった。 Background image not showing up in herokustackoverflow.com
syntax error, unexpected ';', expecting :: or '[' or '.' ...い</h4>\n", 0, false);end;end;_hamlout.push_text(" ... ... %ul.nav.nav-tabs %li.active %a{"data-toggle" => "tab", :href => "#1"} %h4 国内 %li %a{"data-toggle" => "tab", :href => "#2"} …
問題:method: :deleteなのに[GET]routeがないというエラーが出る。 エラーメッセージ:(rails c、コンソールより)ActionController::RoutingError (No route matches [GET] "/sessions"): HTML: ~~~~ <%- if logged_in? %> <%= "ログイン名:"%> <%=@user.na…