lyaaaaaaaaaaaaaaa / lyaaaaa-s-logs-filter Goto Github PK
View Code? Open in Web Editor NEWLightweight user-friendly software which filters logs
Home Page: https://discord.gg/hSey9Bv
License: MIT License
Lightweight user-friendly software which filters logs
Home Page: https://discord.gg/hSey9Bv
License: MIT License
Describe the bug
If I enter "Bob Attack Crossbow" as filters the "attack" will be ignored because of the 3 spaces after Bob. If there is more than a space between the first and second filter and more than 2 filters, the second is ignored.
Expected behavior
Ignores the multiples spaces.
Additional context
See Set_Filter and Create_Filter in Log_Filter.adb
Describe the bug
That's not a bug but a misunderstanding. How can I read the last line of a file?
I use While not End_Of_File (file) Loop to repeat a statement.
However, it doesn't do anything for the last line. But, isn't the beginning of the last line not the end of the file?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The last line should appear! The program should run the loop in Read_Line even when the last line is reached, which actually doesn't!
Additional context
Code Involved
procedure Read_Line (p_filters : store_Filter;
p_number_of_filters : Natural) is
word_length : Natural := 0;
line_to_display : Boolean := False;
word : string (1 .. 40);
Filters_State : store_Filters_State (1.. p_number_of_filters);
begin
While not End_Of_File (file) Loop
line := To_Unbounded_String (Get_Line(file));
initialize_Filters_State (p_value => false,
p_Filters_State => Filters_State);
for I in 1 .. Length(line) loop
-- We ignore some opening characters to not miss any information
--in logs.
-- Therefore, a user doesn't need to think about logs syntax.
-- So it avoids [carl not being returned when carl is a filter.
if Element (line,I) /= ' ' and End_Of_Line (file) = false then
if Element (line,I) /= '['
and Element (line,I) /= '('
and Element (line,I) /= '''
and Element (line,I) /= '"'
and Element (line,I) /= '<'
and Element (line,I) /= '*'
and Element (line,I) /= '{' then
word_length := word_length + 1;
word (word_length) := To_Lower (Element(line,I));
end if;
elsif Element (line,I) = ' ' or End_Of_Line (file) = true then
filter_check(p_filters => p_filters,
p_number_of_filters => p_number_of_filters,
p_word => word,
p_Filters_State => Filters_State);
word_length := 0;
end if;
end loop;
if are_they_all_true (Filters_State) = true then
display_line;
end if;
end loop;
close (file);
end read_line;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.