[Solved] Make a list of achievements in a scroll view

You assign the elements (name, description, currency) to the same UITexts. It is like you try to store 20 numbers (0,1,2…19), but you only have one variable (int) to store them. Try to create the texts in the for loop as much as you need. Here is an example: public GameObject filePrefab; // to be … Read more

[Solved] BDE to ADO conversion in DELPHI 5

… if somehow we can set the database Alias to ADO connection … Just take a look at the source code of Delphi’s BDE and ADO support (in e.g. DBTables.Pas and ADOInt.Pas + ADODB.Pas and you will soon see that they are as different as chalk and cheese. You have no hope of e.g. using … Read more

[Solved] Table of integers right aligned

You are simply printing the array and the description method of Array will show the list of values separated by commas with the brackets. If you want any other output you need to generate it yourself. Replace your current print with the following: let line = table.map { String(format: “%4d”, $0)}.joined() print(line) This maps the … Read more

[Solved] Kendo UI Grid Data variable Vue.js

Yes, instead of using a data-source-ref, you can bind to a data-source property. This can be an instance of an kendo DataSource or a simple array. For example, here’s the default demo, changed to bind to an array of objects. var products = [{ “ProductID”: 1, “ProductName”: “Chai”, “UnitPrice”: 18, “UnitsInStock”: 39, “Discontinued”: false }, … Read more

[Solved] In React with ES6 , constructor(prop) doesn’t raise error. Why?

A constructor is a javascript function. The arguments that it takes are positional arguments. That means the values are determined by their position in the argument list and not by their name. Javascript doesn’t have named parameters. The first parameter of the constructor of React.Component is containing the props that where passed to it on … Read more

[Solved] Python: Find a Sentence between some website-tags using regex

If you must do it with regular expressions, try something like this: a = re.finditer(‘<a.+?question-hyperlink”>(.+?)</a>’, html) for m in a: print m.group(1) Just for the reference, this code does the same, but in a far more robust way: doc = BeautifulSoup(html) for a in doc.findAll(‘a’, ‘question-hyperlink’): print a.text solved Python: Find a Sentence between some … Read more

[Solved] Code a small Python dictionary

Read user input. Repeat for that many number of times – get items from dictionary using get attribute which handles KeyError itself: dic = {‘Hello’: ‘Salam’, ‘Goodbye’: ‘Khodafez’, ‘Say’: ‘Goftan’, ‘We’: ‘Ma’, ‘You’: ‘Shoma’} n = int(input()) for _ in range(n): print(dic.get(input(), ‘Wrong Input’)) EDIT: dic = {‘Hello’: ‘Salam’, ‘Goodbye’: ‘Khodafez’, ‘Say’: ‘Goftan’, ‘We’: ‘Ma’, … Read more

[Solved] Python error – list index out of range?

You hard coded the range of your loop and it is probably greater than the length of the list A quick fix is def printInfo(average): average.sort() # sorts the list of tuples average.reverse() # reverses the list of tuples print(‘\tDate\t\tAverage Price’) for i in range(len(average)): #Change was here print(“\t{:.2f}”.format(average[i][2], average[i][1], average[i][0])) however, a better fix … Read more