Xceedas

Xceedas
xceedas

Friday 27 February 2015

Learn C# 6 from Experts

On March 05, learn C# 6 from best-selling author Bill Wagner and Microsoft Program Manager, Anthony Green. This is a FREE fast paced virtual live session from 9am to 5pm.

 
MVP and best-selling author Bill Wagner teams up with Microsoft Program Manager Anthony Green to explore auto property initializers, expression bodied members, null propagation operators, exception filters, string interpolation, and more. Find out how these new language features can make you more efficient. And see how easy it is to look at your code, diagnose issues, and solve problems.
Course Outline:
  • C# Productivity, Conciseness
  • Data Transfer Object Support
  • String Handling
  • Exceptions and Error Handling
  • Adopting C# 6


Five Personal Tips to Build a Successful Business, Tony Elumelu

Five Personal Tips to Build a Successful Business

I gave a talk at the Lagos Business School ‘Dinner with…’ event earlier this week, where I addressed the room and shared my journey thus far. For budding entrepreneurs or those climbing the corporate ladder, read my tips below, which I hope will aid your own journey.

#1 Save Money Religiously- I am a firm believer in saving a portion of your earnings on a monthly basis. My father used to say that if I couldn't save one naira from the little I earned, then I won’t be able to save anything if I earned one billion. Saving is a vital tool in investing in your future.

#2 Work Hard- The difference between talent and hard work is that one is innate and the other can be acquired through sheer determination. Those who are relentless in the pursuit of excellence will always yield results. Growing up, my mother was extremely hard working and through running her businesses she taught me the power of resilience.

#3 Seize Opportunities- Be aware of your risk tolerance and weigh up the value of an opportunity according to the potential losses and gains. After assessment- act! Do not be afraid to take a step because you fear the outcome. As the saying goes, fortune favours the bold.

#4 Feed Your Mind- In the pursuit of success, arm yourself with people and things that will nourish you mentally. I was always an avid reader, and would seek business and self-development books, articles and papers that would challenge my thinking and allow me gain insight and breed new ideas.

#5 Think Long Term- In all that you do, consider the bigger picture. How will this impact me, my family and community? Both now and 10 years from now. Be broad in your thinking and whether personally or professionally, aim for longevity.

If you have a start-up business or an idea that you are ready to see come to fruition, apply for my entrepreneurship programme, the portal closes at midnight WAT, this Sunday 1st March. Apply here: http://bit.ly/1vDvEzN

Wednesday 25 February 2015

Birthday Wish Scheduler in C#


Here we are going to see how to build a windows service for fetching record from database and wishing the person whose birthday falls on that particular day.
The following figure shows the snapshot of the table, which is being used with this application.

The service fetches record for the employee whose birthday falls on particular day and sends him a birthday wish through mail.
Note: Little bit lazy to change the name of the service in the attached code. You can give whatever name to the service that suits you.
The default code of Service1.cs added by the Wizard looks like here
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Data.SqlClient;
using System.Web.Mail;
using System.IO;
namespace BirthdayWish
{
          public class Service1 : System.ServiceProcess.ServiceBase
          {
                    /// <summary>
                    /// Required designer variable.
                    /// </summary>
                    private System.ComponentModel.Container components = null; 
                    public Service1()
                    {
                             // This call is required by the Windows.Forms Component Designer.
                             InitializeComponent();

                             // TODO: Add any initialization after the InitComponent call
                    } 
                    // The main entry point for the process
                    static void Main()
                    {
                             System.ServiceProcess.ServiceBase[] ServicesToRun;
         
                             // More than one user Service may run within the same process. To add
                             // another service to this process, change the following line to
                             // create a second service object. For example,
                             //
                             //   ServicesToRun = new System.ServiceProcess.ServiceBase[] {new Service1(), new
                             MySecondUserService()};
                             //
                             ServicesToRun = new System.ServiceProcess.ServiceBase[] { new Service1() }; 
                             System.ServiceProcess.ServiceBase.Run(ServicesToRun);
                    }

                    /// <summary>
                    /// Required method for Designer support - do not modify
                    /// the contents of this method with the code editor.
                    /// </summary>
                    private void InitializeComponent()
                    {
                             //
                             // Service1
                             //
                             this.ServiceName = "Service1"; 
                    }

                    /// <summary>
                    /// Clean up any resources being used.
                    /// </summary>
                    protected override void Dispose( bool disposing )
                    {
                             if( disposing )
                             {
                                       if (components != null)
                                       {
                                                components.Dispose();
                                       }
                             }
                             base.Dispose( disposing );
                    }

                    /// <summary>
                    /// Set things in motion so your service can do its work.
                    /// </summary>
                    protected override void OnStart(string[] args)
                    {
                             // TODO: Add code here to start your service.    
                    }

                    /// <summary>
                    /// Stop this service.
                    /// </summary>
                    protected override void OnStop()
                    {
                             // TODO: Add code here to perform any tear-down necessary to stop your service.
                    }

Adding functionality to the service

/// <summary>
/// Set things in motion so your service can do its work.
/// </summary>
protected override void OnStart(string[] args)
{
       // TODO: Add code here to start your service.
       SqlConnection conn  = new SqlConnection("Server=localhost;UID=sa;pwd= ;Database=Birthday");
       SqlDataAdapter da = new SqlDataAdapter("select * from Empdata",conn);
       DataSet ds = new DataSet();
       da.Fill(ds);
       foreach(DataRow dr in ds.Tables[0].Rows)
       {
                       DateTime dtDob = (DateTime)dr["emp_dob"];
                       DateTime now = DateTime.Now;
                       string dow = now.DayOfWeek.ToString().ToLower();
                       if (dow=="monday")
                       {
                                    DateTime daybefore = now.AddDays(-1);
                                    if((dtDob.Day == daybefore.Day) && (dtDob.Month == daybefore.Month))
                                    {
                                             sendmail(dr);
                                    }
                                    if((dtDob.Day == now.Day) && (dtDob.Month == now.Month))
                                    {
                                             sendmail(dr);
                                    }
                       }
                       else
                       {
                           if((dtDob.Day == now.Day) && (dtDob.Month == now.Month))
                           {
                                   sendmail(dr);                            
                           }
                       }
       }
       ServiceController[] services=ServiceController.GetServices();
       // Iterating each service to check that if a service named
       // Service1 is found then check that its status whether
       // it is running or stopped. If found running then it will
       // stop that service; else it starts that service
       foreach(ServiceController x in services)
       {
             if(x.DisplayName=="Service1")
             {
                  if (x.Status==System.ServiceProcess.ServiceControllerStatus.Running)
                  {
                        x.Stop();
                  }
                  else
                  {
                        x.Start();
                  }
             }
       }
}

public bool sendmail(DataRow dr1)
{
          String mailtxt="";
          MailMessage mm = new MailMessage();
          mm.BodyFormat = MailFormat.Html;
          mm.To = dr1["emp_email"].ToString();
          mm.From = "abc@abc.com";
          mm.Subject="Happy Birthday";
          mailtxt = "<font face='verdana' color='#FF9900'><b>"+"Hi "+dr1["emp_name"].ToString()+"," +
          "</b></font><br><br>";
          mailtxt=mailtxt+"<font face='verdana' color='#FF0000'><b>"+"Wishing you a very HAPPY
          BIRTHDAY........and many more." + "</b></font><br><br>";
          mailtxt=mailtxt+"<font face='verdana' color='#008080'><b>"+"May today be filled with sunshine and
          smile, laughter and love." + "</b></font><br><br>";
          mailtxt=mailtxt+"<font face='verdana' color='#0000FF'><b>Cheers!" + "<br><br>";
          mm.Body = mailtxt;
          SmtpMail.SmtpServer = "localhost";
          SmtpMail.Send(mm);
          return(true);
}

Note: It also checks for person whose birthday falls on Sunday and wishes them on coming Monday.

Install and Run the Service

Build of this application makes one exe, BirthdayWish.exe. You need to call installutil to register this service from command line.

installutil C:\BirthdayWish\ BirthdayWish\in\Debug\ BirthdayWish.exe

You use /u option to uninstall the service.

installutil /u C:\BirthdayWish\ BirthdayWish\in\Debug\ BirthdayWish.exe

Run the application

Note: Path for installutil is c:/windows/Microsoft.NET/Framework/V1.1.4322

Start and Stop the Service

You need to go to the Computer Management to Start to start and stop the service. You can use Manage menu item by right clicking on My Computer. 

Or

You can view the services through Start -> Control Panel -> Administrative Tool -> Services.


Here you will see the service Service1. Start and Stop menu item starts and stops the service.

You can also set the properties of the service by right clicking it and clicking the Properties menu.


Test the Service

Test by using your own email address and current date in your record. A mail will be sent to your email address. This means that the service is working fine.

That's it.
 source:http://www.c-sharpcorner.com/UploadFile/prvn_131971/BirthdayWishScheduler02022006012557AM/BirthdayWishScheduler.aspx

Naija Magz

 All in one Nigeria Magazine Android mobile application.
click the link for a demo

https://play.google.com/store/apps/details?id=com.pethahiah.NaijaMagzxxxxxxxxxx&hl=en_GB

Tuesday 24 February 2015

7 Ways To Get Your App Visible on Google Play

PlayBytes, an online series by Google shares some helpful tips about getting discovered on Google Play search, here’s the inaugural episode by Dan Lavelle followed by tips we’ve summed up:


Many assume that there shouldn’t be so much to do other than coming up with a good app. Isn’t a good product jusr enough to sell itself? Well, the sad truth is – no, it’s not. There is a lot of research and strategic thought that have to be done to ensure that an app will be visible for the right target group or during a search on the Google play store.

Untitled
 

1. Test Your App

There is nothing like first impression, and users that experience a bug (Crash, UI not showing right or usability issues) in an app will most probably drop it right away, 96% of the straggling users will write up a bad review, and 44% will immediately delete the app says a recent mobile app survey.

It is crucial to test your app prior to the launch and with each new update. Try services as TestObject to conduct mobile app testing including stress testing, Install and launch on multiple Android versions and devices and custom UI testing from your browser in a matter of minutes.

TestObject Android app testing
Good app reviews starts with a good user experience – TestObject

2. Get Your App Out There

Beginner’s tip: If it’s your first time publishing, verify that your app is actually published (not on draft) and available on the production track (not on the alpha or beta tracks). If you recently moved your APK to alpha or beta tracks, make sure you click the “Move to Prod” on the version you want to push to production.
Remember: it may take up to a few hours for your changes to appear on Google Play.
alpha testing Google developers console
get feedback on your new app or app update early in its development and make sure your users are happy with the results

3. Target Your Audience

Double check your configurations to make sure your app is visible for the right audience you have defined. Check your app’s pricing and distribution page to make sure you have targeted all the countries you want to distribute to, click show options to verify you haven’t restricted distribution to any particular wireless carrier
Double check your country targeting
Double check your country targeting

4. Define Compatibility

Make sure your configurations don’t exclude any device. From the APK page under supported devices click “see list” to view the device compatibility list. By default you will see all the supported devices but you can also filter your list to see unsupported devices (due to your configurations) or devices you have manually excluded.
Narrow down the target group of you app by your app's specifications
Narrow down the target group of you app by your app’s specifications
To show in search results for a specific device consider its feature requirements. click the APK version number to get a summery of your app’s details:
Get as much information form the user when looking at compatibility
Get as much information form the user when looking at compatibility

For some of the criteria, devices that don’t support your APK will de automatically omitted.
For example: if your app’s minimum API level is 16+ only users of JellyBean and above will see your apps on search results when searching Google play on their device.

5. Title and Description

Google encourages us to come up with titles that are focused, unique and avoid too many common words (Why? They obviously won’t tell). The description should be thorough but remember that most of the text will be hidden under a “Read More” button. Make sure you include what’s most valuable and important to users above that fold.

Don’t be afraid to think about your app marketing with SEO mindset. Keywords will get your app to the people who are looking for it. Search makes the vast majority of installs, so help your users find you by incorporating the most important keyword in your app’s title and as early as possible in your app’s description.

Check out this great talk by Google Play’s Ankit Jain.

6. Research For Insights

Getting more data about user behaviour can be critical to improving your apps. You can integrate mobile app analytics from Google Analytics to insights about your user behaviour, judge the effectiveness of your marketing efforts and get a better understanding of your audience.
Read more here: On Which Devices Should You Test Your App?
pp statistics
App statistics about installation performance over time

7. Nothing Like User Experience

Lastly and most importantly you should aim to deliver a high quality and lasting experience for users. Encourage users to provide feedbacks and +1 recommendations. Remember to respond to users that have had a bed experience that can be the difference in making a 1 star review into 5.
User ratings play a huge role in visibility
User ratings play a huge role in visibility
I know it’s obvious, but if Google takes the time to note this, There must be some misunderstanding regarding those basics. Good Luck and don’t forget to Test at all times! 
 
 source:https://testobject.com/blog/2014/01/7-ways-to-get-your-app-visible.html