Avançar para o conteúdo principal

Mensagens

A mostrar mensagens de 2016

Security in PHP web pages

One concern that must be present in all Web developers is the security of their products. In this article we start a series of articles which will explore some basic security issues related to injecting SQL statements into web forms or URL parameters. Examples of code with security issues and how to avoid them are presented. So let's start with a simple login form implemented with the following code: In this example, the code checks to see if more than one database record has been returned, thereby assuming that the credentials provided are correct. The biggest mistake involves concatenating the values ​​received from the form with the SQL statement, thus allowing the user to manipulate the instruction to his or her own pleasure. Regardless of the user name entered, simply type in the password the following text if you choose to indicate that the login has been successfully completed: o' or 1=1 # With this text the SQL statement will always return a rec

Google OAuth 2.0 in ASPX

In this post I will demonstrate how to use Google OAuth in a ASPX webform with C#. This project uses Visual Studio 2015 and as a option for the user to sign-up and other to check the sign-in. Let's start by creating a new project.

PacMan 3D

In this post we will be making a simple and classic game, the Pacman, with Unity 3D. Let's create a new a new project

Entity Framework

This post is about entity framework and how to use it to make, almost with a simple mouse click, the CRUD (create, read, update and delete) operations over a table. Let's start by creating a web MVC project with Visual Studio 2015.

Mobile == Optimization

 Going mobile is not easy, so you must consider it from the beginning. So I decided to develop a new project for the mobile devices and having a simple structure working I started looking at de frame rate and, surprise surprise, it look bad. I mean it was 6 to 8 frames per second and the scene was almost empty. Then I look at the bag of optimizations and started the kung fu: - first simplify the models, less vertices, less faces, less edges all led to faster rendering; - change the Unity shaders to mobile; - I'm using a terrain so looking at the options I started messing with this:   - pixel error;   - base map distance;   - detail distance; - Theres one directional light in the scene so here's what I changed:   - baking to baked;   - shadows to hard shadows; In the scripts I looked at: - string concatenation - make it with stringbuilder; - function calls, some times can be avoided; - some functions can be optimizaded like the Mathf.Abs that I changed for  x

The new project going mobile

New pics of the mobile path for the cars project

New Unity 3D Project

Today I will present a new project that I started. From the post about the car I am building a game with cars, or transportation. The idea is very simple: the player starts with a car and a mission, when he is done with the mission he gets some cash that can be spent buying a new vehicle. Here are some pics: - the car in Unity - the car in Blender - working in the texture - looks great - a wheel - the texture in Gimp - back in Unity testing different materials  like water - and code

Tic Tac Toe in Unity 3D

In this post I will present you with a tutorial to make a simple Tic Tac Toe game in Unity 3D. Watch the video and download de project. Project in GitHub

Arduino through PHP

This post presents a project that will use three programming languages in order to communicate with an Arduino board from the browser. The objective is simple: a Web page will send and receive data from the Arduino connected to a web server. In the Arduino there will be a simple communication protocol that's responsible for the interaction with the sensors. The Web server is running Apache over Windows and the programming language selected is PHP. A small programming will allow for the web page, built with PHP, to send and receive data through the USB port. It's a small console mode application created with C#. The PHP web page server side will run this command with different parameters and it will return the data read from the Arduino. Although there are multiple PHP frameworks that claim to work with the USB port none of them worked for me.

Let's make a car in Unity 3D

In this post we will make a simple car in Unity 3D. The Unity 3D physics engine is used in order to give the car a real behavior. This are the steps: [1] - Create a new Project