Welcome to Home.

Tuesday, October 16, 2018

EMBEDDING A GOOGLE FORM IN YOUR WORDPRESS POST





Nowadays collecting information from people all over the world is made easy by Google docs. Though Google docs you can create a form and then forward the link of that form to emails or share it in Facebook and then all of the information can be collected in the Google database and you can even view the summary of your results in graphical form such as pie charts and bars diagrams.  Furthermore, you can even embed your Google form in your own website. It is very easy. All you have to do is follow these simple steps:
  • First create your form in google drive
  • Now from the top menu select Form and then click Embed form in a webpage. After which you will get a code like this:


<iframe src="https://docs.google.com/forms/d/MyFormKey/viewform?embedded=true"
height="500" 
width="760" 
frameborder="0" 
marginwidth="0" 
marginheight="0"></iframe>


  • Now simply edit your post and go to html mode and paste anywhere you want the form to appear.



HOW TO BUILD A TOP SLIDING LOGIN PANEL

Javascriptsliding-login-panel
In your wordpress theme (where you want to implement the sliding login panel), open up the header.php file. Paste the following code just before the head ending tag (< /head>) :-
1
2
3
4
5
6
7
8
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#slide-panel").slideToggle("slow");
});
});
</script>
The above script will call jQuery using Google API and also initiate the sliding effect into your login panel.

HTML
In the same header.php file, right after the body tag (< body>) starts, paste the following code :-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div id="slide-panel"><!--SLIDE PANEL STARTS-->
<?php if ( ! is_user_logged_in() ){ ?>
<h2>Login</h2>
<div class="loginform">
<div class="formdetails">
<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
<label for="log">Username : </label><input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" />&nbsp;&nbsp;&nbsp;&nbsp;
<label for="pwd">Password : </label><input type="password" name="pwd" id="pwd" size="20" />
<input type="submit" name="submit" value="Login" class="button" />
<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label><input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
</form>
</div>
<div class="loginregister">
<a href="<?php echo get_option('home'); ?>/wp-register.php">Register</a> |
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">Recover password</a>
</div>
</div><!--loginform ends-->
<?php } else { ?>
<div class="loginform">
<h2>Control Panel</h2><ul>
<li><a href="<?php echo get_option('home'); ?>/wp-admin/">Dashboard</a></li> |
<li><a href="<?php echo get_option('home'); ?>/wp-admin/post-new.php">Write new Post</a></li> |
<li><a href="<?php echo get_option('home'); ?>/wp-admin/page-new.php">Write new Page</a></li> |
<li><a href="<?php echo wp_logout_url( get_bloginfo('url') ); ?>" title="Logout">Logout</a></li></ul>
</div><!--loginform ends-->
<?php }?>
</div><!--SLIDE PANEL ENDS-->
<div class="slide"><a href="#" class="btn-slide"><?php if ( ! is_user_logged_in() ){ ?>Login<?php } else { ?>Logout<?php }?></a></div><!--LOGIN BUTTON TEXT-->
The above code will integrate the sliding panel on top of your wordpress theme.
CSS
Now, all we are left with is styling the panel. Open up your style.css file and paste the following at the end of the file :-
1
2
3
4
5
6
7
8
9
10
11
12
* {margin:0; padding:0; outline:0;}
#slide-panel{ background-color:#000;border-bottom-style:solid;border-bottom-width:2px;display:none;height:100px;margin:auto;}
.slide {width:950px; margin:auto;}
.btn-slide:link, .btn-slide:visited{color:#fff; float:right; display:block;font-size:14px; text-transform:uppercase; font-weight:bold;height:26px; padding:3px 0 3px 0;line-height:22px;text-align:center;text-decoration:none;width:100px; background-color:#000; font-family:Arial;}
.loginform {width:950px; margin:auto; color:#999; font-family:Arial, Helvetica, sans-serif;}
.formdetails {color:#FFF; font-size:12px;padding:5px;}
.formdetails input{border:none; padding:2px 5px 2px 5px; background-color:#EFEFEF;}
.loginregister {color:#999; padding:5px;}
.loginregister a:link, .loginregister a:visited {color:#FFF; font-size:11px; text-decoration:underline;}
.loginform h2 {padding:10px 10px 10px 0; font-size:18px; font-weight:normal; text-transform:uppercase;}
.loginform ul li {display:inline;}
.loginform ul li a:link, .loginform ul li a:visited {color:#FFF; font-size:12px; text-decoration:underline;}
Now, try running your theme. Voila! You have a fully functional Sliding Login Panel of your own! Let me know if you have any issues.

What is Bitcoin?




What is Bitcoin?
Bitcoin emerged in 2008 and was initially developed as a peer-to-peer electronic cash system. Bitcoin can be understood as a value store, meaning that a Bitcoin (or part of a Bitcoin) represents some amount of value. Another way to think of Bitcoin is as a virtual “currency” and payment system. Bitcoin is transferred from one person to another in a transaction, and the value is determined by what someone is willing to pay for it.
Bitcoin is a form of cryptocurrency — or encrypted currency — that enables anonymous, independent, and non-regulated transactions. Cryptography allows for the secure ownership of the currency, which means that Bitcoin’s users can control the creation and transfer of money. Such a degree of privacy in transactions has helped Bitcoin gain a foothold as an alternative currency.
How is Bitcoin used?
Bitcoin is considered a decentralized currency, which means that a network of users control and verify transactions instead of a central authority such as a bank or government doing so. Bitcoin still works like fiat currency, since one party pays another for goods and services.
One of the first Bitcoin transactions made famous in pop culture was the Bitcoin Pizza story from 2010.Famously, a man offered to pay 10,000 Bitcoin for someone to order him two pizzas — and someone did it. Those 10,000 bitcoins were worth about $25 at the time. Today, that value fluctuates between 5 to 6 million USD.
One of the interesting usability features of Bitcoin is that it’s infinitely divisible. The measurement prefix mBTC, which represents .001 of a Bitcoin, can be used to understand everyday transactions in more manageable and translatable amounts. Users can transact 1/10 of a bitcoin for $64 USD, 1/100 of a bitcoin for $6.40 or 1/1000 of a bitcoin for .64 cents. This simplification of standards allows transactions to correlate more closely with the dollar. For example, it makes more sense to say someone is willing to pay 5 mBTC for a burger versus .005 Bitcoin.
How do you get Bitcoin?
There are three ways to get Bitcoin:
  1. The first is to “mine” them: What is bitcoin mining? This quick video may help explain. Put simply, a minersets up his computer to attempt to guess a very difficult random string of letters and numbers. If the computer guesses correctly, the miner is awarded a Bitcoin. While there are currently 13 million bitcoins in circulation, the total amount that can ever be “mined” is capped at 21 million. However, finding new coins becomes more difficult as the number of available coins reaches this cap. The reason? The creation rate, or rate at which Bitcoin can be discovered, is automatically halved every four years as more coins are added to circulation.Because there’s a limited amount of Bitcoin, this cryptocurrency can be considered deflationary, meaning less and less will be entering the market as time goes on. In contrast, the U.S. dollar is inflationary, with new bills being disseminated constantly.
  2. The second option is to buy them:There are two common ways to purchase Bitcoin. The most popular method is to sign-up for an online exchange that connects you with a seller. At a mutually agreed upon price, bitcoins are exchanged directly from you to whomever through a peer-to-peer system. The other option is to meet a seller face-to-face to complete the transaction.Once the transaction is complete, your coins will arrive in your Bitcoin “wallet” and officially belong to you.
  3. The third option is to earn them:You can offer your services or products for bitcoins. There is a large community of bitcoin fans who will be glad to spend their coins at your business.
Okay, so what’s a Bitcoin Wallet?
A Bitcoin wallet is a place where you can receive, send, and store your Bitcoin. A wallet acts similarly to an email account, where you have an unique address that people can use to send Bitcoin. Just like an email account, without the password to your Bitcoin wallet, no one else can access it. To spend your Bitcoin, simply enter the address of the party you wish to pay, the amount, and then hit “send!”
As a merchant, what are the advantages of accepting Bitcoin?
A merchant will find that there are a few perks to accepting Bitcoin. Unlike credit cards, transacting with Bitcoin incurs no fees. Credit cards end up costing merchants somewhere between 3% to 5% on all transactions after fees, fraud, and chargebacks. Accepting Bitcoin costs nothing, and funds are instantly deposited into the business’s Bitcoin wallet. Additionally, Bitcoin is accepted globally — Bitcoin has no barrier to transactions made around the world since there is no currency exchange rate.
How can I check the price of Bitcoin?
There are a wealth of tickers, value monitors, and exchanges that help track the value of Bitcoin. Coinmarketcap.com charts all available cryptocurrencies currently in circulation, listing market cap, current price by currency, percent change in a 24-hour period, as well as a market cap and a price graph.
What factors influence price fluctuation?
Political and social changes can dramatically affect Bitcoin’s valuation — even virtual currency is subject to economic dynamics. As international support for Bitcoin grows, this drives up the average market valuation. As more people become comfortable with using Bitcoin, demand goes up, which in turn drives the price up. The inverse effect would negatively affect Bitcoin. It’s simple economics.
How viable is bitcoin? Could it ever replace the U.S. dollar?
The biggest roadblock for Bitcoin becoming more widely accepted is that it can be technically confusing and often difficult for new users to adopt. Pushback from governments and threats of regulation also pose a problem. Despite these issues, Bitcoin is already one of the top money transfer networks, according to Coinometrics.

Rounded Corner TextBox Using CSS - CSS Tips & Tricks


I’ll explain to you how to make the rounded corner textbox using a image and css. Text box is placed over a container element whose background image is the key of the rounded corner textbox.
This is the image which I’ve used in my example, don’t click and start typing it just a image for now.

css-round
Now let’s look at the html and css code to display rounded corner textbox.
HTML Code for rounded corner textbox
The container “div” contains the background image of rounded corners and inside of that the real textbox resides.
CSS Code for rounded corner textbox:.loginboxdiv
{
 margin:0;
 height:21px;
 width:146px;
 background:url(login_bg.gif) no-repeat bottom;
}

.loginbox
{
 background:none;
 border:none;
 width:134px;
 height:15px;
 margin:0;
 padding: 2px 7px 0px 7px;
 font-family:Verdana, Arial, Helvetica, sans-serif;
 font-size:11px;
}
The above CSS code is straight forward, the height and width of the class “loginboxdiv” should be exactly same as the above image which is of “146X21″ pixels. The class “loginbox” is the class of the textbox. As you can see in the css, border is removed and height , width and padding are managed according to the size of the background image.
Working Example- You can type in the rounded corner textbox:

css-round

One Line CSS Magic - CSS Tips and Tricks


No need to mention CSS is awesome. Here one line css magic. Its pure beauty of CSS that gives life to the website and makes it lively. Yes, it’s not simple to write CSS for newbie and even professionals sometimes gets stuck because of cross browser issues. Sometimes, One line in CSS can be more than a magic providing solutions. I reviewed some of the CSS files and came up with some one line CSS.
Below are list of one line CSS. One line CSS mentioned below may or may validate web standards and web accessibility rules.

1. Set default margin and padding to all elements
* {margin: 0; padding: 0}
Every element that have not assigned margin or padding will have default value of above.
Some CSS designers argue that this is not necessary at all because all CSS element at the end will have their assigned value.

2. Set image border to zero
img { border: 0; }
a img { border: 0; }
This can be used to prevent any linked images from displaying borders.

3. Remove Firefox’s link border
a:active, a:focus { outline: 0; }
This removes dotted outline from focused or active links on firefox.

4. Scrolling Render IE
html { background : url(null) fixed no-repeat; }
5. Prevent line breaks in links, over sized content to break
a{ white-space:nowrap;}
element { overflow:hidden; }
This trick prevents line breaks on links.
6. Centering block elements horizontally
element { margin:0 auto; }
This one line CSS horizontally centers a block level element.
For IE less than 7, following line should be added though.
element { text-align: center; }
7. Show Firefox scrollbar
html{ overflow:-moz-scrollbars-vertical; }
8. Remove textarea scrollbar in IE


textarea{ overflow:auto; }

Wednesday, October 3, 2018

Youtube-dl and it's use

youtube-dl is a command-line program to download videos from YouTube.com and a few more sites (200+ sites). It requires the Python interpreter(2.6, 2.7, or 3.2+), and it is not platforming specific. We also provide a Windows executable that includes Python. youtube-dl should work in your Unix box, in Windows or in Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.



How to Download:

youtube-dl is easy to install in your system. Installation process varies in a variation of system. If you are using windows then you just need to download the setup file from its official GitHub site ( http://rg3.github.io/youtube-dl/download.html) and if you are Linux users it is simple just hit 1 line command and you are done.

For Windows Users:

Get the setup file from Here and install

For Linux Users:

sudo apt-get install youtube-dl

It is just simple for installation.


Uses:

1. To Download Videos in desired formats
2. To Download/Extract Audio in desired formats from video
3. To Download Entire Playlists of videos from youtube and other sites.
4. and more.

For Linux Users

Downloading Videos  :


You just need 1 line of command to download the video from the desired site. The syntax for downloading videos is as follows:

                                                        youtube-dl VIDEO_URL

that's it. youtube-dl and the link of the video which you want to download. By default, it would download in mp4 format.

The following video illustrates the use of command :




Downloading Audios from Videos:

In order to extract/download audios from videos you just need two extra sub commands and they are extract-audio and audio-format. The following is the command that downloads the audio from video link in given audio format.

youtube-dl --extract-audio --audio-format AUDIO_FORMAT VIDEO_LINK

               eg : youtube-dl --extract-audio --audio-format mp3 www.google.com/sdfsdfhsdkj

The following video illustrates the way fro downloading audios from videos.




In this way you can do. If you want to know more and learn more, please provide me your feedback it means a lot for me.

Saturday, September 22, 2018

Privacy Policy Sample for Mobile Apps


<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
in this Privacy Policy.</p>
<p>The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions,
which is accessible at [App Name], unless otherwise defined in this Privacy Policy.</p>

<p><strong>Information Collection and Use</strong></p>
<p>For a better experience while using our Service, [I|we] may require you to provide us with certain
personally identifiable information, including but not limited to [add whatever else you collect here, e.g. users name | address | location | pictures]. 
The information that [I|we] request is [retained on your device and is not
collected by [me|us] in any way]|[will be retained by us and used as described in this privacy policy.</p>
<p>The app does use third party services that may collect information used to identify you. [You can mention Google services here and link to Google's privacy policy if you want].

<p><strong>Log Data</strong></p>
<p>[I|We] want to inform you that whenever you use [my|our] Service, in case of an error in the app [I|we] collect
data and information (through third party products) on your phone called Log Data. This Log Data
may include information such as your devices’s Internet Protocol (“IP”) address, device name,
operating system version, configuration of the app when utilising [my|our] Service, the time and date
of your use of the Service, and other statistics.</p>

<p><strong>Cookies</strong></p>
<p>Cookies are files with small amount of data that is commonly used an anonymous unique identifier.
These are sent to your browser from the website that you visit and are stored on your devices’s
internal memory.</p>
<p>>!-- Check if this is true for your app, if unsure, just assume that you do use cookies and modify this next line -->This Services does not uses these “cookies” explicitly. However, the app may use third party code
and libraries that use “cookies” to collection information and to improve their services. You
have the option to either accept or refuse these cookies, and know when a cookie is being sent
to your device. If you choose to refuse our cookies, you may not be able to use some portions of
this Service.</p>

<p><strong>Service Providers</strong></p> <!-- This part need seem like it's not needed, but if you use any Google services, or any other third party libraries, chances are, you need this. -->
<p>[I|We] may employ third-party companies and individuals due to the following reasons:</p>
<ul>
<li>To facilitate our Service;</li>
<li>To provide the Service on our behalf;</li>
<li>To perform Service-related services; or</li>
<li>To assist us in analyzing how our Service is used.</li>
</ul>
<p>[I|We] want to inform users of this Service that these third parties have access to your Personal
Information. The reason is to perform the tasks assigned to them on our behalf. However, they
are obligated not to disclose or use the information for any other purpose.</p>

<p><strong>Security</strong></p>
<p>[I|We] value your trust in providing us your Personal Information, thus we are striving to use
commercially acceptable means of protecting it. But remember that no method of transmission over
the internet, or method of electronic storage is 100% secure and reliable, and [I|we] cannot
guarantee its absolute security.</p>

<p><strong>Links to Other Sites</strong></p>
<p>This Service may contain links to other sites. If you click on a third-party link, you will be
directed to that site. Note that these external sites are not operated by [me|us]. Therefore, I
strongly advise you to review the Privacy Policy of these websites. I have no control over, and
assume no responsibility for the content, privacy policies, or practices of any third-party
sites or services.</p>

<p><strong>Children’s Privacy</strong></p>
<p>This Services do not address anyone under the age of 13. [I|We] do not knowingly collect personal
identifiable information from children under 13. In the case [I|we] discover that a child under 13
has provided [me|us] with personal information, [I|we] immediately delete this from our servers. If you
are a parent or guardian and you are aware that your child has provided us with personal
information, please contact [me|us] so that [I|we] will be able to do necessary actions.</p>

<p><strong>Changes to This Privacy Policy</strong></p>
<p>[I|We] may update our Privacy Policy from time to time. Thus, you are advised to review this page
periodically for any changes. [I|We] will notify you of any changes by posting the new Privacy Policy
on this page. These changes are effective immediately, after they are posted on this page.</p>

<p><strong>Contact Us</strong></p>
<p>If you have any questions or suggestions about [my|our] Privacy Policy, do not hesitate to contact
[me|us].</p>
<p>This Privacy Policy page was created at <a href="https://privacypolicytemplate.net"
target="_blank">privacypolicytemplate.net</a>.</p>
</body>
</html>