vi /usr/local/etc/httpd/httpd.conf
Make chnage to those lines link
Listen 80
DocumentRoot /Users/your_user/Sites
<Directory "/Users/your_user/Sites">
AllowOverride All
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
| var years = [2022,2021,2020,2019,2018,2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,1977,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1951]; | |
| var config = { | |
| count: 0, | |
| make: 0, | |
| model: 0, | |
| submodel: 0, | |
| }; | |
| function syncStore(callback) { |
| var years = [2022,2021,2020,2019,2018,2017,2016,2015,2014,2013,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992,1991,1990,1989,1988,1987,1986,1985,1984,1983,1982,1981,1980,1979,1978,1977,1976,1975,1974,1973,1972,1971,1970,1969,1968,1967,1966,1965,1964,1963,1962,1961,1960,1959,1958,1957,1956,1955,1954,1953,1952,1950]; | |
| var config = { | |
| count: 0, | |
| make: 0, | |
| model: 0, | |
| }; | |
| function syncStore(callback) { | |
| if (years.length > config.count) { |
| var dataProducts = []; | |
| var totalProducts = 0; | |
| var dataLoaded = false; | |
| var totalPage = 0; | |
| var maxLimit = 13000; | |
| function getCategory(type, total = 0) { | |
| var brand = $("#brand option:selected").val(); | |
| var year = $("#years option:selected").val(); | |
| var make = $("#make option:selected").val(); | |
| var model = $("#model option:selected").val(); |
| var dataProducts = []; | |
| var totalProducts = 0; | |
| var dataLoaded = false; | |
| var totalPage = 0; | |
| var maxLimit = 5000; | |
| function getCategory(type, total = 0) { | |
| var brand = $("#brand option:selected").val(); | |
| var year = $("#years option:selected").val(); | |
| var make = $("#make option:selected").val(); | |
| var model = $("#model option:selected").val(); |
| var dataProducts; | |
| var totalProducts = 0; | |
| var currentCount = 0; | |
| function getCategory(type) { | |
| var brand = $("#brand option:selected").val(); | |
| var year = $("#years option:selected").val(); | |
| var make = $("#make option:selected").val(); | |
| var model = $("#model option:selected").val(); | |
| var subModel = $("#subModel option:selected").val(); | |
| var engine = $("#engine option:selected").val(); |
vi /usr/local/etc/httpd/httpd.conf
Make chnage to those lines link
Listen 80
DocumentRoot /Users/your_user/Sites
<Directory "/Users/your_user/Sites">
AllowOverride All
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
| { | |
| "HorizonLayout": [ | |
| { | |
| "layout": "logo", | |
| "showMenu": false, | |
| "showSearch": true | |
| }, | |
| { | |
| "layout": "bannerImage", | |
| "items": [ |
| --- | |
| METHOD 1 | |
| This should roughly sort the items on distance in MySQL, and should work in SQLite. | |
| If you need to sort them preciser, you could try using the Pythagorean theorem (a^2 + b^2 = c^2) to get the exact distance. | |
| --- | |
| SELECT * | |
| FROM table | |
| ORDER BY ((lat-$user_lat)*(lat-$user_lat)) + ((lng - $user_lng)*(lng - $user_lng)) ASC |
ESLint requires a few additional configurations to be set up optimally for use with Next JS.
To start off with, install eslint, eslint-plugin-react,
npm i --save-dev eslint eslint-plugin-react
Next, create a .eslintrc file using the following:
eslint --init