void Awake() { rb1 = Body1.GetComponent <Rigidbody>(); rb2 = Body2.GetComponent <Rigidbody>(); rb3 = Body3.GetComponent <Rigidbody>(); rb5 = Body5.GetComponent <Rigidbody>(); rb6 = Body6.GetComponent <Rigidbody>(); }
public static void Run() { var profileId = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; var tokenId = CreatePaymentInstrument.Run().Id; var requestObj = new Body3(); var cardObj = new Tmsv1paymentinstrumentsCard { ExpirationMonth = "09", ExpirationYear = "2022", Type = Tmsv1paymentinstrumentsCard.TypeEnum.Visa }; requestObj.Card = cardObj; var billToObj = new Tmsv1paymentinstrumentsBillTo { FirstName = "John", LastName = "Smith", Company = "CyberSource", Address1 = "12 Main Street", Address2 = "20 My Street", Locality = "San Francisco", AdministrativeArea = "CA", PostalCode = "90200", Country = "US", Email = "*****@*****.**", PhoneNumber = "555123456" }; requestObj.BillTo = billToObj; var instrumentIdentifierObj = new Tmsv1paymentinstrumentsInstrumentIdentifier(); var cardObj2 = new Tmsv1instrumentidentifiersCard { Number = "4111111111111111" }; instrumentIdentifierObj.Card = cardObj2; requestObj.InstrumentIdentifier = instrumentIdentifierObj; try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PaymentInstrumentsApi(clientConfig); var result = apiInstance.TmsV1PaymentinstrumentsTokenIdPatch(profileId, tokenId, requestObj); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API: " + e.Message); } }
void setRigibody() { this.rb1 = Body1.GetComponent <Rigidbody>(); this.rb2 = Body2.GetComponent <Rigidbody>(); this.rb3 = Body3.GetComponent <Rigidbody>(); this.rb4 = Body4.GetComponent <Rigidbody>(); this.rb5 = Body5.GetComponent <Rigidbody>(); this.rb6 = Body6.GetComponent <Rigidbody>(); }
public void RestapiV10AccountAccountIdExtensionExtensionIdCompanyPagerPostTest() { // TODO: add unit test for the method 'RestapiV10AccountAccountIdExtensionExtensionIdCompanyPagerPost' string accountId = null; // TODO: replace null with proper value string extensionId = null; // TODO: replace null with proper value Body3 body = null; // TODO: replace null with proper value var response = instance.RestapiV10AccountAccountIdExtensionExtensionIdCompanyPagerPost(accountId, extensionId, body); Assert.IsInstanceOf <MessageInfo> (response, "response is MessageInfo"); }
public static void Run(IReadOnlyDictionary <string, string> configDictionary) { var profileId = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; var tokenId = "7020000000000137654"; var requestObj = new Body3(); var cardObj = new PaymentinstrumentsCard(); cardObj.ExpirationMonth = "09"; cardObj.ExpirationYear = "2022"; cardObj.Type = PaymentinstrumentsCard.TypeEnum.Visa; requestObj.Card = cardObj; var billToObj = new PaymentinstrumentsBillTo(); billToObj.FirstName = "John"; billToObj.LastName = "Smith"; billToObj.Company = "CyberSource"; billToObj.Address1 = "12 Main Street"; billToObj.Address2 = "20 My Street"; billToObj.Locality = "San Francisco"; billToObj.AdministrativeArea = "CA"; billToObj.PostalCode = "90200"; billToObj.Country = "US"; billToObj.Email = "*****@*****.**"; billToObj.PhoneNumber = "555123456"; requestObj.BillTo = billToObj; var instrumentIdentifierObj = new PaymentinstrumentsInstrumentIdentifier(); var cardObj2 = new InstrumentidentifiersCard(); cardObj2.Number = "4111111111111111"; instrumentIdentifierObj.Card = cardObj2; requestObj.InstrumentIdentifier = instrumentIdentifierObj; try { var apiInstance = new PaymentInstrumentApi(); var result = apiInstance.PaymentinstrumentsTokenIdPatch(profileId, tokenId, requestObj); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API: " + e.Message); } }
void Awake() { rb1 = Body1.GetComponent <Rigidbody>(); rb2 = Body2.GetComponent <Rigidbody>(); rb3 = Body3.GetComponent <Rigidbody>(); rb4 = Body4.GetComponent <Rigidbody>(); rb5 = Body5.GetComponent <Rigidbody>(); rb6 = Body6.GetComponent <Rigidbody>(); GameObject tor = this.chita.transform.GetChild(0).gameObject; torax = tor.GetComponent <Rigidbody>(); testeColisao = this.chita.transform.GetChild(13).gameObject; //chita = GameObject.Find("Chita"); //z = new Animalx (); //a = GameObject.Instantiate (chita); //a.transform.position = new Vector3 (-2.16f,0.16f,-5f); }
// Update is called once per frame void Update() { //Vector3 force1 = 30*ks*(desiredPos - rb1.position) - 30*kd*(rb1.velocity); //rb1.AddForce(force1); //float torque1 = 30*ks*(angle1 - Body1.GetComponent<HingeJoint>().angle) - kd*(Body1.GetComponent<HingeJoint>().velocity); //rb1.AddTorque(Vector3.forward * torque1); float torque2 = 30 * ks * (angle2 - Body2.GetComponent <HingeJoint>().angle) - kd * (Body2.GetComponent <HingeJoint>().velocity); rb1.AddTorque(Vector3.forward * torque2); rb2.AddTorque(Vector3.forward * torque2); float torque3 = 30 * ks * (angle3 - Body3.GetComponent <HingeJoint>().angle) - kd * (Body3.GetComponent <HingeJoint>().velocity); rb3.AddTorque(Vector3.forward * torque3); float torque5 = 30 * ks * (angle5 - Body5.GetComponent <HingeJoint>().angle) - kd * (Body5.GetComponent <HingeJoint>().velocity); rb5.AddTorque(Vector3.forward * torque5); float torque6 = 30 * ks * (angle6 - Body6.GetComponent <HingeJoint>().angle) - kd * (Body6.GetComponent <HingeJoint>().velocity); rb6.AddTorque(Vector3.forward * torque6); }
public virtual IActionResult PostToProjectTeamRoles([FromHeader] string accept, [FromHeader] string prefer, [FromHeader] string xMsUserAgent, [FromHeader] string xMsClientSessionId, [FromHeader] string xMsClientRequestId, [FromHeader] string requestId, [FromHeader] string clientSessionId, [FromHeader] string formLoadId, [FromHeader] string acceptLanguage, [FromHeader] string cacheControl, [FromHeader] string contentType, [FromBody] Body3 body) { //TODO: Uncomment the next line to return response 0 or use other options such as return this.NotFound(), return this.BadRequest(..), ... // return StatusCode(0, default(Object)); string exampleJson = null; exampleJson = "\"\""; var example = exampleJson != null ? JsonConvert.DeserializeObject <Object>(exampleJson) : default(Object); //TODO: Change the data returned return(new ObjectResult(example)); }
public virtual IActionResult AddVisit([FromBody] Body3 body) { (string, UserType)sender; try { sender = Security.SolveGUID(_context, Request.Headers["Guid"]); } catch (Exception e) { return(StatusCode(401, e.Message)); } var car = _context.Cars.FirstOrDefault(x => x.LicensePlate.Equals(body.LicensePlate)); if (car is null) { return(StatusCode(404)); } var client = _context.Users.FirstOrDefault(x => x.Username == car.Username); if (client is null) { return(StatusCode(400)); } var employees = _context.Users .Include(x => x.AssignedVisits); var min = employees.Where(x => x.UserType == UserType.WORKSHOP_EMPLOYEE) .Min(x => x.AssignedVisits.Count); var employee = employees.FirstOrDefault(x => x.AssignedVisits.Count == min && x.UserType == UserType.WORKSHOP_EMPLOYEE); if (employee is null) { return(StatusCode(400)); } var visit = new Visit { Date = body.Date, Car = car, LicensePlate = body.LicensePlate, RequiredActions = body.RequiredActions, Type = body.Type, Priority = body.Priority, Status = 0, CarOwnerUsername = client.Username, }; var ev = new EmployeeVisit { VisitId = _context.Visits.Max(x => x.VisitId) + 1, Username = employee.Username }; _context.Visits.Add(visit); _context.EmployeesVisits.Add(ev); try { _context.SaveChanges(); } catch (DbUpdateException) { return(StatusCode(400)); } return(new ObjectResult(visit)); }
public void Init() { instance = new Body3(); }
/// <summary> /// Partially modify a Server You can use update attributes of a server /// </summary> /// <param name="datacenterId"></param> /// <param name="serverId">The unique ID of the server</param> /// <param name="server">Modified properties of Server</param> /// <param name="body"></param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Task of ApiResponse (Server)</returns> public async System.Threading.Tasks.Task<ApiResponse<Server>> PartialUpdateAsyncWithHttpInfo(string datacenterId, string serverId, ServerProperties server, Body3 body = null, bool? parameter = null, int? depth = null) { // verify the required parameter 'datacenterId' is set if (datacenterId == null) throw new ApiException(400, "Missing required parameter 'datacenterId' when calling PartialUpdate"); // verify the required parameter 'serverId' is set if (serverId == null) throw new ApiException(400, "Missing required parameter 'serverId' when calling PartialUpdate"); // verify the required parameter 'server' is set if (server == null) throw new ApiException(400, "Missing required parameter 'server' when calling PartialUpdate"); var path_ = "/datacenters/{datacenterId}/servers/{serverId}"; var pathParams = new Dictionary<String, String>(); var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(); var formParams = new Dictionary<String, String>(); var fileParams = new Dictionary<String, FileParameter>(); Object postBody = null; // to determine the Content-Type header String[] httpContentTypes = new String[] { "application/vnd.profitbricks.partial-properties+json", "application/json" }; String httpContentType = Configuration.ApiClient.SelectHeaderContentType(httpContentTypes); // to determine the Accept header String[] httpHeaderAccepts = new String[] { "application/vnd.profitbricks.resource+json" }; String httpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(httpHeaderAccepts); if (httpHeaderAccept != null) headerParams.Add("Accept", httpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); if (datacenterId != null) pathParams.Add("datacenterId", Configuration.ApiClient.ParameterToString(datacenterId)); // path parameter if (serverId != null) pathParams.Add("serverId", Configuration.ApiClient.ParameterToString(serverId)); // path parameter if (parameter != null) queryParams.Add("parameter", Configuration.ApiClient.ParameterToString(parameter)); // query parameter if (depth != null) queryParams.Add("depth", Configuration.ApiClient.ParameterToString(depth)); // query parameter postBody = Configuration.ApiClient.Serialize(server); // http body (model) parameter // authentication (basicAuth) required // http basic authentication required if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password)) { headerParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password); } // make the HTTP request IRestResponse response = (IRestResponse)await Configuration.ApiClient.CallApiAsync(path_, Method.PATCH, queryParams, postBody, headerParams, formParams, fileParams, pathParams, httpContentType); int statusCode = (int)response.StatusCode; if (statusCode >= 400) throw new ApiException(statusCode, "Error calling PartialUpdate: " + response.Content, response.Content); else if (statusCode == 0) throw new ApiException(statusCode, "Error calling PartialUpdate: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse<Server>(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Server)Configuration.ApiClient.Deserialize(response, typeof(Server))); }
/// <summary> /// Partially modify a Server You can use update attributes of a server /// </summary> /// <param name="datacenterId"></param> /// <param name="serverId">The unique ID of the server</param> /// <param name="server">Modified properties of Server</param> /// <param name="body"></param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Task of Server</returns> public async System.Threading.Tasks.Task<Server> PartialUpdateAsync(string datacenterId, string serverId, ServerProperties server, Body3 body = null, bool? parameter = null, int? depth = null) { ApiResponse<Server> response = await PartialUpdateAsyncWithHttpInfo(datacenterId, serverId, server, body, parameter, depth); return response.Data; }
/// <summary> /// Partially modify a Server You can use update attributes of a server /// </summary> /// <param name="datacenterId"></param> /// <param name="serverId">The unique ID of the server</param> /// <param name="server">Modified properties of Server</param> /// <param name="body"></param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Server</returns> public Server PartialUpdate(string datacenterId, string serverId, ServerProperties server, Body3 body = null, bool? parameter = null, int? depth = null) { ApiResponse<Server> response = PartialUpdateWithHttpInfo(datacenterId, serverId, server, body, parameter, depth); return response.Data; }