Address issue of matrices in C [closed]

A matrix X [-15 . . . 10, 15 . . . 40] is given.Each memory address holds 1 byte of memoryFind the address of X[10][40].

Note: The notation of the matrix is rather orthodox and confusing. It says that these are the indices of the matrix. I have come across comments that this does not look like a matrix. But I came across this and I can assure hundreds of other people also do, so it will be helpful to clear this for once and for all. The simple question here is if the X[10][40] will be accessible or not as from the indices we get that there are 26 rows and 26 columns. The calculation for the number of rows in done below. My confusion is if said in one line is that as there are 26 rows and 26 columns, then [1][26] will occupy one byte of memory.In the lieu of that will [1][27] also hold 1 byte of memory. Because I haven’t declared it to have 1 byte of memory. And following this will [10][40] also hold 1 byte of memory.I hope my question is now clear. However, if any doubt is still there,I would be more than happy to address it.:).

Lr = Lower limit of row/start row index of a matrix, if not given assume 0 (zero)

Lc = Lower limit of column/start column index of a matrix, if not given assume 0 (zero)

If the beginning location is 1500 determine the location of X[10][40] for both row-major and column-major order.

Every element of the matrix requires 1 byte of storage.

The question is solved by this ugly looking formula.

Number or rows say M = (Ur – Lr) + 1

Number or columns say N = (Uc – Lc) + 1

Row Major Wise Calculation:

Address of A [ I ][ J ] = B + W * [ N * ( I – Lr ) + ( J – Lc ) ]

Column Major Wise Calculation :

Address of A [ I ][ J ] = B + W * [ ( I – Lr ) + M * ( J – Lc ) ]

B = Base address

I = Row subscript of the element whose address is to be found

J = Column subscript of the element whose address is to be found

W = Storage Size of one element stored in the array (in byte)

Lr = Lower limit of row/start row index of a matrix, if not given assume 0 (zero)

Lc = Lower limit of column/start column index of a matrix, if not given assume 0 (zero)

M = Number of rows of the given matrix

N = Number of columns of the given matrix

The question is [10][40] valid or out of bounds here.Can we calculate its address?

Here i proceeded like this:

For X[10][40]:

Row-major:1500+1* [26 * (10 – (-15))) + (40 – 15)]=2175

Column-major:1500 + 1 * [(10– (-15)) + 26 * (40 – 15)]=2175

issue with if/elseif in_array inside foreach loop display only one post

I try to attribute a specific background-color to each post if one of categories of post corresponding to one category. My function works but is restricted to display only one post in result. If I delete this function, all post are displayed.

More informations : On my page I have buttons to filter posts by category. if I click on once I display all post for this category. But each post contains several categories. I have selected some categories to attribute a background colors for each posts, but theses categories are different of the filters buttons.

WordPress display this error "a critical error has occurred on your site, Learn more about debugging WordPress." after the first post displayed.

here is my entire code :

<?php  add_action('wp_ajax_nopriv_filter', 'filter_ajax'); add_action('wp_ajax_filter','filter_ajax');  function filter_ajax(){  $  category = $  _POST['category'];  $  argsf = array(     'post_type' => 'post',     'posts_per_page' => -1,     'order' => 'ASC' );  if(isset($  category)){     $  argsf['category__in'] = array($  category); }  $  postsf = get_posts($  argsf);      if (!empty($  postsf)) {     foreach ($  postsf as $  post) {                  $  link_post = get_permalink( $  post->ID );         $  image_post = get_the_post_thumbnail_url( $  post->ID, $  size = 'large' );         $  item1 = get_post_meta($  post->ID, 'item1', true);         $  item2 = get_post_meta($  post->ID, 'item2', true);         $  item3 = get_post_meta($  post->ID, 'item3', true);         $  item4 = get_post_meta($  post->ID, 'item4', true);         $  title = get_the_title($  post->ID);          $  post_slug = $  post->post_name;         $  cats_post = wp_get_post_categories( $  post->ID );                  function test($  cats_post){             if (in_array("14", $  cats_post)){ echo'#710000';}             elseif(in_array("5", $  cats_post)){ echo'#0a005d';}             elseif(in_array("16", $  cats_post)){ echo'#65a0e8';}             elseif(in_array("13", $  cats_post)){ echo'#90744b';}         }      ?>   <div class="shop w-24 pb-1" style="height:320px; min-width:320px;">     <div class="w-100 h-100 p-2">                      <div class=" " style="background-color:<?php test($  cats_post); ?>">             <div class="">                 <!--<div class="" title="Locer">                 <a href="<?= $  item2; ?>"><i class="icofont-opposite "></i></a>                 </div>-->                 <div class="" title="something">                     <a href="tel:<?= $  item3; ?>"><i class="im im-phone"></i> </a>                 </div>                 <div class="">                     <span><?= $  item1; ?></span>                 </div>              </div>             <span class="text-uppercase col-white tsh332 fwlr text-center" style="font-size:2rem;">                 <?= $  title; ?>             </span>             <?php if ( metadata_exists( 'post', $  post->ID , 'item4' ) ){ ?>                  <div class="">                     <div class="b-yellow b-100">                         <span><?= $  item4; ?> </span>                     </div>                 </div>             <?php } ?>         </div>                      </div> </div> <?php  }  /* fin foreach */     }  /* fin if  */ wp_reset_postdata(); die(); } 

?>

I tried that but it doesn’t work :

  • get_the_category instead of wp_get_post_categories
  • has_item instead of in_array

I don’t know If I must use an other foreach loop and how !

thanks

Downloadable Product Permission Issue – Grant Access automatically

When I order downloadable products, I can’t see them in my downloads page. When I checked the order details in the admin side, I saw that the downloadable product permissions part is blank even if the status of my order is completed.

I used paypal sandbox for testing. The order status was initially on-hold, and then I changed it to completed.

My functions.php:

function has_bought_item( $  product_id ) { global $  wpdb;  if( ! is_user_logged_in() )     return false;  $  current_user = wp_get_current_user();  $  statuses      = array_map( 'esc_sql', wc_get_is_paid_statuses() );  // Count the number of products $  count_query = $  wpdb->get_var( "     SELECT COUNT(woim.meta_value) FROM {$  wpdb->prefix}posts AS p     INNER JOIN {$  wpdb->prefix}postmeta AS pm ON p.ID = pm.post_id     INNER JOIN {$  wpdb->prefix}woocommerce_order_items AS woi ON p.ID = woi.order_id     INNER JOIN {$  wpdb->prefix}woocommerce_order_itemmeta AS woim ON woi.order_item_id = woim.order_item_id     WHERE p.post_status IN ( 'wc-" . implode( "','wc-", $  statuses ) . "' )     AND pm.meta_key = '_customer_user' AND pm.meta_value = $  current_user->ID     AND woim.meta_key IN ( '_product_id', '_variation_id' )     AND woim.meta_value = $  product_id " ); // Return true boolean value if count is higher than 0, if not false return $  count_query > 0 ? true : false; }  // Shop and archives - Replace add to cart ajax button to a custom linked button add_filter( 'woocommerce_loop_add_to_cart_link', 'replace_loop_add_to_cart', 20, 2 ); function replace_loop_add_to_cart( $  html, $  product ) { if( has_bought_item( $  product->get_id() ) ) {          $  text = __("Download", "woocommerce");          $  user_id = get_current_user_id();     $  downloads = wc_get_customer_available_downloads($  user_id);      if (!empty($  downloads)) {         foreach ($  downloads as $  download) {             if ($  download['product_id'] === $  product->get_id()) {                 $  link = $  download['download_url'];             }         }     }      $  html = '<a href="' . $  link . '" class="button alt add_to_cart_button">' . $  text . '</a>'; } return $  html; }  function add_completed_status_to_download_permission($  data, $  order) { if ( $  order->has_status( 'completed' ) ) { return true; } return $  data; } add_filter('woocommerce_order_is_download_permitted', 'add_completed_status_to_download_permission', 10, 2); 

My system status report:

### WordPress Environment ### WordPress address (URL): https://stg.myscrapchick.com Site address (URL): https://stg.myscrapchick.com WC Version: 4.3.1 REST API Version: ✔ 1.0.10 WC Blocks Version: ✔ 2.7.2 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.3.1 Log Directory Writable: ✔ WP Version: 5.4.2 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: – WP Cron: – Language: en_US External object cache: –  ### Server Environment ###  Server Info: Apache PHP Version: 7.3.17 PHP Post Max Size: 2 GB PHP Time Limit: 600 PHP Max Input Vars: 16384 cURL Version: 7.29.0 NSS/3.44  SUHOSIN Installed: – MySQL Version: 5.5.5-10.2.31-MariaDB Max Upload Size: 2 GB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔  ### Database ###  WC Database Version: 4.3.1 WC Database Prefix: wp_ Total Database Size: 4286.03MB Database Data Size: 2622.78MB Database Index Size: 1663.25MB wp_woocommerce_sessions: Data: 0.54MB + Index: 0.02MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 196.98MB + Index: 184.73MB + Engine MyISAM wp_woocommerce_order_items: Data: 80.96MB + Index: 44.21MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 643.68MB + Index: 440.29MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_actions: Data: 1.55MB + Index: 0.58MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 1.14MB + Index: 0.91MB + Engine MyISAM wp_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_comments: Data: 2.17MB + Index: 1.23MB + Engine MyISAM wp_email_log: Data: 152.56MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ninja_table_items: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 6.19MB + Index: 0.21MB + Engine MyISAM wp_postmeta: Data: 1251.84MB + Index: 837.68MB + Engine MyISAM wp_posts: Data: 140.07MB + Index: 45.37MB + Engine MyISAM wp_ppgc_categories: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_ppgc_customers: Data: 2.09MB + Index: 2.91MB + Engine MyISAM wp_ppgc_orders: Data: 28.50MB + Index: 22.76MB + Engine MyISAM wp_ppgc_products: Data: 0.18MB + Index: 0.26MB + Engine MyISAM wp_simple_history: Data: 7.52MB + Index: 4.03MB + Engine InnoDB wp_simple_history_contexts: Data: 34.56MB + Index: 26.08MB + Engine InnoDB wp_termmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp_terms: Data: 0.01MB + Index: 0.02MB + Engine MyISAM wp_term_relationships: Data: 0.21MB + Index: 0.42MB + Engine MyISAM wp_term_taxonomy: Data: 0.02MB + Index: 0.01MB + Engine MyISAM wp_tinvwl_analytics: Data: 1.52MB + Index: 0.36MB + Engine InnoDB wp_tinvwl_items: Data: 0.44MB + Index: 0.00MB + Engine InnoDB wp_tinvwl_lists: Data: 0.14MB + Index: 0.00MB + Engine InnoDB wp_usermeta: Data: 56.78MB + Index: 45.81MB + Engine MyISAM wp_users: Data: 2.85MB + Index: 2.79MB + Engine MyISAM wp_wcpv_commissions: Data: 0.30MB + Index: 0.00MB + Engine InnoDB wp_wcpv_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.19MB + Index: 0.14MB + Engine MyISAM wp_wc_download_log: Data: 0.60MB + Index: 0.50MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.04MB + Index: 0.06MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.81MB + Index: 0.60MB + Engine MyISAM wp_wc_order_stats: Data: 0.16MB + Index: 0.14MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.05MB + Index: 0.05MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.16MB + Index: 0.20MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wfblockediplog: Data: 0.05MB + Index: 0.00MB + Engine InnoDB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfconfig: Data: 1.39MB + Index: 0.00MB + Engine InnoDB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wffilemods: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_wfhits: Data: 1.52MB + Index: 0.28MB + Engine InnoDB wp_wfhoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfknownfilelist: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wflocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wflogins: Data: 0.47MB + Index: 0.16MB + Engine InnoDB wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wfstatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB  ### Post Type Counts ###  attachment: 8211 ctct_forms: 3 ctct_lists: 5 custom_css: 2 customize_changeset: 36 elementor_library: 20 nav_menu_item: 9 page: 18 post: 160 product: 2533 revision: 410 shop_coupon: 19 shop_order: 577585 shop_order_refund: 34  ### Security ###  Secure connection (HTTPS): ✔ Hide errors from visitors: ✔  ### Active Plugins (26) ###  ManageWP - Worker: by GoDaddy – 4.9.6 WC Thanks Redirect: by Nitin Prakash – 2.2 – Installed version not tested with active version of WooCommerce 4.3.1 Better Search Replace: by Delicious Brains – 1.3.3 Classic Editor: by WordPress Contributors – 1.5 Constant Contact Forms for WordPress: by Constant Contact – 1.8.5 Login/Signup Popup ( Inline Form + Woocommerce ): by XootiX – 2.0 – Installed version not tested with active version of WooCommerce 4.3.1 Elementor Pro: by Elementor.com – 2.9.5 Elementor: by Elementor.com – 2.9.13 Email Log: by Sudar – 2.3.2 Site Kit by Google: by Google – 1.10.0 Grant download permissions for past WooCommerce orders: by Claudio Sanches – 0.0.2 – Installed version not tested with active version of WooCommerce 4.3.1 Insert Headers and Footers: by WPBeginner – 1.4.5 Kadence WooCommerce Email Designer: by Kadence WP – 1.4.2 – Installed version not tested with active version of WooCommerce 4.3.1 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.3 Remove Widget Titles: by Stephen Cronin – 1.0 Simple CSS: by Tom Usborne – 1.1.1 Simple History: by Pär Thernström – 2.34.0 Smoother: by Merkulove – 1.0.5 User Menus: by Code Atlantic – 1.2.3 WP Sheet Editor - WooCommerce Products (Premium): by WP Sheet Editor – 1.5.0 – Installed version not tested with active version of WooCommerce 4.3.1 Woo Title Limit: by Dima W. – 2.0.0 – Installed version not tested with active version of WooCommerce 4.3.1 WooCommerce Product Vendors: by WooCommerce – 2.1.32 – Installed version not tested with active version of WooCommerce 4.3.1 WooCommerce: by Automattic – 4.3.1 Wordfence Security: by Wordfence – 7.4.8 WordPress Importer: by wordpressdotorg – 0.7 WP Mail SMTP: by WPForms – 2.1.1  ### Inactive Plugins (5) ###  Already In Cart / Already Purchased: by MyThemeShop – 1.0.2 – Installed version not tested with active version of WooCommerce 4.3.1 TI WooCommerce Wishlist: by TemplateInvaders – 1.20.5 – Installed version not tested with active version of WooCommerce 4.3.1 WooCommerce Products Layout for Elementor: by AD-Theme – 1.0 – Installed version not tested with active version of WooCommerce 4.3.1 WP DataTable: by Samuel Behan – 0.2.5 WP Super Cache: by Automattic – 1.7.1  ### Must Use Plugins (2) ###  ManageWP - Worker Loader: by GoDaddy – Nexcess Managed Apps: by Nexcess – 1.9.1  ### Settings ###  API Enabled: ✔ Force SSL: – Currency: USD ($  ) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)  Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)  Connected to WooCommerce.com: –  ### WC Pages ###  Shop base: #5 - /shop/ Cart: ❌ Page does not contain the shortcode. Checkout: ❌ Page does not contain the shortcode. My account: ❌ Page does not contain the shortcode. Terms and conditions: #577437 - /terms-of-use-copyright/  ### Theme ###  Name: GeneratePress Child Version: 0.1 Author URL: https://tomusborne.com Child Theme: ✔ Parent Theme Name: GeneratePress Parent Theme Version: 2.4.2 Parent Theme Author URL: https://tomusborne.com WooCommerce Support: ✔  ### Templates ###  Overrides: generatepress_child/woocommerce/order/order-downloads.php generatepress_child/woocommerce/single-product/add-to-cart/simple.php  ### Action Scheduler ###  Complete: 6,179 Oldest: 2020-05-26 17:41:33 -0400 Newest: 2020-08-06 16:19:38 -0400 

I know we can manually grant access per order but access should be granted automatically, right? any help is highly appreciated.

Recurring 502 Bad Gateway issue

Hoping one of you out there can offer suggestions or at least tell me I’m not alone. Our WP site has had a random 502 Bad Gateway problem for few days now – happens once every few page loads. I’ve been down the server-side troubleshooting list (with help of Bluehost) and the my-side list (disabling all plugins, updating theme, latest PHP..) – everything on the site is up to date, and 2 bad plug-ins were removed.

Some online articles tell me if this happens once every few loads it’s a server-side problem. The hosting company assures me it is a problem with the ‘optimization of website or database’ – whatever that great expanse of possibilities entails.

I’m running out of questions to ask – I just want my site to load each time somebody visits. Can anybody help?

OpenGL texture2d/image sampling issue. Strange artifacts in texture

I have an issue when using textures in OpenGL, strange artifacts occur where geometry overlaps, but not always. Video Reference. I am using a GL_TEXTURE_2D with GL_ARB_image_load_store to make a custom depth test shader that stores material data for opaque and transparent geometry. The video given shows the artifacts occur where the support structure for a table is occluded behind the top of the table, but strangely, not occurring where the base of the table is occluded by the support.

#version 450 core  in VS_OUT {     vec3 Position;     vec3 Normal;     vec2 TexCoords;      mat3 TanBitanNorm; } fs_in;  // Material data uniform sampler2D uAlbedoMap; uniform sampler2D uNormalMap; uniform sampler2D uMetallicMap;  // Material info out layout(rgba16f) coherent uniform image2D uAlbedoDepthOpaque; layout(rgba16f) coherent uniform image2D uNormalMetallicOpaque; layout(rgba16f) coherent uniform image2D uAlbedoDepthTransparent; layout(rgba16f) coherent uniform image2D uNormalAlphaTransparent;  // Depth info in/out layout(r8) uniform image2D uDepthBufferOpaque; layout(r8) uniform image2D uDepthBufferTransparent;  void main() {     vec3 n_tex = texture(uNormalMap, fs_in.TexCoords).xyz;     n_tex = n_tex * 2.0f - 1.0f;      ivec2 tx_loc = ivec2(gl_FragCoord.xy);     const float opaque_depth = imageLoad(uDepthBufferOpaque, tx_loc).r; // Stored depth of opaque     const float trans_depth = imageLoad(uDepthBufferTransparent, tx_loc).r; // Stored depth of transparent      // Depth processing     if (gl_FragCoord.z > opaque_depth) {         bool tran = false;         if (trans_depth > opaque_depth)             tran = trans_depth > gl_FragCoord.z;         else             tran = true;          // Transparent         if (texture(uAlbedoMap, fs_in.TexCoords).a < 1.0f && tran) {             imageStore(uDepthBufferTransparent, tx_loc,                 vec4(gl_FragCoord.z));              imageStore(uAlbedoDepthTransparent, tx_loc,                 vec4(texture(uAlbedoMap, fs_in.TexCoords).rgb, gl_FragCoord.z));             imageStore(uNormalAlphaTransparent, tx_loc,                 vec4(abs(length(n_tex) - 1.0f) > 0.1f ? fs_in.Normal : normalize(fs_in.TanBitanNorm * n_tex), texture(uAlbedoMap, fs_in.TexCoords).a));         }          // Opaque         else {             imageStore(uDepthBufferOpaque, tx_loc,                 vec4(gl_FragCoord.z));              imageStore(uAlbedoDepthOpaque, tx_loc,                 vec4(texture(uAlbedoMap, fs_in.TexCoords).rgb, gl_FragCoord.z));             imageStore(uNormalMetallicOpaque, tx_loc,                 vec4(abs(length(n_tex) - 1.0f) > 0.1f ? fs_in.Normal : normalize(fs_in.TanBitanNorm * n_tex), texture(uMetallicMap, fs_in.TexCoords).r));         }     }      if (opaque_depth == 0.0f) {         imageStore(uDepthBufferOpaque, tx_loc,             vec4(0.125f));     }      else {         imageStore(uDepthBufferOpaque, tx_loc,             vec4(0.125f + opaque_depth));     } } 

Render with overlapping geometry shows that artifacts still occur outside of reading from the texture. Also in the video, I move the camera back and forth (with orthographic projection) and the artifacts become brighter and darker. Render with overlapping geometry w/out depth processing shows that the brighter/darker values were from the depth test.

Any ideas on why this occurs, and how can I fix it?

SEO Keyword Density Issue

I have a website that has a keyword density of 8% and 4% for my keywords, but I only used the keyword once. The website doesn’t have a lot of actual text. Does this high keyword density hurt my site’s SEO even though I only used it once? I checked my keyword density using the SEO Review Tools density checker.

How can I issue multiple commands from a single query choice in Roll20?

I created a set of macros using the API to generate attributes for characters on Roll20 to refer to their pronouns for use in macros. I currently have it set up with 3 macros, each with 4 lines because I can’t add multiple attributes with a single command.

How can I use a macro to query which set (male, female, or neutral) of pronouns I want to use? I know I should be able to do something like

 ?{Male, Female, or Neutral? | Male,#Pronouns_M | Female,#Pronouns_F | Neutral,#Pronouns_N}  

And that should work, but I’d rather have it where the contents of those sub-macros are in the main one and delete the sub-macros. Problem is, each of the sub macros is 4 lines such as #Pronouns_F

 !setattr --sel --subjective|'she'  !setattr --sel --objective|'her'  !setattr --sel --PossessiveA|'her'  !setattr --sel --PossessiveP|'hers'  

Is this a thing I can do or do I have to settle for the sub macros?

Restrict CA to issue certficates for one domain or to be able to sign just one server certificate

I have a server and I want my iPhone to connect to it securely. However, I cannot just install the self-signed server certificate on my iPhone. When I install the profile (that’s what they call the certificate), it says "Not verified".

Normally, you would go to CA Trust settings and enable full trust for the certificate. BUT I deliberately made the certificate with critical,CA:false constraint. That’s the reason it does not show in the CA Trust settings.

Why did I do it — I just need to install the single certificate and I don’t want to totally compromise my iPhone security, if my CA credentials got stolen.

Do this have a solution? iOS probably requires a CA to trust a certificate, but I don’t want a possibility to create certificates at all (beside the one), or at least for another domains.


One potential "solution" might be to create the CA, sign the server certificate and then delete the CA key, as it would not be needed and would live for a shorter time (lower chance to get stolen).

However, people except me wouldn’t be stoked to install it. (I don’t want to buy a certificate as its a home project and I don’t even have a domain name, just the IP address.)

The certificate complies with apple’s current requirements for server certificates. (https://support.apple.com/en-us/HT210176)