52 Topics

Member Avatar for
Member Avatar for pwolf

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 …

Member Avatar for Reverend Jim
1
1K
Member Avatar for JohnMcPherson

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 …

Member Avatar for JohnMcPherson
1
311
Member Avatar for pro-tek
Member Avatar for Niloofar24

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

Member Avatar for Niloofar24
0
291
Member Avatar for abaddon2031

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 …

Member Avatar for Gribouillis
0
403
Member Avatar for martin.krivos.9

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 …

Member Avatar for dodo2013
0
467
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
376
Member Avatar for joshl_1995

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 for joshl_1995
0
404
Member Avatar for 3e0jUn

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 for deceptikon
0
197
Member Avatar for Dante2

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 …

Member Avatar for Dante2
0
311
Member Avatar for wycliffe.ottawa

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 …

Member Avatar for wycliffe.ottawa
0
163
Member Avatar for anoushka
Member Avatar for darkscythe69

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 …

Member Avatar for AndreRet
0
226
Member Avatar for Kert

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 …

Member Avatar for ZZucker
0
338
Member Avatar for marreameathue

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 …

Member Avatar for Ancient Dragon
0
264
Member Avatar for drichird

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 …

Member Avatar for drichird
0
8K
Member Avatar for tedtdu

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 …

Member Avatar for WaltP
0
330
Member Avatar for chirag_mittal

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 …

Member Avatar for chirag_mittal
0
428
Member Avatar for Hypnos_16

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

Member Avatar for Hypnos_16
0
223
Member Avatar for marirs07

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 for dmanw100
0
194
Member Avatar for marirs07

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 for L7Sqr
0
151
Member Avatar for Lemony Lime

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 …

Member Avatar for ret801
0
282
Member Avatar for DiabloInC

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 …

Member Avatar for zeroliken
0
260
Member Avatar for Santi1986
Member Avatar for Narue
0
346
Member Avatar for Airshow

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

Member Avatar for Airshow
0
392
Member Avatar for sanuphilip

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 for dospy
-1
327
Member Avatar for techlawsam

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 …

Member Avatar for Mitja Bonca
0
358
Member Avatar for naffan

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 …

Member Avatar for naffan
0
385
Member Avatar for michaelzip

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 …

Member Avatar for michaelzip
0
165

The End.