home.social

#requires — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #requires, aggregated by home.social.

  1. The Digital Networks Act: a reform that requires strategic attention for satellite operators
    atlas.whatip.xyz/post.php?slug
    <p>Satellite operators seeking EU market access may face a fundamental shift in how spectrum is authorized
    #satellite #operators #networks #requires

  2. The Digital Networks Act: a reform that requires strategic attention for satellite operators
    atlas.whatip.xyz/post.php?slug
    <p>Satellite operators seeking EU market access may face a fundamental shift in how spectrum is authorized
    #satellite #operators #networks #requires

  3. Windows users mostly dislike the command-line. This GUI utility is useful.

    autohotkey.com/

    ```
    #Requires AutoHotkey v2.0

    #SingleInstance Force

    MainGui := Gui("+AlwaysOnTop", "CSV to XLSX Converter")
    MainGui.SetFont("s10", "Segoe UI")

    MainGui.Add("Text",, "Input CSV File:")
    EditFile := MainGui.Add("Edit", "w400 ReadOnly", "No file selected...")
    MainGui.Add("Button", "x+10 w80", "Browse").OnEvent("Click", SelectFile)

    MainGui.Add("Text", "xm", "Output Folder:")
    EditDir := MainGui.Add("Edit", "w400 ReadOnly", "No folder selected...")
    MainGui.Add("Button", "x+10 w80", "Browse").OnEvent("Click", SelectFolder)

    MainGui.Add("Text", "xm h10", "") ; Spacer
    BtnConvert := MainGui.Add("Button", "xm w100 h40 Default", "Convert Now")
    BtnConvert.OnEvent("Click", RunConversion)

    MainGui.Show()

    SelectFile(*) {
    Selected := FileSelect(3, , "Select your CSV file", "CSV Files (*.csv)")
    if Selected
    EditFile.Value := Selected
    }

    SelectFolder(*) {
    Selected := DirSelect(, 3, "Select the destination folder")
    if Selected
    EditDir.Value := Selected
    }

    RunConversion(*) {
    InputPath := EditFile.Value
    OutputDir := EditDir.Value

    if (InputPath = "No file selected..." || OutputDir = "No folder selected...") {
    MsgBox("Please select both a file and a destination!", "Missing Info", "Icon!")
    return
    }

    FullCommand := 'csv2xlsx.exe -o="' . OutputDir . '\output.xlsx" ' . InputPath

    try {
    RunWait(FullCommand)
    MsgBox("Success! The file has been converted.", "Done", "Iconi")
    } catch {
    MsgBox("Error.", "Execution Failed", "Iconx")
    }
    }
    ```
    #autohotkey #gui #coding

  4. I set up an #AutoHotKey macro to pause/resume #Audacity when recording audio. The pause/break key works wonderfully as a cough button.

    ```
    #Requires AutoHotkey v2.0

    #r:: { ; Windows+R: Record
    if WinExist("ahk_exe audacity.exe") {
    hwnd := WinExist("ahk_exe audacity.exe") ; Get the Audacity window handle
    if hwnd {
    PostMessage(0x100, 0x52, 0, , hwnd) ; WM_KEYDOWN message for Space key
    PostMessage(0x101, 0x52, 0, , hwnd) ; WM_KEYUP message for Space key
    }
    }
    }

    #s:: { ; Windows+S: Stop/Play
    if WinExist("ahk_exe audacity.exe") {
    hwnd := WinExist("ahk_exe audacity.exe") ; Get the Audacity window handle
    if hwnd {
    PostMessage(0x100, 0x20, 0, , hwnd) ; WM_KEYDOWN message for Space key
    PostMessage(0x101, 0x20, 0, , hwnd) ; WM_KEYUP message for Space key
    }
    }
    }

    #p::PauseResume() ; Windows+P
    Pause::PauseResume() ; Pause/Break key

    PauseResume() {
    if WinExist("ahk_exe audacity.exe") {
    hwnd := WinExist("ahk_exe audacity.exe") ; Get the Audacity window handle
    if hwnd {
    PostMessage(0x100, 0x50, 0, , hwnd) ; WM_KEYDOWN message for Space key
    PostMessage(0x101, 0x50, 0, , hwnd) ; WM_KEYUP message for Space key
    }
    }
    }
    ```

  5. Switzerland federal government #requires releasing its software as #open #source
    The United States remains reluctant to work with open source, but European countries are bolder

    zdnet.com/article/switzerland-

  6. CW: Оголошення обмежень після класу/структури в C++

    У C++20 зʼявились концепти й обмеження для функцій, класів/структур та інших шаблонів. Для функцій та методів вимоги можна вказувати після оголошення шаблону або після функції.

    template<typename T>
        requires ...
    T f() {}
    
    template<typename T>
    T f() requires ... {}
    

    Якщо не шаблонний метод у шаблоні класу потребує додаткових вимог їх можна вказати після оголошення методу.

    template<typename T>
    class S {
        T f() requires integer<T> {}
    };
    

    У такому випадку клас може згенеруватись з будь-яким типом, але це метод буде присутній тільки якщо шаблонний тип відповідає вимогам.

    Але іноді може знадобитись використати поточний клас у вимогах. Наприклад при CRTP.

    template<typename D>
    class Base requires std::derived_from<D, Base> {...};
    

    На жаль зараз такого немає.

    #cpp #cxx #cpp20 #concepts #constrains #requires #class #template #struct #CRTP #proposal #програмування #шаблони #вимоги #обмеження #пропозиція

  7. @kingu @hypolite
    #Requires AutoHotkey v2.0
    Launch_Media::SendText "#NowPlaying " A_Clipboard
  8. @fireborn Pretty easy to do with #AutoHotkey. I've used {CapsLock} instead of {Win} to avoid conflicts with my own keyboard shortcuts:

    #Requires AutoHotkey v2.0

    #HotIf GetKeyState("CapsLock", "T")
    w & g::Run("google.com/")
    w & r::Run("reddit.com/")
    a & w::Run("winword")

    (when CapsLock is "On", "a" and "w" at the same time will open MS Word)

    Other ideas:
    - Having the keys and what's opened in a JSON or CSV file
    - Compiling the script
    - Showing the "layers" with a GUI

  9. # Here’s what’s left for the Supreme Court’s final week of the term

    * The
    #SupremeCourt (#SCOTUS) is expected to release several major #decisions in its final week of the term, including rulings on #AffirmativeAction, #StudentLoan #payments, #ElectionLaw, and #LGBTQrights.
    * The affirmative action case, Fisher v. University of Texas, could have a significant impact on college admissions policies across the country.
    * The student loan case, Biden v. California, could determine whether the Biden administration can cancel student loan debt.
    * The election law case, Moore v. Harper, could weaken state and federal election laws.
    * The
    #LGBTQ #rights case, Fulton v. City of Philadelphia, could determine whether #businesses can #refuse to #serve #LGBTQ people on #religious grounds.
    * The Supreme Court is expected to release its decisions on these cases by the end of the week.
    * The decisions could have a major impact on American society, and they are being closely watched by both sides of the political spectrum.
    * The affirmative action case is a challenge to the University of Texas's affirmative action program, which considers race as one factor in admissions decisions.
    * The student loan case is a challenge to the Biden administration's plan to cancel up to $10,000 in student loan debt for borrowers.
    * The election law case is a challenge to a North Carolina law that makes it more difficult for people to vote by mail.
    * The LGBTQ rights case is a
    #challenge to a #Philadelphia #law that #requires #businesses that contract with the city to serve LGBTQ people.


    https://www.cnn.com/2023/06/26/politics/supreme-court-final-week-preview/index.html

  10. @rmdes @mitexleo @marketingleben Thanks for your answer, but for the #user your statement "Pixelfed is an attempt to get close to a neat photo experience." refers to the #client. The user doesn't mind what #server software the client connects to. My question was what #part of that photo experience (yes, "in the long run") #requires a server software that is #different from the Mastodon server software. In other words: What #Pixelfed feature can't be implemented in a photo focussed #Mastodon app?

  11. @laage @codykonior The other thing you can do if this is a script is to use a #requires statement: #requires -module MicrosoftTeams