Import from other projects not working properly

@Sven I have four projects set up that I use to clean lists.

Each project is creating verified’s from one of four sold SER lists.

Then, I create a new project for whatever I want to link to.

In the past, when I import verified from other projects all the links would be moved to my new project to build on those targets.

Now SER is filtering or something and not all those links are being brought over.

For example, I have 2400 verified links from today’s cleaning.

But when I import from those projects into the new project, only 408 are copied over.

What’s going on that’s causing that?

remove metabox is not working for wp 5.7

Hi I am using wordpress 5.7 and Vidio theme, Here the theme have some plugins with it. Those plugins create a metabox with id haru_video_attached_directors. I want to remove this metabox from custom post type haru_video for that I used wp function remove_meta_box(put in child-theme functions.php) but not getting success. I have already followed the similar questions and added almost every hook but still not getting the desired output.

function remove_metaboxes() {    remove_meta_box( 'haru_video_attached_directors' , 'haru_video' , 'normal' );    remove_meta_box( 'haru_video_attached_directors' , 'post' , 'normal' ); } add_action( 'admin_head' , 'remove_metaboxes' ); add_action( 'admin_menu' , 'remove_metaboxes' ); add_action( 'admin_init' , 'remove_metaboxes' ); add_action( 'wp_dashboard_setup', 'remove_metaboxes', 20 ); 

Code present in Plugin

$  video_submit->add_field( array(         'default_cb' => 'haru_maybe_set_default_from_posted_values',         'name'    => esc_html__( 'Attached Directors', 'haru-vidi' ),         'desc'    => '',         'id'      => 'haru_video_attached_directors',         'type'    => 'custom_attached_posts',         'column'  => true, // Output in the admin post-listing as a custom column. https://github.com/CMB2/CMB2/wiki/Field-Parameters#column         'options' => array(             'show_thumbnails' => true, // Show thumbnails on the left             'filter_boxes'    => true, // Show a text box for filtering the results             'query_args'      => array(                 'posts_per_page' => 10,                 'post_type'      => 'haru_director',             ), // override the get_posts args         ),     ) ); 

Another not working 2D collision system

As many before me, I’m trying to make a 2D platformer. The current problem is the collision system. I tried to be smart and use sweeping and line segments to implement this, which ended up somewhat working, but not quite.

Here’s what I’m trying to do:

  1. The player is made of four vertices
  2. The map is made of axis-aligned line segments creating polygons
  3. Calculate the next frame’s position of all four points
  4. Create four line segments from the before/after positions, one for each vert
  5. Intersect these segments with the map
  6. Move the player to the collision point on the axis perpendicular to the wall only

Here’s what happens:

  1. Some walls work just fine
  2. Some walls have collision from the "wrong" side
  3. Some walls have no collision
  4. Some walls stop having collisions when sliding on them
  5. Some walls can’t be moved away from

Here’s the relevant excerpts of my code. Subject to be refactored, I wanted to get this working first.

// Player public class Player extends Sprite {      private PlayScreen scr;      public Vector2 vel;     public Vector2 lastMove;      public Vector2[] verts = new Vector2[2];           public Player(PlayScreen s, float x, float y) {         this.scr = s;         this.setPosition(x, y);         this.setSize(8, 16);         vel = new Vector2(0, 0);         lastMove = new Vector2(0, 0);                  Rectangle r = this.getBoundingRectangle();         float x1 = r.x;         float x2 = r.x + r.width;         float y1 = r.y;          float y2 = r.y + r.height;                  verts[0] = new Vector2(x1,y1);         verts[1] = new Vector2(x2,y2);     }      public void update(float delta) {         float xpos = this.getX();         float ypos = this.getY();          float dx = vel.x * delta;         float dy = vel.y * delta;          this.setPosition(xpos + dx, ypos + dy);         this.lastMove.set(dx, dy);     }      public Vector2 getTR() {         return new Vector2(this.getVertices()[Batch.X3],this.getVertices()[Batch.Y3]);     }      public Vector2 getBR() {         return new Vector2(this.getVertices()[Batch.X4],this.getVertices()[Batch.Y4]);     }          public Vector2 getTL() {         return new Vector2(this.getVertices()[Batch.X2],this.getVertices()[Batch.Y2]);     }          public Vector2 getBL() {         return new Vector2(this.getVertices()[Batch.X1],this.getVertices()[Batch.Y1]);     }      } 
// PlayScreen public class PlayScreen implements Screen {      private OrthogonalTiledMapRenderer renderer;     private Player player;     private Collision collision;      public PlayScreen(MovementGame mg) {                  // omitted cam/viewport setup         // omitted map loading         this.renderer = new OrthogonalTiledMapRenderer(map, 1);         cam.position.set(viewport.getWorldWidth() / 2, viewport.getWorldHeight() / 2, 0);          player = new Player(this, -50, -50);         collision = new Collision();          for (PolygonMapObject obj : this.map.getLayers().get(2).getObjects().getByType(PolygonMapObject.class)) {             collision.addObj(obj);         }     }      @Override     public void render(float delta) {         Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);          player.vel.x = 0;         player.vel.y = 0;          // omitted input handling. sets player.vel to +-100 x/y on arrow key press          player.update(delta);          // omitted debug player drawing         // omitted debug player drawing for next position          collision.doCollision(player, cam);         cam.position.lerp(new Vector3(player.getX(), player.getY(), 0),1f);          cam.update();         renderer.setView(cam);          // omitted debug map drawing     } }  
public class Collision {      public ArrayList<Vector2[]> lines;      public Collision() {         lines = new ArrayList<>();     }      // convert polygon verts to lines and add to list     public void addObj(PolygonMapObject obj) {         float[] a = obj.getPolygon().getTransformedVertices();         ArrayList<Vector2> verts = new ArrayList<>();         for (int i = 0; i < obj.getPolygon().getVertices().length; i += 2) {             verts.add(new Vector2(a[i + 0], a[i + 1]));         }          for (int i = 0; i < verts.size() - 1; i++) {             lines.add(new Vector2[] { verts.get(i), verts.get(i + 1) });         }         lines.add(new Vector2[] { verts.get(0), verts.get(verts.size() - 1) });     }      // detect and resolve collision. camera is for debug drawing     public void doCollision(Player p, Camera cam) {         Vector2 col;         float dx = 0;         float dy = 0;         // try to intersect with every line         for (Vector2[] line : lines) {             dx = dy = 0;             // create the movement line for each vert of the player              // try to intersect it with the currect line             // there HAS to be a better way...             if ((col = getLineIntersection(p.getBL(), p.getBL().sub(p.lastMove), line[0], line[1])) != null) {                 dx = p.getBL().x - col.x;                 dy = p.getBL().y - col.y;             }             if ((col = getLineIntersection(p.getTL(), p.getTL().sub(p.lastMove), line[0], line[1])) != null) {                 dx = p.getTL().x - col.x;                 dy = p.getTL().y - col.y;             }             if ((col = getLineIntersection(p.getBR(), p.getBR().sub(p.lastMove), line[0], line[1])) != null) {                 dx = p.getBR().x - col.x;                 dy = p.getBR().y - col.y;             }             if ((col = getLineIntersection(p.getTR(), p.getTR().sub(p.lastMove), line[0], line[1])) != null) {                 dx = p.getTR().x - col.x;                 dy = p.getTR().y - col.y;             }             // something collided. resolve             if (col != null) {                                  if (line[0].y == line[1].y) {                 // line is horizontal. push player up/down only                     p.vel.x = 0;                     dx = 0;                 } else {                 // line is vertical. push player left/right only                     p.vel.y=0;                     dy = 0;                 }                  // omitted debug drawing                 // finally, update the player pos                 p.setPosition(p.getX() - dx, p.getY() - dy);             }         }     }      private Vector2 getLineIntersection(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3) {         Vector2 res = new Vector2();         if (Intersector.intersectSegments(p0, p1, p2, p3, res)) {             return res;         } else {             return null;         }     } } 

Any ideas or tips on how this could be turned into something working? Or should I give up on this and do grid AABB-collision instead?

Finally, here’s a rare screenshot of the code doing what it should. Blue is the player’s position before the movement, red the intended position, yellow the resolved position and white the distance the player moved too far. screenshot

Same colors, but issue #5. The collision gets resolved onto the wall instead of away.
screenshot2

Thank you in advance for your help! Please excuse the form of this question, this is making me lose my mind…

Sqlite3 database insertion not working

Sqlite3 database insertion not working. I’m unable to insert user data such as user name, email id, password in sqlite3 database while enter data for an android app.

fun insertion(title:String, subtitle:String):String { val db = this.writableDatabase val Values = ContentValues()     Values.put("title ",title)     Values.put(" Subtitle", subtitle) val newRowId = db?.insert("table1", null, Values)  if(newRowId == -1. toLong()       return "failed" else       return "success" } 

This code return failed because of the insert function returns the row id as -1. Which means the row is not inserted. There no bug encountered while running app.From android studio file explore I download the database file and run that file in sqlite browser. Then I can found even table also created but row is not inserted. I don’t know why. Please help me! Don’t close my question please!

wp_register_script() and wp_register_style() 4th parameter (version) not working for logged out users

I’m enqueuing scripts and styles from functions.php in my custom theme. The 4th parameter is the version number. It’s working only for logged in users.

wp_register_script( 'my-handle', get_stylesheet_directory_uri( __FILE__ ) . '/js/my-script.js', array( '' ), filemtime( get_stylesheet_directory( __FILE__ ) . '/js/my-script.js' ), true ); wp_enqueue_script( 'my-handle' ); 

Logged in:

<script src="https://mysite.com.local/path/to/my-script.js?ver=1614637944" type="text/javascript"></script> 

Logged out:

<script src="https://mercury.photo/wp-content/plugins/instagram-feed/js/sbi-scripts.min.js" id="sb_instagram_scripts-js" type="text/javascript"></script> 

Caching plugin on the live site is LiteSpeed Cache. The local dev site uses no caching. Same output on both sites.

Taxonomy hide not working

I am trying to exclude a single term from my resource pages archive page. I have created a custom post type ‘resources’ and within that a custom taxonomy called additional_category. Within that I am tagging the post as gated or LEAP. I would like to hide the gated term from displaying on the archive page. I have the following code, but its not working as expected. Can anyone tell me where Im going wrong?

   $  some_args = array(                     'post_type'        => 'resources',                     'posts_per_page'   => -1,                     'tax_query' => array(                         array(                             'taxonomy' => 'additional_category',                             'terms' => 'gated',                             'field' => 'slug',                             'include_children' => false,                             'operator' => 'NOT IN'                         )                     ),                 );                      $  s = new WP_Query( $  some_args );                      while ( have_posts() ) :                     the_post();                          /*                      * Include the Post-Type-specific template for the content.                      * If you want to override th  is in a child theme, then include a file                  * called content-___.php (where ___ is the Post Type name) and that will be used instead.                  */                 get_template_part( 'modules/u3gm-content', get_post_type() );              endwhile;         ?> 

CDC on Sql Server 2017 with HA cluster stopped working

I am currently using Sql Server 2017 (14.0.3294.2) running on Windows Server 2016 as an HA cluster, one primary with two secondaries.

A few days ago, the primary was rebooted and I think the person that did it executed some operations that made the primary server primary again. Since then, CDC stopped working. Querying the cdc tables doesn’t offer a clue about the status. The CDC job is enabled.

I found this post: https://stackoverflow.com/questions/23744083/cdc-is-enabled-but-cdc-dbotable-name-ct-table-is-not-being-populated, however, I am very reluctant to use the solution in this context.

The last error in the CDC job log is (after the primary was restarted):

Executed as user: UserName. Failed to update database "DatabaseName" because the database is read-only. [SQLSTATE 25000] (Error 3906). NOTE: The step was retried the requested number of times (10) without succeeding. The step failed.

Any suggestions on how to make CDC work again?

Thank you