Sponsored Content
Top Forums Web Development Notes with Ravinder on Badging System Development Part II Post 303028304 by Neo on Friday 4th of January 2019 01:48:23 AM
Old 01-04-2019
Alerts:

OK I have come up with an easy way to implement alerts when the badge beta is done.

Will take the array of badge colors and convert that array to a JSON string and then take the cryptographic hash of that string and store that string in the user table.

Then it is easy to check when a new threshold badge has been reached without tracking values that change often.

Then when the state changes .. will issue a simple dismissable Bootstrap alert which states the user has a new badge but not the actual badge (in first beta) and will have a link to the badge page.

Later will add the actual details of the status changes to the alert message.
 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

2. What is on Your Mind?

Status of Badging System - Beta 1

Dear All, Here is the current status of the badging system: The Beta 1 phase of the new badging system is close to completion. 42 prototype badges have been "allocated" 6 prototype badge slots are held in reserve The "alert you have new badges" prototype is running and is currently... (4 Replies)
Discussion started by: Neo
4 Replies

3. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies
port_alert(3C)						   Standard C Library Functions 					    port_alert(3C)

NAME
port_alert - set a port in alert mode SYNOPSIS
#include <port.h> int port_alert(int port, int flags, int events, void *user); DESCRIPTION
The port_alert() function transitions a port into or out of alert mode. A port in alert mode immediately awakens all threads blocked in port_get(3C) or port_getn(3C). These threads return with an alert notification that consists of a single port_event_t structure with the source PORT_SOURCE_ALERT. Subsequent threads trying to retrieve events from a port that is in alert mode will return immediately with the alert notification. A port is transitioned into alert mode by calling the port_alert() function with a non-zero events parameter. The specified events and user parameters will be made available in the portev_events and the portev_user members of the alert notification, respectively. The flags argument determines the mode of operation of the alert mode: o If flags is set to PORT_ALERT_SET, port_alert() sets the port in alert mode independent of the current state of the port. The portev_events and portev_user members are set or updated accordingly. o If flags is set to PORT_ALERT_UPDATE and the port is not in alert mode, port_alert() transitions the port into alert mode. The portev_events and portev_user members are set accordingly. o If flags is set to PORT_ALERT_UPDATE and the port is already in alert mode, port_alert() returns with an error value of EBUSY. PORT_ALERT_SET and PORT_ALERT_UPDATE are mutually exclusive. A port is transitioned out of alert mode by calling the port_alert() function with a zero events parameter. Events can be queued to a port that is in alert mode, but they will not be retrievable until the port is transitioned out of alert mode. RETURN VALUES
Upon succesful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
The port_alert() function will fail if: EBADF The port identifier is not valid. EBADFD The port argument is not an event port file descriptor. EBUSY The port is already in alert mode. EINVAL Mutually exclusive flags are set. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |all | +-----------------------------+-----------------------------+ |Availability |SUNWcsr, SUNWhea | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
port_associate(3C), port_create(3C), port_get(3C), port_send(3C), attributes(5) SunOS 5.10 1 Oct 2003 port_alert(3C)
All times are GMT -4. The time now is 07:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy