Project data (+ data)
341194
def get_project_template(name="Default", output_type='exe', debugger=None, build_dir='build'):
        

        project_template = {
            'build_dir' : build_dir,  # Build output path
            'debugger' : debugger,    # Debugger
            'export_dir': '',         # Export directory path
            'name': name,             # project name
            'output_type': output_type, # output type, default - exe
            'target': '',             # target
            'tools_supported': [],    # Tools which are supported,
        }
        project_template.update(ProjectTemplate._get_common_data_template())
        project_template.update(ProjectTemplate._get_tool_specific_data_template())
        return project_template
1033413
def project(project_id, opts = {})
      data, _status_code, _headers = project_with_http_info(project_id, opts)
      return data
    end
1299445
def _create_projects_file(project_name, data_source, items):
    

    repositories = []
    for item in items:
        if item['origin'] not in repositories:
            repositories.append(item['origin'])
    projects = {
        project_name: {
            data_source: repositories
        }
    }

    projects_file, projects_file_path = tempfile.mkstemp(prefix='track_items_')

    with open(projects_file_path, "w") as pfile:
        json.dump(projects, pfile, indent=True)

    return projects_file_path
374114
function add() {
        var root = FileUtils.stripTrailingSlash(ProjectManager.getProjectRoot().fullPath),
            recentProjects = getRecentProjects(),
            index = recentProjects.indexOf(root);

        if (index !== -1) {
            recentProjects.splice(index, 1);
        }
        recentProjects.unshift(root);
        if (recentProjects.length > MAX_PROJECTS) {
            recentProjects = recentProjects.slice(0, MAX_PROJECTS);
        }
        PreferencesManager.setViewState("recentProjects", recentProjects);
    }
93402
public void process(ProjectFile file, FixedData fixedData, Var2Data varData, Map<Integer, FontBase> fontBases)
   {
      int groupCount = fixedData.getItemCount();
      for (int groupLoop = 0; groupLoop < groupCount; groupLoop++)
      {
         byte[] groupFixedData = fixedData.getByteArrayValue(groupLoop);
         if (groupFixedData == null || groupFixedData.length < 4)
         {
            continue;
         }

         Integer groupID = Integer.valueOf(MPPUtility.getInt(groupFixedData, 0));

         byte[] groupVarData = varData.getByteArray(groupID, getVarDataType());
         if (groupVarData == null)
         {
            continue;
         }

         String groupName = MPPUtility.getUnicodeString(groupFixedData, 4);

         // 8 byte header, 48 byte blocks for each clause
         //System.out.println(ByteArrayHelper.hexdump(groupVarData, true, 16, ""));

         // header=4 byte int for unique id
         // short 4 = show summary tasks
         // short int at byte 6 for number of clauses
         //Integer groupUniqueID = Integer.valueOf(MPPUtility.getInt(groupVarData, 0));
         boolean showSummaryTasks = (MPPUtility.getShort(groupVarData, 4) != 0);

         Group group = new Group(groupID, groupName, showSummaryTasks);
         file.getGroups().add(group);

         int clauseCount = MPPUtility.getShort(groupVarData, 6);
         int offset = 8;

         for (int clauseIndex = 0; clauseIndex < clauseCount; clauseIndex++)
         {
            if (offset + 47 > groupVarData.length)
            {
               break;
            }

            GroupClause clause = new GroupClause();
            group.addGroupClause(clause);

            int fieldID = MPPUtility.getInt(groupVarData, offset);
            FieldType type = FieldTypeHelper.getInstance(fieldID);
            clause.setField(type);

            // from byte 0 2 byte short int - field type
            // byte 3 - entity type 0b/0c
            // 4th byte in clause is 1=asc 0=desc
            // offset+8=font index, from font bases
            // offset+12=color, byte
            // offset+13=pattern, byte

            boolean ascending = (MPPUtility.getByte(groupVarData, offset + 4) != 0);
            clause.setAscending(ascending);

            int fontIndex = MPPUtility.getByte(groupVarData, offset + 8);
            FontBase fontBase = fontBases.get(Integer.valueOf(fontIndex));

            int style = MPPUtility.getByte(groupVarData, offset + 9);
            boolean bold = ((style & 0x01) != 0);
            boolean italic = ((style & 0x02) != 0);
            boolean underline = ((style & 0x04) != 0);

            int fontColorIndex = MPPUtility.getByte(groupVarData, offset + 10);
            ColorType fontColor = ColorType.getInstance(fontColorIndex);

            FontStyle fontStyle = new FontStyle(fontBase, italic, bold, underline, false, fontColor.getColor(), null, BackgroundPattern.SOLID);
            clause.setFont(fontStyle);

            int colorIndex = MPPUtility.getByte(groupVarData, offset + 12);
            ColorType color = ColorType.getInstance(colorIndex);
            clause.setCellBackgroundColor(color.getColor());
            clause.setPattern(BackgroundPattern.getInstance(MPPUtility.getByte(groupVarData, offset + 13) & 0x0F));

            // offset+14=group on
            int groupOn = MPPUtility.getShort(groupVarData, offset + 14);
            clause.setGroupOn(groupOn);
            // offset+24=start at
            // offset+40=group interval

            Object startAt = null;
            Object groupInterval = null;

            switch (type.getDataType())
            {
               case DURATION:
               case NUMERIC:
               case CURRENCY:
               {
                  startAt = Double.valueOf(MPPUtility.getDouble(groupVarData, offset + 24));
                  groupInterval = Double.valueOf(MPPUtility.getDouble(groupVarData, offset + 40));
                  break;
               }

               case PERCENTAGE:
               {
                  startAt = Integer.valueOf(MPPUtility.getInt(groupVarData, offset + 24));
                  groupInterval = Integer.valueOf(MPPUtility.getInt(groupVarData, offset + 40));
                  break;
               }

               case BOOLEAN:
               {
                  startAt = (MPPUtility.getShort(groupVarData, offset + 24) == 1 ? Boolean.TRUE : Boolean.FALSE);
                  break;
               }

               case DATE:
               {
                  startAt = MPPUtility.getTimestamp(groupVarData, offset + 24);
                  groupInterval = Integer.valueOf(MPPUtility.getInt(groupVarData, offset + 40));
                  break;
               }

               default:
               {
                  break;
               }
            }

            clause.setStartAt(startAt);
            clause.setGroupInterval(groupInterval);

            offset += 48;
         }

         //System.out.println(group);
      }
   }
563655
function (data) {
    var material = this.material;
    data = getMaterialData(data);
    Object.keys(data).forEach(function (key) {
      material[key] = data[key];
    });
  }
1208872
private function fillYData($x, $z, $value, array $x_axis, array $z_axis, array &$ydata): void
    {
        $x = $this->findAxisEntry($x, $x_axis);
        $z = $this->findAxisEntry($z, $z_axis);

        if (!array_key_exists($z, $z_axis)) {
            foreach (array_keys($z_axis) as $key) {
                if ($value <= $key) {
                    $z = $key;
                    break;
                }
            }
        }

        // Add the value to the appropriate data point.
        $ydata[$z][$x] = ($ydata[$z][$x] ?? 0) + $value;
    }
813713
function() {
    var projection = this.projection;
    
    this.datasources.forEach(function(datasource) {
      datasource.load && datasource.load(function(error) {
        datasource.project && datasource.project(projection);
      });
    });
  }
194691
def get_project_details(self, project):
        
        result = self.get_project(project.pid)
        if result is None:
            result = {}
        return result
1062514
private void readProjectHeader()
   {
      Table table = m_tables.get("DIR");
      MapRow row = table.find("");
      if (row != null)
      {
         setFields(PROJECT_FIELDS, row, m_projectFile.getProjectProperties());
         m_wbsFormat = new P3WbsFormat(row);
      }
   }
102427
def project_data_dir(self, *args) -> str:
        
        return os.path.normpath(os.path.join(self.project_dir, 'data', *args))
439289
def create_project(project, opts = {})
      data, _status_code, _headers = create_project_with_http_info(project, opts)
      return data
    end
274753
protected function buildData()
  {
    $handle = opendir($this->folderPath);
    while (false !== ($file = readdir($handle))) {
      $vext = str_replace(',', '|', strtolower($this->extensions));
      if (!is_dir($file) && $file != '.' && $file != '..' && ($this->extensions == '' || preg_match("/\.(" . $vext . ")$/", strtolower($file)))) {
        $this->files[] = $file;
      }
    }
  }
1033295
function normalizeData(data) {
  // Package.json
  if (data.buddy) data = data.buddy;
  // Handle super simple mode
  if (data.input) data = { build: [data] };
  return data;
}
467021
def modify_project(project_id, opts = {})
      data, _status_code, _headers = modify_project_with_http_info(project_id, opts)
      return data
    end
658052
def add_to_recent(self, project):
        
        if project not in self.recent_projects:
            self.recent_projects.insert(0, project)
            self.recent_projects = self.recent_projects[:10]
991151
function () {
            var self = this;
            Y.log('External data received, mixing', 'info', 'builder');
            self.options.externalData.forEach(function (exData) {

                ['files', 'classes', 'modules'].forEach(function (k) {
                    Y.each(exData[k], function (item, key) {
                        item.external = true;
                        var file = item.name;
                        if (!item.file) {
                            file = self.filterFileName(item.name);
                        }

                        if (item.type) {
                            item.type = fixType(item.type);
                        }

                        item.path = exData.base + path.join(k, file + '.html');

                        self.data[k][key] = item;
                    });
                });
                Y.each(exData.classitems, function (item) {
                    item.external = true;
                    item.path = exData.base + path.join('files', self.filterFileName(item.file) + '.html');
                    if (item.type) {
                        item.type = fixType(item.type);
                    }
                    if (item.params) {
                        item.params.forEach(function (p) {
                            if (p.type) {
                                p.type = fixType(p.type);
                            }
                        });
                    }
                    if (item["return"]) {
                        item["return"].type = fixType(item["return"].type);
                    }
                    self.data.classitems.push(item);
                });
            });
        }