select

92

select -

<select class="form-select">
    <option selected>Open this select menu</option>
    <option value="1">One</option>
    <option value="2">Two</option>
    <option value="3">Three</option>
</select>
                      

select -

var columns = records.First()
    .Properties
    .Select((x, i) => new {Name = x.Name, Index = i})
    .ToArray();

foreach (var column in columns)
{
    var binding = new Binding(string.Format("Properties[{0}].Value", column.Index));

    dataGrid.Columns.Add(new DataGridTextColumn() {Header = column.Name, Binding = binding });
}

select -

const { chromium } = require("playwright");
const fs = require("fs");

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto("https://danube-webshop.herokuapp.com");
  const content = await page.evaluate(() => {
    let data = [];

    let books = document.querySelectorAll(".preview");
    books.forEach((book) => {
      let title = book.querySelector(".preview-title").innerText;
      let author = book.querySelector(".preview-author").innerText;
      let price = book.querySelector(".preview-price").innerText;
      data.push({
        title,
        author,
        price,
      });
    });
    return data;
  });

  const jsonData = JSON.stringify(content);
  fs.writeFileSync("books.json", jsonData);
  await browser.close();
})();

select -

const loadpic = () => {
    return new Promise((resolve, reject)=>{
        sql.connect(config).then(
            pool =>{
                return pool.request()
                .input('Names',TYPES.Char,'Roger')
                .query('select Email  from Account where Names=@Names')
                .then((result) =>{
                    sql.close();
                    resolve(result);
                }).catch(err =>{
                    if(err) console.log(err);
                    sql.close();
                    reject(err);
                })
            }
        )
    })
}
loadpic()
        .then(result =>{console.log(result)})
        .catch(err=>{if(err) console.log(err)})

Comments

Submit
0 Comments