How to fix leaks memory valgrind using linekd list? - linked-list

I built a set linked list known that I can not add the same item two times to my set so I have implemented this procedure, but when i run program.adb below i still having a leaks memory especially with Nouvelle_Cellule := New T_Cellule'(Element, Null); then i don't understand this leak memory.
linked_set.adb
56 procedure Ajouter (Ensemble : in out T_Ensemble; Element : in T_Element) is
57 Nouvelle_Cellule, Temp : T_Ensemble;
58 begin
59 Nouvelle_Cellule := New T_Cellule'(Element, Null);
60 if ( Ensemble = Null) then -- Si l'ensemble est vide.
61 Ensemble := Nouvelle_Cellule; --Créer une nouvelle cellule.
62 else -- Sinon, on ajoute à la fin de l'ensemble.
63 Temp := Ensemble;
64
65 while (Temp.all.Suivant /= Null) loop
66
67 Temp := Temp.all.Suivant;
68 end loop;
69 Temp.all.Suivant := Nouvelle_Cellule; --Créer une nouvelle cellule.;
70 end if;
71 end Ajouter;
And I have a simple program using ajouter method :
nombre_moyen_tirages_chainage.adb
1 with Ensembles_Chainage;
2 with Alea;
3 with Ada.Text_IO; use Ada.Text_IO;
4
5 -- Cette procédure calculera le nombre moyen de tirages qu’il faut
6 -- faire pour obtenir tous les nombres d’un intervalle entier Min..Max en
7 -- utilisant le générateur de nombre aléatoire.
8 procedure Nombre_Moyen_Tirages_Chainage is
9 Min : Constant integer := 10; -- La borne inférieure.
10 Max : Constant integer := 20; -- La borne supérieure.
11 Essais : Constant integer := 100; -- Le nombre d'essais.
12
13 package Mon_Alea is
14 new Alea (Min, Max); -- Générateur de nombre dans l'intervalle [1, 10].
15 use Mon_Alea;
16
17 package Ensembles_Entiers is -- Instantiation du package Ensembles_Chainage.
18 new Ensembles_Chainage (T_Element => Integer);
19 use Ensembles_Entiers;
20
21 Ensemble : T_Ensemble; -- Déclarer une variable ensemble.
22 Moyenne : Integer; -- La variable moyenne qui stockera le nombre moyen de tirages.
23 n_alea: Integer; -- Le nombre aléatoire généré.
24 begin
25 New_Line;
26 Put_Line("*************************** Début ****************************");
27 New_Line;
28 Moyenne := 0; -- Initialiser Moyenne à 0.
29
30 for i in 1..Essais loop
31 Initialiser (Ensemble); -- Initialiser un ensemble vide.
32
33 loop
34 Get_Random_Number(n_alea); -- Obtenir un nombre aléatoire.
35 Moyenne := Moyenne + 1; -- Incrementer Moyenne.
36
37 if not(Est_Present (Ensemble, n_alea)) then
38 ajouter (Ensemble, n_alea); -- Ajouter n_alea à l'ensemble.
39 end if;
40 exit when Taille (Ensemble) = Max - Min + 1;
41 end loop;
42 end loop;
43
44 Moyenne := Moyenne / Essais; -- Calculer la Moyenne.
45 Put_Line("le nombre moyen de tirages qu’il faut faire pour obtenir tous");
46 Put_Line("les nombres entre" & Integer'Image(Min) & " et" & Integer'Image(Max) & " est : " & Inte ger'Image(Moyenne));
47
48 New_Line;
49 Put_Line("***************************** Fin ****************************");
50 New_Line;
51
52 end Nombre_Moyen_Tirages_Chainage;
Then when I compile and execute with valgrind this program it displays a leak memory related to ajouter function in linked_set.adb:
==19122== Memcheck, a memory error detector
==19122== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==19122== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==19122== Command: ./nombre_moyen_tirages_chainage
==19122==
*************************** Début ****************************
le nombre moyen de tirages qu’il faut faire pour obtenir tous
les nombres entre 10 et 20 est : 34
***************************** Fin ****************************
==19122==
==19122== HEAP SUMMARY:
==19122== in use at exit: 17,600 bytes in 1,100 blocks
==19122== total heap usage: 1,111 allocs, 11 frees, 24,160 bytes allocated
==19122==
==19122== 17,600 (1,600 direct, 16,000 indirect) bytes in 100 blocks are definitely lost in loss record 2 of 2
==19122== at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==19122== by 0x4AA78CF: __gnat_malloc (in /usr/lib/x86_64-linux-gnu/libgnat-8.so.1)
==19122== by 0x10C3AB: nombre_moyen_tirages_chainage__ensembles_entiers__ajouter.4561 (ensembles_chainage.adb:59)
==19122== by 0x10BABD: _ada_nombre_moyen_tirages_chainage (nombre_moyen_tirages_chainage.adb:38)
==19122== by 0x10B924: main (b~nombre_moyen_tirages_chainage.adb:247)
==19122==
==19122== LEAK SUMMARY:
==19122== definitely lost: 1,600 bytes in 100 blocks
==19122== indirectly lost: 16,000 bytes in 1,000 blocks
==19122== possibly lost: 0 bytes in 0 blocks
==19122== still reachable: 0 bytes in 0 blocks
==19122== suppressed: 0 bytes in 0 blocks
==19122==
==19122== For lists of detected and suppressed errors, rerun with: -s
==19122== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
How can I fix this problem please.
You will find the entire code in my github page : https://github.com/MOUDDENEHamza/pim/tree/master/tp/pr2

Perhaps you leak on deleting, not adding ?

You add entries to your linked list, but you don’t delete them, so when your program exits the entries are still there in the list, and valgrind sees this as a leak. It isn’t really: the operating system will clean up automatically.
You could just live with this (I would), but if you want to clean up you could do so explicitly as #DeeDee suggests, or you could explore making your linked list (limited) controlled.

I think you need to initialize the list before the inner loop and call Detruire (English: Destroy) afterwards. The Detruire subprogram uses Ada.Unchecked_Deallocation to deallocate the list's elements (see here) which were previously allocated with (in this case):
Nouvelle_Cellule := New T_Cellule'(Element, Null);
Here's the adaptation:
program.adb (partial)
for i in 1..Essais loop
Initialiser (Ensemble); -- Initialize
loop
Get_Random_Number(n_alea); -- Obtenir un nombre aléatoire.
Moyenne := Moyenne + 1; -- Incrementer Moyenne.
if not(Est_Present (Ensemble, n_alea)) then
Ajouter (Ensemble, n_alea); -- Ajouter n_alea à l'ensemble.
end if;
exit when Taille (Ensemble) = Max - Min + 1;
end loop;
Detruire (Ensemble); -- Destroy
end loop;
output (valgrind)
$ valgrind ./nombre_moyen_tirages_chainage
==1353== Memcheck, a memory error detector
==1353== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1353== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==1353== Command: ./nombre_moyen_tirages_chainage
==1353==
*************************** Début ****************************
le nombre moyen de tirages qu’il faut faire pour obtenir tous
les nombres entre 10 et 20 est : 34
***************************** Fin ****************************
==1353==
==1353== HEAP SUMMARY:
==1353== in use at exit: 0 bytes in 0 blocks
==1353== total heap usage: 1,111 allocs, 1,111 frees, 24,339 bytes allocated
==1353==
==1353== All heap blocks were freed -- no leaks are possible
==1353==
==1353== For counts of detected and suppressed errors, rerun with: -v
==1353== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
There's also a missing deallocation in the Supprimer (English: remove) subprogram:
ensembles_chainage.adb (partial)
procedure Supprimer (Ensemble : in out T_Ensemble; Element : in T_Element) is
begin
if (Ensemble.all.Element = Element) then
declare
Temp : T_Ensemble := Ensemble;
begin
Ensemble := Ensemble.all.Suivant;
Free (Temp);
end;
else
Supprimer (Ensemble.all.Suivant, Element);
end if;
end Supprimer;

Related

Extract price suffix in € (google sheet)

I have a cell with this text:
"Chalet independiente en Montealegre, Barcelona 425.000 €. URBILARO.
COM les ofrece en exclusiva esta fantástica vivienda ubicada en
Barcelona. Parcela de 613 mts2 con jardín consolidado, paellero y
piscina. Su interior se distribuye en un ...
[http://st1.idealista.com/static/common/release/home/resources/img/logo-small.png]
[https://www.idealista.com/?xts=582065&xtor=EPR-1147-[express_alerts_20220629]-20220629-[logo]-72485519100#1-20220629170428]Hola,
Idealist, 1 anuncio recién publicado con tus criterios
[https://img3.idealista.com/blur/500_375_mq/0/id.pro.es.image.master/63/6d/8c/1001269200.jpg]
[https://www.idealista.com/inmueble/98106051/?xts=582065&xtor=EPR-1147-[express_alerts_20220629]-20220629-[Property.New.Photo]-72485519100#1-20220629170428&isFromSavedSearch=true]
Ver 30 fotos
[https://www.idealista.com/inmueble/98106051/?xts=582065&xtor=EPR-1147-[express_alerts_20220629]-20220629-[Property.New.Photo]-72485519100#1-20220629170428&isFromSavedSearch=true]
Chalet independiente en Montealegre, Barcelona
[https://www.idealista.com/inmueble/98106051/?xts=582065&xtor=EPR-1147-[express_alerts_20220629]-20220629-[Property.New.Link]-72485519100#1-20220629170428&isFromSavedSearch=true]
425.000 € 152 m² 4 hab. URBILAR. COM les ofrece en exclusiva esta fantástica vivienda ubicada en La Barcelona. Parcela de 613 mts2 con
jardín consolidado, paellero y piscina. Su interior se distribuye en
un .........................."
The information structure for others cells, is similar to this one.
I want to extract the bold information in different cells:
For instances:
| Montealegre | 425.000 € | 98106051 | 152 m² | 4 hab | 613 mts2 |
I tried to start with the price, like this:
=REGEXEXTRACT('Hoja 1'!B1; "\€([0-9.]+)")
But no luck.
You can see sample here: https://docs.google.com/spreadsheets/d/1u0ItzOo50-aGv2yXzGxS_TzfsHFUmPZJ4hcwA8jswfM/edit?usp=sharing
This works
=REGEXEXTRACT('Hoja 1'!B1; "[0-9. ]+€")
(Remember the space.)

Filter names with spaces and special characters from a column that are not in another column using case sensitive

Google Sheets for tests
To use in lists for sensitive cases, this indicated option works perfectly:
=FILTER(D1:D, REGEXMATCH(D1:D, "\b"&TEXTJOIN("|", 1, A1:A)&"\b")=FALSE)
But for my columns that have names the filter result does not return correctly as it should
List of saved values:
Vancouver Whitecaps
Montreal Impact
Toronto FC
Everton De Vina
12 de Octubre de Itaugua
Al Ahly Cairo
Aldosivi
Argentinos Juniors
Atletico Go
Atletico MG
Atletico Nacional Medellin
Athletico-PR
Atl Tucuman
Audax Italiano
Bahia
Barnechea
Beijing Guoan
Ceara SC Fortaleza
Central Cordoba (SdE)
Cerro Porteno
Chaco For Ever
Changchun Yatai
Chapecoense
Guarani (Par)
Nacional (Par)
Colo Colo
Colon
Corinthians
CRB
Criciuma
Cruzeiro MG
CSA
Daegu FC
Dalian Yifang
La Serena
Deportes Temuco
Tolima
Eastern Company SC
Estudiantes
FC Seoul
Flamengo
Fluminense
Fortaleza EC
Gangwon
General Caballero
Ghazl El Mahallah
Gimnasia La Plata
Goias
Gremio
Guairena
Guangzhou City
Guarani
Henan
Incheon Utd
CA Independiente
Independiente Cauquenes
Jeju Utd
Jeonbuk Motors
Libertad
Londrina
National Bank
Newells
Olimpia
Operario PR
SE Palmeiras
Patronato
CA Platense
Pohang Steelers
Ponte Preta
Provincial Ovalle FC
Pyramids
Racing Club
Resistencia SC
Rosario Central
Sampaio Correa FC
CSD San Antonio Unido
San Lorenzo
Gimcheon Sangmu
Santos
Sao Paulo
Seongnam FC
Shandong Luneng
Shenzhen FC
Shijiazhuang Yongchang FC
Sol de America (Par)
Club Sportivo Ameliano
Suwon Bluewings
Suwon FC
Tacuary
Talleres
Tianjin Teda
Univ Catolica (Chile)
Ulsan Hyundai Horang-i
Vasco Da Gama
Velez Sarsfield
Wuhan Zall
Zamalek
Zhejiang Greentown
Fernandez Vial
CD General Velasquez
Cobreloa Calama
Puerto Montt
Viking
Univ de Concepcion
Santiago Morning
Magallanes
Junior FC Barranquill
Gimnasia Jujuy
Meizhou Hakka
Independiente Rivadavia
Agropecuario
Ferro Carril Oeste
Turkey
Wuhan Three Towns
Hebei CFFC
Martinique
Grenada
Suriname
Chengdu Better City FC
Curacao
Los Andes
Schaffhausen
CSD Liniers de Ciudad Evita
Belgrano
Club Petrolero
Deportivo Madryn
Botafogo
Tristan Suarez
Sol De Mayo
Deportivo Moron
Perth Glory
Union Santa Fe
Flandria
CA Colegiales
Atletico San Luis
United City F.C.
Brown de Adrogue
Caracas
San Martin de Tucuman
Ismaily
Hoang Anh Gia Lai
Mafra
Smouha
Ham-Kam
Orlando Pirates (SA)
Varnamo
Chiangrai Utd
Future FC
El Gounah
Home Utd
Jeonnam Dragons
Johor Darul Takzim
Al Mokawloon
Helsingborgs
Jerv
Sundsvall
Mazatlan FC
Gaziantep FK
Cruz Azul
Misr El Makasa
Al Wehdat
Al-Shabab (KSA)
Al Faisaly ( KSA )
Al-Sadd
Al Rayyan
Al Quwa Al Jawiya
Sepahan
Foolad
Al Ahli (UAE)
Ahal FC
Al Gharafa
Al-Duhail SC
Emelec
Alianza Lima
Independiente (Ecu)
Always Ready
Al Ittihad (EGY)
Argeș Pitești
Roda JC
Vietnam
Lebanon
South Korea
Iraq
China
Ghana
Australia
Nigeria
Poland
Morocco
Union San Felipe
Real San Joaquin
Deportes Recoleta
Rodelindo Roman FC
Mali
Algeria
JS Saoura
Etoile Sportive Sahel
Belouizdad
URT
Horoya AC
Pharco FC
El Geish
Ceramica Cleopatra
Al-Taawoun Buraidah
Estudiantes de Merida
Royal Pari
Nasaf
Al Jaish
Al Zawraa
IFK Goteborg
Norrkoping
AS Otoho
Al-Ittihad Tripoli
Caldense Mg
Wydad Casablanca
Guabira
Delfin
Cerro Largo FC
Club Nueve de Octubre
Wanderers (Uru)
The Strongest
Ayacucho Futbol Club
Mushuc Runa
CD Hermanos Colmenarez
Sport Boys (Per)
Melgar
Cienciano
Oriente Petrolero
Jong Ajax Amsterdam
Jong PSV Eindhoven
Jong FC Utrecht
Jong AZ Alkmaar
ASEC Mimosas
Charlotte FC
Defensa y Justicia
Universitario de Deportes
Univ Catolica (Ecu)
Monagas
Zanaco FC
Al-Masry
Al Ahli Tripoli
Royal Leopards
Democrata GV
Sportive de Tunis
Kyoto
Iwata
Al Merreikh
Comunicaciones
CD Motagua
Guastatoya
Forge
Deportivo Saprissa
Santos de Guapiles
USGN
TP Mazembe
Coton S De Garoua
Simba
Club Sportif Sfaxien
Jwaneng Galaxy FC
ES Setif
Petro Luanda
Amazulu
Caen
Al Hilal Omdurman
G.D. Sagrada Esperanca
Barracas Central
Central Coast Mariners
Universidad Cesar Vallejo
Tombense MG
Bolivar
Torque
Melbourne Victory
Rangers U19
Al Jazira
Wellington Phoenix
Sydney FC
Newcastle Jets
Brisbane Roar
Egypt
Senegal
Macarthur FC
Athletic Club
Pouso Alegre
Santo Andre
Western Sydney Wanderers
Melbourne City
Cameroon
Tunisia
Sao Bernardo
Botafogo SP
Agua Santa
Mirassol
CA Patrocinense
Union Magdalena
Inter Limeira
Ituano
Villa Nova MG
Cortulua
Ferroviaria
Novorizontino
Bastia
Portsmouth
CF Rayo Majadahonda
Atletico Mancha Real
Linares Deportivo
Alcoyano
Charlton
Mardin BB
Bodrum Belediyesi Bodr
Arenteiro
Talavera CF
Atletico Baleares
U.D Llanera
Albacete
Deportivo
Bergantinos CF
Leonesa
Union de Salamanca
Zamora
CD Castellon
Atletico Sanluqueno CF
Malmo U19
Tigres
Kidderminster
Yeovil
Buxton
Gateshead
CD Puertollano
CD Utrillas
CA Pulpileno
Velez CF
San Agustin Guadalix
Guijuelo
SD Gernika Club
Pena Sport
Leioa
AD Union Adarve
Xerez
CD Ibiza Islas Pitiusas
Nazilli Belediyespor
Van Buyuksehir Belediyespor
CE Andratx
CD Mensajero
SD Solares
Cordoba
Gimnastica Segoviana CF
CD Brea
UD Alzira
UCAM Murcia
CE Europa
Cacereno
Alicante
CF Panaderia Pulido
San Roque Lepe
76 Igdir Belediyespor
CD Cayon
CD Marchamalo
Victoria CF
Unami CP
CD Teruel
Union Club Ceares
Racing Rioja CF
CFJ Mollerusa
CD Ebro
UD Montijo
Aguilas
CD Badajoz
Racing de Ferrol
Manisa FK
SV Turkgucu-Ataspor
Wurzburger Kickers
FK Crvena Zvezda U19
Orebro
Santos Laguna
Wolves U21
Liverpool U21
Southampton U21
Leicester U21
Newcastle U21
Dag and Red
St Albans
Greuther Furth
Stratford Town
Notts Co
Stockport
Maidenhead
Southend
Eastleigh
Hayes & Yeading
Kings Lynn
Banbury Utd
Horsham FC
Bromley
Harrow Borough FC
Solihull Moors
Guiseley
Wrexham
Havant and W
Ebbsfleet Utd
Bowers & Pitsea
Apollon Smirnis
Duisburg
Saarbrucken
1860 Munich
AFC Sudbury
Nurnberg
Mgladbach
RB Leipzig U19
Deportivo La Coruna U19
Genk U19
FC Minsk U19
Empoli U19
FC Kairat Almaty U19
Az Alkmaar U19
FC Midtjylland U19
Trabzonspor U19
Villarreal
Everton U21
Leeds United U21
Brighton U21
Arsenal U21
Cambuur Leeuwarden
Oleksandria
Genclerbirligi
Kahramanmarasspor
68 Aksaray Belediyespor
Tepecik Belediye
Karakopru Belediyespor
Pendikspor
Diyarbekirspor
Nigde Belediyespor
Ajax Amateurs
Kirklarelispor
Yeni Orduspor
Bayburt Sport
Arnavutkoy Belediyesi GVS
Duzcespor
Pazarspor
Kahta 02 Spor
Agri 1970 Spor
Darica Genclerbirligi
Yomraspor
Sanliurfaspor
Edirnespor
Fatsa Belediyespor
Sivas Belediyespor
Ergene Velimese SK
Nevsehir Belediyespor
Inegolspor
Karsiyaka
Kestel Spor
Cankaya
Excelsior Maassluis
DOVO
BVV Barendrecht
Rijnsburgse Boys
Unitas Gorinchem
VV Gemert
SV Oss 20
VV Capelle
Ijsselmeervogels
AFC Amsterdam
GVVV
Sile Yildizspor
Ceyhanspor
Artvin Hopaspor
Excelsior
Almere City
FC Oss
Helmond Sport
VVV Venlo
SC Telstar
ADO Den Haag
MVV Maastricht
FC Dordrecht
FC Eindhoven
SteDoCo FC
Kozakken Boys
Sparta Nijkerk
ACV Assen
ASWH
Spakenburg
SV DVS 33 Ermelo
Emmen
De Graafschap
Crystal Palace U21
Adiyamanspor
Somaspor Spor Kulubu
Eyupspor
Akhisar Belediye
Carsambaspor
Konyaspor
Amed Sportif Faaliyetler
Belediye Derincespor
Man City U21
West Ham U21
Aston Villa U21
Chelsea U21
Tottenham U21
Hammarby
Malmo FF
Kalmar FF
LR Vicenza Virtus
Ascoli
Antwerp
Aris
Fortuna Dusseldorf
Halmstads
San Telmo
Sutton Utd
Georgia
Luxembourg
Bulgaria
Ukraine
Czech Republic
Jamaica
Costa Rica
Canada
Panama
Burton Albion
Harrogate Town
Hartlepool
Salford City
Port Vale
Mansfield
Crawley Town
Scunthorpe
Exeter
Fleetwood Town
Sheff Wed
Lincoln
MK Dons
WSG Wattens
Godoy Cruz
CA Temperley
Alashkert
Zenit St Petersburg U19
Atalanta U19
Red Bull Salzburg U19
Man Utd U19
Bayern Munich U19
SL Benfica Lisbon U19
Wolfsburg U19
Juventus U19
Ajax U19
AC Milan U19
Dortmund U19
Porto U19
Paris St-G U19
Real Madrid U19
Inter U19
Club Brugge U19
Atletico Madrid U19
Sporting CP U19
Liverpool U19
Man City U19
Shakhtar U19
Besiktas JK U19
Sheriff Tiraspol U19
Carlisle
Huracan
Kasimpasa
Sochi
Sarmiento de Junin
Penafiel
Rio Ave
Covilha
Burnley
Man Utd U21
NFC Volos
Lamia
Asteras Tripolis
Panaitolikos
Zulte-Waregem
BG Pathumthani United
Istiqlol
Tranmere
Al-Hilal
OFI
Ionikos
Lokomotiva
Atromitos
FC Koln
Viktoria Koln
Wehen Wiesbaden
HNK Gorica
Ecuador
Venezuela
Chile
Bolivia
Peru
Tigre
Switzerland
Belgium
Estonia
San Marino
Andorra
England
Germany
Romania
Liechtenstein
Sweden
Spain
Lithuania
Finland
Scotland
Israel
Moldova
Latvia
Gibraltar
Slovenia
Malta
Cyprus
Portugal
Serbia
Kazakhstan
Colchester
Rotherham
Coquimbo Unido
FC Utrecht
Lecce
Parma
US Cremonese
Sassuolo
Rayo Vallecano
Napoli
Torino
Empoli
NK Istra
FC Groningen
Real Sociedad
Atalanta
Lazio
Frosinone
NK Hrvatski Dragovoljac
Inter
Venezia
Bremer SV
Newport County
AC Ajaccio
Accrington
Bolton
Rochdale
Cheltenham
Wycombe
AFC Wimbledon
Northampton
Barrow
Stevenage
Crewe
Forest Green
Cambridge Utd
Sunderland
Oxford Utd
Morecambe
Plymouth
Doncaster
Sevilla
AC Milan
West Ham
Celta Vigo
Juventus
Como
Goztepe
Antalyaspor
Atletico Madrid
Las Palmas
Basaksehir
Arsenal
Fuenlabrada
Alanyaspor
Barcelona
Sparta Rotterdam
Tenerife
Valencia
Lugo
Man City
Newcastle
Brentford
Kobe
Hiroshima
Oviedo
Valladolid
Adana Demirspor
Tottenham
Roma
Brescia
Granada
Auxerre
Reggina
Malaga
Giresunspor
Ternana
Alessandria
Almeria
Athletic Bilbao
Boavista
Malatyaspor
Fenerbahce
Burgos
Brann
Sporting Gijon
Willem II
Gil Vicente
PEC Zwolle
Kashima
Fukuoka
Shonan
Oita
Heracles
Cadiz
Liverpool
Betis
FC Twente
Quevilly Rouen
Real Madrid
Espanyol
Alaves
Alcorcon
Az Alkmaar
Spal
AC Monza
Amiens
Pau
Grenoble
Le Havre
Dunkerque
Pisa
NEC Nijmegen
Kayserispor
Sociedad B
Altay
Amorebieta
Valenciennes
Bournemouth
Brighton
Crystal Palace
Southampton
Wolves
Aston Villa
Kawasaki
Leeds
Bayern Munich
Besiktas
Ibiza Eivissa
Spezia
Perugia
Cosenza
Eibar
Heerenveen
LDU
Barcelona (Ecu)
Sporting Cristal
Nagoya
FC Minaj
Sportfreunde Lotte
Shimizu
Tokushima
Urawa
FC Tokyo
Hoffenheim
Lens
Clermont
Lorient
Angers
Mainz
Kristiansund
Elversberg
TSV Havelse
Middlesbrough
Reims
Wolfsburg
Portimonense
Lille
Nottm Forest
Belenenses
Marseille
FC 08 Villingen
Rot-Weiss Koblenz
Hertha Berlin
Famalicao
Freiburg
FC Lviv
Tromso
Livingston
Tondela
Eintracht Frankfurt
Union Berlin
Greifswalder SV 04
Leverkusen
Arminia Bielefeld
Augsburg
Bochum
Stuttgart
Huddersfield
Peterborough
Hull
Millwall
Reading
Brest
Birmingham
Paris St-G
Braga
Weiche Flensburg
Lokomotiv Leipzig
Bayreuth
Norderstedt
Wuppertaler
BFC Dynamo
Lyon
SSV Ulm
Babelsberg
Estoril Praia
Blackpool
Dortmund
Moreirense
Swansea
Barnsley
RB Leipzig
Sporting Lisbon
Nantes
Yokohama FM
KS Teuta Durres
Pacos Ferreira
Shakhter Karagandy
Anorthosis
Vitesse Arnhem
Trabzonspor
Paola Hibernians FC
HB Torshavn
FK Jablonec
Omonia
Slavia Prague
Dinamo Zagreb
Benfica
PAOK
Monaco
Rangers
Shakhtar
Brazil Olympic
Spain Olympic
Sendai
Deportivo Pereira
Zorya
Verl
Millonarios
Banfield
Jaguares de Cordoba
Hallescher FC
Viktoria Berlin
Luzern
FK Desna Chernihiv
Veres Rivne
Cuiaba
Boca Juniors
Rukh Vynnyky
Red Bull Salzburg
Motherwell
Sturm Graz
Standard
Dundee Utd
Brusque FC
FC Ufa
St Mirren
St Johnstone
Hearts
Dundee
FSV Zwickau
Kaiserslautern
VFL Osnabruck
Waldhof Mannheim
Dnipro-1
Dortmund II
Chernomorets Odesa
Quindio
Nautico PE
Alianza Petrolera
Admira Wacker
Slavia Mozyr
Lausanne
FC Magdeburg
Metalist 1925
G-Osaka
ABC RN
Energetik - BGU Minsk
Genk
Rigas Futbola Skola
A.E.L.
KF Shkupi
Prishtina
Linfield
KF Drita
Partizan Belgrade
Bohemians
FC Astana
F91 Dudelange
NK Maribor
Osijek
Molde
KF Laci
Partizani Tirana
FC Ararat Yerevan
Baltija Panevezys
Gzira United FC
FK Velez Mostar
FK Sutjeska
Shakhter Soligorsk
FK Riga
FK Sumqayit
Lokomotiv Plovdiv
Cukaricki
Slovacko
Valerenga
FK Suduva
Arda
Larne
FK Spyris Kaunas
Breidablik
Domzale
KuPS
Apollon Limassol
Dinamo Tbilisi
CS Petrocub
Dinamo Batumi
Hafnarfjordur
CSKA Sofia
Hajduk Split
Olimpija
Valur
Ujpest
Hibernian
Dundalk
Qarabag Fk
Zilina
FC Ashdod
FC Milsami-Ursidos
Spartak Trnava
Torpedo BelAZ
Aberdeen
Liepajas Metalurgs
Tobol Kostanay
Kesla
Birkirkara
Plzen
Ferencvaros
VMFD Zalgiris
Qingdao Huanghai FC
HJK Helsinki
Tallinna FC Flora
Zaglebie Lubin
FC Olimpiyets NN
Puebla
Ind Medellin
ACS Sepsi OSK
AIK
Vejle
Dinamo Bucharest
Orlando City
Envigado
Philadelphia
New York Red Bulls
Kansas City
Grasshoppers Zurich
FC Cincinnati
Houston Dynamo
Holstein Kiel
OB
FC Zurich
Shanghai Shenhua
Rakow Czestochowa
Silkeborg
FK Krasnodar
Servette
Wolfsberger AC
Isloch
Warta Poznan
Gaz Metan Medias
Viborg
Union St Gilloise
Gornik Zabrze
Universitatea Craiova
Gent
Santiago Wanderers
Santa Fe
River Plate Asuncion
Universidad de Chile
Portland Timbers
LA Galaxy
4 de Julho
AaB
Aalesunds
AC Horsens
Academica Clinceni
Adelaide United
AEK Athens
Afghanistan
AGF
Ajax
Akhmat Grozny
Al Ahli
Al Ahly Benghazi
Al Ain
Al Nasr FC Riyadh
Al Sharjah
AL Shorta Baghdad
Albania
America de Cali S.A
America MG
Anderlecht
Ankaragucu
Antofagasta
APOEL
Aragua FC
Ararat Armenia
Arcahaie FC
Argentina
Arka Gdynia
Armenia
Arouca
Arsenal de Sarandi
Arsenal Tula
ASC Diaraf
Astra Giurgiu
Atlanta Utd
Atlas
Atletico Bucaramanga
Atletico Huila
Atletico Palmaflor Vinto
Aucas
Austin FC
Austria
Austria Klagenfurt
Austria Vienna
Avai
Aves
Azerbaijan
B36 Torshavn
Bahrain
Bala Town
Bangladesh
Barry Town Utd
BATE Borisov
Bayern Munich II
Beitar Jerusalem
Belarus
Belshina Bobruisk
Benevento
Binacional
Blackburn
Boa
Boavista RJ
Bodo Glimt
Bologna
Borac Banja Luka
Bordeaux
Bosnia
Botosani
Boulogne
Boyaca Chico
Boyaca Patriotas
Bragantino SP
Brasil de Pelotas
Brasiliense
Braunschweig
Brazil
Bristol City
Brondby
Bursaspor
C-Osaka
CA Rentistas
Cagliari
Cambodia
Canet Roussillon FC
Cardiff
Carl Zeiss Jena
Carlos Mannucci
CD Marathon
CD Nacional Funchal
CD Olimpia
CDA Navalcarnero
Celtic
Centro Atletico Fenix
Cercle Brugge
CF America
CFR Cluj
Chambly Oise
Charleroi
Charleroi-Marchienne
Chateaubriant
Chateauroux
Chelsea
Chemnitzer
Chicago Fire
Chievo
Chindia Targoviste
Chinese Taipei
Chongqing Lifan
Cianorte PR
Cittadella
Club Atletico Pantoja
Club Brugge
Cobresal
Coimbra
Coleraine
Colombia
Colorado
Columbus
Confianca
Connahs Quay
Coritiba
Coventry
Cracovia Krakow
Croatia
Crotone
Crvena Zvezda
CS Mioveni
CS Petange
CSKA Moscow
CSMS Iasi
Cucuta Deportivo
Curico Unido
DC Utd
Degerfors
Den Bosch
Denizlispor
Denmark
Deportes Melipilla
Deportivo Cali
Deportivo La Guaira
Deportivo Lara
Deportivo Pasto
Deportivo Tachira
Derby
Derry City
Dijon
Dinamo Brest
Dinamo Minsk
Dinamo Moscow
Dinamo Zagreb U19
Djurgardens
Dunajska Streda
Dynamo Dresden
Dynamo Kiev
EC Vitoria Salvador
Elche
Elfsborg
Entella
Enyimba
Erzgebirge
Erzurum BB
Esbjerg
ESTAC Troyes
Esteghlal FC
Eupen
Europa FC
Everton
Extremadura UD
Falkenbergs
Farense
Faroe Islands
Fatih Karagumruk Istanbul
FC Basel
FC Cartagena
FC Copenhagen
FC Dallas
Fc Differdange 03
FC Dinamo Auto
FC Goa
FC Gomel
FC Heidenheim
FC Inter
FC Juarez
FC Khimki
FC Lokomotivi Tbilisi
FC Minsk
FC Noah
FC Nordsjaelland
FC Ordabasy
FC Orenburg
FC Ruh Brest
FC Saburtalo Tbilisi
FC Santa Coloma
FC Shirak
FC Smolevichi-STI
FC Smorgon
FC U Craiova 1948
FC Vaduz
FC Volendam
FC Voluntari
Fci Tallinn
FCSB
Feyenoord
Figueirense
Fiorentina
FK Backa Topola
FK Buducnost Podgorica
FK Iskra Danilovgrad
FK Kaisar
FK Kukesi
FK Mariupol
FK Renova
FK Sileks
FK Sputnik
FK Tambov
FK Ventspils
FK Zeta Golubovci
Floriana
Fola Esch
Fortuna Sittard
France
Fulham
Galatasaray
General Diaz
Genoa
Getafe
GFA Rimully Vallieres
Girona
Glentoran
Go Ahead Eagles
Gorodeya
Greece
Guadalajara
Guam
Guangzhou FC
Guayaquil City
Guimaraes
Guingamp
Gwangju FC
Hacken
Hamburger SV
Hamilton
Hannover
Hansa Rostock
Hapoel Beer Sheva
Hartberg
Hatayspor
Haugesund
Hermannstadt
Hobro
Hong Kong
Honka
Honved
Huachipato
Huesca
Hungary
HUSA Agadir
Iceland
Ilves
India
Indonesia
Ingolstadt
Inhulets Petrove
Inter Club Escaldes
Inter Miami CF
Internacional
Iran
Italy
Jagiellonia Bialystock
Jahn Regensburg
Japan
Jiangsu Suning
Jordan
Jorge Wilstermann
Juazeirense BA
Juve Stabia
Juventude
Kabylie
Kairat Almaty
Kaizer Chiefs
Karlsruhe
Kashiwa
Kaya
KF Gjilani
KF Tirana
Kfco Beerschot Wilrijk
Kilmarnock
Kitchee SC
Klaksvikar Itrottarfelag
Kolos Kovalyovka
Korona Kielce
Kortrijk
Kosovo
KR Reykjavik
Kryliya Sovetov
Kuwait
KV Oostende
Kyrgyzstan
La Equidad
LA Fiorita
Lanus
Larissa
LASK Linz
LD Alajuelense
Le Puy
Lech Poznan
Lechia Gdansk
Leganes
Legia Warsaw
Leicester
Leon
Levante
Lillestrom
Lincoln Red Imps
Liverpool Montevideo
Livorno
LKS Lodz
Lokomotiv
Los Angeles FC
Lubeck
Ludogorets
Lugano
Luton
Lyngby
Lyon U19
Macara
Maccabi Haifa
Maccabi Tel Aviv
Malaysia
Mallorca
Mamelodi Sundowns
Man Utd
Maritimo
Mattersburg
MC Alger
Metropolitanos
Metz
Midtjylland
Mineros Guayana
Minnesota Utd
Mjallby
Mjondalen
MOL Vidi
Mongolia
Montenegro
Monterrey
Montpellier
Mura
Myanmar
NAC Breda
Nacional (Uru)
Nacional Potosi
Namungo FC
Nancy
Napsa Stars
Nashville SC
Necaxa
Neftchi Baku
Neman Grodno
Nepal
Netherlands
Neuchatel Xamax
New England
New York City
Nice
Nimes
Niort
NK Celje
Nkana
Nomme Kalju
North Korea
North Macedonia
Northern Ireland
Norway
Norwich
NSI Runavik
Nublense
Numancia
Odds BK
Oeste
OHiggins
Olimpik Donetsk
Olmaliq
Olympiakos
Oman
Once Caldas
Osasuna
Ostersunds FK
Oud-Heverlee Leuven
Pachuca
Paderborn
Padideh
Paide Linnameeskond
Pakhtakor
Palestine
Palestino
Panathinaikos
Panionios
Paraguay
Parana
Paris FC
PAS Giannina
Penarol
Persepolis
Pescara
Philippines
Piast Gliwice
Plaza Colonia
Podbeskidzie B-B
Pogon Szczecin
Ponferradina
Pordenone
Port FC
Porto
Preston
Preussen Munster
Progres Niedercorn
PSV
Puerto Cabello
Pumas UNAM
Puskas Akademia
Qatar
QPR
Queretaro
Racing Santander
Raja Casablanca
Randers
Rapid Bucharest
Rapid Vienna
Ratchaburi
Real Esteli FC
Real Salt Lake
Red Star
Reggiana
Remo
Rennes
Republic of Ireland
Republic of Maldives
Rijeka
Rionegro
Riteriai
River Plate
River Plate (Uru)
Rizespor
RKC Waalwijk
Rodez
Rosenborg
Ross Co
Rostov
Rot-Weiss Essen
Rotor Volgograd
Royal Mouscron-peruwelz
RSB Berkane
Rubin Kazan
Ruzomberok
Sabadell
Salernitana
Salitas FC
Sampdoria
San Jose Earthquakes
Sandefjord
Santa Clara
Sao Bento
Sao Caetano
Sapporo
Sarajevo
Sarpsborg
Saudi Arabia
Saumur
Schalke 04
SCR Altach
Seattle Sounders
Sedan
Setubal
Sfintul Gheorghe
SG Sonnenhof
Shamrock Rovers
Shanghai East Asia
Sheff Utd
Sheriff Tiraspol
Shkendija
Singapore
Sint Truiden
Sion
Sirens FC
Sirius
Sivasspor
Slask Wroclaw
Slavia Sofia
Slovakia
Slovan Bratislava
Slovan Liberec
Slutsk
Sochaux
SonderjyskE
SP Tre Fiori
SP Tre Penne
Sparta Prague
Spartak Moscow
Sport Huancayo
Sport Recife
Sportivo Luqueno
Sportivo San Lorenzo
Sri Lanka
St Etienne
St Gallen
St Pauli
St Polten
St. Joseph's FC
Stabaek
Stal Mielec
Start
Stoke
Strasbourg
Stromsgodset
SV Darmstadt
SV Meppen
SV Ried
SV Sandhausen
Syria
Tajikistan
Tampines Rovers
Teungueth FC
Thailand
The New Saints
Thun
Tijuana
Toluca
Tosu
Toulouse
Tractor Sazi FC
Trapani
Tupynambas FC
Turkmenistan
UAE
Uberlandia MG
UD Logrones
Udinese
UE Engordany
Uerdingen
Union Espanola
Union La Calera
Unterhaching
Ural
Uruguay
UTA Arad
UTC Cajamarca
Uzbekistan
Valletta
Valmieras FK
Varbergs BoIS
Viettel FC
Farul Constanta
Vikingur Reykjavik
Vila Nova
Vita Club
Vitebsk
Vojvodina
Volta Redonda
Waasland-Beveren
Wales
Watford
Werder Bremen
West Brom
Western United
Wisla Krakow
Wisla Plock
Xanthi
Yellow-Red Mechelen
Yemen
Yokohama FC
Young Boys
Zaragoza
Zeljeznicar
Zenit St Petersburg
Zrinjski
Nieciecza
Radomiak Radom
Gornik Leczna
Seraing Utd
Freiburg II
Vllaznia Shkoder
Japan Olympic
Mexico Olympic
Vizela
Verona
Catanzaro
Mirandes
Oldham
Wigan
Shrewsbury
Gillingham
Slaven Belupo
Sibenik
Mexico
El Salvador
Honduras
USA
Swindon
Walsall
Leyton Orient
Ipswich
Bradford
Young Boys U19
OSC Lille U19
Dynamo Kyiv U19
Barcelona U19
Sevilla U19
Chelsea U19
Villarreal U19
Bristol Rovers
Boluspor
Samsunspor
Adanaspor
Tarsus Idman Yurdu
Bucaspor
Bergama Belediyespor
Erzincanspor
Kocaelispor
Corum Belediyespor
Hekimoglu Trabzon
Serik Belediyespor
Etimesgut Belediyespor
Keciorengucu
Kirsehir Belediyespor
Ankara Demirspor
Karacabey Belediyespor AS
Sariyer G.K.
Afjet Afyonspor
Istanbulspor
Usakspor
Ankaraspor
Menemen Belediyespor
Balikesirspor
Turgutluspor
Eskisehirspor
Bandirmaspor
Westlandia
Harkemase Boys
Ado '20
De Treffers
Achilles Veen
Staphorst
Osmaniyespor 2011
Umraniyespor
Tuzlaspor
Altinordu
Sakaryaspor
MTK Budapest U19
Hajduk Split U19
MSK Zilina U19
Angers U19
Maccabi Haifa U19
Yate Town FC
FC Halifax Town
Chesterfield
Boreham Wood
York City
Grimsby
Altrincham
Gambia
Burkina Faso
AS Cavaly
Bani Yas
ENPPI
CD Trasandino
Deportes Limache
Mumbai City FC
Quilmes
List of values I want to know if any of them are not in the previous list:
Philadelphia
Nacional (Par)
Argentinos Juniors
Vancouver Whitecaps
Energetik - BGU Minsk
Elfsborg
Sirius
Kalmar FF
Malmo FF
El Gounah
Pharco FC
Patronato
Future FC
Universidad de Chile
Club Sportivo Ameliano
Tolima
Atl Tucuman
Operario PR
Sampaio Correa FC
Tacuary
Shandong Luneng
Guangzhou City
Ghazl El Mahallah
Al Mokawloon
Zamalek
Rosario Central
New York City
Guarani (Par)
Arsenal De Sarandi
New England
Varbergs BoIS
IFK Goteborg
Varnamo
Helsingborgs
Eastern Company SC
Al Ittihad (EGY)
CA Independiente
El Geish
CD General Velasquez
Guairena
Atletico Nacional Medellin
Godoy Cruz
Chapecoense
CSA
Sol de America (Par)
Henan
Dalian Yifang
Ismaily
National Bank
Ceramica Cleopatra
Quilmes
Actual Result:
Nacional (Par)
Al Ittihad (EGY)
Sol de America (Par)
Expected Result:
Arsenal De Sarandi
How should I proceed in this case that has more detail in the data to be worked on?
=FILTER(D1:D, REGEXMATCH(D1:D, "^("&REGEXREPLACE(TEXTJOIN("|", 1, A:A),"([().])","\\$1")&")$")=FALSE)
In the List of saved values, there are special characters (). which have to be escaped
In your REGEXMATCH expression, you have to specify exact match ^(...)$

My native language special characters don't work on LaTeX

I'm new to LaTeX and I'm trying to make my Cover Letter on Overleaf. My name is Codruț Ștefan, and when I want to implement that in this section, the "ț" and the "Ș" don't render:
\namesection{Codrut Stefan}{Ursache}{
\href{mailto:ursache.codrut71#gmail.com}{ursache.codrut71#gmail.com} | 0765991609 |
\urlstyle{same}\href{https://github.com/Kreker71}{Github} |
\urlstyle{same}\href{https://www.facebook.com/ursache.codrut}{Facebook}
}
The strange part is that when I write these special characters in the main part of the letter, everything is all right.
I also included these special tags at the begging \usepackage[romanian]{babel} \usepackage{combelow}
Please help me and sorry if it's a dumb question.
cover.tex:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Deedy - Cover Letter Template
% LaTeX Template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[]{cover}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{Page \thepage \hspace{1pt}}
\thispagestyle{empty}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TITLE NAME
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\namesection{Codruț Ștefan}{Ursache}{ \href{mailto:ursache.codrut71#gmail.com}{ursache.codrut71#gmail.com} | 0765991609 | \urlstyle{same}\href{https://github.com/Kreker71}{Github} | \urlstyle{same}\href{https://www.facebook.com/ursache.codrut}{Facebook}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MAIN COVER LETTER CONTENT
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hfill
\begin{minipage}[t]{0.5\textwidth}
\companyname{Microsoft Learn Student Ambassadors}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\currentdate{\today}
\end{minipage}
\vspace*{7mm}
\lettercontent{\hspace*{10mm} Dragă recrutant,}
% The first paragraph of your job application letter should include information on why you are writing. Mention the job you are applying for and where you found the position. If you have a contact at the company, mention the person's name and your connection here.
\lettercontent{\hspace*{10mm} Numele meu este Ursache Codruț-Ștefan. Am 18 ani și în prezent sunt student la Universitatea Politehnica din București, pe profilul Calculatoare și Tehnologia Informației. Atracția mea către domeniul informaticii a început din copilărie, prin prisma jocurilor pe calculator, ce reprezentau o provocare pentru mine, de a înțelege conceptele tehnice din spatele funcționalității acestora. Cu timpul, informatica a devenit o pasiune, fapt ce m-a determinat să urmez un profil de Matematică și Informatică cu predarea intensivă a Informaticii la Colegiul Național B.P.Hasdeu din Buzău, fiind unul dintre cele mai prestigioase licee din țară. Datorită metodelor avansate de predare, am putut să îmi însușesc un nivel de cunoștințe generale ridicat, cât și o bază complexă în primul meu limbaj de programare studiat, și anume C++.
}
% The next section of your cover letter should describe what you have to offer the company. Make strong connections between your abilities and the requirements listed in the job posting. Mention specifically how your skills and experience match the job. Expand on the information in your resume.
% Try to support each statement you make with a piece of evidence. Use several shorter paragraphs or bullets rather than one large block of text, which can be difficult to read and absorb quickly.
%For example
% Using the knowledge and skills I have acquired in my <DEGREE PROGRAM> combined with my technical abilities I believe I can provide significant value to <COMPANY> while providing me invaluable experience to <PREPARE FOR OR FURTHER CAREER>.
% <RELEVANT LIFE STORY/ WORK/ PROJECT >
% In own projects, my coursework, work as a <PREVIOUS JOB TITLE> I have applied knowledge of <SUBJECT MATTER>.
% <LIST OF SMART SOUNDING SKILLS AND TOOLS>.
% Combining these tools with my interests in <FIELD> issues, I hope to help the <DEPARTMENT> answer questions about the <SUBJECT> behind <FIELD> projects.
\lettercontent{\hspace*{10mm}Lumea se află în prezent într-o eră dominată de avansul rapid al tehnologiei asupra oamenilor, prin infiltrațiile sale în domenii cum ar fi medicina, inginerie, business. Fiind o fire cu o voință puternică cu privire la procesele de auto-învățare, pe care le consider esențiale în etapele pe care le parcurge un viitor programator, atenția mea a fost concentrată pe toate noutățile apărute din sfera științei, pentru a putea înțelege mai bine ce rol are și va avea în viitor tehnologia în viețile noastre. Acest lucru m-a determinat să înțeleg mai bine necesitățile lumii moderne, în strânsa legătura cu lumile artificiale create de fiecare calculator în parte.
}
%Proiect personal
\lettercontent{\hspace*{10mm}În clasa a 11-a, prin suportul imens acordat din partea unui profesor de informatică din cadrul liceului, am reușit să realizez primul meu proiect, ce a constat într-o oglindă inteligentă, ce îmbină eficient componente hardware, cum ar fi o placă principală de tip RaspberryPy Model 3B, și programare software, folosind concepte de Linux, NodeJS și Python. Dimensiunile acesteia sunt moderate, astfel încât se pot integra zone în care utilizatorul poate accesa știrile zilei, vremea, moduri diferite de vizualizare ce modifică luminozitatea, contrastul imaginii etc, în funcție de momentul în care oglinda este folosită. De asemenea, în funcție de momentul zilei, aceasta afișează un mesaj motivațional diferit(ex.: Dimineața între orele 07-10am sunt prezentate mesaje specifice pentru dimineață, precum "Bună dimineața!", "Cum a fost somnul?", "Gata pentru o nouă zi?"). Utilizarea site-ului GitHub m-a făcut să realizez cât de strânsă și unită este comunitatea de programatori din întreaga lume, prin intermediul acestuia reușind să implementez o funcție de RemoteControl a oglinzii prin intermediul smartphone-ului(widget-urile și oglinda pot fi închise și deschise de pe telefon).
}
% Proiecte liceu
\lettercontent{\hspace*{10mm}În perioada liceului, am înțeles cât de important este să pătrund cât mai adânc în diferite domenii ce fac parte din întregul științei calculatoarelor. O parte din efortul meu academic era îndreptat către rezolvarea problemelor de programare, fie ele strict efectuate în timpul orelor, fie proiecte avansate, cum ar fi jocuri sau aplicații. În timpul unui opțional în clasa a 11-a, am parcurs elemente de C\#, reușind, în decurs de doar câteva săptămâni, să proiectez diferite aplicații practice, destinate înțelegerii mai limpede a modului în care operează C\#, prin aceste procese educaționale: convertor valutar, tabel periodic al elementelor digital, generarea unor fractali și un calculator matematic. Lucrând la aceste aplicații, cât și la programe ce presupuneau o diversitate de noțiuni matematice, am conștientizat relația de interdependență dintre cele două ramuri științifice, matematica fiind un alt domeniu pe care mi-am canalizat atenția.}
%
% PATH
%
\lettercontent{\hspace*{10mm} Întotdeauna am fost adeptul ideii de posibilă conviețuire cu un calculator capabil să funcționeze autonom. Domeniul inteligenței artificiale cu ale sale sub-ramuri, Machine Learning și Deep Learning, creează pretextul unui viitor în care relațiile inter-umane vor fi dominate de legăturile stabilite între oameni și calculatoare. Fiind o persoană capabilă să se adapteze la orice provocare apărută în cadrul științei, cu precădere a științei calculatoarelor, fac parte din comunitatea ce se află în continuă dezvoltare, a oamenilor implicați, activ sau pasiv, în cercetarea inteligenței artificiale, aflată încă într-un stadiu de plină expansiune. De aceea, îmi doresc să fiu îndrumat corespunzător de către Microsoft Learn Student Ambassadors, spre a aprofunda noțiunile unei viitoare cariere de succes, combinând cercetarea acestui domeniu, până la realizarea programelor capabile să se auto-cerceteze.}
\lettercontent{\hspace*{10mm} Când vine vorba de hobby-uri, îmi place să mă surprind și să încerc lucruri noi, însă principalele mele atracții sunt îndreptate către fotografie și cinematografie. Fiecare fotografie ascunde în spatele ei o poveste ce poate fi descoperită la o analiză mai amănunțită, pixelii conținând nu doar o combinație de valori RGB, ci și o emoție sau o trăire a fotografului sau a obiectului fotografiat. Ceea ce ador cel mai mult la fotografie nu este acțiunea propriu-zisă de a face poze, ci posibilitatea de a o îmbina cu alte pasiuni dragi mie, cum ar fi drumețiile, concertele și observatul stelelor. Pe de altă parte, mă consider un cinefil dedicat. Părerea mea este că la fel cum elevii trebuie să învețe literatură și despre cât de multe lucruri are de oferit și de ascuns o carte, ar trebui să existe o oră asemănătoare pentru studiul filmelor, în care elevul are șansa să descopere de ce o anumită scenă a fost filmată cu cadre foarte mari, de ce filmul a fost produs Alb-Negru deși tehnologia din momentul filmării permitea o imagine color sau în câte moduri poate fi interpretat un anumit final. Trăim într-o eră a audio-vizualului în care, din păcate, din ce în ce mai multe filme care "au ceva de spus" sunt umbrite de filme comerciale, de cinema, pline de efecte speciale și lipsite de mesaj sau poveste.}
\lettercontent{\hspace*{10mm} Din punct de vedere al laturii sociale, sunt o persoană ce asociază fiecare interacțiune cu oamenii ca fiind o experiență din care pot învăța lucruri noi, ce mă pot ajuta în procesul meu de dezvoltare personală. De altfel, simt o nevoie intensă de a fi implicat în acte de voluntariat, dorind să am o contribuție, oricât de mică, asupra acțiunilor de ajutorare a oamenilor, dar și a animalelor. De exemplu, în primul an de liceu, am fost organizator într-o echipă ce a desfășurat un carnaval cu tematica Harry Potter, unde se vindeau sucuri și prăjituri. Banii strânși de pe urma acestora, cât și de pe urma vânzării biletelor pentru a putea intra la carnaval au fost donați unei case de bătrâni din orașul în care locuiesc.
}
\lettercontent{}
\lettercontent{}
\vspace{0.5cm}
\signature{Ursache Codruț Ștefan}
\end{document}
\documentclass[]{article}
cover.cls:
% Intro Options
\ProvidesClass{deedy-resume-openfont}[2014/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption{print}{\def\#cv#print{}}
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}
}
\ProcessOptions\relax
\LoadClass{article}
% Package Imports
\usepackage[hmargin=2.54cm, vmargin=2.54cm]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{titlesec}
\usepackage[absolute]{textpos}
\usepackage{fontspec,xltxtra,xunicode}
% Publications
\usepackage{cite}
\renewcommand\refname{\vskip -1.5cm}
% Color definitions
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{date}{HTML}{666666}
\definecolor{primary}{HTML}{2b2b2b}
\definecolor{headings}{HTML}{6A6A6A}
\definecolor{subheadings}{HTML}{333333}
% Set main fonts
\usepackage{fontspec}
\setmainfont[Color=primary, Path = OpenFonts/fonts/lato/,BoldItalicFont=Lato-RegIta,BoldFont=Lato-Reg,ItalicFont=Lato-LigIta]{Lato-Lig}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text, Path = OpenFonts/fonts/raleway/]{Raleway-ExtraLight}
% Date command
\usepackage[absolute]{textpos}
% \usepackage[UKenglish]{isodate}
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}
\newcommand{\lastupdated}{\begin{textblock}{60}(155,5)
\color{date}\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont
Last Updated on \today
\end{textblock}}
% Name command
\newcommand{\namesection}[3]{
\centering{
\fontsize{40pt}{60pt}
\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Hai}\selectfont #1
\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Lig}\selectfont #2
} \\[5pt]
\centering{
\color{headings}
\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont #3}
\noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.0pt}}
\vspace{0pt}
}
% Section seperators
\usepackage{titlesec}
\titlespacing{\section}{0pt}{0pt}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{0pt}
\newcommand{\sectionsep}{\vspace{8pt}}
% Headings command
\titleformat{\section}{\color{headings}
\scshape\fontspec[Path = OpenFonts/fonts/OpenFonts/fonts/lato/]{Lato-Lig}\fontsize{16pt}{24pt}\selectfont \raggedright\uppercase}{}{0em}{}
% Subeadings command
\titleformat{\subsection}{
\color{subheadings}\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Bol}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase}{}{0em}{}
\newcommand{\runsubsection}[1]{
\color{subheadings}\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Bol}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase {#1} \normalfont}
% Descriptors command
\newcommand{\descript}[1]{
\color{subheadings}\raggedright\scshape\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}
% Location command
\newcommand{\location}[1]{
\color{headings}\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{10pt}{12pt}\selectfont {#1\\} \normalfont}
% Bullet Lists with fewer gaps command
\newenvironment{tightemize}{
\vspace{-\topsep}\begin{itemize}\itemsep1pt \parskip0pt \parsep0pt}
{\end{itemize}\vspace{-\topsep}}
% Cover Letter
\newcommand{\companyname}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/lato/]{Lato-Bol}\fontsize{12pt}{14pt}\selectfont {#1 \\} \normalfont}
\newcommand{\companyaddress}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\}\mbox{}\\\mbox{}\\ \normalfont}
\newcommand{\currentdate}[1]{\raggedleft\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}
% Letter content command
\newcommand{\lettercontent}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\}\mbox{}\\ \normalfont}
\newcommand{\closing}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\}\mbox{}\\\mbox{}\\ \normalfont}
\newcommand{\signature}[1]{\raggedright\fontspec[Path = OpenFonts/fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1 \\} \normalfont}

What is about with Clisting environnement

could you help me to solve following problem?
below the MWE code and the error ==>Undefined control sequence. \end{Clisting}
why the error appear?
The problem to manage accent inside Clisting bloc is solved
The pdf document seems totally good.
the compilation operate with pdflatex
As you can see, I want to keep tikz and listing aspect in order to have a nice breakable box
\documentclass{book}
%mwe_clisting2
%Rétablissement des polices vectorielles
%Pour retourner dans le droit chemin, vous pouvez passer par le package ae ou bien utiliser les fontes modernes, voire les deux :
\usepackage{ae,lmodern} % ou seulement l'un, ou l'autre, ou times etc.
\usepackage[english,french]{babel}
\usepackage[utf8]{inputenc}
%%% Note that this is font encoding (determines what kind of font is used), not input encoding.
\usepackage[T1]{fontenc}
\usepackage[cyr]{aeguill}
\usepackage{tikz}
\tikzset{coltria/.style={fill=red!15!white}}
\usepackage{tcolorbox}
\tcbuselibrary{listings,breakable,skins,documentation,xparse}
\lstdefinestyle{Clst}{
literate=
{á}{{\'a}}1
{à}{{\`a }}1
{ã}{{\~a}}1
{é}{{\'e}}1
{ê}{{\^e}}1
{î}{{\^i}}1
{oe}{{\oe}}1
{í}{{\'i}}1
{ó}{{\'o}}1
{õ}{{\~o}}1
{ú}{{\'u}}1
{ü}{{\"u}}1
{ç}{{\c{c}}}1,
numbers=left,
numberstyle=\small,
numbersep=8pt,
frame = none,
language=C,
framexleftmargin=5pt, % la marge à  gauche du code
% test pour améliorer la présentation du code
upquote=true,
columns=flexible,
basicstyle=\ttfamily,
basicstyle=\small, % ==> semble optimal \tiny est vraiment trop petit
% provoque une erreur texcsstyle=*\color{blue},
commentstyle=\color{green}, % comment style
keywordstyle=\color{blue}, % keyword style
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showtabs=false, % show tabs within strings adding particular underscores
stringstyle=\color{cyan}, % string literal style
numbers=none,
tabsize=4,
% pour couper les lignes trop longues
breaklines,
breakindent=1.5em, %?indente?de?3?caracteres?vers?la?droite
escapechar=µ,% pour escape en latex
% pour l'encodage à l'intérieur des listing utf8 et latin1 ?????
% inputencoding=utf8/latin1,
morekeywords=[2]{ % j'ajoute une catégorie de mots-clés
%%% pour tri sur le 5ieme caractere
gtk_window_new,
gtk_window_set_title,
gtk_window_set_resizable,
gtk_window_get_resizable,
gtk_window_is_maximized,
gtk_window_maximize,
gtk_window_unmaximize,
gtk_window_fullscreen,
gtk_window_fullscreen_on_monitor,
gtk_window_unfullscreen,
%%%%%%%%%%%
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
% dernier sans la virgule
},
morekeywords=[3]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 3ieme caractere
G_TYPE_NONE,
G_TYPE_INTERFACE,
G_TYPE_CHAR,
G_TYPE_UCHAR,
G_TYPE_BOOLEAN,
G_TYPE_INT,
G_TYPE_UINT,
G_TYPE_LONG,
% dernier sans la virgule
},
morekeywords=[4]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 1er caractere
GtkSourceLanguageManager,
GtkSourceSmartHomeEndType,
GtkSourceMarkAttributes,
GtkSourceDrawSpacesFlags,
GtkSourceCompletion,
GtkSourceGutter,
GtkSourceBackgroundPatternType,
Container_set_border_width,
GtkSourceSearchContext,
GtkFileChooserAction,
gboolean,
%%%%%%
cairo_rectangle,
cairo_fill,
% dernier sans la virgule
},
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type gtk_xxxxx
keywordstyle=[2]\monstyleblue, %%%\color{blue}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[1][keywords2]}, % ces mots-clés sont ajoutés à  l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[1]\indexgtk}, % par le biais de macro \indexgtk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type g_xxxxx
keywordstyle=[3]\monstylegreen, %%%\color{green}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[3][keywords3]}, % ces mots-clés sont ajoutés à  l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[3]\indexglib}, % par le biais de ma macro tri 3ieme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type GtkSourceSmartHomeEndType
keywordstyle=[4]\monstylebrown, %%%\color{brown}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[4][keywords4]}, % ces mots-clés sont ajoutés à  l'index?oui
%% xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[4]\indextype}, % tri sur le mot entier
}
%---------------------------------------------------------------------------------------
%------------------------------ box dédié au code langage C ----------------------------
%---------------------------------------------------------------------------------------
\newtcblisting{Clisting}[2][]{empty,breakable,leftrule=5mm,left=2mm,
%frame style={fill,top color=red!75!black,bottom color=red!75!black,middle color=red},
frame style={fill,top color=green!75!black,bottom color=green!75!black,middle color=green},
listing only,
listing engine=listings,
listing options={style=Clst,tabsize=4,breaklines,
breakindent=1.5em,columns=fullflexible},
% keywordstyle=\color{red}},
colback=yellow!15!white,
% code for unbroken boxes:
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--cycle; },
interior code={\path[tcb fill interior] (interior.south west)--(interior.north west)
--([xshift=-4.8mm]interior.north east)--([yshift=-4.8mm]interior.north east)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },
attach boxed title to top center={yshift=-2mm},
title=\fcolorbox{black}{black}{\red{#2}},
% code for the first part of a break sequence:
skin first is subskin of={emptyfirst}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm)-- cycle; },
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west)--([xshift=-4.8mm]interior.north east)
--([yshift=-4.8mm]interior.north east)--(interior.south east|-frame.south)
--cycle; },
},%
% code for the middle part of a break sequence:
skin middle is subskin of={emptymiddle}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--(interior.south east|-frame.south)--cycle; },
},
% code for the last part of a break sequence:
skin last is subskin of={emptylast}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--([yshift=5mm]frame.south east)
--([xshift=-5mm]frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% attention dans les 3 commandes ci-dessous l'activation simultanée de \marginpar{\scriptsize provoque une situation ingérable par latex
\newcommand{\monstylered}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{red}{\emph{#1}}
}
\newcommand{\monstyleblue}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{blue}{\emph{#1}}
}
\newcommand{\monstylebrown}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{brown}{\emph{#1}}
}
\newcommand{\monstylegreen}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{green}{\emph{#1}}
}
%----------------------- Fin Traitement des listing ------------------------------
% --------------------- Macros pour indexation des mots clefs --------------------
% macro pour fabriquer le fichier d'index
\usepackage{makeidx}
\makeindex
% fabrication de l'index
%makeindex mwe_clisting2.idx -s perso.ist
%---------------------------------------------------------------------------------
%%%%%% tri a partir du 5ieme element gtk_XXXX et couleur index blue
\makeatletter
\def\#indexgtk#i#1#2#3#4#5,{\index{#5#\monstyleblue{#1#2#3#4#5}}}
\def\indexgtk#1{\#indexgtk#i#1,}
\makeatother
%---------------------------------------------------------------------------------
%%%%% tri a partir du 3ieme element G_NONE et couleur index green
\makeatletter
\def\#indexglib#i#1#2#3,{\index{#3#\monstylegreen{#1#2#3}}}
\def\indexglib#1{\#indexglib#i#1,}
\makeatother
%%%%%% tri a partir du 1er element MANQUE MISE EN ITALIQUE et couleur index marron
\makeatletter
\def\#indextype#i#1,{\index{#1#\monstylebrown{#1}}}
\def\indextype#1{\#indextype#i#1,}
\makeatother
%---------------------------------------------------------------------------------------
\begin{document}
Voici l'étape qui a toute les chances de ne pas être lue au début mais plutôt quand on est dans une belle impasse. Croire qu'on va s'en sortir sans un minimum de méthode n'est pas viable dans le projet que je vous propose de suivre.
Aidez-moi à conjurer le mauvais sort, et lisez avec attention cette liste de recommandation qui relève du bon sens pratique du développeur expérimenté qu'il aurait aimé découvrir dès ses premiers pas.
\begin{Clisting} {fonction draw\_func}
void draw_func (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GdkRGBA red, green, yellow, blue;
double w, h;
w = width / 2.0;
h = height / 2.0;
gdk_rgba_parse (&red, "red");
gdk_rgba_parse (&green, "green");
gdk_rgba_parse (&yellow, "yellow");
gdk_rgba_parse (&blue, "blue");
gdk_cairo_set_source_rgba (cr, &red);
cairo_rectangle (cr, 0, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &green);
cairo_rectangle (cr, w, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &yellow);
cairo_rectangle (cr, 0, h, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &blue);
cairo_rectangle (cr, w, h, w, h);
cairo_fill (cr);
}
...
gtk_drawing_area_set_draw_func (area, draw, NULL, NULL);
\end{Clisting}
\begin{Clisting}{here problem with accent}
gboolean TEST1 = TRUE
if (TEST1)
{
/** nouvel essai nouvelle méthode à tester **/
...
}
else
{
/** ancien bloc fonctionnel qui buggue **/
...
}
\end{Clisting}
\begin{Clisting}{Run ok with colorisation index}
gtk_window_new
gtk_window_set_title
gtk_window_set_resizable
gtk_window_get_resizable
gtk_window_is_maximized
gtk_window_maximize
gtk_window_unmaximize
gtk_window_fullscreen
gtk_window_fullscreen_on_monitor
gtk_window_unfullscreen
G_TYPE_NONE
G_TYPE_INTERFACE
G_TYPE_CHAR
G_TYPE_UCHAR
G_TYPE_BOOLEAN
G_TYPE_INT
G_TYPE_UINT
G_TYPE_LONG
GtkSourceLanguageManager
GtkSourceSmartHomeEndType
GtkSourceMarkAttributes
GtkSourceDrawSpacesFlags
GtkSourceCompletion
GtkSourceGutter
GtkSourceBackgroundPatternType
Container_set_border_width
GtkSourceSearchContext
GtkFileChooserAction
gboolean
\end{Clisting}
\printindex
\end{document}
EDIT : I changed the exemple code....
In order to understand, please compile with pdflatex, look two type of error.... as you have better knowledge as me you should help me.
pb with accent solved
Thanks a lot by advance
If you look at the complete error message in the log file, you get
! Undefined control sequence.
<argument> \red
{fonction draw\_func}
l.280 \end{Clisting}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
This tells you that \red is not defined, this is simply wrong syntax
\documentclass{book}
%mwe_clisting2
%Rétablissement des polices vectorielles
%Pour retourner dans le droit chemin, vous pouvez passer par le package ae ou bien utiliser les fontes modernes, voire les deux :
\usepackage{ae,lmodern} % ou seulement l'un, ou l'autre, ou times etc.
\usepackage[english,french]{babel}
\usepackage[utf8]{inputenc}
%%% Note that this is font encoding (determines what kind of font is used), not input encoding.
\usepackage[T1]{fontenc}
\usepackage[cyr]{aeguill}
\usepackage{tikz}
\tikzset{coltria/.style={fill=red!15!white}}
\usepackage{tcolorbox}
\tcbuselibrary{listings,breakable,skins,documentation,xparse}
\lstdefinestyle{Clst}{
literate=
{á}{{\'a}}1
{à}{{\`a }}1
{ã}{{\~a}}1
{é}{{\'e}}1
{ê}{{\^e}}1
{î}{{\^i}}1
{oe}{{\oe}}1
{í}{{\'i}}1
{ó}{{\'o}}1
{õ}{{\~o}}1
{ú}{{\'u}}1
{ü}{{\"u}}1
{ç}{{\c{c}}}1,
numbers=left,
numberstyle=\small,
numbersep=8pt,
frame = none,
language=C,
framexleftmargin=5pt, % la marge à gauche du code
% test pour améliorer la présentation du code
upquote=true,
columns=flexible,
basicstyle=\ttfamily,
basicstyle=\small, % ==> semble optimal \tiny est vraiment trop petit
% provoque une erreur texcsstyle=*\color{blue},
commentstyle=\color{green}, % comment style
keywordstyle=\color{blue}, % keyword style
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showtabs=false, % show tabs within strings adding particular underscores
stringstyle=\color{cyan}, % string literal style
numbers=none,
tabsize=4,
% pour couper les lignes trop longues
breaklines,
breakindent=1.5em, %?indente?de?3?caracteres?vers?la?droite
escapechar=µ,% pour escape en latex
% pour l'encodage à l'intérieur des listing utf8 et latin1 ?????
% inputencoding=utf8/latin1,
morekeywords=[2]{ % j'ajoute une catégorie de mots-clés
%%% pour tri sur le 5ieme caractere
gtk_window_new,
gtk_window_set_title,
gtk_window_set_resizable,
gtk_window_get_resizable,
gtk_window_is_maximized,
gtk_window_maximize,
gtk_window_unmaximize,
gtk_window_fullscreen,
gtk_window_fullscreen_on_monitor,
gtk_window_unfullscreen,
%%%%%%%%%%%
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
gdk_rgba_parse,
% dernier sans la virgule
},
morekeywords=[3]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 3ieme caractere
G_TYPE_NONE,
G_TYPE_INTERFACE,
G_TYPE_CHAR,
G_TYPE_UCHAR,
G_TYPE_BOOLEAN,
G_TYPE_INT,
G_TYPE_UINT,
G_TYPE_LONG,
% dernier sans la virgule
},
morekeywords=[4]{ %% j'ajoute une autre catégorie de mots-clés
%%% pour tri sur le 1er caractere
GtkSourceLanguageManager,
GtkSourceSmartHomeEndType,
GtkSourceMarkAttributes,
GtkSourceDrawSpacesFlags,
GtkSourceCompletion,
GtkSourceGutter,
GtkSourceBackgroundPatternType,
Container_set_border_width,
GtkSourceSearchContext,
GtkFileChooserAction,
gboolean,
%%%%%%
cairo_rectangle,
cairo_fill,
% dernier sans la virgule
},
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type gtk_xxxxx
keywordstyle=[2]\monstyleblue, %%%\color{blue}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[1][keywords2]}, % ces mots-clés sont ajoutés à l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[1]\indexgtk}, % par le biais de macro \indexgtk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type g_xxxxx
keywordstyle=[3]\monstylegreen, %%%\color{green}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[3][keywords3]}, % ces mots-clés sont ajoutés à l'index?oui
%% gtk_xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[3]\indexglib}, % par le biais de ma macro tri 3ieme
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Traitement des mots-clefs type GtkSourceSmartHomeEndType
keywordstyle=[4]\monstylebrown, %%%\color{brown}, % je leur donne une coloration spéciale ds le texte
%% Intégration dans l'index OK
moreindex={[4][keywords4]}, % ces mots-clés sont ajoutés à l'index?oui
%% xxxx trié par xxxx ca fonctionne sur tout l'index
indexstyle={[4]\indextype}, % tri sur le mot entier
}
%---------------------------------------------------------------------------------------
%------------------------------ box dédié au code langage C ----------------------------
%---------------------------------------------------------------------------------------
\newtcblisting{Clisting}[2][]{empty,breakable,leftrule=5mm,left=2mm,
%frame style={fill,top color=red!75!black,bottom color=red!75!black,middle color=red},
frame style={fill,top color=green!75!black,bottom color=green!75!black,middle color=green},
listing only,
listing engine=listings,
listing options={style=Clst,tabsize=4,breaklines,
breakindent=1.5em,columns=fullflexible},
% keywordstyle=\color{red}},
colback=yellow!15!white,
% code for unbroken boxes:
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--([yshift=5mm]frame.south east)--([xshift=-5mm]frame.south east)--cycle; },
interior code={\path[tcb fill interior] (interior.south west)--(interior.north west)
--([xshift=-4.8mm]interior.north east)--([yshift=-4.8mm]interior.north east)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },
attach boxed title to top center={yshift=-2mm},
title=\fcolorbox{black}{black}{\color{red}{#2}},
% code for the first part of a break sequence:
skin first is subskin of={emptyfirst}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--([xshift=-5mm]frame.north east)--([yshift=-5mm]frame.north east)
--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm)-- cycle; },
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west)--([xshift=-4.8mm]interior.north east)
--([yshift=-4.8mm]interior.north east)--(interior.south east|-frame.south)
--cycle; },
},%
% code for the middle part of a break sequence:
skin middle is subskin of={emptymiddle}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--(frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
\path[coltria] ([xshift=2.5mm,yshift=1mm]frame.south west) -- +(120:2mm)
-- +(60:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west|-frame.south)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--(interior.south east|-frame.south)--cycle; },
},
% code for the last part of a break sequence:
skin last is subskin of={emptylast}{%
frame code={\path[tcb fill frame] (frame.south west)--(frame.north west)
--(frame.north east)--([yshift=5mm]frame.south east)
--([xshift=-5mm]frame.south east)--cycle;
\path[coltria] ([xshift=2.5mm,yshift=-1mm]frame.north west) -- +(240:2mm)
-- +(300:2mm) -- cycle;
},
interior code={\path[tcb fill interior] (interior.south west)
--(interior.north west|-frame.north)--(interior.north east|-frame.north)
--([yshift=4.8mm]interior.south east)--([xshift=-4.8mm]interior.south east)
--cycle; },#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% attention dans les 3 commandes ci-dessous l'activation simultanée de \marginpar{\scriptsize provoque une situation ingérable par latex
\newcommand{\monstylered}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{red}{\emph{#1}}
}
\newcommand{\monstyleblue}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{blue}{\emph{#1}}
}
\newcommand{\monstylebrown}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{brown}{\emph{#1}}
}
\newcommand{\monstylegreen}[1] % attention ici le 1 c'est un seul paramètre !!!!!
{\color{green}{\emph{#1}}
}
%----------------------- Fin Traitement des listing ------------------------------
% --------------------- Macros pour indexation des mots clefs --------------------
% macro pour fabriquer le fichier d'index
\usepackage{makeidx}
\makeindex
% fabrication de l'index
%makeindex mwe_clisting2.idx -s perso.ist
%---------------------------------------------------------------------------------
%%%%%% tri a partir du 5ieme element gtk_XXXX et couleur index blue
\makeatletter
\def\#indexgtk#i#1#2#3#4#5,{\index{#5#\monstyleblue{#1#2#3#4#5}}}
\def\indexgtk#1{\#indexgtk#i#1,}
\makeatother
%---------------------------------------------------------------------------------
%%%%% tri a partir du 3ieme element G_NONE et couleur index green
\makeatletter
\def\#indexglib#i#1#2#3,{\index{#3#\monstylegreen{#1#2#3}}}
\def\indexglib#1{\#indexglib#i#1,}
\makeatother
%%%%%% tri a partir du 1er element MANQUE MISE EN ITALIQUE et couleur index marron
\makeatletter
\def\#indextype#i#1,{\index{#1#\monstylebrown{#1}}}
\def\indextype#1{\#indextype#i#1,}
\makeatother
%---------------------------------------------------------------------------------------
\begin{document}
Voici l'étape qui a toute les chances de ne pas être lue au début mais plutôt quand on est dans une belle impasse. Croire qu'on va s'en sortir sans un minimum de méthode n'est pas viable dans le projet que je vous propose de suivre.
Aidez-moi à conjurer le mauvais sort, et lisez avec attention cette liste de recommandation qui relève du bon sens pratique du développeur expérimenté qu'il aurait aimé découvrir dès ses premiers pas.
\begin{Clisting} {fonction draw\_func}
void draw_func (GtkDrawingArea *da,
cairo_t *cr,
int width,
int height,
gpointer data)
{
GdkRGBA red, green, yellow, blue;
double w, h;
w = width / 2.0;
h = height / 2.0;
gdk_rgba_parse (&red, "red");
gdk_rgba_parse (&green, "green");
gdk_rgba_parse (&yellow, "yellow");
gdk_rgba_parse (&blue, "blue");
gdk_cairo_set_source_rgba (cr, &red);
cairo_rectangle (cr, 0, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &green);
cairo_rectangle (cr, w, 0, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &yellow);
cairo_rectangle (cr, 0, h, w, h);
cairo_fill (cr);
gdk_cairo_set_source_rgba (cr, &blue);
cairo_rectangle (cr, w, h, w, h);
cairo_fill (cr);
}
...
gtk_drawing_area_set_draw_func (area, draw, NULL, NULL);
\end{Clisting}
\begin{Clisting}{here problem with accent}
gboolean TEST1 = TRUE
if (TEST1)
{
/** nouvel essai nouvelle méthode à tester **/
...
}
else
{
/** ancien bloc fonctionnel qui buggue **/
...
}
\end{Clisting}
\begin{Clisting}{Run ok with colorisation index}
gtk_window_new
gtk_window_set_title
gtk_window_set_resizable
gtk_window_get_resizable
gtk_window_is_maximized
gtk_window_maximize
gtk_window_unmaximize
gtk_window_fullscreen
gtk_window_fullscreen_on_monitor
gtk_window_unfullscreen
G_TYPE_NONE
G_TYPE_INTERFACE
G_TYPE_CHAR
G_TYPE_UCHAR
G_TYPE_BOOLEAN
G_TYPE_INT
G_TYPE_UINT
G_TYPE_LONG
GtkSourceLanguageManager
GtkSourceSmartHomeEndType
GtkSourceMarkAttributes
GtkSourceDrawSpacesFlags
GtkSourceCompletion
GtkSourceGutter
GtkSourceBackgroundPatternType
Container_set_border_width
GtkSourceSearchContext
GtkFileChooserAction
gboolean
\end{Clisting}
\printindex
\end{document}

Incompatible char and widechar in Delphi

I have a strange problem.
I'm using Delphi 2007 and running it with the -r switch. On my computer everything works fine. When I transfer code to another computer I get an error:
Incompatible types char and widechar.
Maybe I should change some options.
Function that makes the problem:
function THcp.ConVertString(s: string): string;
Var i:integer;
lstr:string;
begin
lstr:=EmptyStr;
for i := 1 to Length(s) do
begin
case s[i] of
'Č': s[i]:='C';
'č': s[i]:='c';
'Ć': s[i]:='C';
'ć': s[i]:='c';
'Š': s[i]:='S';
'š': s[i]:='s';
'Đ': s[i]:='D';
'đ': s[i]:='d';
'Ž': s[i]:='Z';
'ž': s[i]:='z';
end;
lstr:=lstr+s[i];
end;
Result:=lstr;
end;
This is my hypothesis. On the machine on which the code compiles, the non-ASCII characters in the code are all valid ANSI characters for that machine's locale. But the other machine uses a different locale under which some of those characters are not included in the >= 128 portion of the codepage. And hence those characters are promoted to WideChar and so of course are not compatible with AnsiChar.
The reason for this could very much be the reason David suggests.
If you declare the function like this:
function THcp.ConVertString(s: AnisString): AnsiString;
Then that reason yet only applies for the character constants in your code, not for the input. By elimination of those constants by using the character order instead, like I once did in these routines, then I suppose this will compile.
function AsciiExtToBase(Index: Byte): Byte; overload;
const
Convert: array[128..255] of Byte = (
//128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
// € ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ Ž ‘ ’
// E , f " ^ S < Z ' '
69,129, 44,102, 34,133,134,135, 94,137, 83, 60,140,141, 90,143,144, 41, 41,
//147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
// “ ” • – — ˜ ™ š › œ ž Ÿ ¡ ¢ £ ¤ ¥
// " " - ~ s > z Y !
34, 34,149, 45,151,126,153,115, 62,156,157,122, 89,160, 33,162,163,164,165,
//166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
// ¦ § ¨ © ª « ¬ * ® ¯ ° ± ² ³ ´ µ ¶ · ¸
// | c a < - 2 3 '
124,167,168, 99, 97, 60,172, 45,174,175,176,177, 50, 51, 41,181,182,183,184,
//185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
// ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë
// 1 > ? A A A A A A A C E E E E
49,186, 62,188,189,190, 63, 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69,
//204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
// Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ
// I I I I D N O O O O O x U U U U Y
73, 73, 73, 73, 68, 78, 79, 79, 79, 79, 79,120,216, 85, 85, 85, 85, 89,222,
//223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
// ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ
// a a a a a a a c e e e e i i i i o n
223, 97, 97, 97, 97, 97, 97, 97, 99,101,101,101,101,105,105,105,105,111,110,
//242 243 244 245 246 247 248 249 250 251 252 253 254 255
// ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
// o o o o o / u u u u y y
111,111,111,111,111, 47,248,117,117,117,117,121,254,121);
begin
if Index < 128 then
Result := Index
else
Result := Convert[Index];
end;
function AsciiExtToBase(AChar: AnsiChar): AnsiChar; overload;
begin
Result := Chr(AsciiExtToBase(Ord(AChar)));
end;
function AsciiExtToBase(const S: AnsiString): AnsiString; overload;
var
P: PByte;
I: Integer;
begin
Result := S;
P := #Result[1];
for I := 1 to Length(Result) do
begin
P^ := AsciiExtToBase(P^);
Inc(P);
end;
end;

Resources