vbScript - Create a Log File Using vbScript Classes Before I retired I was responsible for most of the corporate data plumbing at our control centre. All of the plumbing was written in vbScript. As any maintenance programmer knows, log files are a vital key in identifying and fixing problems. Because I am basically lazy I don't like to code the same process over and over so I created logging code that could be included in any script. The scripts were run automatically on periods ranging from once every five minutes to once a week, or even as little as …

Member Avatar
+0 forum 0

Firstly, I would like to apologize for the massive number of nooby crap questions that come out of my account. I'm an emerging programmer that doesn't always know what he's doing, so I'm sorry. Secondly, the problem. I'm writing this code: class Object(): def __init_(self, vertices, color, name): self.color = color self.name = name self.vertices = vertices ##Vertices is in list form def editVertice(self, vertice): if vertice in self.vertices: self.vertices.index(vertice) else: print "ERROR: VERTICE NOT RECOGNIZED. INSERT VALID VERTICE" The problem I'm having is that when I run this, it gives an error saying that the term 'vertice' in the …

Member Avatar
Member Avatar
+0 forum 3

just curious. <img src="filepath.jpeg" id="idhere?" /> or <img id="idhere?" src="filepath.jpeg" /> which is valid? are they both vaild? and differences?

Member Avatar
Member Avatar
+0 forum 2

[CODE]# -*- coding: utf-8 -*- from PyQt4 import QtGui from PyQt4.QtCore import * import sys import os class VideosToMp3(QtGui.QWidget): def __init__(self, parent = None): super(VideosToMp3, self).__init__(parent) ''' Labels and GUI ''' extension = QtGui.QWidget() download_label = QtGui.QLabel("Enter YouTube video URL:") self.download_line_edit = QtGui.QLineEdit() file_label = QtGui.QLabel("Enter file name (optional):") self.file_line_edit = QtGui.QLineEdit() mp3_filename_label = QtGui.QLabel("MP3 file name:") self.filename_line_edit = QtGui.QLineEdit() download_button = QtGui.QPushButton("Download in URL") download_file_button = QtGui.QPushButton("Download in file") cancel_button = QtGui.QPushButton("Cancel") spacer = QtGui.QSpacerItem(10, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) gridLayout = QtGui.QGridLayout() gridLayout.addWidget(download_label, 0, 0) gridLayout.addWidget(self.download_line_edit, 0, 1) gridLayout.addWidget(mp3_filename_label, 1, 0) gridLayout.addWidget(self.filename_line_edit, 1, 1) gridLayout.addWidget(file_label, 2, 0) gridLayout.addWidget(self.file_line_edit, 2, 1) …

Member Avatar
Member Avatar
+0 forum 5

Hi,all I need a java parser for parsing any java file in any package,not only existing file ...Can i do this ? how?

Member Avatar
Member Avatar
+0 forum 10

Hi, in this code how can I calculate coupling between objects CBO in java after parsing java file using registerCoupling method and retrieve any coupling between classes through argument, class name,type and so on .....

Member Avatar
Member Avatar
+0 forum 4

If I implement an abstract class that contains this method: private void MyMethod(string awesomeParameter, int aBigNumber) { // something cool happens here! throw new NotImplementedException(); } can I change it to this without breaking the implementation? private void MyMethod(string myParam, int myInt) { // something cool happens here! throw new NotImplementedException(); } I can't seem to find an answer to this, and I've never run into this issue before, but I'm implementing a new MembershipProvider and the default implementation uses some logical parameter names, but they don't match our sql table schema. For example, the implementation uses "username" but our …

Member Avatar
Member Avatar
+0 forum 3

Hi I am trying to create a update function. But it not updating in the database. Please help me to fix. **Test-2.php** $whereString = ''; $bind = NULL; if(isset($_POST['Submit'])) { if($_POST) { $SCYQ64UKID = $_GET['SCYQ64UKID']; $SCYQ64AVGP = $_POST['SCYQ64AVGP']*100; $searchFields = array('SCYQ64EMAL'=>$_POST['SCYQ64EMAL'],'SCYQ64EV01'=>$_POST['SCYQ64EV01'],'SCYQ64EV02'=>$_POST['SCYQ64EV02'],'SCYQ64EV03'=>$_POST['SCYQ64EV03'],'SCYQ64EV04'=>$_POST['SCYQ64EV04'],'SCYQ64EV05'=>$_POST['SCYQ64EV05'],'SCYQ64EV06'=>$_POST['SCYQ64EV06'],'SCUSER'=>$_POST['SCUSER'],'SCYQ64AVGP'=>$SCYQ64AVGP,'SCYQ64TZ'=>$_POST['SCYQ64TZ'],'SCJOBN'=>gethostname(),'SCPID'=>'SSWEB','SCUPMJ'=>$_POST['SCUPMJ'],'SCUPMT'=>$_POST['SCUPMT']); if($post = array_filter($_POST)) { if($fields = array_intersect_key($searchFields, $post)) { $where = array(); $bind = array(); foreach($fields as $key=>$field) { $where[] = "$key LIKE '%$field%'"; $bind[":$key"] = $_POST[$key]; $gwhere[] = "$key=$field"; $gbind[":$key"] = $_POST[$key]; } //$whereString = ' WHERE ' . implode(' AND ', $where); $gwhereString = implode(',', $gwhere); } $Users = new Users($db); $query = $Users->smipleUpdate('FQ64000',$gwhereString,'SCYQ64UKID='.$SCYQ64UKID); } } } …

Member Avatar
Member Avatar
+0 forum 12

Hello guys i have a really dumb problem i have two classes the first class is where the input value needs to be applied/readed and the second is where is inputed i do not know how to do that please someone help me This is where it is inputed the value final EditText getMetters = (EditText) findViewById(R.id.getMettersText); final TextView errors = (TextView) findViewById(R.id.errorMessage); Button setAlarm = (Button) findViewById(R.id.setAlarmButton); setAlarm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { int getM = Integer.parseInt(getMetters.getText().toString()); if (getM > 3000) { errors.setText("ERROR"); } else { errors.setText("ACCEPTED"); } } }); And here where needs to be …

Member Avatar
Member Avatar
+0 forum 12

Hey guys! I have a quick question that I think is a simple mess up. I am trying to make a console word game in c#, and I have different classes, and a main class that calls those classes. I first have the Player class, and the CreateCharacter class. My player class houses all of the variables that pertain to the player of the class (level, stats etc.), and my CreateCharacter class is what calls on the startup of the game, which asks the name, race, class they want the character to be. So far that is well and good, …

Member Avatar
Member Avatar
+0 forum 5

Hello everyone. I am currently making some database connection modules in Python inb order to learn Python's approach to OOP and also to lear how to connect to databases via Python. I successfully made a package with modules for postgres, mysql, sqlite3, and MongoDB. The classes simply connect, disconnect and run queries of any type. Everything is working fine now. However I noticed that the code is nearly the same. For example, the connect and disconnect methods are exactly the same. Also, postgress and mysql connections have exactly the same number of attributes. Inheritance came to mind, but some classes …

Member Avatar
Member Avatar
+0 forum 16

Here is my code: ` #include <iostream> #include <iomanip> #include <string> using namespace std; class Register { //Private members private: //Creating an array for all the Prices static double Price[]; //Declaring RegNUM and RecNUM int RegNUM, RecNUM; //Print out Item name in a loop static string items[]; //Creates a Receipt Structure struct Receipt { //Takes in the number of orders and stores items bought int Orders[5]; double Total = 0; }; //Creating a pointer (RecPTR) Receipt *RecPTR; //Public members public: //Register Constructor Register(int,int); //Member functions void getOrder(int); void RecRETURN(); //Operators Register operator+(const Register &right); Register operator=(const Register &right); }; //Setting …

Member Avatar
Member Avatar
+0 forum 4

The tools Hal’s sells are: Hammers: $10.99 Wrenches: $10.99 Levels: $19.99 Tape Measures: $4.99 Screwdrivers: $8.99 In order to make things easier in the long run you have decided to make a c++ program that takes in all the orders for each register and tallies them at the end of the day. Write a c++ program that does the following: Create a Register class that can store all of the receipts for the day and the totals for that register. This class could have the following member functions: Contructor(int) – Creates a number of receipts based on an integer that …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I'm trying to access a list in a class made in another class and display it in a listbox but its not working. I most probably have to make a small change to be able to get it to work. So please check in the code if you can see where the problem is. I have two classes - Race and Runner. **The Race class** Where I created the list and added the runners into it using a method that I call in the main form. namespace HW2 { class Race { public List<Runner> myList = new List<Runner>(); …

Member Avatar
Member Avatar
+0 forum 5

i read adapter classes everything is write but i am confuse about Listener Interfaces and Adapter classes concept priblem is that when java create adapter classes it implements corresponding interface and privide defination with empty bodies of all methods that are present in interface this is declaration public class WindowAdapter implements WindowListener this is built in declaration of WindowAdapter.Why not java create directly adapter classes without implementing interface same like this public class WindowAdapter after this no need to create interfaces and no need to import interfaces my english is very poor plz try to understand my question Regards: Moaz …

Member Avatar
Member Avatar
+0 forum 4

I know this has been asked before, but I can't find any simple answers for a noob like me in C#. What exactly is a static method. I mean what does it mean to be static vs. nonstatic. I know in the code with the main method we use `public static void Main(string []args)` what does the static change about the main method that distinguishes it from the rest in regards to it being static. - Thanks

Member Avatar
Member Avatar
+1 forum 11

I am not sure why my program isn't writing to the text file. When I start the program it tells me that the file opens. Then I call the functions that are inherited from other classes and I would assume that it would write to the file and then display them. I was able to get this to work earlier without using the insertion and extraction operators, but I wanted to get it to work with them as well. Does anyone have any ideas? //A Class for a checking account with a set interest. class CheckingWithInterest : public SavingsAccount, public …

Member Avatar
Member Avatar
+0 forum 3

#include<iostream.h> #include <stdlib.h> //FOR exit(1) struct Flight { char flightNo[5]; char date[12]; char time[6]; char gate[3]; }; Flight flight={"AB11","10-12-2008","20:30","RT"}; struct Seat { char name[40]; char booking_ID[3]; int seats; }; Seat choice[4][5]; void displaymenu(); void booking(); void seat(); void ticket(); void records(); void menu(); void exit(); //Variables int selection,i,j,password; int seats_num[20]={0}; int booking_ID=100; int seatsAvailable=20; int main(void) { displaymenu(); while(selection!=4) { menu(); } return 0; } void displaymenu() { cout<<"\n\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"; cout<<"\n\t% %\n"; cout<<"\t% Airline Booking System %\n"; cout<<"\t% ======================= %\n"; cout<<"\t% MENU %\n"; cout<<"\t% ======================= %\n"; cout<<"\t% 1.BOOKING %\n"; cout<<"\t% 2.SEAT %\n"; cout<<"\t% 3.RECORDS %\n"; cout<<"\t% 4.EXIT %\n"; cout<<"\t% %\n"; cout<<"\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\t"; …

Member Avatar
Member Avatar
-1 forum 2

I can't seem to get a response from my query method. I have a database connection from method ping_server and use mysqli as connector. Can anyone help me figure out why I cannot print results from mysqli_fetch_array. dbclass.php class db { private $connection; private $selectdb; private $lastQuery; private $config; function __construct($config) { $this->dbConfig = $config; } function __destruct() { } public function openConn() { try { if($this->dbConfig->connector == "mysqli") { $this->connection = mysqli_connect($this->dbConfig->hostname, $this->dbConfig->username, $this->dbConfig->password); $this->selectdb = mysqli_select_db($this->dbConfig->database,$this->connection); } } catch(exception $e) { echo'Caught Exception:', $e->getMessage(), "\n"; } } public function closeConn() { try { if($this->dbConfig->connector == "mysqli") { mysqli_close($this->connection); …

Member Avatar
Member Avatar
+0 forum 4

please i have a little problem creating a class and making it run. The class is created separately as a header file with it's source code. whenever i build the source code of the class, i get an error that says: undefined reference to 'WinMain@16'. And whenever I run the main, it gives me the error: undefined reference to 'samclass::samclass' here's my code main #include<iostream> #include "samclass.h" using namespace std; int main(){ samclass obj; return 0;} header #ifndef SAMCLASS_H #define SAMCLASS_H #include <iostream> using namespace std; class samclass { public: samclass(); void printcrap(); }; #endif // SAMCLASS_H header source code …

Member Avatar
Member Avatar
+0 forum 3

I have been programming for quite a while in Python but have just started to learn OOP properly. I find it really confusing and I don't really understand it. Especially the implicit self that python automatically passes. It just isn't clicking, really. May someone provide an easy explanation of what classes and objects are in general and how they are used in Python?

Member Avatar
Member Avatar
+0 forum 2

how do I run a python class without creating an object

Member Avatar
Member Avatar
+0 forum 2

Hello every one, What i need to do is to make an array of my own class and then assign values to that array I made an array and when i try to assign value it gave me an exception Your support is highly appreciated. static void Main(string[] args) { string Fname; string Lname; string Email; int age; Person [] Parray = new Person[3]; Person p1 = new Person(); for (int i = 0; i < 2; i++) { Console.WriteLine("Enter your first name "); Parray[i].Fname1 = Console.ReadLine(); Console.WriteLine("Enter your last name "); Parray[i].Lname1= Console.ReadLine(); //Console.WriteLine("Welcome Mr." + " "); //Console.WriteLine("Enter …

Member Avatar
Member Avatar
+0 forum 10

Trtying to figure out how to add 5 different methods into this class when the program already does all that is required but my prof will knock me if I dont put them in here, do thet need to be put in as private?

Member Avatar
Member Avatar
+0 forum 4

Hi Guys Could you explain me why adult education classes are mandatory for childrens?

Member Avatar
Member Avatar
+0 forum 3

Okay so I have a class `Student`, which takes a number and a vector as a parameter for the constructor. Everything works well, until I output the values of the vector for every instance. The problem is that the same vector is being shared with EVERY instance I create, but I want it to be unique for every single one! //Student.h #ifndef __Grade_calculator__Student__ #define __Grade_calculator__Student__ #include <iostream> #include <vector> using namespace std; class Student { private: string name; int score; int class_count; int test_count; vector <Student> students; vector <int> Scores; public: Student(); Student(string n,vector<int> &s); ~Student(); int getScore(){return score;} void …

Member Avatar
Member Avatar
+0 forum 8

Okay so I have an `inventory` class that accesses a static vector from my base class `MainShop`. I also have a `SwordShop` class which inherits from `MainShop`. (Both Inventory and SwordShop are derived classes). //SwordShop class void SwordShop::Shop { //I have a setter function where it takes an integer and a string and adds its to my hashmap. //Also have a getter function which has a for loop displaying my items in my map this->setWeaponSoldier(1, "1) Meito Ichimonji\n +4 Damage\n 150Gold"); this->setWeaponSoldier(2, "2) Shusui\n +10 Damage\n 230Gold"); this->setWeaponSoldier(3, "3) Elixir\n +16 Damage\n 300Gold"); this->setWeaponSoldier(4, "4) Blade of scars\n +24 Damage\n …

Member Avatar
Member Avatar
+0 forum 8

I wish to use parameters in a class to change what the class displays how would this be done?

Member Avatar
Member Avatar
+0 forum 1

I have these few lines in a class in my program but it doesnt appear. No errors are shown and when i "print(menubar)" and address "0.4.." or "4..." appears menubar = Menu(master = self.mainGUI) fileMenu = Menu(menubar) fileMenu.add_command(label="Exit", command= destroyMethod) menubar.add_cascade(label="File", menu=fileMenu) destroy method does work and is existing.

Member Avatar
Member Avatar
+0 forum 2

I have a program that i need to convert from java to c++... i just need help doing it... heres the java: [code] /* Name: Joseph Coleman Class:CSCI 1302 Assignment: Employee + ProductionWorker Academic Honesty: The integrity of students and their written and oral work is a critical component of the academic process. The submission of another?s work as one's own is plagiarism. Students shall be guilty of violating the honor code if they: 1. Represent the work of others as their own. 2. Use or obtain unauthorized assistance in any academic work. 3. Give unauthorized assistance to other students. …

Member Avatar
Member Avatar
+0 forum 9

The End.