اخترنا لكم

Friday, July 1, 2016

2016 Social Media Image Size Cheat Sheet

Featured Image
Nothing says 'scroll faster and ignore' on social media than pixelated or blurry images. Since social media plays an influential role in maintaining brand consistency, your dealership can't afford to convey the wrong message online, especially since that's where most of your consumers are spending their time.
The images you share are just as important as the words you write when it comes to conveying a message. Great looking photos or images go a long way when it comes to social media engagement as well.
In fact, according to HubSpot,
"when people hear information, they're likely to remember only 10% of that information three days later. However, if a relevant image is paired with that same information, people retained 65% of the information three days later." (Source)
In the same article shared by HubSpot, they mention that "Content with relevant images gets 94% more views than content without relevant images."
But there are so many image dimensions to remember, especially when considering how many social platforms there are. From Facebook and Twitter to LinkedIn, Pinterest and Instagram, it can be difficult to keep track of all of the social media image dimensions out there.

Facebook Image Dimensions:

2016 Facebook Image Sizes
Cover Photo: 851 x 315 pixels
As a best practice, try to display an image the reflects your dealership accurately to your audience.
Profile Photo: 180 x 180 pixels
Since your profile photo is attached to everything you do on Facebook (comments, likes, posts, etc.), it's important to make sure that you choose a photo that best reflects your business. I recommend using your dealership logo so that it's easy to recognize.
Shared Image: 1200 x 630 pixels
Shared images show up in the newsfeed of your Facebook connections. By sharing meaningful images you can engage your connections in powerful, trust-building conversations.

YouTube Image Dimensions:

YouTube channel image dimensions
Channel Cover Image: 2560 x 1440 pixels (for desktop), 1855 x423 pixels (for tablets), 1546 x 423 pixels (for smartphones), and 2560 x 1440 pixels (for TV)
Admittedly one of the things that frustrate me about YouTube's image dimensions is that they have to work across multiple devices. Since YouTube is streamed across multiple devices, there isn't an easy way to have one image that works across all their platforms (from phones to television). You can click here to get a YouTube Channel Image template to work from which should make things easier.
Custom Video Thumbnail: 1280 x 720 pixels
Research has proven that having a custom thumbnail for your videos helps with clickthroughs.

Twitter Image Dimensions:

2016 Twitter Image Dimensions
Twitter Header Photo: 1500 x 500 pixels (maximum 100kb file size)
Twitter Profile Photo: 400 x 400 pixels
Since your Twitter profile photo is your main identifier on the social platform, I recommend using your dealership logo. That way it's easy for people to recognize you in the fast moving twitter stream. Don't let the speed of the Twitter stream scare you, though. A few months ago I shared some strategies that you can use to grow your Twitter followers and avoid the Twitter Stream here.
Twitter In-Stream Photo: 440 x 220 px
Including eye-catching graphics for your tweets is a great way for people to slow down their Twitter stream and take a look at what you've shared. Up until May 2016, images used to count against the 140 character limit, but now Twitter has announced that they don't anymore!

LinkedIn Image Dimensions:

LinkedIn Image Dimensions
LinkedIn Standard Logo: 100 x 60 pixels
LinkedIn Career Cover Picture: 974 x 60 pixels
LinkedIn Banner Image: 646 x 220 pixels
It can be pretty easy to self-promote on LinkedIn until you're blue in the face, but you need to pump the brakes a little. Even though LinkedIn is a professional social network, that doesn't mean you have to talk about yourself like you think you're God's gift to the business community. Be genuine. Share highlights from your career that will align you with like-minded professionals. Remember that only talking about yourself and why you think you're the best doesn't make for good conversation on or offline.

Google Plus Image Dimensions:

Google Plus Image Dimensions
I know, I know - Google Plus is dead (or something like that)... but since people are still kinda using it, I thought I'd include some dimensions for you.
Google Plus Profile image: 250 x 250 pixels
Google Plus Cover Image: 1080 x 608 pixels (random size...)
Google Plus Shared Image: 497 x 373 pixels or 150 x 150 pixels

Instagram Image Dimensions:


Instagram Profile Image: 110 x 110 pixels
Instagram Photo Size: 1080 x 1080 (1:1), however, Instagram also lets you upload in a variety of sizes now. Square images still tend to stand out more.
Instagram Photo Thumbnails: 161 x 161 pixels

Pinterest Image Dimensions:

Pinterest Image Dimensions
Pinterest Profile Image: 165 x 165 pixels
Even though the Pinterest profile image doesn't stretch across the medium like Twitter or Facebook, it's still important to have a nice one. In a similar theme to my other recommendations, use your dealership logo. That way you're able to maintain brand consistency across all of your social profiles.
Board Display Image: 222 x 150 pixels
Pin Sizes: 236 pixels w with scaled height.
Expanded pins will have a minimum width of 600 pixels.
Wednesday, June 29, 2016
Tuesday, June 28, 2016
Friday, June 24, 2016

Android resources

There are many more items which you use to build a good Android application. Apart from coding for the application, you take care of various other resources like static content that your code uses, such as bitmaps, colors, layout definitions, user interface strings, animation instructions, and more.

html/css


app/src/main/res/layout/activity_my.xml

This XML layout file is for the activity you added when you created the project with Android Studio. Following the New Project workflow, Android Studio presents this file with both a text view and a preview of the screen UI. The file contains some default interface elements from the material design library, including the app bar and a floating action button. It also includes a separate layout file with the main content.


app/src/main/java/com.example.helloworld/MainActivity.java

A tab for this file appears in Android Studio when the New Project workflow finishes. When you select the file you see the class definition for the activity you created. When you build and run the app, the Activity class starts the activity and loads the layout file that says "Hello World!" app/src/main/AndroidManifest.xml


The manifest file describes the fundamental characteristics of the app and defines each of its components. You'll revisit this file as you follow these lessons and add more components to your app.

Resources

drawable/

       Directories for drawable resources, other than launcher icons, designed for various densities.

layout/

       Directory for files that define your app's user interface like activity_my.xml, discussed above, which describes a basic layout for the MyActivity class.

menu/

       Directory for files that define your app's menu items.

mipmap/

       Launcher icons reside in the mipmap/ folder rather than the drawable/ folders. This folder contains the ic_launcher.png image that appears when you run the default app.

values/

       Directory for other XML files that contain a collection of resources, such as string and color definitions.

Directory Resource Type
anim/ XML files that define property animations. They are saved in res/anim/ folder and accessed from the R.anim class.
color/ XML files that define a state list of colors. They are saved in res/color/ and accessed from the R.color class.
drawable/ Image files like .png, .jpg, .gif or XML files that are compiled into bitmaps, state lists, shapes, animation drawable. They are saved in res/drawable/ and accessed from the R.drawable class.
layout/ XML files that define a user interface layout. They are saved in res/layout/ and accessed from the R.layout class.
menu/ XML files that define application menus, such as an Options Menu, Context Menu, or Sub Menu. They are saved in res/menu/ and accessed from the R.menu class.
raw/ Arbitrary files to save in their raw form. You need to call Resources.openRawResource() with the resource ID, which is R.raw.filename to open such raw files.
values/ XML files that contain simple values, such as strings, integers, and colors. For example, here are some filename conventions for resources you can create in this directory −
  • arrays.xml for resource arrays, and accessed from the R.array class.
  • integers.xml for resource integers, and accessed from the R.integer class.
  • bools.xml for resource boolean, and accessed from the R.bool class.
  • colors.xml for color values, and accessed from the R.color class.
  • dimens.xml for dimension values, and accessed from the R.dimen class.
  • strings.xml for string values, and accessed from the R.string class.
  • styles.xml for styles, and accessed from the R.style class.
xml/ Arbitrary XML files that can be read at runtime by calling Resources.getXML(). You can save various configuration files here which will be used at run time.




Thursday, June 23, 2016
Tuesday, June 21, 2016

Top 10 PHP Tips for Developers



I have always wanted to write an article like this, because I think about it all the time - what 10 things would I deem the most important to pass on to someone else? Well, after literally years of thought I think I have come up with the best list that I can think of. So, without further a do, let's get to it.

1) Go OOP

If you have not yet entered the realm of Object Oriented Programming, then you are at a disadvantage, and you are falling behind fast.
OOP is essentially a method of programming with the use of classes, or Objects, which tie like things together, remove the need for repetition of code and perform the basic tasks of production very simply. Objects are essentially classes that collect a bunch of functions together and wrap them in a wrapper that can be reused over and over again without the need to rewrite functionality or procedures every time you need to do something.
Procedural Programming works by following a routine from the top to the bottom of each page as the server reads every file on your server. With OOP, there could be one or two objects being instantiated, which, in turn could instantiate a few, a hundred or a thousand other objects which could all perform certain tasks depending on variables passed into the objects. OOP is faster, simpler, easier to debug, uses less server resources, less code, is faster loading and more logical to work with once you figure out the basic principles. Go OOP - It changed my development style forever.

2) Stay Away from Anything Ending With _once()

We all know that include() simply gives us a warning if it fails, while require() kills the script with a fatal error when it fails. What we don't forget is that include_once() and require_once() is extremely hard on server resources. There is nothing we can do about it, it's how PHP is set up. Just remember that these things kill your server resources, specially on a huge framework, and if you plan your code properly you won't even need it anyway.

3) Develop With Error Reporting On

The very first thing you do when starting a new project is to turn error reporting to E_ALL, and you should only turn it off ten seconds before going to production mode. I do this with every project that I build and there is nothing better than running a project in full production mode and not even getting one error. Besides that, with error reporting on, you pick up any small errors that will eventually grow up to bite you in the... well, you get my point.

4) Use A Framework If You Need One

Ok, so Rasmus Lerdorf says you shouldn't use a framework because he could quite conclusively prove that a framework is much slower than normal PHP code when it came to printing a simple "Hello World" application. Two things to mention here though: you are not Rasmus Lerdorf and I bet you won't be building a "Hello World" application every time you program something. Frameworks that help you do the tedious things can help, although you will have to learn how the frameworks function first in order to make things simple, but that's the only real trade-off. Plus you stand less chance of writing bad code when someone else has written most of it for you, but let's pretend I didn't say that.

5) Use PHP's Inbuilt Functions

Ok, you want to count the amount of keys in an array? You can loop through the array and simply increment a value for each iteration, right? Or you can just use the built in PHP function count(), which does just what it should. PHP has many built-in functions that can do what you need them to, so check out the manual to make sure you are doing it in the best way possible.

6) Protect Your Database

The best and safest way is to use mysql_real_escape_string() for all database before it is added to the database. This function makes all strings safe in terms of quotes and other functions that can harm your database or contain malicious code, so use it to be sure you have taken the first step against protection of your data. Another thing you can do is validate all POST and GET strings, never use $_REQUEST, and make sure all form submitted data is of the right type and value before adding it to a database query.

7) Use POST Not GET

Ok, this isn't always possible, but when its really not necessary, don't use GET, use POST. The reason is simple - GET is simple to emulate, all I need to do is add something to my address bar and I can hack your project. Obviously GET is the easy way to do pagination and permalinks, but when using form submission especially, stay with POST, it's safer.

8) Draw Before You Code

A good practice to get into is to wireframe your projects, even if you are just scribbling a few notes on a piece of paper. It is very important to actually give the mechanics of you application some thought before sitting down to start coding, because in the process of planning it you will actually iron out the difficulties in your head and avoid the major headache that comes with the facepalm when you realize that everything you just did is either wrong, not needed, or just silly.

9) Understand Your Project

An artist cannot draw something that he has not seen before. A singer cannot sing a song that he has not heard before. You cannot code a project that you do not fully understand. If you do not understand exactly what it needs to do, and how it needs to it, you cannot build it.

10) Code Code Code

If I could get one thing through to anyone reading this, this is it. You cannot become a good developer by reading. You cannot become a good developer by watching someone develop. The one and only tried and trusted method, is to actually write code. But - and here is the trick - build real things! Do not go and code something that you have no interest in, or will never use. Build what you like, and you will be excited and interested by it, and you will learn. Then, make it awesome, build upon it, and make it better.
عربي باي