Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

fat_boy

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    fat_boy got a reaction from rallport in Can a company sue me for deleting "My Work"?   
    Thank you guys, I will take your advices Its time to let go and move on.
     
     
    Long story mate, but it all came down to money. They told me if the company made this amount of income, I would get certain amount of bonus percentage. But I didn't get anything. No payrise, No bonus. After 3 years and few months I was on the same pay as I first started. So i got a little bit upset because I did not get what they promised me. They refused to give me what I was meant to get and things started to get ugly.
     
    After that day, me and the boss didn't get along. Since it is a family business, the father, mother, husband, cousin all worked in the office in different departments, it was hard for me to work there any longer. And they got rid of me.
     
    But now I'm paid in full after threatening them the sort of damage I could do to them. I've handed over all the work, usernames and password.
     
    Time to update my cv and portfolio now
  2. Like
    fat_boy reacted to wesh.uk in Unlimited Domain Name Hosting?   
    Hey Fat_boy
     
    Its worth having a good read through here, you will learn a lot from previously asked questions...
    As for your question, thats really one for your brother and/or his hosting company to answer for you, depends how they have things setup.
     
    Good luck with it :-)
  3. Like
    fat_boy reacted to PHP Monkey in Adding cost to distance already calculated.   
    I got it working.
     
    I've added a new variable called costPerKM.
     
    Further down in the populateTable function, I appended ".replace(' km', '')" to the rvalue of the distance variable leaving only the number. I then created a variable called cost which multiples costPerKM by distance (works now that its a number) and adds it in to the table cell innerHTML.
     

    <script type="text/javascript"> // Arrays for the origins and destinations inputs var origins = new Array(); var destinations = new Array(); // Initial query parameters var query = { travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.METRIC }; // Google Distance Matrix Service var dms; // Interval and Limit values for tracking origins groupings (for staying within QUERY_LIMIT) var originsInterval = 0; var originsLimit; var costPerKM = 1.20; // Query Limit - 100 is the non-premier query limit as of this update var QUERY_LIMIT = 100; /* * Updates the query, then uses the Distance Matrix Service */ function updateMatrix() { updateQuery(); dms.getDistanceMatrix(query, function(response, status) { if (status == "OK") { populateTable(response.rows); }else{ alert("There was a problem with the request. The reported error is '"+status+"'"); } } ); } /* * Generates a table in 'matrix' element for populating dms results */ function createTable() { var table = document.getElementById('matrix'); var tr = addRow(table); addElement(tr); for (var j = 0; j < destinations.length; j++) { var td = addElement(tr); td.setAttribute("class", "destination"); td.appendChild(document.createTextNode(destinations[j])); } for (var i = 0; i < origins.length; i++) { var tr = addRow(table); var td = addElement(tr); td.setAttribute("class", "origin"); td.appendChild(document.createTextNode(origins[i])); for (var j = 0; j < destinations.length; j++) { var td = addElement(tr, 'element-' + i + '-' + j); } } } /* * Retrieves origins and destinations from textareas and * determines how to build the entire matrix within query limitations */ function getInputs(){ var originsString = document.getElementById('origins').value; var destinationsString = document.getElementById('destinations').value; origins = originsString.split("|"); destinations = destinationsString.split("|"); query.destinations = destinations; originsLimit = Math.floor(QUERY_LIMIT/destinations.length); if(originsLimit > 25){ originsLimit = 25; } } /* * Updates the query based on the known sizes of origins and destinations */ function updateQuery(){ if(origins.length * destinations.length < QUERY_LIMIT && originsLimit < 25){ query.origins = origins; originsInterval=1; }else{ query.origins = origins.slice(originsLimit*originsInterval,originsLimit*(originsInterval+1)); originsInterval++; } } /* * Initializes the matrix data and pulls the first set of near 100 results */ function matrixInit(){ dms = new google.maps.DistanceMatrixService(); getInputs(); createTable(); updateMatrix(); disableButton('initButton'); } /* * Accepts rows and populates table content. Error validation is limited to the "ZERO_RESULTS" * return status. originsLimit and originsInterval are used to find the correct table cell. */ function populateTable(rows) { var elementX; for (var i = 0; i < rows.length; i++) { for (var j = 0; j < rows[i].elements.length; j++) { elementX = originsLimit*(originsInterval-1) + i; if(rows[i].elements[j].status != "ZERO_RESULTS"){ var distance = rows[i].elements[j].distance.text.replace(' km', ''); var duration = rows[i].elements[j].duration.text; // calculate cost by multiplying costPerKM (initialized on line 25). var cost = costPerKM * distance; var td = document.getElementById('element-' + elementX + '-' + j); // include cost in results. td.innerHTML = distance + " km <br />" + duration + "<br />£" + cost; }else{ var td = document.getElementById('element-' + elementX + '-' + j); td.innerHTML = "No results available," + "<br />" + "Check your location."; } } } if(origins.length <= elementX+1){ disableButton('updateButton'); enableButton('clearButton'); }else{ disableButton('updateButton'); setTimeout("enableUpdateButton()",10000); document.getElementById('updateButton').value="Wait 10 seconds..."; } } /* * Updates the query parameter for unitSystem when the unit select option is changed */ function updateUnits() { switch (document.getElementById("units").value) { case "km": query.unitSystem = google.maps.UnitSystem.METRIC; break; case "mi": query.unitSystem = google.maps.UnitSystem.IMPERIAL; break; } updateMatrix(); } /* * Adds a row to the provided table element */ function addRow(table) { var tr = document.createElement('tr'); table.appendChild(tr); return tr; } /* * Adds a cell with provided id to the provided row */ function addElement(tr, id) { var td = document.createElement('td'); if (id) { td.setAttribute('id', id); } tr.appendChild(td); return td; } /* * Disables a button using the provided elementId */ function disableButton(buttonId){ document.getElementById(buttonId).disabled=true; } /* * Enables a button using the provided elementId */ function enableButton(buttonId){ document.getElementById(buttonId).disabled=false; } /* * Renames the updateButton and enables it. */ function enableUpdateButton(){ enableButton('updateButton'); document.getElementById('updateButton').value="Add more values"; } /* * Clears the results table and resets button states */ function clearTable(){ var table = document.getElementById('matrix'); var rowCount = table.rows.length; for(var i=0; i<rowCount; i++) { table.deleteRow(0); } originsInterval = 0; originsLimit = null; disableButton('clearButton'); enableButton('initButton'); } </script>
  4. Like
    fat_boy reacted to lewis12 in My First Ever Website   
    not really a joomla kinda guy, but try looking through http://extensions.joomla.org/search?q=booking+system i'm more of a wordpress person so i dont know much about joomla but i was looking around for a booking system not long ago and their seemed to be plenty on their i just didn't want to learn joomla!
     
    Lewi
  5. Like
    fat_boy reacted to Adamoverload in My First Ever Website   
    Pretty sure it will be using an API such as Google Maps which you'll have to look into. Then some form of a cost algorithm to estimate the fare.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.