Sunday, July 21, 2019

How to Reverse the Scrolling Direction in Windows 10 - Appuals.com

How to Reverse the Scrolling Direction in Windows 10 - Appuals.com

EmailThis Premium lets you save unlimited bookmarks, PDF, DOCX files, PPTs and images. It also gives you a PDF copy of every page that you save. Upgrade to Premium →

Windows users can be split into two different types of people. There are the ones that scroll the default way, and some that prefer to use a reversed scrolling direction. I'm a proud member of the default category, but I know some people that regard reversed scrolling to be the "more natural" way.

Reversing the scrolling direction used to be as easy as turning on a switch, but Microsoft decided to make things harder for those who prefer to scroll the "unnatural" way. It's no longer possible to navigate to Devices > Mouse & Trackpad and toggle Reverse scrolling direction.

If you're on one of the latest Windows 10 updates, you can't reverse the scrolling direction as easily anymore. However, it's still possible to do it, but you'll have to take the long route. From our investigations, we discovered three different ways of reversing the scroll direction in Windows 10 (if you're on the latest update).

Method 1 might not be possible to replicate in your situation depending on your laptop manufacturer, but the other two methods should work if followed on any Windows-based computer. If you use a touchpad, stick with Method 1. Let's begin.

Method 1: Reverse the Scrolling Direction of a Touchpad (Touchpad only)

The steps of this method are highly dependable on the manufacturer of your laptop. Most laptop manufacturers use proprietary touchpad technologies, so you can expect your screen to look different than ours. We managed to reverse the scrolling direction of an ELAN Touchpad. If you have an Asus laptop, you should be able to follow this guide with no problems. If not, read the Note paragraphs for additional information.

  1. Press Windows key + I and click on Devices.
  2. Select Touchpad from the left-hand side menu, then click on Additional settings under Related settings.
  3. This is where it starts to be different according to your manufacturer. Once you arrive in the Mouse Properties screen, look for the tab belonging to your Touchpad software. In our case it's ELAN. If it doesn't take you to another window directly, look for an Options button.
    Note: Depending on your manufacturer, the tab can be named Clickpad settings, Smart Gestures, Synaptics or Device Settings. If you can't identify it, note that it's usually located last when counting from the left and it's usually the only tab with a logo.
  4. Look for the Multi-finger tab, select Scrolling and then check the box next to Reverse.
    Note:
    Remember that this menu is likely to look entirely different on your side. Generally, look for an option similar to Two-finger scrolling and look for a reverse toggle.

Method 2: Reversing the Scrolling direction for a Mouse Wheel (Mouse only)

If you decide to use a mouse, reversing the touchpad's settings will not have an effect on the mouse wheel. To change the direction of your mouse wheel, you need to dig deep into your Windows Registry files. Here's what you need to do:

PRO TIP: If the issue is with your computer or a laptop/notebook you should try using Reimage Plus which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Reimage by Clicking Here

  1. Press Windows key + R to open a Run dialog. Type in "devmgmt.msc" and hit Enter.
  2. Expand the drop-down menu within Mice and other pointing devices and double-click on your mouse (HID-compliant mouse).
  3. Expand the Details tab and use the drop-down menu under Property to select Device instance path.
  4. Right-click on the path and select Copy, just to be safe. Once the path is copied to your clipboard, you can safely close Device Manager, but make sure you leave the HID-compliant mouse Properties window open.
    Note: 
    You can make sure you don't lose the path by pasting it into a notepad file. This isn't necessary if you leave the window open.
  5. Press Windows key + R, type "regedit" and press Enter.
  6. In Registry Editor, navigate to HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Enum \ HID.
  7. Compare the registry keys in HID with the path you've discovered in device manager. Once you found a match, click on the folder in Registry Editor to expand it.
  8. Explore the key further until you get to Device Parameters. Click it once to select it, then double-click on FlipFlopWheel.
  9. Set the base to Hexadecimal, then modify the Value data to 1. Click OK and Close Registry Editor to save your configuration.
  10. The changes won't take effect until you restart your computer or log out and in with your user.
    Note: If you want to revert to the default way of scrolling, get back to the FlipFlopWheel in Registry editor and change the Value data to 0.

Method 3: Reversing the Scrolling Direction with a Macro Script (Mouse and Touchpad)

Another way to go around reversing your scrolling direction is to use a software capable of setting up macro scripts. By far, the most reliable way of doing this is with AutoHotkey. It's completely free and the difficulty of utilizing it is minimal. This method will reverse both your touchpad and your mouse wheel scroll direction. Here's what you need to do:

  1. Visit this link and press the Download button to download the freeware, then install it on your computer.
  2. Right-click anywhere on your desktop and create a New Text Document. It doesn't really matter how you name it. At least not right now.
  3. Open the new document and paste the following commands:
    WheelUp::
    Send {WheelDown}
    Return
    WheelDown::
    Send {WheelUp}
    Return
  4. Save your modifications, then change the extension from .txt to .ahk. It will prompt you that the file might become unusable. Ignore it and hit OK.
    Note: If you are unable to view extensions, open a File Explorer window, go to View and check the box next to File Name Extensions.
  5. You should thee the icon of the text file transform into something else as soon as you hit OK. This means that Windows is recognizing it as an AutoHotkey file. Double-click on it to enforce the hotkey and reverse the scrolling of your mouse.
    If you decide to disable the hotkey and revert to the default way of scrolling, press Ctrl + Alt + Delete and click on Task Manager. From there, select the Processes tab and find AutoHotkey Unicode under Background processes. Select it and click End Task to revert to the default scrolling.

Note: Keep in mind that you need to run the script again whenever you restart or turn off your computer.

TIP: If none of the Methods have resolved the issue for you, we recommend using Reimage Repair Tool which can scan the repositories to replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. Reimage will also optimize your system for maximum performance. You can download Reimage by Clicking Here

Source: https://appuals.com/how-to-reverse-the-scrolling-direction-in-windows-10/

Upgrade to Premium Plan

✔ Save unlimited bookmarks.

✔ Save PDFs, DOCX files, images and Excel sheets as email attachments.

✔ Get priority support and access to latest features.

Upgrade to Premium

Saturday, July 20, 2019

How can I monitor the progress of an import of a large .sql file?

How can I monitor the progress of an import of a large .sql file?

EmailThis Premium lets you save unlimited bookmarks, PDF, DOCX files, PPTs and images. It also gives you a PDF copy of every page that you save. Upgrade to Premium →

When you execute a mysqldump of a single database, all tables are dumped in alphabetical order.

Naturally, the reload of the mysqldump into a database would also be in alphabetical order.

You could just do a SHOW PROCESSLIST; and find out the DB Connection running the mysqldump. When the dump is reloaded, the DB Connection will vanish.

If you want to know what tables are in the dumpfile, run this against foobar.sql

cat foobar.sql | grep "^CREATE TABLE" | awk '{print $3}'

UPDATE 2012-05-02 13:53 EDT

Sorry for not noticing that there is only one table.

If the table is MyISAM, the only way to monitor is from the OS point of view. The reason? The table is write-locked throughout the reload. What do you look for? The size of the .MYD and .MYI files. Of course, you need to compare that with what the table size was before on the other DB server you imported from.

If the table is InnoDB and you have innodb_file_per_table enabled, the only way to monitor is from the OS point of view. The reason? The table is write-locked throughout the reload. What do you look for? The size of the .ibd file. Of course, you need to compare that with what the table size was before on the other DB server you imported from.

If the table is InnoDB and you have innodb_file_per_table disabled, not even the OS point of view can help.

UPDATE 2012-05-02 13:56 EDT

I addressed something like this last year : How do I get % progress for "type db.sql | mysql"

UPDATE 2012-05-02 14:09 EDT

Since a standard mysqldump write-locks the table like this:

LOCK TABLES `a` WRITE; /*!40000 ALTER TABLE `a` DISABLE KEYS */; INSERT INTO `a` VALUES (123),(451),(199),(0),(23); /*!40000 ALTER TABLE `a` ENABLE KEYS */; UNLOCK TABLES;

then, there is no way to get a progress from with mysql until the table lock is released.

If you can get LOCK TABLES and UNLOCK TABLES commented out of the dumpfile...

  • if the table is MyISAM, SELECT COUNT(*) would work
  • if the table is InnoDB, SELECT COUNT(*) would probably slow down/halt the load until count is done

Source: https://dba.stackexchange.com/questions/17367/how-can-i-monitor-the-progress-of-an-import-of-a-large-sql-file

Please check the attached file.

EmailThis was not able to extract useful content from the website. Hence, we have saved the webpage to a PDF file. You can find that attached along with this email.

Upgrade to Premium Plan

✔ Save unlimited bookmarks.

✔ Save PDFs, DOCX files, images and Excel sheets as email attachments.

✔ Get priority support and access to latest features.

Upgrade to Premium

Wednesday, July 17, 2019

How to switch Authentication from one user to another using Laravel

How to switch Authentication from one user to another using Laravel

EmailThis Premium lets you save unlimited bookmarks, PDF, DOCX files, PPTs and images. It also gives you a PDF copy of every page that you save. Upgrade to Premium →

Firstly, I login as user X, and I have a function like:

public function loginAs($userId) {     Auth::loginUsingId($userId); // now use Y user     return response()->json(['logged' => Auth::check(), 'user' => Auth::user()]);  }

and when I try to print out Auth::check() it returns TRUE which is fine so far I am logged now as user Y, the thing is that I do first login as an X user and then switch to another Y user but when I do call some other functoins it seems that the current user logged is still X, and I want to be Y the current user logged... This might have to do something with session or I dont know exactly how to do this thing, would be grateful if someone has any sample or have any idea how to achieve such things in Laravel 5.

davejal

4,45999 gold badges2626 silver badges5959 bronze badges

asked Dec 15 '15 at 17:04

ArtanArtan

3111 silver badge33 bronze badges

Can you elaborate? I was able to switch users using the following:

use Auth;  class TempController extends Controller {      public function index() {         $user = User::find(1);         Auth::login($user);         var_dump(Auth::user()->id); // returns 1         Auth::logout();           var_dump(Auth::user()); // returns null          $user = User::find(2);         Auth::login($user);         var_dump(Auth::user()->id); // returns 2         Auth::logout();      } }

routes.php

Route::get('/temp', 'TempController@index');

If you run this, you can see the logged in user's id changes.

answered Jan 18 '16 at 21:29

DecipleDeciple

73811 gold badge88 silver badges1616 bronze badges

answered Mar 1 '17 at 5:57

Sina MiandashtiSina Miandashti

1,56711 gold badge2222 silver badges3737 bronze badges

Not the answer you're looking for? Browse other questions tagged php laravel or ask your own question.

Source: https://stackoverflow.com/questions/34295188/how-to-switch-authentication-from-one-user-to-another-using-laravel

Please check the attached file.

EmailThis was not able to extract useful content from the website. Hence, we have saved the webpage to a PDF file. You can find that attached along with this email.

Upgrade to Premium Plan

✔ Save unlimited bookmarks.

✔ Save PDFs, DOCX files, images and Excel sheets as email attachments.

✔ Get priority support and access to latest features.

Upgrade to Premium