You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(C) ChooseFont color picker with extended color dialog
The ChooseFont dialog color picker extended
Using ChooseFont you will notice it only support 15 predefined an ugly colors.
The color palette is very limited and theres no way to use more colors without subclassing it.
Here is a good start point to subclass it, this mod will:
Display the color in HTML format
Display a full featured ChooseColor dialog when color ComboBox is clicked
[PHP/Wordpress] Define a default post password with filters and hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(PHP) Pre-processing MP3 Audio waveforms with big size
What?
When want to display audio waveform from audio file, you can find browser libraries like WavesurferJs, Squiggl, or whatever, everyone works the same:
Load audio (in full) file and get its AudioContext
Get all the raw PCM samples from one channel in Float32Array (huge) with something like ctx.decodeAudioData().getChannelData(0)
Use drawing routine and average samples
Doing this process on the users browser is quite slow and wasteful in a magnitude proportional to the audio file size, as you have to fully load it then get huge amount of samples calculated in the drawing stage.
So one option to overcome this is to dump a shorter version of PCM data on a static file with an amount of samples enough to render the waveform and having a reasonable size by averaging the samples.
Keeping the clients updated in real time apps is quite challenging sometimes, websockets or webrtc are great for this task, but usually what the developer want is to send most of the data well timed to the client, then recive a few commands from the client, so having full duplex socket in this scenario is quite wasteful, and may pose a security risk, at allowing the user to continuosly send arbitrary data.
Polled ajax request, in the other hand cant be in any way correctly timed, so this function acts as an intermediante point between ajax requests and websockets.
This function needs a request that is kept alive then chunked data is being sent. It can be binary data, strings, or serializable json objects. You will have to place chunked headers Transfer-Encoding: chunked and ping regularly (5s should be fine) sending some data in order to maintain the conne
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters