http – Can not retrieve anything from the .Core Web API

So I came across the next problem.

1) Create new asp core 2.1 App (Template MVC)

2) Add a new controller:

[EnableCors]



public class ApiController: controller
{
public string Get (int id)
{
return $ "You have sent {id}";
}
}

3) Enable CORS in Startup.cs:

app.UseCors (builder => builder.AllowAnyOrigin ());

4) Build a classic / .NET Core console app with the next code:

class program
{
static void Main (String[] args)
{
AsyncMethod ();
}

private static async void AsyncMethod ()
{
Task.Delay (5000) .Wait ();
var http = new HttpClient ();
var url = "https: // localhost: 44353 / api / get / 4";
var answer = Expect http.GetAsync (url);
var result = expect response .Content.ReadAsStringAsync ();
Console.WriteLine (result);
}
}

If I add code directly to Main () or even create a WPF / UWP / WinForms app and paste that code into it, nothing will work. Both (classic and .core) console applications stop debugging without exceptions or messages, and only in the debug window

The program "[10340] dotnet.exe "ended with code 0 (0x0).
Program "[10340] dotnet.exe: Program Tracker ended with code 0 (0x0).

Replacing this code with the use of WebClient did not help. Also, this code works great with the classic ASP MVC 4 application, so my console app is correct. However, this code does not work with the .Core app.

What do I miss?

Custom Post Types – Retrieve result from meta_query () between two numbers (ACF)

have a problem with maet_query_args.

$ money_form = 0;
$ money_form = $ _POST['search_option_money'];
> if ($ money_form! = 0) {
> $ meta_query_args = array (
> array
> & # 39; key & # 39; => $ money_form,
> & # 39; value & # 39; => array (& # 39; offer_money_start & # 39 ;, offer_money_end & # 39;),
> & # 39; type & # 39; => & # 39; decimal & # 39 ;,
> Compare & # 39; => & # 39; BETWEEN & # 39; /// BETWEEN
>));}
> otherwise [...]
> $ myquery = new WP_Query (array (& # 39; post_type & # 39; => & # 39; mycredit & # 39 ;, post_per_page & # 39; => -1, & # 39; orderby & # 39; = > & # 39; edge & # 39 ;,
& # 39; # 39 & meta_query; => $ meta_query_args));

I need all the offers that are between ACF beginning and end, but I have no results. I do not know why?

magento2 – retrieve zip code and call ajaxcall to API

I have no idea if I'm doing it right or not, and I can not say it works. I would like to make an Ajax call to get information from an API and then present it in the HTML file, but first I have to check X. The shipping method is selected. If so, the postal code data is inserted into the API. How can I get this information?

Here is my code:
js:

define([
    'jquery',
    'uiComponent',
]Function ($, component) {
# Use strictly & # 39 ;;

return Component.extend ({
Default settings: {
Template: & # 39; CloudJam_Vkios / Checkout / Shipping / Pickup Points & # 39;
},
getKiosPoints: function () {
var postal code = "4433-137"
$ .ajax
({
Type: "POST",
beforeSend: function (xhr) {
xhr.setRequestHeader (& # 39; Authorization & # 39 ;, & # 39; Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3h & # 39;);
},
url: & # 39; ... API / GetServiceDeliveryPoints & # 39 ;,
Data type: & # 39; Json & # 39 ;,
contentType: & # 39; application / json & # 39 ;,

async: true,
// Json object to send to the authentication URL
Data: JSON.stringify ({
"PostalCodeOrLocality": postal code,
"Latitude": 0,
"Longitude": 0,
"SortOrder": 0
}),
Success: Function (Data) {
if (data.statusCode == 200) {

var locations = data.response;

Return places;
}
},
error: Function (jqXhr, textStatus, errorThrown) {
return error Thrown;
}
})

}
});
});

HTML:

Localizações

sharepoint online – REST API To retrieve the ID of a newly created file

Using the Sharepoint REST API I have successfully created a new file with a POST request. Following the documentation, I am now trying to update the file metadata.

If you want to update the metadata of a file, you must have a
Endpoint that reaches the file as a list item.

Create an endpoint that looks like this:
https: // siteurl / _api / web / list / getbytitle (& # 39; Documents & # 39;) / items (Article ID)

My question is how to retrieve it Article identification number because this does not seem to be returned in the response when creating the new file. The only thing I get back is something like the following –

{
"d": {
"__metadata": {
"Https: // team4 hl = en ??? =====================================? ================================================== ================================================== ================================================== ======== this document "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; & # 39; ; & # 39; - to pass instructions "".
"Https: // en / 4 ????? ===================================== ================================================== ================================================== ================================================== =============== good
"type": "MS.FileServices.File"
}
},
...
}

The URLs are obviously different from the URL required to update the metadata.

Gmail – Can Mail Retrieve Email Signature With Gmail?

My organization's employees use a mix of Apple Mail and Gmail.com as a client for our Gmail addresses. We use a GSuite app to set users' Gmail signatures. This is great for emails that send emails from Gmail.com. However, the signature is not "imported" by Apple Mail. This means that users must manually copy their Gmail signature into Apple Mail's signature settings. Is there a way to remedy this?

I understand that this is not a lack of Apple Mail, but a lack of Gmail.

views – Retrieve node from link

Within the mymodule_preprocess_views_view_row_rss (& $ variables) Hook, we can get that shortcut through the use $ variable['row']-> link, However, we have no access to the node for what shortcut is for.

How can we use the returned value? $ variable['row']-> link to get that node?

Gates):

  1. Use of shortcut Value, you get the node so that we can retrieve additional fields, such as: field_image inside the hook
  2. add the field_image as a variable too $ variable Array so that it can be used in the views-view-row rss.html.twig File.

We tried it without success.

Function mymodule_preprocess_views_view_row_rss (& $ variables) {
$ link_value = $ variable['row']-> link;
$ path =  Drupal :: service (`path.alias_manager`) -> getPathByAlias ​​($ link_value);
$ node =  Drupal  node  Entity  Node :: load ($ path);
ksm ($ node); // returns null
}

Additional view settings that we have tried without success:

Under fields

format

Within mymodule_preprocess_views_view_row_rss (& $ variables) We tried to print all variables ksm ($ variable) to see if field_image was returned, but it was not.

php – Home Template Loop Customization – should retrieve content based on the post template

There are two files in the theme:
single.php
f-template.php → For standard post. It has different designs.

Home.php gets the first 10 posts and can be found under the above templates.

But what is needed is the content of home.php f-template.php

These two things should then be implemented in home.php

function folder_paragrapgh ($ content) {
return preg_replace (& # 39; /]+)?> / & # 39 ;, & # 39;

& # 39 ;, $ content); } add_filter (# the_content #, folder_paragrapgh #);

and


I tried that:

if (is_page_template (& # 39; f-template.php & # 39;)) {
function folder_paragrapgh ($ content) {
return preg_replace (& # 39; /]+)?> / & # 39 ;, & # 39;

& # 39 ;, $ content); } add_filter (# the_content #, folder_paragrapgh #); } the content();

But that did not work. In fact, it's flawed because the template we create is home.php.

So, do we have a solution to achieve what we wanted to achieve?

Outlook 2013 does not retrieve new emails after an existing Outlook file has been added

I bought a new computer and installed Office 2013 in it, copied my outlook.pst file from my old computer, and configured Outlook on my new computer. I used the pop3 account. Then I add the 25GB Outlook data file from my old computer there. Now there is a problem that I can send emails, but new emails are not coming. It's on my phone though and it's on the server. In my old computer, however, it worked perfectly. Pop3 was in there, too. but it does not work here.