Here are some favorite AS3 resources, which contain essentially everything you need to know about AS3. Still, google is the greater search tool, but look out for results from any of those sites.
www.kirupa.com
stackoverflow.com
www.ultrashock.com
www.gotoandlearnforum.com
www.actionscript.org
forums.adobe.com
www.senocular.com
blogs.adobe.com/aharui
November 25, 2011
November 11, 2011
CSS - Unordered lists with hyphen
Formatting unordered lists with hyphens, like:
- Bullet 1
- Bullet 2
This can be done manually by removing the default bullet and adding a hyphen sign, and adjusting margins, etc, such as:
<style>
ul.hyphen-list {
list-style-type: none;
margin-left: 1.5em;
padding-left: 1em;
text-indent: -0.85em;
}
ul.hyphen-list li:before {
content: "- ";
}
</style>
<ul class="hyphen-list">
<li>This is line 1<br/>part 2</li>
<li>This is line 2</li>
</ul>
For more information, see following resources:
/Sfynx
- Bullet 1
- Bullet 2
This can be done manually by removing the default bullet and adding a hyphen sign, and adjusting margins, etc, such as:
<style>
ul.hyphen-list {
list-style-type: none;
margin-left: 1.5em;
padding-left: 1em;
text-indent: -0.85em;
}
ul.hyphen-list li:before {
content: "- ";
}
</style>
<ul class="hyphen-list">
<li>This is line 1<br/>part 2</li>
<li>This is line 2</li>
</ul>
For more information, see following resources:
/Sfynx
November 01, 2011
Saving System.DateTime values into MySQL
When trying to save a DateTime value in a MySQL database, or loading MySQL date values into a DateTime object, you normally get an exception saying "Unable to convert MySQL date/time to System.DateTime".
One solution to this problem is to use the mysql connector library for .NET, which can be downloaded from here. Using the mysql connector, we can save our DateTime value into a MySqlDateTime datatype and the database will accept this value. Care should be taken if the MySQL date value is 0000-00-00 00:00:00 since this is outside the range of a DateTime object
Another solution is to format the DateTime into a string that MySQL recognizes.
For example:
This way MySQL accepts the date value.
One solution to this problem is to use the mysql connector library for .NET, which can be downloaded from here. Using the mysql connector, we can save our DateTime value into a MySqlDateTime datatype and the database will accept this value. Care should be taken if the MySQL date value is 0000-00-00 00:00:00 since this is outside the range of a DateTime object
Another solution is to format the DateTime into a string that MySQL recognizes.
For example:
string sql = "INSERT INTO mytable (text, created) " +
"VALUES (@text, @created)";
string text = "Hello World";
DateTime created = DateTime.Now;
MySqlCommand cmd = new MySqlCommand(sql, GetOpenConnection());
cmd.Parameters.AddWithValue("@text", text);
cmd.Parameters.AddWithValue("@created", created.ToString("yyyy-MM-dd hh:mm:ss"));
This way MySQL accepts the date value.
Subscribe to:
Posts (Atom)