33 Topics
|
|
I have a C++ program with a main routine which reads arguments from command line: int main(int argc, const char *argv[]) In my system I have defined some aliases in my bash environment which abbreviates directory names. Example: alias dst='home/username/Documents/test' alias src='home/username/Download/test' My program is called "dircopy" and I want … |
|
what is command line argument in java and how it is work public static void main(String []args){ for (int i = 0; i < args.length; i++) System.out.println(args[i]); and what is .length in upper code. is it function no it is not function is it class no it is not a … |
|
I am working on s code that i want to add command line arguments to. I have read the docs.python page on this subject 3 or 4 times and it still has me conffused. I want to be able to set my base directory, change a send and recive email … |
|
|
Why is it that, the only way this will work is if I pass the entire: add(document.getElementById('num1').value) to the function, as opposed to simply adding: add(num1) <script> function add(num1){ total=num1*1+3; alert(total); } </script> </head> <body> <input type="text" id="num1" size="4"> <input type="button" onClick="add(document.getElementById('num1').value)"; </body> </html> |
I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. … |
|
I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. … |
|
Hi All, We can use Command name and argument for web controls such as imagbutton or button etc.. But Can we use Command name and argument for html tags such as(span,a)? It's urgent. Please put some light on it.. Thanks |
|
I want to create a method that is meant to protect against entering a wrong value for gender. The method **fineGender** below, will return true if the correct gender is entered and false otherwise. // postcondition: fineGender returns true if argument g equals M, m, F or f // and … |
|
in this program i'm writing the functions that have qt classes as parameters Qlabel, QSpinbox, etc. are causing compile errors, my other functions work fine i get the same 2 errors for each QT object i use as an argument this is the function definition that uses QT classes as … |
|
Hello everyone, I'm attempting to make a email contact form for my website but I keep getting an error that reads "Warning: Invalid argument supplied for foreach() in /nfs/[......]/contact_fa.php on line 15." That points to this line right here: foreach($_POST['check[]'] as $value) { $check_boxes .= $value." "; } This is … |
|
(I'm a Computer Science 101 student writing programs in C on a virtual Linux machine.) Suppose I wanted to apply a single (arbitrary) function to every element of an array, one at a time. Doing this once is easy enough, but I'd like to find a method that could accomplish … |
|
hi all, In the book "Programming Languages-Pragmatics" second edition by Michael l. Scott and Morgan Kaufmann, there is a sentence while explaining about copy constructor: "In recognition of this intent, a single-argument constructor in C++ is called a copy constructor." This is about the constructor of the form foo::foo(const foo& … |
|
I'm trying to call a function from an if statement that is inside a for loop. I need to send the $i in "for i in *" to a function but i can find nothing that works. ex. [code] # Perform actual file grab for i in /Users/* ; do … |
|
am geting this error while testing the login panel of my website that am currently developing. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/smartie1/public_html/checklog.php on line 43 which is in red this is the php script used for login <?php session_start(); function session_defaults() { $_SESSION['logged'] … |
|
Ok so this time before I wrote this program I did more reading and practicing and reading examples of code with method statements and class examples. When I finished this program Im still getting a lot of errors...any help? [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Problem10Pg179 { … |
|
Ok so while working on this I want to figure out at about line 23 for "hours" I understand the argument "NUMBER_OF_SECONDS_IN_AN_HOUR" but not "totalSeconds" is totalseconds the value coming from : "totalSeconds= GetNumberOfSeconds();" ? Which is the input received by the user? For lines 25-29 , how does totalSeconds … |
|
Alright So I want to know when looking at the code below: every so often with each method argument there is an "identifier" starting with the first one: "Inside() , Show(), Outside(), Display() " I know the names can be made up literally but what do the parenthesis signify ? … |
|
Hey guys, Just as the title says, I want to implement using an excel spreadsheet as an argument for a python script. I already have the layout of the spreadsheet, but I want to be able to assign the variables in my python script from specific cells of the spreadsheet. … |
|
Hi guys, I've been trying for over 3 hours just to know how to compare a char to a letter in a string. This is sure confusing, consider that I am a mechanical eng. student >.< Lets get straight to the point Problem 1: passing string and char to a … |
|
I made several functions, and this one assignment keeps giving me "expected primary expression before '..., HELP!", what is a primary expression?, all my code is ok I have made different files for the different functions and im using extern but the void argument I think keeps giving me trouble … |
|
Hi All, Can you please help me to understand why the following code is behaving this way? I think both outputs should be 1 ( 1 means const T), but its not!! [CODE] template <typename T> struct IsConst{ enum {isConst = 0}; }; template <typename T> struct IsConst<const T>{ enum … |
|
Hi all, I was working on a MATLab program and I came to a point where I wanted to define a function such that one of the arguments would be used as a command. To clarify, the function being defined was an implementation of Simpson's rule that would integrate using … |
|
Hello, I am working on a program for school and this is my first experience with arrays of objects. I am passing the array of objects into a function, and from within that function I am running another function that takes an individual object from the array as an arguemnt … |
|
I am getting this error ,can anyone help me : Warning: Invalid argument supplied for foreach() in /home4/thesisth/public_html/pdfsearchmachine/classes/rss.php on line 14 Here is the rss.php code [CODE] <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <? $search = $_GET["search"]; $replace = " "; $with = "+"; $search = str_replace($replace, $with, $search); if ($rs = … |
|
Hi guys, Im pretty dam stuck at the moment on an assignment Im meant to do. Its my last question so everything is pretty laid out, but the question (to me is not useful) so if you could just help me out it'd be much appreciated Ok so what i … |
|
[CODE] // Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <vector> #include <algorithm> using namespace std; //Functions void welcome(); void instructions(); int game(string sofar, const string THE_WORD, int MAX_WRONG, int wrong, string used); // Types and Arrays string choice; string inst; const int MAX_WRONG … |
|
Greetings all, I've just started learning Ruby (and Geo Ruby), and am trying to create overlays for Google Maps. I found a [seemingly] great tutorial for doing this [B][URL="http://blog.newsplore.com/2009/02/22/spincloud-lab"]HERE[/URL][/B] ...and it uses Ruby to generate the final javascript - cool, eh? Have everything installed properly (as far as I can … |
|
Hey everyone. I would really appreciate some help. I'm currently building a program in Python 2.6 for an introductory Comp Sci class. The program is supposed to use functions to read a text file from a URL, parse the data into tokens, and use the data to calculate a sort … |
|
Hi! The following Tkinter buttons should call [I]opt_def[/I] with [I]opt[/I] as 1 or 2 depending on which button is pressed (see code). [CODE]from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.opt1 = Button(frame, text="Opt1", command=self.opt_def(1)) self.opt1.pack(side=TOP) self.opt2 = Button(frame, text="Opt2", command=self.opt_def(2)) self.opt2.pack(side=BOTTOM) def opt_def(self, opt): … |
|
is there anyway to get the another application environmenat commandline argument Thx in Advance |
The End.