Categories
Mastering Development

How to make a rigid alternative constraint based on earn value

i want to make a rescheduling model. I have 2 modes in tuple, I declare it using ID, I want to make a constraint if the costprod * duration in present’s mode in day 1-7 <= earn value than choose mode 2. But I think something missing in model. but I didn’t know where is […]

Categories
Mastering Development

SQL indexed Loan to Value calculation context buy-to-let lending company

I am struggling with and an exercise that was given to me, I would appreciate any help that I can get. They want me to calculate an Indexed LTV for each account, that is calculated with an indexed valuation. An indexed valuation is calculated by applying the percentage change in the index (Movement field in […]

Categories
Mastering Development

Need to count the number of operations in a 24 hour interval between dates in one column

My df, where id – id of member and dp_id – id of terminal: d = {‘date’: [‘2020-11-14 01:22:10.260′,’2020-11-14 01:41:13.260’, ‘2020-11-14 16:39:31.910′,’2020-11-14 23:39:52.510’, ‘2020-11-14 00:00:00.260′,’2020-11-15 00:01:20.710’, ‘2020-11-15 01:00:43.600′,’2020-11-15 13:41:19.410’], ‘id’: [300000,352575,352575,352575,300000,352575,352575,352575], ‘dp_id’:[‘002′,’001′,’001′,’001′,’002′,’001′,’001′,’001’]} df = pd.DataFrame(data=d) date id dp_id 0 2020-11-14 01:22:10.260 300000 002 1 2020-11-14 01:41:13.260 352575 001 2 2020-11-14 16:39:31.910 352575 001 3 2020-11-14 […]

Categories
Mastering Development

count with more than 1 having clause

so i have a case from my previous question how to count with more than 1 having clause mysql assume i have the data dummy like this CREATE TABLE order_star_member ( users_id INT, createdAt DATE, total_price_star_member DECIMAL(10,2) ); INSERT INTO order_star_member VALUES (12,’2019-01-01′,100000), (12,’2019-01-10′,100000), (12,’2019-01-20′,100000), (12,’2019-02-10′,100000), (12,’2019-02-15′,300000), (12,’2019-02-21′,500000), (13,’2019-01-02′,900000), (13,’2019-01-11′,300000), (13,’2019-01-18′,400000), (13,’2019-02-06′,100000), (13,’2019-02-08′,900000), (13,’2019-02-14′,400000), (14,’2019-01-21′,500000), […]

Categories
Mastering Development

looping object card by entering data on array in javascript

i want to make a looping card, <div class=”card” style=”width: 18rem;”> <img src=”…” class=”card-img-top” alt=”…”> <div class=”card-body”> <h5 class=”card-title” id=”itemName”>Nama</h5> <p class=”card-text” id=”itemDesc”>Deskripsi barang</p> <p class=”card-text”>Rp Harga</p> <a href=”#” class=”btn btn-primary” id=”addCart”>Tambahkan ke keranjang</a> </div> </div> by entering data through the array below var items = [ [‘001’, ‘Keyboard Logitek’, 60000, ‘Keyboard yang mantap untuk […]

Categories
Development

Usage of PERF_EVENT_IOC_PERIOD to change sampling period during runtime

I am using raspbian Linux 4.9.78-v7+ on a pi 3b. I am using perf to do some performance experiments. I am trying to use PERF_EVENT_IOC_PERIOD of perf to change the period during runtime of the process. I set the initial sampling period in the struct perf_event_attr data structure. I want to override this initial sampling […]

Categories
C++ Development

total amount is messed up when calculated all the price C++

so i have try to make something using c++ all the code i make run smoothly without an error but the problem is, the “payment” is not correct it just way to much from the “payment” i tried changing it from “int” into long doesnt work either double and float. here is the code and […]