Skip to content

Instantly share code, notes, and snippets.

View teofilosalgado's full-sized avatar
🗺️
Wanna a map?

João Salgado teofilosalgado

🗺️
Wanna a map?
View GitHub Profile
@teofilosalgado
teofilosalgado / MV_CAPABILITIES_TABLE.csv
Created February 24, 2023 03:36
MV_CAPABILITIES_TABLE.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 10 columns, instead of 9 in line 9.
"STATEMENT_ID","MVOWNER","MVNAME","CAPABILITY_NAME","POSSIBLE","RELATED_TEXT","RELATED_NUM","MSGNO","MSGTXT","SEQ"
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,PCT,N,,,,,1
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REFRESH_COMPLETE,Y,,,,,1002
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REFRESH_FAST,N,,,,,2003
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REWRITE,N,,,,,3004
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,PCT_TABLE,N,object data types are not supported in this context,30373,2066,Oracle error: see RELATED_NUM and RELATED_TEXT for details,4005
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REFRESH_FAST_AFTER_INSERT,N,,,2130,expression not supported for fast refresh,5006
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REFRESH_FAST_AFTER_ONETAB_DML,N,,,2146,see the reason why REFRESH_FAST_AFTER_INSERT is disabled,6007
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REFRESH_FAST_AFTER_ANY_DML,N,,,2161,see the reason why REFRESH_FAST_AFTER_ONETAB_DML is disabled,7008
,SIGNOS,MV_SA_SUB_BACIA_ESGOTAMENT_LIM,REFRESH_FAST_PCT,N,,,2157,PCT is not possible on an
'Access
restricted = True
Select Case [desc_classe]
Case "motorway","motorway_link","trunk","trunk_link","primary","primary_link","secondary","secondary_link","tertiary","tertiary_link","living_street","residential","unclassified","road": restricted = False
End Select
'Oneway
restricted = False
Select Case UCase([desc_umavia])
Case "N", "TF", "T": restricted = True
@teofilosalgado
teofilosalgado / opencart.sh
Last active July 31, 2018 03:02
Opencart installation script
light_green='\033[1;32m'
green='\033[0;32m'
nc='\033[0m'
if [ $# != 4 ] && [ $# != 0 ]
then
echo -e "Missing parameters!\n"
echo -e "To create a new installation run:"
echo -e "./opencart.sh [MYSQL root] [MYSQL password] [MYSQL new user username] [MYSQL new user password]\n"
echo -e "To setup file storage and remove install folder after installation run:"
@teofilosalgado
teofilosalgado / main.cpp
Last active July 12, 2018 12:56
Alocação dinâmica
#include <bits/stdc++.h>
using namespace std;
struct registro
{
char nome[255];
char musical_style[255];
int year_of_creation;
int famous_songs;
bool flag;
@teofilosalgado
teofilosalgado / main.cpp
Last active June 15, 2018 16:05
Simple code to test sortlib
#include <bits/stdc++.h>
#include "sortlib.hpp"
using namespace std;
void backup_array(int data[], int backup[], int size)
{
for(int i = 0; i < size; i++)
{
data[i] = backup[i];
}
@teofilosalgado
teofilosalgado / sortlib.hpp
Created June 15, 2018 15:23
Library for sorting in c++
class sort
{
public:
static void quick(int array[], int begin, int end);
static void merge(int array[], int begin, int end);
static void insertion(int array[], int size);
static void selection(int array[], int size);
static void shell(int array[], int size);
private:
@teofilosalgado
teofilosalgado / sortlib.cpp
Created June 15, 2018 15:22
Library for sorting in c++
#include <bits/stdc++.h>
#include "sortlib.hpp"
using namespace std;
void sort::insertion(int array[], int size)
{
int j = 0;
int key = 0;
for (int i = 1; i < size; i++)
{
@teofilosalgado
teofilosalgado / urls.py
Last active May 31, 2018 23:15
Django app urls
from django.contrib.auth import views as auth_views
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('signin', auth_views.login, {'template_name': 'polls/signin.html'}, name='signin'),
path('signup', views.signup, name='signup')
@teofilosalgado
teofilosalgado / forms.py
Created May 31, 2018 23:14
Django app forms
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class SignUpForm(UserCreationForm):
birthDate = forms.DateField(help_text='Required. Format: YYYY-MM-DD')
twitter = forms.CharField(max_length=250, empty_value='')
class Meta:
model = User
@teofilosalgado
teofilosalgado / views.py
Created May 31, 2018 23:13
Django app views
from django.shortcuts import render
from django.http import HttpResponse
from django.contrib.auth import login, authenticate
from django.shortcuts import render, redirect
from polls.forms import SignUpForm
def index(request):
return render(request,'polls/index.html')