How to configure X11 for multiple monitors with different refresh rates?

I’m using Kubuntu 19.04, with kscreen removed, and I currently have my xorg.conf file as follows:

Section "ServerLayout"     Identifier     " Configured"     Screen      0  "Screen0" 0 0     InputDevice    "Mouse0" "CorePointer"     InputDevice    "Keyboard0" "CoreKeyboard"     Option         "Xinerama" "0" EndSection  Section "Files"     ModulePath      "/usr/lib/xorg/modules"     FontPath        "/usr/share/fonts/X11/misc"     FontPath        "/usr/share/fonts/X11/cyrillic"     FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"     FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"     FontPath        "/usr/share/fonts/X11/Type1"     FontPath        "/usr/share/fonts/X11/100dpi"     FontPath        "/usr/share/fonts/X11/75dpi"     FontPath        "built-ins" EndSection  Section "Module"     Load           "glx" EndSection  Section "InputDevice"     Identifier     "Keyboard0"     Driver         "kbd" EndSection  Section "InputDevice"     Identifier     "Mouse0"     Driver         "mouse"     Option         "Protocol" "auto"     Option         "Device" "/dev/input/mice"     Option         "ZAxisMapping" "4 5 6 7" EndSection  Section "Monitor"     Identifier     "Monitor0"     VendorName     "Unknown"     ModelName      "GBT AORUS AD27QD"     HorizSync       222.0 - 222.0     VertRefresh     48.0 - 144.0 EndSection  Section "Monitor"     Identifier     "Monitor1"     VendorName     "Unknown"     ModelName      "Ancor Communications Inc ASUS PB278"     HorizSync       24.0 - 99.0     VertRefresh     24.0 - 144.0 EndSection  Section "Device"     Identifier     "Device0"     Driver         "nvidia"     VendorName     "NVIDIA Corporation"     BoardName      "GeForce GTX 1070"     BusID          "PCI:1:0:0" EndSection  Section "Device"     Identifier     "Device1"     Driver         "nvidia"     VendorName     "NVIDIA Corporation"     BoardName      "GeForce GTX 1070"     BusID          "PCI:1:0:0"     Screen          1 EndSection  Section "Screen"     Identifier     "Screen0"     Device         "Device0"     Monitor        "Monitor0"     DefaultDepth    24     Option         "Stereo" "0"     Option         "nvidiaXineramaInfoOrder" "DFP-6"     Option         "metamodes" "DP-4: 2560x1440_144 +0+0 {ForceCompositionPipeline=On, AllowGSYNCCompatible=On}, DP-2: 2560x1440_60 +2560+0"     Option         "SLI" "Off"     Option         "MultiGPU" "Off"     Option         "BaseMosaic" "off"     SubSection     "Display"         Depth       24     EndSubSection EndSection 

However, this doesn’t seem to actually give me 144Hz on my primary monitor. Scrolling in Firefox is very clearly still 60Hz, and the rest of the OS similarly doesn’t seem to be 144Hz, even though xrandr reports 144Hz (I think what’s actually happening is that my mouse is running at 144Hz, but everything else is running at 60Hz):

Screen 0: minimum 8 x 8, current 5120 x 1440, maximum 32767 x 32767 [...] DP-2 connected 2560x1440+2560+0 (normal left inverted right x axis y axis) 597mm x 336mm    2560x1440     59.95*+ [...] DP-3 disconnected (normal left inverted right x axis y axis) DP-4 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 609mm x 355mm    2560x1440     59.95 + 143.97*  120.00   [...] DP-5 disconnected (normal left inverted right x axis y axis) 

If I remove the second monitor (i.e. the PB278) from the config file, such that it is fully disabled, my primary monitor does run at 144Hz.

How do I configure my xorg.conf file such that I can use both monitors at the same time, running my primary display at 144Hz and my secondary at 60Hz?

Implementing OAuth 2 refresh token rotation on web clients

I’m looking to implement refresh token rotation for unauthenticated clients of my OAuth 2 provider. Things are all implemented on the server side, but I’m concerned that web clients will be unable to avoid accidentally using a refresh token twice.

How can refresh token rotation be implemented by a web client? Explanations or examples of places this is implemented are both valid.

Handling refresh token recovation

I’ve been implementing an authentication flow for an app that I’ve been making that uses JWTs. When a user is initially logged in or when they register (which immediately logs them in), I provide an access token and a refresh token. Access token expires every t hours but the refresh token never expires. I want to revoke the tokens when the user logs out.

One approach I’ve heard is that you can store a list of revoked tokens in a database and set a TTL on the document so that the database doesn’t consume too much space.

I’ve also thought about storing a list of active tokens in a database which is sort of the inverse of this but I’ve heard people say that this is a bad idea but it seems to me that it is the same as storing revoked tokens.

Why would you choose to store blacklisted tokens over storing active tokens? Both require a database search. Both remove the statelessness of JWTs.

Is a refresh token an entity or value object?

I have a User entity, which may have a RefreshToken (for authentication).


  • A refresh token doesn’t have “identity”, but is related to a single user – it is only valid for that user. In the db that means a foreign key to users table. In Entity Framework I can however model it as an “owned” type so that it’s part of the users table.
  • A refresh token can be revoked, i.e. deleted from the database
  • A refresh token can be renewed – at the domain level that means replacing the old with a new one, but at the db level that means simply updating the existing record (unless it’s an “owned” type in which case I’ll update the user record)

So, is the RefreshToken an entity or a value object?

Does omniauth-linkedin-oauth2 ruby gem return the refresh token?

I’m using omniauth-linkedin-oauth2 gem but it doesn’t seem to return the refresh token, which I believe I need it to get a new token when the token is expired.

I debugged my app to see what the omniauth response provides me and I do not see a refresh token returned just the token and the expiry date.

Rails.application.config.middleware.use OmniAuth::Builder do   provider :linkedin, ENV['LINKEDIN_CONSUMER_KEY'], ENV['LINKEDIN_CONSUMER_SECRET'], {     :scope => ENV['LINKEDIN_SCOPES'],     :fields => ['id', 'first-name', 'last-name', 'picture-url']   } end 

I’d like to find out if the gem’s supposed to return the refresh token? Or does the gem issue me a new token? Or does it extend the expiry date for an existing token?

PHP = Envia Mensagem + Mensagem Agradecimento + (botão) ou refresh

Boas, Sou bicão e fico mexendo no meu site gostaria da ajuda de vc´s:

Após o cliente enviar mensagem aparecia tela branca com mensagem de agradecimento. Corrigi para retornar ao site mas a mensagem sumiu.

echo   "$  nome,  Email enviado. Breve entraremos em Contato!";  header("Location:"); 

Gostaria de colocar um echo ou script (Já estou me familiarizando com os termos rs rs) de agradecimento e a página retornar ao site sozinho.

tentei algumas coisas copiadas e adaptadas da internet

(<script language="JavaScript" charset="utf-8">alert("$  nome,  Email enviado. Breve entraremos em Contato!")</script> <meta HTTP-EQUIV='refresh' CONTENT='4; URL= '>)  

mas não funcionou


<script> alert(  "$  nome,  Email enviado. Breve entraremos em Contato!)"; </script>” header("Location:"); 

Não funcionou


echo “<script language="JavaScript" charset="utf-8">alert("$  nome,  Email enviado. Breve entraremos em Contato!")</script> <meta HTTP-EQUIV='refresh' CONTENT='4; URL= '> 

Não funcionou

Imagem mostrando as tentativas

Scroll to top and refresh page after user stopped scrolling?

I’m showcasing a web project in a museum setting. It’s a project that relies heavy on scrolling, and needs to be reset between users. The page cannot simply best refreshed, it needs to be scrolled entirely to the top and then refreshed so the next user can see the webpage from the beginning. The refresh is necessary because I need to reset some animations.

I set up a timer that will scroll the page to the top and reload after a user has walked away from the computer. I did some research and this is what I have settled on so far. It resets the page if the user has not scrolled after two minutes:

// Setup isScrolling variable let isScrolling;  // Listen for scroll events window.addEventListener('scroll', event => {      // Clear our timeout throughout the scroll     window.clearTimeout(isScrolling);      // Set a timeout to run after scrolling ends     isScrolling = setTimeout(() => {      // scroll to top and refresh page     console.log('Scrolling has stopped.');     window.scrollTo(0,0);     location.reload();      }, 120000);  }, false); 

However, the downside of this implementation is that an event is firing on every single scroll. I was told about a debouncer which could alleviate this problem:

However, the debouncer code is quite complicated and I don’t know how to integrate it with my needs.

How do I integrate the debouncer? Is what I have now too intensive?

Help with external monitor refresh rate

I have been working on a project, basically converting a tray-loading iMac G3 into a docking station for my 2017 MacBook Pro. I removed the motherboard and was able to find a VGA converter that connects to the DB-15 cable from the iMac’s monitor. After monkeying with the power supply/ATX, I hooked it up to my roommate’s PC, set the resolution at 1024×768 @ 75 hertz and voila! It works great. However, with my USB-C to VGA converter on my MacBook, it doesn’t. The iMac’s onboard monitor is not flexible and won’t run unless at 75hz. I am able to switch to other resolutions in the system preferences, but all of the options are at 60hz. The system seems to recognize the monitor as an LCD panel, I’m not sure if this is an issue? I tried using SwitchResX, but it isn’t able to do anything, despite having disabled Security Integrity Protection. I am not super savvy with MacOS script/patching or whatever the lingo is, so I am desperate for help. Or maybe is this a hardware issue with the MacBook? Anything helps!

Sharepoint 2010 – Refresh Lists

How Can I refresh 4 lists in PowerShell?

My script doesn’t work.

$  web = Get-SPWeb http://Server/ListLocation $  list = $  web.Lists["Tarefas Geral"] foreach ($  item in $  list.Items) {   $  item.UpdateOverwriteVersion(); }  $  list1 = $  web.Lists["Tarefas"] foreach ($  item in $  list1.Items) {   $  item.UpdateOverwriteVersion(); }  $  list2 = $  web.Lists["Tarefas 2"] foreach ($  item in $  list2.Items) {   $  item.UpdateOverwriteVersion(); }  $  list3 = $  web.Lists["Tarefas Jobs"] foreach ($  item in $  list3.Items) {   $  item.UpdateOverwriteVersion(); } 

How can i stop refresh the page in ajax

I want the page dont refresh when I send data with my modal.

$ (‘#exampleModal’).on(‘’, function (event) { event.stopPropagation(); var button = $ (event.relatedTarget) // Button that triggered the modal var recipient =‘whatever’) // Extract info from data-* attributes var modal = $ (this); var dataString = ‘id=’ + recipient; $ .ajax({ method: “GET”, url: “editdata.php”, data: dataString, cache: false, success: function (data) { console.log(data); modal.find(‘.dash’).html(data); }, error: function(err) { console.log(err); } }); })