Kit to fix SQL injection attacks

Microsoft has released a toolkit that aims to help developers and administrators of websites to block and eradicate the recent wave of SQL injection attacks (SQL Injection).

The tools, which are aimed at web developers and administrators, seeking help in identifying weaknesses in ASP scripts that could be exploited in a SQL injection attack.

The tools are:

Scrawlr

Examines the files of the site and simultaneously analyzing the parameters used on each page looking for vulnerabilities to SQL injection.

The tool uses technology created by HP WebInspect but has been modified only focusing on vulnerabilities in SQL. This will allow webmasters to easily find vulnerabilities similar to those that were exploited in the attacks. Just open the tool to indicate the URL of the page being checked.

Microsoft Source Code Analyzer for SQL Injection

Call MSCAS, this is an analysis tool for static analysis of code in ASP. To run it requires access to source code of the page.

URLScan 3.0

This tool restricts the types of HTTP requests that IIS (Internet Information Services, Microsoft’s Web server) will process. By blocking specific types of requests, the tool may prevent certain attacks.

The tools are free and can be obtained on the Microsoft (http://support.microsoft.com/kb/954476). At the MSRC blog, you can get links to other blogs from Microsoft as SVRD, which are disclosing more information about the attacks.

Automated SQL injection attacks have hit thousands of sites around the world recently.

Originally from China and Chinese sites only attacked, but then began to diversify their targets, reaching even several Brazilian sites, as reported by the Defensive Line.
There is still much confusion and little information on how to guard against this type of attack between those responsible for maintenance of the sites affected.

Posted in General | Leave a comment

Create PDF from a URL

The code below imports a URL of a website and generate a URL from this document PDF with the captured screen of the website.

<%
'Create an instance of the control
Set aspPdf = Server.CreateObject ("Persits.Pdf)
Creates a blank document
Set Doc = aspPdf.CreateDocument
'It is the Internet URL
Doc.ImportFromUrl "http://www.google.com.br/"
'Save the document.
ArquivoPDF Doc.Save = (Server.MapPath (importa_url.pdf "), False)
'Get the objects from memory
= Nothing Set Doc
= Nothing Set aspPdf

Response.Write "File created successfully:" & ArquivoPDF
%>
Posted in General | Leave a comment

Animation – Basic Concepts

01.gifFirst you have to create the object that will animate. In this case, only for example, made a ball that will be jumping and a box.







To begin the animation, we first need to know roughly how long the animation will last. If it is 10, 20 or 60 seconds… Since we have touched on this subject, I will explain a few things about video.

Each second of animation has 30 frames. (Standard TV)
In the cinema has 24 frames per second.
As Flash is the standard 12 frames per second fps.
Framework can also be called Frame.

Assuming that the scene has 5 / 2.
5 / 2 X
30 fps = 150 frames
Easy right?

Now yes, with these tips now you can get an idea about animation.

Our animation will have 7 the 2nd. So will 210 frames. When you open the 3dsmax it comes with the timeline set to 100 frames. We must increase the amount of frames. Just click the button Timeline Configuration.

Set the length of the timeline in the field LengthTo 210.

There, our timeline has now 210 frames to be animated. If when you are animating need more frames, could increase the quantity.

02 – Animating:

Well, now is to animate the ball. Select it and click Auto Key.

When you click Auto Key, 3ds max gives the option to animate. Now it’s pretty simple. Simply drag the timeline cursor to the frame you want to finish the animation and then move the object where it will stop and go! Already made the animation. Calm down, I will explain in more detail.

With the ball selected, click Auto Key. (Please note: when you click the Auto KeyIt enables the movement of all objects. To change something in the scene, you have to disable Auto Key.)

Drag the cursor to the frame 10.

Now move the ball up to create the 3d keyframes.

Ready. We have a motion. To see how it was, press the Play.

Beauty. Now, to get the ball down, drag the cursor to the frame 15 and move the ball down … and so on … Much like Flash.

Posted in General | Leave a comment

Understanding Attributes in CSharp

An attribute is an object that represents the data you want to associate with an element in its program. The element that you attach an attribute is known as target [Target]A practical example would be [NoIDispatch]This attribute is associated with an interface or class.

Targets of attributes

If you search on CLRYou can find many attributes, some of them are applied to assemblies, classes or other interfaces, and some, like [WebMethod]Are applied to members of classes.Some attributes that we find are declared in AttributeTargets and are detailed below:The best-known attribute when programming in C # is the [Serializable]. With it, you ensure that your class can be serialized to disk or the web.We can create our own attributes and use them at any time Suppose, for example, that his development company wants to monitor the comments of codes of all classes, can you imagine? So let’s build one with attributes!The attributes, like many things in C #, are orgranizados in classes, to create a custom attribute, derive your new custom attribute class from System.Attribute.

public class ComentariosAttribute: System.Attribute

Complile you need to tell what kind of elements will be used in your attribute. You specify what else?.

    [AttributeUsage (AttributeTargets.Class |
                       AttributeTargets.Constructor |
                       AttributeTargets.Field |
                       AttributeTargets.Method |
                       AttributeTargets.Property,
                       AllowMultiple = true)]

The attribute AttributeUsage is an attribute applied to attributes.The name of our custom attribute will be ComentariosAttribute. By convention, we add the word Attribute to the name of your attribute.The compiler supports this convention, allowing you to call with the shorter name: CommentsBuilding our Attribute [Class: ComentariosAttribute.cs]

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
    [AttributeUsage (AttributeTargets.Class |
                       AttributeTargets.Constructor |
                       AttributeTargets.Field |
                       AttributeTargets.Method |
                       AttributeTargets.Property,
                       AllowMultiple = true)]
    public class ComentariosAttribute: System.Attribute
    {
        / / Private data member
  private string author;
        private string date;
        private string comment;
        / / Properties to known parameters
        public string Author
        {
            get (return author;)
            set (author = value;)
        }
        public string Data
        {
            get (return date;)
            set (data = value;)
        }
        public string Comment
        {
            get (return comment;)
            set (comment = value;)
        }

        public ComentariosAttribute ()
        {

        }
    }

In its application [or WebForm WindowsForm] add our attribute.In our case it will be an ASP.NET page.

[Comments (Author = "Joe", Date = "01/01/2007"
             Comment = "test lines of code")]
public partial class _Default: System.Web.UI.Page (
    protected void Page_Load (object sender, EventArgs e)
    {       

    }
}

Okay, we’re with our attribute in the air! But we still can not see if it really is working, for it will use the System.Reflection

[Comments (Author = "Joe", Date = "01/01/2007"
             Comment = "test lines of code")]
[Comments (Author = "MARIA", Date = "12/11/2007"
             Comment = "another test for lines of code")]
public partial class _Default: System.Web.UI.Page
{
    protected void Page_Load (object sender, EventArgs e)
    {
        System.Reflection.MemberInfo info = typeof (_Default);
        object [] atts = info.GetCustomAttributes (typeof (ComentariosAttribute), false);
        foreach (object att in atts)
        {
            ComentariosAttribute attCA = (ComentariosAttribute) att;
            Response.Write (String.Format ("AUTHOR: (0) <BR /> DATE: (1) <BR /> COMMENTARY: (2)",
                            attCA.Autor,
                            attCA.Data,
                            attCA.Comentario));
        }
    }
Posted in General | Leave a comment

Chrome Text

20070707-5.gifHere is a nice chrome text effect. You can use it in your blog header, as well as Arts graphic and in menus.

  1. Creates a new image with a dark blue as background.
    Creates a new layer and makes a selection that take the bottom half of the layer. Fill with a gradient from black to gray.
    20070707-1.gif
  2. Invert the selection (Ctrl + Shift + I) and fill with a gradient of gray to white.
    Select everything (Ctrl + A) and makes an image Cut (Ctrl + X) to stay in memory.
    20070707-2.gif
  3. Choose tool “Type Mask Tool” and type your text. Save your selection. Select> Save Selection.
    20070707-3.gif
  4. Fill your selection with a gradient from white to black.
    20070707-4.gif
  5. Now choose Select> Modify> Contract> 2 pixels and paste the image that you cut yourself in step 2 (Ctrl + V).
    If you press the key “V” You can move the texture to your liking.
    20070707-5.gif
Posted in General | Leave a comment

Linking style sheets to documents

css.jpg

The three types of binding sheets estiloAs style sheets can be linked to a document in three ways:

1.Importadas or damage occurs;
2.Incorporadas;
3.Inline.
Stylesheet externaUma stylesheet is external dictates, when CSS rules are declared in a document that part of the HTML document. The stylesheet is a separate file and html file that has the extension. Css

An external style sheet is ideal to be applied to multiple pages. With an external style sheet, you can change the look of an entire site by changing just one file (the file of the style sheet).

The css file of the external style sheet to be imported or otherwise linked to the HTML document within the <head> the document. The general syntax to link a style sheet called estilo.css is shown below.

<head>
………..
<link rel=”stylesheet” type=”text/css” href=”estilo.css” mce_href=”estilo.css”>
……….
</ Head> The syntax for import a style sheet called estilo.css is shown below:

<head>
………..
<style type=”text/css”>
@ Import url (“estilo.css”);
</ Style>
……….
</ Head> The browser will read the style rules estilo.css file and format the document accordingly.

An external style sheet can be written in any text editor. The file should not contain any HTML tags. Style sheets must be “saved” with a. Css

Embedded style sheet or style sheet internaUma is said embedded or internal, when CSS rules are declared in the HTML document itself.

An embedded style sheet or internal, is ideal for application as a single page. With an embedded style sheet or internal, you can change the appearance of only one document, one where the stylesheet is incorporated.

The style rules are valid for the document, are declared in <head> section of the document with the style tag <style> as syntax shown below:

<head>
………..
<style type=”text/css”>
<!–
body (
background: # 000000;
url (“images / minhaimagem.gif”);
}
h3 (
color: # FF0000;
}
p (
margin-left: 15px;
padding: 1.5em;
}
–>
</ Style>
………..
</ Head> The browser will read now the style rules on its own page, and format the document accordingly.

Note: A browser normally ignores unknown tags. This means that an old browser that does not support styles, will ignore the tag <style>, but the contents of the tag will be displayed on the screen. You can prevent an old browser shows the contents of the tag, “hiding it” through the use of HTML markup comment.

Note the inclusion of the symbols <! – (Open comment) -> (comment closes) in code above.

An inline style sheet style sheet is said to be inline when CSS rules are declared within the tag of the HTML element.

An inline style applies only to an HTML element. He loses many of advantages style sheets because it mixes content with presentation. Use this method in exceptional cases, like when you want to apply a style to a single occurrence of an element.

The syntax to apply inline style is shown below:
<p style=”color:#000000; margin: 5px;”>
Here a paragraph in black and in four 5px margins.
</ P> multiple style sheets If any property is set to the same element in different style sheets, enter into action, The ripple effect will prevail and the values of stylesheet more specific.

Suppose an external style sheet with the following properties for the h2 selector:

h2 (
color: # FFCC00;
text-align: center;
font: italic 9pt Verdana, sans-serif;
), And an internal style sheet with the following properties for the h2 selector:

h2 (
color: # FFCC00;
text-align: center;
font: italic 10pt Verdana, sans-serif;
) If both pages are linked to the document, as there is a conflict in the font size for h2, we consider the inner sheet and letter of <h2> have the same size to 10 pt.

Posted in General | Leave a comment

Creating images with Java

Creating images with Java

In this paper we discuss and see how we can use Java to create, generate and manipulate simple images such as graphics and text. From this quick article, we have a good base to develop more sophisticated components for imaging.

Criandos images

Generally, the Swing components already have an image buffer, and only need to implement the paint () method. To create our images, we must also create a buffer for our image and then create an object of type java.awt.Graphics.

The class is a subclass of java.awt.image.BufferedImage java.awt.Image, which uses a memory block, and that’s where we create our image. In the constructor of the class will spend three parameters: width (image width), height (height image) and image type. Initially we will use the image type defined by BufferedImage.TYPE_INT_RGB, which allows transparent images. But this is beyond the scope of this article.

To create the chart that we use, we use the following code:

[Code] 1 int width = 200, height = 200;
2 BufferedImage buffer = new BufferedImage (width, height, BufferedImage.TYPE_INT_RGB);
3 buffer.createGraphics Graphics g = ()

How does that have an image buffer, which represents an image of 200 by 200 pixels in size. From there, we have a Graphics object that we use to draw the primitive desire.

The primitives are: points, lines, ovals (and circles), rectangles (and squares), among others.

Created the image, we will create a fund for her:

1 g.setColor (Color.White);
2 g.fillRect (0, 0, width, height);

With the method setColor () of the Graphics class, we set the color of the primitive that we draw. The fund is nothing more than a filled rectangle the size of the image itself, and for this we used the method fillRect (), I draw a Rectangle filled with the color reported in setColor (). Simple, no?

Now let’s draw a simple line in our image. Here’s the code:

1 g.setColor (Color.BLACK);
2 g.drawLine (0,0, width, height);

We define the new color that we use to design and send draw a line, the method drawLine (), stating the start and end points of the line.

Since we got here, let’s see some results to follow with the rest of the application, so that we may already have a visual idea of what we can do.

Let’s create a simple Swing application to display the image we created on the screen. Here is the code for the example:

01 import javax.swing .*;
02 import java.awt .*;
03 import java.awt.image .*;
04
(05 public class ExemploImagem
06 public static void main (String [] args) (
07 JFrame frm = new JFrame ("Test Image");
08 JPanel pan = new JPanel ();
09 JLabel lbl = new JLabel (criarImagem ());
10 pan.add (lbl);
11 frm.getContentPane (). Add (pan);
12 frm.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
13 frm.pack ();
14 frm.show ();
15     }
16
17 private static ImageIcon criarImagem () (
18 int width = 200, height = 200;
19 BufferedImage buffer = new BufferedImage (width, height, BufferedImage.TYPE_INT_RGB);
20 Graphics g = buffer.createGraphics ();
21 g.setColor (Color.White);
22 g.fillRect (0, 0, width, height);
23 g.setColor (Color.BLACK);
24 g.drawLine (0, 0, width, height);
25 return new ImageIcon (buffer);
26     }
27 }

In main () method we just Swing components to display the image, but watch out for the method criarImagem () which is what really interests us, because that’s where we are creating the image buffer and then return an object of type ImageIcon, which is the visual component of Swing which represents an image.

Running the application, we will see a window like this:

This first example, although simple and seemingly useless, it was important for us to start our experiment with the manipulation of images with Java.

Now, let us draw our example a little further, generating a pie chart. For this, we create a class, call PieChart, which will be a component that will create for us a pie chart from an array of value type int.

Here’s the implementation:

01 import javax.swing .*;
02 import java.awt .*;
03 import java.awt.image .*;
04
(05 public class PieChart
06
07 / / save the values to be displayed in the graph
08 private int [] values;
09 / / buffer stores the image drawn
10 private BufferedImage imageBuffer;
11 / / background color guard
12 private Color background;
13 / / store the image dimensions
14 private int width, height;
15 / / colors for the pieces of graph
16 private Color [] colors = (Color.BLUE, Color.GREEN, Color.RED,
17 Color.YELLOW, Color.ORANGE, Color.PINK,
18 Color.MAGENTA, Color.LIGHT_GRAY, Color.GRAY,
19th Color.BLACK);
20
21     /**
22 * Creates a class object that generates a pie chart.
23 * @ param values Array of integer values to be represented.
24 * @ param width Width of the image.
25 * @ param height Height of image.
26 * @ param background color, background image.
27      */
28 public PieChart (int [] values, int width, int height, Color background) (
29 if (values == null | | values.length <1 | |
30 width <0 | | height <0 | |
31 background == null) throw new IllegalArgumentException ();
32 this.value = values;
33 this.width = width;
34 this.height = height;
35 this.background = background;
36 CreateChart ();
37     }
38
39     /**
40 * Create the image internally.
41      */
42 private void CreateChart () (
43 imageBuffer = new BufferedImage (width, height, BufferedImage.TYPE_INT_RGB);
44 Graphics g = imageBuffer.createGraphics ();
45 g.setColor (background);
46 g.fillRect (0, 0, width, height);
47 int arc = 0;
48 int [] sizes = calculateAngles (values);
49 for (int i = 0, j = 0; i <sizes.length; i + +, j + +) (
50 if (j == 10) j = 0;
51st g.setColor (colors [j]);
52 g.fillArc (0, 0, width, height, arc, sizes [i]);
53 arc + = sizes [i];
54         }
55     }
56
57     /**
58 * Calculate the angles for each value reported.
59 * @ param value Value to have their angles calculated.
60 Array * @ return int with the angles for each value.
61      */
62 private int [] calculateAngles (int [] values) (
63 int [] angles = new int [values.length];
64 int total = 0;
65 / / calculate the sum total of the values
66 for (int i = 0; i <values.length; i + +) (
67 total + = values [i];
68         }
69 / / calculate the angles for each piece
70 for (int i = 0; i <values.length; + + i) (
71 angles [i] = (360 * values [i]) / total;
72         }
73 return angles;
74     }
75
76     /**
77 * Returns the image of the pie chart.
78 * @ return an object of type ImageIcon.
79      */
80 public ImageIcon getImageIcon () (
81 return new ImageIcon (imageBuffer);
82     }
83
84     /**
85 * Return the image buffer pie chart.
86 * @ return an object of type BufferedImage.
87      */
88 public BufferedImage getBufferedImage () (
89 imageBuffer return;
90     }
91 }

This class generates the image internally already in the constructor of the class. To get the image to be displayed, the method getImageIcon ().

To view the chart image generated, we can use the previous example and just change the line where the JLabel is created with the image, the following lines:

[Code] int a [] values = (20, 10, 60, 90, 180);
2 PieChart pie = new PieChart (values, 200, 200, Color.White);
3 JLabel lbl = new JLabel (pie.getImageIcon ()) [/ code]

See how simple it is? With a few lines of code, write a class that represents and draws a pie chart that is widely used in commercial applications.

This shows the power and ease of handling Java for this kind of application. The APIs provided by Sun are extremely powerful.

Sometimes we want not only to generate and display images, but can also save them to disk, and it will use the ImageIO class, package javax.imageio. This Java API allows to save images in JPEG and PNG. Unfortunately, for reasons of license, you can not save in GIF format. But there are third-party APIs to save the image in GIF format. The Google may give you a good help.

The procedure to write the disk image is simple, see:

ImageIO.write (pie.getBufferedImage (), “png”, new File (“img.png”));

The first parameter of the static method write () buffer is the image generated after the image type, which in this case is PNG and finally the File that represents where the file to be created.

Another option of the Write method () is informing an OutputStream instead of a File. With this, we can easily make a Java Servlet that generates an image. Example:

1 response.setContentType ("image / png");
2 response.getOutputStream OutputStream os = ();
3 ImageIO.write (buffer, "png", os);
4 os.close ();

In this case we change the content type to image / png, which is a PNG image. Then we spent the OutputStream response with the web client for the write () method, which writes the response image data generated and represented by buffer. Simple!

Sometimes we want to improve our image by adding a decorative text, and this is as simple as generating the image itself. We can even choose the font, the size and position of the text. Look at the example:

1 Font font = new Font ("Courier", Font.Bold, 30);
2 g.setColor (Color.BLUE);
3 g.setFont (font);
4 g.drawString ("Guj", 0.20);

The Font class, as the name suggests, is a font system. In its constructor, we reported the name of the source, its characteristics (for BOLD) and its size. Then just tell the chart text color, the font to be used to draw the text and sent to the method drawString (), String text informing the position (X, Y) in the image.

From then on you just use your imagination and develop their applications.

Posted in General | Leave a comment

Understanding Reflection – ASP.NET / C #

This article aims to explain how it works and how to use Reflection in applications.

Reflection is generally used to show metadata, associate methods and properties and find types.

With it you can examine the types in an assembly and interact with them or instantiate them and we can also create types at run time.

The main use of reflection is to create new types at runtime and uses them to perform tasks.

In the article “Understanding Attributes” use reflection to view the metadata.
we use the type _Default typeof, which returns an object of type type, derived from MemberInfo.

The Type class is the heart of the reflection classes. It encapsulates the type representation of an object. The class type is the primary route for access to metadata. It derives from MemberInfo and encapsulates information about the members of a class (methods, properties, fields, events, etc..)

Posted in General | Leave a comment

Generating reports with iReport and Java

This topic is intended to inform, step by step how to create a report with the iReport and run it through an application Java.

For better understanding, it will work with the project in a layer structure, all files will be in the root folder of the project.

  • Tools used:
  • iReport-1.2.5
  • Java (version jre1.5.0_06)
  • Eclipse (Lomboz)
  • MySQL 5.0.18

Let’s assume that you already created a schema in mysql named myproject

Run this script to create the table and insert some records:

/*
MySQL Backup
Source Host: localhost
Server Source Version: 5.0.18-nt
Source Database: myproject
Date: 11/29/2006 21:27:23
*/

SET FOREIGN_KEY_CHECKS = 0;
myproject use,
#----------------------------
# Table structure for tb_produtos
#----------------------------
CREATE TABLE `tb_produtos` (
  `Cod` int (11) NOT NULL auto_increment,
  `Description` varchar (50) character set latin1 collate latin1_general_ci default NULL,
  `Price` double default NULL,
  PRIMARY KEY (`cod`)
) ENGINE = MyISAM DEFAULT CHARSET = latin1;
#----------------------------
# Records for table tb_produtos
#----------------------------

insert into tb_produtos values
(1, 'shirt', '20 ')
(2, 'pants', '30')
(3, 'perfume', '70 ')
(4, 'belt', '20 ')
(5, 'shoe', '100 ')
(6, 'underwear', '10 ')
(7, 'test', '10 ');

We have created the schema, table and some records, we will open the iReport to create the report:

Open iReport and, if it is not an active connection, follow these steps:

  • On the menu, click Date and then Connectio / Datasources, You will have a screen like this:

  • Click new and set as pictured below:

  • If the user root need password, enter it in PassWord
  • Click Test to verify the connection and then Save.
  • You will return to previous window visor, select the connection and click Set as Default.
  • Close the window

Let’s create the report of the quickest and most practical

  • Click Archive | Report Wizard
  • In the window tell the query to the report, as shown:

  • Click NextIn the next window, place all items into the right window, as shown and click Next

  • We’re not going to sort by group, click Next again
  • In the next window, select Tabular Layout and classicT.xml, As shown:

  • Click Next and Close

Do you have something like this:

Locate these buttons:

The first compiles the report, the latter displays the structure (not data) and third displays the report with the data.
If you have not yet saved the report, anyone that you click, it will ask to save, do so and give the name report.

Do some tests with the buttons, if the report is not displayed, check the previous steps because at this point, you should see the report ready.
If it did okay, let’s change the title, double click on him and change to Value ProductSee:

and will remain so.

Save the report again and close the iReport.

Remember that the report was saved with the . Jrxml ??

Well, this file is usually used for editing the report, but what we will use what iReport generated with extençsão . Jasper.

Verify that it is already in the folder where you installed iReportLater, when we are creating the application in Java, they should be copied to the root folder of the project. At the opportune time to remind you …

At this point we are ready with the report, we will create the Application.

From this point, it will be necessary views of images, just inform you what files should be created (from substance), which will be saved and other files to be copied, ok?

Open Eclipse, create a new java project named ProjRelatorio.

With the design selected, right-click and New and Folder, Name of lib First of all, let’s bring the package files iReport for the project.

Access the folder lib Directory iReport and copy the following files to the lib your project.
Check the image:

Please note that the last file mysql-connector-java-3.1.12-bin.jar may have a different version than you find in the folder lib, No problem.

Files copied? We will inform the project that they exist.

  • With the project selected click Project | Properties
  • In the window that opens click Java Build Path
  • Select window Libraries then click Add JARs
  • Expand without project, click the folder lib, Select all the files, click OK and in novamewnte OK.

Now let’s create the following files as shown:

The function of each:

  • ExcRepositorio.java
    This class checks for errors when accessing the database, analyzing Openness / closing
  • gConexao.java
    Responsible for connection to the database
  • principal.java
    Main application where a record is inserted and the report
  • produto.java
    Class used to insert products into the database
  • repositorioProduto.java
    Responsible for adding the product and also for generating the report.

Here are the contents of files:

Save as: ExcRepositorio.java

public class ExcRepositorio extends Exception (
	public ExcRepositorio (String message) (
			super (message);
	}
}

Save as: gConexao.java

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

(public class gConexao
	private static Connection con;
	public static Connection getConexao () throws ExcRepositorio (
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc: mysql: / / localhost: 3306/meuprojeto";
		String login = "root";
		String password = "";
		try (
			Class.forName (driver);
			con = DriverManager.getConnection (url, login, password);
		) Catch (ClassNotFoundException e) (
			throw new ExcRepositorio ("Driver not found:" + e.getMessage ());
		) Catch (SQLException e) (
			throw new ExcRepositorio ("Error opening connection:" + e.getMessage ());
		}
		return con;
	}
}

Save as: principal.java

import javax.swing.JOptionPane;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.view.JasperViewer;

public class Main (
	public static void main (String [] args) throws JRException (
		repositorioProduto repositorioProduto rep = new ();
		JasperPrint narrative;

		/ / Insert another product and displays the report
		String desc = JOptionPane.showInputDialog ("Product description");
		double value = Double.parseDouble (JOptionPane.showInputDialog ("Value"));
		Product prod = new Product (desc, value);

		try (
			rep.inserir (prod);
			rep.gerar Ratio = ();
			JasperViewer.viewReport (report, false);
		) Catch (ExcRepositorio e) (
			JOptionPane.showMessageDialog (null, "Error:" + e.getMessage ());
		}
	}
}

Save as: produto.java

(public class Product
	private int code;
	private String description;
	private double price;

	public Product (String desc, double price) (
		this.setDescricao (desc);
		this.setPreco (price);
	}
	public int getCode () (return code;)
	getDescricao public String () (return description;)
	public double getPreco () (return price;)

	public void SetCode (int cod) (
			this.cod = code;
	}
	public void setDescricao (String desc) (
			this.descricao = desc;
	}
	public void setPreco (double bw) (
			this.preco = pc;
	}
}

Save as: repositorioProduto.java

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashMap;

import javax.swing.JOptionPane;

import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;

(public class repositorioProduto

	public repositorioProduto () ()

	public void insert (Product prod) throws ExcRepositorio (
		Prod.getDescricao String desc = ();
		double price = prod.getPreco ();
		String SQL = "insert into tb_Produtos (description, price) values" +
		"('" + Desc + "'," + price + ")";

		Connection conn = null;
		Statement stat = null;
		try (
			gConexao.getConexao conn = ();
			stat = conn.createStatement ()
			stat.executeUpdate (SQL);
		) Catch (SQLException e) (
			throw new ExcRepositorio ("Error connecting to insert:" + e.getMessage ());
		) Finally (
			if (stat! = null) (
				try (
					stat.close ();
				) Catch (SQLException e) (
					throw new ExcRepositorio ("Error closing connection:" + e.getMessage ());
				}
			}
		}
	}
	public JasperPrint generate () throws ExcRepositorio (
		JasperPrint rel = null;
		try (
			Connection con = gConexao.getConexao ();
			HashMap map = new HashMap ();
			ArquivoJasper String = "relatorio.jasper";
			rel = JasperFillManager.fillReport (arquivoJasper, map, con);
		) Catch (JRException e) (
			JOptionPane.showMessageDialog (null, e.getMessage ());
		}
		return rel;
	}
}

We will now copy the files relatorio.jrxml and relatorio.jasper the folder iReport to the root folder of your project (We only require . JasperBut leave a copy of jxml as security.).

Your design should looks like this:

Phew! Now just run, data will be prompted to insert a product, do this now and see it included in the report that appears.

Posted in General | Leave a comment

What are the differences between IDE, SATA and SATA II?

hd

If you do a search for models of Hard Disks (HD)Certainly will find the terms IDE, IDE / ATA, SATA and SATA2. In general, it is common knowledge that this has anything to do with speed, but not everyone knows exactly what they mean. These acronyms are summarized the names of standards for interfaces to controllers who are responsible for the storage devices of computer data.

Interfaces in the old controller (which in simple terms is a kind of pattern that makes the connection and data transfer between storage devices on the computer) was part of the interface and not the actual HD as it currently is. To facilitate viewing, below we will talk about each one separately.

Standard IDE

The IDE, English Integrated Drive Electronics, Was the first standard that integrated the controller with the Hard Disk. The first interface with IDE hard drives were launched around 1986 and this season has been a great innovation because the cables used were already smaller and had less timing issue, which made the process faster.

Initially, there was a pattern definition and the first IDE devices had problems compatibility among manufacturers. The ANSI (American National Standards Institute)In 1990, applied the corrections for standardization and raised the standard ATA (Advanced Technology Attachment). However with the IDE name was already better known, he remained, although sometimes it was called IDE / ATA.

ide

The first cards had only one IDE port and one FDD (Floppy Disk Drive) and later came to be at least two (primary and secondary). Each one lets you install two drives, or we can install up to four or Hard Drives CD / DVD-ROMs on the same plate. To differentiate the drives installed on the same port, there is a jumper to set them as master (master) or slave.

Initially, the IDE interfaces supported only connection to Hard Drives and that’s why some time ago the computers differential offered as the famous “media kits” which consisted of a sound card, CD-ROMs, boxes, and microphone. The protocol ATAPI (AT Attachment Packet Interface) was created to make integration this type of drive with the IDE, so that quickly became the standard.

SATA

The SATA or Serial ATA, Serial Advanced Technology Attachment English, was the successor to IDE. Hard Disks using the standard SATA transfer data in series and not parallel to the ATA. How he uses two separate channels, one for sending and one for receiving data, it reduces (or nearly eliminate) the problems of synchronization and interference, allowing higher frequencies to be used in transfers.

The cables have only seven wires, one pair for transmitting and another for receiving data and three ground wires. Because they are thinner, allowing even better ventilation in the cabinet. A SATA cable can be up to one meter in length and each port supports a single SATA device (other than the default master / slave IDE).

sata

There are two patterns of drivers SATA: SATA 150 (or SATA 1.5 Gbit / s or SATA 1500)The SATA 300 (SATA 3.0 Gbit / s or SATA 3000) and the SATA 600 (or SATA 6.0 Gbit / s). The latter is the third generation of this technology and was released in May 2009 and are better used for Solid State Drives.

Sata II

It is called SATA II or SATA 2Basically all products of the second generation of SATA (the one with specification 3.0Gbit / s). The difference between SATA and SATA II is basically the speed for data transfer.

Pin X Speed

For best viewing, we organize a table with the number of pins and speed of data transfer rate of these standards.

Posted in General | Leave a comment

Judoscript: interpreted by the Java Language

This article describes language programming scripts [Lurl = http://www.judoscript.com] Judoscript [/ url]An interpreted language that runs on the JVM (Java Virtual Machine).
Judoscript is a powerful scripting language, easy, efficient, elegant and modern, designed and implemented in pure Java.

Judoscript arose from the need to directly use the resources of the Java platform so easy and intuitive. It aims to be a scripting language simple and easy to use. The main advantages in using another language on the JVM (besides Java, of course), is to gain productivity and power of abstraction.

The productivity stems from the ease and power of expression ‘own scripting languages and abstraction follows commands, functions and predefined libraries implemented in this language, allowing much less write code for the same tasks than the original code in pure Java. The performance, however, will generally be lower than the same code implemented in pure Java. One must therefore weigh the pros and cons of using these languages and use them for tasks specific to scripting languages such as system administration, automated robots to perform tasks of administration and collection of information and frameworks for application testing, to name some examples.

The language supports on three basic pillars, a “parser” or “script-engine” powerful, unlimited access to the Java platform features and characteristics “WYSIWYG” (What-You-See-Is-What-You-Get ” proper to 4-GL language, where the commands are easily understood by staff – “readable”).

Judoscript combines simplicity and power of expression in a homogeneous environment that is intended for any practical use, such as combining data from different sources and formats (for processing and reporting), or implement a testing environment for the Java platform. Judoscript is also designed to be a scripting language fun and easy for graphics and multimedia programming and so their development is being targeted at areas such as music, management and manipulation of sound files and java 2D/3D. An IDE-based JavaBeans to further facilitate the development of scripts is also being developed.

The language follows the LGPL license, which means that it is open source and can be freely used for both personal or commercial purposes. The philosophy of language is to follow the latest trends in Java (so it requires an updated sdk) and thus intends to integrate easily with any current project in Java. The principle is simple: if something is useful and available, Judoscript will make it easier to use.

Today, Java is much more than a programming language. The richness of its API and the numerous projects (many of them open source) make the language full of features ranging from basic computing to the most complex needs of an organization. Java has become a vast and rapidly growing field of resources readily available in many (if not all) platforms.

Writing Java code in a natural and fluent, however, requires an advanced knowledge of the language.

Often we need to adjust something on our projects, how to perform some operation in all sources in a certain directory tree (package), shopping baskets or clear a test database, or read an XML document to create a PDF report .

For tasks that require quick action, very well work to write the Java code designed. Instead, Judoscript write scripts for repetitive tasks, which can be run manually or automatically. Such scripts can be updated frequently and more easily, and performance is not a critical point. The process of writing a script (edit and run) can make a difference in productivity because a simple command script “abstracts” or represents many commands in Java.

Imagine you need to create a zip with some files using Java, but you never used the package java.util.zip. The Java documentation lists many classes and you need to understand their meanings and relationships before using them. It takes a good scripting engine that allows to easily use the many features of the Java platform, standard or open source, with maximum convenience, flexibility and extensibility. You will see from the examples below that Judoscript 3-GL/4-GL is a language designed to effectively meet these needs.

Judoscript To install, simply extract the installation package and include the file in the classpath judo.jar.
The following script backs up my programs in a zip file structured in directories with the name indicating the date and time of recording.

# = const System javaclass java.lang.System; 

filename = 'marcio_' @ date (). fmtDate ('yyyyMMdd_HHmm') @. 'zip';
zip = createZip (filename); 

\ # $ Start = System.currentTimeMillis (); 

println "Copying files ...'; 

Copy 'marcio / java / *. java' in 'c: /' 

except '* / judo / examples, * / jython, * /-eclipse SDK-2.0.1-win32, * / fesi'
recursive echo noHidden
Into zip; 

Copy 'marcio / jython / *. py' in 'c: /' 

except '* / demo * / org'
echo
Into zip; 

zip.close (); 

\ # $ End = System.currentTimeMillis (); 

\ $ Total = (\ $ end - \ $ start) / 1000; 

println 'Backup completed on' @ \ $ @ total 'seconds.';

The script then encrypts a file using the JCE API

# if args.length> 0 (
    # infile = args [0];
    # tempfile = args [0] @ '. enc'; 

    EncryptFile # args [1], infile, tempfile;
}

decrypts:

# if args.length> 0 ( 

    # infile = args [0];
    # tempfile = args [0] @ '. dec'; 

    DecryptFile # args [1], infile, tempfile;
}

The following script is a mini robot that runs with an available connection, search and displays the program schedule of the day channel AXN

/ / Mini robot that shows the program schedule of the day channel AXN
/ / Based on prior knowledge of the structure of the html page     

url = 'http://brasil.canalaxn.com/programacion.asp'; 

URL of the html
{ 

BEFORE:
    flag_horario = false;
    flag_programa = false;
<td>:
    / A td tag with the class specified below
    / / Indicates the schedule of the program
    if \ $ _.class.equalsIgnoreCase (txt201i7 ") (flag_horario = true;)
<a>:
    / / A tag with the link provided below
    / / Indicates the program name
    if \ $ _.href.startsWith (grade_pop.asp ") (flag_programa = true;)
TEXT:
    if (flush flag_horario \ @ $ _ ''; flag_horario = false;)
    if (flush flag_programa \ $_;.; flag_programa = false;) 

}

Result of the script for the day 15/11/2002:

07:00 Extreme Sports
08:00 Water Rats
9:00 Cold Squad
10:00 Wiseguy
11:00 Water Rats
12:00 Extreme Sports
13:00 V.I.P
14:00 Alias
15:00 Crusaders Destinations
Criminal Desire 15:00
18:00 Wiseguy
19:00 Cold Squad
20:00 Andromeda
21:00 Enterprise
Sat 0:00 Water Rats
Sat 1:00 Cold Squad
Sat 2:00 Andromeda
03:00 Sat Enterprise
04:00 Sat Criminal Desire

The following script prints all the descriptions of the Products table in a MySQL database

const # dbUrl = 'jdbc: mysql: / / localhost / store';
const # dbuser = 'Monona';
const # dbPass = 'MOMONOMO'; 

connect to dbUrl #, # dbuser, # dbPass; 

executeQuery on:
    select * from products; 

a.next while () (
    . a.descricao;
} 

disconnect ();

Like Jython, Judoscript also functions as a command interpreter:

C: \ \ marcio \ \ Judo> java judo
===========================================================
10/03/2002 JudoScript Language v0.7 (JDK1.3 +)
Copyright 2001-2002 James Huang, http://www.judoscript.com
Tell your friends. Join the fun of open source development.
Java Runtime Version: 1.4.0_01-b03 

Type in JudoScript code, finish by the 'end' command.
=========================================================== 

list '*. judo' in 'a: /';
is \ em $ x \ $ \ ($ fs_result. \ $ x;)
end
...........................................................
A: / lxcrypt.judo
A: / teste_mysql.judo
A: / backup.judo
A: / axn.judo 

C: \ \ marcio \ \ judo>

The interpreter can be invoked with java vjudo, which initiates a visual environment of work to edit and run scripts.

Scripting languages have brought many benefits to software development, including:

  • Increase the level of language, ie, enables the use of commands and closer to human speech and more distant from the machine code in low level;
  • Increases the efficiency, speed and convenience of the programmer to develop code (but sacrificing the performance of code execution);
  • Provides an environment for effective code reuse and development of reusable software;
  • Clear syntax, ease of learning and immediate use without the need of the development cycle / compilation
Posted in General | Leave a comment

First Program in Java

Creating your first Java program

In Java are allowed three kinds of comments:

  • Comment Line
  • Multiple-line comment
  • Comment documentation

Comment Line

The comments line allow the programmer to describe what occurs in a particular line. Java ignores everything after that is the symbol / / by the end of the line. Some examples:

Comment documentation.

The documentation comment is similar to multiple-line comment.

It differs from the quotes used and its function. Delimiters are used as symbols “/**” – initial bounding – and “* /” – the final delimiter. The aim of the review of documentation is being used by the program to generate a javadoc documentation for the program. Later go into details about how to use javadoc to generate documentation.

Defining a class

Every Java program must have at least one class definition. A class definition consists of a reserved word public, followed by the keyword class, followed by the name of the class that by convention must begin with capital letters. The class name is an identifier. An identifier can contain letters, digits, underscores, and dollar sign. An identifier can not start with a digit. An identifier should not start with a dollar sign.

Displaying a message

To view a message in Java using the keyword “println”. This instruction lets you print the desired message and also positions the cursor at the beginning of the next line of the screen.

Let’s see an example of an instruction that displays the message “Welcome to Java programming.”

System.out.println (“Welcome to Java Programming!”);

Another way to print messages

You can also print the same message as follows:

System.out.println (“Welcome to Java Programming!”);

The difference is that the cursor is not positioned at the beginning of the next line, but immediately after the question mark.

public class Welcome (

Sets the initial definition of the class welcome.

public static void main (String args []) (

Sets the initial definition of the main method.

System.out.println (“Welcome to Java Programming!”);

Gives the message “Welcome to Java Programming!”

) / / Main method

Posted in General | Leave a comment

Article on Java

Introduction

Ok! Everyone speaks of this modern language, it is cup here, coffee over there, and you in the middle, unable to understand anything … But what, after all, is such thing as “Java”? Move forward and you can tell the friends who do not know Java in name only, has given an in-depth relationship. And they will die of envy!

Didactically, we can imagine the Java as a computer, a virtual machine. Not any one machine, we can consider it a Rolls Royce (someone would ask, “Why not Ferrari?”. Well, let’s say that Java is not a masterpiece in speed). And, as any luxury car worth its salt, is full of resources. We support printer graphic displays, keyboard, mouse, network, files, and many other things.

You ask, “Wow, how much is this computer?”. My answer: Nothing! This computer, very well thought out, is given for free by Sun, its inventor. Has only one thing: this machine does not exist, at least not physically. But do not think this is a bad thing, no. It is precisely this detail that makes Java so versártil!

In fact, Java is a set of specifications: the programming language, the file format. Class, API and virtual machine. The trick is to emulate the machine in various devices. I say devices because Java is not just for computers, has for mobile, toys (ie: Lego MindStorms) and, legend has it, even watches.

Who knows emulators know how it works. It is as if there is a virtual machine inside your PC, making the programs that run on it.

Sun made the JVM (Java Virtual Machine, as it is called the Java emulator) for the main systems of today. We have for Windows, Linux, Macintosh, … You’ve probably used the Java unaware because there are many Internet sites that use applets. And these are nothing more than the Java programs running within a browser.

The cool part is the Java Development Kit or JDK. It is what allows us to develop programs to run on the JVM.

The JDK is available in different flavors to your liking. We J2SE (Standard Edition), J2EE (Enterprise Edition) and (J2ME Micro Edition.)

For those already familiar with procedural programming languages like C or object-oriented, like C + +, learn to program in Java is a very easy step to take.

    Java is an object-oriented language, with some characteristics:
  • Garbage collector: you need not be managing your memory by hand, Java has a garbage collector built;
  • Threads: Java has native support for threads, which means your program can run multiple processes in parallel;
  • Exceptions: error handling in Java is performed through exceptions. Programs dirty if’s anymore!
  • Resources Controlled: From the beginning, Java was implemented with security in mind. For both, access to resources such as files and network, is very controlled;
  • Java API: Following the paradigm of object orientation to reuse everything at maximum, the API (Application Programming Interface) of Java is quite extensive and comprehensive. Do not reinvent the wheel, use the classes of the API!

    The best aspect of Java is summarized in the phrase above: write and compile your program only once, and run it anywhere! And how is this achieved?

    The specification of Java, there is a description of. Class files, which are nothing more than programs in machine language understood by the JVM. When you write your program files. Java and compiles the bytecode is generated from your program, which is saved with the extension. Class. To run it, the JVM loads. Class and executes the instructions there.

    You can run your program without any modification on any system. Just so much that there is a JVM for the platform you want. And this is the secret: the only part that needs to be carried is the JVM, not your program. And, as already mentioned, there are versions of the JVM for various systems and platforms, your choice.

    Despite appearances to the contrary, Java is not brand of coffee or something. The creators of the language made the association with reference sleepless nights watered the coffee that we programmers spend. And, believe me, after taking a taste for programming, you will also pass many sleepless nights!

  • Posted in General | Leave a comment

    Basic Tutorial BIOS update

    placa-mae.jpgHere’s how to update your bios

    Despite being a simple operation, update the BIOS is somewhat risky. This risk is due to the fact that if something goes wrong, the motherboard of the computer may become unusable. Even so, the BIOS update is done with great frequency. This is because technology hardware advances very fast, especially compared to hard drives and Processors.

    The BIOS is a program that is stored in a special memory located on the motherboard. This is a type of ROM. The most currently used is the Flash-ROM (or flash-BIOS), which may undergo changes, or updates for a special software usually developed by the manufacturer. A type of ROM used on older computers is the EPROM (Erasable Programmable ROM), which needs special equipment for erasing and writing data. This makes it clear that this tutorial aims Upgrade BIOS in Flash-ROM chips.
    CMOS chip

    This memory is stored in a ROM chip called CMOS (picture beside), which are also the SETUP (a kind of graphical interface that enables hardware configuration) and POST (test computer components when it is connected). The BIOS (Basic Input Output System), as already mentioned, is also on this chip and consists of a program responsible for the translation of the instructions of the operating system and applications into commands that can understood by the machine’s hardware.

    Reasons to upgrade the BIOS

    When you update the BIOS, we are actually upgrading the ROM-BIOS, or BIOS, POST and SETUP. And this update is only required if there is a malfunction in PCThat can be corrected with the update. Another reason is that hardware devices are being released constantly and may have to update the BIOS for your computer to support new hardware. This happens a lot with the processors. So if your computer is not located in any of the above cases, there is no reason to update the BIOS. This makes it clear that this procedure should only be done in case of utility. Reload simply to keep the newer version is extremely unnecessary.

    Why risk

    The update may fail and leave the motherboard out of use. This can happen for example if during the process of upgrading the electrical power fail. In addition, the update file may be corrupted or an error in relation to the upgrade file and the user experience “get” the wrong version for your motherboard. Even if it does, no way solve the problem, but only experienced technicians are qualified to do so.

    Updating the BIOS

    The first thing to do to update the BIOS is to identify the manufacturer, model and version of motherboard. Generally this information is in the manual accompanying the plaque. Then it is appropriate to note the data on SETUP. This is because the upgrade process usually erase any existing configuration on it. Depending on the model of your motherboard, you may need to change a jumper, which acts as a safety device against unauthorized recordings. To make sure this need is essential to consult the manual for the motherboard. Before proceeding, it is necessary to mention that the process of updating this tutorial follows a standard model, which can have major differences in relation to certain motherboards. Therefore, it is necessary to consult the manual plaque or consult the manufacturer’s website for the appropriate guidelines. We will use here, a guide based on Award BIOS, very common in Brazil.

    Being aware of the points above, please visit the manufacturer of the motherboard and search the area corresponding to the BIOS update. The corresponding page, follow the instructions and download the files needed for operation. It may be that the file containing the new BIOS is in ZIP format, being necessary to unzip it. Once unzipped, the files with the BIOS usually has the extension BIN. Another file that is usually downloaded along, is the program that makes recording the new BIOS. For the Award, this program is called AWDFLASH.EXE (nothing prevents new versions using another program). Means it is expressly recommended to use the program that the manufacturer indicates for the model of your motherboard. Some motherboard manufacturers, aiming to facilitate the process of updating, they still place a file with extension BAT along with other files. It aims to automate some processes the update.

    Starting the upgrade

    The operation of updating the BIOS should be done through a “clean boot”, ie, no program should be loaded in memory unless the files IO.SYS, MSDOS.SYS and command.com. To do this, insert a floppy disk in drive A and the DOS prompt type format a: / s / u and press enter. Also, make sure the SETUP boot sequence is floppy as first option. Completed these steps, restart the computer with the floppy “clean boot” that you just created and wait for the prompt appears.

    Another way to clean boot is simply to keep pressing the F8 button and the menu that appears, choose “Only prompt security.” But this only works with Windows 95 and 98. For other systems you must use the boot floppy.

    As for the files to update the BIOS, you can put them on a floppy or hard disk of the machine, since you know where you left off.

    The step to be followed now is to back up (backup) of the existing BIOS, if a problem occurs in the update. For this, use the program awdflash (or equivalent) through the command prompt: awdflash / pn / sy. After typing this, press enter. A screen will appear where you specify a name for the current BIOS file. This file will have extension BIN. After realizing this process, reboot the machine, giving a new “clean boot”. Now, type the command awdflash bios.bin (or equivalent, as directed in the manufacturer’s website) and hit enter, which is bios.bin name of the new BIOS. The program asks if you really want to save the new BIOS. You should respond by typing Y (yes in English). Right now, the recording will begin and end, you will see an option to exit the program or restart the computer. Note: If there are any error messages appear, UNDER NO CIRCUMSTANCES, RESTART THE MACHINE! Run the recording process again. If the error persists, rewrite the backup you made. Now it only remains to restart the computer and configure the setup with the data that you noted. Okay, the update is ready.

    Posted in General | Leave a comment

    RAM Technology

    memoriaAlthough brutally faster than the hard drive and other peripherals, RAM is still much slower than the processor. The use of caches decreases the performance loss by reducing the number of memory accesses, but when the processor does not find the information you seek in caches, have to resort to a painful access to main memory on a processor that could result in current a wait of more than 150 cycles.

    To reduce the difference (or at least try to prevent it from growing even more), the memory manufacturers began to develop a set of new technologies, to optimize data access, giving rise to the modules of DDR2 and DDR3 memory currently used .

    There are several ways to improve the performance of RAM. The first is to increase the number of bits read per cycle, making the bus wider, as the increase from 32 to 64 bits introduced by a Pentium, which continues to this day. The problem in using a wider bus is that the largest number of tracks needed in both the motherboard and in the memory modules themselves, increase the complexity and cost of production.

    The second is to access two or more memory modules simultaneously, as in the plates and Processors controllers with dual-channel memory or triple-channel. The problem is that in this case we need two modules, plus additional tracks and circuits on the motherboard and additional pins on the processor socket.

    The third is to create faster memory modules, as in the case of DDR2 and DDR3. This question of speed can be further divided into two questions: the number of cycles per second and latency, which is the time that the first operation in a series of operations to read or write takes to complete. The lag time could be compared to access time of a hard drive, while the number of cycles could be compared to the CPU clock.

    It is here that come memories of the different technologies that were introduced over the past decades, starting with regular memories, used in XTs and 286, which evolved into the memories FPM, used in PCs 386 and 486, then for EDO memory, used in recent 486s and Pentium PCs. These first three technologies are then replaced by the SDR-SDRAM memory, followed by the DDR and DDR2 and DDR3 memories used today.

    The regular memories are the most primitive type of RAM. Them, access is done the traditional way, sending the address RAS, CAS and then waiting for the reading of data for each reading cycle.

    This worked well in the XT and 286 microns, where the CPU clock was very low and RAM could run synchronously with it. In 286, an 8 MHz, were used chips with access time of 125 ns (nanoseconds) and a 12 MHz were used chips of 83 ns.

    The problem was that from there the memories of the season reached its limit and it became necessary to make the memory works asynchronously, where the processor runs at a frequency higher than the RAM.

    From the 386, the difference became too great, which led to the introduction of cache memory and the start of the race in search of faster memory modules.

    Posted in General | Leave a comment