[Solved] Swift 3 code update

[ad_1] I fixed your code using Swift 3 syntax. class SignUp: UIViewController { @IBOutlet weak var buttonNameTxt: UITextField! @IBOutlet weak var buttonEmailTxt: UITextField! @IBOutlet weak var buttonPwdTxt: UITextField! override func viewDidLoad() { super.viewDidLoad() } @IBAction func buttonSignIn(_ sender: UIButton) { let usermainname = buttonNameTxt.text! let username = buttonEmailTxt.text! let password = buttonPwdTxt.text! let myURL = … Read more

[Solved] Tkinter, try to keep using the program on while executing

[ad_1] You can use root.after(miliseconds, function_name, argument) to execute function with delay and root.mainloop() (and program) will work normally. You can use datetime to convert text to datetime object, substract two dates and get difference in milliseconds. try: import tkinter as tk import tkinter.messagebox as tkMessageBox print(“Python 3”) except: import Tkinter as tk import tkMessageBox … Read more

[Solved] How to delete text form txt file using python

[ad_1] You could do it like this: input_file = open(‘filename.txt’) output_file = open(‘output_filename.txt’, ‘w’) for line in input_file.readlines()[1:]: output_file.write(line + ‘\n’) output_file.close() Same thing using single file: input_file = open(‘filename.txt’) input_data = [line for line in input_file.readlines()] input_file.close() output_file = open(‘filename.txt’, ‘w’) for line in input_data[1:]: output_file.write(line + ‘\n’) output_file.close() 2 [ad_2] solved How to … Read more

[Solved] How can i read from a text file line by line and add those strings to an array? [closed]

[ad_1] The array isnt initialized. Try using List instead of array. private void button2_Click(object sender, EventArgs e) { List<int> citaj = new List<int>(); string h; using(System.IO.StreamReader sr = new System.IO.StreamReader(@”text\brojac.txt”)) { while ((h = sr.ReadLine()) != null) { int number = 0; if (int.TryParse(h, out number)) citaj.Add(number); } } } [ad_2] solved How can i … Read more

[Solved] how to download gridview in excel in ASP.NET C #, ie How to use group by in datatable

[ad_1] Ugh, be prepared for an accident that makes a mess of your data with this “associated by position” idea I wouldn’t use LINQ for this either var l = new List<string>(); string prev = null; foreach(DataRow r in dt.Rows){ var s = (string)r[“Column1”]; var t = (string)r[“Column2”]; if(s != prev){ l.Add(s); prev = s; … Read more

[Solved] How can I add Embed message from an array discord.js?

[ad_1] Well You just need to use embeds like in the help command. Here the code: if (command === “t”) { // Truth const truth = t[Math.floor(Math.random() * t.length)]; message.channel.send(new Discord.MessageEmbed() .setTitle(“Truth”) .setDescription(truth)); } else if (command === “d”) { // Dare const dare = d[Math.floor(Math.random() * d.length)]; message.channel.send(new Discord.MessageEmbed() .setTitle(“Dare”) .setDescription(dare)); } [ad_2] solved … Read more

[Solved] more basic R commands than plot [closed]

[ad_1] #margins parameters mar_save <- par(“mar”) par(mar=c(2, 2.3, 0, 0)) #plot windows and initialisation xmin <- -1 xmax <- 11 ymin <- 0 ymax <- 10 plot(x = c(xmin,xmax), y = c(ymin,ymax), xlim = c(xmin,xmax), ylim = c(ymin,ymax), type = “n”, xaxs = “i”, xaxt = “n”, yaxs = “i”, yaxt = “n”) # axes … Read more

[Solved] Python Label Printer Program

[ad_1] here is something to get you started, but I doubt it is complete. You will need to provide a valid ZPL file for making the changes. I also made the program use fixed numbers for now and so it just runs and outputs.You can change it back once you have it working. start = … Read more

[Solved] Take only the first hashmap value [closed]

[ad_1] Try this. public static void main(String[] args) { HashMap<String, Object> map = new HashMap<>(); map.put(“one”, “壱”); map.put(“two”, “弐”); map.put(“three”, “参”); map.put(“four”, “四”); System.out.println(“hash map = ” + map); Object firstValue = map.values().iterator().next(); System.out.println(“first value = ” + firstValue); } output: hash map = {four=四, one=壱, two=弐, three=参} first value = 四 [ad_2] solved Take … Read more

[Solved] Sharing one MenuStrip between multiple Forms and “open, save, save as” each form separately

[ad_1] Ok no problem I’ve a Main form and call multiple panel (PanelSlider) with 1 MenuStrip with UserControl : public Form1() { InitializeComponent(); PanelSlider.Controls.Add(new Home()); PanelSlider.Controls.Add(new Tools()); etc… } Active Panel with button private void HomeBtn_Click(object sender, EventArgs e) { PanelSlider.Controls.Find(“Home”, false)[0].BringToFront(); } So to switch the multiple panel I declared a menustrip and for … Read more