Affichage des articles dont le libellé est Newest questions tagged web - Stack Overflow. Afficher tous les articles
Affichage des articles dont le libellé est Newest questions tagged web - Stack Overflow. Afficher tous les articles

lundi 3 janvier 2022

Can i do another website gift-code checker with python? [closed]

I want to do checker with python. Like there is a gift-code and I am interested its valid or not. I have tried many things watched many videos but does not help. I tried to get website link I want to check and create directory inside this directory open file were written code is valid or invalid

Thanks A Lot <3




I'm Facing Invalid Config with Google Indexing Api

Hello I recently created an educational blog but none of the published articles get indexed. This makes me to try using Google indexing API plugin but after I followed the documentation " all I got is "Invalid Config". Please, does it means something is missing?




Url path not changing when navigating back to previous page in flutter web

I am working on a flutter app. i have set up router in the app with named routes. on going to my home page it shows as locahost:1234/#/home. and the path is correct. but from there when a navigate back to previouse page it still showing the same path locahost:1234/#/home. the path url is not changing on navigating back. if any one has an idea? my router file is as follows:

  /* ADD REPOSITORY TO APP ROUTER */
  /* ADD REPOSITORY TO APP ROUTER */
  Repository repository;
  AppRouter() {
    repository = new Repository(apiService: ApiService());
  }

  Route generateRoute(RouteSettings settings) {
    switch (settings.name) {
      case "/":
        return MaterialPageRoute(
          settings: RouteSettings(name: '/'),
            builder: (_) => MultiBlocProvider(providers: [
                  BlocProvider<HomeCubit>(
                    create: (BuildContext context) {
                      return HomeCubit(repository: repository);
                    },
                  ),
                  BlocProvider<SearchCubit>(
                    create: (BuildContext context) =>
                        SearchCubit(repository: repository),
                  ),
                  BlocProvider<UserCubit>(
                    create: (BuildContext context) {
                      return UserCubit(repository: repository);
                    },
                  )
                ], child:userToken==null?SplashScreen():NavScreen()
                // SplashScreen()
                ));
                case "/getstarted":
                 return MaterialPageRoute(
           settings: RouteSettings(name: '/getstarted'),
            builder: (_) => BlocProvider(
                create: (BuildContext context) =>
                    ProfileCubit(repository: repository),
                child: OnboardingScreen()));
      //return MaterialPageRoute(builder: (_) => VideoDetailScreen());
      case "/register":
        return MaterialPageRoute(
           settings: RouteSettings(name: '/register'),
            builder: (_) => MultiBlocProvider(providers: [
                  BlocProvider<HomeCubit>(
                    create: (BuildContext context) {
                      return HomeCubit(repository: repository);
                    },
                  ),
                  BlocProvider<SearchCubit>(
                    create: (BuildContext context) =>
                        SearchCubit(repository: repository),
                  ),
                  BlocProvider<UserCubit>(
                    create: (BuildContext context) =>
                        UserCubit(repository: repository),
                  )
                ], child: RegisterScreen()));
      case '/home':
        return MaterialPageRoute(
           settings: RouteSettings(name: '/home'),
            builder: (_) => BlocProvider(
                create: (BuildContext context) =>
                    HomeCubit(repository: repository),
                child: NavScreen()));
      case '/signin':
        return MaterialPageRoute(
            builder: (_) => BlocProvider(
                create: (BuildContext context) =>
                    UserCubit(repository: repository),
                child: SigninScreen()),
                 settings: RouteSettings(name: '/signin'));
      default:
        return MaterialPageRoute(builder: (_) {
          return Scaffold(
            body: Center(
              child: Text('Error! No route Found...',
              style: TextStyle(color: Colors.white,fontWeight:FontWeight.bold),),
            ),
          );
        }
        );
    }
  }
}



dimanche 2 janvier 2022

Why Markdown is usually parsed in backend?

My impression is that Markdown can be parsed easily in Frontend, doing this also save server processing resources. But I have come across many web applications that parses Markdown in Backend instead, such as Gitlab, Github, FetLife.

What are the advantage for parsing Markdown in backend instead of Frontend?




samedi 1 janvier 2022

How to submit only inputs field that have disapaly: flex

Sorry if I formed the question in a wrong way, Imagine that I have inputs, some are visible(display:none) and some are not(display:flex). I can control between them using add ClassList with (display:flex).

The problem: The form is always submitted even though when I have the input fields changed to flex display and they are empty.

What I want to do: I want to check that the form is not submitted unless the active inputs (inputs with flex display) are filled.

HTML:

                    <div id="dvd" class="section dvd">
                        <div class="input-wrapper dvd-attribute">
                            <label for="" class="description">Please, Provide Disc Size(MB):</label>
                            <input type="text" required name="size" class="mySize" id="size">
                        </div>
                    </div>
                    <div id="book" class="section book">
                        <div class="input-wrapper book-attribute">
                            <label for="" class="description">Please, Provide The Book Weight:</label>
                            <input type="text" required name="weight" class="myWeight" id="weight">
                        
                        </div>
                    </div>
                    <div id="furniture" class="section furniture">
                        <div class="furniture-attribute">
                            <p class="askDimensions">Please, Provide Dimensions:</p>
                                <div class="input-wrapper">
                                    <label for="">Height: </label>
                                    <input type="text" required name="height" class="myHeight" id="height">
                                </div>
                                <div class="input-wrapper">
                                    <label for="">Width: </label>
                                    <input type="text" required name="width"  class="myWidth"  id="width">
                                </div>
                                <div class="input-wrapper">
                                    <label for="">Length: </label>
                                    <input type="text" required name="length" class="myLength" id="length">
                                </div>
                        </div>
                    </div>

SASS:

.section {

      align-items: center;
      width: 60%;
      height: 20vh;
      border: solid 2px;
      max-width: 100%;
      margin-bottom: 2rem;
      padding: 0 30px;
      display: none;

      .input-wrapper {
        margin: 0;
      }
    }

    
    .furniture {
      height: unset;
      .askDimensions {
        padding: 20px 0 50px;
        font-weight: 400;
      }
      .input-wrapper {
        margin-bottom: 1.5rem;
      }
    }
    .active {
      display: flex;
    }

JS:

document.addEventListener("DOMContentLoaded", () => {

document.querySelector(".mySwitcher").addEventListener("input", (e) => {

let selected = e.target;
if (selected.value.toLowerCase() == "dvd") {
  remove();
  document.getElementById("dvd").classList.add("active");
}
if (selected.value.toLowerCase() == "book") {
  remove();
  document.getElementById("book").classList.add("active");
}
if (selected.value.toLowerCase() == "furniture") {
  remove();
  document.getElementById("furniture").classList.add("active");
}

}); });

function remove() { document.querySelectorAll(".section, .section input").forEach((tag) => {

tag.value = " ";
tag.classList.remove("active");

}); }




I need to configure my site built in flutter

I need to configure my site built in flutter so that when I access base-url/app-ads.txt the contents of the file are shown. This is for setting up ads in apps. But I get the error below

response not found




vendredi 31 décembre 2021

Is there any way to host a WordPress website for free? Without any custom domain

I am looking for free hosting for my WordPress website which is currently running on local server.




fabricJS - How to determine whether the mouse is on the path




jeudi 30 décembre 2021

Split 1 day array into 2 days array

I have an array like this and I want to split this into 2 arrays with the same date.

 array (size=2)
   'dates' => string '2021-10-20' (length=10)
   'hours' => 
     array (size=2)
       0 => 
         array (size=12)
           0 => string '07:30' (length=5)
           1 => string '08:00' (length=5)
           2 => string '08:30' (length=5)
           3 => string '09:00' (length=5)
           4 => string '09:30' (length=5)
           5 => string '10:00' (length=5)
           6 => string '10:30' (length=5)
           7 => string '11:00' (length=5)
           8 => string '11:30' (length=5)
           9 => string '12:00' (length=5)
           10 => string '12:30' (length=5)
           11 => string '13:00' (length=5)
       1 => 
         array (size=4)
           0 => string '15:30' (length=5)
           1 => string '16:00' (length=5)
           2 => string '16:30' (length=5)
           3 => string '17:00' (length=5)

I want to make 2 arrays with the same date, and it looks like this:

 0 =>
   'dates' => string '2021-10-20'
   'hours' => 
     array (size=1)
       0 => 
         array (size=12)
           0 => string '07:30' (length=5)
           1 => string '08:00' (length=5)
           2 => string '08:30' (length=5)
           3 => string '09:00' (length=5)
           4 => string '09:30' (length=5)
           5 => string '10:00' (length=5)
           6 => string '10:30' (length=5)
           7 => string '11:00' (length=5)
           8 => string '11:30' (length=5)
           9 => string '12:00' (length=5)
           10 => string '12:30' (length=5)
           11 => string '13:00' (length=5)
 1 =>
   'dates' => string '2021-10-20'
   'hours' => 
     array (size=1)
       0 => 
         array (size=4)
           0 => string '15:30' (length=5)
           1 => string '16:00' (length=5)
           2 => string '16:30' (length=5)
           3 => string '17:00' (length=5)

How to make this happen? and my code looks like this, i tried to add variable for dates but its not works. And sometimes just showing last arrays. Help me to split an array into 2 different arrays. Here is my code

if ($cekWaktuDosen4->num_rows == 0) {
    $timesDosen4[$i]['dates'] = $dates;
    $timesDosen4[$i]['hours'] = Array
    (
        (0) => Array
            (
                0 => '07:30',
                1 => '08:00',
                2 => '08:30',
                3 => '09:00',
                4 => '09:30',
                5 => '10:00',
                6 => '10:30',
                7 => '11:00',
                8 => '11:30',
                9 => '12:00',
                10 => '12:30',
                11 => '13:00',
                12 => '13:30',
                13 => '14:00',
                14 => '14:30',
                15 => '15:00',
                16 => '15:30',
                17 => '16:00',
                18 => '16:30',
                19 => '17:00'
            )
    );
}else {
    $y = 0;
    while ($k = $cekWaktuDosen4->fetch_object()) {
        $tglMulaiDosen4 = $carbon->create($carbon->parse($k->tanggal_mulai)->format('Y-m-d'));
        $tglSelesaiDosen4 = $carbon->create($carbon->parse($k->tanggal_selesai)->format('Y-m-d'));
        $tglBantuMulai4 = $tglMulaiDosen4->addHours(7)->addMinutes(30);
        $tglBantuSelesai4 = $tglSelesaiDosen4->addHours(17);
        if($tglBantuMulai4 < $k->tanggal_mulai) {
            $timesDosen4[$i]['dates'] = $tglMulaiDosen4->format('Y-m-d');
            $timesDosen4[$i]['hours'][$y] = create_time_range($tglBantuMulai4->format('H:i'), rounddown_timestamp($carbon->parse($k->tanggal_mulai)->format('H:i')));
            $y++;
            if($k->tanggal_selesai < $tglBantuSelesai4) {
                $timesDosen4[$i]['hours'][$y] = create_time_range(roundup_timestamp($carbon->parse($k->tanggal_selesai)->format('H:i')), $tglBantuSelesai4->format('H:i'));
            }
        }else if($tglBantuMulai4 == $k->tanggal_mulai && $tglBantuSelesai4 != $k->tanggal_selesai) {
            $timesDosen4[$i]['dates'] = $tglMulaiDosen4->format('Y-m-d');
            $timesDosen4[$i]['hours'][$y] = create_time_range(roundup_timestamp($carbon->parse($k->tanggal_selesai)->format('H:i')), $tglBantuSelesai4->format('H:i'));
        }
    }
}



Can I have any way (such as an API) to count the like and react on my post in my page and use that count to store in my database to use it?

I want to create a post in my website and post/share it in my Facebook page. This can be live/video/image etc. The amount likes and reaction my post get in Facebook will need to be fetched and stored in my post related database of my website.

  • Is it somehow possible to do?
  • If it is possible then what tools or guideline I need to follow?



Problem when play youtube vidéos on my website (payback id ) [closed]

I share some videos in my website from a channel on youtube ( with permissions from admin ) but since 3 weeks is not possible to read some videos but some working .. ( for these not working i get an payback id problem .. Someone can help me ? have a nice day




Any recommendations for a good page translator plugin?

I'm looking for a translator plugin for my website that is free, easy to install, effective and does not have a watermark. Please tell me if you know of any plugins that fit the description.




mercredi 29 décembre 2021

How to solve elementor plugging

My sir My website is automatically change when I am installing elementor plugging...my website automatically change civil construction company when I am installing elementor plugging... please resolve my problem




How do I target the folder I want to deploy my web JS app in with Azure Pipelines?

I am really new to Azure DevOps especially when it comes to YAML pipelines.

I am developing a website split between backend and frontend. The backend part is already developed and deployed on my linux server.

Now I want to deploy the frontend part (Vue JS) using YAML pipelines. The thing is I dont want the frontend part to be deployed in the same folder of the backend.

I know that the pipeline script "npm run build" creates a "dist" folder, so how can I force my azure pipelines to deploy the "dist" folder into a specific folder (let's say this specific folder is a subdirectory of "wwwroot" so it would be something like "wwwroot/subfolder/dist")

enter image description here

Thank you for all your help !




Python Scraping Web page

I tried to Scrap all the 'a' tag placeholder values from this sample link:https://www.fundoodata.com/companies-in/list-of-apparel-stores-companies-in-india-i239

What I need is I want to copy only the names of 'a' tag and need to save it to a csv file

I'm beginner can anyone help me out below is my wrong code:

# importing the modules
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
import pandas as pd
import time
import os


link = "https://www.fundoodata.com/companies-in/list-of-apparel-stores-companies-in-india-i239"




# instantiating empty lists
nameList = []


for i in range(1) :
    driver = webdriver.Chrome(ChromeDriverManager().install())

 
    # fetching all the store details
    storeDetails = driver.find_elements_by_class_name('search-result')
 

 
    # iterating the storeDetails
    for j in range(len(storeDetails)):
         
        # fetching the name, address and contact for each entry
        name = storeDetails[j].find_element_by_class_name('heading').text
    
         
        myList = []
         
        nameList.append(name)


    driver.close()
 
     
# initialize data of lists.
data = {'Company Name': nameList,}
 
# Create DataFrame
df = pd.DataFrame(data)
print(df)
 
# Save Data as .csv
df.to_csv("D:\xxx\xxx\xx\xxx\demo.csv", mode='w+', header = False)



Web-Automation: Save Data in database

I have the following issue:

I have this HTML Code:

            <tr class="_requirement odd">
            <td class="_unit">XXX <strong>9999</strong></td>
            <td class="_time">07:30 - 18:00</td>
            <td><span class='_photo' data-id='1234567'>Franz Wundschuh</span>, <span class='_photo' data-id='98765432'>Dieter Bohlen</span>
            </td>
            <td class="_location">Stall<br /></td>
        </tr>
        <tr class="_requirement even">
            <td class="_unit">YYY<strong>8888</strong></td>
            <td class="_time">08:00 - 18:00</td>
            <td><span class='_photo' data-id='3641'>Julia Schwarz</span>
            </td>
            <td class="_location">Haus<br /></td>
        </tr>
            <tr class="even">
                <td class="_note" colspan="4">Information</td>
            </tr>

Now the following task:

I want to store the information in a database. I need from the <tr> with class="_requirement odd" the information "XXX" in the first column, "9999" in the second column, in this case the 3rd column is empty.

Further I need from the <tr>`` with class="_requirement even"the information "YYY" in the first column, "8888" in the second column and in the 3rd column from the`` "information".

That means, whenever after a class="_requirement even" a <tr class="even">`` comes in the third column the value from the in it (In this case "Information". The same - if after a ```class="_requirement odd"``` comes a ```<tr class="odd"> in the third column the value from the <td> in it (In this case "Information".

If no "odd" or "even" comes after the requirements odd or even, the third column should be empty.

I can't get it together.

The following code for the first 2 columns I already have:

    for shift in driver.find_elements(By.TAG_NAME, 'tr'):
        shiftLine = []
        for field in shift.find_elements(By.TAG_NAME, 'td'):
            tdClass = field.get_attribute('class')
            if tdClass == '_unit':
                splitUnit = field.text.split()
                shiftLine.append(splitUnit[0])
                if len(splitUnit) == 2:
                    shiftLine.append(splitUnit[1])
                else:
                    shiftLine.append('')



mardi 28 décembre 2021

FTP permission to ubuntu apache server

How do i directly upload to /var/www/html? how do i create a user that can upload files and folder directly to the /var/www/html?

i was unable to directly upload my website files to /var/www/html via a created user id. I had to update to user id documents folder and copied the folder to /var/www/html. thereafter running this command = sudo chown www-data /var/www/html/.. This will remove the uanble to a access resource error when i access the website.

however there is a /var/www/html/image folder that does not seem to effect by the command.

there has to be a more direct and easier method without compromising the security of the default apache folder.




I want to read data from cloudfirebase subcollection into HTML table in NodeJS

I want to fetch Subcollection from CloudFirestore.

Database Model is as follow

Users //It is a collection Student //It is a document Students// A subcollection with some documents(IDs) OqlDiQkN3MVoEfN9M0h06aFfO873 QayxOc1RMSPWH9Y8ns3bBL9iid63 Here is my Snippet of Code:

async function GetAllDataOnce(){ //Reference to Subcollection const studentsRef = doc(db,"Users","Student","Students","OqlDiQkN3MVoEfN9M0h06aFfO873"); const querySnapshot = await getDocs(collection(db,"studentsRef")); var _vehicles = []; querySnapshot.forEach(doc=>{ _vehicles.push(doc.data()); }); AddAllItemsToTable(_vehicles);
} Through this function, I want to display all my data in the HTML Table. Yet my table is getting no value.




How to create a shortcut key for a specific button on a WEBPAGE

I am using this extension but I am having trouble finding out what to use in the 'Javascript code' box and how to associate it with clicking on a specific button... Please help me with this and also give an example if you could. Thanks in advance




How did Replit embed a terminal into their website?

I was amazed by how replit embedded a bash terminal into their website, So I'm asking how they did it? NOTE: I do want to do this in static HTML with CSS and JavaScript.