Posts by Caiuby Freitas • 473 points
31 posts
-
0
votes2
answers359
viewsA: Check interval between two dates
I believe the error lies in the way you calculate the difference between dates. A simpler approach is the following: var date1 = new Date(2018, 01, 01); var date2 = new Date(2019, 02, 25); var umDia…
javascriptanswered Caiuby Freitas 473 -
0
votes2
answers168
viewsA: PROBLEM WITH AJAX JSON
From what I understand, you do not take anything as a parameter for the php routine, but from it you receive information. The first suggestion, therefore, is to ensure that the "data" is returned by…
-
0
votes3
answers73
viewsA: Do you have any "parse" commands for jquery?
The function below is compact and solves this problem: function floatvalue($val){ $val = str_replace(",",".",$val); $val = preg_replace('/\.(?=.*\.)/', '', $val); return floatval($val); } $string =…
-
0
votes1
answer31
viewsA: Php Json Enconde Error
First, the@ sign in front of mysql_num_row means that execution errors will be deleted and therefore you will not be informed if they occur. I suggest you remove this symbol before anything else.…
-
3
votes4
answers3636
viewsA: Input date to disable the next 7 days from the current date
Expensive, my friend. There’s a way to solve this using only Html5 and javascript, so you don’t need to know about other alternatives yet. Come on! Consider the input below, to which I just added…
-
0
votes1
answer116
viewsA: At the click of the button, content taking long to load
Gabriel Heming noted very well. I found that the positioning of the line "$(Document). ready(Function () {" was incorrect. All code must be inserted within this structure. I ran a test with Jquery…
-
0
votes2
answers792
viewsA: Problem in Bootstrap Directory
To use the files locally instead of pointing to CDN, you must first save them to a folder below the root directory of your site. In the example below I created a folder called "js" and saved there…
-
7
votes4
answers236
viewsA: Comparison syntax referring to the same variable
The syntax adopted in the logical comparisons in the programming languages evolved from the fusion of different areas of knowledge, however, two are predominant as to the influence they had: 1)…
-
1
votes2
answers1043
viewsA: How to adjust an HTML grid
From what I understand my suggestion involves only HTML and CSS. HTML: <p class="paragrafo"> <img class="minha-image" src="" width="100" height="100"/> Nunc pulvinar lacus id purus…
-
1
votes1
answer47
viewsA: Subquery returning null value
You must specify which fields of the resultset are. Try with the modification below: SELECT i.mercadoria, custo (select valornota from nota as u inner join itemnota as j on u.id_nfcapa = j.id_nfcapa…
-
0
votes2
answers1533
viewsA: HTML image size in a table
The solution suggested by Rafael clarifies his doubt, however, it defines the same size for all images on the page, which is not usually an appropriate approach. To apply formatting only on this…
htmlanswered Caiuby Freitas 473 -
0
votes8
answers3054
viewsA: When to use Waterfall and when to use Scrum?
Dear colleague, it is very difficult to answer your question without making any judgement or entering into complex arguments. It is a decision that may depend on many factors. However, so that it…
-
1
votes3
answers132
viewsA: Is there a "description" language of UML?
Visual Studio Ultimate, Enterprise Architect, Staruml, Argouml, Umodel even Msvisio has functionality to convert code into UML. Generally there are limitations, both of these and other options,…
-
3
votes1
answer1242
viewsA: Calling function within another
The problem you encountered is due to the scope of the function. You will only be able to access the function2 after accessing the name, because the first one is nested in the second one. For this…
javascriptanswered Caiuby Freitas 473 -
-1
votes2
answers225
viewsA: Select com group by
I suggest you try the following: select sum(value) from nome_da_tabela group by name, key_id The 0-sum records will not be in the resultset, but before displaying the data in tabular format, fill…
-
1
votes2
answers303
viewsA: Change background by clicking the checkbox
There are several ways to do this. Here is an alternative: <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS…
javascriptanswered Caiuby Freitas 473 -
0
votes1
answer1031
viewsA: Load pages without refresh by clicking on the menu option
I think you don’t need so much, friend. Via javascript you get what you need quickly and without the need for plugins. The solution involves encapsulating each page in a DIV and controlling the…
-
0
votes1
answer38
viewsA: I will create a select and would like it to update the amount of records
The best way is to create the fields dynamically through javascript. When the user selects the number of products that will be registered, you trigger the event that will create the fields:…
-
1
votes2
answers63
viewsA: Optimization of database model
The structure you arrived at corresponds to the third normal form, in which duplicate information is not allowed in the database. Creating and maintaining good ratings is the next step in terms of…
-
1
votes2
answers134
viewsA: Can only do this with CSS3
There is. It takes a little bit of work: html <div class="gradient triangle"></div> css .gradient { /* Our base */ width:200px; height:200px; background: linear-gradient(to bottom,…
cssanswered Caiuby Freitas 473 -
0
votes4
answers1081
viewsA: Get the contents of the last line of a Java file
In Java version 7 the Files.readAllLines(Path p, Charset Cs) method requires the final attribute to specify the character that will serve as a reference for the line break. I suggest you add:…
-
0
votes2
answers807
viewsA: How to model n-to-n relationship correctly? Women also have friendship with men and not only men have friendship with women
An n-to-n relation is always modeled with an auxiliary table whose primary key is the set of the two foreign keys or a single key. Technically, your solution is correct. First, the model in question…
-
0
votes7
answers2227
viewsA: Agile methodologies - a single programmer
Dear Leonardo, the SCRUM is will be more beneficial if used by teams of 3 to 9 participants. This detail is important because in other configurations, smaller or larger, there are losses regarding…
-
0
votes2
answers178
viewsA: How to create events in a for repeat structure?
It is possible yes! Considering the code that already has ready I would change only one thing: I would add new before associating the event. btn[i].Click += new btnNum_Click;…
-
2
votes2
answers1320
viewsA: What are the differences between Kanban and Scrum?
Each agile methodology brings a peculiar set of conditions, advantages and challenges to its adoption in a corporate environment. Before choosing I suggest that you carefully assess the pros and…
-
1
votes2
answers891
viewsA: How do I customize a Navbar only when it is "collapsed" with bootstrap 4?
To do this you must make your site responsive by introducing the use of @media to configure the appearance of the site according to the type of device used when accessing it. Basically, you can…
-
1
votes1
answer68
viewsA: Dynamic Div - Tracking Page Scroll Bar
I found an answer to a similar question right here in Stackoverflow. The dicussion on the subject can be found at:…
-
1
votes1
answer58
viewsA: How to take the url of different forms and validate via javascript
Well, without the full code I can only make assumptions, but at first I think you might be the problem in the if test (result.Success). How do you validate the fields via code? For the result to be…
-
0
votes2
answers75
viewsA: Javascript for Loop - Incomplete and duplicated content
While executing your code error occurs: { "message": "Uncaught Typeerror: Cannot read Property 'getelementsbytagname' of Undefined", "filename": "https://stacksnippets.net/js", "lineno": 26,…
-
-1
votes1
answer1083
viewsA: How to make a pagination with jquery and ajax?
The fact that the elements are created dynamically is no problem. What you need is a static structure on the page that will serve as a container for these elements. In the solution below I used…
-
3
votes4
answers351
viewsA: What is gamification in the context of software?
Gamefication (or gamefication) is the incorporation of typical game elements into applications unrelated to this context, with the aim of increasing empathy with the target audience. A practical…