Hello, I work at the U.S. Department of Labor. I am a maintenance prorgrammer of C code, and the configuration management of this code in the past has been very spotty. When I took over this project, a CM tool was in place I have been doing corret checkins and checkouts, but the problems of the past bad management contiue to cause problems for me. There is a C screen I have been asked to modify to increase the allowed amount of a field. The code for that screen was never checked in to the CM tool, and I found …

Member Avatar
Member Avatar
+1 forum 11

How can you pass command line arguments to the Node.js?

Member Avatar
Member Avatar
+0 forum 2

Hi, me again :) Look at this error please: File "./kivycal-1", line 103, in number_two self.check() TypeError: check() takes exactly 2 arguments (1 given) The error is pointing to here: def number_two(self, event): global numbers numbers.append(2) print numbers self.check() This is a part of a class in a .py file. I'm coding in python and kivy in that file. And here is the check function: def check(self): global numbers if len(numbers) == 3: ckeck_to_answer() Well, i can't understand what's the exact problem, what should i do?

Member Avatar
Member Avatar
+0 forum 6

I have two python script the first once contains my def callers and my command line arguments. The second one contains my defs that i want to use the command line arguments in. I was wondering if there was a way to call the command line arguments into the second script cause they do call some of the items that are needed in the second one from the comman line.

Member Avatar
Member Avatar
+0 forum 8

Hi i need windows command line to find all files that end with .jpg.pdf and remove the .jpg part so it will be pure .pdf at the end, i have following line for /R %DIR% %%i in (*.jpg.pdf) do set without=%i:~0,-8% & rename %%i "%%without.pdf" It should remove last 8 characters and then rename file with .pdf extension for some reason it creates without variable with this content '~0,-8without' any idea how to execute these two commands in one for loop? the '&' doesnt do the trick for some reason... Thanks

Member Avatar
Member Avatar
+0 forum 3

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. Here are some very basic examples on how to do for-loops in BASH. Edit: Fixed per Watael's suggestions.

Member Avatar
Member Avatar
+0 forum 1

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. Here are some very basic examples on how to do for-loops in BASH.

Member Avatar
Member Avatar
+0 forum 3

Hello Community, I need help with getting javascript function arguments in php eg. function jsFunction(arg) { <?php phpFunction(arg); ?> } <button onclick="jsFunction(this.id);" id="XXXX"/> But when i press the button it doesn't send "XXXX" to the php function (<?php phpFunction(args); ?>) it sends "args" (as plain text). Please Help...

Member Avatar
Member Avatar
+0 forum 10

So I have a code that prints out the `sys.argv` when the program is ran. How can I parse $ python ./arch.py install * to show `["./arch.py","install","*"]` Instead of `["./arch.py","install",#other files in directory]`?

Member Avatar
Member Avatar
+0 forum 1

Ok, so I'm working from a book called Agile Web Developement with Rails 4th Edition. I got up to page 83 where they have us running tests to ensure proper validation of our code up to this point. So I have checked and rechecked to make sure my code is identical to theirs. I keep getting an error. This is the test: test "product attributes must not be empty" do product = Product.new assert product.invalid? assert product.errors[:title].any? assert product.errors[:description].any? assert product.errors[:price].any? assert product.errors[:image_url].any? end This is the error I get: ==================================== /home/mint/Documents/depot/test/unit/product_test.rb:1:in `test': wrong number of arguments (1 for 2) …

Member Avatar
Member Avatar
+0 forum 6

am creating a simple blog application and i have a model in ci called entries model and one particular function that gets a blog entry by id from an entries table table in a database this here is the code <?php class Entries_model extends CI_Model{ function __construct(){ parent::__Construct(); } function get_comment($id){ $query = $this->db->where('id',$id); $query = $this->db->get('entries'); } i am coding according to a tutorial i did so i know this is a damn question but where does the $id parameter come from? does codigniter automatically assume that this parameter comes from the third section of the uri ? thanks

Member Avatar
Member Avatar
+0 forum 4

matrix multiplication program

Member Avatar
Member Avatar
-1 forum 2

Below I have two subs, once RearrangeDecks is run, it will call moveToEnd(p1stat,p2stat). I get p1stat and p2stat from a different sub used earlier. However when I run it, it gives me back an error saying "**Arguments not optional**" as well ass highlighting the first offset word in the sub "MoveToEnd." In in essence, I have 2 lists of cards. What im trying to code is if P1stat is bigger, then I want the top card of the first stack (Range D3 from D3:D18) to be brought to the bottom of the stack and then the top card of the …

Member Avatar
Member Avatar
+0 forum 1

I have a small Python program that should react to pushing the up button by running an appropriate method. But instead of doing this, it gives me a confusing error... from tkinter import * class App: def __init__(self, master): self.left = 0 self.right = 0 widget = Label(master, text='Hello bind world') widget.config(bg='red') widget.config(height=5, width=20) widget.pack(expand=YES, fill=BOTH) widget.bind('<Up>',self.incSpeed) widget.focus() def incSpeed(self): print("Test") root = Tk() app = App(root) root.mainloop() And the error is: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.2/tkinter/__init__.py", line 1402, in __call__ return self.func(*args) TypeError: incSpeed() takes exactly 1 positional argument (2 given) What might …

Member Avatar
Member Avatar
+0 forum 4

help i'm rather new at this but have some understanding but am having some probs with 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(19) : error C2660: 'atotal' : function does not take 1 arguments 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(21) : error C2061: syntax error : identifier 'a' 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(23) : error C2660: 'atotal' : function does not take 1 arguments here is my code #include <set> #include <iostream> using namespace std; Dim ; double atotal() ;int main() { double itotal = 0; double dnumber1 = 0.0; double dnumber2 = 0.0; double dnumber3 = 0.0; double daverage = 0.0; double a = 0; cout << "please …

Member Avatar
Member Avatar
+0 forum 2

i was on the site pyschools working through the exercises, but i dont understand why it wont accept the code i input. [url]http://www.pyschools.com/quiz/view_question/s4-q2[/url] Create a function generateNumbers(start, end, step) that takes in three numbers as arguments and returns a list of numbers ranging from start to the end number (inclusive)and skipping numbers based on the step specified in the arguments. Note: The function range(x, y, z) can takes in 3 arguments. For example, range(1, 11, 2) will return a list of numbers [1,3,5,7,9]. Examples [CODE] >>> generateNumber(2, 10, 2) [2, 4, 6, 8, 10] >>> generateNumber(10, 10, 1) [10] >>> …

Member Avatar
Member Avatar
+0 forum 7

import os def a(): print("A") def b(): print("B") # I want to sometimes skip the main body if os.path.isdir("C:\\Blender\\mainbody"): print("main body of module_A") Is there a way to control whether or not the main body of a module gets executed by passing in arguments to the import command, such as import module_A "mainbody" Right now I am controlling it by checking for existence of a directory, I know I could also open some kind of config file which is essentially the same approach but how about just passing in an argument along with import xxx ????

Member Avatar
Member Avatar
+0 forum 5

Dear All I really realy could not find by searching.. Please give your attention for this one. 1st of all, i need to deal with multiple files, but NOT inputting file name each time. Two questions. 1) How to send more than one file to command line arguments. 2) Can I just indicate a folder name containing severeal files in it, and work any (or more than one) file in it. Please feel free to share to deal with multiple files same time. Or how to send several files to command line arguments and work on it. I am new …

Member Avatar
Member Avatar
+0 forum 2

Hello, I was having some trouble related to a code. I wanted to pass a 2-D array as argument to a function,but I'm getting an error saying 'Expression Syntax in function Main'. I am trying to do it like this :-> void input(int **a[][10],int b,int c) { int i,j; printf("\nEnter the elements of the Array :-> "); for (i=0;i<b;i++) for (j=0;j<c;j++) scanf("%d",&a[i][j]); } void main() { int a[10][10],b[10][10],c[10][10],i,j,k,choice,m,n; printf("Enter the no. of rows and cols for A and B :-> "); scanf("%d%d",&m,&n); input(a[][10],m,n); input(b[][10],m,n); getch(); } So,I wanted to know where am I wrong. At some place I read that …

Member Avatar
Member Avatar
+0 forum 4

[I]Create a program called, Containment, that accepts three command line arguments, a file that contains a list of shapes, and a pair of numbers the specifies the (x,y) coordinates for a point. The program should print out the list of shapes, and a true/false value that indicates if the point is contained in the shape. The shapes file contains one shape per line. An example of the file with all the possible shapes is: rect "r1" 20.0 5.0 50.0 25.0 ellipse "e1" 0.0 0.0 5.0 3.0 polygon "p1" 20.0 0.0 40.0 0.0 40.0 20.0 20.0 20.0 There are three possible …

Member Avatar
Member Avatar
+0 forum 8

Hi all, I would like to call a makefile with a particular variable and value so that the variable is used to make decisions inside the makefile. Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi all, I would like to call a makefile with a particular variable and value so that the variable is used to make decisions inside the makefile. Thanks

Member Avatar
Member Avatar
+0 forum 1

I'm making an RPG, and am trying to split things up into multiple files to organize things better. (I mean, character creation alone was over 2000 lines.) But this is something that I've never done, and I'm really not sure how to do it. So, if I could get some general advice on how to set things up efficiently, etc. I would really appreciate it. I really haven't been able to find much on the subject, other than the page about modules on the python website, which I did read, but I'm still a little unclear about it. This is …

Member Avatar
Member Avatar
+0 forum 1

The purpose of this code is to open a file, read a passage and delete any word that is "secret", it is then to save the new passage to a new file. Problem: [Warning] passing arg 1 of `strcmp' makes pointer from integer without a cast I think I know what the warning is telling me but I don't know enough to fix it. Any idea what is wrong and how I can fix it? I think my code should work except for what ever that warning is. I hope I entered the code correctly here, I am new to …

Member Avatar
Member Avatar
+0 forum 8

any other method by which i can pass variable no. of arguments to a function :)

Member Avatar
Member Avatar
+0 forum 5

[B]Environment[/B] Development: Amazon EC2 instance. Operational: Unknown at this time [B]Scenario[/B] This is a *nix question but things start out in php, so please bear with me. I'm trying to get php script (php_script_1) to to run another php script (php_script_2) in the background. This will allow php_script_1 to complete and return (with a suitable message to the user), having kicked off the lengthy php_script_2. The output of php_script_2 will be cached (in a database) for future use. [B]Progress to date[/B] I have identified php's shell_exec() and a neat little "run_in_background" function wrapper to issue commands. [CODE] function run_in_background($Command, $Priority …

Member Avatar
Member Avatar
+0 forum 3

Detail on command line arguments with sample program to simulate the following DOS commands using cmmand line arguments - 1. copy 2. type 3. del 4. dir 5. rd

Member Avatar
Member Avatar
-1 forum 7

Ok so while reviewing this code which is meant to convert yards, and feet to inches I found on lines 17-19 , and 32. There are "string data" (if that makes sense) as parameters in each method? What do they denote, serve , and their purpose? MSDN usually has convoluted explanations.....on this so I guess im resorting to you faithful guys again! [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Lab1 { class Lab1 { static void Main() { int inches, yards, feet; // this prepares to write code to give the instructions to the user DisplayInstructions(); inches = …

Member Avatar
Member Avatar
+0 forum 3

Good morning all, Hopefully a quick solution, I've done some reading up on taking command line arguments and I almost have it licked, but I'm running into some trouble trying to send into a method.. I'll give you an example of what I mean Let's say I want to send 2 command line args into the program the first argument [I]args[0][/I] will be a CHAR to select the method and the second arguments [I]args[1][/I] would be the input data to run that method How can I send args[1] into the methods (the methods being an int,double & string for required …

Member Avatar
Member Avatar
+0 forum 3

Hi. I just want to ask if it is possible to create a function that accepts an expression into its arguments. Just like what IIF do. Ex: [CODE]Dim strResponse as String = IIF(Msgbox("Select Yes or No", vbYesNo) = vbYes, "Yes", "No")[/CODE] I forgot the code, but its the thought that counts. Anyway, is it possible? If it is, how? Michael

Member Avatar
Member Avatar
+0 forum 1

The End.