Alex Munozz

+ Follow
since Nov 23, 2012
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex Munozz


I'm trying to make a simple API that takes a CSV file (users.csv) and turns it into a JSON file (users.json) using the endpoint /convert. Additionally, any phone number that is missing in the users.csv file should be filled in with the string, "missing data" in the users.json file.

I'm using TypeScript, express and csvtofile library. I can run the express server. The problem is I don't know what type must be the parameter of function convertir.  

This is the code:

After running the script I get the following error:

src/index.ts:21:33 - error TS2345: Argument of type '{ nombre: string; apellido1: string; telefono: string; }' is not assignable to parameter of type '(value: any, index: number, array: any[]) => unknown'.
 Type '{ nombre: string; apellido1: string; telefono: string; }' provides no match for the signature '(value: any, index: number, array: any[]): unknown'.

21        let data =;
src/index.ts:27:20 - error TS7006: Parameter 'item' implicitly has an 'any' type.

27 function convertir(item) {

   at createTSError (C:\Full_Stack_JavaScript\NodeJS\express\node_modules\ts-node\src\index.ts:859:12)
   at reportTSError (C:\Full_Stack_JavaScript\NodeJS\express\node_modules\ts-node\src\index.ts:863:19)
   at getOutput (C:\Full_Stack_JavaScript\NodeJS\express\node_modules\ts-node\src\index.ts:1077:36)
   at Object.compile (C:\Full_Stack_JavaScript\NodeJS\express\node_modules\ts-node\src\index.ts:1433:41)
   at Module.m._compile (C:\Full_Stack_JavaScript\NodeJS\express\node_modules\ts-node\src\index.ts:1617:30)
   at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
   at Object.require.extensions.<computed> [as .ts] (C:\Full_Stack_JavaScript\NodeJS\express\node_modules\ts-node\src\index.ts:1621:12)
   at Module.load (node:internal/modules/cjs/loader:1037:32)
   at Function.Module._load (node:internal/modules/cjs/loader:878:12)
   at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
 diagnosticCodes: [ 2345, 7006 ]

I tried to define a parameter of type string but errors are not fixed. What I tried is to type the following:

I also tried to define resultado as Response but errors are not fixed.

What kind of parameter must I use in function convertir?


Bear Bibeault wrote:First step is to get accustomed to using the CSS inspector in Chrome DevTools (or other debugger of your choice). It can show you what styles are being applied to each element, and from where, which should help you determine why your class name change isn't having the effect you expect upon the element(s).

I did it. I used the console and typed

The result was what I expected:

HTMLCollection []

But when I typed

The result was undefined. I don't know why appeared me it.

I have a menu in bootstrap and I want to change tab colors every time a tab is clicked. The code for changing colors is javascript. I know I can do it in css but I am learning javascript.

The code I have done:

When I run the code after clicking tabs the color is not changed. It is the default bootstrap color. I know it is possible to change it because I have another javascript code that is not so efficient but it works.

I know navega_link HTMLCollection is undefined and I don't understand why. How can I change the color tabs?


I can`t build an Android project because I have a Gradle synchronization error. That is:

Gradle sync failed: The newly created daemon process has a different context than expected.

It won't be possible to reconnect to this daemon. Context mismatch:

Java home is different.

I think I have this error due to the two versions of Java I have installed.

How can I fix this error?
4 years ago
Thanks for answering. I fixed the problem. I had the idea that the first parameter of putstring mehtod is a variable and it's a xml label so I changed Config.CLAVE_NOMBRE to nombre.
6 years ago

I am trying to save an email typed by a user. I get it correctly but when I want to save it on a Shared Preference I can't do it. The value is not saved.

The class Config:

The value of cr is correct but the value of CLAVE_NOMBRE is blank. There aren't errors.
How can I save the cr value on CLAVE_NOMBRE correctly?

6 years ago
I know what happened. The parameters given in the url didn't match with data in the database and that's why any value was returned.
7 years ago

I am trying to retrieve a row in MySQL using PDO but the result is empty. Here is the code:

Parameters ecorreo and pwd are passed by GET.

The problem is that the result is empty but in the database I have one row that matches with correo and contrasenya and it is not saved in the result variable. There aren't errors so I don't know how to pass the parameters correctly in order to run the query correctly.
What's wrong?

7 years ago

I would like to know why I watch the error cannot resolve symbol @drawable if I have an image in several resolutions and saved them in the following subfolders:

drawable-hdpi, drawable-mdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi

These subfolders are in drawable folder.

Here is the xml file:

usr_imagen is a png file that is stored in several resolution in the subfolders mentioned above. The error is fixed if I copy one image of the subfolders in the drawable folder.
But if only one file is in the drawable folder, all the resolutions of screens are not covered and the image won't be displayed right.

How can I display the image for all resolutions correctly?

7 years ago
Thanks for answering, but I don' want a pop up menu. The idea is to create three icons below the screen and when one of them is touched show the options.
7 years ago

I am trying to create a menu with three options but I can't watch it on the screen. I haven't errors, I only watch the bar on top of the screen with the title of the activivty.

Here is the code:



Part of AndroidManifest.xml

How can I watch the menu?

7 years ago
Ok. But how can I save the Uri of the image selected?
10 years ago
The image I want to store is one selected by the user from the gallery. The user click on the ImageView and then he can choose insert an image from the gallery or from the camera. He must select from the gallery because it's the only option I have coded now. When the user has selected the image it is showed in an ImageView.

The user click on the save button and the title, the description and the image are saved in the database. But the image is not stored in the database, it's its path in a String format. But I don't know if it's possible to do something like this. I think so. The problem is that every time the user select an image it's a different one and I don't know how to store the path in the database.
10 years ago
The only value that is not displayed correctly is the image and I know it because I don't watch anything.
When I insert one record in the database and I want to list the whole, I can watch all data except the image. Which value has rutaimg? Blank. So I know that the path for the image is not correct.

I think where is the error but I don't know how to fix it. It's in the value of the image's path when I insert a record in the database.

When I insert the image in an ImageView I want to obtain the path of this image and I do it as following:

Here is the xml file:

The ImageView where I insert the image is the second one, that has imgFoto id.
I insert the image selecting it from the gallery and what I want to do is to save the image's path in a String and when I list all records of the database I become the String path into Uri.

When I retrieve all the records in the database I can watch that all image values are the same.

How can I save the path of a selected image correctly?


10 years ago
Yes. But I know all the values in the database are right, the problem is that I don't know how to retrieve the image. The idea is to insert the title, the description and the image in the database. But the image is not stored in the database because it's very heavy for the memory, so I save the path of the image. The image is obtained from the gallery only, not from camera.
10 years ago