labels – Should empty field captions be specific or generic?

I have an app with basic user profile fields editing functionality. Each field presents the field name, the field value, and an edit button (e.g a pencil).

My question regards what I display on those fields when they haven’t been filled in yet. I don’t care about the exact text inside, but I do care whether this text will be specific for each field or generic.

Example (specific empty field captions):

Name:    No name specified yet     ✎
Age:     No age specified yet      ✎
Address: No address specified yet  ✎

Example (generic empty field captions):

Name:    Not specified yet         ✎
Age:     Not specified yet         ✎
Address: Not specified yet         ✎

Which one is preferable and why?

Empty Export Link when trying to get specific Revision of a File using Google Drive API

I’m trying to get the export links to a specific revision of a pdf file. I have the correct file id and revision id and when I try to get the export links using Revision.Get() ,link : It does not give me the export links.

I noticed that if the file id is of MIME type:”application/” it will give the export links but when I try the same with a file MIME type of “application/pdf”, the export link is empty. I have searched all over and gone through the documentation but I couldn’t find anything that will give me export links for files whose MIME types are pdf.

Could someone please help. For better reference I have added a side by side comparison of 2 file responses when executing the revision.Get(), the one on the left is of MIME type “application/” and the one on right is “application/pdf”

enter image description here

Prune empty commits in ref range using git-filter-repo

Suppose I have a tree such as


I want to prune empty commits in a range A..B

Ie: end up with



git filter-repo --prune-empty always --refs A..B

Results in no change, presumably since B.. is not rewritten.


git filter-repo --prune-empty always --refs A..B --replaces-refs update-or-add && 
git filter-repo --prune-empty auto

seems to yield the desired result. Thing is, I know very little about replace-refs. I wonder if this is the right way to go about this problem.

I should add that I’m not rewriting public history. For all intents and purposes, the history is completly confided within the local repository.

7 – Geofield field remains empty

My client has a Drupal 7.80 site with an Entityform Type (entityform, v7.x-2.0-rc4) that uses a “Postal Address” field (addressfield, v7.x-1.3) and a “Geofield” field (geofield, v7.x-2.4). The Geofield field uses the “Geocode from another field” widget and is configured to use the Address field as a source. enter image description here

The data is then used to render a map using the Geofield map. There is additionally the option to manually enter latitude/longitude, however, that doesn’t work either.

This is the info on the page where the View should be rendering a map

This is the error from dblog that appears despite having an API key

Webform shows {empty} if a field wasn’t fileld out

Webform shows {empty} if a field wasn’t fileld out – Drupal Answers

JavaScript optimize a function to check if a nested object is empty

My function needs to check if some nested object is empty.
For flat objects, there is no need of recursion, and a very basic function could be the following (inspired to PHP empty):

empty = function (mixedVar) {
      var undef
      var key
      var i
      var len
      var emptyValues = (undef, null, '');
      for (i = 0, len = emptyValues.length; i < len; i++) {
        if (mixedVar === emptyValues(i)) {
          return true
      if (typeof mixedVar === 'object') {
        for (key in mixedVar) {
          if (mixedVar.hasOwnProperty(key)) {
            return false
        return true

      return false

Now, supposed that the object has several levels of nesting, a recursive version may be needed. It worths nothing that this version adds a “empty” array to pass as input what can be considered as an empty:

     * Check if an object is empty recursively
     * @param {Object} mixedVar 
     * @param {Array} emptyValues 
     * @param {Number} iter current iteratiom, defaults 0
     * @param {Number} deep recursions levels, defaults 3
     * @returns {Boolean} true if object is empty
    emptyDeep: function(mixedVar, emptyValues = (undefined, null, ''), iter=0, deep=3) {
      var i, len
      for (i = 0, len = emptyValues.length; i < len; i++) {
        if (mixedVar === emptyValues(i)) {
          return true
      if (typeof mixedVar === 'object') {
        for (const item of Object.values(mixedVar)) {
          if(iter>=deep) {
            return false
          } else if (!this.emptyDeep(item, emptyValues, ++iter, deep)) {
            return false
        return true
      return false

This function has also iter and deep variables to control the recursion exit guard at some level of nesting, by defaults 3.
The problem is that with very big objects (order of 10 KB) it turns out that this functions becomes very slow as the object size, and nesting levels grow (like deep > 3).
As results the whole Node IO loop will be affected.
As alternative to this, I have tried this approach, that tries to check the empty for “almost” flatten object, at one level of nesting, and without any recursion:

     * Check if a flatten object is empty
     * @param {*} obj 
     * @returns 
    emptyFlatten: function(obj) {
      if(this.empty(obj)) return true;
      if(Array.isArray(obj)) {
        return obj.filter(val => this.empty(val)).length==obj.length;
      const keys = Object.keys(obj);
      return => obj(key)).filter(val => this.empty(val)).length==keys.length;

that will work for structures like

{ A: {}, B: (), C:null, D:undefined }

but not for a 3 levels object like:

{ A: {}, B: { C: () } }

So, how to optimize the function emptyDeep to make it fast for few levels of recursion (let’s say deep <= 3)?

functions – Why is my page feed returning empty content?

I am trying to debug why my page feed with is returning empty.

While debugging I reached till wp-includesfunctions.php

In there the function which was getting called was do_feed_rss2. Now according to the doc if the feed is for comments the $for_commentsflag should be true.

What I observed in my case is it was giving true value and since the page had no comments the feed was returning to be empty.

So I started searching for the do_action call for do_feed_rss2 , thinking that is where the value must be getting set from, but all i could find is this,

enter image description here

Can anybody help me finding why is this $for_comments flag getting set as true?

Thank you.

cisco – Ansible regex didn’t match command output – Empty list –

I’am trying to get the list of the device ID and the list of the port Id with ansible with regex but i get an empty list, below the output that i’am trying to parse it :

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID #(this is in line separatly)
                 Fa 3/1/1         400             R S I    XXXX       Gi 3/3 #(and this in the next line)
                 Fa 0/0/1         600            R S I     XXXX         Gi 3/3

Total cdp entries displayed : 2

and here my code:

   - name: get neighbors
         - show cdp neighbors
     register: output

   - set_fact: 
       reg_address: '(S+(.)S+(.)S+(.)S+)s+'
       reg_ports: 's+S+sS+s+d+s+wswsws+S+s+(S+sd+(/)d+)'

   - set_fact: 
       List_interfaces: ()
       List_ports: ()

   - set_fact: 
       List_interfaces: "{{List_interfaces + item | string | regex_search(reg_address, '\1') }}"
     loop: "{{output.stdout_lines(0)}}"
     when: "{{ List_interfaces | length }} > 0"
   - set_fact: 
       List_ports: "{{List_ports + item | string | regex_search(reg_ports, '\1') }}"
     loop: "{{ output.stdout_lines(0) }}"
     when: "{{ List_ports | length }} > 0"

json rpc – cpuminer 64bit-ARM Mobile device: Getting Error:”HTTP request failed: Empty reply from server” “json_rpc_call failed, retry after 10 seconds”

So basically I was what I tried here is that I installed Kali Linux on my Android phone using UserLand. My device is 64-bit ARM (aarch64) Machine so I installed CPU MINER which support Arm64, and I followed the instruction given by them. My pool (pool I am using to mine) also support Stratum Protocol which is not going to be an issue.
Using same pool address and same wallet address is working on different miner on different architecture device but not here.
Kindly someone help me out 🙂

here the screenshot of error I am getting.(the yellow bar is wallet address)

php – How to prevent WordPress from saving empty meta values

If import a csv with meta fields, all posts (in my case Woocommerce products) will receive every meta field, even if the value is empty. this results in hundreds of empty values in wp_postmeta. How can I prevent WP from saving empty meta values? I tried

add_filter('update_post_metadata', function($check, $object_id, $meta_key, $meta_value, $prev_value)   {
if(strpos($meta_key, 'my_key')) {
    if(empty($meta_value)) {
        delete_post_meta($object_id, $meta_key, $prev_value);
        return true;
return null;
}, 10, 5);

but it does not work. As soon as the csv is imported, the fields are set for every product…

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123