<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3469866748059699775</id><updated>2026-10-15T10:19:30.012+03:00</updated><category term="SharePoint 2010"/><category term="Free Code"/><category term="moss 2007"/><category term="Adminstrator"/><category term="System"/><category term="Net"/><category term="JavaScript"/><category term="WebPart"/><category term="PowerShell"/><category term="SharePoint 2013"/><category term="Central Administration"/><category term="SharePoint Designer"/><category term="stsadm"/><category term="SQL"/><category term="Search"/><category term="TypeScript"/><category term="Framework 4"/><category term="Accessibility"/><category term="Anonymous"/><category term="Database"/><category term="Shared Service"/><category term="NextJs"/><category term="React"/><category term="SharePoint 2016"/><category term="Angular"/><category term="Client Object Model"/><category term="IE"/><category term="List Definition"/><category term="NativeScript"/><category term="NodeJS"/><category term="infopath"/><category term="npm"/><category term="HTML5"/><category term="IIS"/><category term="Liferay"/><category term="Payload CMS"/><category term="Rauct.Vue"/><category term="SharePoint 15"/><category term="SharePoint 2019"/><category term="presentation"/><title type='text'>I will Share my Point</title><subtitle type='html'>A blog that shows my point of view to  ASP.Net / NextJs / Node /  JavaScript/ React / SharePoint / PowerShell and more. I explain the Development, Implementation and the System.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>121</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-3652718001618876803</id><published>2026-09-08T12:19:40.810+03:00</published><updated>2026-09-08T12:39:56.197+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NextJs"/><category scheme="http://www.blogger.com/atom/ns#" term="Payload CMS"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>Why Your Payload CMS Docker Build Fails on MongoDB (and Why It Should Never Need It)</title><content type='html'>&lt;p&gt;If you deploy a Next.js + Payload CMS site as a Docker image, sooner or later you will meet this error in your build logs:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;Error: &lt;/span&gt;missing secret key. A secret key is needed to secure Payload.
  payloadInitError: true
&amp;gt; Build error occurred
&lt;span class=&quot;hljs-keyword&quot;&gt;Error: &lt;/span&gt;Failed to collect page data for /posts/[slug]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And if you &quot;fix&quot; that with a dummy secret, its sibling shows up right behind it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;ERROR: &lt;/span&gt;cannot connect to MongoDB. Details: Invalid scheme, expected connection
string to start with &quot;mongodb://&quot; or &quot;mongodb+srv://&quot;
&lt;span class=&quot;hljs-keyword&quot;&gt;Error &lt;/span&gt;occurred prerendering page &quot;/&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The confusing part: your app works perfectly in development, and the database is up and healthy in production. So why does &lt;em&gt;building an image&lt;/em&gt; want to talk to MongoDB at all?&lt;/p&gt;
&lt;p&gt;To answer that, we need to look at what Next.js and Payload each do — and at exactly &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;where&lt;/em&gt; your code runs.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRhPmhflpgCRIvXiYVAP8tJqxSrSgh3QB1dhpdvDIvc8CL4vG-vsf_nNOqFkViVwl6lBcCZiidoC8IzCM9HtfocTE8xUotmCliSplb6DVPctKM1bfioubxCczrWbZRJBvggILzn6edRDe0APoY-JOQAhCskMBD5PoHb6XSPHRc7urxid-7s7SN2Pjk_qI/s956/payload-docker-icon.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;559&quot; data-original-width=&quot;956&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRhPmhflpgCRIvXiYVAP8tJqxSrSgh3QB1dhpdvDIvc8CL4vG-vsf_nNOqFkViVwl6lBcCZiidoC8IzCM9HtfocTE8xUotmCliSplb6DVPctKM1bfioubxCczrWbZRJBvggILzn6edRDe0APoY-JOQAhCskMBD5PoHb6XSPHRc7urxid-7s7SN2Pjk_qI/s320/payload-docker-icon.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h2 id=&quot;part-1-the-cast-of-characters&quot;&gt;Part 1: The cast of characters&lt;/h2&gt;
&lt;h3 id=&quot;next-js-is-not-just-a-compiler&quot;&gt;Next.js is not just a compiler&lt;/h3&gt;
&lt;p&gt;When you run &lt;code&gt;next build&lt;/code&gt;, two very different things happen:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Compilation&lt;/strong&gt; — TypeScript and React are bundled into optimized server and client code. This is what most people picture when they hear &quot;build&quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Static generation (prerendering)&lt;/strong&gt; — Next.js then &lt;em&gt;executes&lt;/em&gt; parts of your application. Any page that can be rendered ahead of time (SSG/ISR) is rendered &lt;em&gt;right there in the build&lt;/em&gt;, and the resulting HTML is baked into the output. To do that, Next.js runs your &lt;code&gt;generateStaticParams&lt;/code&gt; functions, your layouts, and the page components themselves.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Step 2 is the one that surprises people. Building a Next.js app is not a passive transformation of source code — &lt;strong&gt;your application code runs during the build&lt;/strong&gt;, including any data fetching those pages do.&lt;/p&gt;
&lt;h3 id=&quot;payload-cms-lives-inside-your-next-js-app&quot;&gt;Payload CMS lives inside your Next.js app&lt;/h3&gt;
&lt;p&gt;Payload 3 is a &quot;Next-native&quot; CMS: it isn&#39;t a separate service you call over HTTP, it&#39;s a library mounted &lt;em&gt;inside&lt;/em&gt; your Next.js project. The admin panel is a route in your app, and your pages fetch content through Payload&#39;s &lt;strong&gt;Local API&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;lang-ts&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;const&lt;/span&gt; payload = await getPayload({ &lt;span class=&quot;hljs-built_in&quot;&gt;config&lt;/span&gt;: configPromise })
&lt;span class=&quot;hljs-keyword&quot;&gt;const&lt;/span&gt; posts = await payload.&lt;span class=&quot;hljs-built_in&quot;&gt;find&lt;/span&gt;({ collection: &lt;span class=&quot;hljs-string&quot;&gt;&#39;posts&#39;&lt;/span&gt;, ... })
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is fantastic for DX — no network hop, full type safety, one deployment unit. But &lt;code&gt;getPayload()&lt;/code&gt; &lt;em&gt;initializes the CMS&lt;/em&gt;: it validates that &lt;code&gt;PAYLOAD_SECRET&lt;/code&gt; is set (it signs auth tokens with it) and connects Mongoose to &lt;code&gt;DATABASE_URL&lt;/code&gt;. No secret → it throws. No reachable MongoDB → it throws.&lt;/p&gt;
&lt;h3 id=&quot;put-the-two-together&quot;&gt;Put the two together&lt;/h3&gt;
&lt;p&gt;Now connect the dots:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;next build&lt;/code&gt; &lt;strong&gt;executes&lt;/strong&gt; pages and &lt;code&gt;generateStaticParams&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Those call &lt;code&gt;payload.find(...)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;payload.find(...)&lt;/code&gt; initializes Payload, which demands a secret and a live MongoDB.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So a completely standard Payload project has an implicit, easy-to-miss requirement: &lt;strong&gt;&lt;code&gt;next build&lt;/code&gt; needs a database connection.&lt;/strong&gt; In development you never notice, because your &lt;code&gt;.env&lt;/code&gt; and local MongoDB are always there. The build &quot;just works&quot; — for the wrong reason.&lt;/p&gt;
&lt;p&gt;And it&#39;s rarely just one page. In our project the build-time database touchpoints were:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code that runs during &lt;code&gt;next build&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;What it queries&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;generateStaticParams&lt;/code&gt; (3 dynamic routes)&lt;/td&gt;
&lt;td&gt;page and post slugs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prerendering &lt;code&gt;/&lt;/code&gt; and &lt;code&gt;/posts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;page content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The &lt;strong&gt;root layout&lt;/strong&gt; + its metadata&lt;/td&gt;
&lt;td&gt;header, footer, site-settings globals&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;That last row is the killer: the root layout wraps &lt;em&gt;every&lt;/em&gt; page. Even if all your content routes were dynamic, prerendering something as innocent as the 404 page still renders the layout — which fetches globals — which initializes Payload.&lt;/p&gt;
&lt;h2 id=&quot;part-2-the-crime-scene-building-in-ci-running-in-ecs&quot;&gt;Part 2: The crime scene — building in CI, running in ECS&lt;/h2&gt;
&lt;p&gt;Here&#39;s the question I asked when I first hit this: &lt;em&gt;&quot;My container runs on ECS in AWS, right next to the database. Why is the build failing on MongoDB?&quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Because &lt;strong&gt;the build doesn&#39;t happen on ECS.&lt;/strong&gt; The image is built in a completely different world than the one it runs in:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;┌──────────────────────────────┐        ┌──────────────────────────────┐
│  BUILD TIME                  │        │  RUN TIME                    │
│  GitHub Actions runner       │  push  │  AWS ECS (Fargate/EC2)       │
│                              │ ─────► │                              │
│  • ephemeral VM, outside     │  ECR   │  • inside your VPC           │
│    your VPC                  │        │  • security groups allow     │
│  • &lt;span class=&quot;hljs-literal&quot;&gt;no&lt;/span&gt; route &lt;span class=&quot;hljs-keyword&quot;&gt;to&lt;/span&gt; MongoDB /     │        │    MongoDB / DocumentDB      │
│    DocumentDB / Atlas        │        │  • secrets injected &lt;span class=&quot;hljs-keyword&quot;&gt;from&lt;/span&gt;     │
│  • &lt;span class=&quot;hljs-literal&quot;&gt;no&lt;/span&gt; secrets (&lt;span class=&quot;hljs-keyword&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;hljs-literal&quot;&gt;it&lt;/span&gt; must   │        │    Secrets Manager / SSM     │
│    stay &lt;span class=&quot;hljs-literal&quot;&gt;that&lt;/span&gt; way)            │        │    as env vars               │
└──────────────────────────────┘        └──────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This split isn&#39;t an accident you should work around — it&#39;s the whole point of containers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A Docker image is an immutable artifact.&lt;/strong&gt; You build it once, in CI, and the &lt;em&gt;same bytes&lt;/em&gt; run in staging and production. If the build needed the production database, &quot;build once, run anywhere&quot; would be a lie — the artifact would be entangled with one environment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The CI runner can&#39;t reach your database — by design.&lt;/strong&gt; A GitHub Actions runner is an ephemeral VM on GitHub&#39;s infrastructure, outside your VPC. Your DocumentDB/Atlas instance (hopefully!) doesn&#39;t accept connections from arbitrary internet IPs. Opening your database&#39;s security group to CI runners so that &lt;em&gt;a compile step&lt;/em&gt; can pass would be a security hole with a build log for a receipt.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secrets don&#39;t belong in builds.&lt;/strong&gt; Anything present at build time can leak into image layers or build logs, and images get pushed to registries and cached on machines. That&#39;s why the runtime pattern exists: ECS injects &lt;code&gt;PAYLOAD_SECRET&lt;/code&gt; and &lt;code&gt;DATABASE_URL&lt;/code&gt; from Secrets Manager into the container&#39;s environment &lt;em&gt;when it starts&lt;/em&gt; — never before.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So the real diagnosis isn&#39;t &quot;CI is misconfigured, it can&#39;t see MongoDB&quot;. It&#39;s the opposite: &lt;strong&gt;CI is correctly isolated, and the build process was wrong to want a database in the first place.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;part-3-the-fix-a-build-that-needs-nothing&quot;&gt;Part 3: The fix — a build that needs nothing&lt;/h2&gt;
&lt;h3 id=&quot;the-main-move-compile-only-builds&quot;&gt;The main move: compile-only builds&lt;/h3&gt;
&lt;p&gt;Next.js can split its two build phases. The flag:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;lang-dockerfile&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;RUN&lt;/span&gt;&lt;span class=&quot;bash&quot;&gt; PAYLOAD_SECRET=build-placeholder \
    pnpm &lt;span class=&quot;hljs-built_in&quot;&gt;exec&lt;/span&gt; next build --experimental-build-mode compile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;--experimental-build-mode compile&lt;/code&gt; performs compilation &lt;strong&gt;and skips static generation entirely&lt;/strong&gt;. No page code executes, so &lt;code&gt;getPayload()&lt;/code&gt; is never called, so no secret and no MongoDB are needed. The build becomes &lt;em&gt;hermetic&lt;/em&gt;: it depends on your source code and your lockfile, nothing else.&lt;/p&gt;
&lt;p&gt;The trade-off is honest and small: the image ships &lt;strong&gt;no prerendered HTML&lt;/strong&gt;. Every route renders on its first request — where the real database is available — and is then cached according to its own caching/revalidation rules. For a CMS-driven site this is barely a trade-off at all: your content changes at runtime anyway, and your prerendered pages were only as fresh as the last deploy.&lt;/p&gt;
&lt;p&gt;Two details worth copying:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The placeholder &lt;code&gt;PAYLOAD_SECRET&lt;/code&gt; is scoped to the single &lt;code&gt;RUN&lt;/code&gt; command, so it&#39;s never stored in an image layer (Docker&#39;s linter will rightly complain about &lt;code&gt;ENV PAYLOAD_SECRET=...&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;If you use &lt;code&gt;next-sitemap&lt;/code&gt; via a &lt;code&gt;postbuild&lt;/code&gt; script, call it explicitly — npm&#39;s &lt;code&gt;postbuild&lt;/code&gt; hook only fires after &lt;code&gt;npm run build&lt;/code&gt;, not after a direct &lt;code&gt;next build&lt;/code&gt; invocation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;defense-in-depth-make-the-code-tolerate-a-missing-database&quot;&gt;Defense in depth: make the code tolerate a missing database&lt;/h3&gt;
&lt;p&gt;The compile flag fixes Docker, but I also hardened the app so that even a &lt;em&gt;full&lt;/em&gt; &lt;code&gt;next build&lt;/code&gt; survives without a database. Two patterns:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. &lt;code&gt;generateStaticParams&lt;/code&gt; returns nothing instead of throwing:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;lang-ts&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;generateStaticParams&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;/span&gt;) &lt;/span&gt;{
  &lt;span class=&quot;hljs-keyword&quot;&gt;try&lt;/span&gt; {
    &lt;span class=&quot;hljs-keyword&quot;&gt;const&lt;/span&gt; payload = &lt;span class=&quot;hljs-keyword&quot;&gt;await&lt;/span&gt; getPayload({ &lt;span class=&quot;hljs-attr&quot;&gt;config&lt;/span&gt;: configPromise })
    &lt;span class=&quot;hljs-keyword&quot;&gt;const&lt;/span&gt; posts = &lt;span class=&quot;hljs-keyword&quot;&gt;await&lt;/span&gt; payload.find({ &lt;span class=&quot;hljs-attr&quot;&gt;collection&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot;&gt;&#39;posts&#39;&lt;/span&gt;, &lt;span class=&quot;hljs-attr&quot;&gt;select&lt;/span&gt;: { &lt;span class=&quot;hljs-attr&quot;&gt;slug&lt;/span&gt;: &lt;span class=&quot;hljs-literal&quot;&gt;true&lt;/span&gt; } })
    &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; posts.docs.map(&lt;span class=&quot;hljs-function&quot;&gt;(&lt;span class=&quot;hljs-params&quot;&gt;{ slug }&lt;/span&gt;) =&amp;gt;&lt;/span&gt; ({ slug }))
  } &lt;span class=&quot;hljs-keyword&quot;&gt;catch&lt;/span&gt; (error) {
    &lt;span class=&quot;hljs-comment&quot;&gt;// No database at build time — skip prerendering; these routes&lt;/span&gt;
    &lt;span class=&quot;hljs-comment&quot;&gt;// render on demand at runtime (dynamicParams is on by default).&lt;/span&gt;
    &lt;span class=&quot;hljs-built_in&quot;&gt;console&lt;/span&gt;.warn(&lt;span class=&quot;hljs-string&quot;&gt;&#39;skipping prerender:&#39;&lt;/span&gt;, error)
    &lt;span class=&quot;hljs-keyword&quot;&gt;return&lt;/span&gt; []
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;2. Shared data fetchers defer the route to request time.&lt;/strong&gt; Next 15+ has &lt;code&gt;connection()&lt;/code&gt;: awaiting it during prerendering tells Next.js &quot;this route can&#39;t be static — render it per request&quot;, while at runtime it&#39;s a no-op. Wrapped around the layout&#39;s globals fetcher:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;lang-ts&quot;&gt;try {
  &lt;span class=&quot;hljs-built_in&quot;&gt;return&lt;/span&gt; await getCachedGlobal()
} &lt;span class=&quot;hljs-built_in&quot;&gt;catch&lt;/span&gt; (&lt;span class=&quot;hljs-built_in&quot;&gt;error&lt;/span&gt;) {
  await connection() // during build: defer route to request &lt;span class=&quot;hljs-built_in&quot;&gt;time&lt;/span&gt;
  &lt;span class=&quot;hljs-built_in&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot;&gt;error&lt;/span&gt;        // &lt;span class=&quot;hljs-built_in&quot;&gt;at&lt;/span&gt; runtime: &lt;span class=&quot;hljs-built_in&quot;&gt;real&lt;/span&gt; &lt;span class=&quot;hljs-built_in&quot;&gt;errors&lt;/span&gt; still &lt;span class=&quot;hljs-built_in&quot;&gt;surface&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One gotcha: &lt;code&gt;connection()&lt;/code&gt; is neutered under &lt;code&gt;export const dynamic = &#39;force-static&#39;&lt;/code&gt;, so a route that must be able to defer can&#39;t force staticness. (Another: dynamic APIs like &lt;code&gt;connection()&lt;/code&gt; aren&#39;t allowed &lt;em&gt;inside&lt;/em&gt; an &lt;code&gt;unstable_cache&lt;/code&gt; scope — call it outside the cached function.)&lt;/p&gt;
&lt;p&gt;With both layers, no environment — laptop, CI, Docker — depends on MongoDB being reachable at build time. When a database &lt;em&gt;is&lt;/em&gt; present, everything prerenders exactly as before.&lt;/p&gt;
&lt;h2 id=&quot;the-takeaways&quot;&gt;The takeaways&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;next build&lt;/code&gt; runs your code.&lt;/strong&gt; Any data fetching in prerenderable pages, &lt;code&gt;generateStaticParams&lt;/code&gt;, or the root layout becomes a &lt;em&gt;build-time dependency&lt;/em&gt;. Know your touchpoints — the layout is the sneaky one.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build and runtime are different environments on purpose.&lt;/strong&gt; CI has no VPC access and no secrets, and that&#39;s a feature. Don&#39;t punch holes; make the build hermetic instead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;next build --experimental-build-mode compile&lt;/code&gt;&lt;/strong&gt; is the one-line fix for Payload-in-Docker: no static generation, no Payload init, no MongoDB.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Never bake secrets into images.&lt;/strong&gt; A command-scoped placeholder for the build, real values injected by ECS at runtime.&lt;/li&gt;
&lt;li&gt;The error message says &quot;cannot connect to MongoDB&quot;, but the bug was never the connection — it was &lt;strong&gt;asking for one at the wrong time&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/3652718001618876803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2026/09/why-your-payload-cms-docker-build-fails.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/3652718001618876803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/3652718001618876803'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2026/09/why-your-payload-cms-docker-build-fails.html' title='Why Your Payload CMS Docker Build Fails on MongoDB (and Why It Should Never Need It)'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRhPmhflpgCRIvXiYVAP8tJqxSrSgh3QB1dhpdvDIvc8CL4vG-vsf_nNOqFkViVwl6lBcCZiidoC8IzCM9HtfocTE8xUotmCliSplb6DVPctKM1bfioubxCczrWbZRJBvggILzn6edRDe0APoY-JOQAhCskMBD5PoHb6XSPHRc7urxid-7s7SN2Pjk_qI/s72-c/payload-docker-icon.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-2000814326879361078</id><published>2025-08-05T16:49:00.000+03:00</published><updated>2025-08-05T16:49:33.015+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="NextJs"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><category scheme="http://www.blogger.com/atom/ns#" term="React"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>LLMs.txt Generator for Geographic AI</title><content type='html'>&lt;div&gt;
  &lt;span&gt;Hey all! 👋&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;
  &lt;span&gt;&lt;span face=&quot;ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, &#39;Helvetica Neue&#39;, Arial, &#39;Noto Sans&#39;, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;&quot;&gt;I&#39;ve created an NPM package called&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, &#39;Helvetica Neue&#39;, Arial, &#39;Noto Sans&#39;, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;&quot; style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;llms-txt-generator-geo-ai&lt;/span&gt;&lt;span face=&quot;ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, &#39;Helvetica Neue&#39;, Arial, &#39;Noto Sans&#39;, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;&quot;&gt;&amp;nbsp;that automatically generates&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;llms.txt&lt;/code&gt;&lt;span face=&quot;ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, &#39;Helvetica Neue&#39;, Arial, &#39;Noto Sans&#39;, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;, &#39;Noto Color Emoji&#39;&quot;&gt;&amp;nbsp;files for your projects. This is particularly useful for:&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;ul style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 24px; list-style: none; margin: 0px 0px 16px; overflow-wrap: break-word; padding: 0px 0px 0px 2em;&quot;&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;AI Training Control&lt;/span&gt;: Setting policies for how AI models can use our content&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Geographic Context&lt;/span&gt;: Adding location-specific information to our projects&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Compliance&lt;/span&gt;: Managing data collection and usage permissions&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;SEO &amp;amp; Crawlers&lt;/span&gt;: Controlling how different bots interact with our content&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;Why do we need llms.txt files?&lt;/span&gt;
&lt;/h2&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;Similar to how&amp;nbsp;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;robots.txt&lt;/code&gt;&amp;nbsp;controls web crawlers,&amp;nbsp;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;llms.txt&lt;/code&gt;&amp;nbsp;files help us:&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;&lt;/p&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
  &lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgsiZ1r85XWwNsrdttFOrECVSurPYSulwvmYbIyCLb6kZteWr61y-pvFhKEik5JAzQOEPWE7cV68QL7yE4l6qHUotgVyral081ZWX4Oau1SM7M8H3YYbQ034zvWG4ySijaXRl6885cc9w_f2WqRH5cngedM6Q8VOIosp8RCpYeVyJaJN2AbEspS6EqY83c&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;633&quot; data-original-width=&quot;294&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgsiZ1r85XWwNsrdttFOrECVSurPYSulwvmYbIyCLb6kZteWr61y-pvFhKEik5JAzQOEPWE7cV68QL7yE4l6qHUotgVyral081ZWX4Oau1SM7M8H3YYbQ034zvWG4ySijaXRl6885cc9w_f2WqRH5cngedM6Q8VOIosp8RCpYeVyJaJN2AbEspS6EqY83c=w185-h400&quot; width=&quot;185&quot; /&gt;&lt;/span&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 24px; list-style: none; margin: 0px 0px 16px; overflow-wrap: break-word; padding: 0px 0px 0px 2em;&quot;&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Control which parts of our content AI models can train on&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Set clear attribution requirements&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Specify geographic context for location-based applications&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Define data usage policies for compliance&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;Quick Start Guide&lt;/span&gt;
&lt;/h2&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;1. Installation&lt;/span&gt;
&lt;/h3&gt;
&lt;pre style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: #f6f8fa; border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;code class=&quot;language-bash&quot; style=&quot;--tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 1em;&quot;&gt;&lt;span style=&quot;color: #24292e;&quot;&gt;
npm install llms-txt-generator-geo-ai
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;2. Generate your first llms.txt&lt;/span&gt;
&lt;/h3&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;After installation, it automatically creates a config file. Just run:&lt;/span&gt;
&lt;/p&gt;
&lt;pre style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: #f6f8fa; border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;code class=&quot;language-bash&quot; style=&quot;--tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 1em;&quot;&gt;&lt;span style=&quot;color: #24292e;&quot;&gt;
npm run llms-txt-generator-geo-ai
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;3. Customize your configuration&lt;/span&gt;
&lt;/h3&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;Edit the auto-generated&amp;nbsp;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;llms-txt.config.js&lt;/code&gt;&amp;nbsp;(or&amp;nbsp;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;.ts&lt;/code&gt;) file:&lt;/span&gt;
&lt;/p&gt;
&lt;pre style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: #f6f8fa; border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;code class=&quot;language-javascript&quot; style=&quot;--tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 1em;&quot;&gt;&lt;span style=&quot;color: #24292e;&quot;&gt;
module.exports = {

  geoData: {

    location: &quot;Your Office Location&quot;,

    coordinates: &quot;lat, lng&quot;,

    country: &quot;Your Country&quot;,

    region: &quot;Your Region&quot;,

    timezone: &quot;Your/Timezone&quot;,

    additionalInfo: &quot;Project description&quot;,

    requestAttribution: &quot;Yes&quot;, // Require attribution

    allowTraining: &quot;No&quot;,       // Don&#39;t allow AI training

    allowDataCollection: &quot;No&quot;, // No data collection

    contact: &quot;your-email@company.com&quot;

  },

  outputDir: &quot;./&quot;,

  filename: &quot;llms.txt&quot;

};
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;Use Cases for Our Team&lt;/span&gt;
&lt;/h2&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;1.&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Client Projects&lt;/span&gt;&lt;/span&gt;
&lt;/h3&gt;
&lt;ul style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 24px; list-style: none; margin: 0px 0px 16px; overflow-wrap: break-word; padding: 0px 0px 0px 2em;&quot;&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Add geographic context for location-based apps&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Set clear AI training policies&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Ensure compliance with data protection requirements&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;2.&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Internal Tools&lt;/span&gt;&lt;/span&gt;
&lt;/h3&gt;
&lt;ul style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 24px; list-style: none; margin: 0px 0px 16px; overflow-wrap: break-word; padding: 0px 0px 0px 2em;&quot;&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Standardize how our tools handle AI interactions&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Document geographic scope of applications&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;Set consistent data usage policies&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;3.&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;React Applications&lt;/span&gt;&lt;/span&gt;
&lt;/h3&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;You can even use it as a React component:&lt;/span&gt;
&lt;/p&gt;
&lt;pre style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: #f6f8fa; border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;code class=&quot;language-tsx&quot; style=&quot;--tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 1em;&quot;&gt;&lt;span style=&quot;color: #24292e;&quot;&gt;
import { LLMSGenerator } from &quot;llms-txt-generator-geo-ai/dist/components/LLMSGenerator&quot;;



// Use in your React app for dynamic generation
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 1.2em; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;4.&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Next.js Projects&lt;/span&gt;&lt;/span&gt;
&lt;/h3&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;Perfect for Next.js apps - just configure the output to&amp;nbsp;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;./public&lt;/code&gt;:&lt;/span&gt;
&lt;/p&gt;
&lt;pre style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: #f6f8fa; border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;code class=&quot;language-javascript&quot; style=&quot;--tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 1em;&quot;&gt;&lt;span style=&quot;color: #24292e;&quot;&gt;
module.exports = {

  // ... your config

  outputDir: &quot;./public&quot;,  // Serves at yoursite.com/llms.txt

};
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;What the generated file looks like&lt;/span&gt;
&lt;/h2&gt;
&lt;pre style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: #f6f8fa; border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 1.45; margin: 0px 0px 16px; overflow-wrap: normal; overflow: auto; padding: 16px; word-break: normal;&quot;&gt;&lt;code style=&quot;--tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 1em;&quot;&gt;&lt;span style=&quot;color: #24292e;&quot;&gt;
# LLMs.txt for GEO



## Geographic Information

Location: San Francisco, CA

Coordinates: 37.7749, -122.4194

Country: United States

Region: California

Timezone: America/Los_Angeles



## Generated Information

Generated at: 2024-01-15T10:30:00.000Z

Generator: llms-txt-generator-geo-ai



## Additional Data

Allow-Training: No

Allow-Data-Collection: No

Contact: team@ourcompany.com



## user-agent rules

User-agent: *

Disallow: /private/

Disallow: /admin/



User-agent: OpenAI

Disallow: /private/
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;Benefits for Our Workflow&lt;/span&gt;
&lt;/h2&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;✅&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Automated&lt;/span&gt;: No manual file creation&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;✅&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Type-Safe&lt;/span&gt;: Full TypeScript support&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;✅&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Consistent&lt;/span&gt;: Standardized format across projects&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;✅&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Flexible&lt;/span&gt;: Works with JavaScript, TypeScript, React, Next.js&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;✅&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Compliant&lt;/span&gt;: Helps with data protection requirements&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;✅&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Geographic&lt;/span&gt;: Perfect for location-based applications&lt;/span&gt;
&lt;/p&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;When to Use This&lt;/span&gt;
&lt;/h2&gt;
&lt;ul style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 24px; list-style: none; margin: 0px 0px 16px; overflow-wrap: break-word; padding: 0px 0px 0px 2em;&quot;&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;New Projects&lt;/span&gt;: Add it to project setup checklist&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Client Work&lt;/span&gt;: Especially for geo-location apps&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Compliance&lt;/span&gt;: When we need clear AI/data policies&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
  &lt;li style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; line-height: 24px; list-style: initial; margin-top: 0.25em; overflow-wrap: break-word; text-align: left;&quot;&gt;
    &lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; margin: 0px 0px 16px;&quot;&gt;
      &lt;span&gt;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Public APIs&lt;/span&gt;: To set usage guidelines&lt;/span&gt;
    &lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;Repository &amp;amp; Documentation&lt;/span&gt;
&lt;/h2&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;📦&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Package&lt;/span&gt;:&amp;nbsp;&lt;code style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; background-color: rgba(27, 31, 35, 0.05); border-radius: 6px; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, monospace; font-size: 13.6px; line-height: 20.4px; margin: 0px; overflow-wrap: break-word; padding: 0.2em 0.4em;&quot;&gt;&lt;a href=&quot;https://www.npmjs.com/package/llms-txt-generator-geo-ai&quot;&gt;llms-txt-generator-geo-ai&lt;/a&gt;&lt;/code&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;🔗&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;GitHub&lt;/span&gt;:&amp;nbsp;&lt;a href=&quot;https://github.com/roi-kol/geoAI&quot; style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; cursor: pointer; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 24px; overflow-wrap: break-word; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://github.com/roi-kol/geoAI&lt;/a&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;📖&amp;nbsp;&lt;span style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-weight: bolder;&quot;&gt;Full Docs&lt;/span&gt;: See README.md for complete API reference&lt;/span&gt;
&lt;/p&gt;
&lt;h2 style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border-color: rgb(229, 229, 229) rgb(229, 229, 229) rgb(234, 236, 239); border-image: initial; border-style: solid; border-width: 0px 0px 1px; box-sizing: border-box; font-family: -apple-system, system-ui, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; line-height: 1.25; margin: 24px 0px 16px; overflow-wrap: break-word; padding-bottom: 0.3em;&quot;&gt;
  &lt;span&gt;Questions?&lt;/span&gt;
&lt;/h2&gt;
&lt;p style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; margin: 0px 0px 16px;&quot;&gt;
  &lt;span&gt;Feel free to reach out if you need help integrating this into your
    projects!&lt;/span&gt;&lt;em style=&quot;--tw-ring-color: rgba(59, 130, 246, 0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; border: 0px solid rgb(229, 229, 229); box-sizing: border-box;&quot;&gt;&lt;span&gt;&amp;nbsp;🚀&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/2000814326879361078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2025/08/llmstxt-generator-for-geographic-ai.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/2000814326879361078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/2000814326879361078'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2025/08/llmstxt-generator-for-geographic-ai.html' title='LLMs.txt Generator for Geographic AI'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgsiZ1r85XWwNsrdttFOrECVSurPYSulwvmYbIyCLb6kZteWr61y-pvFhKEik5JAzQOEPWE7cV68QL7yE4l6qHUotgVyral081ZWX4Oau1SM7M8H3YYbQ034zvWG4ySijaXRl6885cc9w_f2WqRH5cngedM6Q8VOIosp8RCpYeVyJaJN2AbEspS6EqY83c=s72-w185-h400-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-53707490931177775</id><published>2024-10-13T09:14:00.000+03:00</published><updated>2024-10-13T09:14:12.109+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NextJs"/><category scheme="http://www.blogger.com/atom/ns#" term="React"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>Creating a Responsive Image Component in Next.js with TypeScript</title><content type='html'>&lt;div&gt;&lt;div&gt;In this tutorial, we&#39;ll create a&amp;nbsp;&lt;b&gt;ResponsiveImg&amp;nbsp;&lt;/b&gt;component that uses the Next.js Image component for optimized&amp;nbsp;&lt;b&gt;image&amp;nbsp;&lt;/b&gt;rendering.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&amp;nbsp;

&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJPGvlxqQ4bT0AqpRfj9VHpvTHfF3mmBg7O40LHPAlZiNj5OpYBjGc7HF_u0pAhT8Q6KdrU_sEznrBs6povMaRtU2l4Pll2AgOFz3RTBT_D4g0ZirASwofewY3cSbEfJghU7vwYBhaweTv8Xlgcwxv7jh6ZIG_O7xg2X9x69lQExev6Tt5IQU-PchDsMY/s1920/image%20responsive.png&quot; style=&quot;display: block; padding: 1em 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;1920&quot; data-original-width=&quot;1080&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJPGvlxqQ4bT0AqpRfj9VHpvTHfF3mmBg7O40LHPAlZiNj5OpYBjGc7HF_u0pAhT8Q6KdrU_sEznrBs6povMaRtU2l4Pll2AgOFz3RTBT_D4g0ZirASwofewY3cSbEfJghU7vwYBhaweTv8Xlgcwxv7jh6ZIG_O7xg2X9x69lQExev6Tt5IQU-PchDsMY/s400/image%20responsive.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Introduction&lt;/h3&gt;&lt;div&gt;The &lt;b&gt;ResponsiveImg &lt;/b&gt;Component&lt;/div&gt;&lt;div&gt;The &lt;b&gt;ResponsiveImg &lt;/b&gt;component accepts properties for both mobile and desktop versions of the image. It uses the &lt;b&gt;useEffect &lt;/b&gt;and &lt;b&gt;useState &lt;/b&gt;hooks to determine the screen size and adjust the image properties accordingly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here&#39;s the complete code for the &lt;b&gt;ResponsiveImg &lt;/b&gt;component:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* ResponsiveImg component that renders an image which adapts to screen size.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* It uses the Next.js Image component for optimized image rendering.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@component&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{ResponsiveImgProps}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The properties for the ResponsiveImg component.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{Object}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.mobile&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The properties for the mobile version of the image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{string | StaticImport}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.mobile.src&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The source of the mobile image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{number}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.mobile.width&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The width of the mobile image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{number}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.mobile.height&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The height of the mobile image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{Object}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.desktop&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The properties for the desktop version of the image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{string | StaticImport}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.desktop.src&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The source of the desktop image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{number}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.desktop.width&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The width of the desktop image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{number}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.desktop.height&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The height of the desktop image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{string}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props.title&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - The alt text for the image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{string}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;[props.className]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - Additional class names for the image.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@param&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{boolean}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;[props.isFill&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;false]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; - Whether the image should fill its container.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@returns&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;{JSX.Element}&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt; The rendered ResponsiveImg component.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;@example&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &amp;lt;ResponsiveImg&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &amp;nbsp; mobile={{ src: &#39;/images/mobile.jpg&#39;, width: 300, height: 200 }}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &amp;nbsp; desktop={{ src: &#39;/images/desktop.jpg&#39;, width: 600, height: 400 }}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &amp;nbsp; title=&quot;Responsive Image&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &amp;nbsp; className=&quot;custom-class&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* &amp;nbsp; isFill={false}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;* /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;use client&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Image&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;next/image&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;useEffect&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;useState&lt;/span&gt; } &lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;react&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;ResponsiveImgProps&lt;/span&gt; } &lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;@/interfaces/basic&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;StaticImport&lt;/span&gt; } &lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;next/dist/shared/lib/get-img-props&quot;&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;ResponsiveImg&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;React&lt;/span&gt;.&lt;span style=&quot;color: #4ec9b0;&quot;&gt;FC&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;ResponsiveImgProps&lt;/span&gt;&amp;gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;) &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; [&lt;span style=&quot;color: #4fc1ff;&quot;&gt;isSmallScreen&lt;/span&gt;, &lt;span style=&quot;color: #dcdcaa;&quot;&gt;setIsSmallScreen&lt;/span&gt;] &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;useState&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;useEffect&lt;/span&gt;(() &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #569cd6;&quot;&gt;typeof&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;window&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;!==&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;undefined&#39;&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;setIsSmallScreen&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;window&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;innerWidth&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;768&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;handleResize&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; () &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;setIsSmallScreen&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;window&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;innerWidth&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #b5cea8;&quot;&gt;768&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;window&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;addEventListener&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;resize&quot;&lt;/span&gt;, &lt;span style=&quot;color: #dcdcaa;&quot;&gt;handleResize&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; () &lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;window&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;removeEventListener&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;resize&quot;&lt;/span&gt;, &lt;span style=&quot;color: #dcdcaa;&quot;&gt;handleResize&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; }, []);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;imgProps&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Omit&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;React&lt;/span&gt;.&lt;span style=&quot;color: #4ec9b0;&quot;&gt;ComponentProps&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #569cd6;&quot;&gt;typeof&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Image&lt;/span&gt;&amp;gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;src&quot;&lt;/span&gt;&amp;gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;amp;&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;StaticImport&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; } &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; (&lt;span style=&quot;color: #4fc1ff;&quot;&gt;isSmallScreen&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;mobile&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;desktop&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;) &lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;alt&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;title&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;className&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;className&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot; important-relative&quot;&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&lt;/span&gt;),&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;undefined&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;isSmallScreen&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;mobile&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;desktop&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;undefined&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;isSmallScreen&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;mobile&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;desktop&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;layout&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;fill&quot;&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;undefined&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;props&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;?&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;objectFit&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;contain&quot;&lt;/span&gt; } &lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;undefined&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; };&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; (&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;Image&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;imgProps&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; );&lt;/div&gt;&lt;div&gt;};&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The typescript interface :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;export&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;interface&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;ResponsiveImgProps&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;className&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;?:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;?:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;boolean&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;mobile&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;?:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;number&lt;/span&gt;; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;?:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;number&lt;/span&gt;; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;|&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;next/dist/shared/lib/get-img-props&quot;&lt;/span&gt;).&lt;span style=&quot;color: #4ec9b0;&quot;&gt;StaticImport&lt;/span&gt;;};&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;desktop&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;?:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;number&lt;/span&gt;; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;?:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;number&lt;/span&gt;; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt; &amp;nbsp;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;|&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;import&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;next/dist/shared/lib/get-img-props&quot;&lt;/span&gt;).&lt;span style=&quot;color: #4ec9b0;&quot;&gt;StaticImport&lt;/span&gt;;};&lt;/div&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Example Usage&lt;/h3&gt;&lt;div&gt;Let&#39;s see how we can use the &lt;b&gt;ResponsiveImg &lt;/b&gt;component in different parts of our application.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Example 1: 100%&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;ResponsiveImg&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;img 100%&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;className&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;h-48 w-full object-cover md:h-full md:w-48 justify-center&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;isFill&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{true}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;mobile&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;/images/mobile.png&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;desktop&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;/images/desktop.png&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Example 2: sizes&lt;/h4&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: grey;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;ResponsiveImg&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;title&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;change img size&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;className&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;inline-block&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;mobile&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;110&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;/images/master/negevMobileFooter.png&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;desktop&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;280&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;/images/master/footerNegevIcon.png&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Conclusion&lt;/h3&gt;&lt;div&gt;In this post, we&#39;ve created a &lt;b&gt;ResponsiveImg &lt;/b&gt;component that adapts to different screen sizes by changing the image source and dimensions. This component leverages the power of Next.js and TypeScript to provide optimized and type-safe image rendering.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Feel free to use and modify this component in your projects to enhance the responsiveness of your web applications.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Happy coding!&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Roi&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/53707490931177775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/10/creating-responsive-image-component-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/53707490931177775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/53707490931177775'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/10/creating-responsive-image-component-in.html' title='Creating a Responsive Image Component in Next.js with TypeScript'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJPGvlxqQ4bT0AqpRfj9VHpvTHfF3mmBg7O40LHPAlZiNj5OpYBjGc7HF_u0pAhT8Q6KdrU_sEznrBs6povMaRtU2l4Pll2AgOFz3RTBT_D4g0ZirASwofewY3cSbEfJghU7vwYBhaweTv8Xlgcwxv7jh6ZIG_O7xg2X9x69lQExev6Tt5IQU-PchDsMY/s72-c/image%20responsive.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-8499395695993426360</id><published>2024-07-28T15:18:00.000+03:00</published><updated>2024-07-28T15:18:43.439+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NodeJS"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>try...finally in JavaScript and TypeScript</title><content type='html'>&lt;p&gt;&amp;nbsp;In JavaScript, you can use &lt;b&gt;try...finally&lt;/b&gt; to ensure that certain cleanup code runs regardless of whether an error occurs. This is useful for releasing resources like memory, files, or network connections.&lt;/p&gt;&lt;p&gt;Example: Using try...finally for Cleanup Here&#39;s an example of how you might use &lt;b&gt;try...finally&lt;/b&gt; to ensure that a file is closed after it has been read, regardless of whether an error occurs during the reading process:&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;fs&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFile&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;openSync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;r&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;alloc&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;1024&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;readSync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;toString&lt;/span&gt;());&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;onsole&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Error reading file:&#39;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;finally&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;!==&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;undefined&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;closeSync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt;); &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;File closed&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFile&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;example.txt&#39;&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;try...finally in TypeScript&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fs&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;fs&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFile&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;void&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;number&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;undefined&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;openSync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;r&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;alloc&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;1024&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;readSync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;toString&lt;/span&gt;());&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Error reading file:&#39;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; } &lt;span style=&quot;color: #c586c0;&quot;&gt;finally&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;!==&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;undefined&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;closeSync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileDescriptor&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;File closed&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFile&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;example.txt&#39;&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When to &lt;b&gt;Avoid &lt;/b&gt;Using &lt;b&gt;try...finally&lt;/b&gt; Asynchronous Code: try...finally blocks do not work as expected with asynchronous code. For asynchronous operations, you should use async...await with try...catch and ensure cleanup in the finally block. Performance: Overusing try...finally can lead to performance overhead. Use it judiciously, especially in performance-critical sections of your code. Example: Asynchronous Cleanup For asynchronous operations, you can use async...await with try...finally:&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;fs&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;fs&#39;&lt;/span&gt;).&lt;span style=&quot;color: #9cdcfe;&quot;&gt;promises&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFileAsync&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;r&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;alloc&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;1024&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;read&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;toString&lt;/span&gt;());&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Error reading file:&#39;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;finally&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;close&lt;/span&gt;(); &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;File closed&#39;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFileAsync&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;example.txt&#39;&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;In TypeScript&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;promises&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fs&lt;/span&gt; } &lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt; &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;fs&#39;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFileAsync&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Promise&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;any&lt;/span&gt;&amp;gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #4ec9b0;&quot;&gt;FileHandle&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;undefined&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;fs&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;open&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;r&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;alloc&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;1024&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;read&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;length&lt;/span&gt;, &lt;span style=&quot;color: #b5cea8;&quot;&gt;0&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;buffer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;toString&lt;/span&gt;());&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Error reading file:&#39;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;finally&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;fileHandle&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;close&lt;/span&gt;(); &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;File closed&#39;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;readFileAsync&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;example.txt&#39;&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;Fetch &lt;/b&gt;Example in &lt;b&gt;TypeScript &lt;/b&gt;If you are working with network requests using fetch, you can also use try...finally to ensure any necessary cleanup or final steps are performed.&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;fetchData&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;)&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Promise&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;any&lt;/span&gt;&amp;gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Response&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;|&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;undefined&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;fetch&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;url&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #d4d4d4;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;ok&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;throw&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;`HTTP error! status: &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #4fc1ff;&quot;&gt;data&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;json&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;data&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; } &lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Error fetching data:&#39;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;finally&lt;/span&gt; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;Fetch operation completed&#39;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;fetchData&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;https://your.api.com/data&#39;&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQdwnaR_4UWXlT4I7pW8_3tpRzlbucX5J0KKe6iomO__LsR_KODgt0XtdzItK4TJ2fP6uYBOmlSRsdgE1qgBm82io5v2YqucSEKTykcBjEp9we7QtLP3R_NZ2wFmZdtM-PtNXcPLIM6F_W7GuHvcvG6n99ChVPTBFsNI24D7-bHrc2cWYpo96hyM9ATi8&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;384&quot; data-original-width=&quot;634&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhQdwnaR_4UWXlT4I7pW8_3tpRzlbucX5J0KKe6iomO__LsR_KODgt0XtdzItK4TJ2fP6uYBOmlSRsdgE1qgBm82io5v2YqucSEKTykcBjEp9we7QtLP3R_NZ2wFmZdtM-PtNXcPLIM6F_W7GuHvcvG6n99ChVPTBFsNI24D7-bHrc2cWYpo96hyM9ATi8=w400-h243&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;text-align: left;&quot;&gt;try - finally&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Summary&lt;/h4&gt;&lt;p&gt;Use &lt;b&gt;try...finally&lt;/b&gt; to ensure cleanup code runs regardless of errors.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Avoid &lt;/b&gt;using try...finally with asynchronous code; instead, use &lt;b&gt;async&lt;/b&gt;...&lt;b&gt;await &lt;/b&gt;with &lt;b&gt;try...catch and finally&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;Ensure proper resource management to &lt;b&gt;avoid memory leaks&lt;/b&gt; or other issues&amp;nbsp;&lt;/p&gt;&lt;p&gt;Be mindful of &lt;b&gt;performance &lt;/b&gt;when using try...finally blocks.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/8499395695993426360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/07/tryfinally-in-javascript-and-typescript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/8499395695993426360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/8499395695993426360'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/07/tryfinally-in-javascript-and-typescript.html' title='try...finally in JavaScript and TypeScript'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEhQdwnaR_4UWXlT4I7pW8_3tpRzlbucX5J0KKe6iomO__LsR_KODgt0XtdzItK4TJ2fP6uYBOmlSRsdgE1qgBm82io5v2YqucSEKTykcBjEp9we7QtLP3R_NZ2wFmZdtM-PtNXcPLIM6F_W7GuHvcvG6n99ChVPTBFsNI24D7-bHrc2cWYpo96hyM9ATi8=s72-w400-h243-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-7632759764274134351</id><published>2024-07-18T10:27:00.004+03:00</published><updated>2024-07-18T10:27:58.302+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="NextJs"/><category scheme="http://www.blogger.com/atom/ns#" term="NodeJS"/><category scheme="http://www.blogger.com/atom/ns#" term="React"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>Hashing password in Next JS  against rainbow table attacks with a salt for login page</title><content type='html'>&lt;p&gt;If you want to send a username and password to the server side in &lt;b&gt;nextJs &lt;/b&gt;and check if it is correct to continue the identification process.&lt;/p&gt;&lt;p&gt;In this article I will explain how and explain why it is important to add salt to a salad 😁&lt;/p&gt;&lt;p&gt;First I will explain why hashing passwords with a &lt;b&gt;salt &lt;/b&gt;is an effective defense against &lt;b&gt;rainbow table attacks&lt;/b&gt;. Here&#39;s why:&lt;/p&gt;&lt;p&gt;&lt;b&gt;Rainbow Tables Explained&lt;/b&gt;: A rainbow table is a precomputed table for reversing cryptographic hash functions, primarily used for cracking password hashes. Suppose an attacker has a database of hashed passwords obtained from a compromised system. If these passwords were hashed without a salt, the attacker could use a rainbow table to look up the hash values and find the corresponding plaintext passwords. Rainbow tables are feasible because they can be precomputed for all possible plaintext passwords up to a certain length and complexity.&lt;/p&gt;&lt;p&gt;&lt;b&gt;The Role of Salt&lt;/b&gt;: A salt is a random value that is added to the password before it is hashed. The salt is unique for each password; even if two users have the same password, their hashed passwords will be different because of the unique salts. When the password is stored, it is stored along with its salt.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Defeating Rainbow Tables&lt;/b&gt;: Since the salt is unique for each password, it effectively makes precomputed rainbow tables useless. An attacker cannot feasibly precompute a rainbow table for every possible salt; the number of possible salts (often 128-bit or more) makes the number of required rainbow tables astronomically high. For each unique salt, an entirely new rainbow table would need to be generated, requiring immense computational resources and storage.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Salting in Practice&lt;/b&gt;: When a password is salted and hashed, the salt is stored alongside the hash in the database. When a user attempts to log in, the system retrieves the salt for that user&#39;s password, adds it to the submitted password, and hashes the result. If the resulting hash matches the stored hash, the password is correct. This process ensures that even if two users have the same password, their stored hashes will be different due to the unique salts.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Additional Security with Work Factors&lt;/b&gt;: Modern hashing algorithms like bcrypt also incorporate a work factor (or cost factor), which is a measure of how computationally intensive the hashing process is. This slows down the hashing process deliberately, making brute-force attacks more time-consuming and difficult to execute.&lt;/p&gt;&lt;p&gt;In summary, salting passwords before hashing them protects against rainbow table attacks by ensuring that each password hash is unique, even if the original passwords are not. This uniqueness prevents attackers from using precomputed tables to reverse the hash values, significantly enhancing the security of stored passwords/&lt;/p&gt;&lt;p&gt;To securely hash passwords in a Next.js application, where the server-side is Node.js, you can use the &lt;a href=&quot;https://www.npmjs.com/package/bcrypt&quot; target=&quot;_blank&quot;&gt;bcrypt library&lt;/a&gt;. This process should happen on the server-side to ensure the plaintext password is never exposed. Here&#39;s a step-by-step guide:&lt;/p&gt;&lt;p&gt;Install bcrypt: First, you need to install bcrypt in your project. Run the following command in your terminal:&lt;/p&gt;&lt;div&gt;&lt;i&gt;npm i bcrypt&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Create an API Route for Registration: In your Next.js project, create an API route that will handle the registration process. This is where you&#39;ll hash the password.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hash the Password: Inside your API route, use bcrypt to hash the password before saving it to your database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 1&lt;/b&gt;: Create an API Route Create a file under pages/api/auth/register.ts. This will be your API endpoint for handling registration. Here&#39;s an example of how you might implement this:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;// pages/api/auth/register.ts&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import bcrypt from &#39;bcrypt&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import { NextApiRequest, NextApiResponse } from &#39;next&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;const saltRounds = 10;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;export default async function handler(req: NextApiRequest, res: NextApiResponse)&amp;nbsp; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; if (req.method === &#39;POST&#39;) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Extract the user data from the request body&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const { name, email, password } = req.body;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Hash the password&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const salt = await bcrypt.genSalt(saltRounds);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const hashedPassword = await bcrypt.hash(password, salt);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Here, you would typically save the name, email, and hashedPassword to your database&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // For demonstration, we&#39;ll just return the hashed password&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return res.status(200).json({ name, email, hashedPassword });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; } catch (error) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; return res.status(500).json({ error: &#39;Internal server error&#39; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; } else {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; // Handle any non-POST requests&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; res.setHeader(&#39;Allow&#39;, [&#39;POST&#39;]);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; return res.status(405).end(`Method ${req.method} Not Allowed`);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Implement the Registration Logic with Password Hashing ...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2&lt;/b&gt;: Create Your Registration Page to Send Data to the API In your registration page component (RegisterPage), update the form submission logic to send a POST request to api/auth/register&amp;nbsp;with the user&#39;s name, email, and password. You can use fetch for this:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;// pages/auth/register/index.tsx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import Link from &quot;next/link&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import { useState } from &quot;react&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;const RegisterPage = () =&amp;gt; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; const [registerData, setRegisterData] = useState({&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; name: &quot;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; email: &quot;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; password: &quot;&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; const onChange: React.ChangeEventHandler&amp;lt;HTMLInputElement&amp;gt; = (e) =&amp;gt; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; setRegisterData({&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ...registerData,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [e.target.name]: e.target.value,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; const handleSubmit = async (e: React.FormEvent&amp;lt;HTMLFormElement&amp;gt;) =&amp;gt; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; e.preventDefault();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; // Send the registerData state to the server&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; const response = await fetch(&#39;/api/auth/register&#39;, {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; method: &#39;POST&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; headers: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Content-Type&#39;: &#39;application/json&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; body: JSON.stringify(registerData),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; const data = await response.json();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; console.log(data); // For demonstration, log the response&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; return (&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h3&amp;gt;Register Page&amp;lt;/h3&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;form onSubmit={handleSubmit}&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label htmlFor=&quot;name&quot;&amp;gt;Name&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; onChange={onChange}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value={registerData.name}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&quot;text&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name=&quot;name&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; required&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label htmlFor=&quot;email&quot;&amp;gt;Email&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; onChange={onChange}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value={registerData.email}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&quot;email&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name=&quot;email&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; required&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label htmlFor=&quot;password&quot;&amp;gt;Password&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; onChange={onChange}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value={registerData.password}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&quot;password&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name=&quot;password&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; required&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;button type=&quot;submit&quot;&amp;gt;Create account&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Already have an account? &amp;lt;Link href=&quot;/auth/login&quot;&amp;gt;Login here&amp;lt;/Link&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; );&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;export default RegisterPage;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Frontend (React) Securely Transmit Passwords: Ensure passwords are transmitted securely from the client to the server. Use HTTPS to encrypt the data in transit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Minimal Password Handling: Avoid storing or logging the password in the client-side application unnecessarily.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Input Validation: Validate password inputs for length and complexity on the client side to improve user experience, but always validate on the server side as well for security.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Security Considerations HTTPS: Always use HTTPS to protect data in transit. Environment Variables: Store sensitive configuration (like saltRounds) in environment variables, not in your codebase. Database Security: Ensure your database is secured and accessible only by authorized users. CORS Policy: Configure CORS policy appropriately in your Node.js application to prevent unauthorized API access. By following these practices, you can significantly enhance the security of password storage and comparison in your application.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 3&lt;/b&gt;:&amp;nbsp; Create&amp;nbsp; a login page in Next Js. For this we need&amp;nbsp; to compere the password (that save at the DB with hash) and the email. We create an api for it -&amp;nbsp;pages/api/auth/login.ts :&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;// pages/api/auth/login.ts&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import type { NextApiRequest, NextApiResponse } from &#39;next&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import bcrypt from &#39;bcrypt&#39;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;// Dummy stored hash for demonstration. In a real app, fetch this from your database.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;// Dummy function for demonstration. Replace with actual database query.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;async function getUserByEmail(email: string) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; // Simulate database access&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; return {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; email: &#39;user@example.com&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; hashedPassword: &#39;$2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92HgH/uPpizv.AlphaJG&#39;, // Replace with actual hash from your database&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;export default async function handler(req: NextApiRequest, res: NextApiResponse) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; if (req.method === &#39;POST&#39;) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; const { email, password } = req.body;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; const user = await getUserByEmail(email);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!user) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // No user found with the submitted email&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return res.status(401).json({ message: &#39;Invalid credentials&#39; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Comparing a submitted password with the stored hash&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Assuming `password` is the password attempt from the user&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // and `hashedPassword` is the hashed password retrieved from your database&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const match = await bcrypt.compare(password,&amp;nbsp; user.hashedPassword);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (match) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Email and passwords match&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; res.status(200).json({ message: &#39;Login successful&#39; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Passwords do not match&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; res.status(401).json({ message: &#39;Invalid credentials&#39; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; } catch (error) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; res.status(500).json({ message: &#39;Server error&#39;, error: (error as Error).message });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; } else {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; // Handle any other HTTP method&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; res.setHeader(&#39;Allow&#39;, [&#39;POST&#39;]);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; res.status(405).end(`Method ${req.method} Not Allowed`);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 4&lt;/b&gt;: Create the react page for login&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;// pages/auth/login/index.tsx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import Link from &quot;next/link&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import { useState } from &quot;react&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;const LoginPage = () =&amp;gt; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; const [email, setEmail] = useState(&#39;&#39;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; const [password, setPassword] = useState(&#39;&#39;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; const handleSubmit = async (event: React.FormEvent) =&amp;gt; {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; event.preventDefault();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; event.preventDefault();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const response = await fetch(&#39;/api/auth/login&#39;, {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; method: &#39;POST&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; headers: {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Content-Type&#39;: &#39;application/json&#39;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; body: JSON.stringify({ email, password }),&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (!response.ok) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw new Error(&#39;Network response was not ok&#39;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; const data = await response.json();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; alert(data.message); // Show success message&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // Handle further logic here (e.g., redirecting)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; } catch (error) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.error(&#39;There was a problem with your fetch operation:&#39;, error);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; return (&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h3&amp;gt;Login Page&amp;lt;/h3&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;form onSubmit={handleSubmit}&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label htmlFor=&quot;email&quot;&amp;gt;Email&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&quot;email&quot; type=&quot;email&quot; required /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label htmlFor=&quot;password&quot;&amp;gt;Password&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input name=&quot;password&quot; type=&quot;password&quot; required /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;button type=&quot;submit&quot;&amp;gt;Login&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Do not have an account?{&quot; &quot;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Link href=&quot;/auth/signup&quot;&amp;gt;Create an account&amp;lt;/Link&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;nbsp; );&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;export default LoginPage;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This code it for next 13. If you use next 14&amp;nbsp; I believe the the code is the same. You need to change index.tsx to page.txt and add&amp;nbsp;&quot;use client&quot;; to the react pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/7632759764274134351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/07/hashing-password-in-next-js-against.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7632759764274134351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7632759764274134351'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/07/hashing-password-in-next-js-against.html' title='Hashing password in Next JS  against rainbow table attacks with a salt for login page'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-4127392325988832267</id><published>2024-05-28T07:49:00.003+03:00</published><updated>2024-05-28T11:12:18.416+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="Framework 4"/><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Net"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>How to create a security ASP.NET Web API controller</title><content type='html'>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;Here is a code that has&amp;nbsp;base response class and use it in an ASP.NET Web API controller to send a response with a cookie and security headers.&lt;/p&gt;&lt;p&gt;This code creates a BaseResponse&amp;lt;T&amp;gt; class with a Status property and a Data property of type T. In the Post method of MyController, a new HttpResponseMessage is created with a status of OK and the content set to a serialized BaseResponse&amp;lt;string&amp;gt;. A cookie is added to the response headers, and then several security headers are added. The X-Content-Type-Options header is set to nosniff to prevent the browser from trying to interpret content with a MIME type that doesn&#39;t match the declared type. The X-Frame-Options header is set to SAMEORIGIN to prevent the page from being displayed in a frame or iframe. The Content-Security-Policy header is set to only allow content from the same origin&lt;/p&gt;&lt;p&gt;In this code, I&#39;ve assumed that you have a service IDatabaseService with a method CheckIfExists that checks if an ID exists in the database. The Post method now accepts an ID, checks if it exists in the database, and sets the Status property of the BaseResponse to the result. It also generates a new GUID for the session ID and sets it as a cookie in the response headers. The Data property of the BaseResponse is set to the ID that was passed to the Post method.&lt;/p&gt;&lt;p&gt;This code sets the HttpOnly attribute of the cookie to true, which prevents the cookie from being accessed by client-side scripts. It also sets the Expires attribute to 1 hour from now, which means the cookie will be deleted after 1 hour. The Strict-Transport-Security header is set to max-age=31536000; includeSubDomains, which tells the browser to only use HTTPS for all future requests to this domain and its subdomains for the next year.&amp;nbsp;The Secure attribute is set to true, which means the cookie will only be sent over an HTTPS connection. Please note that this attribute will have no effect if your application is not served over HTTPS.&lt;/p&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;BaseResponse&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;T&lt;/span&gt;&amp;gt;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;bool&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Status&lt;/span&gt; { &lt;span style=&quot;color: #569cd6;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #569cd6;&quot;&gt;set&lt;/span&gt;; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;T&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Data&lt;/span&gt; { &lt;span style=&quot;color: #569cd6;&quot;&gt;get&lt;/span&gt;; &lt;span style=&quot;color: #569cd6;&quot;&gt;set&lt;/span&gt;; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #1f1f1f; color: #cccccc; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 20px; white-space: pre;&quot;&gt;&lt;div style=&quot;line-height: 20px;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;MyController&lt;/span&gt; : &lt;span style=&quot;color: #4ec9b0;&quot;&gt;ApiController&lt;/span&gt;&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;readonly&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;IDatabaseService&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;_databaseService&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;MyController&lt;/span&gt;(&lt;span style=&quot;color: #4ec9b0;&quot;&gt;IDatabaseService&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;databaseService&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;_databaseService&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;databaseService&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;Task&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;HttpResponseMessage&lt;/span&gt;&amp;gt; &lt;span style=&quot;color: #dcdcaa;&quot;&gt;Post&lt;/span&gt;([&lt;span style=&quot;color: #4ec9b0;&quot;&gt;FromBody&lt;/span&gt;] &lt;span style=&quot;color: #569cd6;&quot;&gt;string&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;id&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;exists&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;await&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;_databaseService&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;CheckIfExists&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;id&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;HttpResponseMessage&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;HttpStatusCode&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;OK&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Content&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;StringContent&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;JsonConvert&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;SerializeObject&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;BaseResponse&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #569cd6;&quot;&gt;string&lt;/span&gt;&amp;gt; { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Status&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;exists&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Data&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;id&lt;/span&gt; }), &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Encoding&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;UTF8&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;newSessionId&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Guid&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;NewGuid&lt;/span&gt;().&lt;span style=&quot;color: #dcdcaa;&quot;&gt;ToString&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #569cd6;&quot;&gt;var&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;cookie&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;CookieHeaderValue&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;session-id&quot;&lt;/span&gt;, &lt;span style=&quot;color: #9cdcfe;&quot;&gt;newSessionId&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;HttpOnly&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;true&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Secure&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #569cd6;&quot;&gt;true&lt;/span&gt;,&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;Expires&lt;/span&gt; &lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;DateTimeOffset&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Now&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;AddHours&lt;/span&gt;(&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Headers&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;AddCookies&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #4ec9b0;&quot;&gt;CookieHeaderValue&lt;/span&gt;[] { &lt;span style=&quot;color: #9cdcfe;&quot;&gt;cookie&lt;/span&gt; });&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Headers&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;Add&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;X-Content-Type-Options&quot;&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;nosniff&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Headers&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;Add&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;X-Frame-Options&quot;&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;SAMEORIGIN&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Headers&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;Add&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Content-Security-Policy&quot;&lt;/span&gt;, &lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;default-src &#39;self&#39;&quot;&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Headers&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;Add&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;Strict-Transport-Security&quot;&lt;/span&gt;, 
&lt;span style=&quot;color: #ce9178;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&quot;max-age=31536000; includeSubDomains&quot;&lt;/span&gt;);&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #9cdcfe;&quot;&gt;response&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Have a nice day :)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/4127392325988832267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/05/how-to-create-security-aspnet-web-api.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/4127392325988832267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/4127392325988832267'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/05/how-to-create-security-aspnet-web-api.html' title='How to create a security ASP.NET Web API controller'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-7920468605752532115</id><published>2024-03-14T15:00:00.003+02:00</published><updated>2024-07-18T13:00:04.228+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="React"/><title type='text'>React lazy component (import component)</title><content type='html'>&lt;br /&gt;&lt;br /&gt;Let&#39;s face it - there are some problems with &lt;b&gt;React &amp;amp; Webpack. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When I create a Webpack bundle - All the files (js and css) are merged. (remember files Name Must Start with Capital letter- js , css,..) &lt;br /&gt;&lt;br /&gt;It means that if I have some styles with the same name, the style will be applied on all the elements. &lt;br /&gt;&lt;br /&gt;Ex: &lt;br /&gt;&lt;br /&gt;In A component - there is an element like this:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;Button className=&quot;mybutton&quot; label=&quot;close&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;with style like this:&lt;br /&gt;&lt;br /&gt;.mybutton {color:red} &lt;br /&gt;&lt;br /&gt;In B component - there is element with the same class name&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;&amp;lt;Button className=&quot;mybutton&quot; label=&quot;open&quot; /&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So because I used the same style css class name - the Webpack bundle merged the css files of all the components, its means that we got red color to all components that use the same name. In the example component B got red color for the button. &lt;br /&gt;&lt;br /&gt;I call it a bug (not a feature 😀) &lt;br /&gt;&lt;br /&gt;In my project I created an app.js. In this file I import all the components. There, I noticed that as I mentioned earlier, one component get styled by another component.&lt;br /&gt; As I remember in Angular, it gives all class names a new name with GUID. It means that in angular one component style does not affect another component. &lt;br /&gt;&lt;br /&gt;Before:&lt;br /&gt; we write this code in app.js to import our components&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import MyComponent from &#39;./MyComponent&#39;;&lt;/span&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; text-align: left; unicode-bidi: embed;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUaNmohNfGe2UPkyVaquQjJhSQTrupl6H9Bfaul3AjmNw0_rDuDqRMF-2QhZBnY3FvjFg_NqKqn8jXMnq8erw__l6O8yytwMsBnanvlFKv_wiMqo1QazFS8fvg7KwqDcg67rCCdO1hFyPBy1vwFFVygZMBAik93v-KTjyxYzvz0hkzM380R-h1Odz4zZU/s710/import%20react.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;79&quot; data-original-width=&quot;710&quot; height=&quot;45&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUaNmohNfGe2UPkyVaquQjJhSQTrupl6H9Bfaul3AjmNw0_rDuDqRMF-2QhZBnY3FvjFg_NqKqn8jXMnq8erw__l6O8yytwMsBnanvlFKv_wiMqo1QazFS8fvg7KwqDcg67rCCdO1hFyPBy1vwFFVygZMBAik93v-KTjyxYzvz0hkzM380R-h1Odz4zZU/w400-h45/import%20react.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;The time and memory:&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; text-align: left; unicode-bidi: embed;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4RPruEbrXaebi5ujBeiufFdK7iJrbwcAZc7LMSXTvMt1y2Hh1HNJ907-cNMroRjqiskzQCYkN6AEXiCP_qJzywdH4zSLX_hK7Pkj3B1EqB5jNBUZ33irTR78QwpFUrKGRheYVddpNThLEjxuM_0aEEnSxvHcF3lHJ2_rq2P7iCFZ5kPASdGPMJBCHXI/s585/time%20react.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;48&quot; data-original-width=&quot;585&quot; height=&quot;32&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4RPruEbrXaebi5ujBeiufFdK7iJrbwcAZc7LMSXTvMt1y2Hh1HNJ907-cNMroRjqiskzQCYkN6AEXiCP_qJzywdH4zSLX_hK7Pkj3B1EqB5jNBUZ33irTR78QwpFUrKGRheYVddpNThLEjxuM_0aEEnSxvHcF3lHJ2_rq2P7iCFZ5kPASdGPMJBCHXI/w400-h32/time%20react.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;After:&lt;br /&gt; Now my suggested solution:&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt; const MyComponent = React.lazy(() =&amp;gt; import(&#39;./MyComponent&#39;));&lt;/span&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWBPpzMzzYKfqIATg6z5aZbpb9USrIQXJ702TxEFXYKmsEQ8vu_cb0MWoYkacWjae8oqOYHIvMmZQ2_LeBzdjKGT4ETYqdgitrr4nxs5pNnAJsJ0SbjRv-Am-NIDyCvpzw2ofIOcEJ0SJAql51K6_4-VEB75Y0nlOGs30sluyibSAaOt1rW1Su-fsXGzs/s847/import%20react%20new.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;71&quot; data-original-width=&quot;847&quot; height=&quot;34&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWBPpzMzzYKfqIATg6z5aZbpb9USrIQXJ702TxEFXYKmsEQ8vu_cb0MWoYkacWjae8oqOYHIvMmZQ2_LeBzdjKGT4ETYqdgitrr4nxs5pNnAJsJ0SbjRv-Am-NIDyCvpzw2ofIOcEJ0SJAql51K6_4-VEB75Y0nlOGs30sluyibSAaOt1rW1Su-fsXGzs/w400-h34/import%20react%20new.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;It&#39;s means that ContactUs component now no longer has a style from ModSlider component, because we used&lt;b&gt; React.Lazy.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;To complete the job you need to wrap your code with &lt;b&gt;Suspense&lt;/b&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxic7rY0bwrvghhw3Dzrk22omJsS6Ei725yVOw7KZHA1WJrKjWgum77JrIY8FdTsk4tyjjZzI1iwnEBSWb2kn16qHbIAYDwfiqWgvxrm3bKyyrMqJ_WGL0amoSvwi4dzLDSvRtldwdH2qHctcoSIT1KMMdz24Rt602THFjePr1qIbMwXySpY62CIrw_k/s825/import%20react%20new%202.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;34&quot; data-original-width=&quot;825&quot; height=&quot;16&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxic7rY0bwrvghhw3Dzrk22omJsS6Ei725yVOw7KZHA1WJrKjWgum77JrIY8FdTsk4tyjjZzI1iwnEBSWb2kn16qHbIAYDwfiqWgvxrm3bKyyrMqJ_WGL0amoSvwi4dzLDSvRtldwdH2qHctcoSIT1KMMdz24Rt602THFjePr1qIbMwXySpY62CIrw_k/w400-h16/import%20react%20new%202.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKHQIAjWxt5VbbXamirCdlEcQaFOTMX-uAedL_aEEYkhq0BuXnjx31grcYGxuGmpZBLx4xx2Df9ymDnuuAQid_hZWF-86ccFp5lZPdVX1a7Cm5Y2DBf_jUGPwOXq9knWXAZEhW3J2T7w59MjDzoqxcaNW-xkRWlu5n66TAw_JwroLbfhW4vuOuB3e4qFQ/s747/import%20react%20new%203.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;169&quot; data-original-width=&quot;747&quot; height=&quot;90&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKHQIAjWxt5VbbXamirCdlEcQaFOTMX-uAedL_aEEYkhq0BuXnjx31grcYGxuGmpZBLx4xx2Df9ymDnuuAQid_hZWF-86ccFp5lZPdVX1a7Cm5Y2DBf_jUGPwOXq9knWXAZEhW3J2T7w59MjDzoqxcaNW-xkRWlu5n66TAw_JwroLbfhW4vuOuB3e4qFQ/w400-h90/import%20react%20new%203.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;Now you need create your own fallback code (loading / spinner)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The time and memory:&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; direction: ltr; line-height: normal; margin-bottom: 12pt; unicode-bidi: embed;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY-7ZngFeSQvzXaLVqEOq-4tpW2sSAPd-h7F5j310h8f3BqjtEnXaym1u_tb8eImXnRsWy8XUTh8-DDrKt0Mcn_0edu5TFN_7JwGWtE8dlou2_FRLlmhQiyZ8hvjUul3BiO3j2JQ8e1EYAlpxkOk5_MDz5TSiTOpRb08ucyTNBj08dBDXHto6YZyDXck8/s608/time%20react%20new.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;39&quot; data-original-width=&quot;608&quot; height=&quot;26&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY-7ZngFeSQvzXaLVqEOq-4tpW2sSAPd-h7F5j310h8f3BqjtEnXaym1u_tb8eImXnRsWy8XUTh8-DDrKt0Mcn_0edu5TFN_7JwGWtE8dlou2_FRLlmhQiyZ8hvjUul3BiO3j2JQ8e1EYAlpxkOk5_MDz5TSiTOpRb08ucyTNBj08dBDXHto6YZyDXck8/w400-h26/time%20react%20new.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;On this example we saved almost 6 MB and 1 sec.... amusing 😃&lt;br /&gt;&lt;br /&gt;This will automatically load the bundle containing the MyComponent when this component is first rendered.&lt;br /&gt; React.lazy takes a function that must call a dynamic import(). This must return a Promise which resolves to a module with a default export containing a React component.&lt;br /&gt; The lazy component should then be rendered inside a Suspense component, which allows us to show some fallback content (such as a loading indicator) while we’re waiting for the lazy component to load.&lt;span style=&quot;font-family: courier;&quot;&gt;&lt;br /&gt;&lt;br /&gt;**import React, { Suspense } from &#39;react&#39;;&lt;br /&gt;&lt;br /&gt;const MyComponent = React.lazy(() =&amp;gt; import(&#39;./MyComponent&#39;));&lt;br /&gt;&lt;br /&gt;function MyComponent() {&lt;br /&gt;&lt;br /&gt;  return (&lt;br /&gt;&lt;br /&gt;    &amp;lt;div&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;Suspense fallback={&amp;lt;div&amp;gt;Loading...&amp;lt;/div&amp;gt;}&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;OtherComponent /&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;/Suspense&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;  );&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;div&gt;The &lt;b&gt;fallback prop&lt;/b&gt; accepts any React elements that you want to render while waiting for the component to load. You can place the Suspense component anywhere above the lazy component. You can even wrap multiple lazy components with a single Suspense component.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;import React, { Suspense } from &#39;react&#39;;&lt;br /&gt;&lt;br /&gt;const OtherComponent = React.lazy(() =&amp;gt; import(&#39;./OtherComponent&#39;));&lt;br /&gt;&lt;br /&gt;const AnotherComponent = React.lazy(() =&amp;gt; import(&#39;./AnotherComponent&#39;));&lt;br /&gt;&lt;br /&gt;function MyComponent() {&lt;br /&gt;&lt;br /&gt;  return (&lt;br /&gt;&lt;br /&gt;    &amp;lt;div&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;Suspense fallback={&amp;lt;div&amp;gt;Loading...&amp;lt;/div&amp;gt;}&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;section&amp;gt;&lt;br /&gt;&lt;br /&gt;          &amp;lt;OtherComponent /&amp;gt;&lt;br /&gt;&lt;br /&gt;          &amp;lt;AnotherComponent /&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;/section&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;/Suspense&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;  );&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;To support Webpack Chunk Name&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier;&quot;&gt;const News = React.lazy(() =&amp;gt; import(/*webpackChunkName:&quot;News&quot; */&quot;../components/News/News&quot;));&lt;br /&gt;&lt;br /&gt;to webpack.config.js:&lt;br /&gt;&lt;br /&gt;output: {&lt;br /&gt;&lt;br /&gt;        path: path.resolve(__dirname, &#39;D:/Code/React/&#39;),&lt;br /&gt;&lt;br /&gt;        filename: &#39;Roi_bundle.js&#39;,&lt;br /&gt;&lt;br /&gt;        chunkFilename:&#39;[name].[chunkhash].js&#39;&lt;br /&gt;&lt;br /&gt;    },&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/7920468605752532115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/03/react-lazy-component-import-component.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7920468605752532115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7920468605752532115'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2024/03/react-lazy-component-import-component.html' title='React lazy component (import component)'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUaNmohNfGe2UPkyVaquQjJhSQTrupl6H9Bfaul3AjmNw0_rDuDqRMF-2QhZBnY3FvjFg_NqKqn8jXMnq8erw__l6O8yytwMsBnanvlFKv_wiMqo1QazFS8fvg7KwqDcg67rCCdO1hFyPBy1vwFFVygZMBAik93v-KTjyxYzvz0hkzM380R-h1Odz4zZU/s72-w400-h45-c/import%20react.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-1246730524166218313</id><published>2023-07-18T11:00:00.019+03:00</published><updated>2024-07-18T13:08:47.430+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><category scheme="http://www.blogger.com/atom/ns#" term="System"/><title type='text'>Limit access to your IIS site to specific security Active Directory groups</title><content type='html'> You can limit access to your IIS site to specific security Active Directory (AD) groups. Here are the steps to do this:&lt;div&gt;&lt;span face=&quot;arial, helvetica, sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;arial, helvetica, sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: small;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 1&lt;/b&gt;: Create or Identify the Security Group in Active Directory&lt;br style=&quot;background-color: white; color: #222222; font-family: arial, helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br /&gt;1. &lt;b&gt;Open Active Directory Users and Computers (ADUC)&lt;/b&gt;&amp;nbsp;on your domain controller.&lt;br /&gt;2. Navigate to the &lt;b&gt;Organizational Unit (OU)&lt;/b&gt;&amp;nbsp;where you want to create the group.&lt;br /&gt;3. Right-click the OU, select &lt;b&gt;New&lt;/b&gt;&amp;nbsp;&amp;gt; &lt;b&gt;Group&lt;/b&gt;.&lt;br /&gt;4. Name your group and ensure the &lt;b&gt;Group scope&lt;/b&gt;&amp;nbsp;is set to &lt;b&gt;Security&lt;/b&gt;.&lt;br /&gt;5. Add users to this group who should have access to the IIS site.&lt;br style=&quot;background-color: white; color: #222222; font-family: arial, helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt; Configure IIS to Use Windows Authentication&lt;br style=&quot;background-color: white; color: #222222; font-family: arial, helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br /&gt;1. &lt;b&gt;Open IIS Manager&lt;/b&gt;&amp;nbsp;on your web server.&lt;br /&gt;2. Select your site from the &lt;b&gt;Connections&lt;/b&gt;&amp;nbsp;pane.&lt;br /&gt;3. Double-click &lt;b&gt;Authentication&lt;/b&gt; in the &lt;b&gt;Features View&lt;/b&gt;.&lt;br /&gt;4. &lt;b&gt;Enable&lt;/b&gt;&amp;nbsp;&lt;b&gt;Windows Authentication&lt;/b&gt;&amp;nbsp;and &lt;b&gt;Disable&lt;/b&gt;&amp;nbsp;other authentication methods like &lt;b&gt;Anonymous Authentication&lt;/b&gt;.&lt;br style=&quot;background-color: white; color: #222222; font-family: arial, helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br /&gt;&lt;b&gt;Step 3&lt;/b&gt;: Set NTFS Permissions for the Site Folder&lt;br /&gt;&lt;br /&gt;1. Navigate to the folder containing your IIS site&#39;s content.&lt;br /&gt;2. Right-click the folder, select &lt;b&gt;Properties&lt;/b&gt;.&lt;br /&gt;3. Go to the &lt;b&gt;Security&lt;/b&gt; tab and click &lt;b&gt;Edit&lt;/b&gt;.&lt;br /&gt;4. Click &lt;b&gt;Add&lt;/b&gt; and enter the name of your AD security group.&lt;br /&gt;5. Assign the appropriate permissions (e.g., &lt;b&gt;Read &amp;amp; Execute&lt;/b&gt;, &lt;b&gt;List Folder Contents&lt;/b&gt;, &lt;b&gt;Read&lt;/b&gt;).&lt;br style=&quot;background-color: white; color: #222222; font-family: arial, helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br /&gt;&lt;b&gt;Step 4&lt;/b&gt;: Configure Authorization Rules in IIS&lt;br /&gt;&lt;br /&gt;1. In IIS Manager, select your site again.&lt;br /&gt;2. Double-click &lt;b&gt;Authorization Rules&lt;/b&gt;&amp;nbsp;in the &lt;b&gt;Features View&lt;/b&gt;.&lt;br /&gt;3. Remove any existing rules that allow access to all users.&lt;br /&gt;4. Click &lt;b&gt;Add Allow Rule&lt;/b&gt;&amp;nbsp;in the &lt;b&gt;Actions&lt;/b&gt;&amp;nbsp;pane.&lt;br /&gt;5. Select &lt;b&gt;Specified roles or user groups&lt;/b&gt;, and enter the name of your AD security group.&lt;br /&gt;6. Click &lt;b&gt;OK&lt;/b&gt;&amp;nbsp;to save the rule.&lt;br style=&quot;background-color: white; color: #222222; font-family: arial, helvetica, sans-serif; font-size: small;&quot; /&gt;&lt;br /&gt;&lt;b&gt;Step 5&lt;/b&gt;: Test the Configuration&lt;br /&gt;&lt;br /&gt;1. Use a user account that is a member of the AD security group to access the site. They should have access.&lt;br /&gt;2. Use a user account that is &lt;b&gt;not&lt;/b&gt;&amp;nbsp;a member of the AD security group to access the site. They should be denied access.&lt;br /&gt;&lt;br /&gt;These steps will ensure that only users in the specified AD security group can access your IIS site.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/1246730524166218313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2023/07/l-limit-access-to-your-iis-site-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/1246730524166218313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/1246730524166218313'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2023/07/l-limit-access-to-your-iis-site-to.html' title='Limit access to your IIS site to specific security Active Directory groups'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-695574498314016983</id><published>2022-01-18T09:45:00.000+02:00</published><updated>2022-01-18T09:45:09.705+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2019"/><title type='text'> How to get the following ID in a SharePoint list</title><content type='html'>&lt;p&gt;&amp;nbsp;hi...&lt;/p&gt;&lt;p&gt;More than a decade ago .. I wrote a &lt;a href=&quot;https://kwizcom.blogspot.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;kwizcom blog&lt;/a&gt; article - how to get the following ID in a SharePoint list&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://kwizcom.blogspot.com/2009/08/how-do-i-tell-what-next-list-item-id-is.html&quot;&gt;https://kwizcom.blogspot.com/2009/08/how-do-i-tell-what-next-list-item-id-is.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This was valid for SharePoint 2007 and 2010 for sure.&lt;/p&gt;&lt;p&gt;I do not know when Microsoft changed the table in the database ..&lt;/p&gt;&lt;p&gt;But now in SharePoint 2019 they have created another table AllListsAux and the code should look like this&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot;, &amp;quot;Andale Mono&amp;quot;, courier, monospace; padding-left: 6px;&quot;&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;/// Get the next available item id from a list&lt;/p&gt;&lt;p&gt;/// &amp;lt; name=&quot;site&quot;&amp;gt;site&lt;/p&gt;&lt;p&gt;/// &amp;lt; name=&quot;listId&quot;&amp;gt;listId&lt;/p&gt;&lt;p&gt;///&lt;/p&gt;&lt;p&gt;public static int SharePointListNextItemId(SPSite site, Guid listId)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; int id = -1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SPSecurity.RunWithElevatedPrivileges(delegate ()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (site.WebApplication.ContentDatabases.Count &amp;gt; 0)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string DBConnString = site.WebApplication.ContentDatabases[0].DatabaseConnectionString;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (SqlConnection con = new SqlConnection(DBConnString))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con.Open();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (SqlCommand command = con.CreateCommand())&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; command.CommandText = String.Format(&quot;select NextAvailableId from [AllListsAux] where ListID = &#39;{0}&#39;&quot;, listId.ToString());&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id = (int)command.ExecuteScalar();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; con.Close();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return id;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/695574498314016983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2022/01/how-to-get-following-id-in-sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/695574498314016983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/695574498314016983'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2022/01/how-to-get-following-id-in-sharepoint.html' title=' How to get the following ID in a SharePoint list'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-8837489593244198903</id><published>2021-05-25T08:53:00.004+03:00</published><updated>2021-05-25T08:53:57.850+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Central Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2016"/><title type='text'>WSP not deployed in all SharePoint servers in the farm</title><content type='html'>&lt;p&gt;If you want to deploy wsp file on the SharePoint farm ... and the installation failed on some of the farm servers -&amp;nbsp; then the solution is the timejob&lt;/p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkI-s5bqQe2KO43GpscbX0kkHhJrrV4sgbGu2sJ9bSXRZaIzDpqfLy4LO3GKPVWG5xjsiPGm_NfGv3N-wQKXe1XSuAeslOOAxzWoUrWuR3YSLWCjwy7y7maxK_6n8ViPbiyMMEsw2f9cc/s995/sharepoint+deploy.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;468&quot; data-original-width=&quot;995&quot; height=&quot;189&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkI-s5bqQe2KO43GpscbX0kkHhJrrV4sgbGu2sJ9bSXRZaIzDpqfLy4LO3GKPVWG5xjsiPGm_NfGv3N-wQKXe1XSuAeslOOAxzWoUrWuR3YSLWCjwy7y7maxK_6n8ViPbiyMMEsw2f9cc/w400-h189/sharepoint+deploy.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;SharePoint deploy&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;p&gt;Run this code at SharePoint PowerShell&lt;/p&gt;&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot;, &amp;quot;Andale Mono&amp;quot;, courier, monospace; padding-left: 6px;&quot;&gt;&lt;p&gt;$farm&amp;nbsp; = Get-SPFarm&lt;/p&gt;&lt;p&gt;$disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne &quot;Online&quot;}&lt;/p&gt;&lt;p&gt;if ($disabledTimers -ne $null)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; foreach ($timer in $disabledTimers)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Write-Host &quot;Timer service instance on server &quot; $timer.Server.Name &quot; is not Online. Current status:&quot; $timer.Status&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Write-Host &quot;Attempting to set the status of the service instance to online&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $timer.Update()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;else&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Write-Host &quot;All Timer Service Instances in the farm are online! No problems found&quot;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYXSCpj_qqEpJEgiJi-qkPunV7rU9Z3m4SZ7-lYM5FC-HmLFVTx29l3L2JzKoPi4c-_q9NV_nmpfGsy3IC1IhVVmA_qWj7CGXfgMJ11AcJUS1jebNJj8-oihK6hVNdvEJcDOHBr-2vmck/s673/powershell+timer+job.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;510&quot; data-original-width=&quot;673&quot; height=&quot;303&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYXSCpj_qqEpJEgiJi-qkPunV7rU9Z3m4SZ7-lYM5FC-HmLFVTx29l3L2JzKoPi4c-_q9NV_nmpfGsy3IC1IhVVmA_qWj7CGXfgMJ11AcJUS1jebNJj8-oihK6hVNdvEJcDOHBr-2vmck/w400-h303/powershell+timer+job.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PowerShell timer job&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;Before reinstalling recycle time Job on each server&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More info - read this &lt;a href=&quot;https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1c8bda47-5be9-4412-a531-1706bf0df6e6/wsp-not-getting-deployed-in-all-servers-in-our-sharepoint-2013-farm?forum=sharepointadmin&quot;&gt;forum&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Yours,&lt;/p&gt;&lt;p&gt;Roi&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/8837489593244198903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2021/05/wsp-not-deployed-in-all-sharepoint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/8837489593244198903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/8837489593244198903'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2021/05/wsp-not-deployed-in-all-sharepoint.html' title='WSP not deployed in all SharePoint servers in the farm'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkI-s5bqQe2KO43GpscbX0kkHhJrrV4sgbGu2sJ9bSXRZaIzDpqfLy4LO3GKPVWG5xjsiPGm_NfGv3N-wQKXe1XSuAeslOOAxzWoUrWuR3YSLWCjwy7y7maxK_6n8ViPbiyMMEsw2f9cc/s72-w400-h189-c/sharepoint+deploy.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-2513408688063746640</id><published>2021-01-29T17:30:00.004+02:00</published><updated>2021-01-29T17:30:49.108+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="Liferay"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><category scheme="http://www.blogger.com/atom/ns#" term="Rauct.Vue"/><title type='text'>Create React,  Angular or Vue widget at Liferay</title><content type='html'>&lt;p&gt;In the last year I have made a small change in the professional aspect …&lt;/p&gt;&lt;p&gt;I switched from a Microsoft CMS (SharePoint) that works with .NET and windows IIS to a new CMS - Liferay&lt;/p&gt;&lt;p&gt;In Liferay, I work with Java, Linux servers with tomcat.(On AWS cloud)- I don&#39;t remember Microsoft 😖&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Enough talking about myself... Let&#39;s do Liferay&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Before&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;You need to install before node.js, &lt;i&gt;npm &lt;/i&gt;and &lt;i&gt;yomoan&lt;/i&gt;. Also you need&lt;i&gt; visual studio code&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Install the Liferay bundle generator&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Run the following command (Create before folder for your project)&lt;/p&gt;&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot;, &amp;quot;Andale Mono&amp;quot;, courier, monospace; padding-left: 6px;&quot;&gt;npm install -g yo generator-liferay-js&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;And now, generate the React project&lt;/p&gt;&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-size-adjust: none; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot;, &amp;quot;Andale Mono&amp;quot;, courier, monospace; padding-left: 6px;&quot;&gt;yo liferay-js&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFZ4ZpUwZcd6ZEG-fhHGsDTOuHv1tNgYl0zKoIVKH4gGd4nxKK9JMpQok5dXXsoAMfKv_oMpRU2JQGrU2o7IDFCiXrAQynBKHTh1PkcjEuQbvSrMrWLGBDDmqtEqb2d39BbuKlBIebiHE/s602/yo+liferay-js.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;nmp install&quot; border=&quot;0&quot; data-original-height=&quot;315&quot; data-original-width=&quot;602&quot; height=&quot;209&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFZ4ZpUwZcd6ZEG-fhHGsDTOuHv1tNgYl0zKoIVKH4gGd4nxKK9JMpQok5dXXsoAMfKv_oMpRU2JQGrU2o7IDFCiXrAQynBKHTh1PkcjEuQbvSrMrWLGBDDmqtEqb2d39BbuKlBIebiHE/w400-h209/yo+liferay-js.png&quot; title=&quot;angular&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Select React Widget (Or Angular / Vue)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now answer the questions about your project… (Name. category, localization etc… )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLfxRzpol5wSmdOk69FfMed_LwBmewLitrrJQ-SMsxLMdVkg_gNrGaY09HyTK5Cc6RkCUUOmFruXu26WW_nYZRW2blVlbYMRQZDovCxrRlLLaCYDOrYGm4Igno3NzP85qf3UJq5fCsbnw/s602/angular_liferay.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Liferay Angular&quot; border=&quot;0&quot; data-original-height=&quot;315&quot; data-original-width=&quot;602&quot; height=&quot;209&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLfxRzpol5wSmdOk69FfMed_LwBmewLitrrJQ-SMsxLMdVkg_gNrGaY09HyTK5Cc6RkCUUOmFruXu26WW_nYZRW2blVlbYMRQZDovCxrRlLLaCYDOrYGm4Igno3NzP85qf3UJq5fCsbnw/w400-h209/angular_liferay.png&quot; title=&quot;yo liferay js&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;Chose with example code&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now the npm service installing the project&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;The Code&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Open your project with visual studio code&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxDmDWny8bn7BpYOpEdWzZBuK84i_Fu8WIdIAwiD6egexIZ3yBjEe3dUkFIvcKl3oyLZuehzHzuVAVqwZ-TFm68Dcat_KQcjkq6WkQIL-QHe3GbPkkF5564TBN-fEohaq_0PgNdKx1dlI/s602/visual+studio+code.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Visual Studio Code&quot; border=&quot;0&quot; data-original-height=&quot;395&quot; data-original-width=&quot;602&quot; height=&quot;263&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxDmDWny8bn7BpYOpEdWzZBuK84i_Fu8WIdIAwiD6egexIZ3yBjEe3dUkFIvcKl3oyLZuehzHzuVAVqwZ-TFm68Dcat_KQcjkq6WkQIL-QHe3GbPkkF5564TBN-fEohaq_0PgNdKx1dlI/w400-h263/visual+studio+code.png&quot; title=&quot;project - visual studio code&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;The &lt;i&gt;package.json&lt;/i&gt; file is responsible for the settings of the project (&lt;i&gt;name, version, category, etc.&amp;nbsp; …&lt;/i&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;i&gt;assets\css\styles.css&lt;/i&gt; file is responsible for the style (you can add more files) .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The features\localization\Language.properties is the resource file. It can be a multiple languages, you need to and your local file like Language_iw.properties for Hebrew.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The features\configuration.json is the property of the widget.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The files src\AppComponent.js and src\index.js are the files of the component.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can add your new component like this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Deploy&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;Run this command&lt;/p&gt;&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-color: rgb(0, 0, 255); border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-style: solid; border-top: rgb(0,0,255) 2px solid; border-width: 2px; color: white; font-family: &amp;quot;courier new&amp;quot;, &amp;quot;Andale Mono&amp;quot;, courier, monospace; font-size-adjust: none; font-size: 16px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;&quot;&gt;npm run deploy&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Liferay&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;On the page (at liferay) add your widget. You widget is under your category, and you can change the property that youadd on the json file.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Enjoy&lt;/p&gt;&lt;p&gt;Roi&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/2513408688063746640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2021/01/create-react-angular-or-vue-widget-at.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/2513408688063746640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/2513408688063746640'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2021/01/create-react-angular-or-vue-widget-at.html' title='Create React,  Angular or Vue widget at Liferay'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFZ4ZpUwZcd6ZEG-fhHGsDTOuHv1tNgYl0zKoIVKH4gGd4nxKK9JMpQok5dXXsoAMfKv_oMpRU2JQGrU2o7IDFCiXrAQynBKHTh1PkcjEuQbvSrMrWLGBDDmqtEqb2d39BbuKlBIebiHE/s72-w400-h209-c/yo+liferay-js.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-5146789802838406765</id><published>2020-08-06T11:16:00.002+03:00</published><updated>2020-08-06T11:17:33.248+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="NativeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>Text To Speech (TTS) and Audio file with NativeScript</title><content type='html'>In my game - &lt;a href=&quot;https://play.google.com/store/apps/details?id=org.nativescript.roifirstgame&quot;&gt;My first game&lt;/a&gt;&amp;nbsp;(game for children), that created with NativeScript, I use audio and speak services.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLYRH4M25Mi2ISSPS6Yhjgyl6GcoehGvf28chAzvHok8RDmPYk9ioBwNAs-QcA4HziUcbuE_n-CKPUncRZuYnYvHykoIMBx5aBVNjzEBXLf0YXNYnr_sugbotd-FX7yA0bD7PaE3iT3Hg/s1920/Screenshot_1596701325.png&quot; imageanchor=&quot;1&quot; style=&quot;display: block; padding: 1em 0px;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1920&quot; data-original-width=&quot;1080&quot; height=&quot;410&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLYRH4M25Mi2ISSPS6Yhjgyl6GcoehGvf28chAzvHok8RDmPYk9ioBwNAs-QcA4HziUcbuE_n-CKPUncRZuYnYvHykoIMBx5aBVNjzEBXLf0YXNYnr_sugbotd-FX7yA0bD7PaE3iT3Hg/w230-h410/Screenshot_1596701325.png&quot; width=&quot;230&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The NativeScript is platform that use to develop an android (or IOS) app with angular and TypeScript.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the class the use for Audio and Speak with NativeScript.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The speak if Text To Speech (TTS) from google.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The audio is mp3 file&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;TNSTextToSpeech&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;SpeakOptions&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;nativescript-texttospeech&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;TNSPlayer&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;AudioPlayerOptions&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;nativescript-audio-player&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;timer&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;tns-core-modules/timer&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;Injectable&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;@angular/core&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;firebase&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;nativescript-plugin-firebase&quot;&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;@&lt;span style=&quot;color: #4ec9b0;&quot;&gt;Injectable&lt;/span&gt;({&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;providedIn&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;root&quot;&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;})&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;export&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;AudioAndSpeak&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioTrackDuration&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;any&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;remainingDuration&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;any&lt;/span&gt;;&amp;nbsp;&lt;span style=&quot;color: #6a9955;&quot;&gt;//&amp;nbsp;used&amp;nbsp;to&amp;nbsp;show&amp;nbsp;the&amp;nbsp;remaining&amp;nbsp;time&amp;nbsp;of&amp;nbsp;the&amp;nbsp;audio&amp;nbsp;track&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;TTS&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;TNSTextToSpeech&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;TNSPlayer&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;boolean&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;constructor&lt;/span&gt;()&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;TNSPlayer&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;debug&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;speak&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;local&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;speakRate&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #b5cea8;&quot;&gt;0.8&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;let&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;speakOptions&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;SpeakOptions&lt;/span&gt;&amp;nbsp;=&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;text&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;speakRate&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;speakRate&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;queue&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;true&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;locale&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;local&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;finishedCallback&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;TTS&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;speak&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;speakOptions&lt;/span&gt;).&lt;span style=&quot;color: #dcdcaa;&quot;&gt;then&lt;/span&gt;(()&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;End&amp;nbsp;Speak&quot;&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;playSound&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath2&lt;/span&gt;?:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;string&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;?&amp;nbsp;:&lt;span style=&quot;color: #4ec9b0;&quot;&gt;number&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;try&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;(!&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;playerOptions&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;AudioPlayerOptions&lt;/span&gt;&amp;nbsp;=&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioFile:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;loop:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;completeCallback&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;dispose&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #6a9955;&quot;&gt;//&amp;nbsp;player&amp;nbsp;disposed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath2&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;playSound&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;filePath2&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;errorCallback&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;errorObject&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;errorCallback&#39;&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;JSON&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;stringify&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;errorObject&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;infoCallback&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;args&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;JSON&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;stringify&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;args&lt;/span&gt;));&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;playFromFile&lt;/span&gt;(&lt;span style=&quot;color: #4fc1ff;&quot;&gt;playerOptions&lt;/span&gt;).&lt;span style=&quot;color: #dcdcaa;&quot;&gt;catch&lt;/span&gt;((&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;)&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;firebase&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;crashlytics&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;sendCrashLog&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;AudioAndSpeak&amp;nbsp;-&amp;gt;&amp;nbsp;playSound&amp;nbsp;playFromFile&amp;nbsp;:&#39;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;log&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;error&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isSpeaking&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioTrackDuration&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;await&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;getAudioTrackDuration&lt;/span&gt;();&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #6a9955;&quot;&gt;//&amp;nbsp;start&amp;nbsp;audio&amp;nbsp;duration&amp;nbsp;tracking&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;_startDurationTracking&lt;/span&gt;(&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioTrackDuration&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;catch&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;e&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;console&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;error&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;AudioAndSpeak&amp;nbsp;-&amp;gt;&amp;nbsp;playSound&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;e&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;firebase&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;crashlytics&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;sendCrashLog&lt;/span&gt;(&lt;span style=&quot;color: #ce9178;&quot;&gt;&#39;AudioAndSpeak&amp;nbsp;-&amp;gt;&amp;nbsp;playSound&amp;nbsp;:&#39;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;e&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;async&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;_startDurationTracking&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;duration&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;)&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;isAudioPlaying&lt;/span&gt;())&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;volume&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;timerId&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;timer&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;setInterval&lt;/span&gt;(()&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&amp;nbsp;{&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;remainingDuration&lt;/span&gt;&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;duration&lt;/span&gt;&amp;nbsp;-&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;_player&lt;/span&gt;.&lt;span style=&quot;color: #4fc1ff;&quot;&gt;currentTime&lt;/span&gt;;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&amp;nbsp;&lt;span style=&quot;color: #b5cea8;&quot;&gt;500&lt;/span&gt;);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You need yo add the service on the contractor&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;import&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;AudioAndSpeak&lt;/span&gt;&amp;nbsp;}&amp;nbsp;&lt;span style=&quot;color: #c586c0;&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;../../shared/AudioAndSpeak&quot;&lt;/span&gt;;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;constructor&lt;/span&gt;(&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;private&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioAndSpeak&lt;/span&gt;:&amp;nbsp;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;AudioAndSpeak&lt;/span&gt;,&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;&amp;nbsp;)&amp;nbsp;{...}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;to call audio file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; color: #d4d4d4; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&amp;nbsp;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioAndSpeak&lt;/span&gt;.&lt;span style=&quot;color: #dcdcaa;&quot;&gt;playSound&lt;/span&gt;(&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioFilePath&lt;/span&gt;);&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;to call speak&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1e1e; font-family: Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14px; line-height: 19px; white-space: pre;&quot;&gt;&lt;div&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;audioAndSpeak&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;speak&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #4ec9b0;&quot;&gt;&#39;TEXT&#39;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;, &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;en-GB&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks,&lt;/div&gt;&lt;div&gt;Roi Kolbinger&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/5146789802838406765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2020/08/in-my-game-my-first-game-for-children.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5146789802838406765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5146789802838406765'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2020/08/in-my-game-my-first-game-for-children.html' title='Text To Speech (TTS) and Audio file with NativeScript'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLYRH4M25Mi2ISSPS6Yhjgyl6GcoehGvf28chAzvHok8RDmPYk9ioBwNAs-QcA4HziUcbuE_n-CKPUncRZuYnYvHykoIMBx5aBVNjzEBXLf0YXNYnr_sugbotd-FX7yA0bD7PaE3iT3Hg/s72-w230-h410-c/Screenshot_1596701325.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-7328194426379824444</id><published>2020-06-28T09:59:00.000+03:00</published><updated>2020-06-28T09:59:12.350+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Angular"/><category scheme="http://www.blogger.com/atom/ns#" term="NativeScript"/><category scheme="http://www.blogger.com/atom/ns#" term="TypeScript"/><title type='text'>Game built in Angular and Typescript- for Android users with NativeScript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
During the corona virus vacation, I took the time to learn something new- NetiveScript.&lt;br /&gt;
I took a course - at one of the best in the market - Maximilian Schwarzmüller.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://pro.academind.com/p/nativescript-angular-build-native-ios-android-web-apps&quot;&gt;https://pro.academind.com/p/nativescript-angular-build-native-ios-android-web-apps&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I built a game for my girls.&lt;br /&gt;
&lt;br /&gt;
For Hebrew speakers&lt;br /&gt;
Ages 2-4 they will learn Colors, Shapes and Animals.&lt;br /&gt;
Ages&amp;nbsp;&amp;nbsp;4-6 who will teach Numbers and Letters&lt;br /&gt;
Ages&amp;nbsp;&amp;nbsp;6-9 who will teach addition and multiplication .. and learning English in stages ... Letters Numbers, Colors, Shapes and Animals.&lt;br /&gt;
For English speakers, the same thing only in English.&lt;br /&gt;
&lt;br /&gt;
Now because everything is object-based .. I tried another language - Spanish .. In the meantime, there are only Numbers and Animals.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZjGsuPBSE6mu7EL20zGsZvZSc7zbsZtXunexbTHX0XcEOl16KB8fhdELKXeZb7mTjEHQQGCdryNXOdpRyXp6FV3KptmdEg1qEszDcsPoY83ME4STfdwqBkv8K73TOKT8FnHjGCbEeY8/s1600/Screenshot_2020-06-28-09-38-31-607_org.nativescript.roifirstgame.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;770&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZjGsuPBSE6mu7EL20zGsZvZSc7zbsZtXunexbTHX0XcEOl16KB8fhdELKXeZb7mTjEHQQGCdryNXOdpRyXp6FV3KptmdEg1qEszDcsPoY83ME4STfdwqBkv8K73TOKT8FnHjGCbEeY8/s400/Screenshot_2020-06-28-09-38-31-607_org.nativescript.roifirstgame.jpg&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The game itself is written in angular and typescript.&lt;br /&gt;
It has 3 main components.&lt;br /&gt;
Component for choosing a language, Component&amp;nbsp;for chose a game and of course Component&amp;nbsp;of the game itself..&lt;br /&gt;
&lt;br /&gt;
NativeScript gives me, as a web developer, the ability to build an app for both Android and iOS&lt;br /&gt;
&lt;br /&gt;
The game is now in Google play - and Called - My First Game&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://play.google.com/store/apps/details?id=org.nativescript.roifirstgame&quot;&gt;https://play.google.com/store/apps/details?id=org.nativescript.roifirstgame&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Over time, I&#39;ll post my insights from NativeScript&lt;br /&gt;
&lt;br /&gt;
Install ... Let the kids play and I&#39;d love to get feedbacks ...&lt;br /&gt;
Roi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/7328194426379824444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2020/06/game-built-in-angular-and-typescript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7328194426379824444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7328194426379824444'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2020/06/game-built-in-angular-and-typescript.html' title='Game built in Angular and Typescript- for Android users with NativeScript'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZjGsuPBSE6mu7EL20zGsZvZSc7zbsZtXunexbTHX0XcEOl16KB8fhdELKXeZb7mTjEHQQGCdryNXOdpRyXp6FV3KptmdEg1qEszDcsPoY83ME4STfdwqBkv8K73TOKT8FnHjGCbEeY8/s72-c/Screenshot_2020-06-28-09-38-31-607_org.nativescript.roifirstgame.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-5274937605447982312</id><published>2020-06-26T10:26:00.000+03:00</published><updated>2020-06-26T10:26:04.438+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Central Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="System"/><title type='text'>SharePoint Service Provisioning -  the service stuck on starting</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
When I tried to run SharePoint service - Manage Metadata Web Service on the Central Admin ... I wait and still Staring (Stuck)...&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV2tkLoRVdCrM1JC_pHyFMX0OSthsZD9vpD76CwAgkhqKFftB3OlkoD-gOK-4AXSIRKE2MsLbQWQi5boQF-6I9CmL8iUPPvw7ReR4VINFhKvAcQRrktkEIZqSxvPdcUVBqvol5eHwi1Ws/s1600/Manage+Metadata+web+service+staring.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;45&quot; data-original-width=&quot;850&quot; height=&quot;20&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV2tkLoRVdCrM1JC_pHyFMX0OSthsZD9vpD76CwAgkhqKFftB3OlkoD-gOK-4AXSIRKE2MsLbQWQi5boQF-6I9CmL8iUPPvw7ReR4VINFhKvAcQRrktkEIZqSxvPdcUVBqvol5eHwi1Ws/s400/Manage+Metadata+web+service+staring.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
So again I ran the command (From SharePoint PowerShell)&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left; unicode-bidi: embed;&quot;&gt;
Get-SPServiceInstance
-Server SERVERNAME| where-object &amp;nbsp;{$_.TypeName -eq &quot;Managed
Metadata Web Service&quot;} | Start-SPServiceInstance -confirm:$false &amp;gt;
$null&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
And I got the Error&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYWs3sZ4FTRNKaxCwQpCm5dEfkF_F9MsVTPRBCI_7XG_Yv4XX7Sfx2HD0Qy-ots802rFTpn1FN0rDpJgY5EWMRYN4s_CLRgsOCFFSlHcYW6LSBfPwNu6zr1S72X2vPizd92sXz_2_ACac/s1600/Get-SPServiceInstance.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;407&quot; data-original-width=&quot;674&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYWs3sZ4FTRNKaxCwQpCm5dEfkF_F9MsVTPRBCI_7XG_Yv4XX7Sfx2HD0Qy-ots802rFTpn1FN0rDpJgY5EWMRYN4s_CLRgsOCFFSlHcYW6LSBfPwNu6zr1S72X2vPizd92sXz_2_ACac/s400/Get-SPServiceInstance.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span id=&quot;goog_1685827769&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1685827770&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
Start-SPServiceInstance
: An object of the type Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition
named &quot;job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f&quot;
already exists under the parent Microsoft.SharePoint.Administration.SPTimerService
named &quot;SPTimerV4&quot;.&amp;nbsp; Rename your object or delete the existing
object. At line:1 char:111 + ... eb Service&quot;} | Start-SPServiceInstance
-confirm:$false &amp;gt; $null +&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+
CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :
InvalidData: (Microsoft.Share...ServiceInstance:
&amp;nbsp;&amp;nbsp;&amp;nbsp;SPCmdletStartServiceInstance) [Start-SPServiceInstance],
SPDuplicateObject &amp;nbsp;&amp;nbsp;Exception &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;+
FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletStartSer
&amp;nbsp;&amp;nbsp;&amp;nbsp;viceInstance&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
I deleted the job&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
$jobToDelete
= Get-SPTimerJob | ? { $_.name -eq
&quot;job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f&quot; }&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;$jobToDelete.Delete()&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
You tried to stop again&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
Stop-SPServiceInstance
-Identity ba7339e3-fb42-49c4-ac66-ab08e84eae0f&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
But I also got the job stuck - Deleting it again&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-color: rgb(0, 0, 255); border-style: solid; border-width: 2px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;&quot;&gt;
&lt;div style=&quot;color: white; font-family: &amp;quot;courier new&amp;quot;, &amp;quot;andale mono&amp;quot;, courier, monospace; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;$&lt;/span&gt;jobToDelete
= Get-SPTimerJob | ? { $_.name -eq
&quot;job-service-instance-ba7339e3-fb42-49c4-ac66-ab08e84eae0f&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&quot; }&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;color: white; font-family: arial, sans-serif;&quot;&gt;$jobToDelete.Delete()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left; unicode-bidi: embed;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left; unicode-bidi: embed;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;I stopped timerJob on the server&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left; unicode-bidi: embed;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left; unicode-bidi: embed;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;Then I tried a different way&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;$&lt;/span&gt;service =
Get-SPServiceInstance -Identity ba7339e3-fb42-49c4-ac66-ab08e84eae0f&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: #141414; border-color: rgb(0, 0, 255); border-style: solid; border-width: 2px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;&quot;&gt;
&lt;div style=&quot;color: white; font-family: &amp;quot;courier new&amp;quot;, &amp;quot;andale mono&amp;quot;, courier, monospace; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;$&lt;/span&gt;service.unprovision&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;()&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;span style=&quot;color: white; font-family: arial, sans-serif;&quot;&gt;$service.update()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: white; font-family: arial, sans-serif;&quot;&gt;iisreset /noforce&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8YR4Py6Wl2Yp-heqzCGp1Nl3f7gw61Yo1JryizWZW5z4SxTuhmjaFmVdpjGQrdJq2LTITbBfj_Zpz-Z1yglCw-Jv0e_PMybEeFzXqBkSZRCYBhBd-ZClbXnVO_0Q9u_rU1W6l5ezbfQ/s1600/provition.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;475&quot; data-original-width=&quot;677&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ8YR4Py6Wl2Yp-heqzCGp1Nl3f7gw61Yo1JryizWZW5z4SxTuhmjaFmVdpjGQrdJq2LTITbBfj_Zpz-Z1yglCw-Jv0e_PMybEeFzXqBkSZRCYBhBd-ZClbXnVO_0Q9u_rU1W6l5ezbfQ/s400/provition.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
I was waiting to see that he was really disabled&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #141414; border-color: rgb(0, 0, 255); border-style: solid; border-width: 2px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.4; padding-left: 6px;&quot;&gt;
&lt;div style=&quot;color: white; font-family: &amp;quot;courier new&amp;quot;, &amp;quot;andale mono&amp;quot;, courier, monospace; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: normal;&quot;&gt;
&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;$&lt;/span&gt;service.provision&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif;&quot;&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;()&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white; font-family: arial, sans-serif;&quot;&gt;$service.update()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: white; font-family: arial, sans-serif;&quot;&gt;iisreset /noforce&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span dir=&quot;RTL&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
I turned on the TimerJob&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
And It works :)&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/5274937605447982312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2020/06/sharepoint-service-provisioning-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5274937605447982312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5274937605447982312'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2020/06/sharepoint-service-provisioning-service.html' title='SharePoint Service Provisioning -  the service stuck on starting'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV2tkLoRVdCrM1JC_pHyFMX0OSthsZD9vpD76CwAgkhqKFftB3OlkoD-gOK-4AXSIRKE2MsLbQWQi5boQF-6I9CmL8iUPPvw7ReR4VINFhKvAcQRrktkEIZqSxvPdcUVBqvol5eHwi1Ws/s72-c/Manage+Metadata+web+service+staring.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-3160357809412120138</id><published>2019-03-21T11:12:00.000+02:00</published><updated>2019-03-21T11:12:30.694+02:00</updated><title type='text'>Restore Problem &quot;Restore-SPSite : The extension </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Next article - User&#39;s responsibility only!&lt;br /&gt;
&lt;br /&gt;
Years ago, I saw something in one of the blogs ... but I did not find any mention of it today (maybe Microsoft asked to delete the article because ...).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I tried to migrate a DataBase between two environments, but I was told the versions did not match. Probably updates winsows&lt;br /&gt;
&lt;br /&gt;
Then I&#39;ll try through the power shell&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136 , 136 , 136) 1pt solid; border-left: rgb(136 , 136 , 136) 1pt solid; border-right: rgb(136 , 136 , 136) 1pt solid; border-top: rgb(136 , 136 , 136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;&quot;&gt;
restore-spacesite&lt;/div&gt;
&lt;br /&gt;
But I got the following error&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0 , 0 , 255) 2px solid; border-left: rgb(0 , 0 , 255) 2px solid; border-right: rgb(0 , 0 , 255) 2px solid; border-top: rgb(0 , 0 , 255) 2px solid; color: white; font-stretch: normal; font: 16px / 1.4 &amp;quot;courier new&amp;quot; , &amp;quot;andale mono&amp;quot; , &amp;quot;courier&amp;quot; , monospace; padding-left: 6px;&quot;&gt;
Restore Problem &quot;Restore-SPSite: The extension Microsoft.Office.Project.Server.Database.Extension.ProjectDatabaseExtension is version VVVV, and the backup was on version VVV These versions are incompatible.&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEb8GTqds0XVM0fDkcrWp5gI7PTGGzTHzF7zu6qXze8P7a-_hH2xAZP5eRO8KBKkZkqU0NJFtYu5fvF_i6nZAhQoSMhdZQtnz2NrJBIRCvLfR3b8GViBQJSMzr8BY8QzLDkdTDTiPy68/s1600/restore-spsite.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;677&quot; height=&quot;202&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEb8GTqds0XVM0fDkcrWp5gI7PTGGzTHzF7zu6qXze8P7a-_hH2xAZP5eRO8KBKkZkqU0NJFtYu5fvF_i6nZAhQoSMhdZQtnz2NrJBIRCvLfR3b8GViBQJSMzr8BY8QzLDkdTDTiPy68/s400/restore-spsite.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
So what did I do?&lt;br /&gt;
&lt;br /&gt;
Do a backup before ... may be you will need it&lt;br /&gt;
&lt;br /&gt;
I opened the file in binary editor. In Visual Studio -&amp;gt; open file&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeOWlPh1MaOyX-p5NumjWboPPTEvMeNO_CjgI1wxRGb-z41TGhiHhyIRozT-Q_oy-KXSPIrfDYaYnSg4J0rDFtTP8oaKz-WmGVFb_VOWUwVl3Z0duR9ClLCk6ARJ2pdYhryU3eDXhPnlk/s1600/open_file.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;622&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeOWlPh1MaOyX-p5NumjWboPPTEvMeNO_CjgI1wxRGb-z41TGhiHhyIRozT-Q_oy-KXSPIrfDYaYnSg4J0rDFtTP8oaKz-WmGVFb_VOWUwVl3Z0duR9ClLCk6ARJ2pdYhryU3eDXhPnlk/s400/open_file.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Open With&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDdHCz3KqYRSAPgQ9Sg3mTd6UHqBhcwbc6ka5AArObogZR554wMeu04d8re9c8w-3UnMxUOIozVrUV6cfET_GEzPe8aLB41GDfG1E4na6fnA2amCDOKBfaI8CVshqfyDE6k_35jGTodbQ/s1600/open_with.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;127&quot; data-original-width=&quot;694&quot; height=&quot;72&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDdHCz3KqYRSAPgQ9Sg3mTd6UHqBhcwbc6ka5AArObogZR554wMeu04d8re9c8w-3UnMxUOIozVrUV6cfET_GEzPe8aLB41GDfG1E4na6fnA2amCDOKBfaI8CVshqfyDE6k_35jGTodbQ/s400/open_with.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Open as binary file editor&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZzdgEjHjt_cZXkbHnWiOLoJpdpPhrnP5gRbJtdsdSXJMIbD2nLmdus9znDsLCaHRSwgDGzEFX7JhHXwZQWs9RbwAD1Jk20TXjkkmJxZgP9Wf6bcYB2sw0ebkil_QqtsDa_By-8A3liig/s1600/binary_editor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;377&quot; data-original-width=&quot;576&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZzdgEjHjt_cZXkbHnWiOLoJpdpPhrnP5gRbJtdsdSXJMIbD2nLmdus9znDsLCaHRSwgDGzEFX7JhHXwZQWs9RbwAD1Jk20TXjkkmJxZgP9Wf6bcYB2sw0ebkil_QqtsDa_By-8A3liig/s400/binary_editor.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And find the wrong virsion&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH8ZkW7HC-Mm-4qr5IdoQfELYa-CI2jVQc7gz3YXwrwHReXXvUZJ6EZeabpl_cfHqhnjL5tHPHtLbIwjKYbwFizaRR1ky8CbF1hHzwA8p7VjgRmOZAlGw0rE4wuimkyz0T5beshkQNhHU/s1600/search+binary+file.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;368&quot; data-original-width=&quot;982&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH8ZkW7HC-Mm-4qr5IdoQfELYa-CI2jVQc7gz3YXwrwHReXXvUZJ6EZeabpl_cfHqhnjL5tHPHtLbIwjKYbwFizaRR1ky8CbF1hHzwA8p7VjgRmOZAlGw0rE4wuimkyz0T5beshkQNhHU/s400/search+binary+file.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now replace the number to your current virsion&lt;br /&gt;
&lt;br /&gt;
And try to run the command again (Restore-SPSite)&lt;br /&gt;
&lt;br /&gt;
For me it work ... hope for you too ... if you did not return the backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/3160357809412120138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2019/03/restore-problem-restore-spsite-extension.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/3160357809412120138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/3160357809412120138'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2019/03/restore-problem-restore-spsite-extension.html' title='Restore Problem &quot;Restore-SPSite : The extension '/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWEb8GTqds0XVM0fDkcrWp5gI7PTGGzTHzF7zu6qXze8P7a-_hH2xAZP5eRO8KBKkZkqU0NJFtYu5fvF_i6nZAhQoSMhdZQtnz2NrJBIRCvLfR3b8GViBQJSMzr8BY8QzLDkdTDTiPy68/s72-c/restore-spsite.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-1619642805813342428</id><published>2017-02-27T09:00:00.000+02:00</published><updated>2017-02-27T09:00:09.136+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Central Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2016"/><category scheme="http://www.blogger.com/atom/ns#" term="System"/><title type='text'>Converting SharePoint site from Version 2013 to 2016</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this time Microsoft did a good job with Migration SharePoint 2013 to SharePoint 2016, and within a few hours it is possible to upgrade the site from 2013 to 2016&lt;br /&gt;
Even the code in Visual Studio was easy to upgrade &amp;nbsp;fron VS 2013 to VS 2015 update 3 with Office package&lt;br /&gt;
&lt;br /&gt;
I did this steps&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;Save wsp website (version 2013)&lt;/li&gt;
&lt;li&gt;Copy (backup restore) the DataBase from SQL 2012 DB 2016, and to ensure that it has sp admin privileges DB_Owner to the new DB&lt;/li&gt;
&lt;li&gt;In Central Adminstration -&amp;gt; Manage web applications&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmcNzOGnpd_nRZ2cWqe4vxpHoNxO3VcevTy5-nPoH4SvbjRV5Ys_EAXGV60R723Fg92madnBfJD7fU6Yix5uZPhkEUKEDu2EaTdaiqRzuzoHlLUf95AWtko86ZrGsLIbnMz6qrnWHr1Bk/s1600/Central+Adminstration+SharePoint+2016.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmcNzOGnpd_nRZ2cWqe4vxpHoNxO3VcevTy5-nPoH4SvbjRV5Ys_EAXGV60R723Fg92madnBfJD7fU6Yix5uZPhkEUKEDu2EaTdaiqRzuzoHlLUf95AWtko86ZrGsLIbnMz6qrnWHr1Bk/s400/Central+Adminstration+SharePoint+2016.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;a. Creating a Web Application with DB temporary&lt;br /&gt;b. Create a Site Collection&lt;br /&gt;c. Setting up the site in the hosts found in the C:\Windows\System32\drivers\etc\ with a local IP&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Add the wsp site (Old from 2013)&lt;br /&gt;a. In powerShell -&amp;gt; Add-SPSolution -LiteralPath PATH&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVI6co1JaVkS6X20BLr2WysogLkHjGTbXRTibIC3IcOR7Nw0CL0L5PSQq5DY5E6PZRmVbP9fBKmIc7flOs2174DH3xUpouBYbuezXBt6Tm2Yd_qRL6YFDexg2uzmlLjWZTB66fB5WycpM/s1600/PowerShell+SharePoint+2016.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;41&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVI6co1JaVkS6X20BLr2WysogLkHjGTbXRTibIC3IcOR7Nw0CL0L5PSQq5DY5E6PZRmVbP9fBKmIc7flOs2174DH3xUpouBYbuezXBt6Tm2Yd_qRL6YFDexg2uzmlLjWZTB66fB5WycpM/s400/PowerShell+SharePoint+2016.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
b. Installing the solotion site (or in powerShell -&amp;gt; Install-SPSolution or in Central Adminstration -&amp;gt; System Settings -&amp;gt; Manage farm solutions)&lt;/li&gt;
&lt;li&gt;Remove the temporary DB site (in Central Adminstration -&amp;gt; Application Management -&amp;gt; Databases -&amp;gt; Manage content databases DB click on the question and select the Remove content database and click OK)&lt;/li&gt;
&lt;li&gt;Temporarily connect the DB from 2013 (Test-Mount-SPContentDatabase &quot;DB_FROM_2013&quot; -WebApplication &quot;NEW_WEB_APP&quot; in powershell)&lt;/li&gt;
&lt;li&gt;If it is good then, connect the DB from 2013 (Mount-SPContentDatabase &quot;DB_FROM_2013&quot; -WebApplication &quot;NEW_WEB_APP&quot; in powershell)&lt;/li&gt;
&lt;li&gt;Run Upgrade-SPSite -VersionUpgrade in powerShell&lt;/li&gt;
&lt;li&gt;In your own time, Do a Conversion of the wsp from 2013 to 2016 (Big code works great, this is becuse Microsoft didn&#39;t change the mapping of layouts folder - it still 15)&lt;/li&gt;
&lt;li&gt;Good Luck :)&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/1619642805813342428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2017/02/converting-sharepoint-site-from-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/1619642805813342428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/1619642805813342428'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2017/02/converting-sharepoint-site-from-version.html' title='Converting SharePoint site from Version 2013 to 2016'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmcNzOGnpd_nRZ2cWqe4vxpHoNxO3VcevTy5-nPoH4SvbjRV5Ys_EAXGV60R723Fg92madnBfJD7fU6Yix5uZPhkEUKEDu2EaTdaiqRzuzoHlLUf95AWtko86ZrGsLIbnMz6qrnWHr1Bk/s72-c/Central+Adminstration+SharePoint+2016.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-4422836407522403578</id><published>2016-01-20T08:08:00.000+02:00</published><updated>2016-01-20T08:08:28.471+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="IE"/><category scheme="http://www.blogger.com/atom/ns#" term="List Definition"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>The URL  is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web at SharePoint</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I recently had the following error when I tried to add a document to a document library.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136 , 136 , 136) 1pt solid; border-left: rgb(136 , 136 , 136) 1pt solid; border-right: rgb(136 , 136 , 136) 1pt solid; border-top: rgb(136 , 136 , 136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;&quot;&gt;
The URL &amp;lt;file name&amp;gt;&amp;nbsp;&lt;file name=&quot;&quot;&gt; is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.&amp;nbsp;&lt;/file&gt;&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFxs9J4uPiiWZWC70rZCdQ0H9Uj9fS4uA0FPa6TiOeMbgseGyMrDfJid6Y2HZer_byJSKwyfsa71TPdwF4_IB0yu6cOtkE_5c2lY_aoCVIUfU-OSninltX_bK88_giDfUREooii6vNCpw/s1600/The+URL++is+invalid.+-+error.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFxs9J4uPiiWZWC70rZCdQ0H9Uj9fS4uA0FPa6TiOeMbgseGyMrDfJid6Y2HZer_byJSKwyfsa71TPdwF4_IB0yu6cOtkE_5c2lY_aoCVIUfU-OSninltX_bK88_giDfUREooii6vNCpw/s400/The+URL++is+invalid.+-+error.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;A quick search on google said that brought the resources of SQL Server.&lt;/file&gt;I checked and indeed I increased the resources but to no avail.&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;Even my examination chrome and Internet Explorer.
I checked Word file, PDF, and even a small text file.
A.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;Nothing helped.&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;I opened a new document library, and in fact it could add document :)&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;Ok ... what is the problem ???&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;It should be noted in the document library came from List Definition and Content Type preset.&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;I started to check each field and field
Then I got a Date Field in the file probably was not his elemet.xml incubated right.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;When I set it to Today date .... it worked&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;All it needed was simply to write the true definition of the field&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file name=&quot;&quot;&gt;Hope I helped,&lt;/file&gt;&lt;br /&gt;
&lt;file name=&quot;&quot;&gt;Roi&lt;/file&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/4422836407522403578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2016/01/the-url-is-invalid-it-may-refer-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/4422836407522403578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/4422836407522403578'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2016/01/the-url-is-invalid-it-may-refer-to.html' title='The URL &lt;file name&gt; is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web at SharePoint'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFxs9J4uPiiWZWC70rZCdQ0H9Uj9fS4uA0FPa6TiOeMbgseGyMrDfJid6Y2HZer_byJSKwyfsa71TPdwF4_IB0yu6cOtkE_5c2lY_aoCVIUfU-OSninltX_bK88_giDfUREooii6vNCpw/s72-c/The+URL++is+invalid.+-+error.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-5119441487935896363</id><published>2015-04-17T15:18:00.000+03:00</published><updated>2015-04-17T15:21:29.650+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Client Object Model"/><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><title type='text'>SharePoint 2013 - Get Item Url by REST API and Ajax</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hey,&lt;br /&gt;
&lt;br /&gt;
This time I will present code to get client-side item&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;urlRequest = RoiGetItemUrl(item, listName, rootUrl);&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urlRequest.done(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(data, textStatus, jqXHR) {&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;path =&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&quot;&lt;/span&gt;;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jQuery.each(data.d.results,&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(i, result) {&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path = result.EncodedAbsUrl;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Item path is &quot;&amp;nbsp;&lt;/span&gt;+ path);&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urlRequest.fail(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(jqXHR, textStatus, errorThrown) {&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RoiFailHandler(jqXHR, textStatus, errorThrown, state, fileUploadFailMessage);&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Return the link item url&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;RoiGetItemUrl(item, listName, rootUrl)&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;{&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;call = jQuery.ajax({&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url: rootUrl +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;/_api/Web/Lists/getByTitle(&#39;&quot;&lt;/span&gt;&amp;nbsp;+ listName +&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&#39;)/Items?$select=&lt;wbr&gt;&lt;/wbr&gt;EncodedAbsUrl&amp;amp;$filter=Id eq &quot;&lt;/span&gt;&amp;nbsp;+ item.Id,&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type:&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;GET&quot;&lt;/span&gt;,&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataType:&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;json&quot;&lt;/span&gt;,&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers: {&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Accept:&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;application/json;odata=&lt;wbr&gt;&lt;/wbr&gt;verbose&quot;&lt;/span&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;call;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Handler with error event&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;RoiFailHandler(jqXHR, textStatus, errorThrown, state, fileUploadFailMessage) {&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;&amp;nbsp;{&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;response = JSON.parse(jqXHR.responseText)&lt;wbr&gt;&lt;/wbr&gt;;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;message = response ? response.error.message.value : textStatus;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Call failed. Error &quot;&lt;/span&gt;&amp;nbsp;+ message);&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt;&amp;nbsp;(e) {&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Error &quot;&lt;/span&gt;&amp;nbsp;+ e.message);&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;code&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Yours,&lt;br /&gt;
Roi&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/5119441487935896363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2015/04/sharepoint-2013-get-item-url-by-rest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5119441487935896363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5119441487935896363'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2015/04/sharepoint-2013-get-item-url-by-rest.html' title='SharePoint 2013 - Get Item Url by REST API and Ajax'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-5892940256350883520</id><published>2014-09-24T16:19:00.001+03:00</published><updated>2014-09-24T16:20:56.338+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><title type='text'>Delete SharePoint List by force with PowerShell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
if cannot delete your SharePoint list&lt;br /&gt;
&lt;br /&gt;
try this PowerShell code - it will delete your list&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;&quot;&gt;
&lt;code&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$web&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: cadetblue; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Get-SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://www.mysite.com/&quot; style=&quot;color: #1155cc;&quot; target=&quot;_blank&quot;&gt;http://www.mysite.com&lt;/a&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$guid&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Guid&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&quot;a07a5c37-0f7c-423d-&lt;wbr&gt;&lt;/wbr&gt;846a-e9e525f7a8b7&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;
&lt;/code&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;code&gt;&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$web&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: saddlebrown; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Lists&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$guid&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;]&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;code&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: saddlebrown; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;AllowDeletion&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$true&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: saddlebrown; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Update&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;()&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: saddlebrown; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Delete&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;()&lt;u&gt;&lt;/u&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #222222; direction: ltr; font-family: Calibri, sans-serif; font-size: 11pt; margin: 0cm 0cm 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: purple; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;$web&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: saddlebrown; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Dispose&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;()&lt;/span&gt;&lt;/div&gt;
&lt;/code&gt;
&lt;/div&gt;
&lt;br /&gt;
Your,&lt;br /&gt;
Roi&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/5892940256350883520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2014/09/delete-sharepoint-list-by-force-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5892940256350883520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/5892940256350883520'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2014/09/delete-sharepoint-list-by-force-with.html' title='Delete SharePoint List by force with PowerShell'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-954907086829282853</id><published>2013-12-21T16:15:00.000+02:00</published><updated>2013-12-21T16:15:05.612+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Framework 4"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010"/><title type='text'>An error occurred while processing this request</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I recently started to develop a web form with knockout JS. The system is running on SharePoint 2010. The data&amp;nbsp;given / taken &amp;nbsp;to &amp;nbsp;the form with JSON through WCF services.&lt;br /&gt;
&lt;br /&gt;
I had a problem, I did not want that the service will be expose to web. To prevent exposure, created casing in the SharePoint an Application Page.&lt;br /&gt;
&lt;br /&gt;
The&amp;nbsp;WCF&amp;nbsp;data services and any entity framework written in framework 4.5, and as you know that SharePoint&amp;nbsp;2010 and with the Application Page written in 3.5.&lt;br /&gt;
&lt;br /&gt;
This means that every reference to in the form of entity framework like linq or lambda expressions written in framework 3.5 - which created (and still creates) a lot of problems.&lt;br /&gt;
&lt;br /&gt;
I will present you one example of the problem we encounter - but Google unfortunately did not help.&lt;br /&gt;
&lt;br /&gt;
The following code in FW3.5 not working in Client Data Service&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt; (ctx != &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt; &amp;amp;&amp;amp; ctx.UsersContext != &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Consolas; font-size: 12pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;background: white; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt; username = &lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;&quot;username&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 12.0pt; mso-highlight: white;&quot;&gt;var&lt;/span&gt;&lt;span style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 12pt;&quot;&gt; userList = ctx.UsersContext.Where(z =&amp;gt; z.Code == &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;username).AsEnumerable().ToList();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: Consolas; font-size: 12pt; line-height: 115%;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
I even tried Windows Application purpose to see that the SP does not hurt me&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha0LbhHo80zZ2QYMcoXIhjIvUWQ3llZmjfzPVvH-pKzvSsnSJ7jm27RaTtn_nC1kHAn4aYOaTd8DNSl1_-7IuPWoiNbMF1fOGxPMnqjVVtPZyFhaG-FzR2XDm4HLIfhfUotYT_WVyZD0g/s1600/windows+applicaton.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha0LbhHo80zZ2QYMcoXIhjIvUWQ3llZmjfzPVvH-pKzvSsnSJ7jm27RaTtn_nC1kHAn4aYOaTd8DNSl1_-7IuPWoiNbMF1fOGxPMnqjVVtPZyFhaG-FzR2XDm4HLIfhfUotYT_WVyZD0g/s400/windows+applicaton.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The Error Massage was:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-top: rgb(0,0,255) 2px solid; color: white; font-size-adjust: none; font-stretch: normal; font: 16px/1.4 &#39;courier new&#39;, &#39;Andale Mono&#39;, courier, monospace; padding-left: 6px;&quot;&gt;
An error occurred while processing this request&lt;br /&gt;
&lt;br /&gt;
&quot;&amp;lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;utf-8\&quot; standalone=\&quot;yes\&quot;?&amp;gt;&amp;lt;error xmlns=\&quot;http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\&quot;&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;message xml:lang=\&quot;en-US\&quot;&amp;gt;The MaxDataServiceVersion &#39;1.0&#39; is too low for the response. The lowest supported version is &#39;2.0&#39;.&amp;lt;/message&amp;gt;&amp;lt;/error&amp;gt;&quot;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfXAq8IPkRPg8-qF9ziD8MGfWqGvsIAeJU2jOIdMgvJ5rqbKBioD3coYM9pMr1x_bpKv73Det2CnTMZQra1grfpoJsXY_gA-kuynLyiiDpMH2sWRQCnH1a_E7XUrmAXEsxCA4Kxp9TYOU/s1600/An+error+occurred+while+processing+this+request.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfXAq8IPkRPg8-qF9ziD8MGfWqGvsIAeJU2jOIdMgvJ5rqbKBioD3coYM9pMr1x_bpKv73Det2CnTMZQra1grfpoJsXY_gA-kuynLyiiDpMH2sWRQCnH1a_E7XUrmAXEsxCA4Kxp9TYOU/s400/An+error+occurred+while+processing+this+request.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGXqcoBCOJOdFsqNtbm1kOGEBmSBmH9zD4uqVABPanPVfK0LusvXcYRfpf2HmzFRrOavUEu13F_7d290hiVG95vUwM4G11FPRz6PHAYM6JPK0SZWPoY2h5gnCL4Q7zzrlN9suHsmyYfqQ/s1600/An+error+occurred+while+processing+this+reques+2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;355&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGXqcoBCOJOdFsqNtbm1kOGEBmSBmH9zD4uqVABPanPVfK0LusvXcYRfpf2HmzFRrOavUEu13F_7d290hiVG95vUwM4G11FPRz6PHAYM6JPK0SZWPoY2h5gnCL4Q7zzrlN9suHsmyYfqQ/s400/An+error+occurred+while+processing+this+reques+2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#39;ll not go with you all the way I went through hardships&lt;br /&gt;
&lt;br /&gt;
The problem is development server and production server does not always match (which always advisable to have :)).&lt;br /&gt;
One Development server was windows Server 2008 R2 which was the error. And another was a windows server 2008 R2 &lt;b&gt;SP1&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Of course I did not notice until the solution - I only need to install Windows 2008 r2 SP1&lt;br /&gt;
&lt;br /&gt;
Soon I will try to give you a few more problems cropped up this complex project,&lt;br /&gt;
Roi&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/954907086829282853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/12/an-error-occurred-while-processing-this.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/954907086829282853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/954907086829282853'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/12/an-error-occurred-while-processing-this.html' title='An error occurred while processing this request'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha0LbhHo80zZ2QYMcoXIhjIvUWQ3llZmjfzPVvH-pKzvSsnSJ7jm27RaTtn_nC1kHAn4aYOaTd8DNSl1_-7IuPWoiNbMF1fOGxPMnqjVVtPZyFhaG-FzR2XDm4HLIfhfUotYT_WVyZD0g/s72-c/windows+applicaton.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-2398728484518164796</id><published>2013-09-22T14:50:00.000+03:00</published><updated>2015-04-17T15:20:26.153+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Central Administration"/><category scheme="http://www.blogger.com/atom/ns#" term="moss 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><title type='text'>How to open a PDF file (or any file) in the sharepoint site</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Not long ago, I had to view a &lt;b&gt;PDF &lt;/b&gt;file from &lt;b&gt;sharepoint&lt;/b&gt;. But I got the following message:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8dWbxxCAzkNQ6vZ7IymAkdoRmqWwlvw7uvNh96WxiYBF3MyMuDy39nXbbYkrz5AuwfEMtfFXK8TVLrAcs_rfDxQUo6tRqhYoUAwtIjOWmwZatFDqtNJN2kyRtLZrcveAWM957S0loqmI/s1600/save.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8dWbxxCAzkNQ6vZ7IymAkdoRmqWwlvw7uvNh96WxiYBF3MyMuDy39nXbbYkrz5AuwfEMtfFXK8TVLrAcs_rfDxQUo6tRqhYoUAwtIjOWmwZatFDqtNJN2kyRtLZrcveAWM957S0loqmI/s400/save.png&quot; height=&quot;23&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Do you want to save file-name from yours-site&lt;br /&gt;
&lt;br /&gt;
Who does not know this message? But I&#39;ve &amp;nbsp;target &#39;&lt;b&gt;self&lt;/b&gt;&#39; in &#39;a&#39; tag html????&lt;br /&gt;
&lt;br /&gt;
It turns out that SharePoint having your code to protect customers. They can only give you their familiar software like Office, but a pdf file - Microsoft unfamiliar terms.&lt;br /&gt;
&lt;br /&gt;
To resolve, you need to make a change in &lt;b&gt;Central-Admin&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Go to your Web Application manage - &lt;b&gt;General Setting&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3PhTOH7fKQL4NfuCA1aZvikYlJIhMDmSvY52mDshhkA5YXaLiD0kZdfGtN-t9jI69XsNChDO57Ql-tE-g2wfZ7XyfYEmPMErdGDE-gztEsDVaB1Y_b6zD0Zu1kjhyphenhyphenogWFMqvFuyhCmg/s1600/general+settings.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD3PhTOH7fKQL4NfuCA1aZvikYlJIhMDmSvY52mDshhkA5YXaLiD0kZdfGtN-t9jI69XsNChDO57Ql-tE-g2wfZ7XyfYEmPMErdGDE-gztEsDVaB1Y_b6zD0Zu1kjhyphenhyphenogWFMqvFuyhCmg/s1600/general+settings.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Find&lt;b&gt; Browser File Handling&lt;/b&gt; and Change the default to &lt;b&gt;Strict&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQOyxxgnhA1fj_dMu5XqtklX76qrx8rP_ixq10VDz9yhNITS-JgoCIdM0MXDszXvuftNrTfumU7fg33EtbT4IISw6GbCfoXKrxb4z47ZY2XDwEGf9tBBmWkQYgcnAlqfDCScN61OGfvE/s1600/browser+file+handling.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQOyxxgnhA1fj_dMu5XqtklX76qrx8rP_ixq10VDz9yhNITS-JgoCIdM0MXDszXvuftNrTfumU7fg33EtbT4IISw6GbCfoXKrxb4z47ZY2XDwEGf9tBBmWkQYgcnAlqfDCScN61OGfvE/s400/browser+file+handling.png&quot; height=&quot;400&quot; width=&quot;291&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
It all friends, now you can view any file on the portal (at your own risk).&lt;br /&gt;
&lt;br /&gt;
Your,&lt;br /&gt;
Roi&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/2398728484518164796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/09/how-to-open-pdf-file-or-any-file-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/2398728484518164796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/2398728484518164796'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/09/how-to-open-pdf-file-or-any-file-in.html' title='How to open a PDF file (or any file) in the sharepoint site'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8dWbxxCAzkNQ6vZ7IymAkdoRmqWwlvw7uvNh96WxiYBF3MyMuDy39nXbbYkrz5AuwfEMtfFXK8TVLrAcs_rfDxQUo6tRqhYoUAwtIjOWmwZatFDqtNJN2kyRtLZrcveAWM957S0loqmI/s72-c/save.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-867927784894842382</id><published>2013-08-29T20:03:00.000+03:00</published><updated>2013-08-29T20:03:55.603+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Search"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer"/><title type='text'>Service Pack 2‏ (SP2) for Microsoft SharePoint 2010 and Office 2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Last month came new version (Service Pack 2) for Office 2010, SharePoint 2010, &amp;nbsp;Project server 2010 and the Fast 2010.&lt;br /&gt;
&lt;br /&gt;
Here are some links that will help you&lt;br /&gt;
&lt;br /&gt;
Service Pack 2 for Microsoft Office 2010 (KB2687455) 32-Bit Edition&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=39667&quot;&gt;http://www.microsoft.com/en-us/download/details.aspx?id=39667&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2 for Microsoft Office 2010 (KB2687455) 64-Bit Edition&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=39647&quot;&gt;http://www.microsoft.com/en-us/download/details.aspx?id=39647&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;i&gt; In addition to the products in the Office 2010 suite, service pack 2687455 also updates Microsoft Project 2010, Microsoft Visio 2010, and Microsoft SharePoint Designer 2010&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2‏ (SP2) for Microsoft SharePoint Server 2010 (KB2687453)&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/he-il/download/details.aspx?id=39672&quot;&gt;http://www.microsoft.com/he-il/download/details.aspx?id=39672&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2‏ (SP2) for Microsoft SharePoint Foundation 2010 Language Pack (KB2687466)&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/he-il/download/details.aspx?id=39674&quot;&gt;http://www.microsoft.com/he-il/download/details.aspx?id=39674&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2‏ (SP2) for Microsoft FAST Search Server 2010 for SharePoint (KB2687446)&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/he-il/download/details.aspx?id=39670&quot;&gt;http://www.microsoft.com/he-il/download/details.aspx?id=39670&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2 for Microsoft Office Web Apps (KB2687470)&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=39659&quot;&gt;http://www.microsoft.com/en-us/download/details.aspx?id=39659&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2 for Microsoft SharePoint and Project Server 2010 (KB2687452)&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=39657&quot;&gt;http://www.microsoft.com/en-us/download/details.aspx?id=39657&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Service Pack 2 for Microsoft Search Server 2010 (KB2687461)&lt;br /&gt;
&lt;a href=&quot;http://www.microsoft.com/he-il/download/details.aspx?id=39656&quot;&gt;http://www.microsoft.com/he-il/download/details.aspx?id=39656&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Yours,&lt;br /&gt;
Roi&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/867927784894842382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/08/service-pack-2-sp2-for-microsoft.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/867927784894842382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/867927784894842382'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/08/service-pack-2-sp2-for-microsoft.html' title='Service Pack 2‏ (SP2) for Microsoft SharePoint 2010 and Office 2010'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-7417427782615193779</id><published>2013-08-23T13:42:00.000+03:00</published><updated>2013-08-23T13:42:08.418+03:00</updated><title type='text'>Which w3wp process belongs to which App Pool</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Often you wonder which process belongs to which site (in my case usually SharePoint site)? Or maybe you just want to debug only your website on the development server .&lt;br /&gt;
&lt;br /&gt;
For this we have the &lt;b&gt;appcmd.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
all you need is to run this command:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: #141414; border-bottom: rgb(0,0,255) 2px solid; border-left: rgb(0,0,255) 2px solid; border-right: rgb(0,0,255) 2px solid; border-top: rgb(0,0,255) 2px solid; color: white; font-size-adjust: none; font-stretch: normal; font: 16px/1.4 &#39;courier new&#39;, &#39;Andale Mono&#39;, courier, monospace; padding-left: 6px;&quot;&gt;
%windir%\system32\inetsrv\appcmd.exe list wp&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfpL8SfulQiEHCRqQF5YRV8cN-qRhAWaDzd2dm5zBK7hJMArXTDIl55Ld6anSnBNTZeLUTA9ZHwy_M6V74dL7CtArz7C4arZRN3sKjIS6yf2lLuHbWidfG5N8DRoKwKzOmij-SeK_yFEo/s1600/w3wp+process+belongs+app+pool.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;158&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfpL8SfulQiEHCRqQF5YRV8cN-qRhAWaDzd2dm5zBK7hJMArXTDIl55Ld6anSnBNTZeLUTA9ZHwy_M6V74dL7CtArz7C4arZRN3sKjIS6yf2lLuHbWidfG5N8DRoKwKzOmij-SeK_yFEo/s320/w3wp+process+belongs+app+pool.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now you can see who is gobbling sites memory from is id (pid)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqu76lj0EvZa0LS-4aubyNul7EnAVx60AtcFhY6F9_4rwFqxvFn2ePuJOgMFjykDVkGsREASEdOVZ-7ZRZzA3RM8TSDFtF3H_eKYBdxsg22Ya6UC0Mo6SoE8EZSEPumJud5IxYkgf1E3w/s1600/task+manager+pid+w3wp.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqu76lj0EvZa0LS-4aubyNul7EnAVx60AtcFhY6F9_4rwFqxvFn2ePuJOgMFjykDVkGsREASEdOVZ-7ZRZzA3RM8TSDFtF3H_eKYBdxsg22Ya6UC0Mo6SoE8EZSEPumJud5IxYkgf1E3w/s320/task+manager+pid+w3wp.png&quot; width=&quot;232&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Yours,&lt;br /&gt;
Roi&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/7417427782615193779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/08/which-w3wp-process-belongs-to-which-app.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7417427782615193779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7417427782615193779'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/08/which-w3wp-process-belongs-to-which-app.html' title='Which w3wp process belongs to which App Pool'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfpL8SfulQiEHCRqQF5YRV8cN-qRhAWaDzd2dm5zBK7hJMArXTDIl55Ld6anSnBNTZeLUTA9ZHwy_M6V74dL7CtArz7C4arZRN3sKjIS6yf2lLuHbWidfG5N8DRoKwKzOmij-SeK_yFEo/s72-c/w3wp+process+belongs+app+pool.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-7843688227383758257</id><published>2013-08-04T05:00:00.000+03:00</published><updated>2015-04-17T15:24:17.227+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adminstrator"/><category scheme="http://www.blogger.com/atom/ns#" term="moss 2007"/><category scheme="http://www.blogger.com/atom/ns#" term="PowerShell"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2010"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint 2013"/><category scheme="http://www.blogger.com/atom/ns#" term="stsadm"/><category scheme="http://www.blogger.com/atom/ns#" term="System"/><title type='text'>Speedup  Powershell at SharePoint 2013</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you worked in stsadm in &lt;b&gt;MOSS 2007&lt;/b&gt; and even if it worked in&lt;b&gt; SharePoint 2010&lt;/b&gt;, you saw it slow.&lt;br /&gt;
In 2010 we also added the powershell - who was sometimes slow.&lt;br /&gt;
&lt;br /&gt;
It turns out that in &lt;b&gt;sharepoint 2013&lt;/b&gt; not made significant changes - is suggested&lt;br /&gt;
&lt;br /&gt;
The solutions are&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Add crl.microsoft.com to your hosts file and point it to your local machine&lt;/b&gt;&lt;br /&gt;Go to Start -&amp;gt; Run&lt;br /&gt;Click &quot;Drivers&quot; (It need to open &quot;&lt;i&gt;C:\Windows\System32\drivers&lt;/i&gt;&quot; - in not go to it)&lt;br /&gt;Go to folder &quot;&lt;i&gt;etc&lt;/i&gt;&quot; and open &quot;&lt;i&gt;hosts&lt;/i&gt;&quot; file with notepad&lt;br /&gt;and add this line&lt;br /&gt;&lt;i&gt;127.0.0.1 &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;crl.microsoft.com&lt;/i&gt;&lt;br /&gt;Disclosure: this solution find a lot on Google - but my no significant change&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Disable the CRL check by modifying the registry for all user accounts that use STSADM and all service accounts used by SharePoint.&lt;/b&gt;&lt;br /&gt;Go to Start -&amp;gt; &lt;i&gt;regedit &lt;/i&gt;and fund this location &lt;br /&gt;&lt;br /&gt;&lt;i&gt;[HKEY_USERS\&amp;lt;userid&amp;gt;\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing]&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Yon need to change all yours users to&amp;nbsp;&lt;i&gt;“State”=dword:00023e00&amp;nbsp;&lt;/i&gt;&lt;br /&gt;Click &lt;i&gt;Modify &lt;/i&gt;and change it.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHhBlWNRZYtxp4710eUdQgRsGzeYWwOg_IZnm0seTt7VGQgNeADGm7LLDJ5jgxulfN1a8zg-3z1Q_LQvlf0WrLFeyytK0JtU37nsBd2GOQHS9ekgPRYiTcwFJ___UxT-mTPS0XAQQHYdA/s1600/regedit+sharepoint+2013.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHhBlWNRZYtxp4710eUdQgRsGzeYWwOg_IZnm0seTt7VGQgNeADGm7LLDJ5jgxulfN1a8zg-3z1Q_LQvlf0WrLFeyytK0JtU37nsBd2GOQHS9ekgPRYiTcwFJ___UxT-mTPS0XAQQHYdA/s400/regedit+sharepoint+2013.png&quot; height=&quot;400&quot; width=&quot;391&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Yours.&lt;/div&gt;
&lt;div&gt;
Roi&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/7843688227383758257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/08/speedup-powershell-at-sharepoint-2013.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7843688227383758257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/7843688227383758257'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/08/speedup-powershell-at-sharepoint-2013.html' title='Speedup  Powershell at SharePoint 2013'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHhBlWNRZYtxp4710eUdQgRsGzeYWwOg_IZnm0seTt7VGQgNeADGm7LLDJ5jgxulfN1a8zg-3z1Q_LQvlf0WrLFeyytK0JtU37nsBd2GOQHS9ekgPRYiTcwFJ___UxT-mTPS0XAQQHYdA/s72-c/regedit+sharepoint+2013.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3469866748059699775.post-4309701680908549243</id><published>2013-07-04T15:30:00.000+03:00</published><updated>2013-07-04T15:30:00.432+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Free Code"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>Message presented you leave your site</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This time,I present in JavaScript (Jquery) code that checks whether you leave your domain. If so - popup alert to informing you that you are leaving the domain&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-attachment: scroll; background-color: #eeeeee; background-image: none; background-repeat: repeat; border-bottom: rgb(136,136,136) 1pt solid; border-left: rgb(136,136,136) 1pt solid; border-right: rgb(136,136,136) 1pt solid; border-top: rgb(136,136,136) 1pt solid; padding-bottom: 2pt; padding-left: 2pt; padding-right: 2pt; padding-top: 2pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;$(document).ready(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt; () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
$(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;a&quot;&lt;/span&gt;).click(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;event&lt;/span&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;// check if the target link is your.domain.com&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;// if not will show alert message&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.href.indexOf(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;your.domian.com&quot;&lt;/span&gt;) == -1) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.href.startsWith(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;http&quot;&lt;/span&gt;)) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;event&lt;/span&gt;.preventDefault();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; linkLocation = &lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.href;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
alert(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span dir=&quot;RTL&quot; lang=&quot;HE&quot; style=&quot;color: #a31515; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10.0pt;&quot;&gt;Note that you are directed to an external site does not belong to this site&lt;/span&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&#39;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
window.open(linkLocation, &lt;span style=&quot;color: #a31515;&quot;&gt;&#39;&#39;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu0gAD2tWMThugw4TkvSGwAiacD3HqbfcgrtDxE_YW4PUUhUBRmK_1gEFZB9Pvc217UjN4VX0qjaWtRi1h_Y2hT8wGZWL5_khKaJPGgGHAAn73xDMtLHxadvEghhDOto7bUj4y2IVnsA4/s194/javascipt-alert.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu0gAD2tWMThugw4TkvSGwAiacD3HqbfcgrtDxE_YW4PUUhUBRmK_1gEFZB9Pvc217UjN4VX0qjaWtRi1h_Y2hT8wGZWL5_khKaJPGgGHAAn73xDMtLHxadvEghhDOto7bUj4y2IVnsA4/s194/javascipt-alert.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;direction: ltr; unicode-bidi: embed;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 10.0pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Of course, change the code from &quot;your.domian.com&quot; to&amp;nbsp;your site.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
thanks,&lt;/div&gt;
&lt;div&gt;
Roi&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://iwillsharemypoint.blogspot.com/feeds/4309701680908549243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/07/message-presented-you-leave-your-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/4309701680908549243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3469866748059699775/posts/default/4309701680908549243'/><link rel='alternate' type='text/html' href='http://iwillsharemypoint.blogspot.com/2013/07/message-presented-you-leave-your-site.html' title='Message presented you leave your site'/><author><name>Roi kolbinger</name><uri>http://www.blogger.com/profile/10947614481622890502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF2ydNp9Q6udQpUmkDpyGkWzZuu0RWgN5QE2IZdzuFi4IBviFP6fGbIh_uNWCS6h5gUUQKR92U-GMfCF_AYbA4Hao3JNk98IdRzDtFCWlC479_DFFcbchTdC1KkuOBrlAdqTMLccCLcGnGpdr3oEfES1WpwqQIILr2W3XTi9R5huJZG2w/s220/roi.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgu0gAD2tWMThugw4TkvSGwAiacD3HqbfcgrtDxE_YW4PUUhUBRmK_1gEFZB9Pvc217UjN4VX0qjaWtRi1h_Y2hT8wGZWL5_khKaJPGgGHAAn73xDMtLHxadvEghhDOto7bUj4y2IVnsA4/s72-c/javascipt-alert.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>