All Questions

2
answers

JAX-RS Resource as Session Bean or CDI Managed Bean?

Today I ran into an interesting problem when trying to inject an EJB into a JAX-RS resource (in GlassFish 4.1, running the preinstalled version of Jersey). @Stateless public class MeuEJB implements MinhaInterface { // código } @Path("camin...
asked on 26.09.2014 / 23:09
1
answer

What are the practical differences in C and C ++ code portability?

I've been reading some open-source C code lately and I've noticed that a lot of them have become quite complex with a lot of #ifdef to make the code as portable as possible between various platforms and * NIX. Some even support different...
asked on 09.10.2014 / 01:40
2
answers

Controlling Serial Port using Web Application

I need to communicate my system with the serial port of the Client computer, the detail is that with PHP I can use fopen , but I do not want to access the server's serial port, but the client's port. I thought about using a plugin, ei...
asked on 14.11.2014 / 12:05
1
answer

How to make an image "loose" inside a div

I need to leave a "loose" image within div on my mobile site. The div has fixed dimensions but the image is much larger, so it would have to be something similar to iframe , however, without scrolling and the user can move th...
asked on 20.10.2014 / 18:51
1
answer

What is the applicability of the 8 queens problem?

In college the linear programming teacher introduced the Problem of the 8 Queens. Basically, as I understand it, this problem consists of filling the board (could be simulated with an array) with the 8 queens in a way that the number of attack...
asked on 22.03.2018 / 18:26
3
answers

Calculate page load time

I'd like to measure the loading time of a page using JavaScript. What do you mean? When someone accesses my page I want to start measuring the loading time. If this load time exceeds, for example, 500 ms, I want to display a link suggestin...
asked on 04.11.2014 / 22:46
1
answer

"Hello, world" with Wish TCL / TK, how to change text in a widget?

I'm having trouble understanding how the wish program works, to make a good old "Hello, World". For those who do not know what wish is, it is a TCL interpreter ready to make graphical interfaces in TK. You program in TCL, create...
asked on 23.06.2018 / 02:41
1
answer

C # application with connection error with Firebird on Windows 7 32/64 bits with 2GB of RAM

Hello! I am developing a C # application, in which I have already installed it on several machines for testing with windows xp, 7 and 8 and in all of them the application worked correctly, however on a specific machine it just does not run and i...
asked on 09.01.2015 / 13:56
1
answer

Generate new migrations based on all models

I need to create a migrations with all the created models (I just deleted the first migration and I'm not able to create the authentication database).     
asked on 28.09.2018 / 04:17
1
answer

Performance differences between structs and classes

I know the difference of structs and classes is that structs has its public members by default, and that structs belong to C (but nothing prevents from using in C ++). In practice when creating an object for classes or a...
asked on 20.12.2017 / 12:09