Skip to main content

Posts

Showing posts with the label Webserver

SCALA Programming Language Secret Behind Twitter's Growth

SCALA programming language and Secret behind Twitter's growth Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application. http://www.scala-lang.org/ Introducing Scala Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application. Programming Scala book Programming in Scala Some books A comprehensive step-by-step guide by Martin Odersky, Lex Spoon,...

apsscresults 10th Class results ssc 2009 of AP Board

Andhra Pradesh State Board SSC Results 2009 announced today (27-May-09) by 10.45 am. There is lot of rush for those sites, Results will be available on the following sites: I have tried to give direct links for results, good luck to students. Results direct links from manabadi ssc SSC results on SMS from manabadi results.manabadi.co.in Indiaresults Bharat student Results direct links from results.sakshi.com AP SSC REGULAR results 09 results.sakshi.com/textfile/R_PRES91.TXT AP SSC PRIVATE Results results.sakshi.com/textfile/P_PRES9.txt AP OSSC REGULAR results results.sakshi.com/textfile/OS_PRES92.txt AP OSSC PRIVATE results results.sakshi.com/textfile/OS_PRES92.txt Sakshi Results Sakshi Results. Ceep 2009 Results · Inter Second Year 2009 Results · Inter First Year 2009 Results. results.sakshi.com Results direct links from vidyavision.com Andhra Pradesh SSC 2009 Results (General) Andhra Pradesh SSC 2009 Results (Vocational) Andhra Pradesh Examination Results- Vidyavision .com ...

Configure udhcpc for Setting IP netmask and Gateway

How to Configure udhcpc for Setting IP netmask and Gateway? Tell udhcpc client to run on eht1 interface with -i option. Also use -s option to tell udhcpc client to use script from specified path. /sbin/udhcpc -i eth1 -p /var/run/dhcpClient-wifi.pid -s /usr/share/udhcpc-wifi/default.script & default.script directs the udhcpc to executes one by one scripts from specified folder ie /usr/share/udhcpc-wifi/ else default folder location for udhcpc script is /usr/share/udhcpc/ For directing IP address to temp file obtained using udhcpc client or for DHCP , do little modification in sample.bound file. Here is Sample udhcpc renew script, which will update the ip address, netmask and gatway obtained by boradcasting. The new values will be updataed in /var/dhcpfile. #!/bin/sh # Sample udhcpc renew script RESOLV_CONF="/etc/resolv.conf" [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subn...

UDP Traffic Generator Client Side C code

Learning Networking basics using C programs, to start with here is simple UDP client side code, Why to start with UDP because its simple, no need of connection handshake like TCP . This code sends continues UDP traffic over network, depending on the payload (ie send_buf) and delay between each transfer, rate at which data is pumped over network is calculated. Example: this client program is sending constant length 0f 1400 (in sendto function), so if you keep delay as 1s then data transfer rate will be 1400 per sec, decrease the delay to pump traffic at high rate. You need UDP server side code for running this client. udp client #include #include #include #include #include #include #include #include /* memset() */ #include /* select() */ #define REMOTE_SERVER_PORT 1500 #define MAX_MSG 1600 int main() { int sd, rc, i; struct sockaddr_in cliAddr, remoteServAddr; struct hostent *h; char *send_buf; unsigned int count=0; int reply; send_buf= (c...

Refresh HTML Page Every 5 Seconds Usages META tag

How to Refresh HTML/CGI page every 5 seconds? Today I was searching for page refresh after a certain activity is completed. I was running some task in say CGI 1; which uses fork() to execute another task; once this task is done CGI 1 should get refreshed or should show me the updated status which is being updated by new task. I tried lot of other combination like calling refresh function from new task; with window.opener.refresh_fucntion(); and a lot. Finally got the solution using meta tag of html. Meta HTML tag,The element provides meta-information about your page And the answer to question is just include before head element this tag; Refresh page every 5 seconds: Refresh page every 5 seconds: <meta http-equiv="refresh" content="5" /> and my job is done. Thanks to meta tag.

SAMBA Access From Windows Error

When I was trying to access samba shares from windows I was able to access the shares with entered user name and password but that was happening only once; as windows was storing the session details; I was not able to login with different user name other share access; I was getting error "Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.." one solution to this is reboot the windows system and try again. But that's very rude solution. Simple solution is Open a Command Prompt and type these commands: net use (to see all existing connections) net use * /del /yes (to delete all existing connections) Great..

How to Set up vsftpd Virtual Users-ARM-Target-Board

Setting up virtual users, and different home directory for each user using vsftpd. How to Set up vsftpd Virtual Users-ARM-Target-Board? Installing 1. download and install the ftp server VSFTPD 2. if you are compiling from source, then ensure you enable PAM support, as we will be using PAM (or pluggable authentication modules) to handle the virtual users. 3. If any problem check out this post for porting vsftpd on ARM 4. We need the db3_load(20KB) binary for ARM which also need runtime library(888K) from Berkeley v3 database(ie libdb3-util for ARM). 5. Update the library-libdb3-util and db3_load binary on ARM target board; 6. Create the virtual users database using $db_load -T -t hash -f logins.txt /etc/vsftpd_login.db where logins.txt is txt file with the usernames and password on alternating lines copy this file into /etc/ 7. create PAM file from example given, /etc/pam.d/vsftpd.pam auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login account required /lib/security/pam_...

Porting vsftpd server to ARM target Board

I want to cross compile vsftpd for my ARM target board? vsftpd is a GPL licensed FTP server for UNIX systems, including Linux. It is secure and extremely fast. It is stable. Don't take my word for it, though. Below, we will see evidence supporting all three assertions. We will also see a list of a few important sites which are happily using vsftpd. This demonstrates vsftpd is a mature and trusted solution. download vsftpd cross compile vsftpd # tar zxvf vsftpd-2.0.5.tar.gz #cd vsftpd-2.0.5 #vim Makefile Edit CC = arm-linux-gcc #make Now starts getting errors; /lib/libcap.so.1: could not read symbols means it can not find libcap shared library. use #which libcap and Edit vsf_findlibs.sh, shield “locate_library /lib/libcap.so.1 && echo "/lib/libcap.so.1";”, substitute with the path from #which libcap instead of /lib/libcap.so.1 now #make clean;make and done; Next one more hurdle, vsftpd server and vsftpd.conf configure file will be created. #cp vsftpd /path/to/ta...

Short Sweet C Functions

One of the short and sweet function which i have written in C language is dotted_decimal_to_string(). This function takes individual fields as inputs returns dotted decimal string. This is used in taking dotted decimal values of network parameters like IP address, IP netmask, IP gateway address, DNS server IP address etc, from the webpage , where these network parameters are individual inputs from a form. Check out the function. char *dotted_decimal_to_string(char *pad1, char *pad2, char *pad3, char *pad4) { char temp[40],*ret_string; sprintf(temp,"%s.%s.%s.%s",pad1,pad2,pad3,pad4); ret_string = (char*)malloc(strlen(temp) + 1); strcpy(ret_string,temp); return ret_string; } The return string is a dotted decimal value for a network parameter and is used to store in configuration file or to use for setting and configuring the Network parameters. This function stuck to my mind while i was going to bed yesterday. That means, my back-office was working for me, ...

About thttpd - tiny/turbo/throttling HTTP server Configuration

I am newbie for HTTP servers, so I may miss technical words while writing about thttpd web server. I got simple config file from thttpd site Which is easy for get going, I was in need to put .gif and .jpg images on my pages, which are tested on other webserver boa where all the pages were coming with CSS formating and images. With new installation of thttpd .jpg images and .gif images were not seen and also CSS formating was missing. I discovered about localpat variable from thttpd, one has to give path in configuration file as localpat=**.gif|**.png|**.jpg to appear images. All images should be read only format. one can use $chmod 644 *.* command to make files read only. About CSS, just change the format to read only and keep it in www or html folder it starts appearing. well there is not much documentation on the site, hope you will not spend time in digging the things again. my configuration file looks as below dir=/usr/share/html cgipat=/cgi-bin/*.cgi pidfile=/var/r...