33 Topics

Member Avatar for
Member Avatar for it@61@sec

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 …

Member Avatar for it@61@sec
0
307
Member Avatar for moaz.amin.37

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 …

Member Avatar for stultuske
0
492
Member Avatar for abaddon2031

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 …

Member Avatar for abaddon2031
0
671
Member Avatar for david.roun.7_1

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>

Member Avatar for Airshow
0
149
Member Avatar for chriswelborn

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. …

Member Avatar for chriswelborn
0
298
Member Avatar for chriswelborn

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. …

Member Avatar for chriswelborn
0
377
Member Avatar for RvSon

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

Member Avatar for RvSon
0
212
Member Avatar for Start4me

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 …

Member Avatar for andreas.bjorn
0
325
Member Avatar for James19142

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 …

Member Avatar for James19142
0
360
Member Avatar for rollerhockey97

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 …

Member Avatar for rollerhockey97
0
315
Member Avatar for Twilitbeing

(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 …

Member Avatar for dmanw100
0
264
Member Avatar for challarao

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& …

Member Avatar for mike_2000_17
0
1K
Member Avatar for Knome

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 …

Member Avatar for L7Sqr
0
181
Member Avatar for gikonyo

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'] …

Member Avatar for gikonyo
0
297
Member Avatar for techlawsam

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 { …

Member Avatar for techlawsam
0
255
Member Avatar for techlawsam

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 …

Member Avatar for techlawsam
0
246
Member Avatar for techlawsam

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 ? …

Member Avatar for techlawsam
0
167
Member Avatar for kayoh

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. …

Member Avatar for Gribouillis
0
1K
Member Avatar for ohhmygod

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 …

Member Avatar for WaltP
0
3K
Member Avatar for rayden150

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 …

Member Avatar for Moschops
0
953
Member Avatar for learningcpp

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 …

Member Avatar for learningcpp
1
3K
Member Avatar for Thisisnotanid

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 …

Member Avatar for TrustyTony
0
244
Member Avatar for tofugames

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 …

Member Avatar for thekashyap
0
240
Member Avatar for amit.hak50

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 = …

Member Avatar for amit.hak50
0
269
Member Avatar for ghost_from_sa

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 …

Member Avatar for ghost_from_sa
0
968
Member Avatar for Khoanyneosr

[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 …

Member Avatar for Khoanyneosr
0
275
Member Avatar for Wolfemann

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 …

Member Avatar for SundayForever
0
309
Member Avatar for Torien7

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 …

Member Avatar for Torien7
0
233
Member Avatar for Hawkeye Python

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): …

Member Avatar for Hawkeye Python
0
3K
Member Avatar for trpsjt2008
Member Avatar for Oxiegen
0
139

The End.