- 1
- 2
- 3
- 4
- 5
https://madnight.github.io/githut/#/pull_requests/2018/2
Python, Ruby, C++, Java и Go популярнее чем PHP.
PHP не нужен
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−1
https://madnight.github.io/githut/#/pull_requests/2018/2
Python, Ruby, C++, Java и Go популярнее чем PHP.
PHP не нужен
0
https://news.mail.ru/video/574647/
В Камеруне произошел самый массовый побег из тюрьмы за последние годы.
Около 160-ти заключенных сбежали из тюрьмы на северо-западе. Они прорвались
через главные ворота, после чего подожгли здание. По предварительным данным,
преступникам помогала вооруженная группа. Сейчас беглецов ищут.
Мне страшно...
0
In 2011, a woman in Georgia pierced a fiber backbone line with a shovel and left the neighboring country of Armenia without Internet access for 12 hours (с) Wikipedia
Давайте что-нить ругать
0
document.querySelector('.button').onmousemove = function (e) {
var x = e.pageX - e.target.offsetLeft;
var y = e.pageY - e.target.offsetTop;
e.target.style.setProperty('--x', x + 'px');
e.target.style.setProperty('--y', y + 'px');
};
−2
<?php
namespace app\forms;
use std, gui, framework, app;
use action\Element;
class Progress extends AbstractForm
{
/**
* @event progressBar.step
*/
function doProgressBarStep(UXEvent $e = null)
{
// Generated
$e = $event ?: $e; // legacy code from 16 rc-2
Element::appendValue($this->progressBar, 1.0);
}
/**
* @event construct
*/
function doConstruct(UXEvent $e = null)
{
}
}
Почему же ползунок не лезет? Взято из девелнекста (develnext).
+1
let suffix = '';
if (search) {
if (filters.length) {
suffix = ' found:';
} else {
suffix = ' found';
}
} else {
if (filters.length) {
suffix = ' found:';
}
}
Когда не уверен, нужно двоеточие или нет.
0
Какие есть пасхальные яйца в "PHP"?
Вроде "import this" или "from __future__ import braces" в "Python",
или "long long long is too long for GCC" в "GCC".
+1
// NextViewController.swift
override func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {
NSUserDefaults.standardUserDefaults().setInteger(indexPath.row, forKey: "Selected offense")
let offense: NSDictionary = self.offenses.objectAtIndex(indexPath.row) as NSDictionary
let id: Int = offense.objectForKey("id") as Int
let title: String = offense.objectForKey("title") as String
NSUserDefaults.standardUserDefaults().setInteger(id, forKey: "Selected offense id")
NSUserDefaults.standardUserDefaults().setObject(title, forKey: "Selected offense title")
}
// PreviousViewController.swift
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
hideKeyboard()
tableView.reloadData()
}
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
let kCellIndetifier: String = "NewOffenseCell"
var cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier(kCellIndetifier, forIndexPath: indexPath) as UITableViewCell
if cell == nil {
cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: kCellIndetifier)
}
cell.text = NSUserDefaults.standardUserDefaults().stringForKey("Selected offense title")
cell.font = UIFont.systemFontOfSize(20)
return cell
}
Реализуем колбэки *лицорука*
0
func createCrossForRemovingImage() {
var firstCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
firstCrossView.layer.cornerRadius = 15
firstCrossView.image = UIImage(named: "Cross")
firstCrossView.tag = 200
firstCrossView.userInteractionEnabled = true
firstCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
firstCrossView.hidden = true
var secondCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
secondCrossView.layer.cornerRadius = 15
secondCrossView.image = UIImage(named: "Cross")
secondCrossView.tag = 200
secondCrossView.userInteractionEnabled = true
secondCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
secondCrossView.hidden = true
var thirdCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
thirdCrossView.layer.cornerRadius = 15
thirdCrossView.image = UIImage(named: "Cross")
thirdCrossView.tag = 200
thirdCrossView.userInteractionEnabled = true
thirdCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
thirdCrossView.hidden = true
var fourthCrossView: UIImageView = UIImageView(frame: CGRectMake(90, -10, 30, 30))
fourthCrossView.layer.cornerRadius = 15
fourthCrossView.image = UIImage(named: "Cross")
fourthCrossView.tag = 200
fourthCrossView.userInteractionEnabled = true
fourthCrossView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "removeImage:"))
fourthCrossView.hidden = true
firstImageView.addSubview(firstCrossView)
secondImageView.addSubview(secondCrossView)
thirdImageView.addSubview(thirdCrossView)
fourthImageView.addSubview(fourthCrossView)
}
Когда-то я это написал Оо
0
https://hi-tech.mail.ru/news/bezdomnyj-programmist-potryas-internet-i-nashel-sebe-rabotu/
https://htstatic.imgsmail.ru/pic_image/57220a54bde3086383d8e92babd58464/840/1120/1267156/
1. Как бы "знает" все языки программирования, все фреймворки и все операционные системы;
2. Гордится опытом интеграции "MailChimp" и установки SSL-сертификата от "Let'sEncrypt", выставляя это на первое место.