Sorry bud...I shoulda clarified....yo u need to replace the following,
"CSS/WebStyleSheet.c ss".
Change this to match the relative path of where your file is stored. The beginning of my path starts off as "CSS" because that is a folder holding my CSS file, which is contained in the same parent folder as my index page (or "master" page). The second part, "WebStyleSheet. css", is the actual name...
User Profile
Collapse
-
Jory R Ferrell started a topic How do I pass floats to opencl (via the PyOpenCL API) and return python floats?in PythonHow do I pass floats to opencl (via the PyOpenCL API) and return python floats?
I am using PyOpenCL. I pass a array of floats to the OpenCL kernel. When the floats are returned, python can't use the types C types and has strange values:8.275480 23e-36 8.27548310e-36, etc.
...Code:float myFunc(float number, float iter_val) { float output; // Beginning of FOR loop #1 for(0;iter_val-1>0;){ -
You CSS file will need to be in same directory as your index ("master")pa ge, otherwise you need to list the file path...as usual with all linked-in files.Leave a comment:
-
You use the <link> tag:
Also:Code:<link href="CSS/MyWebpage_CSS.css" rel="stylesheet">
...Code:<head> <title> Pixelated Dreams </title> <link href="CSS/MyWebpage_CSS.css" rel="stylesheet"> <!--Adobe Edge Runtime--> <script type="text/javascript" charset="utf-8" src="MyFirstEdgeProject_edgePreload.js"></script>
Last edited by zmbd; Dec 2 '12, 07:15 AM. Reason: [Z{Added the code tags around the HTML in the paragraph}]Leave a comment:
-
Jory R Ferrell replied to I can't seem to get Ctypes to find my c++ functions declared within a DLL file.in PythonOk...ok...calm down everyone. I appreciate the OVERWHELMING amount of help I have received, but I found the answer on my own:
http://wolfprojects.altervista.org/dllforpyinc.php
Apparently you need to add a directive to the cpp code and then set-up the function for export as a dll asset. I JUST found this solution so I am not sure what makes it tick (I am not very familiar with c++), but I'll read up on it some and let you know...Leave a comment:
-
Jory R Ferrell replied to I can't seem to get Ctypes to find my c++ functions declared within a DLL file.in PythonAs for my choice of function names....mind your business. :P
(O_o)Leave a comment:
-
Jory R Ferrell started a topic I can't seem to get Ctypes to find my c++ functions declared within a DLL file.in PythonI can't seem to get Ctypes to find my c++ functions declared within a DLL file.
The following attachments may help better than my own description.
CTypes_1 is a picture of the python code calling the function from the DLL.
CTypes_2 is the code contained within the DLL. (Before compilation of course. The actual DLL looks nothing like this.)
CTypes_3 is the DLL located in the directory I am calling it from during import. It is clearly labeled as a DLL, so I didn't just try to use... -
Jory R Ferrell replied to My interpreter be unable to find the pyOpenCL function "create_some_context".in PythonHmm...just found the following: pyopencl\__init __.py:10: UserWarning: It looks like you are importing PyOpenCL from its source directory. This likely won't work.
warn("It looks like you are importing PyOpenCL from "Leave a comment:
-
Jory R Ferrell started a topic My interpreter be unable to find the pyOpenCL function "create_some_context".in PythonMy interpreter be unable to find the pyOpenCL function "create_some_context".
Uhm...."Why might my interpreter be unable to find the pyOpenCL function 'create_some_co ntext'." Is what I meant to write. Anyways...
I both manually installed (simply pasted the files into the python directory) and used the 64-bit Windows binary install by Christoph Gohlke:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
The interpreter also seems to throw errors for all other example/tutorial code I have... -
So...I stopped being lazy last night(....sorta .... :P), and
I figured out some issues that were holding me back.
The code below works as far as I test (a few lines of a short test txt doc). It may not be very efficient for extremely large searches, but it'll do for short quick work, as I said for the last code. Anyways, it turns out that Python has a built-in module called "re". This stands for Regular Expressions. This module...Leave a comment:
-
I am going to try to read up on regular expressions and see if I can write something a little more streamlined.Leave a comment:
-
...Code:#------------------------------------------------------------------------------# # Preparation of Data # #------------------------------------------------------------------------------# # "user_input" Holds all words and/or phrases that you would like to search for. user_input = raw_input('Please input words and phrases to search for, separatingLast edited by Jory R Ferrell; Jul 29 '12, 10:55 PM. Reason: My phrase comparisons were set up wrong. If you compare the first two variables, they return true, because they are compared to themselves. :PLeave a comment:
-
First, you should realize that your question is unlikely to receive very many responses besides mine. Your question is asking for a lot of higher level(higher than noob level :P) concepts to be addressed, but you failed to do a very important thing: You should have made an attempt to write your own code. You should show what level of knowledge you have about lists, dictionaries, indexing, function calls, etc. This shows you made an effort and are...Leave a comment:
-
Nevermind....it was a namespace conflict. I had to rename the sizer, dubbed 'box', as 'self.box'. The window was refreshing without problem, but since nothing was actually being appended to the sizer, there was no visible result to confirm the update of the window and I assumed it wasn't occurring. :P But yeh...it does work. Thanks.Leave a comment:
-
-
-
Python 2.7 or 3.2? We need details like that since assignments can work diff between the versions.Leave a comment:
-
How to add canvases to a sizer and refresh the parent frame?
I am using wxPython. I need to be able to add and remove panels/canvases on demand, but I don't know how to refresh the entire parent frame (the base starting window). I tried fooling with the Full_Repaint option, but got no where. The method I am using, to add and (hopefully) refresh the frame, Add_Canvas(), starts at line 50.
...Code:canvas_List = [Cone_Canvas, CubeCanvas] class MainWindow(wx.Frame): def __init__(self, -
You can buy an Arduino prototyping circuit board built for this very sort of application.
Arduino webpage: http://www.arduino.cc/
Youtube tutorial for arduino and led's: http://www.youtube.com/watch?v=pMV2isNm8JU (If this link doesn't work for whatever reason, just look up: How-to Tuesday: Arduino 101 the LED)Leave a comment:
-
Nevermind on the updating each time I scroll. For some reason the image won't scale any longer past just a certain size. I started with larger images and it's scrolling fine...till I hit a threshold. I Still don't know why that is.
Again, I just need to figure out why the image disappears past a certain size (only does it when shrinking).Leave a comment:
No activity results to display
Show More
Leave a comment: