Open in app

Sign In

Write

Sign In

Sis Ccr
Sis Ccr

25 Followers

Home

About

Sep 20, 2022

121. Best Time to Buy and Sell Stock

I think I can invest in shares, because now I know how to find the maximum profit :P There is to things we need to track. buying price maximum profit We need buying price as low as possible, so first we assume a large number for it. Once we began…

Leetcode

1 min read

Leetcode

1 min read


Aug 18, 2022

1. Two Sum

Going through the leetcode

Two Sum

1 min read

Two Sum

1 min read


Oct 8, 2021

Easy Pagination with Vapor 4

Pagination in Vapor was very easy as vapor provides the paginate(for: request) function. we call call this from client side as: http://{{baseurl}}/rooms?type=house&lowerPrice=0&upperPrice=10000&page=2&per=2 this will return the json with metadata describing the pages attributes. { "data": { "items": [ { ... "preference": "family", "phone": "9849192759", "lat": 27.717199999999998, ... } ], "metadata": { "per": 2, "total": 4, "page": 2 } } }

Pagination

1 min read

Easy Pagination with Vapor 4
Easy Pagination with Vapor 4
Pagination

1 min read


Oct 4, 2021

Multiple file upload with vapor 4

Most of the application needs image uploading. But I did not find many documented resources. Hence I would like to share my experiences with you. I have a Appartment Rental application that needs to send images along with other attributes in multipart form data. I am using postgres as database…

Vaporswift

2 min read

Multiple file upload with vapor 4
Multiple file upload with vapor 4
Vaporswift

2 min read


Oct 1, 2021

Postgres connected vapor

Well this is my first time trying out vapor. I am just starting out for crud operation. I have a post api that sends us to create function of the controller. func create(req: Request) throws -> EventLoopFuture<Room> { let room = try req.content.decode(Room.self) return room.create(on: req.db).map { room } } …

Swift

1 min read

Postgres connected vapor
Postgres connected vapor
Swift

1 min read


Sep 28, 2021

Drop in Copy to Clipboard function

self.copyToClipboard(shareableString) { showSnackBar(message: "Account Details Copied") }

Clipboard

1 min read

Drop in Copy to Clipboard function
Drop in Copy to Clipboard function
Clipboard

1 min read


Sep 28, 2021

Drop in share function in iOS

IOS

1 min read

Drop in share function in iOS
Drop in share function in iOS
IOS

1 min read


Apr 18, 2021

Rails Custom Validation

Writing custom validation was easy in rails I had a hotel model and user model. User has many hotels. When creating hotel, I had to validate that it’s email is save as users email associated with it. class Hotel < ApplicationRecord validate :check_email? def check_email? errors.add :base, "Hotel email must be same as user's email!" unless self.email == self.user.email end end And that’s it. Please check the spelling of validate. I had some trouble figuring out what was wrong when I mistakely typed validates :check_email?

Rails

1 min read

Rails

1 min read


Apr 3, 2021

Therubyracer in mac Bigsur

Therubyracer in mac Bigsur Install therubyracer in mac was a pain. here something worked for me (not in m1 chip though) brew install v8@3.15 bundle config build.libv8 --with-system-v8 bundle config build.therubyracer --with-v8-dir=$(brew --prefix v8@3.15) bundle install

Ruby

1 min read

Ruby

1 min read


Dec 31, 2020

many_to_many checkbox Phoenix 1.5

In my application to search for rooms I have added some features in room. Like availity of parking space, Internet, pets friendly, kids friendly and some more. When adding the rooms for rent user will have check the check box to indicate the availability of the features. …

Phoenix Framework

4 min read

many_to_many checkbox Phoenix 1.5
many_to_many checkbox Phoenix 1.5
Phoenix Framework

4 min read

Sis Ccr

Sis Ccr

25 Followers

Depths of ocean could not swallow me.

Following
  • Alvin Rapada

    Alvin Rapada

  • Valentyn Halkin

    Valentyn Halkin

  • Oleksandr Leushchenko

    Oleksandr Leushchenko

  • Manish Pradhan

    Manish Pradhan

  • VAPOR

    VAPOR

See all (38)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams