error (Undefined index) and (Cannot modify header information – headers already)

Error:

Notice: Undefined index: link_type in /home/golchind/public_html/wp-content/themes/golchindl/functions.php on line 40

Notice: Trying to get property of non-object in /home/golchind/public_html/wp-content/themes/golchindl/functions.php on line 58

Warning: Cannot modify header information – headers already sent by (output started at /home/golchind/public_html/wp-content/themes/golchindl/functions.php:40) in /home/golchind/public_html/wp-admin/admin-header.php on line 9

help :

line 40

$ type = $ _POST[‘link_type’];

line 58

update_post_meta($ post->ID,”_oscar_data”,json_encode(array(“episodes”=>$ episodes,”links”=>$ links,”type”=>$ type), JSON_UNESCAPED_UNICODE));

function oscar_meta_box_js(){     wp_enqueue_style( 'oscar_box_style',get_bloginfo('template_url')."/css/admin_meta_box.css");     wp_enqueue_script( 'oscar_box', get_bloginfo('template_url'). '/js/meta_boxes.js', array('jquery'),'1.0',true); } add_action( 'admin_enqueue_scripts', 'oscar_meta_box_js');   function oscar_meta_save(){     global $  post,$  meta_args,$  meta_dls;     $  type = $  _POST['link_type'];     $  episodes = array();     $  links = array();     if($  type == "serial"){         for($  i=0;$  i<count($  _POST['ep_name']);$  i++){             $  episodes[] = array("name"=>$  _POST['ep_name'][$  i],"quality"=>$  _POST['ep_quality'][$  i],"medium_size"=>$  _POST['ep_med'][$  i]);         }         for($  i=0;$  i<count($  _POST['link']);$  i++){             $  links[] = array("name"=>$  _POST['name'][$  i],"link"=>$  _POST['link'][$  i],"subtitle"=>$  _POST['subtitle'][$  i],"screenshot"=>$  _POST['screenshot'][$  i],"episode"=>$  _POST['episode'][$  i]);         }     } else if($  type == "movie") {         for($  i=0;$  i<count($  _POST['movie_title']);$  i++){             $  episodes[] = array("name"=>$  _POST['movie_title'][$  i]);         }         for($  i=0;$  i<count($  _POST['mlink']);$  i++){             $  links[] = array("name"=>$  _POST['mname'][$  i],"link"=>$  _POST['mlink'][$  i],"subtitle"=>$  _POST['msubtitle'][$  i],"screenshot"=>$  _POST['mscreenshot'][$  i],"episode"=>$  _POST['mtitle'][$  i]);         }     }     update_post_meta($  post->ID,"_oscar_data",json_encode(array("episodes"=>$  episodes,"links"=>$  links,"type"=>$  type), JSON_UNESCAPED_UNICODE)); }        function oscar_download(){     global $  post;     ?> <script> var $   = jQuery; $  (function(){     var data = '<?=get_post_meta($  post->ID,"_oscar_data",true);?>';     if(data != ""){         data = JSON.parse(data);         var type = data['type'];         data['episodes'].forEach(function(e){             if(type == "serial")                 add_ep(e['name'],e['quality'],e['medium_size'])             else                 add_title(e['name']);         });         data['links'].forEach(function(e){             if(type == "serial")                 add_link(e['name'],e['link'],e['subtitle'],e['screenshot'],e['episode'])             else                 add_mlink(e['name'],e['link'],e['subtitle'],e['screenshot'],e['episode'])         });         if(data['type']){           $  ("#link_type").val(data['type']);     }     }     normalize_links()     normalize_mlinks() }); </script> <?php if ('series' == get_post_type()) { ?> <div id="serial" class="content">     <div class="side_inp_keeper">         <input id="title_serial" type="text" placeholder="عنوان فصل">         <input id="quality_serial" type="text" placeholder="کیفیت">         <input id="med_serial" type="text" placeholder="میانگین حجم هم قسمت">         <button id="add_ep" class="button">افزودن</button>     </div>     <div id="episodes">      </div>     <hr>     <div class="links" style="display:none;">             <div class="side_inp_keeper">                 <select id="ep"></select>                 <input type="text" id="name" placeholder="عنوان لینک">                 <input type="text" id="link" placeholder="لینک دانلود">                 <input type="text" id="subtitle" placeholder="زیر نویس">                 <input type="text" id="screenshot" placeholder="نمونه کیفیت">                 <button id="add_link" class="button">افزودن</button>             </div>             <div id="links">              </div>         </div> </div> <?php } else if ('movies' == get_post_type()) { ?> <div id="movie" class="content">     <div class="side_inp_keeper">         <input type="text" name="movie_title" id="movie_title" placeholder="عنوان (مثال : زبان اصلی)"><button id="add_link_title" class="button">افزودن</button>     </div>     <div id="titles">      </div>     <hr>     <div class="mlinks">         <div class="side_inp_keeper">                     <select id="titl"></select>                     <input type="text" id="mname" placeholder="عنوان لینک">                     <input type="text" id="mlink" placeholder="لینک دانلود">                     <input type="text" id="msubtitle" placeholder="زیر نویس">                     <input type="text" id="mscreenshot" placeholder="نمونه کیفیت">                     <button id="add_mlink" class="button">افزودن</button>         </div>         <div id="mlinks">          </div>     </div> </div> <?php } ?> <input type="hidden" name="link_type" id="link_type" value="serial">     <?php }    function oscar_meta_boxes() {     add_meta_box( 'oscar_download',"باکس دانلود", 'oscar_download', array('movies', 'series'), 'normal', 'high' ); } add_action("save_post","oscar_meta_save"); add_action( 'add_meta_boxes', 'oscar_meta_boxes' ); 

modify the elements numbers of a mesh file

I have loaded the mesh of simulation on Mathematica:

geo = Import["geometry.vtk"]; 

The elements of geo are:

 Import["geo.vtk", "Elements"]   {"CuboidData", "CuboidObjects", "Graphics3D", "GraphicsComplex", "LineData", "LineObjects", "PointData", "PointObjects", "PolygonData", "PolygonObjects", "VertexData"} 

I would like to reduce the number of points of the mesh. The points of the mesh are saved in “PolygonData” and “VertexData”, I do not know If is possible to do that. For example, halve the number of points even if the quality is lost

Modify Fibonacci Heap to Have a Linear Chain of Marked/Unmarked Nodes Only

In CLRS book there is an exercise (19.4-2) the aim of which is to create a linear chain of nodes by a sequence of Fibonacci-Heap operations. I have solved the problem by recursively making a union with a chain of two nodes, inserting a new minimum node and extracting the minimum, after which consolidation takes place and returns a new linear chain. Since there are no DECREASE-KEY or DELETE-NODE operations, no node is being marked.

My question is, is it possible to create a linear chain consisting of marked nodes only. If so, how?

I have tried several strategies. In one case I am getting a linear chain with all but the last node marked and I cannot proceed from there.

Another possibility is to get a chain as follows for $ n$ nodes:

Example of resulting FH

From here one can delete all the nodes on the shortest path for each sub-tree starting from the bottom to mark all of the nodes on the longer path. However, I cannot find a way to get this Fibonacci-Heap in the first place (and I am not sure whether it is possible). Any help would be appreciated.

How to modify a monster to be a reasonable challenge for a level 1 party?

I was preparing a one-shot adventure for my friends. It will include a fight with a weakened mind flayer and a giant heart which will be the boss of the adventure. The heart will summon gory minions (could be anything, must be suited to the gory theme).

How do I modify the mindflayer to be a reasonable challenge for a level 1 party and what official monster is the closest to a giant pulsing hearth (mabe gibbering mouther?) might still be workable. The party will include four first level player characters consisting of the folk hero fighter, cleric, wizard and a rouge from starter set character sheets. Thanks 🙂

To what extent should DMs let players modify their racial traits?

I’m working on a party and one of my players wants to be a tiefling with an air genasi mother and a tiefling father. They want to Look like a tiefling but have the race bonuses of an air genasi.

In addition to this, this player wants to have ‘wings’ that are purely for the aesthetic but move when they cast Levitate. This is understandable and I think it’s a great concept, with the addition to other additional information they cobbled together to make the reasoning behind their unique circumstances (which will take way too long to list) that I think will fit in with my campaign…but a large majority of the other party members are now wanting to do something akin to the tiefling/genasi player.

It goes from simple stuff like a human who’s eyes glow red because they have some ancestor that had some orc blood in them to some wild explanations like “my mother’s father’s wife was a Dragonborn and my dad’s great great grandfather was a rock gnome so I want to be able to spit fire AND have the ability to tinker tiny contraptions!” (yes, this is an actual example from a player)

I think the tiefling/genasi is alright and letting someone add rock gnome’s tinkering abilities to a character who’s race and class doesn’t qualify for it seems harmless but I have no idea how destructive it might be in the endgame.

The question is: To what extent should I allow my players to modify their races’ stats? I don’t want to have too many confusing stat changes and I don’t want to seclude everyone from concept ideas that they like but I’m willing to cut it if it’s unacceptable. Any advice is highly appreciated.

Note: None of them are sorcerers and they’re starting at level 2 Edit: The issue I’m more conflicted with are the players who want to mix and match race mechanics.

does the true seeing spell modify your actual sight, or give you a second sight?

The reason this matters is for determining another question: Can a creature under the effect of the true seeing spell see a creature under the effect of nondetection inside magical darkness?

True seeing reads:

This spell gives the willing creature you touch the ability to see things as they actually are. For the duration, the creature has truesight, notices secret doors hidden by magic, and can see into the Ethereal Plane, all out to a range of 120 feet.

As such it apparently gives the creature truesight (by means of divination magic). So the creature is granted a new sense, but is the use of that sense mutually exclusive to the use of their normal sight?

What are the degrees by which an Arcana Check can modify or effect the characteristics of a spell being cast by the player?

Sorry if the initial wording seems off, basically what I’m trying to get a bearing for is how or in which ways does the Arcana Skill influence or effect actual spells being cast or other spell-centered details? Ie, is rolling on the Arcana skill able to influence the effect or characteristics of a spell? Or does that fall primarily within relation to magic items and not casted spells?

Does Modify Memory stack?

In the DMG, multiple non-damage effects from a source with the same name do not stack (for example, a character with Bless cast on it multiple times only gains the benefit once).

Would this also be true for Modify Memory? If a creature has Modify Memory cast on it to alter one memory, and then cast on it again to alter a different memory, will only one casting take hold, and which one (assuming they’re cast at the same level)?