Search Results

Search found 8 results on 1 pages for 'chutsu'.

Page 1/1 | 1 

  • PHP not displaying any errors

    - by chutsu
    I've got ubuntu 10.04 installed, as well as: lighttpd mysql/php Now my problem is that my php scripts can be executed and has access to MySQL database, however I'm having problems getting php to display all errors when running. The result of a failed php run is a blank page. I tried setting the display errors on in php.ini in /etc/php5/cgi/php.ini I've also tried adding these two lines in the source to force errors on, to no avail. ini_set('display_errors', '1'); error_reporting(E_ALL); What should I do? Thanks

    Read the article

  • How to create a bash script to check the SSH connection?

    - by chutsu
    I am in the process of creating a bash script that would log into the remote machines and create private and public keys. My problem is that the remote machines are not very reliable, and they are not always up. I need a bash script that would check if the SSH connection is up. Before actually creating the keys for future use.

    Read the article

  • How to get points that intersect the treadline?

    - by chutsu
    Basically I did the Cavendish experiment, and I have a damped sinusoidal wave plotted on Excel. With Position (mm) against Time (s). My problem is that I have added a tread line through the wave function, and wish to calculate the points of which the wave function intersects the tread line. From this I will then be able to calculate the time period. At the moment I'm just having difficulty getting the intersects.. Thanks

    Read the article

  • Search string in file (C)

    - by chutsu
    So my code isn't working... test.c:27: warning: passing argument 1 of ‘search’ from incompatible pointer type which is the fgets line. My code opens a file, reads the file line by line, and I'm trying to create a "search" function that will return a value that indicates whether that string is found on that line of the file. My ultimate goal is to achieve a search and replace program. But one step at a time eh? this is what I have so far: #include <stdio.h> #include <string.h> int search(const char *content[], const char *search_term) { int t; for(t=0; content[t]; ++t){ if(!strcmp(content[t], search_term)){ return t; // found } } return 0; // not found } int main(int argc, char *argv[]) { FILE *file; char line[BUFSIZ]; int linenumber=0; char term[20] = "hello world"; file = fopen(argv[1], "r"); if(file != NULL){ while(fgets(line, sizeof(line), file)){ if(search(line, term) != -1){ printf("Search Term Found!!\n"); } ++linenumber; } } else{ perror(argv[1]); } fclose(file); return 0; }

    Read the article

  • How to parse a directory tree in python?

    - by chutsu
    I have a directory called "notes" within the notes I have categories which are named "science", "maths" ... within those folder are sub-categories, such as "Quantum Mechanics", "Linear Algebra". ./notes --> ./notes/maths ------> ./notes/maths/linear_algebra --> ./notes/physics/ ------> ./notes/physics/quantum_mechanics My problem is that I don't know how to put the categories and subcategories into TWO SEPARATE list/array.

    Read the article

  • Standalone application in C, a good idea?

    - by chutsu
    The term has several definition according to Wikipedia, however what I'm really interested in is creating a program that has all its needed dependencies included within the source folder, so the end user doesn't need to install additional libraries for the app to install. For example, how Mac apps has all its dependencies all within the program itself already... or is there a function that autotools does this? I'm programming in the Linux environment...

    Read the article

1