Cannot locate file

I’m following an SDL C++ tutorial and they advised me to copy that file ( into my project file to remove any errors occurring if the code was on a different computer. I have installed both libsdl2-2.0 and libsdl2-dev onto my machine, but cannot find their files in /lib/x86_64-linux-gnu (like in the tutorial). Is it maybe stored in a different location now, or what?

Note: I can run code including the SDL header with no problem, so it does exist on my computer, somewhere…

I did try


but with no luck

Go to Source
Author: Netsu

MASSIVE Identity column value jump in SQL Server 2014

So in the middle of basic coding and testing we saw a huge non-patterned jump in Identity values for multiple tables. We are unaware of any server blips or attempted bulk operations, but DBAs are looking into logs. The gaps are not the typical 1,000 or 10,000 seen with server restarts and such. The gap for Application_NO is 10,410,345 for a table with 2,320 rows and Transaction_Payment_NO jumped an astonishing 1,712,149,313 for a table with 685 records. Any ideas on what could be causing such large and seemingly arbitrary jumps.

Identity value jumps on multiple tables

Go to Source
Author: BikeMrown

I copied a file into my VM, but the folder is a regular file

I’m new to Linux, and I’m trying to untar the following file, so I moved from GCS to the Virtual Machine with the following command

gsutil cp gs://ghtorrent_datadump/mysql-2020-07-17.tar home/ghtorrent

but now when I want to use

tar -xvf ghtorrent/mysql-2020-07-17.tar

I get tar: ghtorrent/mysql-2020-07-17.tar: Cannot open: Not a directory

Looking for an explanation I found that ghtorrent is a regular file instead of a directory

pablo_racana@untarfiles:~/home$ ls -ld ghtorrent
-rw-r--r-- 1 pablo_racana pablo_racana 478100428800 Aug 18 15:19 ghtorrent

what did I did wrong? should have specified home/ghtorrent/ as destination directory?
Is there something that I can do to not lose the progress?

Go to Source
Author: Pablo Racana

How to Fix Gradle Wrapper Permission Denied Error

I am getting this “gradlew permission denied” error after pushing my code to my GitLab repository. The build is not able to continue because the gradle wrapper is not able to run.

What is causing this and how to fix it?


From a local terminal/command line, use the Git command that follows to fix this issue:

git update-index --chmod=+x gradlew

Continue to commit the modifications to the gradlew file.

Push the changes to your Git repository.

You can read more at this page:

Colliding custom permalink rules

I’m developing a reviews site in WordPress, but am having some difficulties setting up the permalink structure I have in mind.

I created two extra custom post types “reviews” and “products”.
They both have the taxonomy “categories” attached to it. All reviews have the same name as the deepest category attached to it.

Reason for this I want 3 different pages:

  • category page: list view of products within that category + a link to the detailed review for that category
  • review page: a detailed review of all products listed beneath each other.
  • product page: a detailed review of one particular product.

The permalink structure should be like this:

  • category page: /%category%/ (so just the category hierarchy)
  • review page: /%category%/review (I don’t use %postname% because a review will only be in one category hierarchy and I want to show the full category hierarchy in the url)
  • product page: /%category%/%postname%/review

Is this actually technically possible?
I’ve been fiddling a lot yet (with adding permastructs) but only get 1 or 2 to work, but they seem to collide with eachother. Is there a way to bypass this?


Go to Source
Author: Laurent

mysql has two pid files

I just finished re-building my (5.7) slave from a hot backup. When I issue

 systemctl start mysqld

it just “sat” there for over 20 minutes. It usually takes less than 10 seconds for the service to start. When I look at my server status, I see two mysql processes

mysql     1938     1  0 15:25 ?        00:00:00 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/
mysql     1940     1 99 15:25 ?        00:11:48 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/
root      4024  3122  0 15:37 pts/0    00:00:00 grep --color=auto mysqld

I stopped and restarted my service and there are two different PIDs showing up again

 [root@bi-db002-prd ~]# systemctl status mysqld -l
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: activating (start) since Mon 2020-08-17 15:46:45 UTC; 45s ago
     Docs: man:mysqld(8)
  Process: 7066 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
  Control: 7088 (mysqld)
   CGroup: /system.slice/mysqld.service
           ├─7088 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/
           └─7092 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/

Aug 17 15:46:45 bi-db002-prd systemd[1]: Starting MySQL Server...

I have never seen that. Is there something incorrect with my configuration?

Go to Source
Author: A B

How to follow IP changes in LAN to avoid remote connectivity issues

I’ve set up remote access to a computer and had to enter the authorized IPs which can connect remotely to the computer. These IPs change from time to time and I have no control over that, so every time they change I have to go update the authorized IPs list. Usually, a user will let me know that the connection failed.

Is there a way to somehow track this IP changes (happening on a company’s LAN) so I can proactively update my list instead of having to wait until the connection fails to go and see what the new IP is ?

If it’s not possible, how is this usually handled by IT security professionals ?

Go to Source
Author: Trusky

Javascript(Typescript) Generic Api Call Service

I’m building a SSR application with React and Next js and this application will communicate with with the Rest service already created. Application must send request to Rest service on both client side and server side. So I have to create one ApiCall service works both client side and server side. I tried build something but I think its not good.


export function apiCall<T extends BaseQuery>(
 query: T,
 options?: UseQueryOptions<T>,
 ctx?: GetServerSidePropsContext
): QueryResult<T> {
    const [data, setData] = GState()(null);
    const [error, setError] = GState()(null);
    const [loading, setLoading] = GState()<Boolean>(true);

    const headersWithToken = headers(TOKEN.get(ctx.req));
    const variables: any = options.variables;

    const queryP = query(variables, headersWithToken)
    .then((respData) => {
       return respData;
    .catch((e) => {

    return {
       data: data,
       error: error,
       loading: loading,
       query: queryP,

GState.ts Closure

const GState = function () {
   let _val;

   function useState<T>(initialValue: T) {
     _val = _val || initialValue;

     function setState(newVal: T) {
        _val = newVal;

     function getState(): T {
       return _val;
     return [getState, setState];
return useState;

export default GState;

Api endpoints

const getCredit = (headers: {}) => Promise<ICreditResponse> = (headers) => {
  return ApiService.setHeaders(headers).getReq({
    route: "/credits/my",
    isPrivate: true,

const healthCheckReq = (headers: {}) => Promise<string> = (headers) => {
  const apis = ApiService;
  return apis.getReq({ route: `/health`, isPrivate: false });

const getMerchantShippingDays = (
  s: {
    merchantId: string;
  headers: {}
) => Promise<IShippingDaysResponse> = ({ merchantId }, headers) =>
      route: `/shippingDays/merchant/${merchantId}`,
      isPrivate: true,

Example Usage :

export default function Health({ health }: HealthProps) {

  const { data: getHealthData, loading: getHealthLoading } = apiCall(
     { variables: { id: "1" } }

  const __ = (
        <Container fluid>
           {!getHealthLoading() && getHealthData().map(data => 

  return __;

export const getServerSideProps: GetServerSideProps = async (
  ctx: GetServerSidePropsContext
  ) => {
     const { data: healthData, loading: healthLoading, query } = apiCall(
       { variables: { id: "1" } },

    await query;

    return { props: { health: healthData } };

I need advice for that api service. How can I improve that or if I don’t need this service how can I do request to rest service with generic functions

Go to Source
Author: zblash

Reference request for permissions needed by linux commands

Good day,

I want to ask if there is a comprehensive reference for permissions needed by each linux command and on which directores (ex : source/target) to do its primary role … something like a list, I wasn’t successful to find that in the manual but if it exists , please help me know in what part it resides in the manual

I am preparing a summary of that during my self study thats why am asking so if any one could help me it will be appreciated

Go to Source
Author: AbdAllah Talaat

How do I check if a theme has a file single-cpt.php?

I’m creating a cpt plugin that will add ‘single-cpt.php’ in the theme directory.
The following code works but only if I put it in a functions.php (theme) folder.

// check if the file exists
$checkFile = locate_template('single-cpt.php');
if (!empty($checkFile)) {
    echo "Found!";
} else {
    echo "Not found";

How do I get the plugin check if the current theme has that single-cpt.php file ?

Go to Source
Author: Ash

Some users have delay In Webex

In recent conferences, Webex (and ms Teams actually), some users had feedback and delay while others didn’t.

I suspect that this is related to the fact these users (and only these users) run Webex via Remote Desktop or virtualization Setup that adds to latency to an extent that normal feedback killing logarithm doesn’t work anymore.

Has anybody experienced similar symptoms?

Go to Source
Author: mokko

wordpress Comments error

I am having a problem in my WordPress site, when I create a new post or update a post to my site automatically get 2-6 comment by my post(Author is post title and comment is post content).i have to delete manually those comments. i am getting this error almost 10 days.i thought it might be theme or plugin but i check all of them by disabling. but the same thing happens if i disabled all plugin and use another theme.

I am using the latest version of WordPress and my host is theme is updated. i am using generatepress theme and also i changed the theme to check but the problem wasn’t resolved.i couldn’t find any solution and don’t have an idea why this is happing.plz if you can help me with this problem.

Go to Source
Author: jaman28

Scheduling an OpenShift “job”

I have a backup process that involves an Openshift “job”.
We fire off this job by

  • oc delete the previous job object
  • Edit the following yaml with the backup location which is either backupa or backupb mount. this alternates each time we do a backup so we always have the last 2 backups.
apiVersion: batch/v1
kind: Job
  name: backup-job
      - name: backup-job
        image: example-registry.svc:5000/someproject/some-image:latest
        - /bin/sh
        - -c
        - DIR=/path/to/backupb; cd ${DIR}; /do/backup
          - mountPath: /path/to/backupa
            name: example-backup-dira
          - mountPath: /path/to/backupb
            name: example-backup-dirb
      - name: connector-data
          claimName: shared-connector-data
      - name: example-backup-dira
          claimName: backupa
      - name: example-backup-dirb
          claimName: backupb
      restartPolicy: Never
  backoffLimit: 1
  • oc create the yaml which iniates the backup.

I would like to create a weekly job for this that runs on a schedule.

What is the Openshift/Kubernetes way of scheduling such a thing?

Google gets me here

But I’m a little unclear how to use this? Do I create a template for my backup job and then create a scheduled job that takes my backup template, substitutes the backup mount variable, and runs based on a Cron expression?

I’m just looking for a little guidance how the Openshift experts out there accomplish this so I’m not shooting in the dark.

Go to Source
Author: Nicholas DiPiazza