Array of days in a month and get the value from each position

I have an array with the total of days in a month. What I want to do is, if it’s February 1 it is equal to 0 since its an array. Here is my current code SimpleDateFormat day = new SimpleDateFormat(“dd”); Calendar calendar = Calendar.getInstance(); int daysInMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); ArrayList<String> allDays = new ArrayList<>(); for(int … Continue reading “Array of days in a month and get the value from each position”

Continue loop on array after it’s over

I have an array with length of 26, each element a letter of the alphabet. I also have an N which can be from -10 to 10. The N takes the letter and changes it this way. if my letter is ‘a’ and N = 2 my ‘a’ will become ‘c’, if my letter is … Continue reading “Continue loop on array after it’s over”

how to use session in public direcory in laravel

I set session for getting name of the user when he/she logs in but when I want to echo it in public directory I can not echo and I don’t know can I declare // in controller session([‘sessionName’ => ‘Karim’]); //in public echo $_SESSION[‘CKFinder_UserRole’] its give me a fatal error to undefined variable plz help … Continue reading “how to use session in public direcory in laravel”

This application does not support pin Windows

Users are complaining that my application is not able to be pinned on their S7 Devices using Oreo. Neither Snapdragon nor Exynos. The error does apparently only happen since a certain point in time – but did not happen immediately after the Oreo update, and has not yet been observed on non-Samsung devices. I tried … Continue reading “This application does not support pin Windows”

Nodejs with Mongoose returns one object value instead of multiple in an array

data=[{ locId: ‘332wn’, locadetails: [ { loc: ‘ny’, status: true }, { loc: ‘ca’, status: null }, { loc: ‘tx’, status: null } ] }] I have following query that is trying to find all the locdetails that have open value as null or false Loc.find({‘locId’: id}, {‘locadetails’ : {$elemMatch: {‘status’: {$ne: true}}}}, (err, locs)=>{ … Continue reading “Nodejs with Mongoose returns one object value instead of multiple in an array”

How to make a image in center and responsive [on hold]

I am using ‘class=”img-responsive”‘ but it is not working. For every device i want this image in center. For more info please click herehttps://stackoverflow.com/q/54780396

mongoose duplicated key error with empty string

I have a schema like this: const MemberSchema = mongoose.Schema({ name: { type: String, }, email: { type: String, unique: true }, phone: { type: String, unique: true } }) and of course email and phone needs to be unique but the thing is either email or phone is optional so they can be empty … Continue reading “mongoose duplicated key error with empty string”

There were , between { li }

Hi I am trying to display an array using DOM. The problem is that there were ‘,’ between the li. How Can I delete that. const boresult = { success: [“max-length”, “no-amd”, “prefer-arrow-function”], failure: [“no-var”, “var-on-top”, “linebreak”], skipped: [“id-blacklist”, “no-dup-keys”] }; function makeList(arr) { const resultDisplayArray = []; for (let i = 0; i < … Continue reading “There were , between { li }”

SMTP not working when migrated to Linux Server

I am developing a meal ordering system that will email the user all of their orders as a receipt. I’ve used this code in my localhost using XAMPP and it works fine. if($result){ error_reporting(0); ini_set(‘display_errors’, 0); ini_set(‘SMTP’,’mail.tm.jfe-eng.co.jp’); ini_set(‘smtp_port’,25); $to=$email; $subject=”Your confirmation link”; $message=”Your confirmation link rn”; $message.=”Click on this link to activate your account rn”; … Continue reading “SMTP not working when migrated to Linux Server”

Javascript language switcher

I have another question about my code I have currently found a script that translates different <p> blocks. Now I have the following problem I would like to change the tag from French “fr” to German “de”. I thought this would be very easy and I change everything from “fr” to “de” unfortunately the script … Continue reading “Javascript language switcher”

Have a question or need a custom quote?
info@smartinfocare.com