Search Results

Search found 14 results on 1 pages for 'gloris'.

Page 1/1 | 1 

  • TextBox and Thread

    - by gloris
    Why doesn't this work? The program stops on: this.textBox1.Text = "(New text)"; Thread demoThread; private void Form1_Load(object sender, EventArgs e) { this.demoThread = new Thread(new ThreadStart(this.ThreadProcUnsafe)); this.demoThread.Start(); textBox1.Text = "Written by the main thread."; } private void ThreadProcUnsafe() { while (true) { Thread.Sleep(2000); this.textBox1.Text = "(New text)"; } }

    Read the article

  • php oop and mysql

    - by gloris
    I need to get data, to check and send to db. Programming with PHP OOP. Could you tell me if my class structure is good and how dislpay all data?. Thanks <?php class Database{ private $DBhost = 'localhost'; private $DBuser = 'root'; private $DBpass = 'root'; private $DBname = 'blog'; public function connect(){ //Connect to mysql db } public function select($rows){ //select data from db } public function insert($rows){ //Insert data to db } public function delete($rows){ //Delete data from db } } class CheckData{ public $number1; public $number2; public function __construct(){ $this->number1 = $_POST['number1']; $this->number2 = $_POST['number2']; } function ISempty(){ if(!empty($this->$number1)){ echo "Not Empty"; $data = new Database(); $data->insert($this->$number1); } else{ echo "Empty1"; } if(!empty($this->$number2)){ echo "Not Empty"; $data = new Database(); $data->insert($this->$number2); } else{ echo "Empty2"; } } } class DisplayData{ //How print all data? function DisplayNumber(){ $data = new Database(); $data->select(); } } $check = new CheckData(); $check->ISempty(); $display = new DisplayData() $display->DisplayNumber(); ?>

    Read the article

  • array insert in db

    - by gloris
    Hi, How best to put the array (100 or more length) in the database (MySQL)? I do not want multiple access to the database because it is so loaded. So my solution is as follows: string insert = "INSERT INTO programs (name, id) VALUES "; for(int i = 0; i < name.Length; i++) { if (i != 0) { insert = insert + ",("; } else { insert = insert + "("; } insert = insert + "'" + name[i] + "','" + id[i] + "'"; insert = insert + ")"; } //INSERT INTO programs (name, id) VALUES ('Peter','32'),('Rikko','343') .... But maybe is a faster version? Thanks

    Read the article

  • Saving program working data

    - by gloris
    When the program runs, the intermediate data must save in the user's computer. Now I use .txt files, encoding with AES. But file/code user can break, delete.... Maybe is better decision?

    Read the article

  • C#, wmi get disk manufacturer

    - by gloris
    Hi, how get USB flash(key) manufacturer name with C#? for example WD, Hama, Kingston... Now i with: "disk["Manufacturer"]", get: "Standard disk driver" string drive = "h"; ManagementObject disk = new ManagementObject("Win32_LogicalDisk.DeviceID=\"" + drive + ":\""); disk.Get(); Console.WriteLine(disk["VolumeSerialNumber"].ToString()); Console.WriteLine(disk["VolumeName"].ToString()); Console.WriteLine(disk["Manufacturer"].ToString());

    Read the article

  • C# xml read, show error

    - by gloris
    Whats wrong with my code? XmlTextReader textReader = new XmlTextReader(@"D:\xml_file.xml"); textReader.Read(); // If the node has value while (textReader.Read()) { // Move to fist element textReader.MoveToElement(); Console.WriteLine("XmlTextReader Properties Test"); Console.WriteLine("==================="); // Read this element's properties and display them on console Console.WriteLine("id:" + textReader.id.ToString()); Console.WriteLine("name:" + textReader.name.ToString()); Console.WriteLine("time:" + textReader.time.ToString()); } Console.ReadLine() show erron on: id, name, time My XML file: <students> <student> <id>1</id> <name>Rikko Nora</name> <time>2010-03-12</time> </student> <student> <id>2</id> <name>Rikko Nora2</name> <time>2010-05-15</time> </student> </students>

    Read the article

  • css, fixed size

    - by gloris
    Hi, I need three tables (div). The left and right sides of the occupied 50% of the free window. The center is fixed. Everything seems fine, but right down to jump off the table. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <style type="text/css"> body{ margin:0; padding:0; } #left{ float: left; width: 50%; background: #FDA02E; margin-left: -300px; } #center{ float: left; width: 600px; margin-right: 300px; background: #C8FF98; } #right{ float: left; width: 50%; margin-left: -300px; background: #FDE95E; } </style> </head> <body> <div id="pag"> <div id="left"> Left </div> <div id="center"> Center </div> <div id="right"> Right </div> </div> </body> </html>

    Read the article

  • javascript show/hide with memory

    - by gloris
    Hi, i have this show/hide menu. It is possibly this menu make with memory?( I open sub menu, refresh page and this sub menu stil open. ) <script type="text/javascript"> function change(id){ ID = document.getElementById(id); if(ID.style.display == "") ID.style.display = "none"; else ID.style.display = ""; } </script> <div onclick="change(5)" style="cursor: hand"> <a href = "#">+</a>News </div> <div style="display: none" id="5"> News1<br/> News2<br/> </div>

    Read the article

  • C# work with functions

    - by gloris
    Hi, I'am new with C#. How works in C# functions? My try: private void Form1_Load(object sender, EventArgs e) { MessageBox.Show(Convert.ToString(number_p(5))); } public void number_p(int number) { int one = 1; number = number + one; return number; } Error: return, why? Thanks

    Read the article

1