myuTuple=(u'USER', u'NODE', u'HASH', u'IDNBR') mysTuple=[str(x) for x in myuTuple]
(u'USER', u'NODE', u'HASH', u'IDNBR')
| PrinterSettings setting = new PrinterSettings(); | |
| listBox1.Items.Clear(); | |
| foreach (string prntr in PrinterSettings.InstalledPrinters) | |
| { | |
| System.Console.WriteLine(prntr); | |
| listBox1.Items.Add(prntr); | |
| } |
| public partial class Master: Form,INotifyPropertyChanged{ | |
| public Master() | |
| { | |
| InitializeComponent(); | |
| lbl_company.DataBindings.Add("Text", this, "Company"); | |
| } | |
| private void pictureBox16_Click(object sender, EventArgs e) | |
| { |
| //Please add reference to System.Web.Extention | |
| class Accounts | |
| { | |
| string acname; | |
| string code; | |
| public Accounts(string a,string c ) | |
| { | |
| acname = a; code = c; | |
| } |
| //The JSON FILE | |
| { | |
| "users": [ | |
| { | |
| "id": "1087", | |
| "name": "Abhishek Saini", | |
| "email": "[email protected]", | |
| "gender" : "male", | |
| "contact": { | |
| "mobile": "+91 0000000000", |
| # This example SQL statement will allows to insert values only if not exist | |
| # So that you can avoid duplication of data | |
| If Not Exists(select * from emp where empcode='JA089') | |
| Begin | |
| insert into emp (empcode,name) values ('JA089','Jaseon Bourne') | |
| End |
| import sqlite3 | |
| con = sqlite3.connect('mydb.sqlite') | |
| con.execute("CREATE TABLE IF NOT EXISTS users(id INTEGER ,name TEXT, ecode TEXT);") | |
| con.execute("CREATE TABLE IF NOT EXISTS employees(id INTEGER PRIMARY KEY,ename TEXT, eid INTEGER);") | |
| empnames = [ | |
| ('jhon', 1), | |
| ('martin', 2), |
| # This code will show how you can convert a list into tuple list | |
| print('Touple meet List') | |
| l1=['Python','C','C++','C#','GO','Dart','Kotlin'] # the list | |
| # List elements to touples | |
| x=[(x,) for x in l1] | |
| print(x) |
| select * from usedes order by random() limit 5 | |
| # each time you run the query will swap rows |