TEIA.RU
Зеленый хостинг ТЭИА

Uptolike

LTCBTC - Bitfinex

Криптоновости

Feed aggregator

2008-01-13 23:48:09

FREESOURCE - Wed, 05/11/2022 - 13:18
Сравнение версий /Free Source за 2008-01-13 23:48:09 и 2008-01-14 01:58:01

Добавлено:
(см. также http://search.altlinux.ru)
Удалено:
(см. также http://wiki.sisyphus.ru и http://search.altlinux.ru)
Categories: Open News

2007-04-21 15:00:58

FREESOURCE - Wed, 05/11/2022 - 13:18
Сравнение версий /Free Source за 2007-04-21 15:00:58 и 2007-04-21 15:04:34

Добавлено:
Проект постоянно находится в разработке – я буду рад любым вашим комментариям, дополнениям, возражениям, обсуждениям, а также
финансовой поддержке развития этого сайта.
Удалено:
Проект постоянно находится в разработке – я буду рад любым вашим комментариям, дополнениям, возражениям, обсуждениям, и.т.д. ;-)
Внимание Сайт нуждается в вашей поддержке, пожалуйста, поддержите развитие этого сайта.
Categories: Open News

2007-04-20 17:53:35

FREESOURCE - Wed, 05/11/2022 - 13:18
Сравнение версий /Free Source за 2007-04-20 17:53:35 и 2007-04-21 15:00:58

Удалено:
Внимание сайт попал под бот атаку. Прошу соблюдать спокойствие, однако не рекомендую вносить какие-либо изменения на страницах — скорее всего сразу после того как атака будет прекращена или мы от нее защитимся будет откат базы.
Categories: Open News

How can file descriptors be misused?

feedspot - Wed, 05/11/2022 - 13:08

like double closing an fd, passing an already closed fd to a function that takes an fd etc

I am trying to explore different scenarios that a static analyzer should consider while analyzing code that uses file descriptor APIs

consider the following code:

int fd = open("file", O_RDWR):

close(fd);

close(fd);

Here the static analyzer would warn that the fd is being closed twice.

Thank you.

submitted by /u/immadmir
[visit reddit] [comments]
Categories: World News

Comparing 'old' values in hook_user_update

feedspot - Wed, 05/11/2022 - 12:55

I've got a function which is running on hook_ENTITY_TYPE_update for the user account, but I want to be able to compare against previous values that may have been on the user account, eg see if the user has changed their email address and be able to react to it.

I can see that if I run the debug on the $entity value that is part of the function that there is an 'original' item within the values array, is that the only way to retrieve the pre-edited data?

Categories: World News

How to custom access for entity paragraphs_type?

feedspot - Wed, 05/11/2022 - 12:55

I have a problem with entity paragraphs_type, when I add a paragraphs_type in a node, with paragraph items inside, and I set it unpublish status, anonymous users can still see it. I try to custom access by different way :

/** * Implements hook_ENTITY_TYPE_access(). * ENTITY_TYPE : paragraphs_type */ function my_module_paragraphs_type_access( Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account ) { echo '<pre>'; var_dump('my_module_paragraphs_type_access'); var_dump($operation); var_dump($account); exit(); //Hide paragraph for anonymous users if is not published if ($operation == 'view' && !$entity->isPublished() && ($account->isAnonymous() || !$account->hasPermission('view unpublished paragraphs')) ) { return \Drupal\Core\Access\AccessResult::forbidden(); } return \Drupal\Core\Access\AccessResult::allowed(); }

It's not work, var_dump('my_module_paragraphs_type_access'); it's never executed

Or a custom class that extends ParagraphsTypeAccessControlHandler :

<?php use Drupal\Core\Access\AccessResult; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Session\AccountInterface; use Drupal\paragraphs\ParagraphsTypeAccessControlHandler; /* * Add custom paragraphs_type access */ class CustomParagraphsTypeAccessControlHandler extends ParagraphsTypeAccessControlHandler { /** * {@inheritdoc} */ protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) { switch ($operation) { case 'view unpublished paragraphs': if($account->isAnonymous()) return AccessResult::forbidden(); break; case 'view label': return AccessResult::allowedIfHasPermission($account, 'access content'); default: return parent::checkAccess($entity, $operation, $account); } } }

but still the same... Another plan to hide them to anonymous users ?

I found an this issue :https://www.drupal.org/project/paragraphs/issues/3095959#comment-13363535

Categories: World News

How can i get the fields of a view which has contextual filter inside views_view_field hook in drupal 9?

feedspot - Wed, 05/11/2022 - 12:55

I have a drupal 9 site. I have a parent view A and a child view B. I am using views_field_view contrib module in order to pass an id from view A to view B. I have added a contextual filter in B to get this id from A. I want to fetch this id in my views_view_field hook and do some modifications based on the id fetched. But i am not able to get inside the view B in my views_view_field hook. If i remove the contextual filter from view B, then i am able to go inside the view in my code. But i need that id from the filter, I can't remove that because all the modifications are happening based on that id only.

Here is my code:

function mymodule_preprocess_views_view_field(&$variables){ $view = $variables['view']; if($view->storage->id() == 'B'){ //print something } }

But when i go to the path of view B, it prints nothing. Can anyone please help how to resolve this issue?

Categories: World News

Use HTTP_REFERER within a twig template

feedspot - Wed, 05/11/2022 - 12:55

I have a FAQ page with five nested bootstrap 5 accordions and I need to have one accordion item or another open depending on the page the user is coming from.

I tried using this:

{% set previousURL = app.request.headers.get('referer') %}

but I get nothing.

Using Drupal 9.

Categories: World News

How to convert hook_entity_property_info_alter in Drupal 8 or 9? [duplicate]

feedspot - Wed, 05/11/2022 - 12:55

I am trying to convert Drupal 7 custom module to Drupal 9. I came across the function hook_entity_property_info_alter(). How can I convert or migrate this function to Drupal 9?

Categories: World News

Why don't users with the &quot;Create new content&quot; permission for a custom bundle cannot access /node/add, but they can access /node/add/author?

feedspot - Wed, 05/11/2022 - 12:55

If I give to a custom role the Article: Create new content permission, users can access the /node/add page. However, if I give the same permission for a custom bundle, for example Author: Create new content, users can't access that page, but yet can access /node/add/author.

What should I try to address the problem? I've tried to debug NodeAccessControlHandler::createAccess(), but this code doesn't show anything wrong.

$result = parent::createAccess($entity_bundle, $account, $context, TRUE)->cachePerPermissions(); return $return_as_object ? $result : $result->isAllowed();
Categories: World News

How do I check if a user has view access to a node, in a template file?

feedspot - Wed, 05/11/2022 - 12:55

I'm currently working on a simple LMS in D8 and have already defined the fundamental content types. Among them is a content type called Course, which can be considered "Premium" content, i.e. all users may access those fields that contain more general information, but the users will have to buy a subscription for accessing the full content.

To make that possible without any Premium module (which, at the moment, have not been ported to Drupal 8), I created a simple grid-view and deactivated "SQL rewriting", which works perfectly, so far. For displaying the nodes in this view, I have created a new view mode, called gallery, so that the nodes that are displayed can be styled in a template.
I would like to apply different CSS styles to those nodes in the view that the user may access. I'm not sure if this can be done in the view itself.

Anyway, I'm currently thinking of checking the view permission inside node--course--gallery.html and I would like to add a class to the article tag, if access is permitted.

Unfortunately, I can't seem to find the right function for this. I set it up like this:

{% set classes = [ node.bundle|clean_class, node.isPromoted() ? 'is-promoted', node.isSticky() ? 'is-sticky', not node.isPublished() ? 'is-unpublished', view_mode ? view_mode|clean_class, user.hasPermission('view nodes') ? 'is-permitted', node.access('view') ? 'is-permitted', 'clearfix', ] %}

Neither user.hasPermission('view nodes') ? 'is-permitted' nor node.access('view') ? 'is-permitted' seem to have any effect.

Do you have any idea?

Categories: World News

What is the equivalent of hook_property_info_alter()?

feedspot - Wed, 05/11/2022 - 12:55

In Drupal 7, The Entity API module uses hook_entity_property_info() and hook_entity_property_info_alter() which allowed us to add custom properties. (Not everything is a field.)

I can't find anything related to Drupal 8. The only thing I find is how to add it on a custom entity. How should I add properties to an existing entity/bundle?

Categories: World News

Use value from buildForm() in submitForm()

feedspot - Wed, 05/11/2022 - 12:55

My buildForm() method queries the database and returns data which is used to calculate default values for the form. How can I use these values in submitForm() without querying the database again?

Categories: World News

Выпуск браузера Pale Moon 31.0

Open News - Wed, 05/11/2022 - 11:50
Опубликован релиз web-браузера Pale Moon 31.0, ответвившегося от кодовой базы Firefox для обеспечения более высокой эффективности работы, cохранения классического интерфейса, минимизации потребления памяти и предоставления дополнительных возможностей по настройке. Сборки Pale Moon формируются для Windows и Linux (x86 и x86_64). Код проекта распространяется под лицензией MPLv2 (Mozilla Public License).
Categories: Open News

Coinbase отчиталась о падении торгов в первом квартале 2022 года

Криптоновости - Wed, 05/11/2022 - 11:30

Первый квартал 2022 года оказался неудачным для криптовалютной биржи Coinbase. Как уточняет издание Financial Times со ссылкой на пресс-центр компании, ее убыток в отчетном периоде составил $430 млн.

Объемы торгов упали примерно на 44%. Причем падение оказалось более значительным, чем ожидали аналитики ранее.

Львиная доля сделок пришлась на краткосрочные контракты. В результате спекулянты спровоцировали падение торгов.

До 85% прибыли Coinbase формируется за счет взимания транзакционных сборов. Аналитики изначально ожидали убытки в размере $47 млн, однако фактически они составили $430 млн.

Выручка в январе-марте достигла $1,16 млрд, тогда как в компании ожидали ее в пределах $1,5 млрд. В пресс-центре подчеркнули, что обострение волатильности и падение крипторынка стали основными факторами, ухудшившими финансовые показатели Coinbase.

Объем торгов с $547 млрд в четвертом квартале 2021 года упал до $309 млрд в январе-марте. Более 70% сделок были реализованы с участием институциональных инвесторов, что говорит о растущем принятии криптовалют со стороны финансовых компаний и фондов.

Акции Coinbase накануне упали на 16%. Напомним, в прошлом году эта криптокомпания вышла на американский фондовый рынок. Недавно она представила собственную NFT-платформу.

Categories: Open News

Warhol ‘Marilyn’ Work Is Now The Most Expensive 20th-Century Artwork Auctioned

feedspot - Wed, 05/11/2022 - 10:56

Image via Christie’s

 


Two months ago, Christie’s announced Andy Warhol’s Shot Sage Blue Marilyn would be going up for sale, in what it hailed as “the most significant 20th-century painting to come to auction in a generation.” 



This week, at the auction house’s Spring Marquee Week, the iconic work sold for an astonishing US$195 million, making it the most expensive 20th-century artwork to ever go under the hammer. 


 


According to the Guinness World Records, Warhol’s work bumped the previous record holder, Pablo Picasso, off the throne, whose Les femmes d'Alger (Version O) sold for US$179.3 million in 2015.


 


Not only is the Warhol work now the most expensive painting from the 20th century sold at auction, but it also takes the accolade of being the most expensive work by a US artist ever sold at auction, a title previously held by Jean-Michel Basquiat’s Untitled.



In total, the sale featured 36 lots from the collection of Thomas and Doris Ammann, the brother-sister duo behind Thomas Ammann Fine Art and well-known prestigious collectors in the art world, raking in US$317.8 million.



Aside from Warhol, six other artists achieved record prices at the auction, including Francesco Clemente’s The Fourteen Stations, No XI, which sold for three times its previous record at US$1.86 million; I Wasn’t Sorry, 2003 by Ann Craven, whose piece went up eight times in value to fetch US$680,400; and other works from Mike Bidlo, Mary Heilmann, Martin Disler, and Ross Bleckner.



Heartwarmingly, earnings from the sale will go towards charities providing urgent medical care and educational services to children, with the buyer of Warhol’s Shot Sage Blue Marilyn invited to partner with the Foundation and contribute to the cause, and can nominate charities to which 20% of the work’s proceeds will be donated.



“The record-breaking sale of Warhol’s iconic portrait of Marilyn from the Collection of Thomas and Doris Ammann is a testament to the strength, the vibrancy, and the overall excitement of the art market today,” said Alex Rotter, Christie’s Chairman of 20th and 21st Century Art. 



“This sale demonstrates the pervasive power of Andy Warhol as well as the lasting legacy that he continues to leave behind in the art world, popular culture, and society,” he added. 


 


 


 


[via Associated Press and Christie’s, cover image via Christie’s]

Categories: World News

FIFA Video Games To Change Name As Licensing Deal Comes To A Close

feedspot - Wed, 05/11/2022 - 10:56

Image via Electronic Arts

 


Following nearly 30 years of creating digital soccer experiences, game developer Electronic Arts and global sporting body FIFA have announced they will no longer be working together from 2023.



EA revealed the news to over 150 million fans who play the game worldwide in a blog post, saying that its new game with a new name, EA Sports FC, will “take global football experiences to new heights.” 



Fans of the game can breathe a sigh of relief, as the company promised the same modes, leagues, tournaments, clubs, and athletes will be available on the game even after the split. 



“Our unique licensing portfolio of more than 19,000+ players, 700+ teams, 100+ stadiums, and 30 leagues that we’ve continued to invest in for decades will still be there, uniquely in EA Sports FC,” Group GM Cam Weber pledged.



Additionally, the firm feels that as an independent platform, it will now have fresh opportunities to “innovate, create, and evolve,” finding new ways to reinvest in the sport, work with new partners, and most importantly, “bring joy, inclusivity, and immersion to a global community of fans.” 



“We are excited to continue and expand our long partnership with EA Sports as we serve athletes at the intersection of sport, gaming, and culture,” said DJ van Hameren, CMO of Nike. 



“Our partnership with EA Sports FC will authentically grow the ways our communities can play and engage with sport,” he added. 


 


 


 


[via Protocol and Electronic Arts, cover image via Electronic Arts]

Categories: World News

Xbox Is Reportedly Building A Streaming Stick To Tackle Low Console Supply

feedspot - Wed, 05/11/2022 - 10:56


Photo 230451034 © 777ers | Dreamstime.com


 


As video gaming giants grapple with console supply issues caused by chip shortages and shipping problems, Microsoft appears to be thinking out of the traditional (X)box in favor of hardware that’s much more lightweight and compact.


 


A new report by VentureBeat details that the tech behemoth is set to launch an Xbox streaming stick in a matter of 12 months. The gadget is part of the company’s vision to make gaming accessible to all, opening the Xbox experience to families who might not be able to obtain a console.



As outlined by the news outlet’s reporter Jeff Grubb, the Xbox stick looks and acts like an Amazon Fire Stick or Roku Puck. It could be plugged into a television’s HDMI port to launch the Xbox Cloud Gaming service, where users can access a library of games, television shows, and movies.



Samsung TV owners have more to gain from this cloud service, as the report notes that Microsoft and Samsung have designed a game-streaming app to be installed within those sets. This means users won’t have to purchase the streaming stick to get a hold of Xbox’s offerings.


 


All told, the tiny Xbox device should be better suited for casual players, since cloud-based games tend to have more lag than those loaded from a powerful console. Considering this, Microsoft would have a greater chance of encouraging adoption by pricing the streaming stick much more affordably than the usual Xbox hardware.


 


 



[via BGRGizmodo, VentureBeat, cover photo 230451034 © 777ers | Dreamstime.com]

Categories: World News

Microsoft Debuts Adaptive Computer Accessories For Users With Disabilities

feedspot - Wed, 05/11/2022 - 10:56
[Click here to view the video in this article]


Image via Microsoft

 


Ever since the introduction of the Xbox Adaptive Controller in 2018, Microsoft has devoted more time to working on innovations that benefit all users, and has now officially opened its new Inclusive Tech Lab where engineers will learn and develop gadgets specifically for those with various types of disabilities. 



Alongside the new facility, the brand is introducing an Adaptive Accessories collection for users who experience difficulty using a traditional mouse and keyboard. With this adaptable, easy-to-use system, they will now be able to create their own setup specific to their needs, allowing them to be more productive at work and use their favorite applications more effectively. 



In total, the accessories boast three components that enable users to configure, 3D-print, and customize their very own mouse, keyboard inputs, and computer shortcuts to best suit their lifestyles. 


 



Image via Microsoft

 


First, the Microsoft Adaptive Mouse comes with a customizable Adaptive Mouse Tail and Thumb Support to make the essential gadget lighter and more portable. Plus, it even took into consideration the need to switch from right to left-handedness, with the thumb support accessory able to change according to which hand is used. 



Next, the company created the Microsoft Adaptive Hub, which will allow users to transform traditional keyboards into one with a central hub and wireless buttons. Each hub can connect with up to four Microsoft Adaptive Buttons, and works together with assistive tech switches and different button toppers—including a d-pad, joystick, or dual button—for further ease of use. 



These accessories are scheduled to debut in the fall. Microsoft says it can’t wait to “welcome the disability community and all into the Inclusive Tech Lab as we learn and build technology that will empower more people to work, play, and create.” 



Check out how they work in the video below.


 



 


 


 


[via TechRadar and Microsoft, images via Microsoft]

Categories: World News

Просто хороший хостинг