public IHttpActionResult PostDJ(DJ dJ) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.DJs.Add(dJ); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = dJ.Id }, dJ)); }
// Start is called before the first frame update void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
static void WithDJ() { dynamic calc = DJ.New("Calculator"); var f1 = calc.Sub(1f / 3f, 1f / 7f); var f2 = calc.Sub(new JPrimitive(1f / 3f), new JPrimitive(1f / 7f)); //In fact I'd like to use JObject var f3 = calc.TestFloat(); var d1 = calc.DSub(1d / 3d, 1d / 7d); var d2 = calc.DSub(new JPrimitive(1d / 3d), new JPrimitive(1d / 7d)); var d3 = calc.TestDouble(); Console.WriteLine($"With DJ:\r\n{f1}\t{f2}\t{f3}\t{d1}\t{d2}\t{d3}"); }
public IHttpActionResult DeleteDJ(int id) { DJ dJ = db.DJs.Find(id); if (dJ == null) { return(NotFound()); } db.DJs.Remove(dJ); db.SaveChanges(); return(Ok(dJ)); }
private void Awake() { //temp to remove unity's debug updater which crashes with new input GameObject go = GameObject.Find("[Debug Updater]"); if (go != null) { DestroyImmediate(go); } if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); musicSource = GetComponent <AudioSource>(); Cursor.visible = false; }
// GET: Administador/Delete/5 public ActionResult Delete(int id) { DJ.deleteJuego(id); return(RedirectToAction("Juegos")); }
//修改党建新闻 public int NewsDJUpd(DJ j) { string sql = $"update NewsDJ set Djlei='{j.Djlei}',DjTitle='{j.DjTitle}',Djmiao='{j.Djmiao}',Djimg='{j.Djimg}',DjShiPin='{j.DjShiPin}',Djnei='{j.Djnei}',DjLY='{j.DjLY}',Djurl='{j.Djurl}' where Djid={j.Djid}"; return(DBHelper.ExecuteNonQuery(sql, System.Data.CommandType.Text)); }
//添加党建新闻 public int NewsDJAdd(DJ j) { string sql = $"insert into NewsDJ(Djlei,DjTitle,Djmiao,Djimg,DjShiPin,Djnei,DjLY,Djurl) values('{j.Djlei}','{j.DjTitle}','{j.Djmiao}','{j.Djimg}','{j.DjShiPin}','{j.Djnei}','{j.DjLY}','{j.Djurl}')"; return(DBHelper.ExecuteNonQuery(sql, System.Data.CommandType.Text)); }
public static void Instan(int type, AudioClip clip = null, Action onFinish = null,float timeIsPlay = 0f) { GameObject tmp = GameObject.Find("DJ"); if (tmp == null) tmp = GameObject.Find("DJ(Clone)"); if (tmp != null) instan = tmp.GetComponent<DJ>(); if (instan == null) { if (GameObject.Find("DJ")) instan = GameObject.Find("DJ").GetComponent<DJ>(); else { GameObject inst = Instantiate(Resources.Load("System/DJ", typeof(GameObject))) as GameObject; instan = inst.GetComponent<DJ>(); } } Fin(type, clip, onFinish,timeIsPlay); }