Sly32

Рейтинг
389
Регистрация
29.03.2012
Должность
Software engineer
Sitealert:
This line, I immediately will form the desired list. And you will not need any grimaces and jumps.

There is a condition of the problem, there is the original data - your answer is never fit them. I do not see the code that can run and see how it fulfills

---------- Posted 13.06.2020 at 15:24 ----------

Danforth:
Sly32, re-read it, I wrote above, you did not JSON

Yes, not the JSON, it IterableObject, tried universally simplified. The original data can be viewed as a list of json-s, to simplify and resolve on this basis, that would not be tied to the concepts of Python

danforth:
Ты меня спрашиваешь?) ответ можно как угодно формировать.

вопрос в конце - лишний. Понятно что можно, но хотелось бы чтоб на выходе был нужный мне списиок джейсонов


2009/11/10 23:00:00 {0 clip }
2009/11/10 23:00:00 {4 promo}
2009/11/10 23:00:00 {3 start }
2009/11/10 23:00:00 {3 video }
2009/11/10 23:00:00 {3 anime }
2009/11/10 23:00:00 {4 clip }
Danforth:
You're asking me?), The answer can be arbitrarily to form.

question at the end - once. It is clear that it is possible, but it would be desirable that the output was correct me spisiok Jason


2009/11/10 23:00:00 clip} {0
2009/11/10 23:00:00 {4 promo}
2009/11/10 23:00:00 {3 start}
2009/11/10 23:00:00 video} {3
2009/11/10 23:00:00 {3 anime}
2009/11/10 23:00:00 clip} {4
tommy-gung:
пользоваться будет один - твое приложение. больше никому твой код не нужен

Есть очень хороший совет - если нечего сказать, то лучше промолчать, за умного сойдешь,

tommy-gung:
на первом курсе института задачи интереснее

справься хотя бы с этой

Пока от пхпэшников ни одного решения...

tommy-gung:
will use one - your application. anyone else your code does not need

There are some very good advice - if you have nothing to say, it is better to keep silent, for thou shalt smart,

tommy-gung:
in the first year student of the problem more interesting

to cope even with this

While on phpeshnikov no solutions ...

danforth:
Можно ещё пару способов, этот один из самых производительных.

А ответ там просто сформатирован так? мне нужно чтобы формат данных не поменялся?

---------- Добавлено 13.06.2020 в 15:13 ----------

Sitealert:
Я выиграл олимпиаду.

как ты этой строкой планируешь обработать исходные данные в виде списка json-ов?

Danforth:
Can be a couple of ways, this is one of the most productive.

And the answer is there simply formatted so? I need to format the data is not changed?

---------- Posted 13.06.2020 at 15:13 ----------

Sitealert:
I won the Olympics.

how you plan to handle this string of the original data as a json-s list?

danforth:
И что, база не умеет в stdout писать? Задачи уровня не то что джуна, а джуна джунов.

а смысл? Естественно, задачка простенькая, не для сеньоров)

Ну и получиться, что много лишних действий - получить обьект из базы - создать обьект вывода, грепнуть его, преобразовав при этом формат, потом вернуться в поток выполнения и отдать в респонс для формирования json/html...

За твой вариант- спасибо. Если еще приведешь пример на го - будет совсем здорово

---------- Добавлено 13.06.2020 в 13:33 ----------

Sitealert, SeVlad, Хотелось бы увидеть ваше решение ) Можно в виде плагина)

Ну серьезно, давайте просто разомнем мозг, без срача)

Danforth:
And, the base is not able to write to stdout? level task is not something that June, and Juneau.

and the meaning? Of course, the task of unpretentious, not for seniors)

Well, it happened that a lot of extra activities - get object from the database - to create object output grepnut it, while converting the format, then return to a thread of execution, and to give in to form a responsum json / html ...

For your option, thank you. If bringest another example of the first - will be quite cool

---------- Posted 13.06.2020 at 13:33 ----------

Sitealert, SeVlad, I would like to see your decision) is possible in the form of plug-in)

Well, seriously, let's just stretch our brains, without sracha)

danforth:
grep -vP "media_category': '(promo|xxx)'" file.txt

Я писал выше - мне приходит итерируемый обьект из базы в бэке, греп тут не совсем то что надо

как это будет выглядеть на го, лучше приведи пример

---------- Добавлено 13.06.2020 в 13:10 ----------

Sitealert:
Потому что это твоё любимое занятие на Сёрче.

Слушай, ну я попытался предложить на выхи более интересное, чем просто срач и мерянье. скрипт - прямое отношение к веб-строительству, будет использоваться на серьезном ресурсе, мне казалось это будет интереснее, чем очередное тыканье в Арбнета)))

---------- Добавлено 13.06.2020 в 13:11 ----------

Sitealert:
Сообщение от Sly32
Если кому надоело ставить плагины

Да - предложил отвлечься и напрячь мозг - что в этом плохого?

Всего: 8125