Categories
Mastering Development

How to prohibit a parameter from being filled with Flutter?

So I have this constructor and as you can I have all of the parameters set to be required except for the id. This isn’t a big deal but I was wondering if there was annotation that would make the id parameter not available to be filled in. So I don’t mess something up in […]

Categories
Mastering Development

can’t enable imap via access token

I’m trying to access gmail imap via access token from login. I pass the token to backend but it shows username and password are not accepted Front End using react: const {name,email,message,accessToken} = this.state; const form = await Axios.post(“/api/form”,{ name, email, message, accessToken }); backend using nodejs: var imap = new Imap({ user: ‘SMTH@gmail.com’, host: […]

Categories
Mastering Development

Rendering DB entry in Expo

This is my first go at a expo/react native app, and i have struck trouble, I am able to console.log my firestore db entries fine, but i cant seem to work out how to render them to a view, and to make location cards like the attached image, 1 Can anyone help? import React, { […]

Categories
Mastering Development

allowsMultipleSelection in ImagePicker is not working in Expo ( React Native )

I am trying to pick multiple images in one time but I am not able to select them. I am using Expo ImagePicker and I am passing allowsMultipleSelection:true props as true but did not selecting multiple photos . Could someone please help me how to achieve my goal . Thanks Code let result = await […]

Categories
Mastering Development

How do you split video files into smaller chunks in the browser?

I am following the documentation for api.video and they say you can “upload videos over 128MB, it just needs to be split into separate chunks (under 128 MB), and each chunk uploaded separately.” This is what I have so far – it doesn’t split the videoFile (from a file type input), so it only works […]

Categories
Mastering Development

Can I use different pictures in Owl Carousel 2 depending on screen size?

I have Owl Carousel 2.3.4 in my project and Pug as JS templating engine. I need to show different images in desktop and mobile versions. URLs for images are added dynamically from database (3 images in promoSliderImgs and 3 urls in promoSliderMobile). For now, I’ve made two carousels which are shown according to screen size […]

Categories
Mastering Development

Pass a class to a jQuery function?

Is there a way to create a function and re use it by passing a class to the trigger / click? I have a block of code click event and I would rather reuse the block of code based on a class rather than rewrite numerous blocks of code for each instance. the classes are […]

Categories
Mastering Development

how to use sum and join the 3 tables using laravel6?

I have 3 tables, salaries table salaries(id, name) and pointages table pointages(id, datep, salarie_id, sold) and avances table avances(id, datea, montantA, salarie_id). table salaries Id name 1 kamal 2 imad pointages table id datep Salarie_id sold 1 11/03/2020 1 120 2 05/03/2020 1 100 3 06/03/2020 2 50 4 07/03/2020 2 20 avances tables id […]

Categories
Mastering Development

Sql server localdb auto_increment reset when seeding asp.net core

I create a localdb instance in sql server when running my asp.net core api and then populate it with rows. The only problem is the data is discarded but the increment counter value is not reset. So when I go to seed, there is a foreign key mismatch since userids start being generated from the […]

Categories
CMS Development Drupal

403 – node creation via api

I have an issue with creating a node via the API. I have the correct permissions setup but it seems like a glitch somewhere in the permissions. An admin can create a content but no other role can. [content type]: Can create new content permission is checked. Error; access denied – /node?_format=hal_json Config: Client: return […]