mardi 27 août 2019

How to share whatsapp on whatsapp web on desktop and whatsapp app on phone

I'm trying to implement a button that shares the current page on whatsapp, theres no issue with using the link on phone but on desktop i can't send it to whatsapp web or open whatsapp web if it's not opened yet.

i was searching for long on SO and other webpages as well on documentation, which i cant find (i only face android documentation but not web documentation for it).

i refered to https://api.whatsapp.com nut no info can be found here.

My approach is this line as i said someone posting here: How to implements whatsapp share button in website

<a href="https://api.whatsapp.com/send?text=urlencodedtext" target="_blank">Share to whatsapp</a>

i bet that this function was moved to whatsapp for business, are it?

Any help will be apreciated.

Regards




How to get the data(temperature) for bulk of cities from the public web service and save to salesforce by using batch apex?

Met in a problem of how to get the records of temperature from the public portal. i didnt get the data updated in salesforce org.

global class WeatherBatch implements Database.Batchable<sObject>,Database.AllowsCallouts,Database.Stateful{
    public static void futureMethod(){
        HttpRequest request = new HttpRequest();
        Http http = new Http();
        request.setEndpoint('https://api.weatherbit.io/v2.0/current?city=Mumbai&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
        request.setMethod('GET');
        HttpResponse response= http.send(request);
        if(response.getStatusCode() == 200){
          Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
            List<Object> data = (List<Object>) results.get('data');
            System.debug(data.size());
            System.debug('Received the following data:');
            for (integer i=0; i<data.size(); i++)
              System.debug(data);
            }
        }




Deploy a netbeans web application on an external server

How to deploy a NetBeans web application on an external tomcat server ? I'm using NetBeans as an IDE and I'm trying to deploy the web application on an external server.




I can't run this query, but when i simulate it in phpmyadmin, it returns the rows

I'm going to delete some rows in one of my table called 'sy_user'. I want to delete some of the rows that is not matched in the other table, which is the 'tb_master_pegawai'. How do i solve this query to do the row delete using the subquery as the WHERE condition?

I used subquery as the WHERE condition in the DELETE query. When i run it in phpmyadmin it says "You can't specify target table 'sy_user' for update in FROM clause" but when i simulate it, it has return rows.

DELETE FROM sy_user 
       WHERE user_id NOT IN 
                (SELECT tbpeg.ID 
                 FROM tb_master_pegawai AS tbpeg 
                 JOIN sy_user AS tbuser ON tbpeg.ID=tbuser.user_id)

i expect the result is i have deleted the rows that are not matched with the same data in the other table.




lundi 26 août 2019

Which hosting Plans/Third Party service to set up like Netflix application(small scale up to 500 gb storage) in india

we are building application like netflix on android platform. Application storage will be 700GB. Can we go for cloud hosting/ media hosting




Is nested ng-apps allowed in angularjs?

I work on a website builder editor, and the whole Html tag must have an AngularJS app and a controller, and I wanna know if I can use nested AngularJS apps in my project and if it will cause a problem or not.




Footer keeps appearing in the middle of the page

I am creating a web page with html and css, however when I created the footer CSS it sits in the middle of the page. I've tried w3 schools but I couldn't find anything on it.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="description" content="The Dusty Garage">
    <title> The Dusty Garage </title>

CSS STARTS HERE html, body { margin: 0;

            font-family: Arial, Helvetica, sans-serif, Verdana, Geneva, Tahoma, sans-serif;
        }

        #wrapper {
            margin: auto;
            width: 100%;
            max-width: 100%;

        }

        #navigationbar {
            clear: both;
            height: 50px;
            max-width: 100%;
            background-color: cornflowerblue;
        }

        #companyname {
            margin: 0;
            float: left;
            padding: 5px;
            font-size: 12px;
            text-decoration: none;
        }

        #companyname a {
            color: black;
            text-decoration: none;

        }

        nav {
            float: right;
        }

        nav ul {
            list-style: none;
            margin: 0;
            padding-left: 0;
        }

        nav ul li {
            color: #fff;
            display: block;
            float: left;
            padding: 1rem;
            border-right: 1px solid #bbb;
            position: relative;
            text-decoration: none;
            transition-duration: 0.5s;
        }

        nav ul li a {
            display: block;
            text-decoration: none;
            color: white;
        }

        nav ul li:hover,
        nav ul li:focus-within {
            background-color: royalblue;
            cursor: pointer;
        }

        nav ul li:focus-within a {
            outline: none;
        }

        nav ul li ul {
            background-color: cornflowerblue;
            visibility: hidden;
            opacity: 0;
            position: absolute;
            transition: all 0.5s ease;
            margin-top: 1rem;
            left: 0;
            white-space: nowrap;
        }

        nav ul li:hover>ul,
        nav ul li:focus-within>ul,
        nav ul li ul:hover,
        nav ul li ul:focus {
            visibility: visible;
            opacity: 1;
            display: block;
        }

        nav ul li ul li {
            background-color: cornflowerblue;
            width: 100%;
            display: inline-block;

        }

        nav li:last-child {
            border-right: none;
        }

        nav .active {
            background-color: black;
        }

        /* Navigation CSS End */

        /* Banner Image CSS Start */
        .hero {
            height: 70vh;
            display: block;
            justify-content: center;
            align-items: center;
            text-align: center;
            color: white;

            background-image: url(https://memberpress.com/wp-content/uploads/2015/06/Google-tools@2x-1.png);
            background-size: cover;
            background-position: center center;
            background-repeat: no-repeat;
            background-attachment: fixed;
        }

        .hero>* {
            color: black;
        }

        .hero>h2 {
            font-size: 3rm;
            padding-bottom: 20rem;
            text-align: center;
            vertical-align: middle;

        }

        /* HERO IMAGE BANNER END */

        /* START SECTION CSS FOR BROWSE AND SELL */

        .browsesellarea {
            display: flex;
            flex-wrap: wrap;
        }

        /* Heading Style */

        .browsesellarea-heading {
            position: absolute;
            margin-top: 0;
        }

        .browsesellarea-area {
            flex: 1 0 500px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.3);
            margin: 3rem .5rem .5rem .5rem;
            padding: .1rem .1rem .1rem .1rem
        }

        .browsesellarea-area img {
            display: block;
            border: black;
            width: auto;
            height: 290px;
            padding: .1rem .1rem .1rem .1rem
        }

        /* END BROWSE-SELL CSS  */

        /* START FOOTER CSS */
        .footer {
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: cornflowerblue;
            color: white;
            margin: auto;

        }
    </style>
</head>

<body>
    <div id="wrapper">
        <!---Contains Navigation and Logo-->
        <header>
            <div id="navigationbar">
                <div id=companyname>
                    <a href="#">
                        <h1>The Dusty Garage</h1>
                    </a>
                </div>
                <nav>
                    <ul>
                        <li>
                            <a href="#">Home</a>
                        </li>
                        <li>
                            <a href="#BrowseTools">Browse Tools</a>
                            <ul>
                                <li>
                                    <a href="#BrowseTools">Browse Tools</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>
        </header>
        <section class="hero">
            <h2>Find the Perfect Tool</h2>

        </section>

        <main>
            <!---Contains Main Content-->
            <div class="goal-heading">
                <h1>Our Aim</h1>
            </div>
            <p> The Aim of this project is to develop a peer to peer marketplace for used and new tools. Many people own
                tools
                they don’t use anymore, so instead of gathering dust in the garage, this marketplace aims to give old
                tools
                a
                new lease on life. From garden to industrial tools, users can list tools they own for sale and make bids
                on
                other user’s listed tools. Users can see a list of bidders and contact the user who has made the most
                appealing
                bid, for transaction outside the website. Once a sale has been made, all the seller needs to do is mark
                the
                item
                as sold .</p>
            <section class="browsesellarea">
                <section class="browsesellarea-heading">
                    <h2>Looking for Tools?</h2>

                    <div class="browsesellarea-area">
                        <img src="Images/2925.jpg" alt="Browse Tools to Buy" />
                    </div>
                    <button>Browse Categories</button>




                    <h2> Got a shed full of dusty tools?</h2>
                    <div class="browsesellarea-area">
                        <img src="Images/10975.jpg" alt="Browse Tools to Buy" />
                    </div>
                    <button>Sell Your Tools Here</button>

                </section>
            </section>
        </main>
    </div>
    <!-- FOOTER -->

    <footer class="footer">
        <div>
            <p>Copyright &copy; 2019</p>
        </div>

    </footer>

</body>

</html>

Footer should sit on the bottom of the page. However, it sits in the middle. I'd like it to sit on the bottom of the page as a footer should do. Would anyone know how to fix this issue?