All Questions

1
answer

How to access the hardware in Linux in C?

I know of the existence of the Microsoft Win32 API, which allows the programmer to manipulate low-level resources such as serial ports, memories, CPU, GPU, etc. However, I work with Linux environments, and would like to know how to access the ha...
asked on 08.01.2016 / 17:06
2
answers

How do I generate random numbers and without repeating them in a time interval?

I'm creating a 'game' in which the user needs to choose a range, and in this interval, he chooses how many random numbers he wants to generate. However, in random numbers generated, there can be no repetitions, for example: Range 1 to 10, show...
asked on 29.11.2015 / 19:38
1
answer

How to leave a grayscale image in cross-browser css?

I'm trying like this: img { filter: gray; /* IE6-9 */ filter: grayscale(1); /* Microsoft Edge and Firefox 35+ */ -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */ } <img src="https://www....
asked on 11.01.2016 / 20:41
2
answers

Doubt in a Java exercise [closed]

I was looking for some Java exercises to train and learn some algorithms when I came across the site exercism.io and I decided to do their exercises in Java. So far so good, I downloaded their app using chocolately and installed the gradle...
asked on 17.01.2016 / 23:08
1
answer

Improve rating script (star rating)

Can you improve this code? <?php if ($calculation >= 5) { for ($i=1;$i<=5;$i++) { echo '<img src="'.$linkSite.'/img/star1_16x16.png"> ';...
asked on 20.01.2016 / 20:08
1
answer

Convert a String ArrayList to a Json

I need to convert a ArrayList of String to a JSON. I have a method where I get a list of apps installed on the mobile device. This method returns the data in a String ArrayList. I was able to generate a JSON using JSONArra...
asked on 26.01.2016 / 21:22
3
answers

Database with php

I am trying to query the database with the following script: <?php require("conexao.php"); $exibir = mysql_query("SELECT * FROM produtos"); while ($r = mysql_fetch_array($exibir)){ $id = $r['id'];...
asked on 06.01.2016 / 17:06
3
answers

Aligning text right in a list

I'm trying to make a change to a code I have and what seemed relatively easy to me became a difficulty, what I have is this: <div class="top-bar"> <div class="container"> <div class="row"> <div class="col-md-6"...
asked on 19.01.2016 / 20:46
2
answers

Error inserting data into the database

I'm following php classes, and in the video the guy uses the mysql command, but I know he's old and insecure and I used mysqli , but the code does not display an error, but does not write data to my table, it follows the page...
asked on 16.12.2015 / 16:44
2
answers

What is JPA's mappedBy for?

Example: @OneToMany(mappedBy = "chemical", fetch = FetchType.LAZY) @LazyCollection(LazyCollectionOption.EXTRA) @JsonIgnore private List<SimulationChemicals> simulationChemicals; Why is the use of mappedBy mandatory or important? I...
asked on 08.01.2016 / 18:23