Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Fernando Jorge Mota fjorgemota

I may be slow to respond.
Block or report user

Report or block fjorgemota

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fjorgemota / convertHTMLtoJS.php
Created Sep 16, 2012
Convert HTML to Javascript using DOM in PHP
View convertHTMLtoJS.php
function convertHTMLtoJS($html){
$type = "string";
$type = get_class($html);
case "DOMDocument":
fjorgemota /
Last active Dec 11, 2015
Simple example of a pratical method to create private attributes in Python using functions closures
class People:
'''Just a class to save the name of a people'''
def __init__(self, name):
'''Just saves the name of a people'''
obj = {} #A internal variable to save the state of the attribute
def setName(new_name):
'''Just a function to set the name of a people'''
obj["name"] = new_name #It's available in the internal variable representation
self.setName = setName #Just point it to the object
def getName():
View gist:5223013
fjorgemota / hello.cpp
Last active Aug 29, 2015
Mini-Servidor em C++
View hello.cpp
#include <cstdlib>
#include <iostream>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
using namespace std;
int main(int argc, char **argv) {
fjorgemota / removedor-acentos.cpp
Created Nov 27, 2014
Removedor simples de acento em C
View removedor-acentos.cpp
#include <stdio.h>
#include <stdlib.h>
char* removeAcento(char *string){
int i=0;
int resultado = 0;
while(string[i] != '\0'){
if(!((string[i] < 97 || string[i] > 122) && (string[i] < 65 || string[i] > 90))) {
You can’t perform that action at this time.