mercredi 26 décembre 2018

Mysql hits 100%, website gets really slow

We are living a big problem in our newspaper website. After 1000 active traffic, our website becomes really slow. We have a more than enough dedicated server, but website works slow and gives occasional 502 error. Some people said that there are too many complicated requests to our database. We tried everything but we cannot find the issue. Could you please help us?

Website URL: www.birgun.net




Is it possible to implement a pure js kafka client within the broswer?

Is there any way to implement a pure js kafka client(producer or consumer)in web browser? Most of the solution to produce or consume messages of topics in web browser is indirect. Producers or Consumers running at the server side and exchange messages of topics to the web browser. It's make things complicated and higher latency, also more expensive with infrastructure. So if possible to produce or consume messages directly within web browser, it's should be a better way. BTW, for security, does SASL/OAUTHBEARER can be used? Thanks.




mardi 25 décembre 2018

How to download optimized files for website using google page insights?

The latest version of google speed insights doesn't allow to download optimized JS, CSS, images etc.

https://developers.google.com/speed/pagespeed/insights/

Can anyone help me




Peak detection with the web audio API?

TL;DR - I want to use Javascript to detect every click in a drummer's click track (an mp3 with only beats in it) and then replace these with .wav samples of a different click sound. The drummer click track is not in constant time, so I can't simply detect the BPM and replace samples from that.

I have a task I'd like to achieve with Javascript and the web audio API, but I'm not sure if it's actually possible using either of these....

Basically I regularly use recorded backing tracks for songs and I replace the default click track (the metronome track that a drummer plays along to) with custom click samples (one .wav sample for the first beat of a bar and another sample for the remaining beats in any given bar). Annoyingly many of these drummer click tracks are not in constant time - so do not have a constant BPM from start to finish.

I want to detect every click in a click track (every peak soundwave) and then replace these with the .wav samples, and download the final file as a MP3. Is this possible?




What I'm doing wrong?

I want to print a random sentence everywhere the page is loaded, this is very simple, I know but I'm a very noob with php, can anyone help me?

I tried to to print the html with echo function but it didn't worked.

  <?php $r = rand(1,3); ?>
  <?php if ($r==1){ ?>
    <div class="message">
    <font color="00FF22"><span class="textData" data-to-animate='[" This site as been hacked!" , " We are sorr" , " Which of these tool u want to use?"]'></span></font>
    </div>
  <?php } ?>
  <?php elseif ($r==2){ ?>
    <div class="message">
    <font color="00FF22"><span class="textData" data-to-animate='[" This site is next to be closed." , " We are sorr" , " Which of these tool u want to use?"]'></span></font>
    </div>
  <?php } ?>
  <?php elseif ($r==3){ ?>
    <div class="message">
    <font color="00FF22"><span class="textData" data-to-animate='[" The monkeys destroyed the server." , " We are sorr" , " Which of these tool u want to use?"]'></span></font>
    </div>
  <?php } ?>

I get a blank page.




Invalid value in dnsrecord

My computer is hosting an apache2 server and everyone can access it by typing my external IP address and port that I had enabled forwarding in in the url bar (xx.xx.xxx.xx:8080). I also have a freenom (public DNS resolver) domain ready. In the freenom domain DNS management it asks for a type (which I figured out is just A) and a TTL which I don't know. Then there is the target which should be an IP address but when I type xx.xx.xxx.xx:8080 it says Invalid value in dnsrecord. What do I do?




What is the easiest way to create a property listing website [on hold]

I’m hoping someone can steer me towards the right directions - I am trying to create a simple property listing website that will display properties for sale from multiple real estate agents. I did a quick research online and a possible quick way to to this is through WordPress which I understand will require less learning but I am not sure if there are any WP templates/add-ons that will allow importing of property feed from multiple sites. The other option I guess it to learn web development in order to create the portal.

Any advice on what would be the most efficient and quick way to achieve this will be greatly appreciated. Thanks