WordPress Themes, Plugins, Tutorials, Tips And More...

Tag: Code Page 1 of 3

What Are The Reasons To Learn C #?

The C # offers various basic and advanced C # concepts. C # language is both for beginners and professionals. C # is a .Net Framework programming language.

The C # consist all C # themes, control instructions, objects and classes, inheritance, constructor, destructor, this, static, sealed, polymorphism, abstraction, abstract type, interface, namespace, encapsulation, properties, indexer, arrays, strings, regular expressions, exception handling, multiple sub-processes, IO files, collections, etc. C # is a general-purpose, object-oriented programming language that refers as “C sharp”. It was developed by Microsoft led by Anders Hejlsberg and his team members within the the.Net initiative and permit by the European Association of Computer Manufacturers (ECMA) and the International Standards Organization (ISO). C # is famous amongst the languages for Common Language Infrastructure, and the latest version of C # is version 7.2. C # is very much related to Java syntactically and is simple for users who have the basic knowledge of C, C ++ or Java.

A bit of.Net Framework

The .Net applications are multiway platform applications, and the Framework can utilize from languages such as C ++, C #, Visual Basic, COBOL, etc. It is planned in a way so that other languages can use it.

Why #?

C # has various other reasons to be famous and in demand. Some of the reasons are mentioning below:

1. Easy to start: C sharp is high-level language, so it is similar to additional popular programming languages such as C, C ++ and Java and, therefore, it is easy to learn for everyone.

2. Widely used to develop desktop and web applications: C # is broadly used to expand web applications and desktop applications. It is single, and mainly popular languages utilize in the professional desktop. If someone wants to build Microsoft applications, C # is the language.

3. Community: the more significant the community, the better the measure that new tools and software will be developed to improve it. C # has a vast community, so the developments are made to exist in the system and not turn into extinct.

4. Game development: C # is broadly utilized in game development and will carry on dominating. C # incorporates with Microsoft and, therefore, has a broad target audience. The features of C # like automatic garbage collection, interfaces, object orientation, etc. make C # a trendy game development language.

Starting with programming in C #:

Find a compiler:

There are several online IDEs, like GeeksforGeeks ide, CodeChef ide, etc., which can be utilized to run C # programs without installing.

Windows: Since the C #  produces within the Microsoft .NET framework initiative, it offers several IDE to execute C # programs: Microsoft Visual Studio, Visual Studio Express, Visual Web Developer

Linux: Mono can be utilized to run C # programs on Linux.

Programming in C #:

Since C # is very similar to other syntactic languages, it is simple to code and learn in C #.

Programs can be written in C # in any text editors such as Notepad ++, gedit, etc. or in any of the compilers. After printing the code, save the particular file with the extension cs.

Reasons to learn C sharp

Modernized language

C # is an add-on version of C ++. Previously programmers had the C language, which utilized. C ++ started adding orientation to objects in C, and C ++ became the “real” application creation language for Windows (according to C ++ developers). C ++ was utilize to write infrastructure and applications which is low level, while Visual Basic developers use to write business applications.

C # brings VB’s rapid development pattern to the world of C ++ developers, with several clear changes. C # takes the benefits of .NET Framework, which means it has the right to use a powerful forms engine, like the VB developers, have had for many years. New data types have been extra, Like the type of decimal data to perform financial computation.

Type of security

C # is a secure type, which means several things. For example, programmers cannot make use of uninitialized variables. In C ++ it is straightforward to declare a variable and then verify its value. The C # compiler will inform the user if the user tries to utilize a variable before they have initialized it to some value. With C #, user cannot go past the end of an array, as a user has been capable of doing in C and C ++ for years.

Object-oriented

In C # simple data types can be treated as objects, which mean that an int has associated methods. For example, a programmer can utilize the ToString method to get a string value for int, as shown follow.

Int Counter = 14;

Console.Write (Counter.ToString ());

Besides, literal strings can be treated as objects and support a range of methods, like Trim, ToUpper, ToLower, and many others, as shown here:

Console.Write (“hello, world” .ToUpper ());

Capabilities in several languages

C # can allow the programmer to interoperate with any other language in the .NET platform. C # also facilitates the concept of error handling in various languages.

XML Comments

C # supports the beginning of XML comments. Far from being just one more way to append comments to the code, XML comments can become the part of the documentation. Comments are positioned in XML format and can then be utilized as necessary to document the particular code. This documentation may comprise sample code, parameters and indication to other topics. Finally, it makes intellect for a developer to document their code since those comments can become documentation self-regulating of the source code. This C# general purpose language was initially produced by Microsoft to be utilized to develop applications on the Microsoft platform, and C # developers like the language because it is pleasant to apply and well designed. If a programmer wants to build apps for the Microsoft platform, then the programmer must naturally learn C #.

Snippets Collection 5

WordPress

Author Bio Excerpt

The snippet below will let you have the author bio excerpt.

Disable Self Trackbacks

The following snippet will let you disable self trackbacks.

Remove Login Shake

The following snippet has to be added to functions.php and it will remove the “wrong password” screen shake.

Only Show Admin Bar To Administrators

The following snippet will let you show the admin bar to administrators.

QR Code With Article Link

To have the QR-code rendered for every article, just insert the following snippet inside the WordPress loop.

Snippets Collection 4

WordPress

Disable Plugin Updates

The snippet below will allow you to disable plugin updates.

List all categories with posts

The snippet below will let you list all categories with posts.

Override WordPress and Site URL

The following snippet will let you override WordPress and site URL.

Get the first link in post

The following snippet will let you get the first link in post.

Check if sidebar has widgets

The snippets checks that if a sidebar of your website having any widget areas in it or not.

Snippets Collection 3

WordPress

Redirect your Author archive link to your “About” page

The following snippet will let you redirect your author archive link to your website’s about us page.

Change Image Path Only

The following snippet will let you change image path only.

Add Thumbnails in Manage Posts/Pages List

The following snippet will let you add thumbnails in manage posts/pages list.

Checks if the visitor is from mobile device

The following snippet will let you checks if the visitor is from mobile device or not.

Add titles to previous_post_link & next_post_link

The following snippet will let you add titles to previous and next post links.

Snippets Collection 2

wordpress-logo

Temporary Maintenance

The following snippet will let you temporarily close down your site for visits while your website can still be accessed by admins resulting in letting you do the changes that you are planning for

Add featured images to WordPress feeds

The snippet below will let you add featured images to WordPress feeds.

Set Minimal Comment Limit In WordPress

The following snippet will let you set minimal comment limit in WordPress.

Allow PHP in WordPress Text Widgets

The following snippet will allow PHP in WordPress text widget.

Snippets Collection 1

WordPress

Remove URL from Comment Form

The following snippet will let you remove URL from comment form.

Display a Random Post

The snippet below will let you display some random post.

Customize the Default Avatar

The following snippet will let you customize the default avatar.

Create a Custom Post Template

The snippet below will let you create a custom post template.

Limit Number of Post Revisions

The snippet below will let you limit number of post revisions.

Snippets Collection 5

WordPress

How To Set A Maximum Word Count On Post Titles

Adding the following snippet to your theme’s functions.php file, you will be able to set a maximum word count on post titles.

Snippet Source/Credit: Pippin

Displaying WordPress Excerpt Dynamic Length

The following snippet display the WordPress excerpt dynamic length.

Snippet Source/Credit: Snipplr

Delete Width And Height Attributes From Image Tag

The following snippet will let you delete both width and height attributes from image tag.

Snippet Source/Credit: Stackexchange

How To Set Basic Tag Cloud In WordPress

The following line of code will let you set basic tag cloud in WordPress.

How To Know That Which Theme You Are Using

Adding the following lines of code will let you know that which theme you are using.

Snippet Source/Credit: Snipplr

How To Change Editor Font In WordPress

The following snippet will let you change editor font in WordPress.

Snippet Source/Credit: DevPress

Snippets Collection 4

WordPress Settings

How To Show Admin Bar Only For Admins

Using the following snippet in your theme’s functions.php file, you will be able to show admin only for admins. Just copy and paste it and you are done.

Snippet Source/Credit: Jeff Starr

How To Customize Comment Count Text In WordPress

Using the following snippet, you will be able to customize comment count text in WordPress.

Snippet Source/Credit: WPSnipp

How To Deregister All In One Event Calendar In WordPress

The following snippet will let you deregister all in one event calendar in WordPress.

Snippet Source/Credit: Ditscheri.com

How To Print Current WordPress Template Being Used

Adding the following snippet to your theme’s functions.php file will let you print current WordPress template being used.

How To Make A Subdirectory Accessible With WordPress In Root

Adding the following snippet will let you make a subdirectory accessible with WordPress in root.

Snippet Source/Credit: DreamHost Wiki

How To Disable Sidebars And Widgets On Page Template In WordPress

The following snippet will let you disable sidebars and widgets on page template in WordPress.

Snippets Collection 3

WordPress CMS

How To Disable WordPress Comments Completely

The following snippet will let you disable WordPress comments completely.

Snippet Source/Credit: aotearoawebdesign.co.nz

How To Automatically Delete Trash On Daily Basis

When you delete a post or a page or a comment, it goes in a Trash instead of being removed permanently. Using the following snippet will ease you job of deletion and will tell WordPress to automatically delete the trash itself. Simply copy and paste the following lines of code in your wp-config,php file and you are done.

Note: Make sure that you do replace 1 by X to empty spam comments automatically every X days.

How To Show Content For Logged In Users

Adding this snippet to your theme’s functions.php file will let you show content only for logged in users.

Snippet Source/Credit: Snipplr

How To Redirect Users To A Random Post

The following snippet will let you redirect users to a random post.

Snippet Source/Credit: Smashing Magazine

How To Have Custom Favicon For Your WP-Admin

Using the following snippet, you will be able to have custom favicon for your WP-admin.

Snippet Source/Credit: Snipplr

Snippets Collection 2

WordPress

How To Add A Logo To A Template

Using the following snippet, you will be able to add a logo to a template.

Snippet Source/Credit: WPSnipp

How to count retweets in full text

Adding the following snippet in your theme’s functions.php file, you will be able to count retweets in full text.

Once saved copy and paste the following lines of snippets in your theme’s single.php file:

Snippet Source/Credit: WPRecipes

How To Automatically Link Twitter Usernames In WordPress Posts

Using the following snippet, you will be able to automatically link Twitter usernames in WordPress posts.

Snippet Source/Credit: Paulund.co.uk

How To Block Admin For All Users In WordPress

Using the following snippet you will be able to block admin for all users in WordPress.

Snippet Source/Credit: WPSnipp

How To Rename WordPress Folder

Using the following snippet, you will be able to rename WordPress folder.

Snippet Source/Credit: Snipplr

Page 1 of 3

Powered by WordPress & Theme by Anders Norén