Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

items

Modification of the list items in the loop (python) [duplicate]

December 31, 2023 by Tarik

Try this instead: for i in xrange(len(data)): data[i] = “everything” The basic problem you’re having is that when you write data[i], with data being a list, the i needs to be an integer, a numerical index into the list. But in the loop for item in data item is the actual thing that’s in the … Read more

Categories python Tags items, loops, python Leave a comment

Woocommerce – Getting the order item price and quantity.

December 7, 2023 by Tarik
Categories php Tags items, orders, php, woocommerce, wordpress Leave a comment

AttributeError: ‘set’ object has no attribute ‘items’

August 30, 2023 by Tarik

As you can see from the latest updated code – self.changes = {“MTMA”,123} When you define self.changes as above , you are actually defining a set , not a dictionary , since you used ‘,’ (comma) instead of colon , I am pretty sure in your actual code you are using comma itself , not … Read more

Categories python Tags class, csv, items, python, tkinter Leave a comment

Add a new item to recyclerview programmatically?

December 15, 2022 by Tarik

First add your item to mItems and then use: mAdapter.notifyItemInserted(mItems.size() – 1); this method is better than using: mAdapter.notifyDataSetChanged(); in performance.

Categories android Tags add, android, android-recyclerview, items Leave a comment

Add a new item to a dictionary in Python [duplicate]

September 9, 2022 by Tarik

default_data[‘item3’] = 3 Easy as py. Another possible solution: default_data.update({‘item3’: 3}) which is nice if you want to insert multiple items at once.

Categories python Tags dictionary, items, python Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa