Get URL Params (Next.js 13)

There are 3 different variants of params params (/blog/1) single params multiple params searchParams (/blog?postId=123) single search params multiple search params Both params and searchParams (/blog/1?postId=123) There are multiple ways to handle this For params – useParams() ‘use client’ import { useParams } from ‘next/navigation’ export default function ExampleClientComponent() { const params = useParams() // … Read more

How to get the path of a URL?

You want something like this: String path = new URL(“http://www.costo.com/test1/test2”).getPath(); Actually that’ll give you /test1/test2. You’ll just have to remove the first / to get what you want: path = path.replaceFirst(“https://stackoverflow.com/”, “”); Now you’ll have test1/test2 in path.

PathLocationStrategy vs HashLocationStrategy in web apps

For me the main difference is that the PathLocationStrategy requires a configuration on the server side to all the paths configured in @RouteConfig to be redirected to the main HTML page of your Angular2 application. Otherwise you will have some 404 errors when trying to reload your application in the browser or try to access … Read more

Google spreadsheet direct download link for only ONE sheet as excel

You can download a specific sheet using the ‘GID’. Each sheet has a GID, you can find GID of specific sheet in the URL of spreadsheet. Then you can use this link to download specific sheet – https://docs.google.com/spreadsheets/d/<KEY>/export?format=xlsx&gid=<GID> ex: https://docs.google.com/spreadsheets/d/1D5vzPaOJOx402RAEF41235qQTOs28_M51ee5glzPzj0/export?format=xlsx&gid=1990092150 KEY is the unique ID of the spreadsheet. source: https://www.quora.com/How-do-I-download-just-one-sheet-from-google-spreadsheet/answer/Ranjith-Kumar-339?srid=2YCg

Call Javascript function from a URL

There isn’t from a hyperlink, no. Not unless the page has script inside specifically for this and it’s checking for some parameter….but for your question, no, there’s no built-in support in browsers for this. There are however bookmarklets you can bookmark to quickly run JavaScript functions from your address bar; not sure if that meets … Read more

asp.net, url rewrite module and web.config

I was able to get this working in Visual Studio 2010. Start with Ruslan’s post here and download the 2.0 IntelliSense file. Then, just follow the directions he posted previously here. All I ended up doing was running the following command as Ruslan instructs: C:\download_directory\rewrite2_intellisense>cscript UpdateSchemaCache.js As Christoph points out in his comment, make sure … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)