text:
<file_sep>import datetime
from functools import wraps
import json

import requests
from flask import Flask, render_template, flash, redirect, url_for, session, request, logging,jsonify
#from model.ConnecsiModel import ConnecsiModel
from passlib.hash import sha256_crypt
#from flask_oauthlib.client import OAuth
import os

connecsiApp = Flask(__name__)
connecsiApp.secret_key = 'connecsiSecretKey'
base_url = 'https://kiranpadwaltestconnecsi.pythonanywhere.com/api/'
# oauth = OAuth(connecsiApp)

# linkedin = oauth.remote_app(
#     'linkedin',
#     consumer_key='86ctp4ayian53w',
#     consumer_secret='3fdovLJRbWrQuu3u',
#     request_token_params={
#         'scope': 'r_basicprofile,r_emailaddress',
#         'state': 'RandomString',
#     },
#     base_url='https://api.linkedin.com/v1/',
#     request_token_url=None,
#     access_token_method='POST',
#     access_token_url='https://www.linkedin.com/uas/oauth2/accessToken',
#     authorize_url='https://www.linkedin.com/uas/oauth2/authorization',
# )

# Check if user logged in
def is_logged_in(f):
    @wraps(f)
    def wrap(*args,**kwargs):
        if 'logged_in' in session:
            return f(*args,**kwargs)
        else:
            flash('Unauthorized, Please login','danger')
            return redirect(url_for('index'))
    return wrap

@connecsiApp.route('/')
# @is_logged_in
def index():
    title='Connesi App Login Panel'
    data=[]
    data.append(title)
    return render_template('user/login.html',data=data)

# @connecsiApp.route('/loginLinkedin')
# def loginLinkedin():
#     return linkedin.authorize(callback=url_for('authorized', _external=True))

@connecsiApp.route('/registerBrand')
def registerBrand():
    return render_template('user/registerFormBrand.html')

@connecsiApp.route('/saveBrand',methods=['GET','POST'])
def saveBrand():
    if request.method == 'POST':
        url = base_url+'Brand/register'
        payload = request.form.to_dict()
        print(payload)
        del payload['confirm_password']
        print(payload)
        title = 'Connesi App Login Panel'
        try:
            response = requests.post(url, json=payload)
            print(response.json())
            result_json = response.json()
            print(result_json['response'])
            result = result_json['response']
            # exit()
            if result == 1:
                flash("Brand Details Successfully Registered", 'success')
                title = 'Connesi App Login Panel'
                return render_template('user/login.html', title=title)
            else:
                flash("Internal error please try later", 'danger')
                return render_template('user/login.html', title=title)
        except:
            flash("Internal error please try later", 'danger')
            return render_template('user/registerFormBrand.html',title='Register Brand')
#
#
#
#Logout
@connecsiApp.route('/logout')
def logout():
    session.clear()
    flash('You are now logged out','success')
    return redirect(url_for('index'))

#
# # User login
@connecsiApp.route('/login',methods=['POST'])
def login():
    if request.method=='POST':
        if 'brand' in request.form:
            url = base_url + 'User/login'
            payload = request.form.to_dict()
            print(payload)
            del payload['brand']
            print(payload)
            title = ''
            try:
                response = requests.post(url, json=payload)
                print(response.json())
                result_json = response.json()
                user_id = result_json['user_id']
                print(user_id)
                # exit()
                if user_id:
                    flash("logged in", 'success')
                    session['logged_in'] = True
                    session['email_id']=payload.get('email')
                    session['type'] = 'brand'
                    session['user_id']=user_id
                    print(session['user_id'])
                    return redirect(url_for('admin'))
                else:
                    flash("Internal error please try later", 'danger')
                    return render_template('user/login.html', title=title)
            except:
                flash("Internal error please try later", 'danger')
                return render_template('user/login.html', title='Login')
        elif 'influencer' in request.form:
            email_id = request.form.get('inf_username')
            password = request.form.get('inf_password')
            print(email_id)
            print(password)

@connecsiApp.route('/admin')
@is_logged_in
def admin():
    title='Dashboard'
    return render_template('index.html',title=title)
#
#
@connecsiApp.route('/profileView')
@is_logged_in
def profileView():
    title='Profile View'
    type = session['type']
    user_id = session['user_id']
    if type == 'brand':
        url = base_url + 'Brand/'+str(user_id)
        try:
            response = requests.get(url)
            # print(response.json())
            data_json = response.json()
            print(data_json)
            return render_template('user/user-profile-page.html', data=data_json, title=title)
        except Exception as e:
            print(e)
    else:
        table_name = 'users_inf'

@connecsiApp.route('/editProfile')
@is_logged_in
def editProfile():
    title='Edit Profile'
    type = session['type']
    user_id = session['user_id']
    if type == 'brand':
        url = base_url + 'Brand/'+str(user_id)
        try:
            response = requests.get(url)
            # print(response.json())
            data_json = response.json()
            print(data_json)
            return render_template('user/edit-profile-page.html', data=data_json, title=title)
        except Exception as e:
            print(e)
    else:
        table_name = 'users_inf'

@connecsiApp.route('/updateProfile',methods=['GET','POST'])
@is_logged_in
def updateProfile():
    user_id = session['user_id']
    if request.method == 'POST':
        url = base_url+ 'Brand/'+str(user_id)
        payload = request.form.to_dict()
        print(payload)
        try:
            response = requests.put(url=url,json=payload)
            result_json = response.json()
            # return redirect(url_for('/profileView'))
            return profileView()
        except:pass

@connecsiApp.route('/searchInfluencers',methods=['POST','GET'])
@is_logged_in
def searchInfluencers():
    url_regionCodes = base_url + 'Youtube/regionCodes'
    regionCodes_json=''
    videoCat_json=''
    form_filters=''
    country_name=''
    try:
        response_regionCodes = requests.get(url=url_regionCodes)
        regionCodes_json = response_regionCodes.json()
        # print(regionCodes_json['data'])
    except Exception as e:
        print(e)
    url_videoCat = base_url + 'Youtube/videoCategories'
    try:
        response_videoCat = requests.get(url=url_videoCat)
        videoCat_json = response_videoCat.json()
        # print(videoCat_json['data'])
    except Exception as e:
        print(e)
    lookup_string = ''
    for cat in videoCat_json['data']:
        # print(cat['video_cat_name'])
        lookup_string += ''.join(',' + cat['video_cat_name'])
    lookup_string = lookup_string.replace('&', 'and')

    if request.method=='POST':
        if 'search_inf' in request.form:
            string_word = request.form.get('string_word')
            print(string_word)
            # exit()
            category = string_word.replace('and','&')
            print(category)
            category_id=''
            for cat in videoCat_json['data']:
                # print(cat['video_cat_name'])
                if cat['video_cat_name'] == category:
                    print("category id = ",cat['video_cat_id'])
                    category_id = cat['video_cat_id']
            form_filters = request.form.to_dict()
            print(form_filters)
            url_country_name = base_url + 'Youtube/regionCode/'+form_filters['country']
            try:
                response_country_name = requests.get(url=url_country_name)
                country_name_json = response_country_name.json()
                print(country_name_json['data'][0][1])
                country_name = country_name_json['data'][0][1]
            except Exception as e:
                print(e)
            form_filters.update({'country_name':country_name})
            payload = request.form.to_dict()

            del payload['string_word']
            del payload['search_inf']
            del payload['channel']
            payload.update({'category_id': str(category_id)})
            payload.update({'min_lower':payload.get('min_lower')})
            payload.update({'max_upper':payload.get('max_upper')})
            print(payload)
            try:
                channel = request.form.get('channel')
                url = base_url+'Youtube/searchChannels/'+channel
                # print(url)
                response = requests.post(url, json=payload)
                print(response.json())
                data = response.json()
                return render_template('search/searchInfluencers.html', regionCodes=regionCodes_json,
                                       lookup_string=lookup_string, form_filters=form_filters,data=data)
            except Exception as e:
                print(e)
            return render_template('search/searchInfluencers.html', regionCodes=regionCodes_json,
                                   lookup_string=lookup_string,form_filters=form_filters)

    else:
        return render_template('search/searchInfluencers.html', regionCodes=regionCodes_json,
                               lookup_string=lookup_string,form_filters=form_filters,data='')

#
@connecsiApp.route('/addFundsBrands')
@is_logged_in
def addFundsBrands():
    return render_template('user/add_funds.html')

@connecsiApp.route('/saveFundsBrands',methods=['POST'])
@is_logged_in
def saveFundsBrands():
    if request.method == 'POST':
       payload = request.form.to_dict()
       print(payload)
       user_id = session['user_id']
       url = base_url+'Payments/'+str(user_id)
       try:
           response = requests.post(url=url, json=payload)
           result_json = response.json()
           return viewMyPayments()
       except:
           pass
    else:
        return redirect(url_for('addFundsBrands'))

#
# @connecsiApp.route('/payment')
# @is_logged_in
# def payment():
#     # print(user_id,date,email_id,amount,description)
#     return render_template('payment/payment.html')
#
# @connecsiApp.route('/checkout')
# @is_logged_in
# def checkout():
#     return redirect(url_for('viewMyPayments'))
#
@connecsiApp.route('/viewMyPayments')
@is_logged_in
def viewMyPayments():
    data = ''
    user_id = session['user_id']
    url = base_url + 'Payments/'+str(user_id)
    try:
        response = requests.get(url=url)
        data = response.json()
        print(data)
        return render_template('user/view_my_payments.html', data=data)
    except:
        pass
    return render_template('user/view_my_payments.html',data=data)
#
#
@connecsiApp.route('/add_Campaign')
@is_logged_in
def add_Campaign():
    #connecsiObj = ConnecsiModel()
    #region_codes = connecsiObj.get__(table_name='youtube_region_codes',STAR='*')
    #video_categories = connecsiObj.get__(table_name='youtube_video_categories', STAR='*')
    return render_template('campaign/add_campaignForm.html')

@connecsiApp.route('/viewCampaigns')
@is_logged_in
def viewCampaigns():
    #connecsiObj = ConnecsiModel()
    #region_codes = connecsiObj.get__(table_name='youtube_region_codes',STAR='*')
    #video_categories = connecsiObj.get__(table_name='youtube_video_categories', STAR='*')
    return render_template('campaign/viewCampaigns.html')

@connecsiApp.route('/viewCampaignDetails')
@is_logged_in
def viewCampaignDetails():
    #connecsiObj = ConnecsiModel()
    #region_codes = connecsiObj.get__(table_name='youtube_region_codes',STAR='*')
    #video_categories = connecsiObj.get__(table_name='youtube_video_categories', STAR='*')
    return render_template('campaign/viewCampaignDetails.html')

@connecsiApp.route('/favoriteInfluencerList')
@is_logged_in
def favoriteInfluencerList():
    #connecsiObj = ConnecsiModel()
    #region_codes = connecsiObj.get__(table_name='youtube_region_codes',STAR='*')
    #video_categories = connecsiObj.get__(table_name='youtube_video_categories', STAR='*')
    return render_template('partnerships/favoriteInfluencerList.html')

@connecsiApp.route('/calendarView')
@is_logged_in
def calendarView():
    return render_template('campaign/calendarView.html')

# @connecsiApp.route('/saveCampaign',methods=['POST'])
# @is_logged_in
# def saveCampaign():
#     if request.method == 'POST':
#         campaign_name = request.form.get('campaign_name')
#         from_date = request.form.get('from_date')
#         to_date = request.form.get('to_date')
#         budget = request.form.get('budget')
#         currency = request.form.get('currency')
#         channels = request.form.getlist('channel')
#         channels_string = ','.join(channels)
#         regions = request.form.getlist('region')
#         regions_string = ','.join(regions)
#         min_lower = request.form.get('min_lower')
#         max_upper = request.form.get('max_upper')
#
#         files = request.form.getlist('files')
#         # files = request.files.getlist("files")
#         print(files)
#
#         video_cat = request.form.get('video_cat')
#         target_url = request.form.get('target_url')
#         campaign_description = request.form.get('campaign_description')
#         arrangements = request.form.getlist('arrangements')
#         arrangements_string=','.join(arrangements)
#         kpis = request.form.get('kpis')
#         user_id = session['user_id']
#         data=[campaign_name,from_date,to_date,budget,currency,channels_string,
#               regions_string,min_lower,max_upper,video_cat,target_url,campaign_description,arrangements_string,kpis,user_id]
#         columns = ['campaign_name','from_date','to_date','budget','currency','channels','regions',
#                    'min_lower_followers','max_upper_followers','video_cat_id','target_url','campaign_description','arrangements','kpis','user_id']
#         connecsiObj = ConnecsiModel()
#         connecsiObj.insert__(table_name='brands_campaigns',columns=columns,data=data)
#         return ""
#
@connecsiApp.route('/inbox')
@is_logged_in
def email():
    return render_template('email/inbox.html')

# @connecsiApp.route('/login/authorized')
# def authorized():
#     resp = linkedin.authorized_response()
#     if resp is None:
#         return 'Access denied: reason=%s error=%s' % (
#             request.args['error_reason'],
#             request.args['error_description']
#         )
#     session['linkedin_token'] = (resp['access_token'], '')

    # me = linkedin.get('people/~')
    # email_linkedin = linkedin.get('people/~:(email-address)')
    # print(jsonify(email_linkedin.data))

    # email_id = email_linkedin.data['emailAddress']
    # data=[me.data['id'],me.data['firstName'],me.data['lastName'],email_id,'',me.data['headline'],'Admin']
    # print(me.data)
    # session['logged_in'] = True
    # session['type'] = 'brand'
    # session['user_id'] = me.data['id']
    # session['first_name']=me.data['firstName']
    # print(data)
    # return render_template('index.html',data=data)

# @linkedin.tokengetter
# def get_linkedin_oauth_token():
#     return session.get('linkedin_token')

# def change_linkedin_query(uri, headers, body):
#     auth = headers.pop('Authorization')
#     headers['x-li-format'] = 'json'
#     if auth:
#         auth = auth.replace('Bearer', '').strip()
#         if '?' in uri:
#             uri += '&oauth2_access_token=' + auth
#         else:
#             uri += '?oauth2_access_token=' + auth
#     return uri, headers, body
#
# linkedin.pre_request = change_linkedin_query

if __name__ == '__main__':
    connecsiApp.secret_key = 'connecsiSecretKey'
    connecsiApp.run(debug=True,host='localhost',port=8080)

repo_language: Python

repo_name: BhavyaConnecsi/ConnecsiFrontendFlask


text:
<file_sep>/*Copyright (C) <NAME>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
* Author:
* <NAME> */

#include<arpa/inet.h>
#include<unistd.h>
#include<sys/socket.h>
#include<sys/types.h>
#include <arpa/inet.h>

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include "curl/curl.h"

#include <fstream>
#include <iostream>
#include <boost/regex.hpp>
#include <boost/program_options.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <ctime>

//using namespace std;
using std::cout;
using std::endl;
using std::string;

using namespace boost::program_options;
namespace po = boost::program_options;

const int ZIBASE_CMD_HOST_REGISTERING = 13;
const int ZIBASE_CMD_HOST_UNREGISTERING = 22;
const int ZIBASE_CMD_RF_FRAME_SENDING = 11;
const int ZIBASE_CMD_SCENARIO_LAUNCHING = 11;
const int ZIBASE_CMD_SET_EVENT = 11;

static string buffer;

string zibase_address;
int zibase_port = 49999;
string bind_address;
int bind_port = 49998;

bool opt_log;
bool opt_verbose;
string log_path = "/tmp/zibase.log";

bool opt_post;
string post_url;
string post_auth;

enum ZAPI_protocol {
   	PRESET = 0,
 	VISONIC433 = 1,
  	VISONIC868 = 2,
  	CHACON = 3,
  	DOMIA = 4,
  	X10 = 5,
  	ZWAVE = 6,
  	RFS10 = 7,
  	X2D433 = 8,
  	X2D433ALRM = 8,
  	X2D868 = 9,
  	X2D868ALRM = 9,
  	X2D868INSH = 10,
  	X2D868PIWI = 11,
  	X2D868BOAC = 12
};

enum ZAPI_virtual_probe {
    OREGON = 17,
    OWL = 20
};

enum ZAPI_action {
    OFF = 0,
    ON = 1,
    DIM_BRIGHT = 2,
    ALL_LIGHTS_ON = 4,
    ALL_LIGHTS_OFF = 5,
    ALL_OFF = 6,
    ASSOC = 7
};

struct ZAPI_packet_header{

    ZAPI_packet_header(uint16_t cmd=0, uint32_t p1=0, uint32_t p2=0, uint32_t p3=0, uint32_t p4=0) :
        command(cmd),
        param1(p1),
        param2(p2),
        param3(p3),
        param4(p4),
        my_count(0),
        your_count(0)
    {
        strncpy((char*)header, "ZSIG", sizeof(header));

    }

    unsigned char header[4];
    uint16_t command; // command number
    unsigned char reserved1[16];
    unsigned char zibase_id[16];
    unsigned char reserved2[12];
    uint32_t param1; // generic parameters for commands
    uint32_t param2; // generic parameters for commands
    uint32_t param3; // generic parameters for commands
    uint32_t param4; // generic parameters for commands
    uint16_t my_count; // incr.counter at each sent packet (not incr. in burst of same packets)
    uint16_t your_count; // last counter value received by the other side

    ///network to host
    void ntoh()
    {
        command = ntohs(command);
        param1 = ntohl(param1);
        param2 = ntohl(param2);
        param3 = ntohl(param3);
        my_count = ntohs(my_count);
        your_count = ntohs(your_count);
    }
    ///host to network
    void hton()
    {
        command = htons(command);
        param1 = htonl(param1);
        param2 = htonl(param2);
        param3 = htonl(param3);
        my_count = htons(my_count);
        your_count = htons(your_count);
    }
} __attribute__((packed));

struct ZAPI_packet_receiving : public ZAPI_packet_header {
    char text_field[400];
} __attribute__((packed));

void error( const char * msg)
{
    perror(msg);
    exit(EXIT_FAILURE);
}

// This is the writer call back function used by curl
static int writer(char *data, size_t size, size_t nmemb,
        std::string *buffer)
{
    // What we will return
    int result = 0;

    // Is there anything in the buffer?
    if (buffer != NULL)
    {
        // Append the data to the buffer
        buffer->append(data, size * nmemb);

        // How much did we write?
        result = size * nmemb;
    }

    return result;
}

int http_post(string data = "")
{
    // Our curl objects
    CURL *curl;
    CURLcode result;

    // Create our curl handle
    curl = curl_easy_init();

    if (curl)
    {
        // Now set up all of the curl options
        // curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
        struct curl_slist *headers = NULL;
        headers = curl_slist_append(headers, "Accept: application/json");
        headers = curl_slist_append(headers, "Content-Type: application/json");
        headers = curl_slist_append(headers, "charsets: utf-8");

        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_URL, post_url.c_str());
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
        curl_easy_setopt(curl, CURLOPT_HEADER, 1);
        //curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);

        //authentification
        if (!post_auth.empty())
        {
            curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
            curl_easy_setopt(curl, CURLOPT_USERPWD, post_auth.c_str());
        }

        if (!data.empty())
        {
            curl_easy_setopt(curl, CURLOPT_POST, 1);
            curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, data.size());
            curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data.c_str());
        }

        // Attempt to retrieve the remote page
        result = curl_easy_perform(curl);

        // Always cleanup
        curl_easy_cleanup(curl);

        // Did we succeed?
        if (result == CURLE_OK)
        {
            if (opt_verbose)
            {
                cout << buffer << "\n";
            }
        }
        else
        {
            cout << "Error";
            exit(-1);
        }
    }
    return 0;
}

void parseTextField(const char * line)
{
    string s;
    s.assign(line);
    string keyvalue;
    string keyname;
    boost::regex re("<(\\w+)>([\\w\\/\\- \\+\\.]+)<\\/[\\w]+>");
    const int subs[] = {1, 2,};
    boost::sregex_token_iterator i(s.begin(), s.end(), re, subs);
    boost::sregex_token_iterator j;
    boost::property_tree::ptree props;

    //    boost::property_tree::write_json("prob.json", props);
    unsigned count = 0;
    while(i != j)
    {
        if (count%2 == 0)
            keyname.assign(*i++);
        else
        {
            keyvalue.assign(*i++);
            props.push_back(std::make_pair(keyname, keyvalue));
        }
        count++;
    }

    if (opt_post)
    {
        std::stringstream ss;
        boost::property_tree::write_json(ss, props);
        http_post(ss.str());
    }
}

void writeLog(const char * message)
{
    std::ofstream myfile;
    myfile.open (log_path.c_str(), std::ofstream::app);
    myfile << time(0) << ": " << message << endl;
    myfile.close();
}

struct ZAPI_packet_receiving sendRequest(struct ZAPI_packet_header packet)
{
    int sockfd;
    if ((sockfd = socket(AF_INET,SOCK_DGRAM, IPPROTO_UDP)) == -1)
        ::error("socket");

    struct sockaddr_in si_srv;
    memset(&si_srv, 0, sizeof(si_srv));

    si_srv.sin_family = AF_INET;
    si_srv.sin_port = htons(zibase_port);

    if (inet_aton(zibase_address.c_str(), &si_srv.sin_addr) == 0)
       ::error("inet_aton");

    packet.hton();

    struct sockaddr_in si_client;
    memset(&si_client, 0, sizeof(si_client));

    si_client.sin_family = AF_INET;
    si_client.sin_port = htons(bind_port);
    si_client.sin_addr.s_addr = htonl(INADDR_ANY);

    if (bind(sockfd, (struct sockaddr*)&si_client, sizeof(si_client)) == -1)
        ::error("bind");
    if (opt_verbose)
        std::cout << "sending " << sizeof(packet) << " bytes\n";

    if (sendto(sockfd, &packet, sizeof(packet), 0, (struct sockaddr *)&si_srv, sizeof(si_srv)) == -1)
        ::error("sendto");

    ZAPI_packet_receiving rcvpacket;
    socklen_t slen=sizeof(si_srv);
    recvfrom(sockfd, (void*)&rcvpacket, sizeof(rcvpacket), 0, (struct sockaddr *)&si_srv, &slen);

    rcvpacket.ntoh();

    close(sockfd);

    return rcvpacket;
}

void listen()
{
    int sockfd;
    if ((sockfd = socket(AF_INET,SOCK_DGRAM, IPPROTO_UDP)) == -1)
        ::error("socket");

    struct sockaddr_in si_srv;
    memset(&si_srv, 0, sizeof(si_srv));

    si_srv.sin_family = AF_INET;
    si_srv.sin_port = htons(zibase_port);
    if (inet_aton(zibase_address.c_str(), &si_srv.sin_addr) == 0)
        ::error("inet_aton");

    ZAPI_packet_header packet(ZIBASE_CMD_HOST_REGISTERING,
         htonl(inet_addr(bind_address.c_str())),
         bind_port);

    packet.hton();

    struct sockaddr_in si_client;
    memset(&si_client, 0, sizeof(si_client));

    si_client.sin_family = AF_INET;
    si_client.sin_port = htons(bind_port);
    si_client.sin_addr.s_addr = htonl(INADDR_ANY);

    if (bind(sockfd, (struct sockaddr*)&si_client, sizeof(si_client)) == -1)
        ::error("bind");

    if (opt_verbose)
        std::cout << "sending " << sizeof(packet) << " bytes\n";

    if (sendto(sockfd, &packet, sizeof(packet), 0, (struct sockaddr *)&si_srv, sizeof(si_srv)) == -1)
        ::error("sendto");

    while (1)
    {
        ZAPI_packet_receiving rcvpacket;
        socklen_t slen=sizeof(si_srv);
        recvfrom(sockfd, (void*)&rcvpacket, sizeof(rcvpacket), 0, (struct sockaddr *)&si_srv, &slen);
        packet.ntoh();
        parseTextField(rcvpacket.text_field);

        if (opt_log)
            writeLog(rcvpacket.text_field);

        if (opt_verbose)
            printf("text_field: %s\n", rcvpacket.text_field);
    }

    close(sockfd);
}

void registering()
{
    ZAPI_packet_receiving rcvpacket;
    ZAPI_packet_header registerpacket(ZIBASE_CMD_HOST_REGISTERING,
        htonl(inet_addr(bind_address.c_str())),
        bind_port);

    rcvpacket = sendRequest(registerpacket);

    printf("Name : %s\n", rcvpacket.header);
    printf("Cmd %d\n", rcvpacket.command);
   if (opt_verbose)
     printf("text_field: %s\n", rcvpacket.text_field);
}

void unregistering()
{
    ZAPI_packet_receiving rcvpacket;
    ZAPI_packet_header unregisterpacket(ZIBASE_CMD_HOST_UNREGISTERING,
        htonl(inet_addr(bind_address.c_str())),
        bind_port);

    rcvpacket = sendRequest(unregisterpacket);
}

int main(int ac, char* av[])
{
    //http://stackoverflow.com/questions/5700466/c-c-unix-configuration-file-library
    //http://netzmafia.de/skripten/unix/linux-daemon-howto.html

            /* Our process ID and Session ID */
        pid_t pid, sid;

        /* Fork off the parent process */
        pid = fork();
        if (pid < 0) {
                exit(EXIT_FAILURE);
        }
        /* If we got a good PID, then
           we can exit the parent process. */
        if (pid > 0) {
                exit(EXIT_SUCCESS);
        }

        /* Change the file mode mask */
        umask(0);

        /* Open any logs here */

        /* Create a new SID for the child process */
        sid = setsid();
        if (sid < 0) {
                /* Log the failure */
                exit(EXIT_FAILURE);
        }

        /* Change the current working directory */
        if ((chdir("/")) < 0) {
                /* Log the failure */
                exit(EXIT_FAILURE);
        }

    // Declare the supported options.
    po::options_description desc("Allowed options");
    desc.add_options()
       ("help", "produce help message")
       ("verbose", "shows details about the results of running zibased")
       ("bind-address", po::value<string>(&bind_address), "")
       ("bind-port", po::value<int>(&bind_port)->default_value(49998), "")
       ("zibase-port",  po::value<int>(&zibase_port)->default_value(49999), "")
       ("zibase-address", po::value<string>(&zibase_address), "")
       ("post-url",  po::value<string>(&post_url), "")
       ("post-auth",  po::value<string>(&post_auth), "")
       ("log-file", po::value<string>(&log_path)->default_value("/tmp/zibase.log"), "")
    ;

    po::variables_map vm;
    po::store(po::parse_command_line(ac, av, desc), vm);
    po::notify(vm);

    if (vm.count("help")) {
        cout << desc << "\n";
        return 1;
    }

    if (vm.count("verbose")) {
        cout << "verbose:ok\n";
        opt_verbose = true;
    }

    if (vm.count("log-file")) {
        cout << "logfile:" << log_path << "\n";
        opt_log = true;
    }

    if (!vm.count("bind-address")) {
        cout << "Error: you must specify the bind address." << endl;
        return 1;
    } else {
        cout << "bind-address:" << bind_address << "\n";
    }

    if (!vm.count("zibase-address")) {
        cout << "Error: you must specify the zibase address." << endl;
        return 1;
    } else {
        cout << "bind-address:" << zibase_address << "\n";
    }

    if (vm.count("verbose")) {
        opt_verbose = true;
    }

    if (vm.count("post-url")) {
        cout << "post-url:" << post_url << "\n";
        opt_post = true;
    }

    /* Close out the standard file descriptors */
   //close(STDIN_FILENO);
   //close(STDOUT_FILENO);
   //close(STDERR_FILENO);
    registering();
    listen();
    exit(EXIT_SUCCESS);
}
<file_sep>CXXFLAGS=-g -std=c++0x -lboost_date_time -lboost_program_options -lboost_regex -lmysqlclient -lmysqlcppconn -lcurl
#-lboost_asio

zibased: zibased.cpp
<file_sep>#! /usr/bin/env python

# Copyright (C) <NAME>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Authors:
# <NAME>

# vi:ts=4:et
#%retab!
#set noexpandtab
#set tabstop=2

import sys
import pycurl
import time
import json
from daemon import runner
import memcache
import argparse
import socket
import syslog

CARBON_SERVER = '0.0.0.0'
CARBON_PORT = 2003
VISONIC_PASSWORD = '<PASSWORD>'
VISONIC_LOGIN = 'login'
VISONIC_URL_LOGIN = 'http://192.168.0.200/mobile/login/index/?JsHttpRequest=%d-xml'
VISONIC_URL_STATUS = 'http://192.168.0.200/mobile/dam/index/ind/-1?JsHttpRequest=%d-xml'
VISONIC_METRICS = 'domos.visonic.state'
VISONIC_MEMCACHE_STATUS = 'visonic_state'
MEMCACHE_URL = '127.0.0.1:11211'
REFRESH = 60

class Visonicd():
    def __init__(self):
        self.stdin_path = '/dev/null'
        self.stdout_path = '/dev/tty'
        self.stderr_path = '/dev/tty'
        self.pidfile_path =  '/tmp/visonicd.pid'
        self.pidfile_timeout = 5
        self.__c = pycurl.Curl()
        self.__contents = ''

    def run(self):
        self.auth()
        while 1:
            self.getState()

    def auth(self):
        self.__contents = ''
        syslog.syslog('Visonicd started')
        c = self.__c
        c.setopt(c.URL, VISONIC_URL_LOGIN %(int(time.time())) )
        c.setopt(c.WRITEFUNCTION, self.body_callback)
        c.setopt(c.CONNECTTIMEOUT, 5)
        c.setopt(c.TIMEOUT, 8)
        c.setopt(c.FAILONERROR, True)
        c.setopt(c.HTTPHEADER, ['Accept: text/html', 'Accept-Charset: UTF-8'])
        c.setopt(c.POSTFIELDS, 'login=%s&password=%s&time=%d' %(VISONIC_LOGIN, VISONIC_PASSWORD, int(time.time())))
        c.setopt(c.COOKIEFILE, '')
        c.setopt(c.COOKIEJAR, '')
        try:
            c.perform()
        except pycurl.error, error:
            errno, errstr = error
            syslog.syslog("Visonicd Auth Error %s", errstr)

    def getState(self):
        self.__contents = ''

        c = self.__c
        c.setopt(c.POST, 0)
        c.setopt(c.URL, VISONIC_URL_STATUS %(int(time.time())))

        try:
            c.perform()
        except pycurl.error, error:
            errno, errstr = error
            syslog.syslog("Visonicd Auth Error %s", errstr)

        json_object = json.loads(self.__contents)

        #print self.contents
        mc = memcache.Client([MEMCACHE_URL], debug = 0)
        value = str(json_object['js']['reply']['configuration']['system']['status'])

        mc.set(VISONIC_MEMCACHE_STATUS, value )
        self.sendMetrics(VISONIC_METRICS, self.visonic_state(value))

        syslog.syslog("Visonicd debug %s" %value)
        time.sleep(REFRESH)

    def body_callback(self, buf):
        self.__contents = self.__contents + buf

    def visonic_state(self, name):
        return {
            'Ready': 0,
            'HOME': 1,
            'AWAY': 2,
        }.get(name, 3)

    def sendMetrics(self, metric_path, value):
        timestamp = int(time.time())
        message = '%s %s %d\n' % (metric_path, value, timestamp)
        sock = socket.socket()
        sock.connect((CARBON_SERVER, CARBON_PORT))
        sock.sendall(message)
        sock.close()

visonicd = Visonicd()
daemon_runner = runner.DaemonRunner(visonicd)
daemon_runner.do_action()

branch_name: refs/heads/master

languages: Makefile C++ Python

repo_language: Makefile


text:
<file_sep>import React, { useState, useEffect } from "react";
import Team from "../Team/Team";
import "./AllTeams.css";

const AllTeams = () => {
  const [team, setTeam] = useState([]);
  useEffect(() => {
    const url = `https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php?l=English%20Premier%20League`;

    fetch(url)
      .then((res) => res.json())
      .then((data) => {
        const dataTeams = data.teams;
        // console.log(dataTeams);
        setTeam(dataTeams);
      });
  }, []);
  return (
    <>

fútbol team

            {team.map((football) => {
              return <Team team={football}></Team>;
            })}

    </>
  );
};

export default AllTeams;
<file_sep># fútbol team

Live Link: https://604a55891c0a5f084e551457--vigorous-kilby-cddeb1.netlify.app/

## Description:

This website shows you all the premier league team with their club details
<file_sep>import React, { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import { useParams } from "react-router";
import TeamInfo from "../TeamInfo/TeamInfo";
import "./TeamDetails.css";

const TeamDetails = () => {
  const { id } = useParams();
  const [teamDetails, setTeamDetails] = useState([]);
  useEffect(() => {
    const url = `https://www.thesportsdb.com/api/v1/json/1/lookupteam.php?id=${id}`;

    fetch(url)
      .then((res) => res.json())
      .then((data) => {
        setTeamDetails(data.teams[0]);
        console.log(data.teams);
      });
  }, [id]);

  const { strStadiumThumb, strTeamBadge } = teamDetails;

  const teamBanner = {
    backgroundImage: `linear-gradient(to right, rgba(0,0,0, 0.7), rgba(0,0,0, 0.7)), url('${strStadiumThumb}')`,
    backgroundSize: "cover",
    backgroundPosition: "center",
    height: "50vh",
  };
  return (

        <Link to="/">
          <button className="btn btn-info">Home</button>
        </Link>

            <TeamInfo teamInfo={teamDetails}></TeamInfo>

  );
};

export default TeamDetails;
<file_sep>import "./App.css";
import { library } from "@fortawesome/fontawesome-svg-core";

import { fab } from "@fortawesome/free-brands-svg-icons";
import {
  faCheckSquare,
  faCoffee,
  faArrowRight,
} from "@fortawesome/free-solid-svg-icons";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import AllTeams from "./components/AllTeams/AllTeams";
import NotFound from "./components/NotFount/NotFound";
import TeamDetails from "./components/TeamDetail/TeamDetails";

library.add(fab, faCheckSquare, faCoffee, faArrowRight);

function App() {
  return (

      <Router>
        <Switch>
          <Route path="/" exact>
            <AllTeams></AllTeams>
          </Route>
          <Route path={`/team/:id`}>
            <TeamDetails></TeamDetails>
          </Route>
          <Route path="*">
            <NotFound></NotFound>
          </Route>
        </Switch>
      </Router>

  );
}

export default App;
<file_sep>import React from "react";
import maleImg from "../../img/male.png";
import femaleImg from "../../img/female.png";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
  faMapMarkerAlt,
  faFlag,
  faFutbol,
  faMars,
} from "@fortawesome/free-solid-svg-icons";

import {
  faFacebookF,
  faTwitter,
  faInstagram,
  faYoutube,
} from "@fortawesome/free-brands-svg-icons";
import "./TeamInfo.css";

const TeamInfo = (props) => {
  const {
    strTeam,
    intFormedYear,
    strCountry,
    strGender,
    strSport,
    strDescriptionEN,
    strFacebook,
    strTwitter,
    strInstagram,
    strYoutube,
  } = props.teamInfo;
  return (
    <>

{strTeam}

                <FontAwesomeIcon icon={faMapMarkerAlt} />

Founded: {intFormedYear}

                <FontAwesomeIcon icon={faFlag} />

Country: {strCountry}

                <FontAwesomeIcon icon={faFutbol} />

Sports Type: {strSport}

                <FontAwesomeIcon icon={faMars} />

Gender: {strGender}

{strDescriptionEN}

            <FontAwesomeIcon icon={faFacebookF} />

            <FontAwesomeIcon icon={faTwitter} />

            <FontAwesomeIcon icon={faInstagram} />

            <FontAwesomeIcon icon={faYoutube} />

    </>
  );
};

export default TeamInfo;

branch_name: refs/heads/main

languages: Markdown JavaScript

repo_language: Markdown


text:
<repo_name>radikz/MVVM-News<file_sep>/app/src/main/java/id/radikz/mvvm_news/retrofit/RetrofitRequest.java
package id.radikz.mvvm_news.retrofit;

import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;

import id.radikz.mvvm_news.util.TLSSocketFactory;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class RetrofitRequest {

    private static Retrofit retrofit;
    private static final String BASE_URL = "http://newsapi.org/";

    public static Retrofit getRetrofitInstance() {
        OkHttpClient client=new OkHttpClient();
        try {
            client = new OkHttpClient.Builder()
                    .sslSocketFactory(new TLSSocketFactory())
                    .build();
        } catch (KeyManagementException e) {
            e.printStackTrace();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }

        if (retrofit == null) {
            retrofit = new Retrofit.Builder()
                    .client(client)
                    .baseUrl(BASE_URL)
                    .addConverterFactory(GsonConverterFactory.create())
                    .build();
        }
        return retrofit;
    }
}<file_sep>/app/src/main/java/id/radikz/mvvm_news/viewmodel/ArticleViewModel.java
package id.radikz.mvvm_news.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import id.radikz.mvvm_news.model.ArticleResponse;
import id.radikz.mvvm_news.repository.ArticleRepository;

public class ArticleViewModel extends AndroidViewModel {
    private ArticleRepository articleRepository;
    private MutableLiveData<ArticleResponse> articleResponseLiveData;

    public ArticleViewModel(@NonNull Application application, String query) {
        super(application);

        articleRepository = new ArticleRepository();
        articleResponseLiveData = articleRepository.getArticles(query);
    }

    public LiveData<ArticleResponse> getArticleResponseLiveData() {

        return articleResponseLiveData;
    }

    public void search(String query){
        articleResponseLiveData = articleRepository.getArticles(query);
    }
}
<file_sep>/app/src/main/java/id/radikz/mvvm_news/MainActivity.java
package id.radikz.mvvm_news;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.util.Log;
import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.ListView;

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProviders;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import id.radikz.mvvm_news.adapter.ArticleAdapter;
import id.radikz.mvvm_news.model.Article;
import id.radikz.mvvm_news.viewmodel.ArticleViewModel;
import id.radikz.mvvm_news.viewmodel.MyViewModelFactory;

public class MainActivity extends AppCompatActivity {

    private ArticleAdapter adapter;
    ArticleViewModel articleViewModel;

    ListView listView;
    EditText editUser;
    private RecyclerView recyclerView;
    ProgressDialog loading;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        listView = findViewById(R.id.list_item);
        editUser = findViewById(R.id.edit_user);

        recyclerView =  findViewById(R.id.recycler_user_list);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        recyclerView.setHasFixedSize(true);
        recyclerView.setLayoutManager(layoutManager);
        final String query = "android";

        articleViewModel = ViewModelProviders.of(this, new MyViewModelFactory(this.getApplication(), query)).get(ArticleViewModel.class);

        editUser.setOnEditorActionListener((v, actionId, event) -> {
            boolean handled = false;
            if (actionId == EditorInfo.IME_ACTION_NEXT) {
                searchUser(editUser.getText().toString());
                Log.d("text", editUser.getText().toString());
                handled = true;
            }
            return handled;
        });

        initialization(query);

    }

    private void searchUser(String query){
        articleViewModel.search(editUser.getText().toString().trim());
        adapter.notifyDataSetChanged();
        initialization(query);
    }

    private void initialization(String query) {
        loading = ProgressDialog.show(this, null, "harap tunggu...", true, true);

        // View Model
//        articleViewModel = ViewModelProviders.of(this, new MyViewModelFactory(this.getApplication(), query)).get(ArticleViewModel.class);
        getMovieArticles(query);
    }

    private void getMovieArticles(String query) {

        articleViewModel.getArticleResponseLiveData().observe(this, articleResponse -> {
            if (articleResponse != null) {
                loading.dismiss();
                List<Article> articles = articleResponse.getItems();
                // adapter
                adapter = new ArticleAdapter(articles);
                recyclerView.setAdapter(adapter);
            }
        });
    }
}<file_sep>/README.md
# MVVM-News
News api using rest API and MVVM architecture

## Screenshots
<img src="/Screenshots/news.png" width="30%" height="30%">

languages: Java Markdown

repo_language: Java

repo_name: radikz/MVVM-News


text:
<file_sep>import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'
import Coming from '@components/ComingSoon/comingsoon'
export default function Home() {
    return (
        <div className={styles.container}>
            <Head>
                <title>DHRUVA - IIITK</title>
                <meta
                    name="description"
                    content="Dhruva IIITK Technical Fest"
                />
                <link rel="icon" href="/favicon.ico" />
            </Head>
            <style global jsx>{`
                html,
                body,
                body > div:first-child,
                div#__next,
                div#__next > div {
                    height: 100%;
                }
            `}</style>
            <Coming />
        </div>
    )
}

repo_language: JavaScript


text:
<file_sep>
function convert() {
var n=parseInt(document.getElementById("in").value);
        var f="";
        var x=0;
        var c =1;
        var g ="";
        var y=0;

        for (var i = 0; i < c; i++) {
            if (n > 0) {
                x = n % 2;
                f = f + x;
                n = n / 2;
                n=parseInt(n);
                c++;
            }
        }
        for (var j = f.length - 1; j >= 0; j--) {
            g = g + f.charAt(j);
        }
        y=parseInt(g);
                 document.getElementById("result").innerHTML=y;
    }

function sum(){
      var m=parseInt(document.getElementById("in1").value);
      var n=parseInt(document.getElementById("in2").value);
            m=m+n;
             var f="";
             var x=0;
                    var c =1;
                    var g ="";
                    var y=0;

                    for (var i = 0; i < c; i++) {
                        if (m > 0) {
                            x = m % 2;
                            f = f + x;
                            m = m / 2;
                            m=parseInt(m);
                            c++;
                        }
                    }
                    for (var j = f.length - 1; j >= 0; j--) {
                        g = g + f.charAt(j);
                    }
                    y=parseInt(g);
            document.getElementById("result2").innerHTML= y;
    }
function dif(){
          var m=parseInt(document.getElementById("in1").value);
          var n=parseInt(document.getElementById("in2").value);
          if(m==n){
          document.getElementById("result2").innerHTML=0;}
          else if(n>m){
          document.getElementById("result2").innerHTML= "Second number is too big!";
          }else{
                m=m-n;
                 var f="";
                 var x=0;
                        var c =1;
                        var g ="";
                        var y=0;

                        for (var i = 0; i < c; i++) {
                            if (m > 0) {
                                x = m % 2;
                                f = f + x;
                                m = m / 2;
                                m=parseInt(m);
                                c++;
                            }
                        }
                        for (var j = f.length - 1; j >= 0; j--) {
                            g = g + f.charAt(j);
                        }
                        y=parseInt(g);
                document.getElementById("result2").innerHTML= y;
                }
        }
function mul(){
              var m=parseInt(document.getElementById("in1").value);
              var n=parseInt(document.getElementById("in2").value);
                    m=m*n;
                     var f="";
                     var x=0;
                            var c =1;
                            var g ="";
                            var y=0;

                            for (var i = 0; i < c; i++) {
                                if (m > 0) {
                                    x = m % 2;
                                    f = f + x;
                                    m = m / 2;
                                    m=parseInt(m);
                                    c++;
                                }
                            }
                            for (var j = f.length - 1; j >= 0; j--) {
                                g = g + f.charAt(j);
                            }
                            y=parseInt(g);
                    document.getElementById("result2").innerHTML= y;
            }

function convert1() {
var n=parseInt(document.getElementById("in5").value);
var g =n.toString();
        var f = 0;
        var x = g.length;
        x--;
        var k=1;
        if(check(n)==1 ){
           document.getElementById("result3").innerHTML="The number is not binary!";
           }else{
        for(var i = 0; i < x; i++){
            k=k*2;
        }
        for (var i = 0; i < g.length; i++) {
            var y=parseInt(g.substring(i,i+1));
            f=f+y*k;
            k=k/2;
        }
document.getElementById("result3").innerHTML=f;
}
    }
function sum1(){
 var m=parseInt(document.getElementById("in3").value);
 var n=parseInt(document.getElementById("in4").value);
  var h =m.toString();
  var g =n.toString();
 var x=h.length;
 var z=g.length;
 var f = 0;
 var o = 0;
 x--;
 z--;
 var k=1;
 if(check(m)==1 || check(n)==1 ){
 document.getElementById("result4").innerHTML="One number is not binary!";
 }
 else{
 for(var i = 0; i < x; i++){
 k=k*2;
 }
 for (var i = 0; i < h.length; i++) {
 var y=parseInt(h.substring(i,i+1));
 f=f+y*k;
 k=k/2;
 }

var p=1;
 for(var i = 0; i < z; i++){
 p=p*2;
 }
 for (var i = 0; i < g.length; i++) {
 var y=parseInt(g.substring(i,i+1));
 o=o+y*p;
 p=p/2;
 }
 d=f+o;
 document.getElementById("result4").innerHTML=d;
 }
 }

 function dif1(){
  var m=parseInt(document.getElementById("in3").value);
  var n=parseInt(document.getElementById("in4").value);
   var h =m.toString();
   var g =n.toString();
  var x=h.length;
  var z=g.length;
  var f = 0;
  var o = 0;
  x--;
  z--;
  var k=1;
   if(check(m)==1 || check(n)==1 ){
   document.getElementById("result4").innerHTML="One number is not binary!";
   }else{
  for(var i = 0; i < x; i++){
  k=k*2;
  }
  for (var i = 0; i < h.length; i++) {
  var y=parseInt(h.substring(i,i+1));
  f=f+y*k;
  k=k/2;
  }

 var p=1;
  for(var i = 0; i < z; i++){
  p=p*2;
  }
  for (var i = 0; i < g.length; i++) {
  var y=parseInt(g.substring(i,i+1));
  o=o+y*p;
  p=p/2;
  }
  d=f-o;
  document.getElementById("result4").innerHTML=d;
  }
}

function mul1(){
  var m=parseInt(document.getElementById("in3").value);
  var n=parseInt(document.getElementById("in4").value);
   var h =m.toString();
   var g =n.toString();
  var x=h.length;
  var z=g.length;
  var f = 0;
  var o = 0;
  x--;
  z--;
  var k=1;
   if(check(m)==1 || check(n)==1 ){
   document.getElementById("result4").innerHTML="One number is not binary!";
   }else{
  for(var i = 0; i < x; i++){
  k=k*2;
  }
  for (var i = 0; i < h.length; i++) {
  var y=parseInt(h.substring(i,i+1));
  f=f+y*k;
  k=k/2;
  }

 var p=1;
  for(var i = 0; i < z; i++){
  p=p*2;
  }
  for (var i = 0; i < g.length; i++) {
  var y=parseInt(g.substring(i,i+1));
  o=o+y*p;
  p=p/2;
  }
  d=f*o;
  document.getElementById("result4").innerHTML=d;
  }
}

function check(x){
var r=0;
var z=x.toString();
for(var i=0;i<z.length;i++){
if(x%10>1){
r=1;
x=x/10;
break;
}
}
return r;
}
<file_sep>package formula;

public class BinaryOperation {

    public int sum (int m,int n){
        BinaryConvertor x=new BinaryConvertor();
        m=m+n;
        return x.convertor(m);
    }
    public int minus (int m,int n){
        BinaryConvertor x=new BinaryConvertor();
        m=m-n;
        return x.convertor(m);
    }
    public int multiply (int m,int n){
        BinaryConvertor x=new BinaryConvertor();
        m=m*n;
        return x.convertor(m);
    }

}

languages: Java JavaScript


text:
<repo_name>kellzbrowny/criss<file_sep>/README.md
# criss
GitHub Pages

repo_name: kellzbrowny/criss


text:
<repo_name>Zexoi/HW7<file_sep>/src/com/company/Main.java
package com.company;

class BinarySearchTree
{
    class Node
    {
        int data;
        Node left, right;

        public Node(int value)
        {
            data = value;
            left = null;
            right = null;
        }
    }

    Node root;
    BinarySearchTree()
    {
        root = null;
    }

    void rootDelete(int data)
    {
        root = deleteByCopying(root, data);
    }

    Node deleteByCopying(Node root, int data)
    {
        if (root == null)
        {
            return null;
        }

        if (data < root.data)
        {
            root.left = deleteByCopying(root.left, data);
        }
        else if (data > root.data)
        {
            root.right = deleteByCopying(root.right, data);
        }
        else
        {
            if (root.left == null)
            {
                return root.right;
            }
            else if (root.right == null)
            {
                return root.left;
            }

            root.data = minValue(root.right);
            root.right = deleteByCopying(root.right, root.data);
        }

        return root;
    }

    int minValue(Node root)
    {
        int minv = root.data;

        while (root.left != null)
        {
            minv = root.left.data;
            root = root.left;
        }

        return minv;
    }

    void insert(int data)
    {
        root = insertRec(root, data);
    }

    Node insertRec(Node root, int data)
    {
        if (root == null)
        {
            root = new Node(data);
            return root;
        }

        if (data < root.data)
        {
            root.left = insertRec(root.left, data);
        }
        else if (data > root.data)
        {
            root.right = insertRec(root.right, data);
        }

        return root;
    }

    void inorder()
    {
        inorderRec(root);
    }

    void inorderRec(Node root)
    {
        if (root != null)
        {
            inorderRec(root.left);
            System.out.print(root.data + " ");
            inorderRec(root.right);
        }
    }

    Node findNode(Node root, int key)
    {
        if (root.data == key)
        {
            System.out.println("Time to return");
            System.out.println(root.data);
            return root;
        }
        if (key < root.data)
        {
            findNode(root.left, key);
        }
        else
        {
            findNode(root.right, key);
        }
        return null;
    }

    void deleteByMerging(Node root, int key)
    {

    }

    public static void main(String[] args)
    {
        BinarySearchTree binarySearchTree = new BinarySearchTree();

        binarySearchTree.insert(50);
        binarySearchTree.insert(30);
        binarySearchTree.insert(20);
        binarySearchTree.insert(40);
        binarySearchTree.insert(70);
        binarySearchTree.insert(60);
        binarySearchTree.insert(80);
        Node findNode = binarySearchTree.findNode(binarySearchTree.root, 70);
        System.out.println("Gittest");

      /*  System.out.println("Inorder traversal of the given binarySearchTree");
        binarySearchTree.inorder();

        System.out.println("\nDelete 20");
        binarySearchTree.rootDelete(20);
        System.out.println("Inorder traversal of the modified binarySearchTree");
        binarySearchTree.inorder();

        System.out.println("\nDelete 30");
        binarySearchTree.rootDelete(30);
        System.out.println("Inorder traversal of the modified binarySearchTree");
        binarySearchTree.inorder();

        System.out.println("\nDelete 50");
        binarySearchTree.rootDelete(50);
        System.out.println("Inorder traversal of the modified binarySearchTree");
        binarySearchTree.inorder();*/
    }
}


text:
<repo_name>marsel262/marselnullrepo<file_sep>/README.md
marselnullrepo
==============
...


text:
<repo_name>DanielF1976/SolarCar<file_sep>/Gui.py
import tkinter as tk
from tkinter import *
from tkinter import ttk

ws = Tk()
Label(ws, text="ISU Solar Car").grid(row=0, column=2)
Label(ws, text="MPH").grid(row=1, column=0)
Label(ws, text="00000").grid(row=2, column=0)
Label(ws, text="RPM").grid(row=1, column=1)
Label(ws, text="00000").grid(row=2, column=1)
Label(ws, text="Odometer").grid(row=1, column=2)
Label(ws, text="00000").grid(row=2, column=2)

Label(ws, text="Battery Volt ").grid(row=3, column=0)
Label(ws, text="78% ").grid(row=4, column=0)
Label(ws, text="Battery Amp").grid(row=3, column=1)
Label(ws, text="70%").grid(row=4, column=1)
Button(ws, text="Are we there yet button").grid(row=6, column=4)

ws.mainloop()


text:
<file_sep>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import {
  isWindows,
  isMacintosh,
  setImmediate,
  globals,
  INodeProcess,
} from '@hoodwink/common/base/platform';

declare const process: INodeProcess;

let safeProcess: INodeProcess;

// Native node.js environment
if (typeof process !== 'undefined') {
  safeProcess = process;
}

// Native sandbox environment
else if (typeof globals.vscode !== 'undefined') {
  safeProcess = globals.vscode.process;
}

// Web environment
else {
  safeProcess = {
    // Supported
    get platform(): 'win32' | 'linux' | 'darwin' {
      return isWindows ? 'win32' : isMacintosh ? 'darwin' : 'linux';
    },
    nextTick(callback: (...args: any[]) => void): void {
      return setImmediate(callback);
    },

    // Unsupported
    get env() {
      return Object.create(null);
    },
    cwd(): string {
      return '/';
    },
    getuid(): number {
      return -1;
    },
  };
}

export const { cwd } = safeProcess;
export const { env } = safeProcess;
export const { platform } = safeProcess;
export const { nextTick } = safeProcess;
<file_sep>import { Disposable } from '@hoodwink/common/base/lifecycle';
import { Event } from '@hoodwink/common/base/event';
import { ILogService, LogLevel } from './ILogService';

export class DelegatedLogService extends Disposable implements ILogService {
  declare readonly _serviceBrand: undefined;

  constructor(private logService: ILogService) {
    super();
    this._register(logService);
  }

  get onDidChangeLogLevel(): Event<LogLevel> {
    return this.logService.onDidChangeLogLevel;
  }

  setLevel(level: LogLevel): void {
    this.logService.setLevel(level);
  }

  getLevel(): LogLevel {
    return this.logService.getLevel();
  }

  trace(message: string, ...args: any[]): void {
    this.logService.trace(message, ...args);
  }

  debug(message: string, ...args: any[]): void {
    this.logService.debug(message, ...args);
  }

  info(message: string, ...args: any[]): void {
    this.logService.info(message, ...args);
  }

  warn(message: string, ...args: any[]): void {
    this.logService.warn(message, ...args);
  }

  error(message: string | Error, ...args: any[]): void {
    this.logService.error(message, ...args);
  }

  critical(message: string | Error, ...args: any[]): void {
    this.logService.critical(message, ...args);
  }

  flush(): void {
    this.logService.flush();
  }
}
<file_sep>import { AbstractLogService, DEFAULT_LOG_LEVEL, ILogService, LogLevel } from './ILogService';

export class ConsoleLogService extends AbstractLogService implements ILogService {
  declare readonly _serviceBrand: undefined;

  constructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL) {
    super();
    this.setLevel(logLevel);
  }

  trace(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Trace) {
      console.trace('%cTRACE', 'color: #888', message, ...args);
    }
  }

  debug(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Debug) {
      console.debug('%cDEBUG', 'background: #eee; color: #888', message, ...args);
    }
  }

  info(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Info) {
      console.info('%c INFO', 'color: #33f', message, ...args);
    }
  }

  warn(message: string | Error, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Warning) {
      console.warn('%c WARN', 'color: #993', message, ...args);
    }
  }

  error(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Error) {
      console.error('%c  ERR', 'color: #f33', message, ...args);
    }
  }

  critical(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Critical) {
      console.log('%cCRITI', 'background: #f33; color: white', message, ...args);
    }
  }

  dispose(): void {
    // noop
  }

  flush(): void {
    // noop
  }
}
<file_sep>/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { createServiceDecorator } from '@hoodwink/common/instantiation/instantiation';
import { Disposable, IDisposable } from '@hoodwink/common/base/lifecycle';
import { Emitter, Event } from '@hoodwink/common/base/event';
import { URI } from '@hoodwink/common/base/uri';
import { toErrorMessage } from '@hoodwink/common/base/errorMessage';

export const ILogService = createServiceDecorator<ILogService>('logService');
export interface ILogService extends ILogger {
  readonly _serviceBrand: undefined;
}

export const ILoggerService = createServiceDecorator<ILoggerService>('loggerService');
export interface ILoggerService {
  readonly _serviceBrand: undefined;

  getLogger(file: URI): ILogger;
}

export function now(): string {
  return new Date().toLocaleTimeString();
}

export enum LogLevel {
  Trace,
  Debug,
  Info,
  Warning,
  Error,
  Critical,
  Off,
}

export const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info;

export interface ILogger extends IDisposable {
  onDidChangeLogLevel: Event<LogLevel>;
  getLevel(): LogLevel;
  setLevel(level: LogLevel): void;

  trace(message: string, ...args: any[]): void;
  debug(message: string, ...args: any[]): void;
  info(message: string, ...args: any[]): void;
  warn(message: string, ...args: any[]): void;
  error(message: string | Error, ...args: any[]): void;
  critical(message: string | Error, ...args: any[]): void;

  /**
   * An operation to flush the contents. Can be synchronous.
   */
  flush(): void;
}

export abstract class AbstractLogService extends Disposable {
  private level: LogLevel = DEFAULT_LOG_LEVEL;

  private readonly _onDidChangeLogLevel: Emitter<LogLevel> = this._register(
    new Emitter<LogLevel>(),
  );

  readonly onDidChangeLogLevel: Event<LogLevel> = this._onDidChangeLogLevel.event;

  setLevel(level: LogLevel): void {
    if (this.level !== level) {
      this.level = level;
      this._onDidChangeLogLevel.fire(this.level);
    }
  }

  getLevel(): LogLevel {
    return this.level;
  }
}

export class LogServiceAdapter extends AbstractLogService implements ILogService {
  declare readonly _serviceBrand: undefined;

  constructor(
    private readonly adapter: { consoleLog: (type: string, args: any[]) => void },
    logLevel: LogLevel = DEFAULT_LOG_LEVEL,
  ) {
    super();
    this.setLevel(logLevel);
  }

  trace(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Trace) {
      this.adapter.consoleLog('trace', [this.extractMessage(message), ...args]);
    }
  }

  debug(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Debug) {
      this.adapter.consoleLog('debug', [this.extractMessage(message), ...args]);
    }
  }

  info(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Info) {
      this.adapter.consoleLog('info', [this.extractMessage(message), ...args]);
    }
  }

  warn(message: string | Error, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Warning) {
      this.adapter.consoleLog('warn', [this.extractMessage(message), ...args]);
    }
  }

  error(message: string | Error, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Error) {
      this.adapter.consoleLog('error', [this.extractMessage(message), ...args]);
    }
  }

  critical(message: string | Error, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Critical) {
      this.adapter.consoleLog('critical', [this.extractMessage(message), ...args]);
    }
  }

  private extractMessage(msg: string | Error): string {
    if (typeof msg === 'string') {
      return msg;
    }

    return toErrorMessage(msg, this.getLevel() <= LogLevel.Trace);
  }

  dispose(): void {
    // noop
  }

  flush(): void {
    // noop
  }
}
<file_sep>import '../../assets/img/icon-34.png';
import '../../assets/img/icon-128.png';
import { Main } from './main';

console.log('This is the background page.');
console.log('Put the background scripts here.');

new Main().startup().catch(console.error);
<file_sep>import * as strings from '@hoodwink/common/base/strings';

export function propertyIsEvent(name: string): boolean {
  // Assume a property is an event if it has a form of "onSomething"
  return name[0] === 'o' && name[1] === 'n' && strings.isUpperAsciiLetter(name.charCodeAt(2));
}
<file_sep>#!/usr/bin/env node

const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');

function main() {
  return yargs(hideBin(process.argv))
    .command(
      'dev [url]',
      'dev the url',
      (yargs) => {
        yargs.positional('url', {
          describe: 'url',
          default: 'https://www.baidu.com',
        });
      },
      (argv) => {
        if (argv.verbose) console.info(`start url on :${argv.url}`);
        require('../node/run')(argv.url);
      },
    )
    .option('verbose', {
      alias: 'v',
      type: 'boolean',
      description: 'Run with verbose logging',
    }).argv;
}

main();
<file_sep>import { Emitter, Event } from '@hoodwink/common/base/event';
import { ILogService, LogLevel } from './ILogService';

export class NullLogService implements ILogService {
  declare readonly _serviceBrand: undefined;

  readonly onDidChangeLogLevel: Event<LogLevel> = new Emitter<LogLevel>().event;

  setLevel(level: LogLevel): void {}

  getLevel(): LogLevel {
    return LogLevel.Info;
  }

  trace(message: string, ...args: any[]): void {}

  debug(message: string, ...args: any[]): void {}

  info(message: string, ...args: any[]): void {}

  warn(message: string, ...args: any[]): void {}

  error(message: string | Error, ...args: any[]): void {}

  critical(message: string | Error, ...args: any[]): void {}

  dispose(): void {}

  flush(): void {}
}
<file_sep>body{
  background: white;
}
.main{
  padding: 10px 0 0;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.recordList{
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  overflow-y: hidden;
}

.RecordInfoPanel{
  position: absolute;
  right: 0;
  top: 40px;
  bottom: 0;
  width: 600px;
  background: white;
  border: 1px solid rgb(198,198,198);
  border-left: 2px solid rgb(198,198,198);

  .close{
    position: absolute;
    left: 4px;
    top: 4px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    z-index: 999;

  }

  :global{
    .ant-tabs-small > .ant-tabs-nav .ant-tabs-tab{
      padding: 0;
      height: 30px;
      background: #fafafa;
    }
    .ant-tabs-nav-wrap{
      padding-left: 30px;
    }
  }

  .paneBox{
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 30px;
    bottom: 0;
    width: 100%;
    overflow-y: scroll;
  }

  .paramEditor{
    :global{
      .jsoneditor{
        height: 220px;
      }
    }
  }

  .HeadersEditor{
    :global{
      .jsoneditor{
        height: 400px;
      }
    }
  }

  .Editor{
    position: relative;
    flex: 1;
    :global{
      .jsoneditor{
        position: absolute;
        top: 0px;
        bottom: 0;
        width: 100%;
      }
    }
  }
}<file_sep>chrome.devtools.panels.create('Hoodwink', 'icon-34.png', 'hoodwink.html', function (panel) {
  // code invoked on panel creation
});
<file_sep>
# Hoodwink - Chrome Extension Boilerplate

<file_sep>import { IInstantiationService } from '@hoodwink/common/instantiation/instantiation';
import { ServiceCollection } from '@hoodwink/common/instantiation/serviceCollection';
import { InstantiationService } from '@hoodwink/common/instantiation/instantiationService';
import { ILogService } from '@hoodwink/module/log/ILogService';
import { SyncDescriptor } from '@hoodwink/common/instantiation/descriptors';
import { ConsoleLogService } from '@hoodwink/module/log/consoleLogService';

export class Main {
  async startup() {
    const instantiationService = this.createInstance();

    await instantiationService.invokeFunction(async (accessor) => {});
  }

  createInstance(): IInstantiationService {
    const services = new ServiceCollection();
    services.set(ILogService, new SyncDescriptor(ConsoleLogService));

    return new InstantiationService(services, true);
  }
}
<file_sep>import { isWindows } from '@hoodwink/common/base/platform';
import { AbstractLogService, DEFAULT_LOG_LEVEL, ILogService, LogLevel, now } from './ILogService';

export class ConsoleLogMainService extends AbstractLogService implements ILogService {
  declare readonly _serviceBrand: undefined;

  private useColors: boolean;

  constructor(logLevel: LogLevel = DEFAULT_LOG_LEVEL) {
    super();
    this.setLevel(logLevel);
    this.useColors = !isWindows;
  }

  trace(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Trace) {
      if (this.useColors) {
        console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
      } else {
        console.log(`[main ${now()}]`, message, ...args);
      }
    }
  }

  debug(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Debug) {
      if (this.useColors) {
        console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
      } else {
        console.log(`[main ${now()}]`, message, ...args);
      }
    }
  }

  info(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Info) {
      if (this.useColors) {
        console.log(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
      } else {
        console.log(`[main ${now()}]`, message, ...args);
      }
    }
  }

  warn(message: string | Error, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Warning) {
      if (this.useColors) {
        console.warn(`\x1b[93m[main ${now()}]\x1b[0m`, message, ...args);
      } else {
        console.warn(`[main ${now()}]`, message, ...args);
      }
    }
  }

  error(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Error) {
      if (this.useColors) {
        console.error(`\x1b[91m[main ${now()}]\x1b[0m`, message, ...args);
      } else {
        console.error(`[main ${now()}]`, message, ...args);
      }
    }
  }

  critical(message: string, ...args: any[]): void {
    if (this.getLevel() <= LogLevel.Critical) {
      if (this.useColors) {
        console.error(`\x1b[90m[main ${now()}]\x1b[0m`, message, ...args);
      } else {
        console.error(`[main ${now()}]`, message, ...args);
      }
    }
  }

  dispose(): void {
    // noop
  }

  flush(): void {
    // noop
  }
}
<file_sep>import React, { useEffect, useState } from 'react';
import styles from './App.less';

export default function App() {
  return
panel hello world
;
}
<file_sep>export function localize(...args: Array<string | number | undefined | {}>) {
  return args.filter(Boolean).join('\n');
}
<file_sep>console.log('content script inject');
<file_sep>import { AbstractLogService, ILogService, LogLevel } from './ILogService';

export class MultiplexLogService extends AbstractLogService implements ILogService {
  declare readonly _serviceBrand: undefined;

  constructor(private readonly logServices: readonly ILogService[]) {
    super();
    if (logServices.length) {
      this.setLevel(logServices[0].getLevel());
    }
  }

  setLevel(level: LogLevel): void {
    for (const logService of this.logServices) {
      logService.setLevel(level);
    }
    super.setLevel(level);
  }

  trace(message: string, ...args: any[]): void {
    for (const logService of this.logServices) {
      logService.trace(message, ...args);
    }
  }

  debug(message: string, ...args: any[]): void {
    for (const logService of this.logServices) {
      logService.debug(message, ...args);
    }
  }

  info(message: string, ...args: any[]): void {
    for (const logService of this.logServices) {
      logService.info(message, ...args);
    }
  }

  warn(message: string, ...args: any[]): void {
    for (const logService of this.logServices) {
      logService.warn(message, ...args);
    }
  }

  error(message: string | Error, ...args: any[]): void {
    for (const logService of this.logServices) {
      logService.error(message, ...args);
    }
  }

  critical(message: string | Error, ...args: any[]): void {
    for (const logService of this.logServices) {
      logService.critical(message, ...args);
    }
  }

  flush(): void {
    for (const logService of this.logServices) {
      logService.flush();
    }
  }

  dispose(): void {
    for (const logService of this.logServices) {
      logService.dispose();
    }
  }
}
<file_sep>module.exports = require('./puppeteer');
<file_sep>const puppeteer = require('puppeteer');
const path = require('path');

module.exports = async (url) => {
  const pathToExtension = path.join(__dirname, '../extension');
  const browser = await puppeteer.launch({
    headless: false,
    args: [
      `--window-size=${1920},${1920}`,
      `--disable-extensions-except=${pathToExtension}`,
      `--load-extension=${pathToExtension}`,
    ],
    devtools: false,
  });
  const page = await browser.newPage();
  await page.setViewport({
    width: 1920,
    height: 1920,
    deviceScaleFactor: 1,
  });
  await page.goto(url);
};
<file_sep>module.exports = {
  extends: require.resolve('@alipay/eslint-config-ant'),
  rules: {
    'no-useless-constructor': 'off',
    'no-console': 'off',
    '@typescript-eslint/member-ordering': 'off',
    '@typescript-eslint/no-unused-vars': 'off',
    '@typescript-eslint/no-parameter-properties': 'off',
    'no-unused-vars': 'off',
    'no-bitwise': 'off',
    'no-param-reassign': 'off',
    'no-plusplus': 'off',
    'no-constant-condition': 'off',
    'no-await-in-loop': 'off',
    'no-shadow': 'off',
    '@typescript-eslint/unified-signatures': 'off',
    'no-return-assign': 'off',
    'no-loop-func': 'off',
    'no-empty-function': 'off',
    '@typescript-eslint/no-namespace': 'off',
    'no-useless-escape': 'off',
    'no-redeclare': 'off',
    'no-multi-assign': 'off',
    'default-case': 'off',
    'no-inner-declarations': 'off',
    'prefer-const': 'off',
    'no-prototype-builtins': 'off',
    'no-nested-ternary': 'off',
    'no-cond-assign': 'off',
    'no-lonely-if': 'off',
    'prefer-rest-params': 'off',
    'no-case-declarations': 'off',
    "radix": 'off',
    '@typescript-eslint/no-use-before-define': 'off',
    'no-fallthrough': 'off',
    'no-new-object': 'off',
    'guard-for-in': 'off',
    'no-undef': 'off',
    'no-empty': 'off',
    'operator-assignment': 'off',
    'valid-typeof': 'off',
    '@alipay/ant/no-import-src': 'off',
  },
};
<file_sep>import React from 'react';
import { render } from 'react-dom';
import App from './pannels/App';

render(<App />, window.document.querySelector('#app-container'));

languages: TSX Markdown JavaScript TypeScript Less

repo_language: TSX


text:
<repo_name>Lahari-Immanni/github-demo<file_sep>/README.md
## Please read the instructions in README file
The file contains instructions to open the project
The word **README** is in bold<file_sep>/index.html

        <title>An Html File.....</title>

Welcome to E-Commerece website!!!

List of Products!!

Writing Pads

White Board marker pens

Lofitech mouse

mouse pads

languages: Markdown HTML

repo_name: Lahari-Immanni/github-demo


text:
<file_sep># basic_CPP_programs
Repo for basic C++ programs
# on working .... will be updated soon