Welcome to Webmatrices Community

Welcome to Webmatrices Community

Our forum is here to help you fix your digital issues related to SEO, Digital Marketing, NFT development, Google Adsense, Blogging and more.

codie
codie

I was working in Phoenix/Elixir and created a function component for navbar, and got this issue:Done in 38ms. Compiling 1 file (.ex) error: undefined function sigil_p/2 (expected RankgistWeb.NavComponents to define such a function or for it to be imported, but none are available) │ 55 │ href={~p"/users/log_out"} │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ (rankgist 0.1.0) lib/rankgist_web/components/nav_components.ex:55: RankgistWeb.NavComponents.main/1 error: undefined function sigil_p/2 (expected RankgistWeb.NavComponents to define such a function or for it to be imported, but none are available) │ 45 │ href={~p"/track-competitors"} │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ (rankgist 0.1.0) lib/rankgist_web/components/nav_components.ex:45: RankgistWeb.NavComponents.main/1 error: undefined function sigil_p/2 (expected RankgistWeb.NavComponents to define such a function or for it to be imported, but none are available) │ 8 │ <.link href={~p"/"} class="flex items-center space-x-3 rtl:space-x-reverse"> │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ (rankgist 0.1.0) lib/rankgist_web/components/nav_components.ex:8: RankgistWeb.NavComponents.main/1 == Compilation error in file lib/rankgist_web/components/nav_components.ex == ** (CompileError) lib/rankgist_web/components/nav_components.ex: cannot compile module RankgistWeb.NavComponents (errors have been logged) Compiling 1 file (.ex) error: undefined function sigil_p/2 (expected RankgistWeb.NavComponents to define such a function or for it to be imported, but none are available) │ 55 │ href={~p"/users/log_out"} │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ (rankgist 0.1.0) lib/rankgist_web/components/nav_components.ex:55: RankgistWeb.NavComponents.main/1 error: undefined function sigil_p/2 (expected RankgistWeb.NavComponents to define such a function or for it to be imported, but none are available) │ 45 │ href={~p"/track-competitors"} │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ (rankgist 0.1.0) lib/rankgist_web/components/nav_components.ex:45: RankgistWeb.NavComponents.main/1 error: undefined function sigil_p/2 (expected RankgistWeb.NavComponents to define such a function or for it to be imported, but none are available) │ 8 │ <.link href={~p"/"} class="flex items-center space-x-3 rtl:space-x-reverse"> │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ (rankgist 0.1.0) lib/rankgist_web/components/nav_components.ex:8: RankgistWeb.NavComponents.main/1 == Compilation error in file lib/rankgist_web/components/nav_components.ex == ** (CompileError) lib/rankgist_web/components/nav_components.ex: cannot compile module RankgistWeb.NavComponents (errors have been logged)to fix the issue of sigil_p/2 being undefined:defmodule LiveViewAppWeb.NavComponents do use Phoenix.Component use LiveViewAppWeb, :verified_routes def main(assigns) do ~H"""...use LiveViewAppWeb, :verified_routes adding this fixed it.

Published 18 days ago
0 likes 77 watched 0 commented
codie
codie

I've been trying sudo apt-get update in Ubuntu 20.04 LTS server, and I was getting the below error.W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com' W: Failed to fetch http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/focal/InRelease Temporary failure resolving 'ppa.launchpad.net' W: Failed to fetch http://rpms.litespeedtech.com/debian/dists/focal/InRelease Temporary failure resolving 'rpms.litespeedtech.com' W: Some index files failed to download. They have been ignored, or old ones used instead.Fix for Temporary failure resolving us.archive.ubuntu.comHere's how I fixed it:Removing bad sources.listsudo rm -rf /etc/apt/sources.list*Adding new good sources.listcd /etc/apt/ wget https://gist.githubusercontent.com/ishad0w/788555191c7037e249a439542c53e170/raw/3822ba49241e6fd851ca1c1cbcc4d7e87382f484/sources.listFixing the Ubuntu's connectionsudo dhclient -v -4 sudo echo 'nameserver 8.8.8.8' > /etc/resolv.confRunning the update commandsudo apt-get updateHooray! you fixed it.

Published 18 days ago
0 likes 81 watched 0 commented
codie
codie

So, you’ve heard about the sweet, sweet internet cash flowing in from Google AdSense, and you want a piece of that pie? Well, my friend, you've landed on the right page! Let's walk you through the mystical, often misunderstood journey to AdSense approval. Believe it or not, it's easier than assembling an IKEA coffee table, and there are fewer leftover screws!The Golden Criteria for AdSense ApprovalTo get Google AdSense to sprinkle those revenue dollars upon you, your website needs to be top-notch. Think of it like trying to impress a date but with less cologne and more quality content.1. Domain AgeYour domain can't be a toddler in the internet world. Generally, it should be at least 6 months old, though this can vary by region.2. Domain AuthorityJust like a stern librarian, your site needs some authority. Over time, as your site earns backlinks (the good kind, not the shady alley ones), your domain authority increases.3. Page AuthorityEach specific page on your website should also ooze authority. Google likes influential pages—think of them as the superheroes of your domain.4. BacklinksIt's all about the web connections. The more legit websites linking back to yours, the better Google thinks you are. Isn’t it all about who you know?5. Indexed PagesThese are the pages Google has decided are worthy of appearing in search results. If they’re good enough for Google, they're good enough for AdSense.6. Essential PagesYou need the essentials: About Us, Contact Us, Privacy Policy, and Terms of Service. It's like your website wearing a tuxedo to the prom—Google likes formalities.7. Website TrafficNot to sound like a hipster, but Google prefers sites with a significant amount of genuine traffic. No need to buy fake visitors from the dark web!8. Website SpeedIf your site loads slower than a snail in molasses, Google’s going to swipe left. Fast loading times keep the bounce rates low.9. Mobile FriendlyOur pint-sized devices rule the world. Make sure your site looks fab on mobiles; otherwise, you’re missing out big time.10. HTTPSIf your site isn’t secure, Google might just send it to internet jail. Get that SSL certificate and keep the padlock icon happy.The Magic Number: 70%Okay, here’s the juice: to get Google AdSense's green light, your site needs a score of at least 70%. Think of it like getting a C in college—it's not the best, but it’s passing, and that’s all you need.https://webmatrices.com/adsense-eligibility-checker is your go-to tool for finding out if your site makes the cut. Simply pop in your URL, hit the "Check" button, and—voilà! You’ll see your score along with pointers on where you stand and where you need to tighten the screws.How Long Does It Take to Get Approved?The million-dollar question. If your site matches all these conditions, the AdSense approval time is generally on the shorter side. But if your site needs some TLC, then you may be waiting a bit longer. Quality content, user-friendly layout, and high engagement can speed this process up considerably.Step-by-Step Guide to Get AdSense ApprovedStep 1: Content is KingWrite high-quality, unique content that provides value. Avoid clickbait; Google’s smarter than your average bear.Step 2: Design MattersA clean, user-friendly layout is crucial. If your site looks like a 90s Geocities page, time for a makeover.Step 3: Build BacklinksGet backlinks from reputable sites. Networking is key here!Step 4: Optimize for SpeedUse tools like Google PageSpeed Insights to make sure your site doesn’t lag.Step 5: Be Mobile-FriendlyTest your site on different devices. If it’s smooth on mobile, you’re halfway there.Step 6: Secure Your SiteInvest in an SSL certificate and make sure your site runs on HTTPS.Step 7: Sign Up for AdSenseOnce you believe your site is up to the mark, sign up for AdSense. Fill out all the necessary details, and let Google do its thing.Step 8: Be PatientAfter submitting, sit back and maybe watch some funny cat videos to pass the time. Google will get back to you!Final Thoughts: AdSense AwesomenessGetting AdSense approval can seem like battling a Hydra, but with the right approach, you’ll slay it. Keep producing top-tier content, maintain a user-friendly site, and make sure you’re ticking all the boxes we discussed.And remember, if you’re ever in doubt or just want to see how you're faring before applying, give https://webmatrices.com/adsense-eligibility-checker a whirl. May the ad revenue be ever in your favor!

codie replied 19 days ago
I think we should try that feature. I'll work on something like that within this forum.
Published 22 days ago
3 likes 936 watched 2 commented
codie
codie

Alright folks, let's cut the crap. We know web dev can be a brutal grind. Django for the backend, SvelteKit for the frontend—sounds perfect, until you try to make them work together. Endless configs, dependencies throwing tantrums, and a heap of wasted nights.Pain In The Ass? Let’s Fix It 🎯We’ve all been there:Backend Ready: Django's solid, backend is rolling.Frontend Dream: SvelteKit is ready to dazzle.Reality: Integration is a flaming dumpster fire. 🔥Enter Django Svelte Template 🦸‍♂️Screw the headaches. This template is your knight in shining armor. Pre-configured, smooth as butter. Clone it, run it, done.🚀 Getting Shit DoneClone the Repogit clone [email protected]:Bishwas-py/django-svelte-template.git Fire Up Django Backendcd django_backend python3 -m venv venv source venv/bin/activate pip install -r requirements.txt python manage.py migrate python manage.py runserver Spin Up SvelteKitcd svelte_frontend npm install npm run dev Set .env:SECRET_BASE_API=http://localhost:8000 Boom! You’ve got a working todo app to play with.Why Use This?Backend Power:Django: Steady and reliable.Djapy: Enhanced validation, swagger in dark-mode.DjangoKit: Smooth Django-SvelteKit integration.Frontend Magic:Svelte 5: Reactive, quick.@friendofsvelte/django-kit: Seamless connection to Django.Tailwind CSS: Style without the hassle.Insta-FeaturesAuto Flash Messages: Toasts on errors, no sweat.Form Handling: Handling & validation, out of the box.Notifier Store: Easy to use toast notifications.Why Give a Damn?Plug and Play: No more setup nightmares.Full-Featured: A ready-to-use todo app to kickstart your project.Seamless Integration: Django and SvelteKit are besties here.Ready To Roll? 🏎️💨Head to the repo, fork it, clone it, and start building. No more late nights swearing at broken builds. Just smooth, painless dev.Let's code smarter, not harder. 🌟Contributions are welcomed!

cemen1 replied a month ago
cool one, thanks for sharing!
Published a month ago
2 likes 101 watched 2 commented
codie
codie

I have been doing a lot of Phoenix Framework these days, but I am struggling with writing heex templates because the elixir_ls was/might not be working well.So here's how I made it cool. The primary idea of this note is grabbed from this discussion.VsCode extension to install:Phoenix FrameworkElixirLSSetup to make:In your .vscode/settings.json write the following configurations:{ "emmet.includeLanguages": { "phoenix-heex": "html" } }This will give you emmet abbreviation for phoenix heex templates.For formatting Phoenix Heex"[phoenix-heex]": { "editor.defaultFormatter": "RoyalMist.vscode-eex-format" },Install, Elixir Templates Formatter, finally for tailwind css suggestions: "tailwindCSS.includeLanguages": { "phoenix-heex": "html" },I am not much of a fan of vscode, due to lack of dedicated Intellij IDE for Elixir, I am using vscode. You can vote, for Elixir support with LSP.Thanks!

codie replied a month ago
try this new one:{ "elixirLS.suggestSpecs": false, "elixirLS.dialyzerEnabled": true, "elixirLS.signatureAfterComplete": false, "elixirLS.fetchDeps": false, "files.associations": { "*.heex": "phoenix-heex" }, "[elixir]": { "editor.formatOnSave": true, "editor.defaultFormatter": "JakeBecker.elixir-ls" }, "[phoenix-heex]": { "editor.formatOnSave": true, "editor.defaultFormatter": "JakeBecker.elixir-ls" }, "emmet.includeLanguages": { "elixir": "html", "phoenix-heex": "html", "html-eex": "html" }, "emmet.triggerExpansionOnTab": true, "[html-eex]": { "editor.defaultFormatter": "JakeBecker.elixir-ls", }, "tailwindCSS.includeLanguages": { "phoenix-heex": "html" } }works well
Published a month ago
1 likes 96 watched 1 commented
Saymah

Hello everyone,I’m starting this thread to focus on a topic that I believe many of us here are interested in: Getting Google AdSense approval for Bangla news websites. As many of you might be aware, obtaining AdSense approval can be particularly challenging for news sites, and even more so when the content is in Bangla like https://dainikbdnews.com/Why is it challenging?Language Support: While Bangla is a supported language by Google AdSense, the nuances of local dialects and compliance with content guidelines can be complex.Content Requirements: News websites have dynamic content, which makes it hard to maintain the consistency in quality and compliance that Google demands.Navigating Policies: Google has strict policies regarding content and traffic sources, which can be a minefield for any news-oriented website.What I’m looking for:Personal Experiences: If you've gone through the AdSense approval process for your Bangla news site, what was your approach? Were there specific challenges you faced because of the language or the nature of news reporting?Advice and Strategies: Tips on aligning a Bangla news site with Google’s AdSense policies. How do you ensure your content is compliant? What about SEO strategies specific to Bangla content?Resource Sharing: Any guides, tools, or resources that you found invaluable during your application process.The goal here is to build a comprehensive guide that can help not just me but many others who are either planning to apply or struggling with their current applications. Whether it's about tweaking your content strategy, enhancing site structure, or ensuring compliance with legal requirements, every piece

codie replied a month ago
Can you explain your issue specifically?
Published 2 months ago
1 likes 1377 watched 1 commented
codie
codie

Hey Devs.I started learning Django in COVID times. I was on my grade 12th ATM. I was into content writing and stuff. I had a site, and there was a tool named "Adsense Eligibility Checker" in my site, where user could fill the form, submit their site, and I'd check if there site is eligible or not. The requests were a lot, and task was tedious.I wanted to build something where my presence would not be required. So, I started searching for ways to make a tool/webapp. I was already into learning Python, so maybe fate wanted or something, I got to know about Django.I started learning it. It took me three weeks to nicely learn and 2-3 weeks to develop that tool. I was super happy, wanted to deploy on my cpanel-shared-hosting based server, I had to suffer a lot at that time. But does tons of searches, I deployed it. It got popular, I attached Google Ads on that platform, made a little good money, travelled to places in Nepal.My father's friend used to do Fiverr in Poland, and she suggested me to do so. I had some old Fiverr gigs added, but removed them (were primarily for Photoshop editing). Add a gig, "I'll deploy Django on cPanel", after 2 days of adding that gig, got an order from a Morroco-ian guy. Delivered it. And my journey boosted.I kept doing indie dev and freelancing. After 2 years, my revenue were not doing so well. Had to apply for a job, got the job, worked there for 5 and a half months, and US-based company named "Blogstorm.AI" offered me a job with comparatively good salary, started working there. It's been 1 and a half years working on blogstorm.Now, I am doing full-time job, indie dev and open source. There's a Django rest API framework, that I am working, called Djapy.IO . The journey is going good. I have migrated all my platforms code to Djapy.I hope to see some new guys in there. Life is good man, so is Django. Have a great day. For suggestions, believe on process.

Zaeemusmani replied 4 months ago
Noce good lovly
Published 4 months ago
3 likes 1664 watched 3 commented
codie
codie

Django Recaptcha v3 will be installed in your Django website soon, just follow my instructions. We will be using Google Recaptcha version 3 ( I am not a robot ) and a Python library django-recaptcha for this task.This is a repost of an old blog of ours.How to install, deploy or integrate Django recaptcha v3?Django recaptcha v3 installationFirst, install django-recaptcha in your virtual workspace.Visit the GitHub Repo of this task/project to get all the source codes.Install and configure django-recaptcha libpip install django-recaptchaNow, add captcha in the INSTALLED_APPS section in your settings.pycaptchaMust be similar to this:INSTALLED_APPS = [ 'captcha', # add this code 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', "your_app_name", # app name ]Recaptcha keys configurationAdd RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY at the last lines of your settings.pyRECAPTCHA_PUBLIC_KEY = 'MyRecaptchaKey123' RECAPTCHA_PRIVATE_KEY = 'MyRecaptchaPrivateKey456'Here, RECAPTCHA_PUBLIC_KEY means SITE KEY and RECAPTCHA_PRIVATE_KEY means SECRET KEY.Now, go to Google reCAPTCHA admin panel and register your site for reCAPTCHA and use those data in the upper code.Cpatcha Form configurationNow, create a file named my_captcha.py and inside it you need to write the following Python codes:from django import forms from captcha.fields import ReCaptchaField class FormWithCaptcha(forms.Form): captcha = ReCaptchaField()Django views configurationWrite a context with "captcha" variable name that with render the form we have coded in FormWithCaptcha which is inside the my_captcha.py .from django.shortcuts import render from .my_captcha import FormWithCaptcha # Create your views here. def home(request): context = { "captcha": FormWithCaptcha, } return render(request, "home.html", context)Rendering recaptcha v3Now, we are rendering recaptcha using the Jinja template method. Use {{captcha}} for rendering the captcha form.For now, have a look here:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <forms> {{captcha}} </forms> </body> </html>Getting data from recaptcha formTo get data from django recaptcha, you need to use g-recaptcha-response.get_recaptcha = request.POST.get("g-recaptcha-response")This will return true if the checkbox is checked, else false.

codie replied 4 months ago
You might also wanna check this video:https://youtu.be/8GNc4Pz4is4
Published 4 months ago
0 likes 664 watched 1 commented