Categories
Mastering Development

Ruby on Rails trying to update a boolean in a user table while logged in as another entity

I am very novice at Ruby and Ruby on Rails. I am trying to update a web application that has signed up volunteers that require approval before they can access full website functionality. I added a boolean field to the volunteers database model called :approved that defaults to false when a volunteer signs up, and […]

Categories
Mastering Development System & Network

ERR_CERT_COMMON_NAME_INVALID on chrome

When trying to login to my website on Chrome based browsers I get the error: Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID On firefox it works fine, tho. I installed certificates by certbot. My corresponding nginx settings look like: server { listen 80; server_name pvapp.umwelt-campus.de; return 302 https://$server_name$request_uri; } server{ # SSL configuration listen 443 ssl default_server; […]

Categories
Ask Geographic Information System (GIS)

Why does “clip raster by mask layer” in QGIS seem to take forever?

I have successfully used the "Clip" operation to trim a vector layer by another vector layer. Now I’m trying to do the same thing with a raster layer using "Clip raster by mask layer", but it seems to be taking forever: after watching the "Processing algorithm…" message for several (> 5) minutes with no sign […]

Categories
CMS Magento Mastering Development

How to pass the card details for the Magento API [POST]: V1/carts/mine/payment-information for the payment method stripe_payments_checkout_card

I have an iOS native app which communicates through Magento Rest APIs with my Magento Store, I would like to know how to pass the card details (Token, CVV, Exp Year, Exp Month, Last 4) in JSON format for the payment method "method":"stripe_payments_checkout_card" in the Magento API: [POST] V1/carts/mine/payment-information Note: I use the Stripe Official […]

Categories
CMS Mastering Development Wordpress

WooCommerce with ACF: custom fields per product variation

I’m a little stuck here. So I have variable products and I need to show the output of a custom field in a custom tab. So I created a new field in ACF, called ‘test’. I’ve got this to work for the product itself, but the content does not change when I select another variable. […]

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

Django + React Able to create new user in database, but token-auth returns 400 bad request

So I have an app that I’m writing. It’s working, for the most part, so far. I only currently have a login and signup setup, with a ‘homepage’ that just has a logout button and some text on it so I can test. When I do signup, it posts the user to the database, but […]

Categories
Mastering Development

Update Multiple Documents in MongoDb c# – whole entity not single value

I want to update a collection of documents in my collection, I don’t just want to update a field on the entity but rather the whole entity public async void UpdateMany(IEnumerable<Car> cars) { var filter = Builders<Car>.Filter.In(x => x.Id, cars.Select(x => x.Id)); var update = Builders<Car>.Update.Set(x =< x, ??); var options = new UpdateOptions { […]

Categories
Mastering Development

Tensorflow with batch size and wrong dimesion

Here are my code: # Model parameters: W and b # tf.reset_default_graph() W = tf.get_variable("weight",shape = [784, 10], dtype=tf.float32) b = tf.get_variable("b", shape=(784,10), dtype= tf.float32) input_X = tf.placeholder(‘float32’, shape = (None,10)) input_y = tf.placeholder(‘float32’, [784, 10]) ogits = W*input_X + b probas = tf.nn.softmax(logits) classes = tf.argmax(probas) loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels = input_y, logits = logits)) […]

Categories
Mastering Development

configure nodejs rest api server and vue project with axios cors policy error

as the title sais, i’m trying to configure a local rest api server running node js and in the meantime i have a vue project with axios. i surfed the whole internet, tried every server/client configuration, server headers settings, cors package, axios header config, but i still have cors policy error inthe console. postman works […]