Twitter ログインできない

  1. Firefox 3.5.3 でできない
  2. NoScript アドオンを解除してもできない
  3. パスワード書いたメール出してくれのボタン押してもメールが来ない
  4. IE8 で操作してもできない

紅茶姫の注意書き「窒素充填しているからふらないで」を見過ごしてふったけど無事だったって書きたいのになあ.

「Enabled = false; した後に文字色変えたらいいじゃんって思ったけど出来ませんでしたごめんなさい」のコード


Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace testTextBoXColor
{
	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			if (textBox1.ReadOnly)
				textBox1.ReadOnly = false;
			else
				textBox1.ReadOnly = true;
		}

		private void button2_Click(object sender, EventArgs e)
		{
			if (textBox1.Enabled)
				textBox1.Enabled = false;
			else
				textBox1.Enabled = true;
		}

		private void button3_Click(object sender, EventArgs e)
		{
			if (textBox1.Enabled)
			{
				textBox1.Enabled = false;
				// http://dobon.net/vb/dotnet/control/tbenabledfalse.html
				// ただし、ForeColorはこの方法では変更できないようです。(.NET Framework 1.1、2.0で確認)
				textBox1.ForeColor = Color.Black;
			}
			else
			{
				textBox1.Enabled = true;
			}
		}
	}
}

Form1.Designer.cs

namespace testTextBoXColor
{
	partial class Form1
	{
		/// <summary>
		/// 必要なデザイナ変数です。
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary>
		/// 使用中のリソースをすべてクリーンアップします。
		/// </summary>
		/// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		#region Windows フォーム デザイナで生成されたコード

		/// <summary>
		/// デザイナ サポートに必要なメソッドです。このメソッドの内容を
		/// コード エディタで変更しないでください。
		/// </summary>
		private void InitializeComponent()
		{
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// textBox1
			// 
			this.textBox1.ForeColor = System.Drawing.Color.Black;
			this.textBox1.Location = new System.Drawing.Point(22, 25);
			this.textBox1.Multiline = true;
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(215, 154);
			this.textBox1.TabIndex = 0;
			this.textBox1.Text = "\r\nのようにして、最後に付け加えた\r\nend の文字だけ色をかえているのですが、\r\n選択された状態になってしまいます。\r\nマウスでドラックしている状態です。\r\n\r" +
				"\nこれを解除した状態で文字色をかえるにはどうしたらいいのでしょうか。\r\n質問投稿日時:08/07/02 12:43\r\n質問番号:4145471\r\nこの質問に対す" +
				"る回答は締め切られました。";
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(22, 198);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 63);
			this.button1.TabIndex = 1;
			this.button1.Text = "ReadOnly on/off";
			this.button1.UseVisualStyleBackColor = true;
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(103, 198);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(75, 63);
			this.button2.TabIndex = 1;
			this.button2.Text = "Enabled on/off";
			this.button2.UseVisualStyleBackColor = true;
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(184, 198);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(75, 63);
			this.button3.TabIndex = 1;
			this.button3.Text = "ぼくの考えた対策 on/off";
			this.button3.UseVisualStyleBackColor = true;
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// Form1
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(292, 275);
			this.Controls.Add(this.button3);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.textBox1);
			this.Name = "Form1";
			this.Text = "Form1";
			this.ResumeLayout(false);
			this.PerformLayout();

		}

		#endregion

		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
	}
}

不思議な「error C2143: 構文エラー : '}' が '定数' の前にありません。」がやっと解決した

私の場合は NO_DATA が引っかかった.「すべての参照の検索」で WinSock.h 679行目で定義されていることが分かった.

#define NO_DATA                 WSANO_DATA

対策として,NO_DATA を記述する直前にこう記述した.

#ifdef NO_DATA
	// WinSock.h 679 行で定義されている可能性がある.ここで undef する
#undef NO_DATA
#endif

361 :デフォルトの名無しさん:2009/03/11(水) 00:53:32
Visual C++2005

で、ヘッダファイルに以下のように記述したところ
コンパイルエラーが出ました。
記述しているのはファイルの10行目です。

    typedef enum {FALSE, TRUE} Boolean;

エラー内容

    sub.h(10) : error C2143: 構文エラー : '}' が '定数' の前にありません。
    sub.h(10) : error C2143: 構文エラー : ';' が '}' の前にありません。
    sub.h(10) : error C2059: 構文エラー : '}'

何が間違っているのでしょうか?
よろしくお願いします。

362 :デフォルトの名無しさん:2009/03/11(水) 00:58:56
>>361
たぶん、どっかに

    #defnie FALSE 0
    #defnie TRUE 1

と定義されている

363 :デフォルトの名無しさん:2009/03/11(水) 01:04:26
>>何が間違っているのでしょうか?
今更真偽値を自分で定義しようとしていること。

364 :361:2009/03/11(水) 01:38:47
>>362-363
大変よくわかりました
解決しました。ありがとうございます。

C言語なら俺に聞け(入門篇) Part 46 361-364

Subversion リポジトリをまた作ったからメモしておく

環境

  • Visual C++ 2008 Express Edition のプロジェクトを管理したい
    • Windows XP SP3 のマシンで開発し,Subversion クライアントソフトとして TortoiseSVN 1.6.5, Build 16974 をインストールしている
  • 同じネットワークにある Ubuntu マシンが Subversion サーバをやっている
  • Apache と連携させている

Subversion 管理下に置きたいデータが既にできあがっている状態だ..sln やら .cpp やら .h やらがあるのだ.

操作メモ

  1. Subversion サーバを操作する.リポジトリを作成し,所有者を root から www-data に移す
    1. sudo svn create /home/svn/
    2. sudo chown -R www-data.www-data /home/svn/
  2. クライアントマシンを操作する
    1. VC++ ソリューションファイルがあるフォルダを右クリック,リポジトリブラウザ
    2. さっき作った Subversion サーバのリポジトリフォルダに移動し,trunk フォルダを作成し,閉じる
    3. VC++ ソリューションファイルがあるフォルダを右クリック,SVN チェックアウト
    4. チェックアウトディレクトリにさっき作った trunk までのパスを入力し,実行する
    5. VC++ ソリューションファイルがあるフォルダを右クリック,SVN コミット
    6. メッセージを入力し,コミットしたいファイルを選択し,実行する

更新履歴

2010年2月1日 0:49:56 操作メモが不適切だったから修正した.

svn create でなく mkdir していると,次のエラーメッセージを見る.

<D:error>
<C:error/>
<m:human-readable errcode="2">
Could not open the requested SVN filesystem
</m:human-readable>
</D:error>

svn create をしていても chown にオプション -R をつけていない場合,Subversion クライアント(TortoiseSVN など)で次のメッセージを見る.

Can't open file '/home/svn/<repository_name>/db/txn-current-lock': Permission denied