Skip to main content

Posts

Showing posts with the label development

Ending Africa's Hunger... by funding Monsanto?

More than a billion people eat fewer than 1,900 calories per day. The majority of them work in agriculture, about 60 percent are women or girls, and most are in rural Africa and Asia. Ending their hunger is one of the few unimpeachably noble tasks left to humanity, and we live in a rare time when there is the knowledge and political will to do so. The question is, how? Conventional wisdom suggests that if people are hungry, there must be a shortage of food, and all we need do is figure out how to grow more. [...] The Bill and Melinda Gates Foundation, with an endowment of more than $30 billion, has embarked on a multibillion-dollar effort to transform African agriculture. It helped to set up the Alliance for a Green Revolution in Africa (AGRA) in 2006, and since then has spent $1.3 billion on agricultural development grants, largely in Africa. With such resources, solving African hunger could be Gates's greatest legacy. But there's a problem: the conventional wisdom is wrong. F...

JQuery and ASP.Net

Ive been playing with JQuery alot lately and am loving the ease of use and the feature rich toolset, you can get some realy good effects with it. i know sometimes .net developers get, i dont know scared about trying new things that arnt born of microsoft, but JQuery is now being actively endorsed by microsoft and is actually shipped with the latest versions of the framework, so how do you use it. 1. If you dont have it get a copy of jquery.js its quite small (im currently using 'jquery-.3.2.min.js' which is 56Kb) 2. Include it in your web app 3. There are 2 ways to use it in a page 3a Add a script reference into your head section of the aspx page <script src="Js cript/jquery -1.3.2.min.js" type="text/javascript"></script> 3b If you are using asp.net AJAX you can let the script manager handle it by: 3b.1 Adding a script manager to the form in the body of the aspx page 3b.2 Adding a scripts element 3b.3 Adding a script reference to the jquery...

Log4Net inside code run with MSTest unit testing

This was confusing me for a while so chances are it was also confusing someone else out there. I could not get logging using log4net to output to the configured logger inside my unit tests i tried [assembly: log4net.Config. XmlConfigurator()] in the unittest projects assembalyinfo but still log4net would not pick up the config i found that the answer is to place an assembly initialise inside the unit test project, only one mind in the whole project. In fact if you do add 2 its an error [AssemblyInitialize] public static void AssemblyInitialize(TestContext testContext) { log4net.Config.XmlConfigurator.Configure(); }

Brief intro to LINQ

Ive recently given a breif tutorial to the guys on our team on LINQ (Language integrated query) As with Generics, LINQ is a large subject that i cant write up properly without spending quite a lareg amount of time on, so i'll give a breif overview with an example of a common usage in the context of a generic list. Overview LINQ is a technology (or language construct) that allows you to process data using functional programming logic to perform an operation. The LINQ API is an attempt to provide a consistent programming model that allows you to manipulate data. Using LINQ we are able to create directly within the C# programming language entities called query expressions, these query expressions are created from numerous query operators that have been intentionally designed to look and feel similar (but not identical) like SQL. Using LINQ you can interact with many sources of data, listed below: LINQ implementations LINQ to objects Linq to SQL Linq to entities Linq to XML There are o...

Quick intro to generics

Recently ive been teaching some new developers on the team about generics, its not a new concept i know, and when you know about them you cant quite figure how people sometimes just dont know about them, they are so helpfull. So tell me about them then! Generics came in at .net 2.0 and are used extensively through out the .net framework internally, if you do much .net dev work you will come across then at some point. What are generics Generics allow you to define a type (class or structure) while leaving some of the details unspecified. Quick Tip When you see the following in code you know you are looking at code that uses generics //C# List myArray = new List (); List my2ndArray = new List (); 'VB.Net Dim myArray As New List(Of integer)(); Dim my2ndArray As New List(Of myClass)(); The main benefits for using generics are: Type safety (you can only put ints in a collection of ints for example) Performance (boxing and unboxing of primitive types is eliminated) Clarity ...

Introduction to Log4Net

Log4net Log4net ( http://logging.apache.org/log4net/ ) is a tool to help the programmer output log statements to a variety of output targets, i have used it handling all the logging requirements of the applications that i have developed recently. And have found it integrates very well with spring.net and NHibernate. In most cases i have set up the apps to log everything to a file and also log errors/warnings to an SMTP logger (which effectively sends an email out to me). There are loads of examples and manuals etc on the website http://logging.apache.org/log4net/ it gives loads of good config examples too. In order to get log4net working all you need is the log4net dll, configuration, and a small amount of code to get it started and logging. (this page is a good read http://logging.apache.org/log4net/release/manual/configuration.html ) But the minimum to take away is: 1. Reference the log4net dll 2. Import the log4net classes 2.1. using log4net; 2.2. using log4net.Config; 3. Add ...

Facebook

Facebook Recommendations

Followers


Web Designing In Karachi



Haroof.com


Politics blogs

My Zimbio

Email Subscribe

Enter your email address:

Watch online Live TV

Labels

Show more