Tuesday, 8 September 2015

How to put pictures into unusual shapes, using PowerPoint

This article explains how to put a picture that is one shape (a "square peg") inside an image of another shape (a "round hole" - or star, elipse, octagon, etc) - using Microsoft PowerPoint.

Original title:   How to put a square peg into a round hole - in pictures


Wooden clothes peg in a customized rectangle with rounded corners.
Recently, I've been using PowerPoint to make the thumbnail image for my posts. This means that I own the copyright of the pictures, so can share them without worrying about copyright issues.

One approach I've used is to find an interesting copyright-free picture that is related to the theme of the post, and then put it inside a shape that adds some visual interest or has some words along side it.  Another thing that I'm going to try is using multiple pictures in this way to make a more-interesting-than-usual collage.



How to put a picture inside a shape

NB PowerPoint commands are based on Office 2007 and 2010 - but the same principles most-likely apply in other versions where the commands may be slightly different.

1   Get your image file, and save it somewhere on your computer.

A wide range of picture-file formats are supported by PowerPoint:  in the 2007 version this includes as shown in this list:

2     In PowerPoint, make a blank side (Home > Layout > Blank)

3     Then add a shape (Insert > Shapes, click on the shape you want)



Intially, the shape with have the fill-colour and border that are the current default values. But you can change this, which is what we are going to do.


4    Right-click on the shape, and choose Format Shape from the pop-up menu




5    In the Fill tab, choose Picture or Texture Fill, then click the File button and navigate to the image file you got in step 1, and click OK.






6   Make sure that the portion of the picture that you want to show is in the picture:  to start with the shape is centered on the middle of the picture.

Change this using the Offsets to move the shape to the left or right over the image.   You can make the offsets positive or negative as shown.

You can monitor the results of different settings in PowerPoints slide thumbnails (on the left hand side, if you have it showing), or by dragging the pop-up menu to a different place in the screen so that you can see the shape itself.




Job Done - at this point, you have an image that is cropped to the shape that you chose - now you just have to put it into your blog.



Using the picture

There are (at least) three ways to get the shape-cropped-picture from PowerPoint into your blog.

I usually copy the item from PowerPoint, and then paste it into a picture editor (Paintbrush etc), manually.   This is an old-fashioned approacb - but it lets me adjust the size and position of the image, and save it (usually a .png) with a file-name that describes the image really well which is good for mating the blog come up in search results (SEO).   The this picture can be inserted into a post just like any other picture.

Another option is to choose File > Save As from Powerpoint, and choose to save the slides in an image format, eg JPEG which can also be inserted into a post in the usual way.  You are likely to be asked whether to put all the slides in one image, or to make one image per slide. Usually, it would be best to make one image per slide - but I don't use this method because the image that is created is the size of the whole slide, rather than just the pictures on it.

A third option is to display the PowerPoint file as a slideshow. This isn't something that I'd do for only one shaped image, but may be relevant in some situations.


Adjusting the size and quality of the picture

One thing that you don't have any control of inside PowerPoint is the zoom level of the inserted picture.

If you make the shape larger, it doesn't show a larger proportion of the picture. Instead, it just shows the existing picture in a larger size, as you can see in the slides shown here.

I suspect that if you want to zoom in to a particular area of the image file, the only approach is to edit the picture in another tool, crop out the bit that you do not want to show, and only keep the part that you want to include inside your shape.

However PowerPoint does have some limited control over the contrast and brightness of the picture, from the Picture tab of the Format Shape window.


Can you do this in other tools?  Why PowerPoint?

Yes, you can.

Photoshop, and similar commercial tools  certainly have features like this, and I'm certain that GIMP (like a public-domain, less powerful version of Photoshop) and Inkscape (another public-domain image program which is more focussed on scalable-vector-graphics and objects than on pixels) also have these features.

So why use PowerPoint?   In short, many people have access to it already.   It's also very easy to learn, compared to the other packages, and what you learn is likely to apply to lots of tasks and not just in making pictures for your blog.




Related Articles:


Putting a picture into a blog-post

Post.thumbnail and post.summary - ways of describing blog posts

Showing a PowerPoint slideshow in Blogger

Copyright, blogs and Blogger/Google

Sunday, 6 September 2015

How to Disable mouse Right Click and Hide Page Source

Newbie bloggers just surf Internet to compare the contents of different blogs. They Copy the contents of the Blogs they like. Being the New in blogging platform, they do not think how much time it had taken to write or make contents. This happens because they are new bloggers and want to become a successful blogger in no time. They are unknown that Google Adsense do not Approve the application having copy pasted contents. And when they fail in application they then came to know how much worse task they have done. You can say their blogs are dead, i.e. the fact is no more earnings from Google.

We actually are running more than 15 blogs around, when we were a new blogger earlier, we were the one of those who did copy and paste. And somehow with the passage of time we realize that our earlier blogs are now dead. So, we make up our mind that without copy pasting others contents, we will run our blog with Fresh/New contents. Now we are running more blogs and getting good response from Google Adsense. Therefore Guys, always write a new/fresh/unique contents to achieve pure goals and happy days comes, lol.

Hereafter, we have now new,fresh,unique contents in our Blogs. Our web page contents, we mean "page source" can be seen easily by doing mouse right click in blog/website. Viewing the page source others can steal your information from your Blog/Website. So, It's now headache to protect them from being copied/thept by other users. 

It's not possible to disable viewing a pages source. You can attempt to circumvent unaknowledgeable users from seeing the source, but it won't stop anyone who understands how to use menu's or shortcut keys. Your best bet is to develop your site in a manner that will not be compromised by someone seeing your source, If you're attempting to hide it for any other reason than to protect your intellectual property, then we would say you're doing something wrong.

Disadvantage of Disabling mouse right click:- 
  • Annoying Users 
  • Unprofessional 
  • Insulting to Users 
  • Pointless 
Lets come to the point - if you want to irritate Users playing with your blogs/websites, there are other, less controversial alternative solutions available to the problem protecting your images, contents, and source code.

Also Check:
  1. How to Disable right click context menu on images
  2. How to Prevent People From Copying Your Blog Contents

Disable mouse Right Click and Hide Page Source

To protect you contents, images, source code, etc, disable mouse Right Click and Hide Page Source. To do this, you require a HTMLJavaScript code which is given below;

<script language=javascript>
var message="Function Disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
//
</script>
You will require above code later. Now follow below steps:
Step-1. Sign in your Blogger account
Step-2. Dashboard, go to Layout Option.
Step-3. In Layout Option, you will see "Add a Gadget", select it (See Demo below)


Step-4. After selecting "Add a Gadget", a popup window will be open (Add a Gadget window)
Step-5. Now Select "HTML/Javascript" Gadget. (See below Demo)


Step-6. Now add above HTML Script in Content Box. (See below Demo)


Step-7. Important Step - press the Save button. After saving you can drag the gadget wherever you want and click on Save Arrangement button.

Now you are done, check your blog Mouse right click function, it is now disabled. It will popup a message like below;


You are a genius. Yuppy...hurray !

Note: If you are irritated from above message being displayed and is annoying all the time when you do right click, to stop message displaying you should add below java script.

No right mouse click script !!! (no alert)

<script language=JavaScript>
<!--

//Disable right click script III- By Blogger Addict (addictofblogging.blogspot.com)
//For full source code, visit http://
addictofblogging.blogspot.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
We hope you liked our tutorial on Disabling mouse right click and hiding page source. If it helped just subscribe and like us on facebook. 

Enjoy ! 

Saturday, 5 September 2015

How to Add a Gadget Above the Header in Blogger

Blogger's Dashboard feature allows users to adjust the appearance of their blog with a few clicks of the mouse. Within the Dashboard, there is a " Layout " feature which lets bloggers add Gadgets such as RSS feeds, traffic counters, embedded media to their sites, adding beautiful widgets, showing notifications, pictures, etc.

Mainly by default in Blogger "Layout", you can see several places to add a Gadget. Such as:-

Right below the Title and above the posts, The Sidebars, The Footer, etc.

It is easy to identify them because all of them have a big linked title yelling " Add a Gadget ". Click on the link and you can choose the gadgets you want to add. After adding them, you can drag and rearrange them. You can also drag one from the side bar to the footer, above the post, below the post, etc.

Now, by editing your Blog's HTML code, you can allow for the addition of a Gadget above the header. Let's see some steps adding " Add a Gadget " icon above the header of your Blog.

Adding a Gadget Above the Header in Blogger

Step-1. Log into your Blogger account. Once logged in, you will be transported to your Dashboard.
Step-2. Select "Template", then click "Edit HTML".
Step-3. Scroll through the HTML code within the text box and locate this fragment:
<div id="header-wrapper">
Or you can press Ctrl+F and search below;
<div class="header-wrapper">
Step-4. Now you will find the detailed fragment. Just beneath the line <<div class='header-wrapper'> you will see below;


<b:section class='header' id='header' maxwidgets='1' showaddelement='no'> 
From above change maxwidgets='1' to maxwidgets='5'.
Step-5. Just next to maxwidgets - in showaddelement='no', change 'no' to 'yes'.
Step-6. This is an important step - Hit the "Save" button, lol.
Step-7. After saving return to your Dashboard. Select "Layout". Above your header, there will be a link titled "Add a Gadget". Click this and add the Gadget of your choice.
Step-8. Save your changes and view your blog to ensure the widget was added correctly.

Hope this tutorial helped you. If you like our posts, share to your friends and comment below if you have any concern. Do not forget to subscribe us.

Enjoy !

Friday, 4 September 2015

How to List the Post Titles of all POSTS from your Blogger/Blogspot Blog [Tutorial]

In this Tutorial, we will show you how to list the Titles of your blog's more than 500 recent posts. If you are looking for an alternative to Blogger's gadget, then this might be very useful to you.

As we experienced, to retrieve the posts of a blog, you can use the URL like this:

http://***.blogspot.com/feeds/posts/default?alt=json&callback=mycallbackfunc&start-index=1&max-results=100

However, it does not work if your blog has more than 500 posts and you want to list them all. Our experiment showed that even you supplied a big number like (e.g.-10000) for max results, only up to 500 posts would return. To retrieve the list of more than 500 posts, we need a loop to do that. The following is how we implemented it for our several blogs.
We can also label all posts in a single page in another way, i.e. SITEMAP/Table Of Contents shows post titles with separated labels and a New! text with recently published posts.
Go through this link How to create a Sitemap/Table of Contents in Blogger to create a page of All Posts Titles for your information/use.
Click here >> SITEMAP to see our Sitemap / Table Of Contents.
Now lets come to the point,

Code goes here :-
<div><ul id="postList12"></ul></div>
<script type="text/javascript">
var startIndex = 1;
var maxResults = 100;
function sendQuery12()
{
var scpt = document.createElement("script");
scpt.src = "/feeds/posts/summary?alt=json&callback=processPostList12&start-index=" + startIndex + "&max-results=" + maxResults;
document.body.appendChild(scpt);
}
function processPostList12(root)
{
var elmt = document.getElementById("postList12");
if (!elmt)
return;
var feed = root.feed;
if (feed.entry.length > 0)
{
for (var i = 0; i < feed.entry.length; i++)
{
var entry = feed.entry[i];
var title = entry.title.$t;
for (var j = 0; j < entry.link.length; j++)
{
if (entry.link[j].rel == "alternate")
{
var url = entry.link[j].href;
if (url && url.length > 0 && title && title.length > 0)
{
var liE = document.createElement("li");
var a1E = document.createElement("a");
a1E.href = url;
a1E.textContent = title;
liE.appendChild(a1E);
elmt.appendChild(liE);
}
break;
}
}
}
if (feed.entry.length >= maxResults)
{
startIndex += maxResults;
sendQuery12();
}
}
}
sendQuery12();
</script>
Now you can put above code in two different ways anywhere in your blogger/blogspot blog. We would recommend to put the code in sidebars - left/right, that's the first way and you can put code in a html page which we can used it as a Sitemap of a blog or Archive or List of All post in a Single page.
Lets see how we can insert above given code in blogger/blogspot blog.

First Method: Putting the List in a Gadget

Inserting code in sidebars - left right, of a Blog.
Step:1. Go to Dashboard>>Layout
Step:2. Select add a Gadget Link
Step:3. Select HTML/Javascript gadget
Step:4. Enter the Title of your Widget, e.g. All Posts List
Step:5. Copy above code and paste the code inside the content box
Step:6. Now save and view your blog.

Second Method: Putting the List in a Page

Inserting code in a Page.
Step:1. Go to Dashboard>>Layout
Step:2. Select Page
Step:3. To create page click on New Page button
Step:4. Click Edit HTML tab to switch to HTML mode
Step:5. Copy and paste the code into the Editor
Step:6. Now publish and view your post. The list should appear inside the page.

We hope this Tutorial helps you to align list of all posts in sidebars and in a page as a content of table/sitemap. If you think this helped, subscribe us.
Enjoy !

Thursday, 3 September 2015

Devcorner: Macros Are Evil

The joys of programming - hours spent scratching one's head whilst trying to figure out why the seemingly correct code does not produce correct results.

Hi, Charlie here. I used to post often.

Where was I? Ah, yes, this nugget of brain fudgery from the VDrift forums posted by NaN:
So I've spent some time today try to figure out why cars are still flying off in random directions when hitting curbs sometimes.

It turns out it is a bug in Bullet, to be more specific in the SIMD_DEGS_PER_RAD macro.

Code:

#define SIMD_PI           btScalar(3.1415926535897932384626433832795029)
#define SIMD_2_PI         btScalar(2.0) * SIMD_PI
#define SIMD_HALF_PI      (SIMD_PI * btScalar(0.5))
#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0))
#define SIMD_DEGS_PER_RAD  (btScalar(360.0) / SIMD_2_PI)

The first one to spot it gets a virtual cookie.

For the answer visit the thread, I won't spoil it here. Instead, I'll post a screenshot, also sourced from said forums and taken by Stunt Rally author CrystalH.

 


For those who don't know, Stunt Rally is a friendly fork of VDrift.