Tuesday 22 December 2015

What is R?

What is R?
Introduction to R
R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R.
R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity.
One of R’s strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control.
R is available as Free Software under the terms of the Free Software Foundation’s GNU General Public License in source code form. It compiles and runs on a wide variety of UNIX platforms and similar systems (including FreeBSD and Linux), Windows and MacOS.
The R environment
R is an integrated suite of software facilities for data manipulation, calculation and graphical display. It includes
  • an effective data handling and storage facility,
  • a suite of operators for calculations on arrays, in particular matrices,
  • a large, coherent, integrated collection of intermediate tools for data analysis,
  • graphical facilities for data analysis and display either on-screen or on hardcopy, and
  • a well-developed, simple and effective programming language which includes conditionals, loops, user-defined recursive functions and input and output facilities.
The term “environment” is intended to characterize it as a fully planned and coherent system, rather than an incremental accretion of very specific and inflexible tools, as is frequently the case with other data analysis software.
R, like S, is designed around a true computer language, and it allows users to add additional functionality by defining new functions. Much of the system is itself written in the R dialect of S, which makes it easy for users to follow the algorithmic choices made. For computationally-intensive tasks, C, C++ and Fortran code can be linked and called at run time. Advanced users can write C code to manipulate R objects directly.
Many users think of R as a statistics system. We prefer to think of it of an environment within which statistical techniques are implemented. R can be extended (easily) via packages. There are about eight packages supplied with the R distribution and many more are available through the CRAN family of Internet sites covering a very wide range of modern statistics.
R has its own LaTeX-like documentation format, which is used to supply comprehensive documentation, both on-line in a number of formats and in hardcopy.
Every data analysis technique at your fingertips
R includes virtually every data manipulation, statistical model, and chart that the modern data scientist could ever need. You can easily find, download and use cutting-edge community-reviewed methods in statistics and predictive modeling from leading researchers in data science, free of charge.
Create beautiful and unique data visualizations
Representing complex data with charts and graphs is an essential part of the data analysis process, and R goes far beyond the traditional bar chart and line plot. Heavily influenced by thought leaders in data visualization like Bill Cleveland and Edward Tufte, R makes it easy to draw meaning from multidimensional data with multi-panel charts, 3-D surfaces and more. The custom charting capabilities of R are featured in many of the stunning infographics seen in the New York Times, The Economist, and the Flowing Data blog.
Get better results faster
Instead of using point-and-click menus or inflexible "black-box" procedures, R is a programming language designed expressly for data analysis. Intermediate level R programmers create data analyses faster than users of legacy statistical software, with the flexibility to mix-and-match models for the best results. And R scripts are easily automated, promoting both reproducible research and production deployments.
Draw on the talents of data scientists worldwide
As a thriving open-source project, R is supported by a community of more than 2 million users and thousands of developers worldwide. Whether you're using R to optimize portfolios, analyze genomic sequences, or to predict component failure times, experts in every 

 For more information, please visit : www.programmingyan.com

Monday 21 December 2015

.NET Framework 4.6 New Features in Visual Studio 2015


.NET Framework 4.6 New Features in Visual Studio 2015

NET Framework 4.6
Microsoft has released the newest version of Visual Studio, Visual Studio 2015 Preview, along with .NET Framework 4.6. The newer version of the .NET Framework was introduced 12-13 of Nov 2014. The old version of .NET 4.5.3 will be updated to 4.6 before the final version ships. The .NET Framework 4.6 is highly compatible in comparison to the older version like .NET Framework 4, .NET Framework 4.5, .NET Framework 4.5.1, .NET Framework 4.5.2.
We would like to suggest that this preview version of .NET Framework 4.6 and Visual Studio 2015 is currently available for testing and feedback purposes only but very shortly it will be released as a final release, so before installing this version, please do remember that this preview version is not intended for use on a production computer.

New Features with .NET Framework 4.6 Preview
The following are the new features of the .NET Framework 4.6:
  • Changes in the Base Class Library
  • Resizing in Windows Forms controls
  • Support for code page encodings
  • Open-source .NET Framework packages
  • Improvements to event tracing
  • .NET Native
Changes in Base Class Library
So many new APIs have been added to this new .NET Framework to enable key scenarios, especially for the Cross-Platform environment. Microsoft has made the following changes:
  • The CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture properties are now read-write rather than read-only. If you assign a new CultureInfo object to these properties, the current thread culture defined by the Thread.CurrentThread.CurrentCulture property and the current UI thread culture defined by
the Thread.CurrentThread and CurrentUICulture properties also change.
       

The preceding program the gets error that we can't make the assignment, it is read only but in the .Net Framework 4.6 it's not an error because this property is now read write.
  • Additional collections implement ReadOnlyCollection<T> such as Queue<T> and Stack<T>. It implement System.Collections.ObjectModel.ReadOnlyCollection, includingSystem.Collections.Generic.Queue and System.Collections.Generic.Stack.

  • Additional members support the task-based asynchronous pattern (TAP) such as Task.CompletedTask and NamedPipeClientStream.ConnectAsync.
Resizing in Windows Forms controls
The .NET Framework 4.6 expanded some namespaces that enable us to resize Windows Forms forms, so we need to include the following namespace to enable this feature, in other words: 

System.Windows.Forms.DomainUpDown
, System.Windows.Forms.NumericUpDown,System.Windows.Forms.DataGridViewComboBoxColumn,System.Windows.Forms.DataGridViewColumn and System.Windows.Forms.ToolStripSplitButtontypes. 

This is an opt-in feature. To enable it, set the EnableWindowsFormsHighDpiAutoResizing element to true in the application configuration (app.config) file. Example code: 
  1. <appSettings>  
  2.    <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />  
  3. </appSettings>  
Support for code page encodings
The core .NET Framework  primarily supports Unicode encodings and by default it provides limited support for code page encodings. We can add support for code page encodings that are available in the .NET Framework but unsupported in .NET Core by registering code page encodings with the Encoding.RegisterProvider method. So we will use the namespace System.Text.CodePagesEncodingProvider. So to make these code pages available to .NET Framework 4.6 Preview use these additional code pages, do the following assemblies reference to our project. 
  • Add a reference to the System.Text.Encoding.CodePages.dll assembly to your project.

  • Retrieve a CodePagesEncodingProvider object from the static Instance property.

  • Pass the CodePagesEncodingProvider object to the Encoding.RegisterProvider method. 
The .NET Framework for the Windows Desktop supports a large set of Unicode and code page encodings. On the other hand, .NET Framework 4.6 Preview supports only the following encodings:
  • ASCII (code page 20127)
  • ISO-8859-1 (code page 28591)
  • UTF-7 (code page 65000)
  • UTF-8 (code page 65001)
  • UTF-16 and UTF-16LE (code page 1200)
  • UTF-16BE (code page 1201)
  • UTF-32 and UTF-32LE (code page 12000)
  • UTF-32BE (code page 12001)
Open-source .NET Framework packages
Some great .NET packages such as the Immutable Collections and SIMD APIs are now available, open source, on GitHub. To access the code, see NetFx on GitHub. For information on how to contribute to these packages, see the .NET Home Page on GitHub.
Where Immutable Collection is a common approach to use an immutable state that can be passed freely among multiple threads. Immutable collections are different from read-only collections in the sense that unlike read-only collections, they cannot be changed by the provider or consumer of the collection. For example, if you are enumerating a read-only collection, there is a possibility that the collection can be changed on another thread, causing data corruption. This scenario can't occur if you are using an immutable collection. With an Immutable Collection you can do the following.
GitHub is a repository that contains the foundation libraries that make up the .NET Core development stack as in the following:
  • Share a collection in such a way that its consumer can be assured that the collection will never change.

  • Provide implicit thread safety in multi-threaded applications. No locks required to access collections.

  • Follow functional programming practices.

  • Modify a collection during enumeration, while ensuring that the original collection does not change.
Improvements to event tracing
An EventSource object can now be constructed directly and you can call one of the Write() methods to emit a self-describing event. 
  1. using System.Diagnostics.Tracing  
  2. //Assembly: mscorlib (in mscorlib.dll)  
  3.   
  4. public void Write<T>(  
  5. string eventName,  
  6. T data  
  7. )   
In the above example code:
T is the type that defines the event and its associated data. This type must be an anonymous type or marked with the EventSourceAttribute attribute, eventName is  the name of event and data is the object of type T 
.Net Native
It is a pre-compilation technology for building and deploying Windows Store apps. It compiles apps that are written in managed code (Like Visual C#) and that target the .NET Framework to native code. It is quite different from Just-In-Time (JIT) as well as the Native Image Generator (NGEN). Basically the .Net Native tool chain converts source code to native code at compile time while JIT is responsible for compiling the IL code to native code (machine specific code). Let's see the brief comparison with JIT and NGEN as well.

The .NET Native tool chain begins execution when the C# compiler has finished compilation of a Windows Store app. In another words, we can say that the input for the .NET Native is the Windows Store app built by the C# compiler. .NET Native compiles an entire application to a native application. It does not allow you to compile a single assembly that contains a class library to native code so that it can be called independently from managed code. The NGEN compiles assemblies to native code and installs them in the native image cache on the local computer, whereas .NET Native produces native code.


For more information, please visit : www.programmingyan.com

Saturday 19 December 2015

PHP Frameworks to Help Build Agile Applications

PHP Frameworks to Help Build Agile Applications


1. Phalcon


Phalcon is a PHP 5 framework that is implemented as a C extension to offer lower resource consumption and high performance. There's no need to learn or use the C Language, as the functionality is exposed as PHP classes ready to use. As Phalcon is loosely coupled, you're free to use the full framework, or just specific parts of it as glue components. Rather than download an archive, extracting it to a directory like you do with most frameworks, Phalcon can be downloaded and installed as a PHP module. By creating a rich, fully featured framework written entirely in C and packaged as a PHP extension, Phalcon is able to save processor time and boost overall performance. While it is just under two years old, the Phalcon documentation, community and development rival that of many of the more mature frameworks available.
2. Yii
Yii is a high-performance PHP framework which has powerful caching support and is explicitly designed to work efficiently with AJAX. Security is important, and that's why Yii includes input validation, output filtering, SQL injection and Cross-site scripting prevention. As Yii follows the MVC pattern, it helps you develop clean and reusable code, ensuring a clear separation of logic and presentation. You can model database data in terms of objects and avoid the complexity and tedious nature of writing repetitive SQL statements. Collecting form input is both safe and easy, as Yii comes with a set of validators as well as numerous helper methods and widgets. There is support for writing and running unit tests and functionality tests, along with efficient error handling, and log messages can be categorized, filtered and routed to different destinations. As Yii is designed to work well with third-party code, you can integrate other frameworks data into your Yii powered application.
3. Aura



Aura provides clean, fully decoupled libraries and independent libraries for PHP 5.4+ that can be used in any database, alone, in concert with each other, or into a full-stack framework of their own. It's the second major revision of Solar, rewritten as a library collection with dependency injection. It provides high-quality, well-tested, standards-compliant library packages that can be used in any codebase, with each library being self-contained and independently downloadable. There are enough libraries to form a full framework and be used for application development. As Aura is intended to take advantage of PHP5.4+, it features formal namespaces, anonymous functions, late static binding, short array syntax, traits, and more that aren't available in earlier versions of PHP.
4. Fat-Free



Fat-Free is a powerful, easy-to-use PHP micro-framework to help build dynamic and robust web applications. It's condensed into a single file (only 60kb), to give you a solid foundation and mature base code to get started quickly. It boasts an easy-to-use web development toolkit, a high performance URL routing and cache engine, built-in code highlighting and support for multilingual applications. There is no complex configuration required, with a well organized directory structure and support for both SQL and NoSQL databases. Fat-Free comes packaged with optional plug-ins to extend its capabilities, including; unit testing toolkit, template engine, markdown-to-HTML convertor, Geodata handler, custom logger, image processor and lots more. It takes a minimalistic approach to software architecture, avoiding un-necessary complication, aiming to strike a balance between code, performance and productivity.
5. PHP-MVC



PHP-MVC is an extremely simple but effective Model-View-Controller application structure which is clean, easy to learn, highly documented and features a self-explaining structure and optional Composer integration. It comes in two versions, a basic and advanced, with the advanced version featuring additional Twig support and automatic SASS compiling in pure PHP. It is not a fully featured framework but instead provides a bare-bone structure, aiming to be extremely slimmed down. It's as simple and readable as possible, with a skeleton structure for quick application building, especially useful for those new to PHP. The project encourages coders to work according to PSR 1/2 coding guidelines, promoting the usage of PFO, and the use of external libraries via Composer. As it only uses native PHP code, there's no need to re-learn a framework, so you can get started straight away.
6. Kohana
Kohana is a HMVC PHP5 framework that provides a rich set of common components to build web applications quickly, including translation tools, database access, code profiling, encryption, validation and lots more. Kohana has been carefully benchmarked to ensure it's both efficient and organized for real world usage. You can use specific libraries and tools, with simple tools to help identify bugs and solve performance issues. As Kohana is an OOP framework, it's built using strict PHP 5 classes and objects, with an easy setup as there are no code generators or complicated configuration files. With a simple routing structure and commented code, it's easy to understand and get started quickly. With an active community forum and IRC channel you have access to immediate support, along with the opportunity to contribute to Kohana on GitHub.
7. FuelPHP
FuelPHP is a simple, flexible MVC PHP 5.3+ framework, that was designed from the ground up to offer full support for HMVC as part of its architecture. With the added bonus of ViewModels (also known as presentation models), you have the option to add a powerful layer between the controller and the View. Almost every class in FuelPHP's core package can be extended without touching any code. You can also keep your application modular by dividing it into easily packaged modules so you can reuse code. Security is important so all of your output is encoded to make it secure and prevent XSS attacks. There is also support for CSRF prevention with tokens, input filtering and the Query Builder to assist you in preventing SQL injection attacks.
8. Slim
Often times a full-fledged framework can be overkill, micro-frameworks can enable rapid application development and prototyping without a steep learning curve, or any performance issues that can come with a large framework. Slim is a micro PHP framework to help you write simple, yet powerful web application and APIs, featuring standard and custom HTTP methods, route parameters, page templates and route redirects. The framework includes access to error handling and debugging, HTTP caching, Flash messages and secure cookies and AES-256 encryption. It's simple to configure and get started quickly, and the sophisticated URL router and middleware architecture make it ideal for rapid development or API prototyping. Slim isn't the only micro-framework available, other noteworthy choices include Silex, Limonade and Flight.






For more information, please visit : www.programmingyan.com

Friday 18 December 2015

The best PHP frameworks to help you build interoperable,agile applications.

The best PHP frameworks to help you build interoperable,agile applications.

Laravel


1.  
      Laravel is a PHP web application framework with expressive, elegant syntax, aiming to take the pain out of web development by easing common tasks, such as authentication, routing, sessions and caching. It provides, accessible, powerful tools needed to build, large robust applications, with an inversion control container, expressive migration system, and tightly integrated unit testing support. Laravel can be used for huge enterprise level applications, 
     or simple JSON APIs, meaning it's perfectly suited to all types and sizes of projects. It's built on top of several Symfony components, providing a solid foundation of well-tested, reliable code. With Composer you can manage all your application's third-party packages, and works great on MySQL, Postgres, SQL Server, and SQLite.

2. CodeIgniter




CodeIgniter is a powerful PHP framework with a small footprint, built for those who required a simple, yet elegant toolkit to build fully-featured web applications. It requires nearly zero configuration, with no restrictive coding rules, and offers simple solutions to complex application requirements. CodeIgniter features a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. It's exceptionally fast, as its core system only requires a few small libraries, with additional libraries loaded dynamically upon requests, based on your needs for a given process. This means the base system is both lean and agile. As CodeIgniter uses the MVC controller approach, it allows for great separation between logic and presentation, particularly useful for projects in which designers are working on template files.

3. CakePHP




CakePHP enables you to build web applications faster, using code generation features to rapidly build prototypes. There is no complicated configuration, just setup your database and you're ready to go. Translations, database access, caching, validation, authentication and more are all built into the framework. It comes packaged with clean MVC conventions, to guide you in developing your application. CakePHP can handle every aspect of your application, from the user's initial request all the way to the final rendering of a web page. The framework provides a basic organizational structure, from filenames to database table names, to keep your entire application consistent and logical. CakePHP also comes with built-in tools for validation and protection against SQL injection, form tampering and more, to help keep your application safe and secure.

4. Symfony



Symfony is a PHP framework to speed up the creation and maintenance of your web applications. By using existing 'de facto' standards of PHP, such as PHPUnit, and naming conventions for classes, you're not confined within the Symfony environment, but instead have the freedom to choose the software components that you want to use. It provides a set of prefabricated components that can be rapidly integrated into your application, combined with a clear methodology to help you work both efficiently and effectively on the most complex tasks. The use of Best Practices guarantees the stability, maintainability and upgradeability of any application you develop. You can choose the Full Stack (complete) version if you want to develop a complex application, or Brick by Brick, to build your own framework according to the functionality you need, or Microframework, as a standalones used to develop specific functionality in your project.

5. Zend Framework 2




Zend Framework 2 is an open-source framework for developing web applications, using object-oriented code. The components in the standard library form a powerful an extensible framework when combined, offering a robust, high performance MVC implementation. It's easily extensible, adapting to your needs, with a modular base so you can use building blocks in combination with other applications or frameworks. Using the ZendService you can implement client libraries to access the most popular web services available. As Zend is a collection of classes, you can just load the components you need, to take advantage of the components as individual libraries, instead of the framework as a whole, cutting down on unnecessary project bloat. With no model implementation you are free to implement the framework and components in whatever way you need, free of predefined restraints.

For more information, please visit: www.programmingyan.com