Sobes.tech

ERP Consultant

// wijzigt de huidige staat -> setPhotos([...photos, photo]); // ziet geen veranderingen // wijzigt de variabele // geen sleutel

Junior
333

Hoe is de Git-workflow opgebouwd in het project? Welke takken worden gebruikt?

Junior
328

Wat te doen als een map geen leesrechten heeft tijdens een recursieve verkenning?

Junior
288

Wat is het verschil tussen aandelen en obligaties?

Junior
230

package com.example.photogallery.controller; import com.example.photogallery.model.Photo; import com.example.photogallery.service.PhotoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import java.util.ArrayList; import java.util.List; @RestController @RequestMapping("/api/photos") public class PhotoController { @Autowired private PhotoService photoService; private List<Photo> photos = new ArrayList<>(); private static Integer totalCount = 0; @GetMapping public List<Photo> getAllPhotos() { return photos; } @PostMapping("/upload") public String uploadPhoto(@RequestParam("file") MultipartFile file) { try { Photo photo = new Photo(); photo.setFileName(file.getOriginalFilename()); photo.setFileSize(file.getSize()); photo.setContentType(file.getContentType()); photos.add(photo); totalCount++; photoService.savePhoto(photo); return "Foto geüploaded"; } catch (Exception e) { return "Fehler beim Hochladen des Fotos"; } } @GetMapping("/count") public Integer getCount() { return totalCount; } @DeleteMapping("/{id}") public void deletePhoto(@PathVariable Long id) { for (Photo photo : photos) { if (photo.getId().equals(id)) { photos.remove(photo); totalCount--; photoService.deletePhoto(id); break; } } } @GetMapping("/search") public List<Photo> searchPhotos(@RequestParam(required = false) String query) { if (query.isEmpty()) { return photos; } List<Photo> results = new ArrayList<>(); for (int i = 0; i < photos.size(); i++) { if (photos.get(i).getFileName().contains(query)) { results.add(photos.get(i)); } } return results; } }

Junior
218

Vertel over je ervaring en rol in de laatste projecten, de technologiestack

Junior
212

Wat gebeurt er als twee services tegelijkertijd proberen een record in de database te schrijven?

Junior
205

Een van de services in de verzoekenketen reageert niet meer. Hoe gaat u het probleem stapsgewijs oplossen?

Junior
196

Wat is een future als financieel instrument?

Junior
194

Schrijf een functie FindFilesByExtension die recursief bestanden zoekt in een directory en een segment absolute paden naar bestanden retourneert ([]string) die voldoen aan de voorwaarden: bestandsextensie == targetExtension (zonder hoofdlettergevoeligheid) bestandsgrootte > minSizeKB De functie moet alle geneste subdirectory's doorlopen. Voorbeeld van directorystructuur: /projects/ ├── doc.pdf (2048 KB) ├── report.docx (512 KB) ├── src/ │ ├── Main.go (2 KB) │ ├── Utils.go (5 KB) └── images/ └── photo.jpg (3072 KB) Voorbeelden van controles: files1, _ := FindFilesByExtension("/projects", "pdf", 1000) // files1 == []string{"/projects/doc.pdf"} files2, _ := FindFilesByExtension("/projects", "go", 3) // files2 == []string{"/projects/src/Utils.go"} files3, _ := FindFilesByExtension("/projects", "jpg", 2000) // files3 == []string{"/projects/images/photo.jpg"}

Junior
193

Welke route gebruiken we als we tijdens een recursieve doorloop een directory vinden?

Junior
184

Hoe schrijf je correct afkortingen in de naamgevingsnotatie in Go?

Junior
183

Welke antipatterns ken je in de microservices-architectuur?

Junior
170