Month: October 2016

Business Executive Camp

Business Executive Camp

Hi, Bloggers and my readers:). Today, I here to share one of my special and important day with you. I along with my team and few more went to PTU Nalanda school of TQM and Entrepreneurship regarding TiE-B plan competition in which 25 teams were shortlisted. We attended the boot camp at the cost of our missing our MST.;)

First of all, I want to talk about my favorite sir “Dr H.S.Rai”. Though I am not flattering Sir but it’s fact. Sir really support us in each and every task. He arranges a bus for us and with us their whole of the time. I was getting a feeling that I was giving exam and my parents are there to support and motivating me.

Now, come back to the session many entrepreneurs delivered their lectures and talking about financial issues. It was an inspirational boot camp.

Some of the quotes which I like the most summarized here

  1. Don’t consider anything as failure consider it as an experience.
  2. To achieve something you have to learn to sacrifice first.
  3. Business is a fair level the amount you input the output you get
  4. Idea without Action is zero
  5. Nothing is right or wrong.

5 VITALS for Startup

  1. Risk
  2. Ownership
  3. Focus
  4.  Well-prepared
  5. Customer

Now, I want to share a story with you. You can comment me the moral of it;).

India after becoming a democratic country, there was a big project in front it to launch our own satellite. Dr. APJ Abdul Kalam(The President of India and scientist)  was the head of this project. The first launch was not fruitful due to which huge amount of capital wasted and we know Indians they don’t want to know the reason behind it but eager to listen the person(Scientist) behind it. So, the President was about to go the handle the media. On a way, Satish Dhawan(Aerospace Engineer) came and gave a letter to him and said that PMO has called you. Satish Dhawan took all blame on him. On the other side when  the President reached the destination he saw it was a blank page. On that day, he decided to relaunch the satellite and worked day and night on it. When the relaunch date came, the fingers were crossed and wow the satellite was launched successfully. At that time, when President asked Dhawan to go media room guess what he said….

He said now I got a letter from PMO and you go to the media room.

Overall, I had a very nice experience today and really enjoyed it.

 

 

 

 

Apache Error

Today while doing work for OSM, I got an Apache error

  • Restarting web server apache2 AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message

It was not a fatal error. Local server was working fine at that time but that error was irritating me lot. So I try to solve it.

I made a file “amisha.conf” in  /etc/apache2/conf-available where amisha is my Servername. Servername can be checked from the file /etc/hostname.

Few days back, there was an error while installing reveal-md through npm there was an error. Then to fix the error  I wrote the command

sudo npm cache clean

Then, I was able to install my package.

PopUp Menu in OSM

What is the benifit of making own OSM tile server if we can’t style are own map. So here I come to tell you how to add the information(“PopUp Menu”) in your own OSM map.

So Let’s Start.

Edit the file “slippymap.html”.

The layer named “My Points”contains the information of the few shops near Gill road.

Enter the new layer just after the defination of the variable “map” in the init() function.

var pois = new OpenLayers.Layer.Text( “My Points”,
{ location:”./textfile.txt”,
projection: map.displayProjection
});
map.addLayer(pois);

 

Here textfile.txt is the file containing information of the shops in it. The below picture shows the format of the data stored in the textfile.

text1

Be sure the name of the image in the textfile and the image existing in the same directory should have same name.

Now refresh your map and you will be able to see the changes.

jh

User Defined Map

After a long time, finally I am  here for you to write a blog. It doesn’t mean that I was not working but due to academics work.

Huhh.. Now come to OSM again.

It’s very difficult for me to mouse the map to a particular loaction everytime while loading the map.

So, what I want is to enter the latitude and longitude of my own choice and browser should render that location while loading.

Now, we will try to do the same.

Just add two files name “input.html” and “process.php”. I added both files in the same directory that of the “slippymap.html”.

Content of both files are shown below.

input.html

<html><body>
<h4>SPT Test: Site location</h4>
<form action=”process.php” method=”post”>
<select name=”zoom” id=”zoom”>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
</select>
Latitude: <input name=”lat” type=”text” id=”lat”/>
Longitude: <input name=”lon” type=”text” id=”lon”/>
<button type=”submit” onclick=”qwer()” >submit</button>
</form>

function qwer(){
a = document.getElementById(“lat”).value;
b = document.getElementById(“lon”).value;
c = document.getElementById(“zoom”).value;

//console.log(a);
sessionStorage.setItem(“lat”, a);
sessionStorage.setItem(“lon”, b);
sessionStorage.setItem(“zoom”,c);
//alert(x);
}

</body></html>

 

process.php

<html><body>
<?php
$a=$_POST[“lat”];
$b=$_POST[“lon”];
$c=$_POST[“zoom”];?>
You ordered zoom <?php echo $_POST[“zoom”] ; ?>  at lat <?php echo $_POST[“lat”] ; ?>  and long <?php echo $_POST[“lon”] ; ?> <br />TCC<a href=”http://lab.gdy.club/osm/slippymap.html”>Get location of site on Map</a>

</body></html>

 

In “slippymap.html”  file just make the following changes.

 

http://OpenStreetMap.js

<script type=”text/javascript”>
var lat=sessionStorage.getItem(“lat”);
var lon=sessionStorage.getItem(“lon”);
var zoom=sessionStorage.getItem(“zoom”);
var map;

 

Now, open the file input.html in the browser and proceed further as shown.

 

osm2osm3

You will be able to see the map at the desired location.

osm4

Have a nice day.