Monday 8 May 2017

Alexa, what if my daughter is called Alexa? How to change it.

As I've seen many adverts for the Amazon Echo speaker device, and I have a friend who's name is Alexa, I wondered what could be done to stop the Echo / dot from responding everytime someone speaks to my Alexa, or at least calling her name.

A quick look on the internet revealed that you can't change the Echo / dot's name, but you can change the call sign or watch word.

Here are the available options and how to change it.

original
https://www.howtogeek.com/249342/how-to-change-the-amazon-echos-wake-word/


Home, Settings, Alexa Devices, "Wake Word"


or from the app




  • Tap the Alexa icon to begin.
  • On the Home screen, tap the “hamburger menu” icon in the upper left-hand corner of the app’s screen.
  • Tap “Settings” from the menu that appears.
  • On the Settings screen, tap the device you wish to change the wake word on.
  • On the next screen, scroll down until You find the “Wake Word” menu option. Tap it.
  • Tap the pull-down menu to display the available wake words for your device. At the time of this article, the available choices are Alexa, Amazon, Echo, and Computer.
  • Tap the “SAVE” button to save your selection.
  • The app will tell you when your changes have been saved.
  • Use your new wake word to wake up Alexa on your Amazon device.

Options for name include  Alexa, Computer, Amazon, Echo and Computer.

Thursday 6 April 2017

how to automate capture leads in salesforce [ partial answer, but the closest you'll get ]

Here was my dilemma, the need to automate the submission of a SalesForce web to lead form.
Seems simple  right ? But this is for a well known national brand with a highly precious design team.

There were 2 sorts of official answer out there including the salesforce forums.

1. just use the salesforce web to lead form html and restyle it
2. it cant be done - script automation / security errors

Here's the reason why salesforce doesn't want you to automate the submission of the form using javascript - hackability! Basically nasty values can be sent through javascript and denial of service attacks / cracking attacks can happen. Your innocent website could be used by someone to inject and spoil your precious salesforce org.

OK, so given the impossibility factor, I took on the challenge and built the code on my server to act as a gateway. This way I can now send a lead to salesforce using javascript without the need for any design changes or costly use of SalesForce API. My gateway service can also translate values from the website to SalesForce.

Here's how the salesforce lead gateway works

SalesForce Lead Gateway - Javascript and PHP
SalesForce Lead Gateway

So, now the leads come through without having to modify any of the original website
contact mark@hopgood.eu to do this on your website.

Thursday 30 March 2017

Windows 10 - how to reduce size of Datastore.edb example script and screenshots

Windows 10 - how to reduce size of Datastore.edb

ANSWER: defrag the database using esentutl.exe

Here's what I did

open up cmd as administrator
(click windows start and type cmd, right click command prompt and choose run as administrator)

Then in commmand prompt, which should already be at C:\Windows\system32>
type

esentutl /d C:\Windows\SoftwareDistribution\DataStore\DataStore.edb

Here's the output from the program

C:\WINDOWS\system32>esentutl /d C:\Windows\SoftwareDistribution\DataStore\DataStore.edb

Extensible Storage Engine Utilities for Microsoft(R) Windows(R)
Version 10.0
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating DEFRAGMENTATION mode...
            Database: C:\Windows\SoftwareDistribution\DataStore\DataStore.edb

                  Defragmentation Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................


Moving '.\TEMPDFRG18068.EDB' to 'C:\Windows\SoftwareDistribution\DataStore\DataStore.edb'... DONE!

Moving '.\TEMPDFRG18068.jfm' to 'C:\Windows\SoftwareDistribution\DataStore\DataStore.jfm'... DONE!

Note:
  It is recommended that you immediately perform a full backup
  of this database. If you restore a backup made before the
  defragmentation, the database will be rolled back to the state
  it was in at the time of that backup.

Operation completed successfully in 10.797 seconds.


C:\WINDOWS\system32>


Now i have an extra 1024MB free - makes the difference on windows10!

Monday 30 January 2017

how to create a floating draggable iframe ontop of a web page

As a business consultant working with websites and business systems I get asked to enhance existing sites on a regular basis.

Here's a challenge I was given. In a CRM system, I was asked to display a message if a lead was a potential duplicate.

http://jsfiddle.net/marknhopgood/62q1ux30/5/

The above was my prototype pop up showing BBC weather in an iframe.

You can add using the following html only...

<style>
#draggable-element {
  left: 100px;
  top: 50px;
  width:270px;
  height:240px;
  background-color:#fefefe;
  display: none;
  color:white;
  border-radius: 10px;
  padding:17px;
   box-shadow: 5px 5px 10px 2px #888888;
  cursor:move;
  position:absolute;
  xposition:relative; /* important (all position that's not `static`) */

}
</style>



<div id="draggable-element"></div>
myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest


<script>

var selected = null, // Object of the element to be moved
    x_pos = 0, y_pos = 0, // Stores x & y coordinates of the mouse pointer
    x_elem = 0, y_elem = 0; // Stores top, left values (edge) of the element

// Will be called when user starts dragging an element
function _drag_init(elem) {
    // Store the object of the element which needs to be moved
    selected = elem;
    x_elem = x_pos - selected.offsetLeft;
    y_elem = y_pos - selected.offsetTop;
}

// Will be called when user dragging an element
function _move_elem(e) {
    x_pos = document.all ? window.event.clientX : e.pageX;
    y_pos = document.all ? window.event.clientY : e.pageY;
    if (selected !== null) {
        selected.style.left = (x_pos - x_elem) + 'px';
        selected.style.top = (y_pos - y_elem) + 'px';
    }
}

// Destroy the object when we are done
function _destroy() {
    selected = null;
}

// Bind the functions...
document.getElementById('draggable-element').onmousedown = function () {
    _drag_init(this);
    return false;
};

//load in advance
document.getElementById('draggable-element').innerHTML = '<iframe  src="http://www.bbc.co.uk/weather/tn13" scrolling="no" style="height: 240px; border: 0px none; width: 255px; margin-bottom: 0px; margin-left: 8px;">  </iframe>';


function showall(){
var myPop = document.getElementById('draggable-element');
myPop.style.display = 'block';
}

setTimeout(function(){ showall(); }, 1000);


document.onmousemove = _move_elem;
document.onmouseup = _destroy;
</script>


============== BELOW IS THE CODE - view source to check =================

myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest myTest END

Tuesday 29 November 2016

How to arrange a funeral and get help with paying for it [ANSWERED]

If a close friend or relative has died, then arranging a funeral may be your responsibility.


A funeral is a get together following a friend or relative's death.

See also - what to do if you discover a friend or relative has died.

The dead person's wishes. You don't have to legally adhere to this, however the person who has died may have left instructions on what to do following a person's death. More importantly it may be appropriate to consult with the nearest living relatives and closest friends for advice on what the dead person (deceased may have wanted).

Comitting to 'what they would have wanted' depends on a range of factors, including practicality, budget and desires of remaining relatives.

The local health authority will arrange for a simple funeral if none is organised. This may be an alternative if there is no budget, or you would rather spend the budget on a celebration or something else.

Arranging a funeral
Typically a funeral director will work with you. There is a National Association of Funeral Directors - NAFD and a Society of Allied Independent Funeral Directors - SAIF, In addition, some local authorities also run their own funeral services in conjunction with a local firm of funeral directors.

You can arrange everything yourself - the Natural Death Centre or Cemeteries and Cremation department of the local authority of the deceased can help.

An example on getting help with payment would be through the council - here's Sevenoaks District Council's advice on this.

http://www.sevenoaks.gov.uk/services/housing/deaths-funerals-and-cremations/welfare-funerals

Associated costs
If you arrange a funeral with a funeral director, you are required to pay. Make sure you get a price list up front. Ask for an itemised quote if not offered one. If you want to compare costs, either approach another firm or get someone else or a friend to do this. One approach is to state your budget and see what services are available.

Parts of the funeral.
Consider 3 parts to your funeral.
1. caring for the deceased's body - how will the body be formally laid to rest.
2. a formal service might involve a religious venue to allow family members to grieve
3. an informal party or wake that would allow friends or distant relatives to attend and celebrate - if this is at the weekend or the evening it may allow others to join in that wouldn't have otherwise had the chance.

Here's information from the citizens advice bureau
https://www.citizensadvice.org.uk/relationships/death-and-wills/funeral-services/arranging-a-funeral/


Services provided by funeral directors

A basic funeral is likely to include:
  • a plain, lined coffin
  • transport of the body of the person who has died to the funeral director's premises, usually up to ten miles from wherever the death occurred
  • the care of the person who has died until the funeral. This will include washing and dressing the person who has died and laying the body out, but will not include embalming
  • providing a hearse to take the body to the nearest crematorium or burial ground
  • providing the necessary people to carry the coffin
  • making all other necessary arrangements, for example, getting the required forms.
Other services funeral directors could provide, or which you may want to sort out elsewhere are:
  • flowers
  • a more expensive coffin and fittings
  • press notices
  • a medical certificate required for cremation, and any doctor's fees for signing this
  • an organist
  • fees for religious services
  • a burial or crematorium fee. The burial fee will usually include the costs of preparing the grave
  • extra cars
  • embalming
  • extra services by the funeral director, for example, use of the Chapel of Rest, transport from the mortuary, or special viewing arrangements
  • the cost of journeys of more than ten miles to the funeral director's premises
  • a memorial
  • catering arrangements
  • stationery.

Signing a contract

You may need to sign a contract with the funeral director. Make sure you read it carefully and ask the funeral director about anything you don’t understand.

Paying for the funeral

Some funeral directors might ask for a deposit before making the funeral arrangements.  
You may be offered a discount to pay for the funeral before or soon after it takes place. If you know the money will be released at a later date to cover the cost, you might want to consider a bank loan or overdraft to pay early.
Money may be released later, if the person who has died made arrangements to pay for their funeral through an insurance or other policy, or if money is released after their estate has been dealt with.  
If there is a legal claim for negligence against someone for the death, the cost of the funeral can be claimed as compensation.
Otherwise, you may agree payment by instalment, or pay after the legal process of dealing with the person’s estate has been settled.  

Next steps

Other useful information

National Association of Funeral Directors

618 Warwick Road
Solihull
West Midlands
B91 1AA
Tel: 0845 230 1343
Fax: 0121 711 1351
E-mail: info@nafd.org.uk
Website: www.nafd.org.uk

National Society of Allied and Independent Funeral Directors

3 Bullfields
Sawbridgeworth
Hertfordshire
CM21 9DB
Tel: 0845 230 6777
Fax: 01279 726300
E-mail: info@saif.org.uk
Website: www.saif.org.uk

Natural Death Centre

In The Hill House
Watley Lane
Twyford
Winchester
SO21 1QX
Tel: 0871 288 2098
E-mail: contact@naturaldeath.org.uk
Website: www.naturaldeath.org.uk

Funeral Directors Register

You can search for funeral directors on the Funeral Directors Register - a service run by the National Federation of Funeral Directors.

Thursday 17 November 2016

how to create a unique id in javascript [ANSWERED]

A recent challenge arose where a client wanted to put a unique order id on their client signup form.

This was to be in javascript and based on both time and a random number. This allowed for a sortable (time based) component followed by a random component.

This is just in case 2 people connect at the same millisecond (unlikely in this case as they have only 500 visitors a day and all would have to login within the same second to get a 50/50 chance of hitting the page at the same time). Comments below if you agree.


Anyway I used stack exchange as my source on this - link below.

Here's the code which was used to put an order id via quantcast




See the Pen LbbNvK by Mark Hopgood (@marknhopgood) on CodePen.


Original stack exchange link http://stackoverflow.com/questions/3231459/create-unique-id-with-javascript

Live version of this code: http://inumberz.com/quantcast/unique.html

Updated version of this code: http://inumberz.com/quantcast/unique2.html

Tuesday 8 November 2016

Rule of Thumb - Isn't that interesting (Very Interesting Stuff) **

Isn't that interesting (Very Interesting Stuff) **

Rule of thumb

In the 1400's a law was set forth in England that a man was allowed to beat his wife with a stick no thicker than his thumb. Hence we have 'the rule of thumb'

Modern businesses have many rules and regulations to comply with. Each year the average cost of red tape to business is around £3 billion. One of the highest contributors of these costs is Data Protection costing £600 Million.


GOLF

Many years ago in Scotland , a new game was invented. It was ruled 'Gentlemen Only...Ladies Forbidden'...and thus the word GOLF entered into the English language.

In business today, there's a lot of jargon which often confuses employees. Recently the Local Government Association banned words which could be used to confuse. Read more ...

In Bed

The first couple to be shown in bed together on prime time TV were Fred and Wilma Flintstone.




Money

Every day more money is printed for Monopoly than the U.S. Treasury.




Men are from Mars ...

Men can read smaller print than women can; women can hear better.

Woman are from Venus

Parking: Men are better at spacial coordination, but think best standing up.

Pepsi and Polos

Coca-Cola was originally green.

Amazing Feats

It is impossible to lick your elbow.







Clever Folicles

Intelligent people have more zinc and copper in their hair.




In Print

The first novel ever written on a typewriter: Tom Sawyer.




National Treasures on wheels

The San Francisco Cable cars are the only mobile National Monuments.





Suites you, sir

Each king in a deck of playing cards represents a great king from history:
Spades - King David
Hearts - Charlemagne
Clubs -Alexander, the Great
Diamonds - Julius Caesar


#s, pt1

111,111,111 x 111,111,111 = 12,345,678,987,654,321




Horsey Message

If a statue in the park of a person on a horse has both front legs in the air, the person died in battle. If the horse has one front leg in the air the person died as a result of wounds received in battle. If the horse has all four legs on the ground, the person died of natural causes.

Boats


Most boat owners name their boats. What is the most popular boat name requested?


Obsession




#s, pt2

If you were to spell out numbers, how far would you have to go until you would find the letter 'A'?




One thousand




Inventors, pt1

What do bulletproof vests, fire escapes, windshield wipers, and laser printers all have in common?




All were invented by women.




Super Food

What is the only food that doesn't spoil?




Honey




Super Drink
It was the accepted practice in Babylon 4,000 years ago that for a month after the wedding, the bride's father would supply his son-in-law with all the mead he could drink. Mead is a honey beer and because their calendar was lunar based, this period was called the honey month, which we know today as the honeymoon.

Super Sleep
In Shakespeare's time, mattresses were secured on bed frames by ropes.
When you pulled on the ropes the mattress tightened, making the bed firmer to sleep on.
Hence the phrase.......... 'goodnight, sleep tight.'




Drink pt2

In English pubs, ale is ordered by pints and quarts... So in old England , when customers got unruly, the bartender would yell at them 'Mind your pints and quarts, and settle down.'





It's where we get the phrase 'mind your P's and Q's'




Drink pt3

Many years ago in England , pub frequenters had a whistle baked into the rim, or handle, of their ceramic cups. When they needed a refill, they used the whistle to get some service. 'Wet your whistle' is the phrase inspired by this practice.




Fantastic Feats, pt2

At least 75% of people who read this will try to lick their elbow!




- Now....

Don't delete this just because it looks weird. Believe it or not, you can read it.


I cdnuolt blveiee that I cluod aulaclty uesdnatnrd what I was rdanieg. The phaonmneal pweor of the hmuan mnid Aoccdrnig to rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in what oredr the ltteers in a word are, the olny iprmoatnt tihng is that the first and last ltteer be in the rghit pclae. The rset can be a taotl mses and you can still raed it wouthit a porbelm. This is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the word as a wlohe. Amzanig huh?





YOU KNOW YOU ARE LIVING IN 2009 when...





1. You accidentally enter your PIN on the microwave.





2. You haven't played solitaire with real cards in years.





3. You have a list of 15 phone numbers to reach your family of three.





4. You e-mail the person who works at the desk next to you.





5. Your reason for not staying in touch with friends and family is that they don't have e-mail addresses.





6. You pull up in your own driveway and use your cell phone to see if anyone is home to help you carry in the groceries.





7. Every commercial on television has a web site at the bottom of the screen





8. Leaving the house without your cell phone, which you didn't even have the first 20 or 30 (or 60) years of your life, is now a cause for panic and you turn around to go and get it.





10. You get up in the morning and go on line before getting your coffee.





11.. You start tilting your head sideways to smile. : )





12. You're reading this and nodding and laughing.





13. Even worse, you know exactly to whom you are going to forward this message.





14. You are too busy to notice there was no #9 on this list.





15. You actually scrolled back up to check that there wasn't a #9 on this list.





~~~~~~~~~~~AND FINALLY~~~~~~~~~~~~





NOW U R LAUGHING at yourself.





Go on, forward this page to your friends. You know you want to!


Heres the link

http://prepario.com/interesting.html






**Disclaimer - the information above is for humorous purposes only and does not claim to be true in any way. Despite attempts to kill it off, this page is our most popular and we've kept it here for your amusement.






Prepario has developed a suite of software technology which facilitates the internal communications needed to maintain Competitive Advantage.


Prepario’s software suite allows business leaders to deal with whatever business issues arise in real time. Prepario can be used to connect everyone in the organisation with a common purpose and to continually drive forward change and innovation in the context of community. Prepario prepares everyone in the organisation, allowing them to create a foundation, ready for moving forward with unity. The Prepario suite of technologies bring robust enterprise level communications to the Desktop, TV Screens, Mobile Phones and PDAs.


Principles of Prepario!


Prepario systems must be easy to use by every member of staff. This makes it possible to engage with every person within the business, not just desk based, IT or management people. This empowers everyone, giving them a stir of the spoon.










Prepario Ltd, 42 Oakdene Road, Sevenoaks, Kent, TN13 3HL

t: 01732 80 80 67 e: mark@prepario.com