[Solved] real time ...
 
Notifications
Clear all

[Solved] real time notification with read unread

0 Posts
1 Users
0 Likes
3 Views
0
Topic starter
Abbas Asks: real time notification with read unread
hi I soo confused how can i create real time notification with its html/js in this case:

*an authenticated user was replied or liked an comment

*i want to send notification to user web app

*a user can see notification, With read or Unread Notification

I searched a lot , I found articles but in some of them , they used redis (i want to save notification in db with read/unread) and I dont know why?

any body can help me how can i create notification with its style like this site

like this (top,right/ section:notification)

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Unreplied Posts

[Solved] Error importing product csv

EricH Asks: Error importing product csv
I exported product csv, then added prices and tried to re-import them. This is giving me an error. Per someone’s suggestion I deleted the products in admin and now I can’t add them back.

Here is error message: Following Error(s) has been occurred during importing process: Only the first 100 errors are shown. Download full report 1. Invalid option value for attribute “design” in row(s): 654, 656 2. Attribute with code “000” is not super in row(s): 654, 656 3. Please make sure attribute “name” is not empty. in row(s): 655 4. This name is already being used for custom option. Please enter a different name. in row(s): 654, 655

Also, trying to import unaltered export file shows the same errors.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.
 
 
 

[Solved] Is it possible to allocate memory dynamically to the global variable or static variable?

funckingcoding Asks: Is it possible to allocate memory dynamically to the global variable or static variable?

Code:
#include <stdio.h>
int* arr = new int[10];
int main()
{
    for (int i = 0; i < 5; i++) {
        arr[i] = i;
        printf("%d", arr[i]);
    }
    return 0;
}

I thought global variable cannot be allocated dynamically, because global(and static) variable is initialized before running program and the dynamic allocation occurs in running time. But the code works well!! I cannot understand why the code works..

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] I have two strings with the same character’s that are not returning true when compared in Java [duplicate]

Jackson Brummell Asks: I have two strings with the same character’s that are not returning true when compared in Java [duplicate]
I have two strings that are exactly equal in terms of characters and look identical when printed but don’t ever fulfil the == operator in an if statement. Even if I use .trim() on both

One of the strings is a user input string from Scanner and one is a string parsed from a JSON object and made into a String, however, they are still identical and I can’t workout how to make them equal for this comparison.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Fatal Exception: java.lang.IllegalArgumentException: fromIndex(10) > toIndex(0)

Nidhi Asks: Fatal Exception: java.lang.IllegalArgumentException: fromIndex(10) > toIndex(0)
I am new in android. I have made pagination in my list and on click, its change recyclerview list. My code is like below

Code:
private void setAdapter(int From, int To) {

        textPageCount.setText(CURRENT_PAGE +"/" +TOTAL_PAGE);
        butPrev.setVisibility((CURRENT_PAGE ==1) ? View.INVISIBLE : View.VISIBLE);
        butNext.setVisibility((CURRENT_PAGE == TOTAL_PAGE) ? View.INVISIBLE : View.VISIBLE);

        progressBar.setVisibility(View.GONE);
        ArrayList<ItemCategory> arraylistsub = new ArrayList<>(Constant.arrayListCategories.subList(From, To));
        adapterCat = new AdapterCat(arraylistsub);
        adapterCat.notifyDataSetChanged();
        recyclerView.setAdapter(adapterCat);
        setEmpty();
    }

butNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CURRENT_PAGE = CURRENT_PAGE+1;
                FROM = (CURRENT_PAGE-1)* Constant.ITEM_PER_PAGE;
                TO = FROM + Constant.ITEM_PER_PAGE;
                if(TO>TOTAL){
                    TO = TOTAL;
                }
                setAdapter(FROM,TO);
            }
        });
        butPrev.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CURRENT_PAGE = CURRENT_PAGE-1;

                FROM = (CURRENT_PAGE-1) * Constant.ITEM_PER_PAGE;
                TO = FROM + Constant.ITEM_PER_PAGE;
                if(TO>TOTAL){
                    TO = TOTAL;
                }
                setAdapter(FROM,TO);
            }
        });

I am hiding button if there no next or previous pages. Still sometime if user speedy click the buttons, I am getting below fatal error.

Code:
Fatal Exception: java.lang.IllegalArgumentException: fromIndex(10) > toIndex(0)
       at java.util.ArrayList.subListRangeCheck(ArrayList.java:1018)
       at java.util.ArrayList.subList(ArrayList.java:1008)
       at com.karopass.fragment.FragmentCat.setAdapter(FragmentCat.java:192)
       at com.karopass.fragment.FragmentCat.access$200(FragmentCat.java:35)
       at com.karopass.fragment.FragmentCat$2.onClick(FragmentCat.java:95)
       at android.view.View.performClick(View.java:7394)
       at android.view.View.performClickInternal(View.java:7348)
       at android.view.View.access$3900(View.java:827)
       at android.view.View$PerformClick.run(View.java:28293)
       at android.os.Handler.handleCallback(Handler.java:899)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:238)
       at android.app.ActivityThread.main(ActivityThread.java:7864)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:998)

On line this

Code:
ArrayList<ItemCategory> arraylistsub = new ArrayList<>(Constant.arrayListCategories.subList(From, To));

Full Fragment code

Code:
public class FragmentCat extends Fragment {

    private Methods methods;
    private RecyclerView recyclerView;
    private AdapterCat adapterCat;
    private ProgressBar progressBar;

    private TextView textView_empty,textPageCount;
    private LinearLayout ll_empty;
    private String errr_msg;
    private AppCompatButton button_try;
    private int CURRENT_PAGE =1;
    private int TOTAL_PAGE= 0;
    private RelativeLayout butNext, butPrev;
    private int FROM  = 0, TO =0, TOTAL =0;

    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_category, container, false);


        methods = new Methods(getActivity());


        ll_empty = rootView.findViewById(R.id.ll_empty);
        textView_empty = rootView.findViewById(R.id.tv_empty_msg);
        button_try = rootView.findViewById(R.id.button_empty_try);
        butNext = rootView.findViewById(R.id.butNext);
        butPrev = rootView.findViewById(R.id.butPrev);
        textPageCount = rootView.findViewById(R.id.textPageCount);

        LinearLayout ll_adView = rootView.findViewById(R.id.ll_adView);
        methods.showBannerAd(ll_adView);



        TOTAL = Constant.arrayListCategories.size();
        TOTAL_PAGE = TOTAL/Constant.ITEM_PER_PAGE+((TOTAL%Constant.ITEM_PER_PAGE)>0?1:0);
        FROM = (CURRENT_PAGE-1) * Constant.ITEM_PER_PAGE;
        TO = FROM + Constant.ITEM_PER_PAGE;
        if(TO>TOTAL){
            TO = TOTAL;
        }

        button_try.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                setAdapter(FROM,TO);
            }
        });

        butNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CURRENT_PAGE = CURRENT_PAGE+1;
                FROM = (CURRENT_PAGE-1)* Constant.ITEM_PER_PAGE;
                TO = FROM + Constant.ITEM_PER_PAGE;
                if(TO>TOTAL){
                    TO = TOTAL;
                }
                setAdapter(FROM,TO);
            }
        });
        butPrev.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CURRENT_PAGE = CURRENT_PAGE-1;

                FROM = (CURRENT_PAGE-1) * Constant.ITEM_PER_PAGE;
                TO = FROM + Constant.ITEM_PER_PAGE;
                if(TO>TOTAL){
                    TO = TOTAL;
                }
                setAdapter(FROM,TO);
            }
        });


        progressBar = rootView.findViewById(R.id.my_progressBar);

        recyclerView = rootView.findViewById(R.id.rv_author);
        GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 1);
        recyclerView.setHasFixedSize(true);
        recyclerView.setLayoutManager(gridLayoutManager);

        recyclerView.addOnItemTouchListener(new RecyclerItemClickListener(getActivity(), new RecyclerItemClickListener.OnItemClickListener() {
            @Override
            public void onItemClick(View view, int position) {

                int FinalPosition = position;
                if(CURRENT_PAGE>1){
                    FinalPosition = ((CURRENT_PAGE-1)*Constant.ITEM_PER_PAGE)+position;
                }

                String id = Constant.arrayListCategories.get(FinalPosition).getId();
                Intent intent = new Intent(getActivity(), QuotesByCatActivity.class);
                intent.putExtra("id", id);
                intent.putExtra("name", Constant.arrayListCategories.get(FinalPosition).getName());
                intent.putExtra("TOTAL", Constant.arrayListCategories.get(FinalPosition).getTotal());
                intent.putExtra("Push", false);
                startActivity(intent);
            }
        }));



        setAdapter(FROM,TO);
        setHasOptionsMenu(true);
        return rootView;
    }

    @Override
    public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
        inflater.inflate(R.menu.menu_main, menu);

        final MenuItem searchItem = menu.findItem(R.id.menu_search);
        searchItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW | MenuItem.SHOW_AS_ACTION_IF_ROOM);
        final SearchView searchView = (SearchView) searchItem.getActionView();
        searchView.setOnQueryTextListener((new SearchView.OnQueryTextListener() {
            @Override
            public boolean onQueryTextSubmit(String query) {
                return false;
            }

            @SuppressLint("NotifyDataSetChanged")
            @Override
            public boolean onQueryTextChange(String newText) {
                if (!searchView.isIconified()) {
                    adapterCat.getFilter().filter(newText);
                    adapterCat.notifyDataSetChanged();
                }
                return true;
            }
        }));
        super.onCreateOptionsMenu(menu, inflater);
    }

    private int getPos(String id) {
        int count = 0;
        int rid = Integer.parseInt(id);
        for (int i = 0; i < Constant.arrayListCategories.size(); i++) {
            if (rid == Integer.parseInt(Constant.arrayListCategories.get(i).getId())) {
                count = i;
                break;
            }
        }
        return count;
    }


    private void setAdapter(int From, int To) {

        textPageCount.setText(CURRENT_PAGE +"/" +TOTAL_PAGE);
        butPrev.setVisibility((CURRENT_PAGE ==1) ? View.INVISIBLE : View.VISIBLE);
        butNext.setVisibility((CURRENT_PAGE == TOTAL_PAGE) ? View.INVISIBLE : View.VISIBLE);

        progressBar.setVisibility(View.GONE);
        ArrayList<ItemCategory> arraylistsub = new ArrayList<>(Constant.arrayListCategories.subList(From, To));
        adapterCat = new AdapterCat(arraylistsub);
        adapterCat.notifyDataSetChanged();
        recyclerView.setAdapter(adapterCat);
        setEmpty();
    }

    private void setEmpty() {
        if (Constant.arrayListCategories.size() > 0) {
            recyclerView.setVisibility(View.VISIBLE);
            ll_empty.setVisibility(View.GONE);
        } else {
            textView_empty.setText(errr_msg);
            recyclerView.setVisibility(View.GONE);
            ll_empty.setVisibility(View.VISIBLE);
        }
    }
}

I am not getting idea how I can handle this situation. Let me know if anyone here can help me for solve the issue. Thanks!

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Trying to send an email in Python and always error happened

hamza DC Asks: Trying to send an email in Python and always error happened

Code:
from smtplib import SMTP
sendMsg = SMTP("smtp.gmail.com", 587)
sendMsg.StartTLS()
sendMsg.login("my-email", "mypassword")
sendMsg.sendmail("sender" , "reciever", "message ehich i sent")
sendMsg.quit()

. this is error

File “D:sendMsg.py”, line 3, in sendMsg.StartTLS() AttributeError: ‘SMTP’ object has no attribute ‘StartTLS’

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Kicking off Tasks inside of ForEach debugs to NullReferenceException

MichaelS Asks: Kicking off Tasks inside of ForEach debugs to NullReferenceException
I am kicking off a few tasks to match regular expressions within a long string.

my tasklist looks like this:

Code:
var splittingTasks = new List<Task>();
foreach (var keyword in _general.Keywords)
{
    splittingTasks.Add(Task.Run(() => SplitMatches(keyword)));
}
await Task.WhenAll(splittingTasks);

and the method like this:

Code:
public void SplitMatches(string keyword)
{
    string patternObject = $@"/begin {keyword}[sS]+?/end {keyword}";
    Regex regexObject = new(patternObject);
    MatchCollection Matches = regexObject.Matches(_content);
    Parallel.ForEach(Matches, m =>
    {
        var replacedQuotes = m.Value.Replace($""", "'");
        _objectifiableMatches.Add(replacedQuotes);
    });
}

Debugging the await Task.WhenAll(splittingTasks); results to a NullReferenceException for keyword: 'keyword' threw an exception of type 'System.NullReferenceException'. Nevertheless the result is as expected.

I read this post where it says that the lambda expression within a for loop can cause problems since the delegate is not evaluated immediatly. But even after copying the variable inside the foreach loop I am still getting the same error.

Code:
foreach (var kw in _general.Keywords)
{
    string keyword = kw;
    splittingTasks.Add(Task.Run(() => SplitMatches(keyword)));
}

Thanks for any advice!

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Tkinter output goes outside the borders

Sankar Ramesh Asks: Tkinter output goes outside the borders

Code:
import tkinter as tk
import wikipedia as wiki
from tkinter import *


def Search():
    summary = wiki.summary(definition.get())
    label = Label(root, text=summary)
    label.pack()


root = tk.Tk()
root.geometry('1000x700')
root.title("Short Definition Search")

definition = StringVar()

def_entry = Entry(root, textvariable=definition, bd=2, width=100)
def_entry.pack()

button = Button(root, text="Search", command=Search)
button.pack()

Label(text="SHORT SUMMARY SEARCH", bg='white')

root.mainloop()

The above is a simple program i made. It works well but the results always seems to be going outside the gui of the app. Please help me fix this. My goal: to print the result inside the gui in separate lines rather than one long line which doesnt fit inside the borders

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] What privileges are stripped from processes in docker container when user namespace remapping is enabled?

Rahul Asks: What privileges are stripped from processes in docker container when user namespace remapping is enabled?
I am trying to debug an application inside a docker container. The application is big and I don’t have access to the source code. The docker container entry point is a shell script that is started as root. The script starts the application as a non-root user using ‘su -l ‘. The application works properly in a normal docker installation but fails when docker has been configured to turn on user namespace remapping at system level. The exact OS error eludes me because the application doesn’t have good logging. I just see some functionality broken and am strongly suspecting there is some OS error causing this. I haven’t been able to figure out the cause by looking at the error messages in the logs. I now want to debug this from the docker side. Is there any difference in the privileges available to processes inside a docker container when user name space remapping is enabled ? If so, can I explicitly grant the privilege while creating the docker container ?

PS: I don’t think the application is trying to peek inside the /sys or /proc filesystems. But I am investigating that as well.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] CustomComparator from Java into Swift

hasan kaleli Asks: CustomComparator from Java into Swift
I am trying to convert Java code into Swift. I have gone so far but stuck into the following conversion, I am wondering how to achieve that in Swift.

Code:
class CustomItem {
  var start: Int
  var end: Int
  
  init(start: Int, end: Int) {
    self.start = start
    self.end = end
  }
  
  static func compare_customs(_ content: [UInt8], _ custom1: CustomItem , _ custom2 : CustomItem) -> Int {
    // the logic is implemented here already!
  }
}

var content: [UInt8] = output.getBuffer()

var items = [CustomItem]()
for i in 0..<offsets.count - 1 {
  slices[i] = CustomItem(start: offsets[i], end: offsets[i + 1])
}
items[offsets.count - 1] = CustomItem(start: offsets[offsets.count - 1], end: output.size())

Trying to convert the following Java custom comparator logic into Swift. Any guidance would be appreaciated.

Code:
byte[] content = output.getBuffer();
java.util.Arrays.sort(items, new java.util.Comparator<CustomItem>() {
      @Override
      public int compare(CustomItem custom1, CustomItem custom2) {
        return CustomItem.compare_customs(content, custom1, custom2);
      }
    });

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How do I write a minimal GraphQL query of the Axie server?

Pierre Abbat Asks: How do I write a minimal GraphQL query of the Axie server?
I’m writing a program to download data about Axies and process them. My plan is to download all the marketplace, getting just the index numbers, then download details about Axies. Before getting all the details about an Axie, I’d like to get just one detail. I’ve succeeded in making an HTTPS connection to the server and sending a query, but all it replies is “Bad Request”.

I’ve been using Shane Maglangit’s site Axie GraphQL Docs for examples, but the examples are too big for me to understand, since I don’t know GraphQL or JSON, and part of the queries has literal n and the other part has linefeeds, which is confusing me. His code is in JavaScript, which I don’t know, so I don’t know if JS is doing something different with n than C++ does.

Here’s my code: main.cpp

Code:
#include <iostream>
#include <iomanip>
#include <boost/program_options.hpp>
#include "http.h"
using namespace std;

int main(int argc,char **argv)
{
  string query="{n  "operationName": "GetAxieDetail",n"
  "  "variables":n  {n    "axieId": "5144540"n  },n"
  "  "query": "query GetAxieDetail($axieId: ID!) {\n  ...AxieDetail\n  __typename}n}"
  "fragment AxieDetail on Axie{axie(axieId: $axieId)}"";
  string response;
  string urlv2="https://axieinfinity.com/graphql-server-v2/graphql";
  string urlv1="https://graphql-gateway.axieinfinity.com/graphql";
  response=httpPost(urlv1,query);
  cout<<response<<endl;
  return 0;
}

http.h

Code:
#include <string>

std::string httpPost(std::string url,std::string data);

http.cpp

Code:
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/beast.hpp>
#include <boost/beast/ssl.hpp>
#include <boost/asio/ssl/error.hpp>
#include <boost/asio/ssl/stream.hpp>
#include <array>
#include <iostream>

namespace beast=boost::beast;
namespace http=beast::http;
namespace net=boost::asio;
namespace ssl=net::ssl;
using tcp=net::ip::tcp;
using namespace std;

array<string,4> parseUrl(string url)
// protocol, hostname, port, path. All are strings, including the port.
{
  size_t pos0=url.find("://");
  size_t pos1;
  array<string,4> ret;
  ret[0]=url.substr(0,pos0);
  if (pos0<url.length())
    pos0+=3;
  pos1=url.find("/",pos0);
  ret[1]=url.substr(pos0,pos1-pos0);
  ret[3]=url.substr(pos1);
  pos0=ret[1].find(":");
  if (pos0<ret[1].length())
  {
    ret[2]=ret[1].substr(pos0+1);
    ret[1]=ret[1].substr(0,pos0);
  }
  else
    if (ret[0]=="https")
      ret[2]="443";
    else if (ret[0]=="https")
      ret[2]="80";
    else
      ret[2]="0";
  return ret;
}

string httpPost(string url,string data)
{
  net::io_context context;
  ssl::context ctx(ssl::context::tlsv12_client);
  tcp::resolver res(context);
  tcp::resolver::results_type endpoints;
  beast::ssl_stream<beast::tcp_stream> stream(context,ctx);
  array<string,4> parsed=parseUrl(url);
  http::request<http::string_body> req;
  http::response<http::string_body> resp;
  beast::flat_buffer buffer;
  //load_root_certificates(ctx);
  ctx.set_verify_mode(ssl::verify_peer);
  endpoints=res.resolve(parsed[1],parsed[2]);
  beast::get_lowest_layer(stream).connect(endpoints);
  SSL_set_tlsext_host_name(stream.native_handle(),parsed[1].c_str());
  if (parsed[0]=="https")
    stream.handshake(net::ssl::stream_base::client);
  req.method(http::verb::post);
  req.target(parsed[3]);
  req.set(http::field::host,parsed[1]);
  req.set(http::field::user_agent,BOOST_BEAST_VERSION_STRING);
  req.set(http::field::content_type,"application/json");
  req.set(http::field::accept,"application/json");
  req.body()=data;
  req.prepare_payload();
  http::write(stream,req);
  http::read(stream,buffer,resp);
  cout<<parsed[0]<<"|n"<<parsed[1]<<"|n"<<parsed[2]<<"|n"<<parsed[3]<<"|n";
  cout<<data<<"|n";
  return resp.body();
}

How can I write a query that returns one detail of the Axie with the specified number? Which of the two Axie servers should I use, and what’s the difference?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Share: