Log in
يك شنبه,۱۶ بهمن ماه ۱۳۹۰مطابق با
١٣ ربيع الاول ۱۴۳۳هجرى قمرى

1st
FEB
Mercurial & hg view
Posted by admin under Linuxi:
Install on Ubuntu and Debian: sudo apt-get install mercurial
hg view How?
You try the ‘hg view’ command and you will get an error:
sudo apt-get install mercurial
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial
wget http://www.selenic.com/mercurial/release/mercurial-1.0.tar.gz
tar zxvf mercurial-x.x.tar.gz
cp mercurial-x.x/contrib/hgk /usr/bin
sudo apt-get install tk8.5
put the following in your $HOME/.hgrc
[extensions]
hgk=/usr/local/lib/python2.6/dist-packages/mercurial-1.5.1-py2.6-linux-i686.egg/hgext/hgk.py
[hgk]
path=/your home/bin/hgk
Some Useful Commands:
The actual version information: hg version
Create a new repository in the given directory:hg help init
hg init [-e CMD] [--remotecmd CMD] [DEST]
Making a local copy of a repository: hg clone <directory> or
hg clone ssh://sourceforge.foo:port/removeDirectory
Through history: hg log or hg glog
Viewing specific revisions use the -r (or --rev) option
hg log -r 024584ws345
hg log -r q272e0d5w32 -r 0272e0d5w324
More detailed information add -v (or --verbose) option
To see content of a change add the -p (or --patch) option
e.g. hg log -v -p -l 9 | less
To display the change set: hg tip -vp
pull the changes: hg in, hg pull
update the working copy: hg up (update)
merging the changes
incoming change: hg in -v
outgoing change: hg out -v
hg merge -r default (tip)
The life of a patch
hg qnew -f <file-name> (create a new patch)
hg qimport fileName (import a patch file)
hg qseries -v (listen patches views)
hg qpop (remove the top patch) and hg qpop -a (for unapply all patches)
hg qpush (apply the patch again form the top) and hg qpush -a (apply all patches)
Specify a patch by name:
hg qpop -n <patch name>hg qpush -n <patch name>
hg qren (for rename a patch)
hg qrm <patch name> (remove patch)
hg qrefresh -U -e (check out the latest update of the patches)
hg log -v -r tip (Control)
hg qdiff | less -S
hg qrefresh -X foo (to exclude files matching foo)
Merge the changes from first-patch into second-patch
hg qgoto first-patch # go to first patch
hg qfold second-patch # fold second patch into it
4th
JUN
Check For Email pattern
Posted by admin under Linuxi:
check for email pattern
if( !preg_match( “/^(([^<>()[\]\\\\.,;:\s@\”]+(\.[^<>()[\]\\\\.,;:\s@\”]+)*)|(\”([^\"\\\\\r]|(\\\\[\w\W]))*\”))@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([a-z\-0-9áàäçéèêñóòôöüæøå]+\.)+[a-z]{2,}))$/i”, $email ) ) {
$msg = ‘Email address was not recognized as a valid email pattern’;
}
get the mx host name
if( preg_match( “/@\[[\d.]*\]$/”, $email ) ) {
$mxHost[0] = preg_replace( “/[\w\W]*@\[([\d.]+)\]$/”, “$1″, $email );
$msg = ‘Email address contained IP address ‘.$mxHost[0].’ – no need for MX lookup’;
// get all mx servers – if no MX records, assume domain is MX (SMTP RFC)
$domain = preg_replace( “/^[\w\W]*@([^@]*)$/i”, “$1″, $email );
if( !getmxrr( $domain, $mxHost, $weightings ) ) { $mxHost[0] = $domain;
$msg = ‘Failed to obtain MX records, defaulting to ‘.$domain.’ as specified by SMTP protocol’;
}
28th
JUL
Clean up the Ubuntu
Posted by admin under Linuxi:
Install the Debian menu to make all installed applications
Missing Icons & Fix Broken Icons
sudo apt-get update sudo apt-get install menu menu-xdg update-menus
Keeping Ubuntu clean
Install deborphan with command:
sudo apt-get install deborphan
To delete unnecessary libraries just execute:
sudo deborphan | xargs sudo apt-get -y remove --purge
To delete unnecessary data
packages use command:
sudo deborphan --guess-data | xargs sudo apt-get -y remove --purge
To see all
packages which aren’t required by any others use command
deborphan --guess-all
There is another tool to delete orphaned
packages, it’s GtkOrpha:sudo apt-get install gtkorphan
Once it’s installed go to System –> Administration –> Remove Orphaned
Packages, enter your password and proceed with cleaning up.Another nice tip is to clean partial and orphaned
packages by commands:sudo apt-get autoclean
sudo apt-get autoremove
21st
MAY
increase the screen resolutions
Posted by admin under Linuxi:
Enter in root terminal:
$ sudo dpkg-reconfigure -phigh xserver-xorg
Select your video card by scroll up or down keys on your keyboard) and then hit enter.
the next select the resolutions that you would like to be available for Ubuntu by using the arrow keys to scroll up and down, and the Space Bar to select them.
Restart X by clicking Control+Alt+Delete (backspace). to set up new resolutions.
This starts the Xorg config process.
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo dpkg-reconfigure xserver-xorg
sudo xinit — :2
Look for errors:
tail -f /var/log/Xorg.0.log
Restart all servers by bouncing XDM (or gdm or kdm):
sudo /etc/init.d/xdm start
This starts a new X server — usually on tty8 or tty9 (CTRL-ALT-F8). You can go back to the original X server by pressing CTRL-ALT-F7.
9th
OCT
Java Tips
Posted by admin under Linuxi:
Convert Map to ArrayList:
Map hashmap = new HashMap () ;
hashmap.put ( “one”,new Integer (1) ) ;
hashmap.put ( “two”,null ) ;
hashmap.put ( “three”, new String (“THREE”) ) ;
aList = new ArrayList ( hashmap.values () ) ;
System.out.println ( “The size of HashMap = “+hashmap.size () ) ;
System.out.println ( “If hashmap empty = “+hashmap.isEmpty () ) ;
System.out.println ( “The value for the \”three\” key =”+hashmap.get (“three”) ) ;
hashmap.remove ( “two” ) ;
Set set= hashmap.keySet () ;
Iterator iter = set.iterator () ;
int i=1;
while ( iter.hasNext () ) {
System.out.println ( ” “+i+” ) “+hashmap.get ( iter.next () ) ) ;
i++;
}
OR:
for (Iterator iter = hashmap.keySet().iterator(); iter.hasNext();)
{
KeyType element = (KeyType) iter.next();
ValType value = (ValType)hashmap.get(element);
}
hashmap.clear () ;
Use for-each loop through Map entry set:
Map hashmap = new HashMap () ;
for ( Map.Entry pair : hashmap )
{
System.out.println ( pair.getKey () + ” :: ” + pair.getValue () ) ;
}
Use ArrayList:
ArrayList arraylist = new ArrayList () ;
arraylist.add ( “india”,”", new String(“three”),null,”new Integer (1) ” ) ;
arraylist.add ( new Float (3.5) ) ;
arraylist.add ( 1,dummy ) ;
Add array Elements to the arraylist:
String array [] = { “foo”,”",”tow”,null,”new Integer (1) ” } ;
for ( int i=0;i < array.length;i++ )
{
arraylist.add ( i,array [i] ) ;
}
for ( int i=0;i < arraylist.size () ;i++ )
{
System.out.println ( ” “+ ( i+1 ) +” ) “+arraylist.get ( i ) ) ;
}
System.out.println ( “The size of arraylist =”+arraylist.size () ) ;
System.out.println ( “The arraylist is Empty? =”+arraylist.isEmpty () ) ;
Set the element at position one:
arraylist.set ( 1,”J2EE Programmer” ) ;
Converts arraylist to array:
Object array [] = arraylist.toArray () ;
for ( int i=0;i < array.length;i++ )
{
System.out.println ( ” “+ ( i+1 ) +” ) “+ array [ i ] ) ;
}
String value = “FOO”;
if ( “FOO”.equals(value) ) {
// do something
}
substring in Java
returnString = (xmlString.substring(xmlString.indexOf(“<ns1:queryReference>”) + 20, xmlString.indexOf(“</ns1:queryReference>”)));
10th
SEP
Domain and Whois lookup
Posted by admin under Linuxi:
We can save your money, time, and effort on getting your website up and running.
We work mainly with small sized businesses who would like to use
their website to effectively market their products and services.
With our high level of experience with developing PHP/MySQL applications
we can develop any type of web based application that you can think of.
We can do also develop any of the following types of websites:
E-Commerce Secure Shopping Cart
CUSTOMER SUPPORT:
Support Ticket Systems
Product Catalogues
PORTAL SYSTEMS
IMAGE GALLERIES
Discussion/Message Boards & Blogs
CONTENT MANAGEMENT:
Joomla Installations
Wordpress Installations and more…
Do contact us for a discussion of your requirements.
Content Management |
Image Galleries |
|
Joomla Mambo php-Nuke Drupal PHP-Fusion e107 phpWebsite |
Gallery2 Coppermine SimpleViewer Plogger ZenPhoto Singapore IPG |
Weblogs |
Discussion Boards |
|
WordPress b2evolution |
php-BB SMF Phorum |
E-Commerce |
Chat |
|
ZenCart osCommerce CubeCart |
phpOpenChat phpMyChat Phorum |
Groupware |
|
|
RoundCube IlohaMail |
WebCalendar dotProject ExtCalendar netOffice php-Projekt |
هر کجای دنیا نصب هرگونه برنامه آماده روی سایت شما از قبيل:
تالار گفتگو PHPBBوبلاگ Word Press
سیستم مدیریت (CMS) فارسی جمله Joomlaسیستم مدیریت (CMS) فارسی مامبو Mambo Oscommerce, ZenCart ارائه كاملترين فروشگاه اينترنتي
Nukeطراحي و توسعه سيستمهاي مخصوص مديريت ارتباط با مشتريان (Customer Relationship Management System)
طراحي و توسعه برنامه هاي كاربردي تحت ويندوز مبتني بر بانك اطلاعاتي Ms SQL
خدمات طراحي آرم ، لوگو ، بروشور ، كارتالوگ
ارائه راهكارهاي تجارت الكترونيك (E-Commerce)
ارائه راهكارهاي مولتي مديا (Multi Media Soltions)
طراحي و توسعه بانكهاي اطلاعاتي تحت وب
ثبت وب سایت در موتورهای جستجو گوگل، یاهو
برای کسب اطلاعات بیشترمی توانید با ای میل host@forgani.com تماس حاصل نمایید.
سرویس مناسب برای اشخاص و موسسات کوچک
وب سايت حرفه اي همراه با آخرين تكنولوژي طراحي صفحات وب
مناسب برای شرکتهای کوچک و متوسط
طراحي وثبت سايت از ما-پيشنهاد قيمت ازشما
3rd
AUG
Linux Tips
Posted by admin under Linuxi:
The best ways to run all files from a folder in SqlPLus
Create a file and store all of the file names from the folder:
ls -l > list.sql
Edit and set @ before each file name
vi list.sql
1,$s/^/@/
sqlpus ich/foo@mydb
@list.sql
Convert latin1 to UTF-8 in MySQL
$ mysqldump -h localhost –user=myName -p –default-character-set=latin1 -c \
–insert-ignore –skip-set-charset dbname > dump.sql
$ iconv -f ISO-8859-1 -t UTF-8 dump.sql > dump_utf8.sql
Find out which charset is my file
$ iconv -f 8859-1 -t utf-8 FILE1> FILE2
$ iconv -f utf-8 -t 8859-1 FILE2 > FILE3
$ diff FILE1 FILE3
apt-get –purge remove NameOfPackage
apt-get install –reinstall NameOfPackage
z.B:
apt-get –purge –reinstall install apache2.2-common apache2
apt-get install –reinstall libapache2-mod-php5 php5-cli php5-common php5-cgi
dpkg-reconfigure xserver-xorg
update-alternative -config x-session-manager
lpstat -t
cancel
lpadmin -p lj -E
PSI=’\u@\h:\n$’
wget -c –user=user –password=passwd http://hostname…
find -name ‘*.[ch]‘ | xargs grep -E ‘expr’
find -type f -print0 | xargs -r0 grep -F ‘example’
find . -exec grep “use GD” ‘{}’ /dev/null \; -print
find . -name “*.pl” -type f -exec grep “use GD” ‘{}’ /dev/null \; -print
Only get diffs. Do multiple times for troublesome downloads:
rsync -P rsync://rsync.server.com/path/to/file file
24th
NOV
ISP Hardware list
Posted by admin under Linuxi:
سخت افزار هاى لازم
![]() |
واما سخت افزار هاى كه براى ساختن ISP در سطر اول قرار دارند. معمولا بيشتر استفاده كننده ها براى ورود به اينترنت از modem استفاده ميكنند. براى جواب دادن تلفنها ISP قاعدتا به يك RAS - remote access server احتياج دارد. RAS يك قوطى است كه يك سرش به خط تلفن T1/E1 or PRI كه از شركت مخابرات آمده وصل ميشود و سمت ديگر آن به Ehternet switch كار RAS جواب دادن تلفنها و به عبارتى برداشتن گوشى تلفن است . سخت افزار بعدى يك router است كه براى ISP هاى كوچك معمولا يك cisco 2501 كافى است. كار اصلى router وصل شبكه ISP به upstream provider است كه هيچ چيزى نيست غير از يك ISP ديگر upstream provider در حقيقت يك subnet of IP ادرس معمولا ۲۵۶به ما ميدهد. بعدا احتياج به يك CSU/DSU يا NTU داريم كه router را به خط T1/E1 ياDSL وصل كند.
|
طرزكار ورود به اينترنت |
|
|
بعد از اينكه كامپيوتر استفاده كننده از طريق modem شماره تلفن ISP را ميگيرد مخابرات تلفن را از روى خط (T1 line) ميگيرد و به RAS ما وصل ميكند. يك خط T1 ميتونه ۲۸ تلفن مختلف را همزمان دريافت كند. Terminal-Server همان (RAS ) جواب تلفن را ميدهد و يك ارتباط PPP برقرار ميشود و بدين ترتيب كه اول از سرعت بالا۵۶۰۰۰ كيلو بيت اگر نشد با سرعت كمتر ارتبات را نگه ميداره و از طريق PPP بعد از اينكه نام و پاسپورت را دريافت كرد از Radius-Server صحت انرا سوال ميكند و در صورت درست بودن اتوماتيك يك آدرس IP به فرستنده ميدهد و بدين وسيله كامپيو تر به شبكه سرتاسرى اينترنت وصل ميشود. |
![]() |
|
بخاطر مخارج زياد و مشكل بودن راه اندازى (configuration) و گران بودن سخت افزار كمتر ISP حاضر است خط مستقيم (Standleitung) با يك Backbone-Provider داشته باشد. |
|
24th
ISP Software List
Posted by admin under Linuxi:
ليست نرم افزارهاى كه براى اين منظور انتخاب كرده ام
اول از همه براى Operating system بابا Linux را انتخاب مى كنيم. كاملا واضح است ولي براى كسانى كه به ويندوز وفادار هستند ميتوانند از پرگرام cygwin استفاده كرده و ان را بر روى ويندوز خود سوار كنند. و براى ذخيره اطلاعات از LDAP. بخاطر اينكه مفتكى است و در ضمن بقيه نرم افزارهاى انتخاب شده را ميتوان راحت سوار كرد و همگى قادر هستند به راحتى بروى ان بنويسند و بخوانند. (LDAP هيچ جيز نيست غير از يك directory كه ميتواند تمام اطلاعات استفاده كننده را ععم از نام و نشانه و پاسپورتها و غيره ذالك در خود ذخيره كند.)
![]() |
![]() |
![]() |
![]() |
|
24th
NOV
Internet protocols
Posted by admin under Linuxi:
پروتكل
پروتوكل يك قاده مشخص شده براى جانجايى اطلاعات بين دو نقطه درشبكهاى كامپيوترى است. پروتوكل بستگى به فرم انتقال كننده ععم از اينكه فيبر شيشه ايى يا راديو يا كابل باشد و همچنين به اينكه شبكها از چه تشكيل شده انند و فرم شبكه و غيره ندارد
دوتا تيپ پروتكل وجود دارد
Verbindungsorintiert قبل از جابجايى اطلاعات يك خط تماس دو نقطه برقرار ميشود -
Here is a list of the protocols that make up the TCP/IP Internet Protocol suite.
|
![]() |
Archives:
- Mercurial & hg view
- jPortal wordpress theme
- WordPress Careers plugin
- Check For Email pattern
- WordPress ODLinks Plugin
- WordPress Classifieds Plugin
- Clean up the Ubuntu
- Persian philosophs and sciences
Linux
- » Internet Service Provider (ISP)
- » Clean up the Ubuntu
- » Domain and Whois lookup
- » Linux Tips
- » Java Tips
- » Mercurial & hg view
- » ISP Hardware list
- » increase the screen resolutions
- » ISP Software List
- » Check For Email pattern
Categories:
Links
- (IE)HTML - اديتور به فارسي و لاتين
- Online Graphic Plotter
- Online scientific calculator
- تقويم ساليانه
- تبديل کُدهای رايج
- تبدیل تاریخ شمسی به میلادی
- فارسی نويس
- تبديل خط فينگليش به فارسى













