Date: 10/05/2024
In Flutter based mobile applications we can apply shortest path algorithms (example Dijikstra) by using a package called dijikstra and
by customizing our code. We have developed a solution for finding a the shortest path between any two building for
VSB college of engineerng, Karur . If you are interested we can teach you how to develop that kind of solutions
Contact Sethuraman 9865863825
Date: 19/11/2023
In Digital Marketing,
Ad Grid plays a vital role in planning and mapping Avatars with Hooks (Avatars are the targets for our ad campaign and hooks help us to grab avatars to our offers and to take them further in the CVJ (Customer Value Journey)
Ad grid is an Excel Sheet with top row representing the Avatars (Restaurant customers categorized in different baskets in our case) and first column represents the hooks
We need to write an ad copy for every cell, where Hook meets the Avatar
Link to a sample Ad Grid here
https://lnkd.in/gUpG2vnm
In this Ad Grid, Cell 1 to 8 are customized ad copies showing the menu card according to the Avatar
Cell 9 to 16 are Blog Posts covering the advantages of food items across avatars which may help the person from one Avatar to cross over to another Avatar and that may increase the Sales.
Cell 17 to 24 will be videos on food preparation and hygiene maintenance which increases our restaurant’s credibility and in turn sales
Cell 25 to 32 will be referral coupons for our customers depending the basket or Avatar he/she belongs to
In the forthcoming posts I will be sharing with you how to write ad copies for each cell !
Date: 18/11/2023
When it comes to content,
It should be full-funnel content planning, so that a prospect who starts his/her journey on the top goes through the funnel seamlessly and subtly to become a lead and finally a loyal customer forever.
TOFU (Top of the funnel) content
- Blog post
- Social media posts
MOFU (middle of the funnel) content
- Audio and video podcasts,
- Subscription attached artifacts (create a lead magnet through which we offer an “Ethical Bribe”)
- Email reminders and confidence building artifacts about our products and services
BOFU (Bottom of the funnel) content
- Customer stories
- Highlighting our products or services edge over our rival products (Comparative analysis for evaluation)
- Discount coupons
- And we reach the “point of sale”
Date: 17/11/2023
What is content in digital marketing?
In simple terms, Content is any kind of information which helps us to move our prospect or lead or customer to the next stage in the Customer Value Journey (CVJ)
It can be a blog post, an infographic, video, podcast, a form for collecting information, buy button or a review collection.
The most important point about content is that “It should convey the right information at the right time to our prospect “.
An example
To get the attention of our prospect we can have a passive or active text or infographic CONTENT about our product or services.
At the next stage, depending on the response we can showcase our product’s features, it’s performance through a video link CONTENT which creates more interest and trust in our product or services.
Date: 16/11/2023
SEO (Search Engine Optimization) For our web pages to be ranked high on google ranking we need to have an in depth content, what ever may be our
web site for example if our web site is about digital marketing and seo we need to have content which gives valuable tips on content marketing,
social media marketing,seo etc. Content marketing is nothing but valuable points on the business which the web site boasts of!
if key word difficulty score is less(<50) then it is easy to rank our web site or web page for that keyword with our competitiors
if key word difficulty score is high(>50) then it is very difficult to climb the competitive ladder for that keyword with our competitiors
Date: 5/9/2023
import java.util.Scanner;
public class Example {
public static void main(String[] arg){
Scanner scr = new Scanner(System.in); // Reading input from keyboard
// int res = 0,j,i;
int res,j = 1,i;
String ans;
System.out.println("Enter the number");
res = scr.nextInt();
for(i = 2;i<=res;i++){ // for loop
j *= i;
// for(i = 1;i<=5;i++){ // for loop
// System.out.println("Enter the next number");
// j = scr.nextInt();
//res += j;
}
System.out.println("factorial is "+j);
// System.out.println("sum is "+res);
// while (true){
// System.out.println("Enter the next number");
// j = scr.nextDouble();
// res = res + j;
// System.out.println("Do u want one more number? (yes/no)");
// ans = scr.next(); // no
// if (ans.equals("no")){
// break;
// }
// }
// System.out.println("sum is "+res);
}
// public void temp(){
//
// short i = 1;
//// short i = 5,j;
//// short res = 0 ;
// float j;
// float res = 0;
//// while (i>=1){
// while (i<=5){
// System.out.println("Enter the next number");
//// j = scr.nextShort();
// j = scr.nextFloat();
//// System.out.println(i+" "+(6-i)+" "+(i*i)); //5
//// i--; // post decrement i = i - 1
// ++i;
//// res = (short) (res + i);
//// res = (short) (res + j);
// res = res + j;
// }
// System.out.println("sum is "+res);
//
////
// }
}
Date: 6/4/2023
Holiday
Date: 5/4/2023
when we use flutter for Mobile App Development we build the complete application using a collection of Widgets
All these widgets are dart classes with set of optional named parameters. The advantage of having named parameter is some
of them can be omitted. Still we can construct these widgets in our UI (user interface ) Example Scaffold Widget
this class has many parameters like appBar, home etc. AppBar itself is a widget with parameters like title,actions (a list)
Ex.
Here Scaffold is a constructor which is more or less like a method of a class
Scaffold(
appBar:AppBar(
title:Text('Demo App'),actions:[]))
It is an extensive usage of OOP (Object Oriented Programming) concepts.
Date: 4/4/2023
When we call a function ( in this example Dart language) we can have named parameters within curly braces { }
Example:
String getFullName({String fname,String lname}){
return fname+' '+lname;
}
The function calling point will be like this
getFullName(fname:'John',lname:'Fredrick')
The first advantage of having named parameters are It conveys a meaning of the parameter which we pass
secondly the order of parameter does not matter. In the above example we can call the same above function
like getFullName(lname:'Fredrick',fname:'John') as well
And also the named paramters are optional. If we don't pass them they can take default values
Date: 3/4/2023
When we develop software using Python-Flask web framework we need to create and activate the virtual environment
using the following commands
pip install virtualenv
After creating the virtual environment
virtualenv flask
cd Scripts > activate (to activate the vir_env)
then we can create any project and install the following packages
like flask, flask-login,flask-alchemy etc
Date: 2/4/2023
# Perl using Hash to fetch data from a dictionary
%data = ('viswa',24,'sripradha',23,'gunaseelean',62,'malathi',55);
print "Enter the name to Search";
$name = <STDIN>;
chop($name);
print "\$data{'$name'} = $data{$name}";
Date: 1/4/2023
In Python Flask's main.py, we give if __name__ = '__main__': app.run(Debug=True) Do you know why?
Because
It ensures that only when main.py in Run the app starts running in the web server
It prevents us from running the web server by just importing main.py and then running the web server
Date: 31/3/2023
Using dart programming language we can find out the bit length of an integer using a method called bitLength
for example 15.bitLength ( as integer is also an object we can use any integer value followed by a . (dot) to access
all its methods. The above method invocation will give a result of 4, as binary for 15 is 1111
here it takes a maximum of 4 bits to represent 15
for 24.bitLength the answer will be 11000 (5) as it takes a maxium of 5 bits to represent 24
Date: 30/3/2023 Web Applications Hacking Mechanisams
1. Why are an application’s hacking mechanisms for handling user access is only as
strong as the weakest of these components? Scenario 1 Authentication is perfect Only authorized users can enter into the system
Session Management is perfect Between sessions tokens are transmitted and every page access is validated Access Control is poor Any user who is inside the system is allowed to do actions for which he has no privileges Scenario 2
Authentication is perfect Only authorized users can enter into the system Session Management is poor Between sessions cookies with tokens are not proper, page access is not validated leading to access by anonynous users and other users
Access Control is perfect Restrictions are properly maintened Scenario 3 Authentication is poor Any user can enter into the system
Session Management is good Between sessions tokens are transmitted and every page access is validated
Access Control is perfect Restrictions are properly maintened
Date: 29/3/2023
PHP code using prepare statements to avoid SQL Injection Attack
$user_name = $_POST['user_name'];
$password = $_POST['password'];
$con = new mysqli('localhost','root','','college');
$sql = "select * from users where user_name=? and password=?";
$stmt = $con->prepare($sql);
$stmt->bind_param("ss",$user_name,$password);
$stmt->execute();
$stmt->store_result();
if ($stmt->num_rows>0){
header('Location: success.html');
}
else{
echo "No...";
}
In the above code if you try to put string "anything' or 1=1 -- '" in the user_name field it will fail!
Date: 28/3/2023
With Web Application hacking, the hackers may use different input combinations to attack a web application.
To over come it we need to use different approaches.
RKB [Reject Known Bad] (A set of black-listed input strings) For example, anystring' or 1=1 -- '
AKG [Accept Known Good] (A set of white-listed input strings) For example, A name field with alphabets max with 8 characters
SAZ [Sanitization] Removing black listed characters from the input, example preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $user_name)
Date: 27/3/2023
If our web site does not have Marquees (Running text) then there will be a marked improvement in its
Page Score when analysed by SEO analyzer. So it's a trade off ! if you prefer running text over performance
then you may decide to keep a Marquee at the cost of slightly degraded performance ! It's completely the
the web site owner's choice ! There is no perfect metrics in this regard !
The Above SQL query can be bypassed with the following query string in the user_name text Field anystring' or 1=1 -- ' and even if you do not know the user name and password you will be redirected to success page
Date: 25/3/2023
Bitwise operator is very effective and powerful
using them we can store more information in a single variable
for example you can take a single variable X
X = 0
X = X | 1 # for storing the fact whether a person is male or female
X = X | 2 # for storing the fact whether a person eligible to vote or not
X = X | 4 # for storing the fact a person is black or white
To show the result you can use the following statements
if (X & 1):
print('Male')
else:
print('Female')
if (X & 2):
print('Eligible')
else:
print('Not Eligible')
if (X & 4):
print('Black')
else:
print('White')
Date: 24/3/2023
Python program to print a number in binary
num = 24
x = 1
x = x << 15
while x:
if num & x: if the the bit in given num bitwise operator with x non zero
print("1",end=' ')
else:
print("0",end=' ')
x = x >> 1
output
0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0
Date: 23/3/2023
SEO (Search Engine Optimization) involves improving our site's content in terms with Title Tag
Meta Description,Headings,Keyword Consistency across many tags,Alt Attribute,Text/HTML ratio
No underscores in the URLs, No Embedded Objects, No Iframe elements etc.
if we keep all of the above said parameters in mind then our web site's home page
rank will be above 70 which shows that our Web Page is in good Shape !
The following image shows after I have done SEO on my web site the page score increased from 60 to 72
Date: 22/3/2023 # Python program to generate n random elements where n is in multiple of 3
# and split into 3 lists wherein each list contains
# elements in reverse order
import random #(for randomly generating n random number list)
print('Enter number of elements (in multiples of 3)')
n = int(input())
list1= [random.randint(1,100) for x in range(n)] #(for randomly generating n random number list in the range of 1 - 100)
l2 = []
l3 = []
l4 = []
length = len(l1)
nums = length/3 #(to divide into 3 lists)
nums = int(nums) #(as / produces float we have to convert)
l2 = list1[nums-1 : : -1] #(firt list in reverse order)
l3 = list1[nums*2-1 : nums-1 : -1] #(to find the second list nums*2 goes to second part and again in reverse order)
l4 = list1[length-1 : length-nums-1 : -1] # (third list from the end to total number elements - sublist count)
print('Original List')
print(list1)
print('Split List')
print(l2,l3,l4)
Date: 21/3/2023
In JQuery when you want to access the id of an enclosed 'div','h2' or any other block level element
You can use the following statement. Here 'this' refers to the internal clicked element
'h2' refers to the enclosed h2 element with an attribute ID set . So we will be able to retrieve
the ID of any outside block as we click the internal element. In this case it can be Button or any other ICON
question = $(this).closest("h2").attr('id')
Date: 20/3/2023
Comparative Study of C and Python for exchanging two values
C
int a=10,b=20;
printf("%d %d\n",a,b);
a = a + b;
b = a - b;
a = a - b;
printf("%d %d\n",a,b);
Python Programming:
a = 10
b = 20
print(a,b,"\n")
a,b = b,a
print(a,b,"\n")
Just see ! python's syntax is so easy!
19/3/2023 HOLIDAY
Date: 18/3/2023
Python Code snippet to find how much time a loop takes to execute
st = time()
endval = 1000 # keep changing this variable's value by adding more zeros at the end
for i in range(endval): # Give appropriate indentation
i = i + 1
ed = time()
print(ed - st)
Date: 17/3/2023
When you write a program or develop a software sometimes you may need the help of internet to have some idea
So I personally recommend https://stackoverflow.com/ in which the prospective solution (many a times an idea)
again we may have to customize according to our problem will be available with a Green Color Tick mark beside the solution
That has worked for me most of the times ! You can also try !
Date: 16/3/2023
In Mobile App Development when you want to test your app in real mobile device you locate your mobile IP Address
inside settings then if you use Visual Source Code Editor goto terminal and type "adb tcpip 5555" adb stands
for (android debug bridge) and then you type "adb connect your-ipaddress" if already connected first
type "adb disconnect your-ipaddress" , Still if it is not connecting then connect your data cable to your
mobile phone and the other end to your Laptop. This time it should restart the tcpip port and issue the above connect command ! All the best
Date: 15/3/2023
The reason for the success of Object Orient Programming languages like (Java,Python,Dart etc) is that they reflect the real life
entities. In those programming languages we write a class which is an embodiment of attributes and behaviors.
All objects made out of a specific class are sharing the same attributes and behaviors. Like an object of a Male class
Let us call him Robert who has legs, hands ,nose etc as well as an another object called Rahim who also has legs,hands,nose etc as they come
from a same Male Class They also share the same set of basic behaviors of a male object like breathing , walking etc.
They may also share an attribute called "knowledge" which may have different value based on one's knowledge.
For Example Robert may have value of 5 and Rahim may have a value of 8
An increase in one's knowledge value dependes on how a person learns. So the attribute values and behaviors are inseperable!
If Robert's knowledge has to increase then he alone is responsible for increasing it. Rahim object cannot change the state of Robert's
Keep this in mind.
Date: 14/3/2023
// Recursive C program to find GCD of two numbers
#include "stdio.h"
int c; // Global variable for divisor
void gcd(int a,int b){
if (a % c == 0 && b % c == 0){
printf("%d is the GCD of %d and %d ",c,a,b); // if a and b get divided then c is the divisor
return;
}
else if (c == 1){
printf(" 1 is GCD of %d and %d",a,b); // else if c reaches 1 then 1 is the divisor
return;
}
else{
--c; // decrease divisor by 1
gcd(a,b); // Recursive call
}
}
int main(){
int a,b;
printf(" Enter two numbers");
scanf("%d %d",&a,&b);
if (a < b){ // Lesser among a and b starts as divisor and assigned to c
c = a ;
}
else if ( b < a){
c = b;
}
gcd(a,b);
return 0;
}
Date: 13/3/2023
Whenever you solve a complex problem involving lot of calculations , you take LITTLE TINY STEPS
means you insert intermediate console.log or print statements to know the success of your algorithmic steps
in an incremental way ! Never complete many tasks at once and try to run your program
you will find difficulty in itentifying the location of the bugs
It will be like searching a NEEDLE IN A HUGE HAY STACK !
keep this in mind
Date: 12/3/2023
// Program to find the range of integer in Java
public class Main
{
public static void main(String[] args) {
int x = 30000; // x can be set to any number of your choice
while(x>0){
++x; //Here we keep increasing the value of x until it reaches negative! Then that is the largest negative int
}
System.out.println("Integer Negative range is"+x);
--x; // Here we decrease on step behind to peep into the largest positive integer
System.out.println("Integer Postive range is"+x);
}
}
Date: 11/3/2023
C++ , Java upwards (Python ,Dart etc.,) all languages are objected oriented languages. Because they deal only with objects which come from a speific class. In Conventional languages (C) the data have to be either global or data have to be passed as arguments through functions. If the data is global then TOO MANY SPOONS SPOIL THE SOUP, if the data have to be passed as arguments it leads to difficulty in coding. These demerits have been over come in OOPS languages like C++,JAVA and Dart Etc.