Search Results

Search found 35 results on 2 pages for 'tomaszs'.

Page 1/2 | 1 2  | Next Page >

  • How to handle interruptions in developer work without losing concentration? [closed]

    - by tomaszs
    I work as a developer for some years now. Mainly the issue why it's antisocial work is because you need to spend much time programming. I've been always the kind of developer who likes to cut off from any sources of distraction and spend several hours on project because in this way i (as i hope) do it faster. There are also other kinds of developers, more social that can chat, read, watch movies while development and they are ok with this and don't hesitate to be interrupted in their work in any time and come back to the project without any problem. For me any distraction is source of frustration because i need to spend substantial time to load my mind with all info about the project and to concentrate back on the tasks. I always thought it's better to do this that way because project is completed faster. But it makes some things difficult: it's hard to chat with someone who needs to have some important info: because you are a bit frustrated when you know you loose your Zen. And sometimes its more important to chat with someone than to loose Zen. Well.. mostly in any other kind of work the ability to be "multitask" is very important. But as a developer and as a person it's also very important to stay social. And i see now that the problem of concentration makes it difficult to make the right chose: the cost of maintaining concentration is just sometimes so damn high! So is it only me that i have so little concentration skills so any interruption is for me a big deal? Maybe it's just i have so bad memory so that i dont remember all issues of a project so long? Or maybe i develop the project in a fashion that requires me to store so much info on my mind only to be able to start working with code? Or should i just accept that being more social will make me finish project slower and in the fashion that i personally consider non 100% productive? And it's just normal thing and i should just accept it and start to live like any other person who has many works and don't assume that programming is in any case other than any other work and i just do fuzz about the whole concentration thing? This is question for mid-pro developers. I think you was having the same dillema in your life. I would be glad if you could help me take the right road here because it's just driving me and i suppose people i work with crazy for years.

    Read the article

  • What files to backup on Lighttpd+MySQL+PHP server

    - by Tomaszs
    I have a VPS with CentOS 5. I would like to create backup of: all my config files tweaks of database, php, server a databases cron settings website files installed applications and their settings (?) What files should i take into account? I don't want to miss any file that will be necessary to restore fast my webserver in case of any failure. And I don't want to create whole backup because entire VPS has like 30 GB of data.

    Read the article

  • ApacheBench result to a file

    - by Tomaszs
    I would like to save ApacheBench (ab) tool on linux to a file. When I run it with -v 2 it displays some results in my ssh window. How to move these data into a file and make sure that it will not display on ssh no more? I've tried file.txt 2&1 but it does not work and still display data in my ssh window. I use: ab -n 10000 -c 200 http://mywebsite.com > file.txt 2>&1

    Read the article

  • How to enable error log in lighttpd properly?

    - by Tomaszs
    I have a Centos 5 system with Lighttpd and fastcgi enabled. It does log access but does not log errors. I have Internal Server Error 500 and no info in log and when I try to open not -existing file also - no info in error log. How to enable it properly? Below is list of modules that I've enabled: server.modules = ( "mod_rewrite", "mod_redirect", "mod_alias", # "mod_access", # "mod_cml", # "mod_trigger_b4_dl", # "mod_auth", "mod_status", "mod_setenv", "mod_fastcgi", # "mod_webdav", # "mod_proxy_core", # "mod_proxy_backend_fastcgi", # "mod_proxy_backend_scgi", # "mod_proxy_backend_ajp13", # "mod_simple_vhost", # "mod_evhost", # "mod_userdir", # "mod_cgi", # "mod_compress", # "mod_ssi", # "mod_usertrack", # "mod_expire", # "mod_secdownload", # "mod_rrdtool", "mod_accesslog" ) Here are setting of debugging: ## enable debugging #debug.log-request-header = "enable" #debug.log-response-header = "enable" #debug.log-request-handling = "enable" debug.log-file-not-found = "enable" #debug.log-condition-handling = "enable" Setting of path to error and access log: ## where to send error-messages to server.errorlog = "/home/lxadmin/httpd/lighttpd/error.log" #### accesslog module accesslog.filename = "/home/lxadmin/httpd/lighttpd/ligh.log" Settings of fastcgi: fastcgi.debug = 1 fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket", "max-procs" => 12, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "2", "PHP_FCGI_MAX_REQUESTS" => "500" ) ))) And in included config file I have: server.errorlog = "/home/httpd/mywebsite.com/stats/mywebsite.com-error_log" What comes to log files: /home/httpd/mywebsite.com/stats/ -rw-r--r-- 1 apache apache 5173239 May 16 11:34 mywebsite.com-custom_log -rwxrwxrwx 1 root root 0 Mar 27 2009 mywebsite.com-error_log /home/lxadmin/httpd/lighttpd/ -rwxrwxrwx 1 apache apache 2184 Apr 22 22:59 error.log -rwxrwxrwx 1 apache apache 6088621 May 16 11:26 ligh.log I gave error logs chmod 777 for a try to check if it's the issue, but apparently it's not. So my question is: what to do to have error log enabled?

    Read the article

  • How to populate RRD database with CPU and MEM usage data?

    - by Tomaszs
    I have a Lighttpd server (on Centos) and would like to display 4 graphs: lighttpd traffic, lighttpd requests per second, CPU usage and MEM usage. I've set place for rrd database for lighttpd config like this: rrdtool.binary = "/usr/bin/rrdtool" rrdtool.db-name = "/var/www/lighttpd.rrd" And put into my WWW cgi-bin sh file that gets data from lighttpd RRD file and creates graphs of traffic and requests per second like this: #!/bin/sh RRDTOOL=/usr/bin/rrdtool OUTDIR=//var/www/graphs INFILE=/var/www/lighttpd.rrd OUTPRE=lighttpd-traffic WIDTH=400 HEIGHT=100 DISP="-v bytes --title TrafficWebserver \ DEF:binraw=$INFILE:InOctets:AVERAGE \ DEF:binmaxraw=$INFILE:InOctets:MAX \ DEF:binminraw=$INFILE:InOctets:MIN \ DEF:bout=$INFILE:OutOctets:AVERAGE \ DEF:boutmax=$INFILE:OutOctets:MAX \ DEF:boutmin=$INFILE:OutOctets:MIN \ CDEF:bin=binraw,-1,* \ CDEF:binmax=binmaxraw,-1,* \ CDEF:binmin=binminraw,-1,* \ CDEF:binminmax=binmaxraw,binminraw,- \ CDEF:boutminmax=boutmax,boutmin,- \ AREA:binmin#ffffff: \ STACK:binmax#f00000: \ LINE1:binmin#a0a0a0: \ LINE1:binmax#a0a0a0: \ LINE2:bin#efb71d:incoming \ GPRINT:bin:MIN:%.2lf \ GPRINT:bin:AVERAGE:%.2lf \ GPRINT:bin:MAX:%.2lf \ AREA:boutmin#ffffff: \ STACK:boutminmax#00f000: \ LINE1:boutmin#a0a0a0: \ LINE1:boutmax#a0a0a0: \ LINE2:bout#a0a735:outgoing \ GPRINT:bout:MIN:%.2lf \ GPRINT:bout:AVERAGE:%.2lf \ GPRINT:bout:MAX:%.2lf \ " $RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP -w $WIDTH -h $HEIGHT $RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP -w $WIDTH -h $HEIGHT $RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP -w $WIDTH -h $HEIGHT OUTPRE=lighttpd-requests DISP="-v req --title RequestsperSecond -u 1 \ DEF:req=$INFILE:Requests:AVERAGE \ DEF:reqmax=$INFILE:Requests:MAX \ DEF:reqmin=$INFILE:Requests:MIN \ CDEF:reqminmax=reqmax,reqmin,- \ AREA:reqmin#ffffff: \ STACK:reqminmax#00f000: \ LINE1:reqmin#a0a0a0: \ LINE1:reqmax#a0a0a0: \ LINE2:req#00a735:requests" $RRDTOOL graph $OUTDIR/$OUTPRE-hour.png -a PNG --start -14400 $DISP -w $WIDTH -h $HEIGHT $RRDTOOL graph $OUTDIR/$OUTPRE-day.png -a PNG --start -86400 $DISP -w $WIDTH -h $HEIGHT $RRDTOOL graph $OUTDIR/$OUTPRE-month.png -a PNG --start -2592000 $DISP -w $WIDTH -h $HEIGHT Basically it's not my script, i get it from somewhere from the internet. Now i would like to do the same for CPU usage and MEM usage. I don't like to use any additional packages! As you can see lighttpd populates lighttpd.rrd file with traffic data and requests per second. Now i would like to the system to populate second rrd file with CPU and MEM usage, so i can add to sh file code to generate graphs for this data. How can I populate RRD file with CPU and MEM usage data? Please, NO THIRD-PARTY tools !

    Read the article

  • How to use DNS/Hostnames or Other ways to resolve to a specific IP:Port

    - by tomaszs
    This is a Canonical Question about DNS/Hostnames resolution to IPs/Ports Example 1 I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS only? Example 2 I'm running a service on my server on a non-standard port. How can I get clients to connect to this non-standard port automatically? Can I use DNS? Is there some application specific support where DNS could indicate the IP and Port? Example 3 Do some application protocols specifically support hostname awareness, and allow special actions to be taken based on this information? Are there other questions on Server Fault that cover some of these? Commandeering: This question was originally asking about running IIS and Apache on the same server, but the same concepts can be applied to any server software receiving connections from clients. The Answers below describe the technical problems and solutions of using DNS and application protocol support to assign a port number for a client to connect.

    Read the article

  • How to diagnose Internal Server error on Lighttpd?

    - by Tomaszs
    I have Lighttpd on Centos 5 with Fcgi and Memcached. Periodically, once per week or two i get internal server error 500 and i must manually restart lighttpd to get it to work again. In my lighttpd config I've defined error log file: server.errorlog = "/home/lxadmin/httpd/lighttpd/error.log" But when I open it, it has no rows for last days, only one month ago. So my question is how to diagnose what is the issue and how to enable error log for my configuration?

    Read the article

  • How to fix yum install not valid release error on Centos 5

    - by Tomaszs
    When I try to yum install anything I get: -bash-3.2# yum install strace Loading "fastestmirror" plugin Determining fastest mirrors * dag: apt.sw.be * lxlabsupdate: download.lxlabs.com * rpmforge: fr2.rpmfind.net * lxlabslxupdate: download.lxlabs.com YumRepo Warning: not using ftp, http[s], or file for repos, skipping - 5.2 is not a valid release or hasnt been released yet removing mirrorlist with no valid mirrors: //var/cache/yum/base/mirrorlist.txt Error: Cannot find a valid baseurl for repo: base How to fix it?

    Read the article

  • How to unlock my IP on Centos firewall?

    - by Tomaszs
    I have a VPS with Centos and with firewall that I used to configure by Lxadmin. Now I don't have Lxadmin control panel and can't go to change it by web interface. How to discover what firewall I have on my machine and where is the config with blocked IP so I can remove mine?

    Read the article

  • How to exclude one subfolder from my RewriteRule Htaccess rules?

    - by tomaszs
    I have a .htaccess in my root of website that looks like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mydomain\.pl [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-z0-9_-]+)\.mydomain\.pl [NC] RewriteRule ^/?$ /index.php?run=places/%1 [L,QSA] RewriteCond %{REQUEST_URI} !^/index.php$ RewriteCond %{REQUEST_URI} !^/images/ RewriteCond %{REQUEST_URI} !^/upload/ RewriteCond %{REQUEST_URI} !^/javascript/ RewriteRule ^(.*)$ /index.php?runit=$1 [L,QSA] I've installed custom guest book in folder guests and now I would like to disable rules above for this one specific folder. So that when I type: mydomain.pl/guests I would like to go normally to actual folder guests. I understand that I need to somehow disable rules above for guests subfolder, but how do I do this?

    Read the article

  • How to use DNS to redirect domain to specific port on my server

    - by Tomaszs
    I'm running a web server on port 80 and another on port 87. I would like to use DNS so that www.example.com goes to port 87. How can I accomplish this using DNS only? Canonical Question: This question was originally asking about running IIS and Apache on the same server, but the same concepts can be applied to any server software receiving connections from clients. The Answers below describe the technical problems with using DNS to assign a port number for a client to connect.

    Read the article

  • CData section not finished problem

    - by tomaszs
    When I use DOMDocument::loadXML() for my XML below I get error: Warning: DOMDocument::loadXML() [domdocument.loadxml]: CData section not finished http://www.pdclipart.org/displayimage.php?album=se in Entity, Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag image line 7 in Entity Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag quizz line 3 in Entity Warning: DOMDocument::loadXML() [domdocument.loadxml]: Premature end of data in tag quizzes line 2 in Entity Fatal error: Call to a member function getElementsByTagName() on a non-object It seems to me that my CData sections are closed but still I get this error. XML looks like this: <?xml version="1.0" encoding="utf-8"?> <quizzes> <quizz> <title><![CDATA[Title]]></title> <descr><![CDATA[Some text here!]]></descr> <tags><![CDATA[one tag, second tag]]></tags> <image><![CDATA[http://www.site.org/displayimage.php?album=search&cat=0&pos=1]]></image> <results> <result> <title><![CDATA[Something]]></title> <descr><![CDATA[Some text here]]></descr> <image><![CDATA[http://www.site.org/displayimage.php?album=search&cat=0&pos=17]]></image> <id>1</id> </result> </results> </quizz> </quizzes> Could you help me discover what is the problem?

    Read the article

  • How to optimize simple linked server select query?

    - by tomaszs
    Hello, I have a table called Table with columns: ID (int, primary key, clustered, unique index) TEXT (varchar 15) on a MSSQL linked server called LS. Linked server is on the same server computer. And: When I call: SELECT ID, TEXT FROM OPENQUERY(LS, 'SELECT ID, TEXT FROM Table') It takes 400 ms. When I call: SELECT ID, TEXT FROM LS.dbo.Table It takes 200 ms And when I call the query directly while being at LS server: SELECT ID, TEXT FROM dbo.Table It takes 100 ms. In many places i've read that OPENQUERY is faster, but in this simple case it does not seem to work. What can I do to make this query faster when I call it from another server, not LS directly?

    Read the article

  • How to replace round bracket tag in javascript string

    - by tomaszs
    I have trouble with changing round bracket tag in Javascript. I try to do this: var K = 1; var Text = "This a value for letter K: {ValueOfLetterK}"; Text = Text.replace("{ValueOfLetterK}", K); and after that I get: Text = "This a value for letter K: {ValueOfLetterK}" What can be done to make this work? When I remove round brackets it works fine.

    Read the article

  • Hosting solution for images for website written in PHP

    - by tomaszs
    I've written a website in PHP and it will have ability for users to upload images. My website will have more than 100.000 users. Aprox. 1k users will upload image about 50 KB. And every image will be displayed on this website 5k times so it's transfer of: 1k x 50 KB x 5k = 250 GB per month. So my question is: Do you know any good solution (hosting or CDN network or else) that: will be payed for transfer not space used and no entrance fee will have API to upload images easily with PHP is extremely easy to use will be good for low budget will not require any special, complicated registration and formal things will allow commercial use will allow using this images in website layout ?

    Read the article

  • How to record / capture audio with RecordControl on Java ME, SE K770i

    - by tomaszs
    I want to record sound on my Java ME App on K770i. So I used this: http://java.sun.com/javame/reference/apis/jsr135/javax/microedition/media/control/RecordControl.html example of RecordControl in my code. It goes like this: import java.util.Vector; import javax.microedition.lcdui.Choice; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.List; import javax.microedition.media.Manager; import javax.microedition.media.MediaException; import javax.microedition.midlet.MIDlet; import java.io.*; import javax.microedition.lcdui.*; import javax.microedition.media.*; import javax.microedition.media.control.*; import javax.microedition.midlet.*; import javax.microedition.rms.*; (...) try { // Create a Player that captures live audio. Player p = Manager.createPlayer("capture://audio"); p.realize(); // Get the RecordControl, set the record stream, // start the Player and record for 5 seconds. RecordControl rc = (RecordControl)p.getControl("RecordControl"); ByteArrayOutputStream output = new ByteArrayOutputStream(); rc.setRecordStream(output); rc.startRecord(); p.start(); Thread.currentThread().sleep(5000); rc.commit(); p.close(); } catch (IOException ioe) { } catch (MediaException me) { } catch (InterruptedException ie) { } But unfortunately when I try to build it, it tells me: *** Creating directories *** *** Compiling source files *** ..\src\example\audiodemo\AudioPlayer.java:121: cannot find symbol symbol : class RecordControl location: class example.audiodemo.AudioPlayer RecordControl rc = (RecordControl)p.getControl("RecordControl"); ^ ..\src\example\audiodemo\AudioPlayer.java:121: cannot find symbol symbol : class RecordControl location: class example.audiodemo.AudioPlayer RecordControl rc = (RecordControl)p.getControl("RecordControl"); ^ 2 errors So my question is: why there is no RecordControl class if in documentations it is written this class should be there. Or is there other method to record / capture audio from microfone in Java ME of Sony Ericsson? How do you record sound?

    Read the article

  • How to get DataGridViewRow from CellFormatting event?

    - by tomaszs
    I have a DataGridView and handle event CellFormatting. It has a parameter called: DataGridViewCellFormattingEventArgs e With e.RowIndex in it. When i do: DataGridView.Rows[e.RowIndex] I get proper row from collection. But when I click at a header of a column to sort it by other column than default one and user DataGridView.Rows[e.RowIndex] I get unproper row. It is because Rows collection do not reflect order of rows in DataGridView. So how to get propert DataGridViewRow from RowIndex in DataGridView?

    Read the article

  • How to log slow queries in shared hosting MySQL?

    - by tomaszs
    I have a shared hosting where I have my website and MySQL database. I've installed a open source script for statistics (phpMyVisites) and it started to work very slow lately. It's written using some kind of framework and has many PHP files. I know that to find slow queries I can use slow query log functionality in MySQL. But on this shared hosting I can not use this method because I can not change my.cnf. I don't want to change my statistics script to other and I don't want to mess around with all files of this script to find out where to put diagnostics code to log queries manually. I would like to do it without changes in PHP code. So my question is: How to log slow queries in these coditions?: Can't change my.cnf to enable slow query log Can't change statistics script to other Don't know how scrpt is written and where mysql commands are issued Can't ask my provider for slow query log Is there any method to do this in simple, easy, fast way?

    Read the article

  • How to recognize what indexes are not used?

    - by tomaszs
    I have a table in MySQL with 7 indexes, most of them are on more than one column. I think here is too much indexes. Is there any way to get statistics of what indexes are used more by all thousands of queries to this database and what are less worthy so I know what index to consider to remove in first place?

    Read the article

  • Lighttpd server is stopped

    - by tomaszs
    I have a Lighttpd server plus mod_fastcgi. And today I had Internal Server Error 500. I've checked my error log and it goes like this: 2010-04-22 22:59:14: (server.c.1464) server stopped by UID = 0 PID = 3332 2010-04-22 22:59:15: (mod_fastcgi.c.1768) connect failed: No such file or directory on unix:/tmp/php.socket-5 2010-04-22 22:59:15: (mod_fastcgi.c.2956) backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 1 2010-04-22 22:59:15: (mod_fastcgi.c.2709) child died somehow, waitpid failed: 10 2010-04-22 22:59:15: (server.c.1464) server stopped by UID = 0 PID = 3332 2010-04-22 22:59:15: (server.c.1464) server stopped by UID = 48 PID = 1385 2010-04-22 22:59:15: (server.c.1464) server stopped by UID = 48 PID = 1385 2010-04-22 22:59:15: (server.c.1464) server stopped by UID = 48 PID = 1385 2010-04-22 22:59:15: (server.c.1464) server stopped by UID = 48 PID = 1385 What to do to find out what can be cause of this?

    Read the article

1 2  | Next Page >