Showing posts with label 8. Show all posts
Showing posts with label 8. Show all posts

Saturday, February 14, 2015

Turbo C for Windows 8 64 bit

Hello Everyone, in my previous posts I have shared links to download turbo c++ for windows xp and windows 7. From last few days I am getting requests from my blog readers to share a link to download turbo c++ for windows 8. So in this article I have shared about it and it will run in full screen. Just click on Download Now button to download turbo c++ for windows 8. I will not recommend you to use turbo C++ compiler because it is very old compiler. You should use some modern compiler like GCC.


Turbo C++ for Windows 8 64 bit

Also Read: GCC Compiler: Download Code::Blocks 12.11 a Free C/C++ IDE

Size: 10.1 MB
OS: Windows Vista / Vista 64 bit / 7 / 7 64 bit / 8 / 8 64 bit


- Download Turbo C++ for Windows 8 64 bit -



Source: http://www.softpedia.com/get/Programming/Coding-languages-Compilers/TurboCplusplus-for-Windows-7.shtml
Read more »

Sunday, January 25, 2015

How to run windows XP in windows 8 using virtualbox

Hai now iam going to show how to install windows xp in virtual box on windows 8. Virtualbox is a free software and also called as open source virtualization software. Virtualbox creates the environment to install and run the more than one operating system at the same time in our system. For example we can view more than one operation systems in side by side window. It is very easy to use and understand. We can share data from guest os to host os using shared folder option and we can also access host USB device from Guest in virtualbox. The virtualbox has many features and advantages.

About VirtualBox


The main feature of virtualbox is a cross-platform virtualization application means we can Install it on your existing AMD-based or Intel computers, no need to worry about operating system whether they are running Mac, Windows,Linux or Solaris operating systems it will works almost on all the os. Another one, it includes the capabilities of your existing computer so that it can run multiple operating systems at the same time. For example, you can run Linux and Windows on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC or system, and so on, without disturbing your existing applications or softwares. You can very easily install and run as many virtual machines as you like. The only limits are disk space and memory if you have more we can run more vm’s. VirtualBox is also very powerful and dynamic. It can run anywhere from desktop computers or small embedded systems in all the way and also used in datacenter deployments and now away days in cloud environments.

I think you got some of the knowledge about the virtualbox. If you want to learn in depth please refer the documentation or help of the virtualbox. First download the virtualbox from the official site https://www.virtualbox.org/ and get ready.

By following this procedure we can also 

install windows xp in virtual box on windows 7

https://www.youtube.com/watch?v=2N_-cg6fRRI
step 1 :- Install the virtual box software.

step 2 :- Click new icon in virtual box or CTRL + N.

step 3 :- Then welcome to new virtual machine wizard will appears and click next.

step 4 :- Give the VM name, os type and click next.

 

step 5 :- Select the memory size 512 mb ( Change as per your requirements ) and click next.


step 6 :- Select the create new hard disk and click next.


step 7 :- A window will appears click next and select dynamically expanding storage and click next.



step 8 :- Give the hard disk size 20 gb ( Change as per your requirements ) and click next then click finish.


step 8 :- Click the start icon.


step 8 :- Select the drive of the windows xp installation cd and install the xp. Enjoy.

Read more »

Wednesday, January 21, 2015

Creating EasyTooltip class Part 8

In this tutorial we will improve the auto-sizing algorithm by calculating the best direction in which the tooltip will be displayed, relative to the mouse.

Go to TooltipCursor class and declare a new variable "direction":

private var direction:String = "";

In the updateSize() function we shall calcualte which direction the tooltip should be casted, relative to the mouse of the user. This is done in order to display as much content as possible, therefore - the tooltip is casted in the direction, which has more free space for it.

Right now we are going to add only 2 directions - topright and topleft. The algorithm behind it is actually fairly simple - all we do is check in which half of the parent (stage in this case) the mouse is located. If mouse is in the left half of the parent, then there is more space on the right - so the direction will be "topright", and vice versa.

Other than just setting the direction values, we will also set actual_x and actual_y values. For topright, we keep them as they were before, but for topleft - move them to the left by X pixels, where X is the width of the tooltip.

// calculate best direction
if (this.x <= parentW * 0.5) {
direction = "topright";
actual_x = 0 + style.offsetX;
actual_y = -h + style.offsetY;
} else
if (this.x > parentW * 0.5) {
direction = "topleft";
actual_x = -w + style.offsetX;
actual_y = -h + style.offsetY;
}

The code we had after this remains the same, except that we execute it only if direction is topright. Also, instead of adding 4 pixels in the while loop - add just 1 (for more precision):

// If sticks out on the left:
if(direction == "topright"){
// if tooltip sticks out of border - calculate shortened width to fit the content
if (this.x + actual_x + w > parentW) {
txt.wordWrap = true;
w = parentW - this.x - actual_x;
h = txt.textHeight + 4 + style.textPadding.top + style.textPadding.bottom;
} else {
// if doesnt stick out, keep adding 1 pixel to the width until as much text is seen as possible
while (this.x + actual_x + w < parentW) {
w += 1;
// try turning off wordwrap and see if it still fits (as one line)
txt.wordWrap = false;
if (w > txt.textWidth + 4 + style.textPadding.left + style.textPadding.right) {
w = txt.textWidth + 4 + style.textPadding.left + style.textPadding.right;
break;
}
txt.wordWrap = true;
}
}
}

If direction is topleft, the code is similar, yet some values need to be changed.

Take a look:

// If sticks out on the right:
if(direction == "topleft"){
if (this.x + actual_x <= 0) {
txt.wordWrap = true;
actual_x = -this.x;
w = this.x;
h = txt.textHeight + 4 + style.textPadding.top + style.textPadding.bottom;
} else {
// if doesnt stick out, keep adding 1 pixel to the width (and substracting it from actual_x) until as much text is seen as possible
while (this.x + actual_x > 0) {
actual_x -= 1;
w += 1;
// try turning off wordwrap and see if it still fits (as one line)
txt.wordWrap = false;
if (w > txt.textWidth + 4 + style.textPadding.left + style.textPadding.right) {
w = txt.textWidth + 4 + style.textPadding.left + style.textPadding.right;
break;
}
txt.wordWrap = true;
}
}
}

Full class code:

package com.kircode.EasyTooltip 
{
import flash.display.MovieClip;
import flash.display.Shape;
import flash.text.TextField;
import flash.text.TextFormat;
/**
* The cursor that follows the mouse (if not set otherwise) and displays each tooltip.
* @author Kirill Poletaev
*/
public class TooltipCursor extends MovieClip
{

public var txt:TextField;
private var style:TooltipStyle;
private var background:Shape;
private var w:int;
private var h:int;
private var actual_x:int;
private var actual_y:int;
private var parentW:int;
private var parentH:int;
private var direction:String = "";

public function TooltipCursor(pW:int, pH:int)
{
parentW = pW;
parentH = pH;
txt = new TextField();
txt.multiline = true;
background = new Shape();
addChild(background);
addChild(txt);
}

/**
* Set style of the tooltips.
* @paramst TooltipStyle object to apply.
*/

public function setStyle(st:TooltipStyle):void {
style = st;
}

/**
* Change the text value of the tooltip.
* @parammessage The new text value.
*/

public function setText(message:String):void {
txt.text = message;
txt.setTextFormat(style.textFormat);
updateSize();
updateDisplay();
}

private function updateDisplay():void {
background.graphics.clear();
background.graphics.beginFill(style.backgroundColor, style.backgroundAlpha);
background.graphics.drawRect(actual_x, actual_y, w, h);
background.graphics.endFill();

txt.width = w - style.textPadding.left - style.textPadding.right;
txt.height = h - style.textPadding.top - style.textPadding.bottom;
txt.x = actual_x + style.textPadding.left;
txt.y = actual_y + style.textPadding.top;
}

private function updateSize():void {
w = txt.textWidth + 4 + style.textPadding.left + style.textPadding.right;
h = txt.textHeight + 4 + style.textPadding.top + style.textPadding.bottom;

// calculate best direction
if (this.x <= parentW * 0.5) {
direction = "topright";
actual_x = 0 + style.offsetX;
actual_y = -h + style.offsetY;
} else
if (this.x > parentW * 0.5) {
direction = "topleft";
actual_x = -w + style.offsetX;
actual_y = -h + style.offsetY;
}

// If sticks out on the left:
if(direction == "topright"){
// if tooltip sticks out of border - calculate shortened width to fit the content
if (this.x + actual_x + w > parentW) {
txt.wordWrap = true;
w = parentW - this.x - actual_x;
h = txt.textHeight + 4 + style.textPadding.top + style.textPadding.bottom;
} else {
// if doesnt stick out, keep adding 1 pixel to the width until as much text is seen as possible
while (this.x + actual_x + w < parentW) {
w += 1;
// try turning off wordwrap and see if it still fits (as one line)
txt.wordWrap = false;
if (w > txt.textWidth + 4 + style.textPadding.left + style.textPadding.right) {
w = txt.textWidth + 4 + style.textPadding.left + style.textPadding.right;
break;
}
txt.wordWrap = true;
}
}
}

// If sticks out on the right:
if(direction == "topleft"){
if (this.x + actual_x <= 0) {
txt.wordWrap = true;
actual_x = -this.x;
w = this.x;
h = txt.textHeight + 4 + style.textPadding.top + style.textPadding.bottom;
} else {
// if doesnt stick out, keep adding 1 pixel to the width (and substracting it from actual_x) until as much text is seen as possible
while (this.x + actual_x > 0) {
actual_x -= 1;
w += 1;
// try turning off wordwrap and see if it still fits (as one line)
txt.wordWrap = false;
if (w > txt.textWidth + 4 + style.textPadding.left + style.textPadding.right) {
w = txt.textWidth + 4 + style.textPadding.left + style.textPadding.right;
break;
}
txt.wordWrap = true;
}
}
}

}

}

}

Thanks for reading!

Here are the results so far:

Read more »