- 
        
        
                +75.3         
                            - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
 public static ru.project.subpackage.PersonDTO convertOshPersonDtoToPersonDto(OshPersonDTO person){
        ru.project.subpackage.PersonDTO dto = new ru.project.subpackage.PersonDTO();
        dto.setPersonid(person.getPersonid().longValue());
        dto.setNamelast(person.getNamelast());
        dto.setNamefirst            (person.getNamefirst            ());
        dto.setNamesec              (person.getNamesec              ());
        dto.setInitials             (person.getInitials             ());
        dto.setSex                  (convertSkVocValue(person.getSex()));
        dto.setReason               (person.getReason               ());
        dto.setWorkphone            (person.getWorkphone            ());
        dto.setWorkphonedigit       (person.getWorkphonedigit       ());
        dto.setLocalphone           (person.getLocalphone           ());
        dto.setLocalphonedigit      (person.getLocalphonedigit      ());
        dto.setHomephone            (person.getHomephone            ());
        dto.setHomephonedigit       (person.getHomephonedigit       ());
        dto.setMobilephone          (person.getMobilephone          ());
        dto.setMobilephonedigit     (person.getMobilephonedigit     ());
        dto.setFax                  (person.getFax                  ());
        dto.setFaxdigit             (person.getFaxdigit             ());
        dto.setPager                (person.getPager                ());
        dto.setEmail                (person.getEmail                ());
        dto.setWeb                  (person.getWeb                  ());
        dto.setNamelastdative       (person.getNamelastdative       ());
        dto.setNamefirstdative      (person.getNamefirstdative      ());
        dto.setNamesecdative        (person.getNamesecdative        ());
        dto.setNamelastaccusative   (person.getNamelastaccusative   ());
        dto.setNamefirstaccusative  (person.getNamefirstaccusative  ());
        dto.setNamesecaccusative    (person.getNamesecaccusative    ());
        dto.setNamelastgenitive     (person.getNamelastgenitive     ());
        dto.setNamefirstgenitive    (person.getNamefirstgenitive    ());
        dto.setNamesecgenitive      (person.getNamesecgenitive      ());
        dto.setNamelastinstrumental (person.getNamelastinstrumental ());
        dto.setNamefirstinstrumental(person.getNamefirstinstrumental());
        dto.setNamesecinstrumental  (person.getNamesecinstrumental  ());
        dto.setNamelastprepositional(person.getNamelastprepositional());
        dto.setNamefirstprepositional(person.getNamefirstprepositional());
        dto.setNamesecprepositional (person.getNamesecprepositional ());
        return dto;
    }
 
 
            И так далее еще несколько сотен строк. А главное переупаковка из одних объектов в другие и обратно бессмысленна, т.к. можно использовать исходные (они доступны в приложении)
         
             johnsoft,
            07 Сентября 2009 johnsoft,
            07 Сентября 2009
 
- 
        
        
                +82.7         
                            - 1
- 2
- 3
- 4
 public static boolean isUnix()
    {
        return System.getProperty("file.separator").equals("/");
    }
 
 
            
         
             johnsoft,
            07 Сентября 2009 johnsoft,
            07 Сентября 2009
 
- 
        
        
                +71.3         
                            - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
 /**
     * Возбуждает IllegalArgumentException если аргумент null.
     * Формирует сообщение об ошибке с именем условия.
     *
     * @param argument     проверяемый аргумент
     * @param argumentName имя аргумента
     */
    public static void ensureNotNull(Object argument, String argumentName) {
        if (argument == null) {
            throw new IllegalArgumentException("Null '" + argumentName + "' not allowed.");
        }
    }
 
 
            
         
             johnsoft,
            07 Сентября 2009 johnsoft,
            07 Сентября 2009
 
- 
        
        
                +83.9         
                            - 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
 /**
     * проебразует объект <code>o</code> в объект
     *
     * @param o объект
     * @return объект со значением <code>o</code>
     */
    public static Object toObject(Object o) {
        return o;
    }
 
 
            Полное отсутствие знаний основ java
         
             johnsoft,
            07 Сентября 2009 johnsoft,
            07 Сентября 2009
 
- 
        
        
                +190.4         
                            - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
 // register.php
// ...
$login = $_POST["login"];
   
// some checks...
   
$sql = "CREATE TABLE `$login` (
        `city` TINYINT UNSIGNED NOT NULL ,
        // other fields here...
        );";
 
 
            Из модуля регистрации в системе удаленного ввода данных через web. После сохранения информации о новом пользователе для него создается новая таблица для хранения вводимых данных... 
 
 Больше слов нет...
 
             Andrey_Beletsky,
            07 Сентября 2009 Andrey_Beletsky,
            07 Сентября 2009
 
- 
        
        
                +127         
                            - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
 /// <summary>
    ///  Retrieve currency rates from an external site to be sure they are up to date.
    /// In this case just checking the one currency (Australian Dollar) so no need to dynamically parse the site.
    /// </summary>
    /// <returns>currency rates or msg indicating an error</returns>
    private String getCurrencyRates()
    {
        string strURL = @"http://www.x-rates.com/d/JPY/table.html";
        HttpWebRequest txtRequest = (HttpWebRequest)WebRequest.Create(strURL);
        txtRequest.Method = "GET";
        txtRequest.ContentType = "application/x-www-form-urlencoded";
        string response;
        using (StreamReader streamReader = new StreamReader(txtRequest.GetResponse().GetResponseStream()))
        {
            response = streamReader.ReadToEnd();
            if (response.IndexOf("Australian Dollar") > 0)
            {
                //parse the returned page for the two values of the currency rate based on the existing design
                int ind_jpy = (response.IndexOf("/d/AUD/JPY/graph120.html") + 39);
                int ind_aud = (response.IndexOf("/d/JPY/AUD/graph120.html") + 39);
                String jpy_aud = response.Substring(ind_jpy, (response.IndexOf("</a>",ind_jpy) - ind_jpy) );
                String aud_jpy = response.Substring(ind_aud, (response.IndexOf("</a>", ind_aud) - ind_aud));
                Session["curr_rate"] = "set";
                Session["JPY"] = jpy_aud;
                Session["AUD"] = aud_jpy;
                return aud_jpy + " / " + jpy_aud;
            }
            //else present msg to user that unable to obtain currency rates
        }
        return "";
    }
 
 
            Еще один кандидат
         
             OlgaWolga,
            07 Сентября 2009 OlgaWolga,
            07 Сентября 2009
 
- 
        
        
                +135.2         
                            - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
 public string GetDollarKurs(string input)
{
    string dol = "[.\\s]*<img height=\"11\" alt=\"Доллар США\" hspace=\"2\" src=\"/images/icon_dollar.gif\" width=\"11\" align=\"left\" vspace=\"2\" border=\"0\">Доллар \r\n\t\t\tСША</td>\r\n\t\t<td></td>\r\n\t\t<td class=\"digit\" align=\"right\">[\\s]*\\d+\\,\\d+[.\\s]*";
    MatchCollection Matches = Regex.Matches(input, dol);
    if (Matches.Count == 1)
    {
        string res = Matches[0].Value;
        res = res.Trim();
        res = res.Substring(res.LastIndexOf('>') + 1);
        return res;
    }
    else
        return "";
}
 
 
            Функция для получения курса доллара, в input подаётся хтмл главной страницы сайта cbr.ru и парсится.
 А web-сервисы пусть кто-нибудь другой изучает... :o)
 
             Ordos,
            06 Сентября 2009 Ordos,
            06 Сентября 2009
 
- 
        
        
                +149.8         
                            - 1
- 2
- 3
- 4
 //простите меня за эти строки, но просто альтернативный метод swapNode (нативный только в IE)
//удаляет оригинальный нод и его приходится заново по id искать :(
document.getElementById(element['drag'].id).style.border = "2px solid gray";
document.getElementById(element['acce'].id).style.border = "2px solid gray";
 
 
            :))))
 каммент жжот
 
 мой старый JS-быдлокод
 
             danilissimus,
            06 Сентября 2009 danilissimus,
            06 Сентября 2009
 
- 
        
        
                +158.5         
                            - 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
 $query = mysql_query("SELECT w_id,title FROM bhost_weblogs
                                     WHERE owner='".$user_info['username']."'");
while($blog = mysql_fetch_assoc($query))
{
    $stat = mysql_query("SELECT * FROM stat WHERE blog='".$blog['w_id']."' AND user!='' AND
                                      datestamp>='$d2' ORDER BY datestamp DESC");
    $all_users = mysql_result(mysql_query("SELECT Count(blog) FROM stat
                                       WHERE blog='".$blog['w_id']."' AND datestamp>='$d2'"),0);
    $reg_users = mysql_result(mysql_query("SELECT Count(blog) FROM stat
                                       WHERE blog='".$blog['w_id']."' AND user!='' AND datestamp>='$d2'"),0);
     $unreg_users = mysql_result(mysql_query("SELECT Count(blog) FROM stat
                                        WHERE blog='".$blog['w_id']."' AND user='' AND datestamp>='$d2'"),0);
     echo "<center>Всего: $all_users<br />
     Зарегистрированных пользователей: $reg_users<br />
     Незарегистрированных пользователей: $unreg_users</center>";
     echo "<table  cellpadding='0' cellspacing='0' align='center' class='form'>";
     while($statd = mysql_fetch_assoc($stat))
     {
     echo ...;
     }
     echo "</table><br /><br />";
}
 
 
            Очень правильная работа с базой, подумаешь пара лишних запросов.
         
             BabyWolf,
            06 Сентября 2009 BabyWolf,
            06 Сентября 2009
 
- 
        
        
                +140.4         
                            - 1
- 2
- 3
- 4
 Почему нет раздела по BrainFuck'у? )))
Почему нет раздела по BrainFuck'у? )))
Почему нет раздела по BrainFuck'у? )))
Почему нет раздела по BrainFuck'у? )))
 
 
            Почему нет раздела по BrainFuck'у? )))
         
             Tanger,
            06 Сентября 2009 Tanger,
            06 Сентября 2009