Posts by José • 1,549 points
45 posts
-
2
votes4
answers5284
viewsA: How to center the elements within a div?
Let’s see... I’m going to expose a alternative to the @Uilherme-Henriques response using the concept of flexbox CSS 3. This alternative also aligns more with your centering mode. Before CSS 3, it…
-
1
votes1
answer297
viewsA: C CHAR reading that works with %s but not with %c, why? And how does INCREMENT work on a pointer?
Let’s see... They’re just conceptual problems. The first of them is more "boring": understanding the reason that led to the problem itself requires a good understanding of how the scanf. The second,…
-
0
votes1
answer78
viewsA: Pass file by parameter in a function
Let’s see... This JSON conversion function works but has some problems. So, I will consider the version of Stefan Goessner, call for xml2json, with a modification that can be seen on this Github…
-
2
votes1
answer147
viewsA: Detect and change System() error message
As far as I know*, this is not possible in an official way. This message is of the Windows shell/OF for when you provide a command that does not exist on the system. And as Windows is a closed…
-
0
votes1
answer245
viewsA: Problem with fgets in C
Let’s see Will take two shares to solve the problem. A second action to be taken has two alternatives, being at your discretion which one to choose. Particularly, I prefer the second case. First…
-
1
votes2
answers820
viewsA: C program does not correctly read a . txt file with integer numbers
Let’s see... Consider the file with matrix data arranged as follows: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... Or even as follows: 01 02 03 04 05 06 07 08 09 10…
-
1
votes1
answer29
views -
2
votes1
answer86
views -
2
votes1
answer76
viewsA: Why can’t I print out what’s on the list?
Let’s see... Keep in mind the following: A pointer is a variable that stores an address instead of a known type value. If accessed, the saved address may contain another address or a known type…
-
1
votes1
answer68
viewsA: Problem with adjacency matrix
Let’s see... I will list the observed errors one by one, separated by each function. Try to check if you can perceive them so that you learn for your future, OK? cria_matriz(...) 1 - There’s no…
-
0
votes2
answers382
viewsA: Javascript function concatenation in onclick inside php
Let’s see... As a general rule, when inserting HTML elements through PHP, you should always: 1 - Use double escaped quotes for element attributes. To escape the quotes, simply put the backslash…
-
1
votes2
answers2087
viewsA: Problem with perfect number in C
Let’s see... You seem to understand well what a perfect number is. Therefore, I will not dwell on this area. What I see as a problem: Pointer only usage and dynamic memory; Correct execution of the…
-
2
votes2
answers214
viewsA: How to create all possible combinations from a string?
The function product of itertools returns a eternal object. So, to access, you need to go through a loop iteration for, for example. See: import string import itertools abc = string.ascii_lowercase…
-
6
votes1
answer178
viewsA: Are there advantages to using "use Function" for native PHP functions?
Is there an advantage in using the directive use in native functions and global within a namespace. There’s a reduction of processing time which, considering massive executions in load applications,…
-
1
votes1
answer38
viewsA: Problem with search and insertion function
By analyzing your code, you made a mistake on account of references lost and pointers. Explain: When you pass a variable to the function, you will pass a copy of the value and not the variable…
-
1
votes2
answers162
viewsA: How do I set up Git to ignore trivial changes (for example, file timestamp) in a file?
The GIT does not consider different timestamps as file change. What he may consider different is: end of different line in different systems; changed permissions in the archive; any other character…
-
0
votes2
answers113
viewsA: Problem with C++ code
Analyzing In an analysis of the code, it is perceived that you must have been a little confused on how to compare the heights. Look at the excerpt if(array[i] < array[i + 1]). Note his attempt to…
-
2
votes3
answers1008
viewsA: How to put a link inside a String?
Answering the question: Form 1 - using single quotes: text: "Quero colocar um link aqui exemplo <a href='#'> Link </a>"; Form 2 - using exhaust: text: "Quero colocar um link aqui exemplo…
-
1
votes3
answers888
viewsA: How to use relative path in HTML using /
Leandro, The / is the root directory and therefore requires absolute path. That means it is the directory that contains everything! Therefore, to utilize it, you need to provide the whole path -…
-
1
votes3
answers1050
viewsA: Separate Tables in Columns using HTML
To separate the tables in a horizontal X space, you can put a DIV in the middle of the other two DIVs existing. See the example below where I took X by 2.5em: <div style="float:left;">…
-
1
votes1
answer99
viewsA: Creating strings with special characters
Let’s see... There are several types of data abstraction. In C, for example, we have two types that fit the question: float and char (in jail or array). The guy float stores numbers in floating…
-
2
votes1
answer87
viewsA: Symbols in compilation time
Let’s see... Succinctly, simplistically and considering Linux, the C, the GCC, Assembly and the compilation phases: Global and static data not initialized and initialized with 0 are placed in the…
-
0
votes1
answer175
viewsA: How to open . csv file containing "ç" in column label with Python
Let’s see... Your file CSV is most likely in a different coding of UTF-8. Generally this encoding can be Latin-1. If the file was created by you, it is easy to determine by checking the program that…
-
0
votes1
answer59
viewsA: What flag could I use to stop the execution of the ler_disciplinas function?
Well, I decided to fix your program so as to make it executable as a reference. You’ve had plenty of time to figure it out, and maybe you already have. Anyway, I tried to maintain your reasoning…
-
0
votes2
answers58
viewsA: Insert at the end of efficient-list
It is difficult to know exactly if there is any other problem with a fraction of the code. Always provide the code in the most complete way possible since without it we will not be able to test.…
-
1
votes1
answer616
viewsA: .txt with C password?
I know it’s been a while but the question has a clear answer: a text file is nothing more than a sequential of characters. So, does not have any feature that allows doing anything other than storing…
-
3
votes1
answer126
viewsA: .exe has stopped working
Igor, The @Jefferson-quesado commented on checking the argc to prevent 'strange errors' when running the program. It is essential to make such a check if you expect any arguments in the program…
-
1
votes1
answer1359
viewsA: How to redirect site to another folder at public_html level using htaccess
Fortunately, by security, you may not redirect through .htaccess to a level directory higher than your Document root. Consequently, a directory on the same level cannot be accessed. There are, of…
-
1
votes2
answers17879
viewsA: (Python) Sort lists without Sort()
Let’s see... You need: receive values to sort in a list such ordering needs to be done as you receive such values cannot use the method .sort(...) Useful information to solve the problem You must…
-
2
votes2
answers16970
viewsA: How to print A4 pages using CSS?
You can go to any of the alternatives below. It depends on how accurate you need to be. Method 1 What I usually do in personal projects and that do not require much precision, is to define the font…
-
5
votes2
answers109
viewsA: Warn when time is different from time
Further down, follow one alternative answer and shortest. And also more economical in resources. The function takes three arguments, in order: time 1 time 2 value to be compared in milliseconds…
javascriptanswered José 1,549 -
1
votes2
answers4339
viewsA: Difference between start date and end date with Moment js
One can use Date() to solve the problem. Simply create a new object with the desired start time (and finish time) and make a new Date() with the difference. Then access hours, minutes, seconds and…
-
3
votes3
answers3374
viewsA: Convert scientific notation to decimal
Just do the conversion with the function Number() that will serve any exponent within the limits defined in Number(). Behold: var notacao_cientifica = 2.6274846602703e-6; var…
javascriptanswered José 1,549 -
1
votes2
answers736
viewsA: Timekeeper
I believe that the Easytimer.js will suit you. It is simply a stopwatch that can work by decreasing or incrementing. It also works with event triggering. The license is MIT, which is favorable. And…
javascriptanswered José 1,549 -
2
votes2
answers80
viewsA: Parameters for external call
Does it give; just call the function and save the return message. After that, in a new variable, edit the string going on system(); (in this case, will treat it as a variable of type String or a…
-
2
votes2
answers564
viewsA: How to equate a vector coming from a matrix with a matrix in the main function?
Let’s see... The best way to deal with your problem is to use the idea of reference passage of the arguments. And that falls into that black cloud of pointers - but that’s easy after it dominates!…
-
7
votes2
answers7943
viewsA: How to write a full number in C Language?
Let’s see... To your doubt is pertinent to not being able to assign a value to a variable of type "string" - who actually, does not exist in C as a guy. But exists vector of char (characters), which…
-
0
votes1
answer173
viewsA: Logic to make collection of books and movies using external data?
@katerinaptrv It has nothing to do; you have to compare the data yourself. And, to avoid error, you will have to do an al (will not be easy). If it is a site that has users, you can depend on them…
-
1
votes1
answer1452
viewsA: Question: how to fix the Unicodeencorror in Python?
Below is an adapted translation of a response made in Stackoverflow (the original) for a problem similar to yours. You can see the original question here with your answers. Translation: Probably you…
-
1
votes2
answers10294
viewsA: Enable/Disable button according to field validation
Let’s see Of jQuery I understand almost nothing - I prefer my code in Javascript pure (without frameworks). I finally learned a little bit about jQuery trying to solve your problem. And in the end,…
-
4
votes3
answers6399
viewsA: How to zoom in on an image by hovering over it?
There are several ways to solve your problem, even all derived from a single one. You can use ready made solutions - by searching Google, you will find several free and/or paid libraries - or create…
-
2
votes1
answer310
viewsA: Change CSS with session and misaligned Ivs
Let’s see I believe that there are several ways to solve your problem - carrying another sheet of styles - but I will quote just two ways that came to mind. But first, I need to say that I assume…
-
16
votes6
answers57963
viewsA: How to convert UTF-8 characters in PHP
Let’s see.. What colleagues @Marta and @Marcelo said is true. However, sometimes it may be that the web server used is not configured to pass UTF-8 - even if you use the <meta ../> or the…
-
7
votes2
answers3362
viewsA: doubts intercalation of vectors in C
Friend, found some mistakes in its code, some make the algorithm invalid, other errors smaller and one that saves memory in the case of programming for embedded devices (which is probably not your…
-
12
votes4
answers6231
viewsA: How to select a text snippet in a String?
We can use your regular expression <#|#> without problems. Thus, using the method split(), as requested, the following can be done: /* Declarações gerais */ var er = new…