Posts by carlosrafaelgn • 4,769 points
70 posts
-
2
votes1
answer280
viewsA: Draw triangles with Opengl ES 2.0
According to your code, you create two programs exactly the same, one for each object. What is not necessary, and indeed consumes extra resources unnecessarily. It is possible to use the same…
-
2
votes1
answer445
viewsA: How to apply/search for global/local transformations in Opengl
At first glance, there is a particularity in the order in which you are applying two transformations: m_WorldTransform.Translate(m_WorldPosition); m_WorldTransform.Scale(m_WorldScaling); If you move…
-
13
votes3
answers8540
viewsA: Javascript floating point account realization with absolute precision
Although the answer has already been given, I believe it is worth an explanation of why these inaccuracies occur. The IEEE 754 standard (here and here), that defines floating point numbers, such as…
-
5
votes1
answer443
viewsQ: Performance comparison on Android: Canvas vs Opengl ES
Is there any comparative performance table, or some list with rules/guidelines, which tells me from which moment it pays to use Opengl ES on Android, instead of the Canvas + Activity pair configured…
-
1
votes2
answers99
viewsA: How to get the code from a Unicode General Category?
I don’t think there is a ready method within Java to do this automatically. The best solution is manual implementation. Just taking advantage of the topic, to be a future reference for other users,…
-
1
votes2
answers110
viewsA: Sorting does not work
There are a number of factors involved here. First, the mistake is in passing begin+1 and pos+1 for the recursive call of selection_sort. By adding 1 to begin, you effectively lose elements, since…
-
12
votes8
answers5453
viewsA: Why in some if’s situations are considered bad?
I read all the answers, and actually the question has already been answered. However, although the question makes it clear that its interest is from the point of view of object orientation, I…
-
5
votes2
answers2694
viewsA: Consuming C#(dll) functions in a C/C++ project
I already had to do this, and I used a slightly different approach (I tested this procedure in Visual Studio 2012 and 2013). For the test, I created a DLL in C#, called Bibliotecacsharp.dll, with…
-
8
votes1
answer881
viewsQ: Mapping video card memory to access via Intel compatible x86 processor
Thinking of Intel compatible x86 computers, without considering the facilities provided by modern operating systems, anyone who wants to draw/write something on the computer screen can access some…
-
9
votes1
answer138
viewsQ: Switching from 16 to 64 bits while booting an Intel PC compatible
Some time ago I studied to create a draft operating system for Intel PC compatible computers, which actually didn’t need to do much, besides putting the computer in 32-bit mode, handle keyboard…
-
0
votes2
answers580
viewsA: Struct with pointer and allocation
There is an error on the line: video=(Emprestimo*)malloc(rege+20*sizeof(Emprestimo)); If regE contains the amount of records, so a couple of () to make the multiplication give the expected result,…
-
2
votes1
answer5772
viewsA: Using the Excel Application object within Access
The Excel VBA code can be used in the same way from within Access, or Word, or from any other Office application. First, you must import the Excel library into the script written in the other…
-
1
votes1
answer2136
viewsA: How to set photo resolution or how to change to hide the entire Imageview
If it is only to visually shrink the image, you can change the Imageview Scaletype property to ImageView.ScaleType.CENTER_INSIDE, so that Imageview will resize the image proportionally when drawing…
androidanswered carlosrafaelgn 4,769 -
3
votes2
answers3832
viewsA: How to capture microphone audio using HTML5 Audio API?
Here’s a short snippet of code that accomplishes this (successfully tested in Chrome 33 and Firefox 28): var audioContext, microphoneStream; function getUserMedia_Success(mediaStream) {…
-
7
votes3
answers1740
viewsA: How to put caption in an Imageview
There are several ways to accomplish this. Here are two: 1- Drawing all elements (image and footer) manually on canvas, extending the Imageview class and overwriting your onDraw method() public…
-
3
votes1
answer491
viewsA: How to create a Managed Thread in C++ similar to the example in C#
The error is on the line Thread thread = gcnew Thread(gcnew Threadstart(this,Puttosleep)); To create the Managed thread you must pass the method pointer (the &operator is missing), and the…
-
8
votes1
answer1112
viewsQ: Criteria used by Google Play to determine whether an app is designed for tablets
I have an application made for Android, and I took every possible care regarding layout, screen resolutions, dpi etc. Inclusive, everything is properly configured in the manifest. The layout of the…
-
6
votes2
answers9249
viewsA: Controlling extra inputs and outputs in Arduino Uno and Mega 2560 via software
It is possible to use more digital terminals (pins) on the Arduino Uno and Mega 2560 boards, in addition to those indicated on the board, transforming analog inputs (A0, A1, A2...) into digital…
arduinoanswered carlosrafaelgn 4,769 -
7
votes2
answers9249
viewsQ: Controlling extra inputs and outputs in Arduino Uno and Mega 2560 via software
During the development of an Arduino project, I needed more digital terminals (inputs and outputs) in addition to those indicated on the board. You can control, via software, more extra digital…
arduinoasked carlosrafaelgn 4,769 -
5
votes1
answer668
viewsQ: Detecting Volume Keystrokes Pressing on Android
I found a palliative solution, which keeps monitoring the change in the volume of the system itself. When the volume decreases, for example, from 10 to 9, the program resets the volume back to 10…