Categories
Mastering Development

onResponse() not called in REST call for Android using retrofit2

So, I’m trying to connect to Scryfall’s API and do an autocomplete call. I’ve been able to use their other call properly but this one I think where I’m having issue. Here is the call: https://api.scryfall.com/cards/autocomplete?q=fire q is the query and it will return a list of up to 20 items that could be auto-completed […]

Categories
Mastering Development

Problems with JSON visualization in SwiftUI App

I’m working on my first app, which loads a JSON with the elements that need to be displayed. At the moment everything seems to work, except a few details which I hope you can help me solve: My interface is composed of a TabView contained within a NavigationView (which contains a button that brings up […]

Categories
Cryptocurrency Ethereum Mastering Development

executing functions on a Smart Contract on ropsten via web3.py

I am trying to use web3.py to interact with a smart contract deployed on Ropsten. The Contract lives on the address 0xb80206789De27D14b3f458Bed9072d4a0129b41e and has two functions, one to save a string and one for an integer. I need to be able to use a python script to set the string and the integer on the […]

Categories
Mastering Development

python multiprocess can’t get attribute

I have my function: downloadXMLPool = Pool(processes=3) downloadFile = Pool(processes=3) def dl_data_and_convert(url,formatIn,retry=True,noHTML=False,downloadSpecialPool=None): if downloadSpecialPool == None: dlPool = downloadXMLPool else: dlPool = downloadSpecialPool if formatIn == ‘xml’: return dl_xml_to_dict(url,dlPool,retry=retry,noHTML=noHTML) elif formatIn == ‘json’: return dl_json_to_dict(url,dlPool,retry=retry,noHTML=noHTML) def dl_xml_to_dict(url,dlPool,retry=True,tryNumber=1,noHTML=False): try: response = None doc = xmltodict.parse(dlPool.apply_async(requests.get, (url,)).get().content) if noHTML: if ‘html’ in doc: if retry: sleep(randrange(60,120)*tryNumber) return […]

Categories
Mastering Development

After adding `runValidators: true`, my Mongoose update function is erroring with ` cannot read property ‘ownerDocument’ of null `

Thank you in advance for any help that anyone can provide. I currently have something like below for my mongoose schema: const personSchema = new mongoose.Schema({ name: { type: String, required: true, minlength: 3, unique: true }, number: { type: String, validate: { // below regex matches 8 digits together regardless of any other characters […]

Categories
Mastering Development

Swift get json data and index out of range error

My question is simple but I couldn’t find a solution. When I get JSON data from server I want to display the data to collectionviewcell but I got index out of range error. This is my code: func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "SiparislerTumAnasayfa", for: indexPath) as! […]

Categories
Mastering Development

Add a list of client roles to keycloak users using nodejs

i was trying to code on keycloak and it happened to me that i am able to create user using hard code and assign a role to that user. now i am trying to do is read a file and create users from the excel and roles from the same excel then assign the users […]

Categories
Cryptocurrency Ethereum Mastering Development

message: ‘invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.value of type *hexutil.Big’

I use JSON RPC request and source code is like that var options ={ url: "http://127.0.0.1:8545", method: "POST", headers: {"Content-Type":"application/json"} }; var tx = {from: req.body.fromaddress, to: req.body.toaddress, value: web3.utils.toWei(req.body.amount, "ether")}; options.body = JSON.stringify({"jsonrpc":"2.0", "method":"personal_sendTransaction", "params":[tx, req.body.password], "id":"curltest"}); callback = (err, response, body) => { if (!err && response.statusCode == 200) { const data = […]

Categories
Mastering Development

Function from another class ios swift not executed

Please tell me, I have 2 classes. There is a load_shop() function that enables the display of the webView. If I call a function from the first class ViewController then the function is executed and the webView is displayed, and if from another class CheckUpdate the function is executed (print is output) but the webView […]

Categories
Mastering Development

How to get response of accelerometer sensor in background in wear os?

I am doing fall detection in wear-os having fossil watch and getting fall detection in foreground and also used intent service to get fall detection in background but my watch app gets background service only for 1.30 mins. how to get continuous background service for fall detection in wear-os ? currently I am using this […]