121 Topics
|
|
I have saved a 2D matrix in a numpy file (.npy) in python. Is there a way I can access the same from C++ and possibly read in the values in a stl vector? [URL="http://www.scipy.org/C++_Extensions_that_use_NumPy_arrays"]This [/URL] is vaguely relevant. But here you make the call from python. I want to … |
|
Im writing a blackjack program to train one to count cards using the Hi-Lo System. I found the engine online ( it was open sourced.) Instead of the code here using only numbers and Letters, i want to add only pictures of the cards instead of the numbers and card … |
|
My friend and I are in a Computer Science I class, and we are momentarily working on a project which asks you to import a method from a previously edited source, into another java source file. Here is our code. [CODE]import java.awt.Graphics; import java.awt.Color; import java.awt.Image; import java.awt.Container; import javax.swing.JFrame; … |
|
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> … |
|
Hopefully someone can help me. Explaining this may be a pain for ya, but I would really appreciate any assistance that you may be able to give me. Here is my scenario. -I am trying to import a csv file into phpmyadmin. -The MySQL database is for Wordpress. -The .csv … |
|
Hi, I recently set about making a simple application using python with some 3d components, i switched from PyOpenGL, because it was a little bit to complex for what I wanted to do, to VPython, which based on the YouTube video's looks very easy and simple... which is exactly what … |
|
hi, I want to import a text file which delimited by tab to mysql. 1) using phpmyadmin => results ( exceed time limit even i've extend) 2) open using excel file save to .csv but still couldn't save all the record 3) using ms access with odbc connection => almost … |
|
Hello, i have a project which requires that i work with three files. two files are text and one file is .dat Currently I have been successful at creating the dat and one of the texts. The project is a bit menu driven and is about stocks, when the program … |
|
Hello, I am just starting learning Python and I am having some trouble properly importing a function from a module. I wrote the short script: [CODE]def print_twice(param): print(param, param) [/CODE] When I try to import the function print_twice, the shell tells me it cannot import the name print_twice. When I … |
|
if i have a text file with data: test, 1, 2 again, 3, 4 Can someone give me an idea how to start puting each line into an object ? ObjectName o = new ObjectName(String s1, String s2, String s3); [CODE] class Action implements ActionListener { public void actionPerformed (ActionEvent … |
|
I am reading XML and PHP. I have to import a xml file in mysql database using PHP script. I tried using 'simplexml_load_string()' and 'simplexml_load_file()' functions. It worked. But how the xml parser is used to import XML files into Mysql Database. Please tell me about this, I tried the … |
|
When I run my code the program adds the following before the start of my program: >>> Warning (from warnings module): File "C:/Users/Steven/Documents/CA/CA python/CAMain.py", line 142 def maxgen(fname, worksheet=1,encoding='cp1251'): SyntaxWarning: import * only allowed at module level >>> [I]The first prompt of my program would be here[/I] The code it … |
|
I am new to MySQL and navicat as well. I have been creating a database in Access and now adding records. I added about 50 records earlier and then saved them to my flashdrive to import the new data in navicat using the import wizard. The reason I have to … |
|
I'm making a JPanel for a game. I want the background to be an imported image, so I set up a ClassLoader to import the image and converted that to a URL. However, that URL appears to be null, as when I try to put the panel into a JFrame, … |
|
Hello all. I am very new to VB.Net and am currently learning the basics and mechanics of how the software functions, my past was mainly with Matlab, so naming variables and such is quite different to me now. My question is this: How can I read data from a .csv … |
|
Hi, I downloaded some code from a university website that calculates a metric evolutionary trees. I'm trying to run the program (called example.py) and the first line of the program is [CODE]from TreeGenerator import Tree_generator [/CODE] I did not think this would be a problem because TreeGenerator.py is another file … |
|
Dear All, Hello, I am very new at python. I have an existing example project that have some scripts YYY,in path XXX/YYY and an script A.py that call these one by one. i.e, YYY is colection of py files { y1.py, y2.py,....}, that are imported to A.py. I mean that … |
|
Hello everyone. I am very embarrassed to post my code cause some might think it is horrible since my experience level is low. But I am having a problem. First I want to add that i have tried placing [CODE]import java.lang.String[/CODE] in the code but no go. Thanks in advance … |
|
Hi, everyone! I'm new to python, and I'm having a few issues getting started with writing useful code on mac OSX. I'm wanting to import a module, either wx or pygtk for GUI, but in either case I get the error that there is no such module. As far as … |
|
how to install the msqldb package and where to place it in python? then when i compile the code there is an error like no module named MySQLdb.... pls clarify this.... |
|
I import data into MySQL over and over again. Always from .sql scripts. I have tried over and over to come up with a script that will [LIST=1] [*]Ask for a database name [*]Sign into MySQL [*]Drop the Database named in step 1 [*]Create a new database as named in … |
|
|
hello everybody! I have a main app, which imports another python file and uses its functions. my problem is now, that the external file itself needs some functions defined in the main app... if i copy the external files code and paste it into the main application, everything works fine, … |
java class files are not loaded into memory till the time they are referenced. If this is true, then the use of import statement is just to save a bit of typing. Is it the case ? |
|
Hello Friends, I am an absolutely beginner in the world of computer programming. I started my voyage in this world yesterday by starting learning Python. I am reading an e-book on python [URL="http://openbookproject.net/thinkcs/python/english2e/"]here[/URL]. That book has been written with examples from Linux platform. So, I felt this problem while going … |
|
I have just started Python recently and for some reason, I cannot import anything on my computer. I can do it on the computer at my school, but not my laptop. This is the message I received when I tried to import the program "cTurtle" [CODE]IDLE 2.6.1 >>> import cTurtle … |
|
General Question, no code: I have the daunting task of automating the import of mysql, ms sql and ms access into a central location. I've nailed the microsoft crap using ms sql DTS but even with mysql odbc drivers, cant seem to nail that one. The optional is that I … |
|
I am having problems filling an array of objects with a txt file. It seems to me that it should work, but I get all 0's printed out. Please help! I cannot write the rest of my code until I figure this out. Also I get this error message: "Exception … |
|
Is there a way to import the contents of a text file into a source code file upon compilation? Just like the include()/require() methods in Perl and PHP (see: [url]http://php.net/manual/en/function.include.php[/url]). |
|
Completely frustrating - I have been googling for a solution for this for a couple of hours now. I have this little bit of code that I wish to read a text file into a Python Dictionary. I used this dictionary format internally within the another piece of code I … |
The End.