Click here to Skip to main content
15,886,873 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: When Did That Happen? Pin
David A. Gray16-Jul-18 10:23
David A. Gray16-Jul-18 10:23 
GeneralRe: When Did That Happen? Pin
RossMW19-Jul-18 16:25
professionalRossMW19-Jul-18 16:25 
GeneralRe: When Did That Happen? Pin
Richard Deeming16-Jul-18 8:28
mveRichard Deeming16-Jul-18 8:28 
GeneralXPath string comparisons Pin
kmoorevs12-Jul-18 5:46
kmoorevs12-Jul-18 5:46 
GeneralRe: XPath string comparisons Pin
Richard Deeming12-Jul-18 6:27
mveRichard Deeming12-Jul-18 6:27 
GeneralRe: XPath string comparisons Pin
kmoorevs12-Jul-18 7:52
kmoorevs12-Jul-18 7:52 
GeneralRe: XPath string comparisons Pin
Richard Deeming12-Jul-18 9:48
mveRichard Deeming12-Jul-18 9:48 
GeneralTwo easy lines for web copy to clipboard Pin
raddevus6-Jul-18 8:59
mvaraddevus6-Jul-18 8:59 
Have you ever researched an effective way to copy data to the user's clipboard from your web app?
Well, it has always been a pain (old methods of using some Flash technique or whatever) or basically impossible.
I just stumbled upon this really cool thing which seems to be the new way to do it and I've tested in Chrome, FireFox and Edge and it works in all 3. W00t!

Here's the simple code I added:
JavaScript
$("#passwordText").select();  // jQuery select the target element that has text you want to copy
document.execCommand("copy"); // fire the command to copy to clipboard!!!


Did you already know about this and not inform me!?! Roll eyes | :rolleyes:
I been looking for it for long time.

Here are more complete docs on it. Notice that those docs have been updated recently -- I think this recently (last 6 mos) became available. Only about 7 (or 20) years late. Smile | :)
Interact with the clipboard - Mozilla | MDN[^]

Now you can try C'YaPass and it will automatically copy your password to your clipboard so all you'll have to do is paste it at your target.
C'YaPass : Never type a password again[^]
1. Add your sitekey
2. draw your pattern
3. web app copies 64 character (SHA-256 hash) to your clipboard. Use it as your password.

All sitekeys are stored in your localstorage. You can delete and edit them.
It will remember password requirements (length, special chars, uppercase) for site (if you set them).

And now it copies the password to the clipboard for easy paste usage.
That is all.
GeneralRe: Two easy lines for web copy to clipboard Pin
Nelek9-Jul-18 1:45
protectorNelek9-Jul-18 1:45 
GeneralOuternet Pin
Dr.Walt Fair, PE6-Jul-18 5:24
professionalDr.Walt Fair, PE6-Jul-18 5:24 
GeneralRe: Outernet Pin
Nelek6-Jul-18 7:18
protectorNelek6-Jul-18 7:18 
GeneralRe: Outernet Pin
Dr.Walt Fair, PE6-Oct-18 11:35
professionalDr.Walt Fair, PE6-Oct-18 11:35 
GeneralRe: Outernet Pin
Nelek6-Oct-18 23:49
protectorNelek6-Oct-18 23:49 
GeneralConsole Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
David A. Gray3-Jul-18 8:46
David A. Gray3-Jul-18 8:46 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
Randor 3-Jul-18 9:40
professional Randor 3-Jul-18 9:40 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
Rick York3-Jul-18 11:19
mveRick York3-Jul-18 11:19 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
David A. Gray3-Jul-18 15:08
David A. Gray3-Jul-18 15:08 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
Randor 3-Jul-18 15:54
professional Randor 3-Jul-18 15:54 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
David A. Gray4-Jul-18 10:16
David A. Gray4-Jul-18 10:16 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
Randor 4-Jul-18 14:24
professional Randor 4-Jul-18 14:24 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
David A. Gray5-Jul-18 6:04
David A. Gray5-Jul-18 6:04 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
Randor 5-Jul-18 8:42
professional Randor 5-Jul-18 8:42 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
David A. Gray5-Jul-18 11:51
David A. Gray5-Jul-18 11:51 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
Randor 5-Jul-18 12:31
professional Randor 5-Jul-18 12:31 
GeneralRe: Console Window of Visual Studio 2017 Debugger Answers F10 with Full Screen 43-Line Display Pin
David A. Gray5-Jul-18 13:24
David A. Gray5-Jul-18 13:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.