A good article to share.
IT Info Sharing
My blog is especially for those who are interesting on computer technology and want to get more knowledge on it. No matter Computer & Hardware, Cyberculture, Gadgets, Gaming, Languages & Formats, Mobile, Multimedia, News, Software or Websites we also manage to give you as much info that we know. Our sharing is free of charge, just become one of us and sharing your knowledge about it.
Wednesday, September 21, 2011
Saturday, June 25, 2011
Crystal Report in Visual Studio 2010
Crystal Report is a easy tool for us to design and generate report from data source. But unfortunately, Visual Studio 2010 didn't included it, you need to download from SAP as add-on application. Plus, if you using Visual Studio Express 2010 you may not to using features like editing .rpt file, export as pdf file format, etc. Express version only install runtime which enable you to view crystal report. Another weakness of Crystal Report in Visual Studio 2010 is when you put your crystal report to server, your server need to install runtime in order to view crystal report. It's quite inconvenience for those company which sell their product to client because need to include runtime msi which occupied up to 70MB. For your more information, please take a look here. Thanks~ =)
Labels:
Crystal Report,
Visual Studio 2010
Wednesday, June 15, 2011
Generate JSON from MySQL using C#
I would like to share this article because I try to search some related posts or articles and found out it was rare when compare with other topics. Hence, I do it by myself and hope you can get what you want from here.
Before start write your coding, please make sure you add reference Newtonsoft.Json. If you haven't get it, please download from here.
Define your mySQL connection first and write your query.
- MySqlConnection conn = new MySqlConnection(
- "server=localhost;" +
- "uid=xx;" +
- "pwd=xx;" +
- "database=xx;");
- MySqlCommand comm = new MySqlCommand();
- conn.Open();
- comm = conn.CreateCommand();
- comm.CommandText = "SELECT name FROM student";
- MySqlDataReader reader = comm.ExecuteReader();
- List<Student> eList = new List<Student>();
Don't forget to build constructor to get and set.
- public class Student
- {
- public string Name;
- }
- while (reader.HasRows)
- {
- if (reader.Read())
- {
- e.Name = Convert.ToString(reader["Name"]);
- eList.Add(e);
- }
- else
- {
- break;
- }
- }
Convert to JSON format.
- System.Web.Script.Serialization.JavaScriptSerializer oSerializer = new System.Web.Script.Serialization.JavaScriptSerializer();
- string ans = oSerializer.Serialize(eList);
- string script = "{\"Employee\": " + ans + "}";
- ClientScriptManager cs = Page.ClientScript;
- cs.RegisterStartupScript(Page.GetType(), "JSON", script, true);
- Response.ContentType = "application/json";
- Response.Write(script);
Check your aspx file in browser.
Sharing is caring. =)
Sunday, June 12, 2011
Titanium Developer SDK loading Issue
Well, I'm new in Titanium Developer, hence a lot of things still in confuse condition. One of the problem I faced when I start develop my iPhone Application through Titanium Developer was when I run my Test & Package, my SDK appear loading... which mean it doesn't detect any path of my latest SDK version(I using old version Titanium while my Xcode and SDK version are latest one). When you go through Library/Application Support/mobilesdk/osx/ and inside osx folder only contains oldest version such as 1.2.x or 1.4.x folder. So what you need to do is update your version. Click here to download the latest Titanium SDK version. Extract the zip file and move it inside osx folder. Also, you need to recreate your project to make sure your Titanium SDK version is latest version. Check back your Test & Package, loading problem is no longer there.
Sharing is caring~ =)
Labels:
iPhone,
Titanium Developer
Friday, June 10, 2011
Page Without Cache in C#
This question have been trouble me for whole day, just because i put my coding in wrong page. So, please make sure your page which don't want store any cache have following coding.
protected void DisableBufferingOnPage()
{
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
// set expiry date in the past
Response.Expires = -1500;
Response.CacheControl = "no-cache";
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
Response.AppendHeader("Cache-Control", "no-cache");
Response.CacheControl = "no-cache";
Response.Expires = -1;
Response.ExpiresAbsolute = new DateTime(1900, 1, 1);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now);
Response.Cache.SetAllowResponseInBrowserHistory(false);
}
Please call this function at Page_Load. Also, if you record your session when log in please make sure it is clear and abandon when log out.
Session.Clear();
Session.Abandon();
So, when you log out even you click back button also cannot go previous page unless you log in.
Sharing is caring~ Cheers~ =)
Saturday, November 6, 2010
Ctrl + Alt + Copy or Paste
When you copy the part of article from wikipedia or some information website which contain HTML links, this HTML link will remain its blue color and underline once you paste this article on your Microsoft Word or PowerPoint.
Here are the way to solve it.
Using Ctrl + Alt + C when you copy and paste it with Ctrl + Alt + V~
Here are the result:
P/S: This copy and paste only affect those html link only. The number such likes [1] will remain its position so you have to delete it by yourself.
Have fun and enjoy it. =)
IE 8 Multi-login
Do you know that Internet Explorer 8 (IE 8) can multi login?
What's multi login means?
It's means that you have more than one account of same website.
For an instance, Facebook only can accept about 5000 friends.
So if you have more than that, you need have to open a new account.
But to develop two accounts in one time, for sure you need to login and logout many time unless you open two browsers in one time.
That's the way you can develop it in one time which using IE 8 provides multi login.
It's not a plugin which you need to download it. It is default feature of your IE 8.
Here is the way~~
For Google Chrome and Mozilla Firefox user, you can search extension chrome or plugin Firefox to have similar feature with this.
Have fun and enjoy it. =)
Subscribe to:
Posts (Atom)