All Questions

1
answer

The if conditional is not obeying the rules

I have a problem here in my gallery, when I enter the menu and choose which image category I'm going to choose. For example, if you do not want to be a member of the group, you should go to my controller and pick up the images where a field name...
asked on 11.10.2016 / 19:08
2
answers

Shellscript can not find directory

I'm starting with shellscript, I have to do the checksum of some files, so I decided to automate things with a bash script. I made two scripts, one that uses a ls recursive in the directory set by me and ignores folders by taking only the * ('...
asked on 01.11.2016 / 22:01
1
answer

How to "limit" a JComboBox according to the selected item?

I have a JComboBox , and I limit the size of it, with the following code: jcb.setPreferredSize(new Dimension(100, 21)); But I wonder if there is a way that, after I choose an option, the content is completely displayed. What happens i...
asked on 30.10.2016 / 00:19
1
answer

Doubt Rails Relationship

I'm learning Rails yet, and I'm doubtful if I'm doing it right. I have a Animal Table and a Reproduction table, each animal can have one or more reproductions and each two Animals (Father and Mother) each reproduction can generate one o...
asked on 03.07.2016 / 20:30
3
answers

How to give a MySQL field line break in an HTML page

I need to save a value with a line break in the table For example, instead of saving: 0 anos, 3 dias Save: 0 Anos 3 Dias I tried the following process: INSERT INTO tabela (tempo) VALUES ('0 Anos\n3 Dias'); He even broke the cod...
asked on 10.04.2015 / 00:18
1
answer

Difference in thread execution in Java

See the execution of two similar programs in Java. One inherits from Thread and another implements the interface Runnable : Program 1: public class PingPong extends Thread{ private String msg; private int delay; PingPong(Strin...
asked on 29.05.2016 / 15:41
2
answers

Is it possible to zoom the browser with code?

Is there any way to change the browser zoom with JavaScript ? When loading script you would like to change the browser zoom to 100%, it can be using any (Angular, jQuery) framework. I would be very grateful if you could help....
asked on 10.11.2016 / 17:48
3
answers

Pass SQL result to JSON

Hello, I want to pass the result from a select to json, but I can not see why I can not see it. So could anyone tell me why this code does not print anything? include_once 'conexao.php'; $query = "SELECT client_id, name, email FROM clie...
asked on 03.11.2016 / 23:57
2
answers

How to get all parent elements except some

I'm in a situation where I need to get all the "parent" elements of a div, but I can not get all because it would not solve my problem. I wonder if I can put a limit on getting these elements. With an example it becomes clearer. Consider the s...
asked on 23.06.2016 / 22:07
3
answers

How to format the name of an item in a listbox?

I'm having a project where I have to upload files over a network to a server. WhenIclickthe"add" button it opens a box for the person to select the files they want to send and adds them to a list that stores objects of type "File". So far...
asked on 19.05.2016 / 00:45