applescript – My Apple Script Editor code doesn’t work gives “Syntax Error Expected end of line but found identifier.”

The problem is the version of Evernote I tried is not AppleScript scriptable.

When trying to add Evernote to the Library in Script Editor, in order to review its AppleScript dictionary, it errs with: Add Item Unable to add the item because it is not scriptable.

Additionally, when running the following command in Script Editor:

tell application "System Events" to ¬
    get has scripting terminology of application process "Evernote"

Its result is: false


Apparently at one time Evernote was AppleScript scriptable, however, in macOS Catalina, testing with Evernote from https://evernote.com/download/ and checking Evernote > About Evernote it shows:

10.11.5-mac-ddl-public (2530)
Editor: v121.2.15734
Service: v1.32.4
© 2019 – 2021 Evernote Corporation. All rights reserved

Looking for the typical AppleScript dictionary in /Applications/Evernote.app/Contents/Resources/ there is no Evernote.sdef files as would be expected if it was fully AppleScript scriptable.


If you do have a version of Evernote that is AppleScript scriptable then try the following, which I cannot test under the circumstances:

Change note1 to note in:

set myNote to create note1 with text myTitle title myTitle notebook "Imported Notes" tags ("imported_from_notes")

You might also want to put in some parentheses. e.g.

set myNote to (create note with text myTitle title myTitle notebook "Imported Notes" tags ("imported_from_notes"))

Unfortunately without a version of Evernote that is AppleScript scriptable, I cannot offer more.

django – bind(): Permission denied [core/socket.c line 230]

good day, i am currently trying to deploy my webiste using django, nginx and uwsgi, how do i remove or fix the error
” bind(): Permission denied (core/socket.c line 230) “

!!! no internal routing support, rebuild with pcre 
support !!!
chdir() to /opt/Spa/beautyparlor
your processes number limit is 7029
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with -- 
thunder-lock)
uWSGI http bound on :8000 fd 5
bind(): Permission denied (core/socket.c line 230)

http – OAuth for command line application

I’m planning to add an “official” command line tool for developers to interact with our API. The tool is basically just a glorified curl client, interacting with the API via HTTPS exclusively. To make this convenient for developers, it should allow them to authorize the CLI using their existing user account, using an authorization_code grant.

Therefore, the user interaction should work like the following:

  1. The user executes acme-cli login.
  2. The CLI uses OpenID discovery to locate our OAuth endpoints, and builds an authorization URL. The client_id is hard-coded in the CLI source code; to prevent having to include the client_secret, we use PKCE to generate a local challenge.
  3. The CLI generates a random, unique hash as a device identifier. It then opens a URL in the user’s browser with the device identifier and full authorization URL as query parameters:
    https://app.acme.com/cli/start?device_id=<deviceId>&authorization_url=<authorization_url>
    This endpoint stores the device ID in a session cookie, then redirects to the authorization URL.
  4. The user signs in and authorizes the CLI to access their account on their behalf.
  5. The OAuth server redirects them to the redirect URI, which points to another endpoint on our application server:
    https://app.acme.com/cli/confirm?code=<authorization_code>&state=<state>
    This endpoint stores the authorization code to be fetched by the CLI instance later on together with the device identifier (step 3) from the cookie.
  6. After opening the authorization link in the user’s browser, the CLI regularly polls an endpoint on the application server, passing their device identifier, for the authorization code:
    https://app.acme.com/cli/poll/<device_id>
    As soon as the code is available, it exchanges it for an access token as an ordinary web application would.
  7. If the authorization code isn’t fetched within 60 seconds, the TTL expires and it is purged.

This process is defined pretty well by OAuth, apart from the signaling mechanism between our server and the CLI application instance running on the developer’s computer.

Considering we use PKCE, even leaking the authorization code somehow should not be a problem, as it is useless without the code verifier, so I think this process should be as secure as the OAuth spec allows. Are there any flaws I’ve overlooked? Is there a better or more secure way to implement this?

proof explanation – Mirror symmetry about the line $y = 1/x$

This seems like a very simple computation, but I don’t fully understand it.

Consider the line $y = 1/x$ in the first quadrant (i.e., when $x geq 0$). We fix a point $x_0$ and consider the line tangent to $y = 1/x$ at the point $x_0$. Computationally, it’s easier to see that the $y$-intercept is $2x_0$. The claim that I do not understand is that it should be true “by mirror symmetry” that the $x$-intercept immediately is $2y_0$. The argument the professor made is that
$$y = 1/x iff xy = 1 iff x = frac{1}{y}.$$
I understand this, but we’re looking at the tangent line, not at the original function $y$. I can observe the function and “see” that there may be some mirror symmetry, but I don’t understand fully how the geometry works.

How to find projection of point on a line?

How can I find the projection of a point p=(x, y, z) on line
l(t) = q + vt? (v is a unit norm vector, is on the lint l(t))

Update of X-code terminal line is not installing

Even though I have agreed and downloaded the update its not installing,
Here trickest thing it not even showning any error for not installing.

I am current in MACOS x 11.2.3

Can any one please help me to solve this

enter image description here

SQLite command line shell stuck on …> , CTRL+D not working

I’ve just started learning Databases, and the instructor is teaching SQLite with the command line shell. I downloaded sqlite-tools-win32-x86-3350400.zip from sqlite.org/download

When I enter false commands, like the first two you can see, I get the correct error messages. But when I enter a syntax error: (“Steve, 87654) for example, it’s stuck on …> waiting for more input.
After searching on the internet, users suggested the solution “CTRL+D”, but it doesn’t work for me. CTRL+C however just exits sqlite3.

My question: How do I get out of …> to continue with my commands? Why CTRL+D doesn’t work for me, to get out of the …> because of the syntax error or other possible causes? How do I fix my problem?

C:UsersmyUser>sqlite3 test.db
SQLite version 3.35.4 2021-04-02 15:20:15
Enter ".help" for usage hints.
sqlite> SELECT * FROM contacts;
Tim|654321|tim@email.com
Brian|1234|brian@mygmail.com
sqlite> INSERT INTO contacts VALUES("Steve", 87654);
Error: table contacts has 3 columns but 2 values were supplied
sqlite> INSERT INTO contacts VALUES(Steve, 87654);
Error: no such column: Steve
sqlite> INSERT INTO contacts VALUES("Steve, 87654);  // Intentional for demonstration //
   ...> ^D  // Entered CTRL+D //
   ...> ;
   ...>     // Entered CTRL+C //
Error: unrecognized token: ""Steve, 87654)"

C:UsersmyUser>

json rpc – What does the sixth line in the output of the Bitcoin Core GUI RPC command “gettxoutsetinfo” mean?

An example of the output of this RPC command is as follows.

 1  "height":n,     (numeric) The current block height (index)
 2  "bestblock": "hex",   (string) The hash of the block at the tip of the chain
 3  "transactions": n,      (numeric) The number of transactions with unspent outputs
 4  "txouts": n,            (numeric) The number of unspent transaction outputs
 5  "bogosize": n,          (numeric) A meaningless metric for UTXO set size
 6  "hash_serialized_2": "hash", (string) The serialized hash
 7  "disk_size": n,         (numeric) The estimated size of the chainstate on disk
 8  "total_amount": x.xxx          (numeric) The total amount
}

What’s the meaning of the sixth line “hash_serialized_2”? Whose hash is this referring to?

Notice: Array to string conversion in vendor/magento/framework/Escaper.php on line 261 in magento 2.4.1

I am facing this issue when I create a custom theme under my Magento 2.4.1.
The product displaying hides automatically showing this error.

python – Invalid block tag on line 90: ‘cart_product_form’, expected ‘endblock’. Did you forget to register or load this tag?

I keep getting this error when I add the 2 lines below in the cart app in cart/detail.html

{% item.update_quantity_form.quantity show_label=False %}
{% item.update_quantity_form.update %}

and a line below in the product app in products/product_detail.html

{% cart_product_form %}

how can I solve this error?
Invalid block tag on line 90: ‘cart_product_form’, expected ‘endblock’. Did you forget to register or load this tag?


eshop_cart/views.py

@require_POST
def cart_add(request, product_id):
    cart = Cart(request)
    product = get_object_or_404(Product, id=product_id)
    form = CartAddProductForm(request.POST)
    if form.is_valid():
        cd = form.cleaned_data
        cart.add(product=product,
                 quantity=cd('quantity'),
                 update_quantity=cd('update'))
    return redirect('cart_detail')


def cart_remove(request, product_id):
    cart = Cart(request)
    product = get_object_or_404(Product, id=product_id)
    cart.remove(product)
    return redirect('cart_detail')


def cart_detail(request):
    cart = Cart(request)
    for item in cart:
        item('update_quantity_form') = CartAddProductForm(
            initial={
                'quantity': item('quantity'),
                'update': True
            })
    return render(request, 'cart/detail.html', {'cart': cart})


eshop_products/views.py

def product_detail(request, *args, **kwargs):
    selected_product_id = kwargs('productId')
    product = Product.objects.get_by_id(selected_product_id)
    if product is None or not product.available:
        raise ("not valid")

    related_product_pictures = ProductGallery.objects.filter(product_id=selected_product_id)
    pictures = MainTopSlider.objects.all()
    cart_form= CartAddProductForm()

    context = {
        'product': product,
        'related_product_pictures': related_product_pictures,
        "pictures": pictures,
        'cart_form': cart_form

    }
    return render(request, 'products/product_detail.html', context)


<div class="pro-details-cart">
<form action="{% url "cart_add" product.id %}" method="post">
 {% cart_product_form %}
 {% buttons %}
    <button type="submit" class="btn btn-success btn-product">
 <span class="glyphicon glyphicon-shopping-cart"></span> Add to cart
   </button>
  {% endbuttons %}
   </form>

   </div>