Sponsored Content
The Lounge What is on Your Mind? Similar Threads: More UNIX and Linux Forum Topics You Might Find Helpful Update Post 303021645 by Neo on Tuesday 14th of August 2018 03:07:27 AM
Old 08-14-2018
Similar threads are now responsive with CSS Flex powered by jQuery:

We can tweak and fine tune proportions, sizes, colors over time.

Here is the initial jQuery which drives the transformation:

Code:
$(document).ready(function() {
    $(".neo-search-results").css({
        overflow: "visable"
    });
    $(".neo-similarthreads-thead, .neo-similarthreads-threadbit").css({
        display: "flex",
        "flex-flow": "row wrap",
        "justify-content": "space-between",
        "flex-direction": "row",
        "align-content": "stretch"
    });
    $(".neo-similarthreads-thead, .neo-similarthreads-threadbit").find("td").removeAttr("width, align, nowrap");
    $(".neo-similiarthreads-thead-thread").css({
        "width": "240",
        "flex-grow": "10"
    });
    $(".neo-similiarthreads-thead-starter").css({
        "width": "100",
        "flex-grow": "3"
    });
    $(".neo-similiarthreads-thead-forum").css({
        "width": "150",
        "flex-grow": "5"
    });
    $(".neo-similiarthreads-thead-replies").css({
        "width": "50"
    });
    $(".neo-similiarthreads-thead-last").css({
        "width": "120",
        "flex-grow": "4"
    });
    $(window).on("resize", neoAdjustSimilarThreads);
    neoAdjustSimilarThreads();
    function neoAdjustSimilarThreads() {
        var widthNow = $(window).width();
        if (widthNow < 700) {
            $(".neo-similarthreads-thead, .neo-similiarthreads-thead-replies").hide();
            $("#neo-similarthreads-phrase").text("Similar Threads")
        } else {
            $(".neo-similarthreads-thead, .neo-similiarthreads-thead-replies").show();
            $("#neo-similarthreads-phrase").text("More UNIX and Linux Forum Topics You Might Find Helpful")
        }
    }
    $("#collapseimg_similarthreads").click(function() {
        return toggle_collapse("similarthreads")
    })
});

TODO: Thread views in forums.
 

4 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Similar Threads - a new vB3 feature for UNIX.COM

Note the new feature on UNIX.COM, many thread at the bottom of the page have a new feature: Similiar Threads Here is an example on one of Perderabo's posts: https://www.unix.com/showthread.php?t=16337 Kudos to the vB folks for this built-in feature!! Neo (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

Forum Update New Steps for UNIX.com

Dear Everyone, Thank you for all the great comments, feedback and patience during our recent modernization efforts at unix.com. Now, I need to decide where to go next, as we move into the next phase. Some of the ideas I have are: Make the UserCP experience and all those non-public... (6 Replies)
Discussion started by: Neo
6 Replies

3. What is on Your Mind?

Similar Threads Redesign for UNIX.com

Hello. I have redesigned our "similar threads" for a more "clean style" in both the desktop view and the mobile view for the forum "show thread". The new design is a simple straight-forward use of div elements and all the legacy table elements have been removed. The result is a "clean"... (7 Replies)
Discussion started by: Neo
7 Replies

4. What is on Your Mind?

Similar Threads for Man Pages - In Development

FYI, I have been quietly updating the man page database adding "similar threads" for man pages. STEP 1: Full Text MySQL DB Search Matches The first step, after creating the DB columns, was to process each of the nearly 400K man pages and do a full text mysql search, match and score... (10 Replies)
Discussion started by: Neo
10 Replies
postwait(2)							System Calls Manual						       postwait(2)

NAME
postwait: pw_getukid(), pw_wait(), pw_post(), pw_postv(), pw_getvmax() - lightweight synchronization mechanism SYNOPSIS
DESCRIPTION
Postwait is a fast, lightweight sleep/wakeup mechanism that can be used for synchronization by cooperating kernel threads within a single process or between separate processes. A thread calls to block. It resumes execution when it is posted by another thread, the call expires, or is signaled. If one or more posts are already pending, returns immediately. Threads using postwait are identified by their ukid. A thread retrieves its ukid by calling It shares this ukid with anyone it chooses by any means it considers appropriate (for example, shared memory). is called with a timeout ts. If ts is NULL, the thread will not timeout. It will remain blocked until posted or a signal wakes it up. If ts points to a zero-valued timespec, will return immediately with a value (and indicating whether or not it was posted. If ts points to a timespec whose value is greater than zero, the thread will block for that amount of time unless it is posted or inter- rupted by a signal, in which case the timespec pointed to by ts is updated with the remaining time. The return value and are set to indi- cate the reason the call returned. is used to post many threads with a single call. It posts to all threads in the targets array. An value for each target is returned in the errors array. (0 indicates success.) If the errors pointer is zero, no target-specific errors are copied out. There is a maximum number of threads that can be posted with a single call. This value is returned by Posts sent to a kernel thread that already has a post pending against it are discarded. RETURN VALUE
returns 0 if it succeeds, -1 otherwise. returns 0 if posted, -1 otherwise. returns 0 if the post succeeds, -1 otherwise. returns 0 if every post succeeds, -1 otherwise. returns the maximum number of kernel threads that can be posted with a single call to ERRORS
sets to one of the following values if it fails: ukid points to an illegal address. The reliable detection of this error is implementation dependent. sets to one of the following values if it fails: was called with a timeout of 0 but the caller has no post(s) pending. was called with a timeout that expired. ts points to an illegal address. The reliable detection of this error is implementation dependent. was interrupted by a signal. The timespec pointed to by ts is invalid. sets to one of the following values if it fails: The ukid refers to a non-existent kernel thread. sets to one of the following values if it fails: targets points to an illegal address. The reliable detection of this error is implementation dependent. errors points to an illegal address. The reliable detection of this error is implementation dependent. count is less than 0. count exceeds the maximum value (as returned by A ukid refers to a non-existent kernel thread. postwait(2)
All times are GMT -4. The time now is 12:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy