text – part of the sprite or dynamically generated

I am trying to reproduce the same stamping tool as the one we found in the video game "Papers, Please".

In my case I want my users to be able to modify the text they are going to stamp. I will use a similar blocky font.

As you probably noticed in this sprite, the top of the letters is clearer in order to give an effect of depth.

How should I proceed to copy the same effect? The only solution that came to mind was to create sprites for each needed letter and then include them dynamically over my sprite but there has to be a more efficient way. I suspect the author directly drew them in the sprite but I’m not sure.

red stamping tool from the video game "Papers, Please"

Is og:image and copyright free when using on own site?

When using og:image the website tell other sites that Facebook and other social media platforms can use this image as a preview for a shared link.

If I have a site that is not a social media platform, like a blog or just a news collection site, can I use their image specified in og:image?

This question has been asked before on other forums but no one seems to have an answer for it.

This one question can be split into a few subquestions:

  1. Can I use an image from a site from og:image on my site as a preview of a news snippet Without breaking a copyright rule?
  2. How can Facebook download and use og:image without asking anyone about it? og: is not a Facebook specific tag.

For more context around my question: I’m building a site that collects news from various sources and on the site group them by location. I know Google will not like it because of duplicate content but my trafic will come direct trafic from returning users.

the_modified_time showing wrong date

I have an wordpress self-hosted installation that is over 10 years old. I was updating the template files to show the last modified date instead of the published date for my posts.

Old snippet: <time datetime="<?php the_time('c');?>"> <?php the_time('j F Y'); ?></time>

New snippet: <time datetime="<?php the_modified_time('c');?>"><?php the_modified_time('j F Y'); ?>

Here’s where it got weird. Every post that was modified before 6 februari 2021 shows the date 6 februari 2021. Every post that got updated after 6 februari 2021 shows the correct date.

I double checked this. There are posts that haven’t been updated since 2014 or 2011, yet they show 6 februari 2021. I even went into phpMyAdmin and the post_modified field shows the correct date (not 6 februari 2021).

Does anyone have an idea what it causing this or how to fix this? I have some suspects:

  • I’m using older php version: 7.2.34
  • I’m using an old sql server (WP site diagnose says so)
  • I vagely remember doing a sort of database update. Yoast SEO promted me to do something for indexing purposes.

solution of $\frac{1}{x}=\infty$

Is there a way to obtain solution $ x=0$ for the equation $ \frac{1}{x}=\infty$ in Mathematica?

I tried Solve, Reduce, FindInstance and with different options, but Mathematica keeps beeping on me that system contains an infinite object or it gives {} as answer, meaning no solution. I tried with Infinity and ComplexInfinity.

Maple gives $ x=0$ as solution.

Why is 0 not a solution to $ \frac{1}{x}=\infty$ ? Since 1/0 gives ComplexInfinity

Mathematica graphics

Some attempts

ClearAll[x]; eq = 1/x == ComplexInfinity; Solve[eq, x, Reals, Method -> "Reduce"] Solve[eq, x] Reduce[eq, x] FindInstance[eq, x] SolveAlways[eq, x] 

Maple:

enter image description here

Is there some deep mathematical reason why $ 0$ can not be solution to this equation according to Mathematica, and is there some workaround?

DB2 Linux authentication fails

I have DB2 Express-C v10.5 instance configured to authenticate against LDAP. The LDAP sever is going to be shutdown and I should configure the same DB2 instance to use Linux authentication.

I copied users from the LDAP  server to a local Linux host running DB2. Then I did shutdown the LDAP server. After that I changed DB2 authentication settings db2 update dbm cfg using SRVCON_PW_PLUGIN IBMOSauthserver (used to be IBMLDAPauthserver before) and restarted DB2.

Applications access the database with the username db2smth (name changed due to privacy reasons). I can connect to a database with db2 connect to dbname user db2inst1 using '********' but connecting to the same database as db2smth fails:

db2 => connect to dbname user db2smth using '********'  SQL30082N Security processing failed with reason "24" ("USERNAME AND/OR PASSWORD INVALID"). SQLSTATE=08001 

su - db2smth and su - db2inst1 works fine which means that Linux authentication works fine.

How can I diagnose what’s wrong with the authentication?

Cheap Linux Reseller Hosting with cPanel/WHM panel @ $3/MO – Hostpoco.com

Need to host multiple websites or starting a business yourself? Try our reseller hosting plans!
Linux Reseller Hosting is the famous and well-known option for reseller hosting. Cheap Linux reseller hosting comes with “Web Host Manager” as a control panel where multiple activities like Cpanel account creation, adding/editing packages, suspension/unsuspension of accounts, managing SSL’s, limiting resources, assigning IP’s etc.

Our Reseller Hosting service is a great choice for developers with multiple websites and for hosting resellers. It is using the same great cPanel control panel as Shared Hosting plus it has a Web Host Manager (WHM) control panel which allows you to create separate cPanel accounts for your clients and host unlimited domains!

—————–
Main Features
—————–

– FAST SERVERS
– USER-FRIENDLY CONTROL PANEL
– 1-CLICK SCRIPT INSTALLER
– FREE WEBSITE MIGRATION
– SECURE DATA CENTER
– 99.9% UPTIME
– PREMIUM SUPPORT
– MONEY-BACK GUARANTEE
– FREE Web Host Manager
– FREE AUTO SSL

———————————-
Linux Reseller Hosting Plan
———————————-

*Reseller Startup:

– 10 cPanel Accounts
– 25GB Web Space
– 250GB Bandwidth
– Tier 3 Technical Support
***ORDER NOW – $3/MO

*Reseller Pro:

– 15 cPanel Accounts
– 50GB Web Space
– 500GB Bandwidth
– Tier 3 Technical Support
***ORDER NOW – $6/MO

*Reseller Premium:

– 25 cPanel Accounts
– 75GB Web Space
– 750GB Bandwidth
– FREE Domain for Life
– Tier 4 Technical Support
***ORDER NOW – $9/MO

*Reseller Elite:

– 60 cPanel Accounts
– Unlimited Web Space
– Unlimited Bandwidth
– FREE Domain for Life
– Tier 4 Technical Support
***ORDER NOW – $12/MO

Need more info? Please feel free to Open Ticket or send an email to sales@hostpoco.com
https://www.hostpoco.com/

Follow us on Twitter: https://twitter.com/HostPoco
Find us on Facebook: https://www.facebook.com/HostPoco/

Hot reload with bundled assets are not being loaded/auto refresh in browser

I am trying to hot reload with my project’s bundled assets, but hot reload is not executing the browser refreshes when I make changes to any of my files.

I am looking at the F12 browser console, but nothing is being executed or loading, its just blank.

functions.php

function workshop_01_theme() {     wp_enqueue_script('workshop_01-js', get_theme_file_uri('/bundled-assets/scripts.bedc8565a6cb22e37037.js'), NULL, '1.0', true);     wp_enqueue_style('worskshop_01-style', get_theme_file_uri('/bundled-assets/styles.bedc8565a6cb22e37037.css')); } add_action('wp_enqueue_scripts', 'workshop_01_theme'); 

enter image description here

package.json

{   "name": "workshop_01",   "version": "1.0.0",   "description": "",   "main": "index.js",   "scripts": {     "dev": "npm-run-all -p devFast buildWatch",     "devFast": "webpack serve",     "buildWatch": "webpack --watch",     "build": "webpack",     "test": "echo \"Error: no test specified\" && exit 1"   },   "keywords": [],   "author": "",   "license": "ISC",   "dependencies": {     "@babel/core": "^7.14.5",     "@babel/preset-env": "^7.14.5",     "@babel/preset-react": "^7.14.5",     "@glidejs/glide": "^3.4.1",     "autoprefixer": "^10.2.6",     "axios": "^0.21.1",     "babel-loader": "^8.2.2",     "clean-webpack-plugin": "^4.0.0-alpha.0",     "css-loader": "^5.2.6",     "cssnano": "^5.0.6",     "fs-extra": "^10.0.0",     "jquery": "^3.6.0",     "mini-css-extract-plugin": "^1.6.0",     "normalize.css": "^8.0.1",     "npm-run-all": "^4.1.5",     "postcss-color-function": "^4.1.0",     "postcss-hexrgba": "^2.0.1",     "postcss-import": "^14.0.2",     "postcss-loader": "^6.1.0",     "postcss-mixins": "^8.1.0",     "postcss-nested": "^5.0.5",     "postcss-simple-vars": "^6.0.3",     "react": "^17.0.2",     "react-dom": "^17.0.2",     "style-loader": "^2.0.0",     "webpack": "^5.38.1",     "webpack-cli": "^4.7.2",     "webpack-dev-server": "^3.11.2",     "webpack-manifest-plugin": "^3.1.1"   } } 

scripts.js

import "../css/styles.css"  // Allow new JS and CSS to load in browser without a traditional page refresh if (module.hot) {   module.hot.accept() } 

webpack.config.js

const currentTask = process.env.npm_lifecycle_event const path = require("path") const MiniCssExtractPlugin = require("mini-css-extract-plugin") const { CleanWebpackPlugin } = require("clean-webpack-plugin") const { WebpackManifestPlugin } = require("webpack-manifest-plugin") const fse = require("fs-extra")  const postCSSPlugins = [require("postcss-import"), require("postcss-mixins"), require("postcss-simple-vars"), require("postcss-nested"), require("postcss-hexrgba"), require("postcss-color-function"), require("autoprefixer")]  class RunAfterCompile {   apply(compiler) {     compiler.hooks.done.tap("Update functions.php", function () {       // update functions php here       const manifest = fse.readJsonSync("./bundled-assets/manifest.json")        fse.readFile("./functions.php", "utf8", function (err, data) {         if (err) {           console.log(err)         }          const scriptsRegEx = new RegExp("/bundled-assets/scripts.+?'", "g")         const vendorsRegEx = new RegExp("/bundled-assets/vendors.+?'", "g")         const cssRegEx = new RegExp("/bundled-assets/styles.+?'", "g")          let result = data.replace(scriptsRegEx, `/bundled-assets/$  {manifest["scripts.js"]}'`).replace(vendorsRegEx, `/bundled-assets/$  {manifest["vendors~scripts.js"]}'`).replace(cssRegEx, `/bundled-assets/$  {manifest["scripts.css"]}'`)          fse.writeFile("./functions.php", result, "utf8", function (err) {           if (err) return console.log(err)         })       })     })   } }  let cssConfig = {   test: /\.css$  /i,   use: ["css-loader?url=false", { loader: "postcss-loader", options: { postcssOptions :{ plugins: postCSSPlugins } }}] }  let config = {   entry: {     scripts: "./js/scripts.js"   },   plugins: [],   module: {     rules: [       cssConfig,       {         test: /\.js$  /,         exclude: /(node_modules)/,         use: {           loader: "babel-loader",           options: {             presets: ["@babel/preset-react", ["@babel/preset-env", { targets: { node: "12" } }]]           }         }       }     ]   } }  if (currentTask == "devFast") {   config.devtool = "source-map"   cssConfig.use.unshift("style-loader")   config.output = {     filename: "bundled.js",     publicPath: "http://localhost:3000/"   }   config.devServer = {     before: function (app, server) {       // server._watch(["./**/*.php", "./**/*.js"])       server._watch(["./**/*.php", "!./functions.php"])     },     public: "http://localhost:3000",     publicPath: "http://localhost:3000/",     disableHostCheck: true,     contentBase: path.join(__dirname),     contentBasePublicPath: "http://localhost:3000/",     hot: true,     port: 3000,     headers: {       "Access-Control-Allow-Origin": "*"     }   }   config.mode = "development" }  if (currentTask == "build" || currentTask == "buildWatch") {   cssConfig.use.unshift(MiniCssExtractPlugin.loader)   postCSSPlugins.push(require("cssnano"))   config.output = {     publicPath: "/wp-content/themes/workshop_01/bundled-assets/",     filename: "[name].[chunkhash].js",     chunkFilename: "[name].[chunkhash].js",     path: path.resolve(__dirname, "bundled-assets")   }   config.mode = "production"   config.optimization = {     splitChunks: { chunks: "all" }   }   config.plugins.push(new CleanWebpackPlugin(), new MiniCssExtractPlugin({ filename: "styles.[chunkhash].css" }), new WebpackManifestPlugin({ publicPath: "" }), new RunAfterCompile()) }  module.exports = config 

my webpack config file may be the issue, but I dont know what I should be doing to make hot reload work for my project here…

Solving a complex equation with Solve

I would like to solve:

$ e^{-b (1.365)} + e^{-b(-0.350)} + e^{-b(-0.378)} = 0$ , where $ b$ is complex.

So, I have written:

Solve[{E^((-b1 - I b2) (1.365)) + E^((-b1 - I b2) (-0.350)) + E^((-b1 - I b2) (-0.378)) == 0, {b1, b2} \[Element] Reals}, {b1,b2}] 

which returns a huge list. How can I get a exact answer? And if it has many solutions, is it possible that I plot the solution points altogether in the complex plane?

How to migrate a MySQL server database from an older version to a newer?

I am trying to import a database from an older MySQL server (v 5.0) to a newer (8.0).

So I exported the dump file from the original database, and tried to import in the newer system, but then it’s showing a thousand syntax errors.

The thing is that the older database is working fine, so I presume that the problem is the version. May someone help? Thanks!