Replacement pattern for one value of a multivalue field in views

Rewriting the results of a views field, I wonder if there is a way to use a replacement pattern for the first, second and third value of a multivalue field.

In my case, as example:

I have tried to use this rewritten tags field: [field_tagging:0] [field_tagging:1] [field_tagging:2]

However, this is not rewritten/recognized as replacement patterns.

The result I need, is that in the views field has three tag links, which have a rewritten path (in this case it also uses !1 for the contextual value in the URL)

Fetch value of a cell based on dropdown menu items results on another sheet

I have 2 Sheets named as Sheet1 and Sheet2…

Sheet1: Contains Drop down list on B4 Column. Based on the selection of an item, it pulls the result of the open price shown on D4 column.

Sheet2: Contains 2 Columns. Based on Column 1 Id It needs to get the open price from Sheet 1 and should be shown in column 2 of Sheet 2…

Note: I don’t want to modify sheet1 and 2 in any way… Please don’t add any additional column in sheet1 and 2…Using that I can achieve the result…

Without modifying any criteria I need to get the result cause I will be retrieving past data and will do some complex operations on that…

link Sheets

Javscript how to retrieve value from a Map that has an EnumValue as key

I’m query a database in javascript and I get back a Map object. The problem is that some the key of some of the entries in the map is an object, an EnumValue to be precies.

I can’t seem to find a way to retrieve directly this kind of entries, without having to iterate on every single key of the map and check if it’s an object.

So, if I directly console.log the output I get from the query, it looks like this:

Map {     EnumValue { typeName: 'T', elementName: 'label' } => 'user',     'gender' => [ 'f' ],     'identityid' => [ '2349fd9f' ],     'name' => [ 'Erika' ],     'email' => [ '' ],     EnumValue { typeName: 'T', elementName: 'id' } => 4136,     'lastname' => [ 'Delgato' ]  } 

That I think it’s actually something like this:

{     { typeName: 'T', elementName: 'label' } => 'user',     'gender' => [ 'f' ],     'identityid' => [ '2349fd9f' ],     'name' => [ 'Erika' ],     'email' => [ '' ],     { typeName: 'T', elementName: 'id' } => 4136,     'lastname' => [ 'Delgato' ]  } 

I’ve naively already tried to get the entry using something like this:

const enumId = { typeName: 'T', elementName: 'label' }; map.get(enumId) 

But of course it returns undefined.

Any ideas?

Finding the value of x in shapes, and finding the size of each unknown angle with algebra and variables [on hold]

CHAPTER 7 – SHAPES 1. Find the value of x. a) (3x −10)° (2x−5)° (x−5)° b) c) (x + 45)° (2x+40)° (2x+10)° (3 x )° 2. Find the size of each unknown angle. 3. Determine the value of x and find the size of each of the angles represented by an algebraic expression. 4. Determine the measure of each unknown angle.

Converting char into int in C++ gives me different value

I tried to convert the character ð which is in ASCII encoding (the one that my program uses) equal to 11110000 in base-2 and 240 in base-10 into an int, as:

char y = 'ð'; int c = y; cout << c; 

What I think should be printed is 240, but what was actually printed is -16.
240 in decimal is 00000000 00000000 00000000 11110000 in binary, and -16 is represented by 11111111 11111111 11111111 11110000 using two’s complement (which is the one used in my program), so why did the binary places to the left of my number ‘11110000’ got filled with ones (which alter the value) instead of zeros (which don’t alter the value)?

Add a new column to a dataframe with the percentage of every value of this dataframe

I have the dataframe below and I would to add a new column with the percentage of every value of this dataframe. Something like:

name<-c("asdad","dssdd") number<-c(5,5) df<-data.frame(name,number)  for (i in 1:nrow(df)){ percentage<-df[i,1]/sum(df$  number) }  new<-cbind(df, percentage) 

but I get NAs instead of percentages.

How to avoid saving a value of property of form object when saving changes to db

In a crud core 2.2 web app, I need to avoid saving a property of form object to db. How do I do that?

I’ve tried using [Editable(false)] data annotation on the ListBin property to prevent saving property value to db.

[Table("supply_lists")] public partial class SupplyLists {     [Column("id")]     public int Id { get; set; }     [Column("category_id")]     public int CategoryId { get; set; }     [Required]     [Column("coursecode")]     [StringLength(200)]     public string Coursecode { get; set; }     [Required]     [Column("title")]     [StringLength(200)]     public string Title { get; set; }     [Required]     [Column("filename")]     [StringLength(200)]     public string Filename { get; set; }     [Column("isactive")]     public bool Isactive { get; set; }     [Column("date", TypeName = "smalldatetime")]     public DateTime Date { get; set; }      [Column("list_bin")]     public byte[] ListBin { get; set; }      [ForeignKey("CategoryId")]     [InverseProperty("SupplyLists")]     public virtual SupplyListCategory Category { get; set; } }   [ModelMetadataType(typeof(MetaDataTypeModel))] public partial class SupplyLists {  } public class MetaDataTypeModel {     [Editable(false)]     public byte[] ListBin { get; set; }      [Display(Name = "Is Active")]     public bool Isactive { get; set; }      [Display(Name ="Course Code")]     public string Coursecode { get; set; }      [Display(Name = "Category")]     public int CategoryId { get; set; }      [DataType(DataType.Date)]     public DateTime Date { get; set; } }  public class EditModel : PageModel {     private readonly SupplyListCore22.Models.SupplyListsContext _context;     private readonly IHostingEnvironment _env;      public EditModel(SupplyListCore22.Models.SupplyListsContext context, IHostingEnvironment env)     {         _context = context;         _env = env;     }      [BindProperty]     public SupplyLists SupplyLists { get; set; }     [BindProperty]     public FileUpload FileUpload { get; set; }      public async Task<IActionResult> OnGetAsync(int? id)     {         if (id == null)         {             return NotFound();         }          SupplyLists = await _context.SupplyLists             .Include(s => s.Category).FirstOrDefaultAsync(m => m.Id == id);          if (SupplyLists == null)         {             return NotFound();         }        ViewData["CategoryId"] = new SelectList(_context.SupplyListCategory, "Id", "Category");         return Page();     }      public async Task<IActionResult> OnPostAsync()     {         //if (!ModelState.IsValid)         //{         //    return Page();         //}          _context.Attach(SupplyLists).State = EntityState.Modified;         await _context.SaveChangesAsync();          if (FileUpload.UploadSupplyList != null)         {             var fileUploadData = await utilities.utilities.ProcessFormFile(FileUpload.UploadSupplyList, ModelState);             if (ModelState.ErrorCount > 0)             {                 ViewData["CategoryId"] = new SelectList(_context.SupplyListCategory, "Id", "Category");                 return Page();             }             var sl = _context.SupplyLists.Find(SupplyLists.Id);             sl.ListBin = fileUploadData;              await _context.SaveChangesAsync();          }          return RedirectToPage("./Index");     } 

It set the ListBin to null in db which is not what I wanted when saving changes (I wanted to preserve the old value of ListBin in db).