This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def is_valid_sequence(sequence): | |
| for character in sequence: | |
| if character not in "ACTG": | |
| return False | |
| return True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| is_valid_sequence = lambda x:all(character in "ACTG" for character in x) | |
| >>> is_valid_sequence("ACTG") | |
| True | |
| >>> is_valid_sequence("ACTGAAA") | |
| True | |
| >>> is_valid_sequence("ACTGa") | |
| False | |
| >>> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myString = "0h 1m 40s", | |
| matches = myString.match(/(\d+)h (\d+)m (\d+)s/), | |
| hours = matches[1], | |
| mins = matches[2], | |
| secs = matches[3]; | |
| console.debug(hours, mins, secs); | |
| console.debug(matches); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /********************************************************************************* | |
| * SugarCRM Community Edition is a customer relationship management program developed by | |
| * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc. | |
| * | |
| * This program is free software; you can redistribute it and/or modify it under | |
| * the terms of the GNU Affero General Public License version 3 as published by the | |
| * Free Software Foundation with the addition of the following permission added | |
| * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK | |
| * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <VirtualHost *:80> | |
| ServerName sugarcrm.localhost | |
| DocumentRoot "/srv/www/htdocs/sugarcrm/" | |
| ErrorLog /var/log/apache2/errors/sugarcrm.log | |
| CustomLog /var/log/apache2/access/sugarcrm.log combined | |
| <Directory "/srv/www/htdocs/sugarcrm/"> | |
| # Options Indexes +FollowSymLinks -SymLinksIfOwnerMatch | |
| Options All | |
| AllowOverride None | |
| Order allow,deny |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fictive chaouche # ls /srv/www/htdocs/ | |
| total 20K | |
| drwxr-xr-x 2 wwwrun www 4.0K Jan 15 2012 gif | |
| -rw-r--r-- 1 wwwrun www 6 Feb 9 2012 index.html | |
| -rw-r--r-- 1 wwwrun www 2.4K Oct 22 2011 info2html.css | |
| drwxr-xr-x 6 root root 4.0K Nov 6 10:16 phpMyAdmin | |
| lrwxrwxrwx 1 wwwrun www 52 Nov 8 14:12 sugarcrm -> /home/chaouche/DOWNLOADS/WEBAPPS/SugarCE-Full-6.5.7/ | |
| drwxr-xr-x 7 wwwrun www 4.0K Feb 9 2012 wiki | |
| fictive chaouche # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fictive chaouche # ls /srv/www/htdocs/sugarcrm/ | |
| total 984K | |
| -rw-r--r-- 1 wwwrun www 2.5K Oct 25 19:22 acceptDecline.php | |
| drwxr-xr-x 10 wwwrun www 4.0K Oct 25 19:22 cache | |
| -rw-r--r-- 1 wwwrun www 3.4K Oct 25 19:22 campaign_tracker.php | |
| -rw-r--r-- 1 wwwrun www 2.5K Oct 25 19:22 campaign_trackerv2.php | |
| -rw-r--r-- 1 wwwrun www 0 Oct 25 19:22 config_override.php | |
| -rw-r--r-- 1 wwwrun www 0 Oct 25 19:22 config.php | |
| [...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fictive chaouche # namei -m /srv/www/htdocs/sugarcrm/ | |
| f: /srv/www/htdocs/sugarcrm/ | |
| drwxr-xr-x / | |
| drwxr-xr-x srv | |
| drwxr-xr-x www | |
| drwxr-xr-x htdocs | |
| lrwxrwxrwx sugarcrm -> /home/chaouche/DOWNLOADS/WEBAPPS/SugarCE-Full-6.5.7/ | |
| drwxr-xr-x / | |
| drwxr-xr-x home | |
| drwxr-xr-x chaouche |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /srv/www/htdocs/sugarcrm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT contacts.first_name, contacts.last_name, email_addresses.email_address | |
| FROM | |
| contacts | |
| INNER JOIN email_addr_bean_rel | |
| ON contacts.id = email_addr_bean_rel.bean_id | |
| INNER JOIN email_addresses | |
| ON email_addresses.id = email_addr_bean_rel.email_address_id | |
| WHERE email_addresses.email_address = '[email protected]' |