OneSignal. List of notifications? - list

I am using a universal app template that uses OneSignal for push notifications which works perfect, however once the notification is dismissed or the app is opened it goes away and no way for the user to retrieve it or see if ever again.
I don’t know much programming and know just enough html to get me by. So I went through one signal documentation and found this.
https://documentation.onesignal.com/reference#view-notifications
So I created the php file and it does pull the list. Awesome! However it pulls a ton of info the user does not need to see and is poorly formatted. Is there a way of altering this code so I can display only the date, title and message?

Related

Why can't I publish my AIML chatbot on Pandorabots?

I have a created a chatbot on Pandorabots and have paid the money to get an API. I've been programming the bot and accessing it from my application with no problems for about 2 weeks.
Today I made some edits to my chatbot files, and the changes work just fine in the widget on the Pandorabots page. However, when I try to click Publish Changes, my cursor turned into a circle-slash symbol and the changes do not go through. If I click Publish Changes in the sidebar, the option just disappears. I am not anywhere near my message limit. My credit card info looks good. I have searched everywhere, but can't find any info or anyone to talk to about it.
I am supposed to give a demo tomorrow for about 100 people, and right now I can't make it behave how I want it to ... would really appreciate some advice!

Django: send message to all users (sessions)

I have a python+django project and want to implement following functionality: by certain trigger (at certain time or by manual admin action) show message to all active users (i.e. to all sessions).
Webpush seems unnecessary here as far as django has nice built-in messages subframework.
I guess I may develop such functionality manually: make sql table session_messages, each time take snapshot of all sessions and show message, perform some checks to assure that message is shown only once and only to active users, etc. etc.
Question: maybe there is some nice little library that already does it? Or even maybe django messages are able to do it "from the box"?
I've googled a bit but found only packages for webpush integrations.
Thanks :)
You must implement a software architecture based on django channels, redis or rabbitmq and signals
Basically you must open a socket at the moment the user logs in, add the authenticated user to a group, and when you trigger the event with the signals send a message to the group

How to click a button on website with C++

I'm designing a web crawler with C++,but there is a web page asking me "Do you at least 18 years of age?" when I first fetch the web page by using URLDownloadToFileW,and of course I must click YES.
In javascript,I can use document.getElementsByTagName('button')[0].click(); to simulate a button click,so is there any other way to solve such problem with C++?
That is not really easy to do, but if you want to do it, you need several requests.
What the click (i.e. document.getElementsByTagName('button')[0].click(); in JavaScript) does is to trigger an associated click event. Your first step should be to find the event handler code and take a look into it. The event may for example send another (AJAX) request to the website. If that is the case, you have to perform the request in C++ in your crawler, too. Many sites also use cookies to store the user's answer to such questions (or at least the fact that the user selected "I'm at least 18 years of age"). So your crawler has to accept such cookies, too, and store them between requests.
I am aware of the fact that this answer is rather general, but it is difficult to give a more specific answer without knowing the exact website you are crawling.
Alternative approach: Instead of writing a crawler that downloads the website content directly, you might utilize frameworks like Selenium. Selenium allows to automate a browser and is intended to be used for testing, but one could also use it to crawl a website. The advantage is that you can also perfom things like clicks easier in the browser, given you know the ID or the XPath of the element you want to click. This might be easier to do than a "classical" crawler.
However, you should be aware that many websites have some kind of protection against flooding them with requests in place. That is, if you intent to do a lot of request to the same server in a short amount of time, you might get blocked from the server. So try to limit the requests to the absolute minimum.

Is this possible? Track function calls of c++ application

Ok, this is a bit far fetched but here is the idea and question: is it possible to get any kind of 'reference' (memory pointer, function identifier or whatever data) from a running Windows application on an event trigger basis?
Why? just like screen scraper are trying to make legacy application translatable to some programatic api call, I'm looking for ways to identify button clicks in a legacy window application: I don't need to know what the button is or does at first, but I need to be able to record a unique ID for a button click.
Screen scrapers record clicks to 'replay' later but this is not the goal: the goal is to record clicks as they happen and build the user 'journey' through the app like Web site record browsing journey.
Any idea of what technology would allow this?
I'm thinking debugger like tracing of the pointer location associated with a click event, but not sure how that's applicable to a compiled packaged app.
Maybe it's just not possible; I can see how that may be a security issue, but if it is, I'd love to hear your thoughts.
Thanks

How do I programmatically access items in the Workbox?

How does Sitecore find these items? I want to set up a schedule task to email my admins when there are items pending in the Workbox. Maybe there is already a feature like this? The only piece of the puzzle I am missing is how to easily identify when/if Workbox items exist.
Instead of sending emails when an item is in a workflow state why don't you try using the RSS feeds that Sitecore generates for each state. Details are in the Client Configuration Cookbook.
The majority of email clients have built in RSS readers which typically will show the feed as a separate "inbox". IMHO this is much better than email alerts which often get ignored because of how spammy they can get.
The item is shown in the Workbox as long as it is in the workflow and not in the final state. Take a look at this shared source component - it seems to be just your requirement. This one is also quite similar.