Search Results

Search found 138 results on 6 pages for 'tristan lear'.

Page 6/6 | < Previous Page | 2 3 4 5 6 

  • OOP PHP simple question

    - by Tristan
    Hello, I'm new to OOP in PHP, is that to seems correct ? class whatever { Function Maths() { $this->sql->query($requete); $i = 0; while($val = mysql_fetch_array($this)) { $tab[i][average] = $val['average']; $tab[i][randomData] = $val['sum']; $i=$i+1; } return $tab; } I want to access the data contained in the array $foo = new whatever(); $foo->Maths(); for ($i, $i <= endOfTheArray; i++) { echo Maths->tab[i][average]; echo Maths->tab[i][randomData]; } Thank you ;)

    Read the article

  • Self-contained python installation with executable tools included (pip, orbited, etc)

    - by Tristan
    I'm trying deploy a Python application on Windows as a folder that includes a full python 2.6 folder. I don't need/want a fancy solution like py2exe, I'm just trying to automate deployment of a web application. So long as I include python26.dll and set the PYTHONHOME correctly, things seem to work if I just include the Python26 folder in its entirety. However a number of the Python26/Script files don't work. For instance, pip.exe, orbited.exe, and morbid.exe all do nothing (complete with no output) when I try to run them on a system that doesn't have a real Python26 installation. I've run out of ideas. Suggestions?

    Read the article

  • Changing floating point behavior in Python to Numpy style.

    - by Tristan
    Is there a way to make Python floating point numbers follow numpy's rules regarding +/- Inf and NaN? For instance, making 1.0/0.0 = Inf. >>> from numpy import * >>> ones(1)/0 array([ Inf]) >>> 1.0/0.0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: float division Numpy's divide function divide(1.0,0.0)=Inf however it is not clear if it can be used similar to from __future__ import division.

    Read the article

  • jQuery : how to apply effect on a child element

    - by Tristan
    Hello, instead of re-writting the same function, i want to optimise my code : <div class="header"> <h3>How to use the widget</h3> <span id="idwidget" ></span> </div> <div class="content" id="widget"> the JS : <script type="text/javascript"> $(document).ready(function() { var showText="Show"; var hideText="Hide"; $("#idwidget").before("<a href='#' class='button' id='toggle_link'>"+showText+"</a>"); $('#widget').hide(); $('a#toggle_link').click(function() { if ($('a#toggle_link').text()==showText) { $('a#toggle_link').text(hideText); } else { $('a#toggle_link').text(showText); } $('#widget').toggle('slow'); return false; }); }); This is working just with the div which is called widget and the button called idwidget. But on this page i have also : <div class="header"> <h3>How to eat APPLES</h3> <span id="IDsomethingelse" ></span> </div> <div class="content" id="somethingelse"> And i want it to be compatible with the code. I heard about children attribute, do you have an idea how to do that please ? Thank you

    Read the article

  • Mysql configuration errror : using password (NO) instead of YES.

    - by Tristan
    Hello, I try to connect mysql via PHPMYADMIN, using my password, but it can't stop telling me that (access denied, using password NO) but i'm using a password :O When i connect via the console with my password, it works but not on phpmyadmin. It's really weird. Do you have an idea to fix that ? edit: it worked couple of days ago, because i created 2 databases and 2 users via phpmyadmin... Thanks edit : When i'm using CHROME it's working unless FireFox ... any ideas ?

    Read the article

  • Rails model to represent multiple fields

    - by Tristan O'Neil
    I'm developing a rails project where I have one data model with multiple fields that are collection selects. I'd like to create another model to represent all of these collection select fields. So, for instance, my main data model has three collection select fields -- one for county, one for category, and one for classification. I could separate these into three separate data models, but that seems redundant since they all share the same characteristics. They have a type and a value, like a county is a county and it has a value of let's say Sonoma, just as category has a type of category and a value of let's say Winery. If you've ever used Drupal, I'm basically looking for the behavior of the taxonomy functionality. So you see my dilemma: I need to separate these fields into three separate fields but they have very similar data structures. Any suggestions would be greatly appreciated.

    Read the article

  • 2 IP are stored for a visitor : PROXY ?

    - by Tristan
    Hello, on my database i've decided to store IP of the visitors who answoers to polls. It's all working, but there is only 2 cases where not only 1 IP is stored, but there is 2 SAME ip for the same visitor MySQLL output (i replaced 2 numbers by XX) 10.188.XX.129, 10.188.XX.129 Here's the script to recieve the IP of the visitor : <?php function realip() { if (isset($_SERVER)) { if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { $realip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } elseif (isset($_SERVER["HTTP_CLIENT_IP"])) { $realip = $_SERVER["HTTP_CLIENT_IP"]; } else { $realip = $_SERVER["REMOTE_ADDR"]; } } else { if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) { $realip = getenv( 'HTTP_X_FORWARDED_FOR' ); } elseif ( getenv( 'HTTP_CLIENT_IP' ) ) { $realip = getenv( 'HTTP_CLIENT_IP' ); } else { $realip = getenv( 'REMOTE_ADDR' ); } } return $realip; } ? Thanks

    Read the article

  • Subversion Deployment tools: specify branch/tag, revision and target machine

    - by Terman
    What are some non commercial deployment tools that allows a developer to speficy: a branch/tag, a revision and a target machine to deploy code to? I was wondering if there's a ccnet plugin of some sort that would allow the above to be specified. I know this could be done with a NAnt deploy script. However considering we're mostly using gui tools for feedback, plus the tortoise svn repository browser, it be cool to lear if there's an GUI simple GUI tool/plugin cheers.

    Read the article

  • Welcome - A new star is born!

    Hello dear family & friends,we would like to introduce you to our latest project "Stitch" or better said experiment 'Tristan Kane Kirstätter'.The little boy was born two days ago, 26.05.2010, at around 01:45 hours.Some details about the visual appearance of him: Weight - 2.9kgSize - 54cmHair - long and darkEyes - most of the time closed Pictures of him and his sister are already available at my online photo gallery at the following address: http://picasaweb.google.com/JoKi.MRU/FamilyThe mum and the little boy are both in good and healthy conditions. We are looking forward to leave the clinic today.In any way, thanks for your kind support.Yours faithfully, Mary Jane, Hayley & JoKi

    Read the article

  • Convert BLOB to Jpg using C#

    - by TGuimond
    Hello, I am currently developing a web application that receives data from an on-site oracle database. The database developers have developed some web-services that I am able to call and send/receive data to and from the the database. When I want to display an image the method returns the image in BLOB format. My question is: what is the best way to convert BLOB to .jpg or .bmp so I can display the image correctly? If someone could point me in the right direction that would be great! Cheers, Tristan

    Read the article

  • simple Stata program

    - by Cyrus S
    I am trying to write a simple program to combine coefficient and standard error estimates from a set of regression fits. I run, say, 5 regressions, and store the coefficient(s) and standard error(s) of interest into vectors (Stata matrix objects, actually). Then, I need to do the following: Find the mean value of the coefficient estimates. Combine the standard error estimates according to the formula suggested for combining results from "multiple imputation". The formula is the square root of the formula for "T" on page 6 of the following document: http://bit.ly/b05WX3 I have written Stata code that does this once, but I want to write this as a function (or "program", in Stata speak) that takes as arguments the vector (or matrix, if possible, to combine multiple estimates at once) of regression coefficient estimates and the vector (or matrix) of corresponding standard error estimates, and then generates 1 and 2 above. Here is the code that I wrote: (breg is a 1x5 vector of the regression coefficient estimates, and sereg is a 1x5 vector of the associated standard error estimates) mat ones = (1,1,1,1,1) mat bregmean = (1/5)*(ones*breg’) scalar bregmean_s = bregmean[1,1] mat seregmean = (1/5)*(ones*sereg’) mat seregbtv = (1/4)*(breg - bregmean#ones)* (breg - bregmean#ones)’ mat varregmi = (1/5)*(sereg*sereg’) + (1+(1/5))* seregbtv scalar varregmi_s = varregmi[1,1] scalar seregmi = sqrt(varregmi_s) disp bregmean_s disp seregmi This gives the right answer for a single instance. Any pointers would be great! UPDATE: I completed the code for combining estimates in a kXm matrix of coefficients/parameters (k is the number of parameters, m the number of imputations). Code can be found here: http://bit.ly/cXJRw1 Thanks to Tristan and Gabi for the pointers.

    Read the article

  • How do I learn algorithms?

    - by Panthe
    Brief History: Just graduated high school, learned a bit of python and C++, have no friends with any helpful computer knowledge at all. Out of anyone i met in my school years I was probably the biggest nerd, but no one really knew. I consider my self to have a vast amount of knowledge on computers and tech then the average person. built/fixed tons of computers, and ability to troubleshoot pretty much any problem I came across. Now that high school is over, Ive really been thinking about my career. Loving, living computers for the past 15 years of my life I decided to take my ability's and try to learn computer programming, why I didn't start earlier I don't know, seems to be big mistake on my part... Doing some research I concluded that Python was the first programming language I should learn, since it was high level and easier to understand then C++ and Java. I also knew that to become good at what I did I needed to know more then just 2 or 3 languages, which didn't seem like a big problem considering once I learned the way Python worked, mainly syntax changed, and the rest would come naturally. I watched a couple of youtube videos, downloaded some book pdf's and snooped around from some tutorials here and there to get the hang of what to do. A two solid weeks had passed of trying to understand the syntax, create small programs that used the basic functions and understanding how it worked, I think i have got the hang of it. It breaks down into what ive been dealing with all this time (although i kinda knew) is that, input,output, loops, functions and other things derived from 0's and 1's storing data and recalling it, ect. (A VERY BASIC IDEA). Ive been able to create small programs, Hangman, file storing, temperature conversion, Caeser Cipher decode/encoding, Fibonacci Sequence and more, which i can create and understand how each work. Being 2 weeks into this, I have learned alot. Nothing at all compared to what i should be lear ning in the years to come if i get a grip on what I'm doing. While doing these programs I wont stop untill I've done doing a practice problem on a book, which embarresing enough will take me a couple hour depending on the complexity of it. I absolutly will not put aside the challenge until its complete, WHICH CAN BE EXTREMELY DRAINING, ive tried most problems without cheating and reached success, which makes me feel extremely proud of my self after completing something after much trial and error. After all this I have met the demon, alogrithm's which seem to be key to effiecent code. I cant seem to rap my head around some of the computer codes people put out there using numbers, and sometimes even basic functions, I have been able to understand them after a while but i know there are alot more complex things to come, considering my self smart, functions that require complex codes, actually hurt my brain. NOTHING EVER IN LIFE HURT MY BRAIN....... not even math classes in highschool, trying to understand some of the stuff people put out there makes me feel like i have a mental disadvantage lol... i still walk forward though, crossing my fingers that the understanding will come with time. Sorry if is this is long i just wish someone takes all these things into consideration when answering my question. even through all these downsides im still pushing through and continuing to try and get good at this, i know reading these tutorials wont make me any good unless i can become creative and make my own, understand other peoples programs, so this leads me to the simple question i could have asked in the beginning..... WHERE IN THE WORLD DO I START ? Ive been trying to find out how to understand some of the open source projects, how i can work with experianced coders to learn from them and help them, but i dont think thats even possible by the way how far people's knowledge is compared to me, i have no freinds who i can learn from, can someone help me and guide me into the right direction.. i have a huge motivation to get good at coding, anything information would be extremely helpful

    Read the article

< Previous Page | 2 3 4 5 6