Lock and shorten URLS EARN MONEY – URL shortener with CPA – Other opportunities to earn money

Lock.ist is a URL shortening service combined with content locking. The revenue model for this network is the CPA. You will therefore not be paid for clicks and impressions. Users need to take action such as installing software or filling out a simple form.

How do I get started with Lock.ist?

When you shorten the link using Lock.ist, it will lock automatically. The visitor must perform a simple task to unlock the link. For each task, you receive a commission of $ 0.10 to $ 10.

Payment

You are paid in 2 working days when you reach the minimum payment. The payment option is only Bitcoin. The minimum payment is $ 20.

Reference program

Publishers can earn extra money by referring others to this network. The commission rate is 10% for life.

Best features

-This network accepts members from all over the world.

-You do not need a website or blog to use this service.

-Tools (Website Widget, Browser button and API)

-Reference system

-Members always receive payment on time.

– Dedicated support

For tips and ideas: https://lock.ist/pages/tips-ideas

Reference link: https://lock.ist/ref/MomMoney12

Link: https://lock.ist/

mysql – Shorten the request to retrieve presence data

I have a code that does the following:

  • Get data from the HrAttLogs Table
  • Enter the data of the HrAttLogs Table at the HrAttLogsFormatted Table

I would like to know if the query below, which I will provide, can be improved? In terms of Performance and speed.

SELECT 
    FingerId, 
    ShiftId, 
    DateIn, 
    DateOut, 
    ScanIn, 
    ScanOut, 
    WorkhourIn, 
    WorkhourOut, 
    TIME_IN, 
    TIME_OUT
FROM
    (
    SELECT
        i.FingerId,
        i.ShiftId,
        i.Date AS 'DateIn',
        o.Date AS 'DateOut',
        i.Time AS 'ScanIn',
        CASE WHEN o.Time != i.Time THEN o.Time END AS 'ScanOut',
        CASE
            WHEN i.Time < i.ShiftIn_2 THEN i.WorkhourIn_1
            WHEN i.Time < i.ShiftIn_3 THEN i.WorkhourIn_2
            WHEN i.Time > i.ShiftIn_1 THEN i.WorkhourIn_3
    END AS WorkhourIn,
        /* Added check for Date too.. the last checking is for any overlapping Date */
        CASE WHEN i.Status = 'Rolling' THEN
                CASE
                    WHEN i.DateOut = i.Date AND i.Time > i.ShiftOut_1 THEN i.WorkhourOut_2
                    WHEN i.DateOut = i.Date AND i.Time > i.ShiftOut_2 THEN i.WorkhourOut_3
                    WHEN i.DateOut = i.Date AND i.Time > i.ShiftOut_3 THEN i.WorkhourOut_1
                    WHEN i.DateOut > i.Date THEN i.WorkhourOut_3
                END
        ELSE
            CASE WHEN i.ShiftId != 'Rolling' THEN 
                    CASE WHEN i.DateOut = i.Date AND o.Time > i.ShiftOut_2 THEN i.WorkhourOut_3
                    ELSE i.WorkhourOut_2
                    END
                    WHEN i.DateOut = i.Date AND o.Time > i.ShiftOut_3 THEN i.WorkhourOut_1
            END
        END AS WorkhourOut,
        CASE
            WHEN i.Time < i.ShiftIn_2 THEN TIMEDIFF(i.Time, i.WorkhourIn_1)
            WHEN i.Time < i.ShiftIn_3 THEN TIMEDIFF(i.Time, i.WorkhourIn_2)
            WHEN i.Time > i.ShiftIn_1 THEN TIMEDIFF(i.Time, i.WorkhourIn_3)
        END AS 'TIME_IN',
        CASE WHEN o.Time != i.Time THEN 
            CASE WHEN i.Status = 'Rolling' THEN
                CASE WHEN o.Time > i.ShiftOut_3 THEN 
                    CASE WHEN o.Time > i.ShiftOut_1 THEN 
                        CASE WHEN o.Time > i.ShiftOut_2 THEN TIMEDIFF(o.Time, i.WorkhourOut_2)
                        ELSE TIMEDIFF(o.Time, i.WorkhourOut_1)
                        END
                    ELSE TIMEDIFF(o.Time, i.WorkhourOut_1)
                    END 
                ELSE TIMEDIFF(o.Time, i.WorkhourOut_3)
                END
            ELSE
                CASE WHEN i.Status != 'Rolling' THEN
                    CASE WHEN o.Time > i.ShiftOut_1 THEN
                        CASE WHEN o.Time > i.ShiftOut_2 THEN TIMEDIFF(o.Time, i.WorkhourOut_1)
                        ELSE TIMEDIFF(o.Time, i.WorkhourOut_2)
                        END
                    END
                END
            END
        END AS 'TIME_OUT',
        i.ShiftIn_1,
        i.ShiftIn_2,
        i.ShiftIn_3,
        i.ShiftOut_1,
        i.ShiftOut_2,
        i.ShiftOut_3,
        i.WorkhourIn_2,
        i.WorkhourIn_3,
        i.WorkhourOut_2,
        i.WorkhourOut_3,
        i.Status
    FROM
        ( /* INSERT here */
                SELECT 
                    i.FingerId,
                    fs.ShiftId,
                CASE WHEN i.Status = 0 THEN
                    MIN(i.Date)
                END AS 'Date',
--         MIN(i.Date) AS 'Date',
                /* Added CASE expression to deal with overlapping attendance Date */
                CASE WHEN i.Status = 0 AND MIN(i.Time) >= '19:00:00' 
                     THEN DATE(DATE_ADD(i.Date, INTERVAL + 1 DAY)) 
                ELSE 
                    DATE(DATE_ADD(i.Date, INTERVAL + s.DayOut DAY)) 
                END AS 'DateOut', 
                    CASE WHEN i.Status = 0 THEN
                        i.Time
                    END AS 'Time',
--           MIN(i.Time) AS 'Time',
                    i.Status,
          s.ShiftIn_1,
          s.ShiftIn_2,
          s.ShiftIn_3,
          s.ShiftOut_1,
          s.ShiftOut_2,
          s.ShiftOut_3,
          s.WorkhourIn_1,
          s.WorkhourIn_2,
          s.WorkhourIn_3,
          s.WorkhourOut_1,
          s.WorkhourOut_2,
          s.WorkhourOut_3
        FROM HrAttLogs AS i
        INNER JOIN HrEmployee AS fs ON fs.FingerId = i.FingerId
        INNER JOIN HrEmployeeShift AS s ON s.Id = fs.ShiftId
        WHERE 
            i.Time >= s.ShiftIn_1
            AND i.Date >= '2020-04-07'
            AND i.Date <= '2020-04-09' 
            AND i.MachineIp = '10.20.20.73'
        GROUP BY
                        i.Id,
            i.FingerId, 
            i.Date 
        ) AS i
        LEFT JOIN (
            SELECT
                o.FingerId,
                CASE WHEN o.Status = 1 THEN
                    MAX(o.Date)
                END AS 'Date',
                CASE WHEN o.Status = 1 THEN
                    MAX(o.Time)
                END AS 'Time',
                o.Status
            FROM
                HrAttLogs AS o
            WHERE
                o.Date >= '2020-04-07'
                AND o.Date <= '2020-04-09'
                AND o.MachineIp = '10.20.20.73'
            GROUP BY
                o.Id,
                o.FingerId,
                o.Date
            ORDER BY
                Date ASC,
                Status ASC
        ) AS o ON i.FingerId = o.FingerId 
        AND o.Date = i.DateOut 
        AND o.Time >= '00:00:00'
    ) AS q
WHERE
    FingerId = 61
    AND FingerId IS NOT NULL
    AND ShiftId IS NOT NULL
    AND DateIn IS NOT NULL
    AND DateOut IS NOT NULL
    AND ScanIn  IS NOT NULL
    AND WorkhourIn IS NOT NULL
    AND WorkhourOut IS NOT NULL
    AND TIME_IN IS NOT NULL
    AND TIME_OUT IS NOT NULL
ORDER BY
    q.FingerId ASC,
    DateIn ASC

For more details, I save it here

c – Is there a way to simplify or shorten this chain of conditions in this version comparison code?

I wonder if there is a way to significantly shorten the string of conditions used here to compare two versions. struct VERSIONCODE represents a version number of the form major.minor.revision and CompareVersions Return EQUAL if they are equal; LHS_NEWER if vLHS is more recent, and RHS_NEWER if vRHS is more recent.

typedef enum
{
    EQUAL = 0,
    LHS_NEWER,
    RHS_NEWER
} ECOMPARISON;

// Specifically not named "VERSION" to avoid conflicting with common names from third-party libraries etc.
typedef struct
{
    int nMajor;
    int nMinor;
    int nRev;
} VERSIONCODE;

ECOMPARISON CompareVersions(VERSIONCODE vLHS, VERSIONCODE vRHS)
{
    if (vLHS.nMajor > vRHS.nMajor)
    {
        return LHS_NEWER;
    }
    else if (vLHS.nMajor < vRHS.nMajor)
    {
        return RHS_NEWER;
    }
    else// if (vLHS.nMajor == vRHS.nMajor)
    {
        if (vLHS.nMinor > vRHS.nMinor)
        {
            return LHS_NEWER;
        }
        else if (vLHS.nMinor < vRHS.nMinor)
        {
            return RHS_NEWER;
        }
        else// if (vLHS.nMinor == vRHS.nMinor)
        {
            if (vLHS.nRev > vRHS.nRev)
            {
                return LHS_NEWER;
            }
            else if (vLHS.nRev < vRHS.nRev)
            {
                return RHS_NEWER;
            }
            else// if(vLHS.nRev == vRHS.nRev)
            {
                return EQUAL;
            }
        }
    }
}

currency – How to shorten long numbers?

Since these are UGX and tagged currencies, I guess these are Ugandan shillings.

11 digits is where i am going to stop trying to figure out which number it is and start counting thousands of groups, 11,000,000,000 and 110,000,000,000 11,000,000,000 and 11,000,000,000 are more or less indistinguishable to me.

In an overview of the account, abbreviating it to 1100M is more user-friendly than printing all zeros. At this level, the thousands are not that interesting anyway. In an impression of account activity, each number should be included. Focus on what matters to the user; how many are they likely to want to know from each screen.

Payskip.org – Shorten URLs and earn money

[IMG]

Payskip.org is a completely free tool where you can create short links which, in addition to being free, you get paid!

We offer high cpm rates therefore by default but especially for our loyal users.
See our publisher prices here: https://payskip.org/payout-rates

Advertising rates: https://payskip.org/advertising-rates
If you think your traffic deserves higher cpm rates, you can contact us to request a raise or a fixed cpm …

Payskip.org – Shorten URLs and earn money

Excel – VBA how to shorten the runtime by using functions other than .find

My code here goes through my file and my files inside the folder and uses.find and copy the strings into a new Excel sheet and then with all the data from the new sheet I'm going to use .Find(What:=) to find the strings inside the new worksheet, then split or use the functions Right, Left, Medium, sometimes using replace, however 68 files require 1 minute 30 seconds of execution using this code and I need help to make it a more efficient and faster coding system, please advise me on this! even better if you can provide a little code!

Option Explicit

Sub GenerateData()

    Application.ScreenUpdating = False

    Dim wks As Worksheet
    Dim wkb As Workbook
    Set wkb = ActiveWorkbook
    Set wks = wkb.Worksheets.Add(After:=wkb.Worksheets(wkb.Worksheets.Count), Type:=xlWorksheet)

    ' Add headers data
    With wks
        .Range("A1:K1") = Array("Test", "Temp", "Type", "Start", "FileName", "No", "End", _
        "Month", "Smart", "Errors", "ErrorCellAddress")
    End With

    ' Early Binding - Add "Microsoft Scripting Runtime" Reference
        Dim FSO As New Scripting.FileSystemObject
    ' Set FolderPath
        Dim FolderPath As String
            FolderPath = "c:UsersDesktopTryout"
    ' Set Folder FSO
        Dim Folder As Scripting.Folder
            Set Folder = FSO.GetFolder(FolderPath)

    ' Loop thru each file
        Dim File As Scripting.File
        Dim a As Range, b As Range, c As Range, d As Range, e As Range, f As Range, g As Range, h As Range, l As Range
            For Each File In Folder.Files

            Dim wkbData As Workbook
                Set wkbData = Workbooks.Open(File.Path)

            Dim wksData As Worksheet
                ActiveSheet.Name = "Control"
                Set wksData = wkbData.Worksheets("Control") ' -> Assume this file has only 1 worksheet

        'Format of the data
            Dim BlankRow As Long
                BlankRow = wks.Range("A" & wks.Rows.Count).End(xlUp).Row + 1

        ' Write filename in col E,F,G
            wks.Cells(BlankRow, 5).Value = File.Name
            wks.Cells(BlankRow, 6).Value = File.Name
            wks.Cells(BlankRow, 7).Value = File.Name

        'Find Testtest
            Set a = wksData.Columns("A:A").Find("  testtest         : ", LookIn:=xlValues)
        If Not a Is Nothing Then
            wks.Cells(BlankRow, 1).Value = a.Value
        End If

        'Find Temp
            Set b = wksData.Columns("A:A").Find("  testflyy         : ", LookIn:=xlValues)
        If Not b Is Nothing Then
            wks.Cells(BlankRow, 2).Value = b.Value
        End If

        'Find Type
            Set d = wksData.Columns("A:A").Find("  testflyy         : ", LookIn:=xlValues)
        If Not d Is Nothing Then
            wks.Cells(BlankRow, 3).Value = d.Value
        End If

        'Find start
            Set l = wksData.Columns("A:A").Find("  Started at: ", LookIn:=xlValues)
        If Not l Is Nothing Then
            wks.Cells(BlankRow, 4).Value = l.Value
        End If

        'Find Smart
            Set c = wksData.Columns("A:A").Find("SmartABC ", LookIn:=xlValues)
        If Not c Is Nothing Then
            wks.Cells(BlankRow, 9).Value = c.Value
        Else
            Set f = wksData.Columns("A:A").Find("SmarABCD Version ", LookIn:=xlValues)
        If Not f Is Nothing Then
            wks.Cells(BlankRow, 9).Value = f.Value
        Else
            Set g = wksData.Columns("A:A").Find("smarabcd_efg revision", LookIn:=xlValues)
        If Not g Is Nothing Then
            wks.Cells(BlankRow, 9).Value = g.Value
        End If
        End If
        End If

        'Find Errors
            Set e = wksData.Columns("A:A").Find("ERROR: ABC", LookIn:=xlValues)
        If Not e Is Nothing Then
            wks.Cells(BlankRow, 10).Value = e.Value
            wks.Cells(BlankRow, 11).Value = e.Address
        Else
            Set h = wksData.Columns("A:A").Find("ERROR: EFG", LookIn:=xlValues)
        If Not h Is Nothing Then
            wks.Cells(BlankRow, 10).Value = h.Value
        End If
        End If


        ' Trim and tidy up Data

    'Trim Testtest RowA(1)
    wks.Cells(BlankRow, 1).Replace What:="testtest         : ", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False

    'Trim StartTime RowD(4)
    wks.Cells(BlankRow, 4).Replace What:="  Started at: ", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False

    'Trim Temp RowB(2)
        Dim strSearchB As String, strSearchC As String
        Dim bCell As Range, cCell As Range
        Dim s2 As String, s3 As String
            strSearchB = "  testflow         : B"
            strSearchC = "  testflow         : M"

    Set bCell = wks.Cells(BlankRow, 2).Find(What:=strSearchB, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not bCell Is Nothing Then
        s2 = Split(bCell.Value, ":")(1)
        s2 = Mid(s2, 1, 3)
        bCell.Value = s2
    Else

    Set cCell = wks.Cells(BlankRow, 2).Find(What:=strSearchC, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not cCell Is Nothing Then
        s3 = Split(cCell.Value, ":")(1)
        s3 = Mid(s3, 10, 2)
        cCell.Value = s3
    End If
    End If

    'Trim Type RowC(3)
        Dim strSearchD As String, strSearchE As String
        Dim dCell As Range, eCell As Range
        Dim s4 As String, s5 As String
            strSearchD = "  testflow         : B"
            strSearchE = "  testflow         : M1947"

    Set dCell = wks.Cells(BlankRow, 3).Find(What:=strSearchD, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not dCell Is Nothing Then
        s4 = Split(dCell.Value, "_", 3)(2)
        s4 = Mid(s4, 1, 3)
        dCell.Value = s4
    Else

    Set eCell = wks.Cells(BlankRow, 3).Find(What:=strSearchE, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not eCell Is Nothing Then
        eCell.Value = "123"
    End If
    End If

    'Trim No RowF(6)
        Dim strSearchF As String
        Dim fCell As Range
        Dim s6 As String
            strSearchF = "homebeestrash_archivetreser"

    Set fCell = wks.Cells(BlankRow, 6).Find(What:=strSearchF, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not fCell Is Nothing Then
        s6 = Split(fCell.Value, "treser")(1)
        s6 = Mid(s6, 1, 2)
        fCell.Value = s6
    End If

    'Trim EndDate RowG(7)
        Dim strSearchG As String
        Dim gCell As Range
        Dim s7 As String
            strSearchG = "homebeestrash_archivetreser"

    Set gCell = wks.Cells(BlankRow, 7).Find(What:=strSearchG, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not gCell Is Nothing Then
        s7 = Split(gCell.Value, "reports")(1) 
        s7 = Split(s7, "Report")(0) 
        s7 = Left(s7, 8) & " " & Right(s7, 6) 
        'Month Row H(8)
        wks.Cells(BlankRow, 8).Value = WorksheetFunction.Transpose(Left(s7, 4) & "-" & Mid(s7, 5, 2) & "-" & Mid(s7, 7, 2)) 
        gCell.Value = s7
    End If
        wks.Cells(BlankRow, 8).NumberFormat = "($-en-US)mmmm d, yyyy;@" 'Set Date format

    'Trim Smart
        Dim strSearchST As String
        Dim stCell As Range
        Dim s8 As String
            strSearchST = "This is "

    Set stCell = wks.Cells(BlankRow, 9).Find(What:=strSearchST, LookIn:=xlFormulas, _
        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
        MatchCase:=False, SearchFormat:=False)

    If Not stCell Is Nothing Then
        s8 = Split(stCell.Value, "This is ")(1)
        s8 = Mid(s8, 1, 29)
        stCell.Value = s8
    End If

    wkbData.Close False
    Next File

    'Add AutoFilter
    Dim StartDate As Long, EndDate As Long

    With wks.Cells(BlankRow, 8)
        StartDate = DateSerial(Year(.Value), Month(.Value), 1)
        EndDate = DateSerial(Year(.Value), Month(.Value) + 1, 0)
    End With

    wks.Cells(BlankRow, 8).AutoFilter Field:=5, Criteria1:=">=" & StartDate, Operator:=xlAnd, Criteria2:="<=" & EndDate
    If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData

End Sub
```

novice – Shorten function calls with closures

I've written this code that makes several times a long function call using some of the same parameters

match key {
    Key { code: KeyCode::Left, .. } => self.map.move_object_by(PLAYER, -1, 0),
    Key { code: KeyCode::Right, .. } => self.map.move_object_by(PLAYER, 1, 0),
    Key { code: KeyCode::Up, .. } => self.map.move_object_by(PLAYER, 0, -1),
    Key { code: KeyCode::Down, .. } => self.map.move_object_by(PLAYER, 0, 1),
}

I was looking for a way to shorten this function call with something similar to C / C ++ macros. I have looked at Rust macros, but they are clearly very different. The solution I found is to create a function pointer on a closure that calls the function. self.map.move_object_by

let mut move_player = |x, y| self.map.move_object_by(PLAYER, x, y);

match key {
    Key { code: KeyCode::Left, .. } => move_player(-1, 0),
    Key { code: KeyCode::Right, .. } => move_player(1, 0),
    Key { code: KeyCode::Up, .. } => move_player(0, -1),
    Key { code: KeyCode::Down, .. } => move_player(0, 1),
}

Is it bad? Will this cause real slowdowns or bugs? Are there other / better ways to do it?

calculation and analysis – [NOOB]How can I shorten the time to integrate this feature?

I'm trying to set the function "Cumul1". by integrating other relevant functions. The problem is that since the relevant functions consist of special functions and a set of terms, the calculation literally requires an eternity of time. This is not optimal for my goal, which is to maximize "Cumul1" by varying the range of integration. I've tried to find the solution and I've had some tips, such as using NIntegrate, but most of them are not applicable to my case because my code d & # 39; Integration includes a variable within integral limits. So I want to ask … How can I shorten this integration?

fc = 40*10^3
fs = 80*10^3
t1 = 3.9*10^-3
t0 = 6.9*10^-3
nr = Round(0.00204361*fc)
n1 = Round(t1*fc)
n0 = Round(t0*fc)
u0 = 0
u1 = 0.37*10^-9
Prob0(x_) = 1/2 (1 + Erf((x - u0)/s))
Prob1(x_) = 1/2 (1 + Erf((x - u1)/s))
N1(x_) = E^((1 - x)/n1)/(n1 (1 - E^(2 - nr/n1)))
N0(x_) = E^((1 - x)/n0)/n0
S(n_, x_) = (n/nr Prob1(x) + (nr - n)/nr Prob0(x))^nr
Cumul1(x_) = Integrate(N1(t) (Integrate(N0 (n) S(n, x), {n, 1, nr - t}) + Integrate(N0(n) S(n, x), {n, nr - t, Infinity})), {t, 1, nr - 1})

Can any one shorten this code

import turtle

a = turtle.Turtle ()
a speed (0)
for i in the range (2):
a.before (150)
a.left (90)
a.before (100)
a.left (90)
a.penup ()
a.goto (47, 40)
a.pendown ()
for i in the range (2):
a.before (150)
a.left (90)
a.before (100)
a.left (90)
a.right (140)
a.before (60)
a.penup ()
a.goto (45,140)
a.pendown ()
a.before (60)
a.penup ()
a.goto (198,40)
a.pendown ()
to come (62)
a.penup ()
a.right (130)
before (138)
a.right (90)
a.before (45)
a.right (140)
a.pendown ()
to come (62)
a.penup ()
a.goto (4,55)
turtle.done ()

calculation and analysis – How to shorten the length of the tangent line

I have all the necessary equations to manipulate the tangent line on the graph … but the tangent line is too long, what would be the best way to shorten it?

f (x_) = Sin (x);

Plot (f (x), {x, -2 Pi, 2 Pi})

tangent (f_, a_, x_): = f (a) (x – a) + f (a)

Manipulate(Plot({f(x), tangent(f, p, x)}, {x, -2 Pi, 2 Pi}, Epilog -> {Red, PointSize(.015), Point@{p, Sin(p)}}), {p, -Pi, Pi})