Posts by DJM_JM • 315 points
10 posts
-
4
votes2
answers77
viewsQ: Using integers as Java Locks
I have the following code snippet: class classe{ public static void main(String[] args){ Integer lock = 0; Thread t1 = new Thread(){ public void run(){ // instruções thread sem sincronia…
-
1
votes1
answer167
viewsQ: Parallelizing n queens problem with Openmp
I’m having trouble parallelizing my C code with Openmp and getting good performance on the n queens problem. The results are always considerably slower with parallelization enabled and I do not know…
-
0
votes0
answers235
viewsQ: How to do an exclusive specialization in sql?
Well, I finished the entity relationship diagram of the database I’m creating and in it there is a service entity, which has two exclusionary specializations (one or the other, can’t be both),…
-
0
votes2
answers360
viewsA: Why are primitive types with floating points divided or multiplied by certain multiples of 10 displayed in scientific notation?
It must be a legacy of the c++ language project, where an integer has even more memory space than a float.
-
6
votes3
answers14615
viewsQ: How to remove a Foreign key in mysql?
I need to edit a table, but I cannot remove it. I need to remove Foreign key, however, all commands I tried did not work. I’m currently trying to alter table tabela drop foreign key nomefk And the…
-
0
votes2
answers46
viewsQ: How to create a clojure arrayList
How to create a clojure List array and add elements? (the one in java) My problem is this: I need to read a file and go adding substrings of that file (bounded by space and line break " n"), as…
-
1
votes1
answer103
viewsQ: Greater precision in two-point distance problem
I’m trying to solve a minimal tree-generating problem, where I try to find the minimum way to connect all of us. The nodes represent objects with position defined by x, y (integer numbers) in space,…
-
5
votes2
answers818
viewsQ: Pixel distribution algorithm
Well, lately I’ve been thinking about algorithms to create random maps/ images and I came up with a question that I’m going to post here for you to clarify. Suppose I have green and yellow pixels.…
-
1
votes3
answers257
viewsQ: Program executable problem created in c
Well, I am currently facing a somewhat strange problem here with my program in c. I am creating a program in c that le integers of an external text file (using the standard library and fscanf…
-
3
votes1
answer3048
viewsQ: Rotate PPM image by 90 degrees in C
Well, I’m trying to spin 90° an image in PPM Nxm format in C language and I’m not finding a way to do that. The program reads the image of an external file and ends up creating another, both in PPM…