WindowsForms backstage

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net.Http;
using Newtonsoft.Json;
using Aspose.Cells;
namespace WindowsDB2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
/// <summary>
/// Show
/// </summary>
void Bind(string name="",int type=1)
{
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.GetAsync("actionApi/showApi/show?name=" + name + "&type=" + type).Result;
if (mesa.IsSuccessStatusCode)
{
var p = mesa.Content.ReadAsStringAsync().Result;
var js = JsonConvert.DeserializeObject<List<stuModel>>(p);
dataGridView1.AllowUserToAddRows = false;
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = js;
}
}
/// <summary>
/// The drop-down
/// </summary>
void xia()
{
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.GetAsync("actionApi/showApi/xia").Result;
if (mesa.IsSuccessStatusCode)
{
var p = mesa.Content.ReadAsStringAsync().Result;
var js = JsonConvert.DeserializeObject<List<stuType>>(p);
comboBox1.DisplayMember = "TypeName";
comboBox1.ValueMember = "Typeid";
comboBox1.DataSource = js;
}
}
/// <summary>
/// load Show
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>

private void Form1_Load(object sender, EventArgs e)
{
xia();
Bind("", 1);
}
/// <summary>
/// Picture shows
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
DataGridView p = sender as DataGridView;
if (p.Columns[e.ColumnIndex].Name == "Tu")
{
e.Value = Image.FromFile(Application.StartupPath + "\\img\\" + e.Value);
}
}
/// <summary>
/// add to
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
Add d = new Add();
d.ShowDialog();
Bind("", 1);
}
/// <summary>
/// export
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.GetAsync("actionApi/showApi/show").Result;
if (mesa.IsSuccessStatusCode)
{
var p = mesa.Content.ReadAsStringAsync().Result;
var js = JsonConvert.DeserializeObject<List<stuModel>>(p);
Workbook book = new Workbook();
Worksheet s = book.Worksheets[0];
Cells cell = s.Cells;
int i = 0;
cell[i, 0].PutValue(" Number ");
cell[i, 1].PutValue(" name ");
cell[i, 2].PutValue(" Price ");
cell[i, 3].PutValue(" picture ");
cell[i, 4].PutValue(" type ");
foreach (stuModel item in js)
{
i++;
cell[i, 0].PutValue(item.ID);
cell[i, 1].PutValue(item.Names);
cell[i, 2].PutValue(item.Price);
cell[i, 3].PutValue(item.Imgname);
cell[i, 4].PutValue(item.TypeName);
}
string newname = Guid.NewGuid().ToString() + ".xlsx";
book.Save(newname);
System.Diagnostics.Process.Start(Application.StartupPath + "\\" + newname);
}
}

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
Bitmap p = new Bitmap(groupBox1.Width, groupBox1.Height);
groupBox1.DrawToBitmap(p, new Rectangle(0,0,p.Width, p.Height));
e.Graphics.DrawImage(p, 0, 0, p.Width, p.Height);
}
/// <summary>
/// Print
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button4_Click(object sender, EventArgs e)
{
printPreviewDialog1.ShowDialog();
}
/// <summary>
/// Delete modify
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
DataGridView p = sender as DataGridView;
DataGridViewRow row = p.Rows[e.RowIndex];
if (p.Columns[e.ColumnIndex].Name == "del")
{
var id = row.Cells[0].Value;
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.DeleteAsync("actionApi/showApi/shan?id=" + id).Result;
if (mesa.IsSuccessStatusCode)
{
var ppp = mesa.Content.ReadAsStringAsync().Result;
if (Convert.ToInt32(ppp) > 0)
{
MessageBox.Show(" Delete successful ");
Bind("", 1);
}
}

}
if (p.Columns[e.ColumnIndex].Name == "update")
{
var id = row.Cells[0].Value;
xiu f = new xiu(Convert.ToInt32(id));
f.ShowDialog();
Bind("", 1);
}
}
/// <summary>
/// Future generations
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button5_Click(object sender, EventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
dataGridView1.Rows[i].Cells[1].Value = true;
}
}

// Batch deletion

private void button6_Click(object sender, EventArgs e)
{
string id = string.Empty;
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
DataGridViewRow row = dataGridView1.Rows[i];
if (Convert.ToBoolean(row.Cells[1].Value))
{
id += row.Cells[0].Value + ",";
}
}
id = id.TrimEnd(',');
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.DeleteAsync("actionApi/showApi/shan?id=" + id).Result;
if (mesa.IsSuccessStatusCode)
{
var ppp = mesa.Content.ReadAsStringAsync().Result;
if (Convert.ToInt32(ppp) > 0)
{
MessageBox.Show(" Delete successful ");
Bind("",1);
}
}
}

// Inquire about

private void button3_Click(object sender, EventArgs e)
{
var name = textBox1.Text;
int type =Convert.ToInt32(comboBox1.SelectedValue);
Bind(name, type);
}
}
}

WindowsForms add to

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace WindowsDB2
{
public partial class Add : Form
{
public Add()
{
InitializeComponent();
}
string tus = "";
void xia()
{
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.GetAsync("actionApi/showApi/xia").Result;
if (mesa.IsSuccessStatusCode)
{
var p = mesa.Content.ReadAsStringAsync().Result;
var js = JsonConvert.DeserializeObject<List<stuType>>(p);
comboBox1.DisplayMember = "TypeName";
comboBox1.ValueMember = "Typeid";
comboBox1.DataSource = js;
}
}
/// <summary>
/// Drop down list
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Add_Load(object sender, EventArgs e)
{
xia();
}
/// <summary>
/// add to
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog p = new OpenFileDialog();
if (p.ShowDialog() == DialogResult.OK)
{
string flirename = p.FileName;
int page = flirename.LastIndexOf("\\");
string newname = Guid.NewGuid().ToString() + (flirename.Substring(page + 1));
using (FileStream ds = new FileStream(@".\img\" + newname, FileMode.CreateNew))
{
using (Stream str = p.OpenFile())
{
str.CopyTo(ds);
str.Flush();

stuModel m = new stuModel();
m.Names = textBox1.Text;
m.Price = Convert.ToInt32(textBox2.Text);
m.Typeid = Convert.ToInt32(comboBox1.SelectedValue);
m.Imgname = newname;
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpContent cont = new StringContent(JsonConvert.SerializeObject(m));
cont.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");

HttpResponseMessage mesa = client.PostAsync("actionApi/showApi/add", cont).Result;
if (mesa.IsSuccessStatusCode)
{
var pp = mesa.Content.ReadAsStringAsync().Result;
if (Convert.ToInt32(pp) > 0)
{
MessageBox.Show(" Add success ");
this.Close();
}
else
{
MessageBox.Show(" Add failure ");
}
}
pictureBox1.ImageLocation = (@".\img\" + newname).ToString();
}
}
}
}

private void label4_Click(object sender, EventArgs e)
{
OpenFileDialog p = new OpenFileDialog();
if (p.ShowDialog() == DialogResult.OK)
{
string flirename = p.FileName;
int page = flirename.LastIndexOf("\\");
string newname = Guid.NewGuid().ToString() + (flirename.Substring(page + 1));
tus = newname;
using (FileStream ds = new FileStream(@".\img\" + newname, FileMode.CreateNew))
{
using (Stream str = p.OpenFile())
{
str.CopyTo(ds);
str.Flush();
pictureBox1.ImageLocation = (@".\img\" + newname).ToString();
}
}
}
}

private void button2_Click(object sender, EventArgs e)
{
stuModel m = new stuModel();
m.Names = textBox1.Text;
m.Price = Convert.ToInt32(textBox2.Text);
m.Typeid = Convert.ToInt32(comboBox1.SelectedValue);
m.Imgname = tus;
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpContent cont = new StringContent(JsonConvert.SerializeObject(m));
cont.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");

HttpResponseMessage mesa = client.PostAsync("actionApi/showApi/add", cont).Result;
if (mesa.IsSuccessStatusCode)
{
var pp = mesa.Content.ReadAsStringAsync().Result;
if (Convert.ToInt32(pp) > 0)
{
MessageBox.Show(" Add success ");
this.Close();
}
else
{
MessageBox.Show(" Add failure ");
}

}
}
}
}

modify

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsDB2
{
public partial class xiu : Form
{
public xiu()
{
InitializeComponent();
}
string ids = "";
void xia()
{
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.GetAsync("actionApi/showApi/xia").Result;
if (mesa.IsSuccessStatusCode)
{
var p = mesa.Content.ReadAsStringAsync().Result;
var js = JsonConvert.DeserializeObject<List<stuType>>(p);
comboBox1.DisplayMember = "TypeName";
comboBox1.ValueMember = "Typeid";
comboBox1.DataSource = js;
}
}
public xiu(int id)
{
InitializeComponent();
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpResponseMessage mesa = client.GetAsync("actionApi/showApi/dan?id=" + id).Result;
if (mesa.IsSuccessStatusCode)
{
var p = mesa.Content.ReadAsStringAsync().Result;
var js = JsonConvert.DeserializeObject<List<stuModel>>(p).FirstOrDefault();
textBox1.Text = js.Names;
textBox2.Text = js.Price.ToString();
comboBox1.Text = js.TypeName;
pictureBox1.ImageLocation = (@".\img\" + js.Imgname).ToString();
ids = id.ToString();

}

}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog p = new OpenFileDialog();
if (p.ShowDialog() == DialogResult.OK)
{
string flirename = p.FileName;
int page = flirename.LastIndexOf("\\");
string newname = Guid.NewGuid().ToString() + (flirename.Substring(page + 1));
using (FileStream ds = new FileStream(@".\img\" + newname, FileMode.CreateNew))
{
using (Stream str = p.OpenFile())
{
str.CopyTo(ds);
str.Flush();

stuModel m = new stuModel();
m.Names = textBox1.Text;
m.Price = Convert.ToInt32(textBox2.Text);
m.Typeid = Convert.ToInt32(comboBox1.SelectedValue);
m.Imgname = newname;
m.ID =Convert.ToInt32(ids);
Uri uri = new Uri("http://localhost:8231/");
HttpClient client = new HttpClient();
client.BaseAddress = uri;
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
HttpContent cont = new StringContent(JsonConvert.SerializeObject(m));
cont.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json");

HttpResponseMessage mesa = client.PutAsync("actionApi/showApi/xiu", cont).Result;
if (mesa.IsSuccessStatusCode)
{
var pp = mesa.Content.ReadAsStringAsync().Result;
if (Convert.ToInt32(pp) > 0)
{
MessageBox.Show(" Modification successful ");
this.Close();
}
else
{
MessageBox.Show(" Modification failed ");
}
}
pictureBox1.ImageLocation = (@".\img\" + newname).ToString();
}
}
}
}

private void xiu_Load(object sender, EventArgs e)
{
xia();
}
}
}

Pagination

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace WindowsDB2
{
public partial class fen : Form
{
public fen()
{
InitializeComponent();
}
int count = 0;
int PageIndex = 0;
int PageSize = 4;
void Bind(int PageIndex,string sql)
{
MySqlParameter[] app = new MySqlParameter[] { (new MySqlParameter("@Exstr", MySqlDbType.VarChar, 200)), new MySqlParameter("@PageIndex", MySqlDbType.Int32),new MySqlParameter("@PageSize", MySqlDbType.Int32) };
app[0].Value = "";
app[0].Direction = ParameterDirection.Input;
app[1].Value = PageIndex;
app[1].Direction = ParameterDirection.Input;
app[2].Value = PageSize;
app[2].Direction = ParameterDirection.Input;
DataSet ds = new DAL.stuDAL().show("P_Lianxi", app);
dataGridView1.DataSource = ds.Tables[0];
}

private void fen_Load(object sender, EventArgs e)
{
count = new DAL.stuDAL().cou();
PageIndex = (int)(Math.Ceiling(Convert.ToDouble(count) / PageSize));
for (int i = 1; i <=PageIndex; i++)
{
comboBox1.Items.Add(i);
}
comboBox1.Text = "1";
Bind(0, "");
}
/// <summary>
/// home page
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
comboBox1.Text = "1";
Bind(0, "");
}
/// <summary>
/// Tail page
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button4_Click(object sender, EventArgs e)
{
var row = (int)(Math.Ceiling(Convert.ToDouble(count) / PageSize));
Bind((row - 1) * 4, "");
comboBox1.Text = row.ToString();
}
/// <summary>
/// The next page
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
int page = Convert.ToInt32(comboBox1.Text);
PageIndex = (int)(Math.Ceiling(Convert.ToDouble(count) / PageSize));
if (page < PageIndex)
{
comboBox1.Text = (page + 1).ToString();
Bind((Convert.ToInt32(comboBox1.Text) - 1) * 4, "");

}
}
/// <summary>
/// The previous page
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button3_Click(object sender, EventArgs e)
{
int page = Convert.ToInt32(comboBox1.Text);

if (page!=1)
{
comboBox1.Text = (page -1).ToString();
Bind((Convert.ToInt32(comboBox1.Text) - 1) * 4, "");

}
}
}
}

The number of pages

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using System.Data;
namespace DAL
{
public class stuDAL
{
public MySqlConnection conn = new MySqlConnection("database = 'lianxi'; data source = 'localhost'; user id = 'root'; password='1234';charset='utf8';pooling=true");
public DataSet show(string name, params MySqlParameter[] par)
{
MySqlCommand cmd = new MySqlCommand(name,conn);
cmd.CommandType = CommandType.StoredProcedure;
DataSet ds = new DataSet();
MySqlDataAdapter data = new MySqlDataAdapter();
if (par == null)
{
return null;
}
foreach (MySqlParameter item in par)
{
cmd.Parameters.Add(item);
}
conn.Open();
cmd.ExecuteNonQuery();
data.SelectCommand = cmd;
data.Fill(ds, name);
data.Dispose();
conn.Close();
conn.Dispose();
return ds;

}
public int cou()
{
string sql = " SELECT COUNT(1) from lianxiinfo ";
conn.Open();
MySqlCommand cmd = new MySqlCommand(sql, conn);
object i = cmd.ExecuteScalar();
conn.Close();
return Convert.ToInt32(i);
}
}
}

API

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Model;
namespace WebApplicationDB2.Controllers
{
public class showApiController : ApiController
{
/// <summary>
/// Show all
/// </summary>
/// <returns></returns>
// GET: api/showApi
[HttpGet]
public List<stuModel> show(string name = "", int type = 1)
{
var p = new BLL.stuBLL().show(name,type);
return p.ToList();
}
/// <summary>
/// Show dropdown
/// </summary>
/// <returns></returns>
[HttpGet]
public List<stuType> xia()
{
var p = new BLL.stuBLL().xia();
return p.ToList();
}
/// <summary>
/// A piece of data
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
public List<stuModel> dan(int id)
{
var p = new BLL.stuBLL().dan(id);
return p.ToList();
}
/// <summary>
/// add to
/// </summary>
/// <param name="m"></param>
/// <returns></returns>
// GET: api/showApi/5
[HttpPost]
public int add(stuModel m)
{
var p = new BLL.stuBLL().add(m);
return p;
}
/// <summary>
/// Delete
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpDelete]
public int shan(string id)
{
var p = new BLL.stuBLL().shan(id);
return p;
}
/// <summary>
/// modify
/// </summary>
/// <param name="m"></param>
/// <returns></returns>
[HttpPut]
public int xiu(stuModel m)
{
var p = new BLL.stuBLL().xiu(m);
return p;
}
}
}

To configure

config.Routes.MapHttpRoute(
name: "actionApi",
routeTemplate: "actionApi/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);

WindowsForms call API More articles about

  1. C# Call in API

    Introduce  API( Application Programming Interface ), I don't think you are unfamiliar with , It's us Windows Frequent users of programming , Although based on .Net Platform C# With a powerful class library , however , We still can't ...

  2. [ turn ]c# call API Screenshot

    from http://blog.csdn.net/hailiannanhai/article/details/6281471 To accomplish this function , First of all, we need to know about C# How to call API( Application program interface ) function . though ...

  3. One C# Get high precision time class ( call API QueryP*)

    If you feel like using DotNet Self contained DateTime The time precision obtained is not enough , The solution is to call QueryPerformanceFrequency and QueryPerformanceCounter this ...

  4. ABP Mobile phone calls API At the time of the CORS

    This question has been considered for a long time , At that time, because there was no special rush to solve this problem , Just drag on .... ok , Procrastination is not good , All you don't have to do , It will force you to solve the problem in a short time ... Implement the project Rewrite an existing webfo ...

  5. call API function , Draw in the non client area of the window ( adopt GetWindowDC Get the whole window DC, Then you can draw at will )

    http://hi.baidu.com/3582077/item/77d3c1ff60f9fa5ec9f33754 call API function , Draw in the non client area of the window GDI+ Of Graphics There is one in the class. FromHdc ...

  6. C# call API function EnumWindows Enumerating windows

    original text http://blog.csdn.net/dengta_snowwhite/article/details/6067928 And C++ Different ,C# call API The function needs to introduce .dll file , Steps are as follows : 1. ...

  7. stay C# Call in API Access to network information and traffic

    original text stay C# Call in API Access to network information and traffic In a recent project, it is required to display network traffic , And must use C#. in fact , call IpHlpApi.dll Of GetIfTable API Easy access to network information and network traffic . ...

  8. C# Area screenshot &mdash;&mdash; call API Screenshot

    original text :C# Area screenshot —— call API Screenshot Preface : Screenshot for a C++ It's a piece of cake for developers , Some friends use it too C# Of Graphics.CopyFromScreen Method screen operation , As a teacher, I want to use C++ open ...

  9. HttpClient call api

    /// <summary> /// Analog call API /// </summary> /// <param requestUrl=""> Request address &l ...

Random recommendation

  1. Angular2 Http

    1. Use Http Most applications deal with back office services ,Http It is the main communication protocol between browser and server , adopt Http Call to access the corresponding Web API. HttpModule Not at all Angu ...

  2. Remember a proc_open I didn't open my mind

    introduction : Today when deploying the server , Use composer To install dependencies . Yes The Process class relies on proc_open, which is not available on ...

  3. html5 webDatabase In storage sql Statement execution can be nested using

    html5 webDatabase In storage sql Statement execution can be nested using , The code is as follows : *); data.transaction(function(tx){ tx.executeSql("creat ...

  4. Nodejs in Visual Studio Code 13. Build a single page application Scrat Let's dig

    1. Start Scrat The author said that it would be a good example of blockhouse , Sure enough, it came out , If you want to learn and use Scrat, You can start with the official example , It's so convenient . 2.Scrat Example Catalog component_modules : Common components ...

  5. stay Mac pro How to configure adb command ?

    stay Mac pro How to Android SDK Of adb Add the command to the environment variable , It will be explained here ! Method / step 1 Start the terminal , Can be in Spotlight Mid search “ terminal ” 2 Enter the current user's HOME Catalog , The order is as follows ...

  6. shell Learning notes ( One )

    1. The first line must be marked with #!/bin/bash #! Indicates that the script is interpreted and executed using the following interpreter 2.echo Printout for example   echo "hello world" > aa.txt 3. Pick up ...

  7. java Multithreading creation -Thread,Runnable,callable and threadpool

    java There are many ways to create multithreading , Here's a brief review 1. Inherit Thread class Inherit java.lang.Thread class , Create local multithreaded classes , heavy load run() Method , call Thread To start a thread . Example code such as ...

  8. Win10 - MySQL 5.7 Password reset

    Win10 - MySQL 5.7 Password reset All behaviors occur under the permission of system administrator Cmd or Powershell Next Be careful ! This behavior will cause the database to reset # reinstall mysql service mysqld -- ...

  9. 【 The most complete series of blog beautification tutorials in the whole network 】08. Custom address bar Logo

    The most comprehensive blog beautification series tutorial related article directory of the whole network [ The most complete series of blog beautification tutorials in the whole network ]01. add to Github Project links [ The most complete series of blog beautification tutorials in the whole network ]02. add to QQ Talk Links [ The most complete series of blog beautification tutorials in the whole network ]03. Add... To your blog ...

  10. vue.js And the actual combat of the project [ note ]— 04 axios

    One . axios 1. Basic use axios.method('url',[,...data],options) .then(function(res){ }) .catch(function(err) ...