activity store in file or MySQL database using php which is better

Logs using files are more efficient, however logs stored in the database are easier to read, even remotely.

however that connecting and inserting rows into the database is error prone (database server down, password wrong, out-of-resources).

Log to db instead if you need other people needs to read logs in a web interface or if you need the ability to search through logs. As someone else has pointed out also concurrency matters, if you have a lot of users log to db could scale better.

Yes, it’s faster to write to files but it’s far faster for you to find what you need in the logs if they are in a database.

I think storing logs in database is not a good idea. The pros of storing logs to databases over files is that you can analyze your logs much more easily with the power of SQL, the cons, however, is that you have to pay much more time for database maintenance. You’d better to set up a separate database server to store your logs or your might get too much log INSERT which will decrease your database performance to production use; also, it’s not easy to migrate, archive logs in database, compared with files.

Error logging is best limited to files in my opinion, because if there is a problem with the database.

When using filesystem careful with :

  • Confidentiality : Put documents outside of your Apache Document Root. Then a PHP Controller of yours will output documents.
  • Sharded path : do not store thousands of documents in the same directory, make different directories. You can shard with a Hash on the Filename for example. Such as /documents/A/F/B/AFB43677267ABCEF5786692/myfile.pdf.
  • Inode number : You can run out of inodes if you store a lot of small files (might not be your case if storing mostly PDF and office documents).

Video equipment tips for Video Bloggers

Being a YouTube creator requires at least a foundational knowledge of video equipment. You might be asking yourself: What type of camera will I use? How will I handle sound and lighting? Here’s an overview of some common production equipment choices that can help you get started.

Cameras

There’s no ‘one size fits all’ – consider what you want to achieve with your videos. Here are two common types:

  • Point-and-shoot cameras are simple, all-in-one devices that are great for frequent vlogging in almost any setting. Some models have a reversible LCD screen so that you can see your shot. These no-fuss cameras can deliver full HD (1080) image quality, and many creators use them in their everyday videos.
  • DSLR cameras can deliver a more cinematic look, but may require a learning curve to operate. They use interchangeable lenses, are much heavier and are sometimes trickier to focus. These cameras cost more and they are typically used by creators who want a more artistic or professional look.

You can always start with your mobile device’s camera. It’s a great option before you invest in a standalone camera.

Take a look at camera reviews from other YouTube creators to find out what brands and models they recommend.

Sound

Good sound is a must. Viewers often don’t mind imperfect lighting, but they are less accepting of poor sound quality in the video.

If you’re using your camera’s onboard mic, you may need to stay about a metre away from the camera for the best audio.

  • Some creators buy a ‘shotgun’ mic; since these have directional recording, they can be effective at picking up natural sound from a longer range.
  • When you need to record at a distance, you can use a wireless lavalier mic, which can be attached to you. For example, a lav mic might be appropriate for the instructor in a fitness video.

Confirm whether your camera has a port for an external mic before buying one.

Lighting

  • Many creators use a ‘two-point’ lighting system. This involves lighting your main subject from two light sources at opposing directions. In this setup, the ‘key light’ gives the primary lighting, while the ‘fill light’ balances out the shadows.
  • Another option would be ‘soft lights’, which sometimes cost less, consume less power and are more flattering. A single soft light can be great for close-up shots. You can add lights to illuminate the background or other parts of the scene, as needed.
  • Don’t forget about one of the brightest (and cheapest) lights in existence – the sun! Try recording outside or using natural daylight through a window.
  • For shooting on the go, consider camera-mounted lights.

We recommend

  • If you have a lot of questions, consider your creative style and production goals as you select the right equipment. Some creators aim for a highly polished video, while others are OK with something casual and authentic.
  • If you want to keep costs down, you could buy the most affordable equipment and upgrade later based on your video-making needs.
  • Often, the best piece of equipment is the one you have to hand. Use your mobile device to get started immediately.

Python code for store system load into file and display stored system load

Python code for store system load into file

#!/usr/bin/python

import os
try:
    t = os.popen('uptime').read()[:-1]
    #print(t)
    f=open("/home/website/public_html/public/load.txt", "a+")
    f.write("%s\r\n" %t)
    f.close()
    f.flush()
except IOError as (errno,strerror):
    print "I/O error({0}): {1}".format(errno, strerror)

Python code for display system load stored into file

#!/usr/bin/python

import os
try:
    f = open("/home/website/public_html/public/load.txt", "r")
    print(f.read())
    f.close()
    f.flush()
except IOError as (errno,strerror):
    print "I/O error({0}): {1}".format(errno, strerror)

Interesting facts about Hummer

  • AM General began manufacturing High Mobility Multipurpose Wheeled Vehicles (HMMWV) or Humvees for the U.S military in 1983, and made the first civilian Hummer in 1992. Later, the company officially named it ‘Hummer’.
  • General Motors acquired the ownership and marketing rights of the Hummer from AM General in 1999. However, AMG continued to design the H1 exclusively for the civilian market. While, the H2 was the first product built under the flagship of the GM. The H3 was the last generation of the SUV, which was discontinued when the company shut down in 2010. Therefore, Hummer cars in India and around the world are quite a rare sight.
  • Despite being classified as a Class 3 truck, it doesn’t require a special driving license.
  • Hummer dealers across the world were complied to organize four Hummer off-road events per year.
  • The SUV is especially geared for off-road driving. The H1 and H2 can climb on a 22-inch and a 16-inch vertical wall or mountain, run up to 30-inch and 20-inch of water, respectively. Both the models can navigate a 60% grade and cross 40% side slop.
  • The H2 is based on the GM truck platform, also used for GMC and Chevy pickups, in 1999, which is now found on the Yukon, Suburban, Escalade Tahoe and other GM SUVs and trucks.
  • The Hummer can drive through 30-inches deep water without floating, and maintaining traction under water. Most components of the SUV are sealed against the elements that make it an amphibian-cum-submarine vehicle. It has drain plugs in the floor that released the water that enter in the car underneath.

The Hummer, discontinued in 2010, will always be admired for its glorious history, exceptional off-road capabilities and commanding road presence. There are several other new cars in the market, but no one can replace the legendary civilian Hummer. We never had sales outlets of Hummer cars in India, thus its buyers got them imported directly

WordPress best performance .htaccess file content

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript


#BEGIN EXPIRES HEADERS
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default expiration: 1 hour after request
ExpiresDefault "now plus 1 hour"
# CSS and JS expiration: 1 week after request
ExpiresByType text/css "now plus 1 week"
ExpiresByType application/javascript "now plus 1 week"
ExpiresByType application/x-javascript "now plus 1 week"
# Image files expiration: 1 month after request
ExpiresByType image/bmp "now plus 1 month"
ExpiresByType image/gif "now plus 1 month"
ExpiresByType image/jpeg "now plus 1 month"
ExpiresByType image/jp2 "now plus 1 month"
ExpiresByType image/pipeg "now plus 1 month"
ExpiresByType image/png "now plus 1 month"
ExpiresByType image/svg+xml "now plus 1 month"
ExpiresByType image/tiff "now plus 1 month"
ExpiresByType image/vnd.microsoft.icon "now plus 1 month"
ExpiresByType image/x-icon "now plus 1 month"
ExpiresByType image/ico "now plus 1 month"
ExpiresByType image/icon "now plus 1 month"
ExpiresByType text/ico "now plus 1 month"
ExpiresByType application/ico "now plus 1 month"
# Webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
</IfModule>
#END EXPIRES HEADERS

# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
 <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
 Header set Cache-Control "max-age=2592000, public"
 </filesMatch>
 <filesMatch "\.(css)$">
 Header set Cache-Control "max-age=604800, public"
 </filesMatch>
 <filesMatch "\.(js)$">
 Header set Cache-Control "max-age=216000, private"
 </filesMatch>
 <filesMatch "\.(x?html?|php)$">
 Header set Cache-Control "max-age=600, private, must-revalidate"
 </filesMatch>
</ifModule>
# END Cache-Control Headers


# ENABLE LITESPEED CACHE START
<IfModule LiteSpeed>
CacheEnable public
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^GET|HEAD$
RewriteCond %{HTTP_HOST} ^sample.com|sample.net|sample.org [NC]
RewriteCond %{REQUEST_URI} !login|admin|register|post|cron
RewriteCond %{QUERY_STRING} !nocache
RewriteRule .* - [E=Cache-Control:max-age=300]
</IfModule>
# ENABLE LITESPEED CACHE END

# START ENABLE KEEP ALIVE
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
# END ENABLE KEEP ALIVE


<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters rewrite_css,combine_css
ModPagespeedEnableFilters recompress_images
ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
ModPagespeedEnableFilters collapse_whitespace,remove_comments
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

Step by step overview guide for setup business WhatsApp API

Step by step overview guide for setup business WhatsApp API with Facebook business account

What is the criteria to check my business Facebook is active for WhatsApp api

after that your WhatsApp api is fully activated.

  1. Must have Facebook business account setting
    a. WhatsApp account added into Facebook business setting
    b. Add system user
    c. Assign an App to system user via add assets
    d. Generate token for final use of WhatsApp api with selected permission
  2. Create app and add it into business Facebook account
    Note : for use WhatsApp api app type must be business

*Step by step overview guide for setup business WhatsApp API
*What is business WhatsApp API
*How to implement WhatsApp API

Download Hindi font google

Making the web more beautiful, fast, and open through great typography.

HindHind is an Open Source typeface supporting the Devanagari and …
नोटों साँस देवनागरीNoto is a global font collection for writing in all modern and …
MuktaMukta is a Unicode compliant, versatile, contemporary …
RobotoMaking the web more beautiful, fast, and open through great …

Download DevLys Hindi Fonts ( देवलिस फ़ॉन्ट्स )

DevLys 010  Download

DevLys 010 Bold  Download

DevLys 010 Bold Italic  Download

DevLys 010 Condensed  Download

DevLys 010 Thin  Download

DevLys 020  Download

DevLys 020 Condensed  Download

DevLys 020 Italic  Download

DevLys 020 Thin  Download

DevLys 020 Wide  Download

DevLys 030  Download

DevLys 030 Condensed  Download

DevLys 030 Italic  Download

DevLys 030 Wide  Download

DevLys 040 Bold  Download

DevLys 040 Condensed  Download

DevLys 040 Italic  Download

DevLys 040 Thin  Download

DevLys 040 Wide  Download

DevLys 050 Bold Italic  Download

DevLys 050 Condensed  Download

DevLys 050 Italic  Download

DevLys 050 Wide  Download

DevLys 060 Thin  Download

DevLys 060 Wide  Download

DevLys 070 Italic  Download

DevLys 070 Thin  Download

DevLys 070 Wide  Download

DevLys 080 Condensed  Download

DevLys 090 Bold Italic  Download

DevLys 090 Italic  Download

DevLys 090 Wide  Download

DevLys 100 Bold  Download

DevLys 100 Bold Italic  Download

DevLys 100 Italic  Download

DevLys 100 Thin  Download

DevLys 100 Wide  Download

DevLys 110 Bold  Download

DevLys 110 Bold Italic  Download

DevLys 110 Condensed  Download

DevLys 110 Thin  Download

DevLys 110 Wide  Download

DevLys 120  Download

DevLys 120 Bold Italic  Download

DevLys 120 Condensed  Download

DevLys 130 Condensed  Download

DevLys 130 Thin  Download

DevLys 140 Condensed  Download

DevLys 140 Wide  Download

DevLys 150 Condensed  Download

DevLys 150 Thin  Download

DevLys 160 Bold Italic  Download

DevLys 160 Italic  Download

DevLys 160 Wide  Download

DevLys 170  Download

DevLys 180 Condensed  Download

DevLys 190 Condensed  Download

DevLys 190 Italic  Download

DevLys 190 Thin  Download

DevLys 200 Condensed  Download

DevLys 200 Italic  Download

DevLys 200 Wide  Download

DevLys 210  Download

DevLys 210 Bold  Download

DevLys 210 Condensed  Download

DevLys 220 Condensed  Download

DevLys 220 Thin  Download

DevLys 220 Wide  Download

DevLys 230 Condensed  Download

DevLys 230 Italic  Download

DevLys 240  Download

DevLys 240 Italic  Download

DevLys 240 Thin  Download

DevLys 250 Italic  Download

DevLys 260 Bold  Download

DevLys 260 Condensed  Download

बिना नेटवर्क के कर सकेंगे कॉल

एप्पल इस साल सितंबर में अपनी आईफोन 4 सीरीज लॉन्च कर सकती है।

इस रिपोर्ट में पता चला है कि एप्पल आईफोन 4 के साथ सैटलाइट कम्युनिकेशन कनेक्टिविटी दे सकती है।

इसकी मदद से उपभोक्ता सिम का नेटवर्क ना आने पर भी कॉल और मैसेज कर सकेंगे खासकर इमरजेंसी के समय यह फीचर उपभोक्ताओं के लिए काफी मददगार साबित होगा।

change app type Facebook

App types cannot be changed. If your app needs products, permissions, or features that are unavailable to its current type you must create a new app with a different type instead.