Posts by leandroungari • 840 points
31 posts
-
0
votes2
answers60
viewsA: Do I need to omit the word "window" when calling a function of the global object?
The use of obvious form tends to be better understood, however it must be revealed what was defined in team, if indeed something was defined. If not, or even in general situations, it is very…
-
1
votes1
answer525
viewsA: PHP session with redirect time
After the user has logged in, you can enter the following code snippet: <?php session_start(); session_cache_expire(1800); //o tempo é medido em segundos ?> This way, every page that needs the…
-
-1
votes1
answer497
viewsA: Store content / variables in Model - PHP MVC
I recommend that you use these variables in the controllers because the use of models is only necessary when using the database, the ideal is that this information was in the database, but as yet,…
-
1
votes1
answer495
viewsA: Attack svg image with css and include php
For you to import the image svg and have access to their respective tags you can use the following code: <?php echo file_get_contents("kiwi.svg"); ?> So you can reference the elements SVG by…
-
1
votes3
answers163
viewsA: PHP - How to make sure that if a POST is not entered, it does not appear "Notice: Undefined index"
there are ways to avoid the appearance of this error message, but, I do not know for sure the focus of its application that is developing, a good practice is the validation of data entry, which can…
phpanswered leandroungari 840 -
2
votes1
answer290
viewsA: Error installing script on localhost
I’ve had this problem, probably you’re using one of those programs that comes from PHP, Apache, Mysql together. How you are manipulating URL in your file type apache you must enable the rewrite…
-
4
votes1
answer2398
viewsA: Run PHP without updating the entire page
Put a id in your image with the value like. In an extension file .js, goes that code: $("#like").click(function(){ //evento de click sobre a imagem var id = $(this).attr('id'); //aqui você pegao…
-
0
votes3
answers369
viewsA: Query output on another page
You performed a query in an archive php, create an array and place the contents you want to display on the page, for example: $data['titulo'] = "Aqui vai o título da página"; Place the contents you…
-
1
votes6
answers2755
viewsA: Is it bad practice to use only static methods in a class?
The use of static attributes and methods cannot escape its definition in object orientation, otherwise a bad practice will be configured, ie, a way to facilitate a given implementation or a branch…
-
2
votes2
answers763
viewsQ: Recover the value of an attribute of a generic object in Java
I’m making a system where I read Java objects of different types of XML files. So I don’t have a single object type and consequently I don’t know its attributes or methods. I would like to perform a…
-
1
votes1
answer7504
viewsA: How to display a photo from the database?
From what I can see in your code, you’re doing: $avatar=$lista[ 'avatar']; <img>$avatar</img> How you are storing an image, the contents of the variable $avatar is a url, so you should…
-
1
votes2
answers884
viewsA: How to stretch an element to the end of the screen?
In any of the solutions you are having overflow of the div on the page, ideally you calculate the height of it, this way: height: calc (100% - a); Where a is the distance of the object to the top of…
-
-1
votes2
answers161
viewsA: Alternative URL in PHP
Take a look at this following material: Creating a PHP 5 mini-framework with MVC Credits to Matheus Moura. In this video is explained the access to URL through the method GET, in addition to its…
-
1
votes1
answer63
viewsA: I would like to make my URL friendly on . htaccess
for what you want apache settings in your .htaccess are the smallest difficulties you will have, in recommend the development of a small MVC system. For this I recommend the following link: Creating…
-
0
votes3
answers2716
viewsA: How to add attributes to an element that was created with Javascript?
It’s because your object is being created dynamically, use: $(document). on (function (){ ... aqui o que você quer fazer, no caso o addClass }
-
2
votes3
answers2963
viewsA: How to measure the complexity of an algorithm?
The complexity of algorithms can be measured in different ways, from intuitively to easy algorithms, for example, with iteration loops, but for algorithms involving recursion, the most recommended…
canswered leandroungari 840 -
3
votes2
answers238
viewsQ: Generalization of parameters in Java
I am implementing a B tree for a database job in Java, so that it stores any kind of objects, be generic, so I am treating as if it were Object, but in some parts of precise code methods such as…
-
2
votes2
answers1047
viewsQ: How to force an html document to always be opened by the browser?
I’m developing a java application for a college job and have a help section for the user where I open a page html in the browser, or at least should open in this. The issue is that if files with…
-
2
votes1
answer1313
viewsQ: Recover the value of a Jtextfield via an Actionlistener
I’m a little new to java and I was trying to understand the listeners. So excuse me if the mistake is simple. I have a program that creates a simple graphical interface and I want to get the value…
-
1
votes1
answer1827
viewsQ: How to create a set of tables in the database via PHP
I’m having problems while creating the database automatically via PHP. I am developing a college MVC project and wanted to import the sql file and through a query create the tables. In the previous…
-
2
votes3
answers226
viewsQ: Link structure problems in MVC
I am working on an MVC project and I am having problems redirecting pages. The project is based on controllers and actions, that I have the proper functions that call these files and call their…
-
4
votes3
answers1909
viewsQ: Error creating a Mysqli database via PHP on Wampserver
I’m having trouble creating the database, on the net I found little content on, I only find how to build database by phpMyAdmin, but it is via script that I want to create. I have the following…
-
0
votes1
answer576
viewsQ: Dynamic site with multiple pages of results
I am doing a project of a dynamic website in college and wanted to know how to assemble those result pages with first, second pages and so on without creating new files .php . For example: I have a…
-
10
votes4
answers24249
viewsQ: What is the right way to connect to the Mysqli database
I have a question that has brought me several incompatibilities. With the evolution of PHP and Mysql, more recent versions have emerged, this way Mysqli. That’s where my problem lies, I would like…
-
3
votes3
answers1211
viewsQ: How to modify form fields if user input is invalid compared to regular expression with Jquery
Guys, I have the following form: <!DOCTYPE html> <html> <body> <form action="enviar.php" method="post" accept-charset="utf-8"> <label>Nome<br> <input…
-
2
votes3
answers8151
viewsA: How to read a string using input in Java?
Look I recommend using the java.util library to use a Scanner. Follow the code below: import java.util.Scanner; class Leitura{ public static void main(String[] args){ Scanner s = new…
javaanswered leandroungari 840 -
2
votes2
answers725
viewsQ: Organization of projects in packages
I am doing a study on Java and would like to learn without using those Ides full of resources that do everything. After several attempts to learn how to use packages by creating them manually, one…
-
0
votes2
answers1647
viewsA: How to position html elements with css
Without using a framework and without numerically fixing the content, it would be interesting to limit your form content within a div, and position them with a certain padding, using floating…
-
4
votes3
answers540
viewsQ: Link resources, such as CSS, within the structure of a website
I am a beginner and I am facing problems with linking scripts, CSS and images. I have the following structure in folders of my site, just an example: - Pasta Raiz --cadastro --- cadastro.html…
-
6
votes1
answer50551
viewsQ: Capturing an element’s id with javascript click
In the Document there are three <div>, all with the event onclick calling a function. By clicking on any of the three, I would like to capture the id of the <div> clicked. How can I…
-
5
votes5
answers1182
viewsQ: HTML element does not become visible
I have the following HTML: <form action="cadastro/cadastrando.php" method="post"> <div class="elemf"> <label>Nome</label> <input id="nome" type="text" name="nome"…