No More Import Button on Parse - parse-platform

I no longer see the import button on Parse to import a JSON or CSV file. Did they move it somewhere or is it no longer possible to import those file types?

the official reason is this:
"[The import class button] was removed a couple of days ago due to an app that was abusing it and affecting people that had not migrated out yet. Now that the database is running on your own infra, you can simply importing directly to mongo so this shouldn’t be blocking you."
I hope this helps (to answer the question, not to import your class of course).
Cheers,

Related

Python Discord Bot using VSCode not detecting on_member_update events

I used to run this bot on replit with no code issues, but after it wiped some JSON files and got API banned, I switched to running it on my PC through VSCode. All functionality works fine, except it doesn't get any response from on_member_update anymore. I didn't change any of the code here, and made sure that all my intents were sorted as well. any ideas?
import os
from os import path
import discord
import asyncio
from datetime import datetime, date
from pytz import timezone
from keep_alive import keep_alive
import json
from dotenv import load_dotenv
from heapq import nlargest
import random
from discord.ext import commands
load_dotenv()
client = discord.Client(intents=discord.Intents.all())
#client.event
async def on_member_update(before, after):
print('presence detected')
client.run(TOKEN)
Of course the vast majority of the code is filtered out, but I feel like this has all the relevant info. Starts fine, runs fine, modifies files fine, doesn't work with detecting presence changes in members. I tried copying the exact code over to replit again, and it detects just fine over there, so it's not the bot settings itself I believe. Maybe i'm missing some import or didn't download a pip or something that it hasn't warned me about? Any help would be great.
Edit 1: Still haven't found a solution to it, but I switched from on_member_update to on_presence_update, which seems to be functionally the same for my purposes. I'm still curious about what's going on though if anyone comes along.
I just tried to run it through my VS and it works fine for me and on member update it printed presence detected
So i don't know.
This may be due to not having presence intents enabled for your application.
To enable them, go to the Discord Developer Portal and select your application. Navigate to the Bot section and you'll then see if you scroll down a little Presence Intents. You need to enable this, which is easy enough if you're not verified. Simply click the little switch to turn them on.
If you're bot is verified, you need to apply for the intents. There should be a section for applying for intents. Fill out the form there and you'll get an email from Discord to progress.

Cannot import package in AWS lambda with Nodejs14.x ES module

I have a layer where the path of node_modules is nodejs/node14/node_modules.
Using that layer, and I try to import a package in a Lambda function, say 'aws-cloudfront-sign', like this:
import cfsign from 'aws-cloudfront-sign'
I got error message
Cannot find package 'aws-cloudfront-sign' imported from /var/task/signer.js\nDid you mean to import aws-cloudfront-sign/lib/cloudfrontUtil.js?
But if I import the package like this:
import cfsign from '/opt/nodejs/node14/node_modules/aws-cloudfront-sign/lib/cloudfrontUtil.js'
It succeeds.
Do you know why? How could I import the package correctly?
This appears to be a bug. It is occurring with layers and the SDK. There are are a number of similar open issues on Github:
Nodejs Lambda: Cannot find package 'aws-sdk'
Cannot find package when using ES Module and Lambda Layer
ES6 imports don't work in #aws-sdk/client-iotsitewise
As you have worked out, the only workaround at present seems to be the use of absolute paths. E.g.:
import { DynamoDB } from 'aws-sdk;'
fails, whereas
import AWS from '/var/runtime/node_modules/aws-sdk/lib/aws.js';
const { DynamoDB } = AWS;
will work.
I suggest you add your voice to an existing open issue to help ensure it gets attention.

How can I import a class from back4app, which contains images, into another back4app database?

I have a back4app parse database that has a class containing images. I need to import this class into another back4app parse database. When I export it to json and attempt to import it, I get the following: This XML file does not appear to have any style information associated with it. The document tree is shown below. Followed by an error stating access denied. What do I need to do to get this to work?
To clarify the solution: the files must be cloned into the new database, which can only be done by contacting back4app directly and asking them to do it.
I recommend that you sent a email or talk at chat with Back4App, the error that you reported is necessary clone your files/images.

Swift - Import my swift class

This question is asked several times, but I can't find the right solution for my problem. I'm trying to import my Player.swift class in my MainScene.swift (I've used Cocos2D - SpriteBuilder to setup the project; Now using Xcode).
This is my folder structure:
I've tried to use import Player; and import Player.swift;, but when I tried I got this error: No such module 'Player.swift'
How do I import it correctly?
Thanks!
By the way, I'm a beginner in Swift, so don't expect that I know all of the terms
You don't need to explicitly import files in Swift as they are globally available through the project. If you want to access the methods or properties of Player class, you can directly make object of Player class in MainScene.Swift file and can access to it.
e.g var objPlayer = Player()
There is no need to import swift classes to use in other swift classes.
They are available to use automatically.
In Swift you can only import module, e.g. any framework like UIKit, MapKit as below. You cannot import swift classes.
import UIKit
import MapKit
Just make sure its selected to use in target in which your are trying to use.
Check below images for more idea.
In this image my HomeViewController.swift is selected to use in AutolayoutDemo module.
In below image I have unchecked AutolayoutDemo module for the class DetailsViewController.swift.
So now onwards when I will try to use the DetailsViewController compiler will give me error as below image in HomeViewController.
When it comes to Swift imports, there are two cases:
1) The type to import is in the module
In this case, no import statement is needed. As long as the type is not private or fileprivate, you can directly access it.
2) The type to import is outside of the module
You can import an entire module using:
import ModuleName
If you only want to import a specific type or function from the module, you can do this using the following format:
import kindOfThing ModuleName.Type
where kindOfThing is class/struct/func/etc...
A much deeper exploration of this can be found on NSHipster here.
Check if the class is added to your iOS target in right Pane or not .

ruby - activerecord fast import

How the active record fast import works?
I want to import data from a file to database table.
How can I import data from a .csv file to database using fast_import?
What about reading readme on the project's github page? It has answers for all your questions:)

Resources