/// <summary> /// 发送FeedCard类型 /// </summary> public static void OapiRobotFeedCard() { FeedCardModel fcModel = new FeedCardModel(); fcModel.msgtype = "feedCard"; fcModel.feedCard = new feedCard(); fcModel.feedCard.links = new List <links>();//使用List<model>中直接添加值 links model1 = new links(); model1.title = "时代的火车向前开"; model1.messageURL = "https://mp.weixin.qq.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI"; model1.picURL = "https://www.dingtalk.com/"; fcModel.feedCard.links.Add(model1); links model2 = new links(); model2.title = "时代的火车向前开2"; model2.messageURL = "https://mp.weixin.qq.com/s?__biz=MzA4NjMwMTA2Ng==&mid=2650316842&idx=1&sn=60da3ea2b29f1dcc43a7c8e4a7c97a16&scene=2&srcid=09189AnRJEdIiWVaKltFzNTw&from=timeline&isappinstalled=0&key=&ascene=2&uin=&devicetype=android-23&version=26031933&nettype=WIFI"; model2.picURL = "https://www.dingtalk.com/"; fcModel.feedCard.links.Add(model2); string data = JsonConvert.SerializeObject(fcModel); string json = Request(RobotSendUrl, data, "POST"); }
private void initEmpty() { Seed = new ColorfulRestProperty(); Colors = new List <ColorfulRestProperty>(); //Colors(); Links = new links(); Count = 0; Mode = string.Empty; }
public ActionResult DeleteConfirmed(int id) { links links = db.links.Find(id); db.links.Remove(links); db.SaveChanges(); return(RedirectToAction("Index")); }
private List<links> Outputs; //Список исходящих связей #endregion Fields #region Constructors /// <summary> /// Конструктор нейрона со случайными весами /// </summary> /// <param name="_inputs">Массив нейронов, являющихся входом данного нейрона</param> public neyron(neyron[] _inputs) { foreach (neyron element in _inputs) { links link = new links(element, GetRandomDouble()); Inputs.Add(link); } }
/// <summary> /// Конструктор нейрона с заданными весами /// </summary> /// <param name="_inputs">Массив нейронов, являющихся входом данного нейрона</param> /// <param name="_weigth">Соответствующие им веса</param> public neyron(neyron[] _inputs, double[] _weigth) { int i = 0; foreach (neyron element in _inputs) { links link = new links(element, _weigth[i]); Inputs.Add(link); i++; } }
/// <summary> /// Initializes the ColorfulSchemeRestProperty object from a ColorfulSchemeJsonParser object. /// </summary> /// <param name="json">(ColorfulSchemeJsonParser)object from API call.</param> public ColorfulSchemeRestProperty(object json) { var schemeData = (ColorfulSchemeJsonParser)json; Mode = schemeData.Mode; Count = schemeData.Count; Colors = schemeData.Colors; Seed = schemeData.Seed; Links = new links(schemeData.Links); Images = new images(schemeData.Images); }
public ActionResult Edit([Bind(Include = "link_id,resume_id,name,link")] links links) { if (ModelState.IsValid) { db.Entry(links).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.resume_id = new SelectList(db.resume, "resume_id", "resume_id", links.resume_id); return(View(links)); }
public ActionResult Create([Bind(Include = "link_id,resume_id,name,link")] links links) { if (ModelState.IsValid) { db.links.Add(links); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.resume_id = new SelectList(db.resume, "resume_id", "resume_id", links.resume_id); return(View(links)); }
// GET: links/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } links links = db.links.Find(id); if (links == null) { return(HttpNotFound()); } return(View(links)); }
// GET: links/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } links links = db.links.Find(id); if (links == null) { return(HttpNotFound()); } ViewBag.resume_id = new SelectList(db.resume, "resume_id", "resume_id", links.resume_id); return(View(links)); }
public async Task <ContentResult> EnviarTrabalho([FromBody] payload json) { Cliente cliente = new Cliente(json.cliente.Nome, json.cliente.Email); List <links> linkes = new List <links>(); foreach (var item in json.cliente.Links) { links link = new links(item.link, cliente); linkes.Add(item);; } ; cliente.AddLink(linkes); await context.clientes.AddAsync(cliente); await context.SaveChangesAsync(); MailService servicoEmail = new MailService(); var response = await servicoEmail.EnviarEmail(cliente.Nome, cliente.Email, linkes); return(Content(response.Body.ToString())); }
public void GetLinks(FreelancerProfileVM fp) { try { var list = (from l in db.links join r in db.resume on l.resume_id equals r.resume_id where l.resume_id == fp.Resume_id select new { l.link_id, l.name, l.link }).ToList(); foreach (var item in list) { links li = new links(); li.link_id = item.link_id; li.name = item.name; li.link = item.link; fp.LinkList.Add(li); } } catch (SqlException ex) { //TODO: Felmeddelande throw; } }
public override bool Equals(object obj) => obj is RecipeStruct other && id == other.id && name == other.name && rendimento == other.rendimento && EqualityComparer <Link[]> .Default.Equals(links, other.links);
/// <summary> /// Добавление ссылки на связь, являющейся исходящей. Для облегчения обучения /// </summary> /// <param name="_link">Структура связи</param> public void addOutput(ref links _link) { Outputs.Add(_link); }
private void initEmpty() { Seed = new ColorfulRestProperty(); Colors = new List<ColorfulRestProperty>();//Colors(); Links = new links(); Count = 0; Mode = string.Empty; }
/// <summary> /// Добавление входящей связи к нейрону /// </summary> /// <param name="_input">Нейрон, от которого идет связь</param> /// <param name="_weigth">Вес связи. Если = 0, то задается случайно в диапазоне (0,1)</param> public void addInput(neyron _input, double _weigth = 0) { links link; if(_weigth == 0) { link = new links(_input, GetRandomDouble()); } else { link = new links(_input, _weigth); } Inputs.Add(link); }