profile
viewpoint

callistino/angular-input-add-on 0

Directive for appending or prepending value to ngModel in AngularJS

callistino/angular-timeago 0

Angular directive/filter/service for formatting date so that it displays how long ago the given time was compared to now.

callistino/blog 0

Personal Blog

callistino/bootbox 0

Wrappers for JavaScript alert(), confirm() and other flexible dialogs using Twitter's bootstrap framework

callistino/bootstrap 0

The most popular front-end framework for developing responsive, mobile first projects on the web.

callistino/breakpoints 0

Trigger jQuery events for your responsive design breakpoints!

callistino/dotfiles 0

.files, including ~/.osx — sensible hacker defaults for OS X

callistino/dpm 0

Docker package manager

callistino/GoogleBundle 0

Google Bundle for Symfony2

startedgalileo/docker-binaries

started time in 7 days

create barnchcallistino/dpm

branch : master

created branch time in 2 months

created repositorycallistino/dpm

Docker package manager

created time in 2 months

issue commentvuejs/vue-loader

:root selector for scoped CSS

I was looking for the same functionality and found that you could use the already available deep selector and it behaves the same. I don't like that it may not be the intended purpose but anything else would be an alias of it since the only way to target the root of a given component is if that component is scoped and you use that scope attribute selector.

davidhewitt

comment created time in 2 months

startedChristosChristofidis/awesome-deep-learning

started time in 2 months

startedendymecy/awesome-deeplearning-resources

started time in 2 months

startedzerotosingularity/deep-learning-resources

started time in 2 months

startedujjwalkarn/Machine-Learning-Tutorials

started time in 2 months

startedasync-aws/aws

started time in 2 months

startedsegmentio/ksuid

started time in 2 months

startedvuejs/vite

started time in 3 months

issue commentAtlantic18/DoctrineExtensions

[Sortable] Impossible to use if added to existing table

I wanted to leave this here for future reference. This is the migration sql I used to add to an existing table when using with SortableGroup:

-- ------------------------------------------
-- Add new sort "position" field
-- ------------------------------------------
ALTER TABLE table_name
    ADD COLUMN `position` INT DEFAULT 0 NOT NULL;

-- ------------------------------------------
-- Update newly added "position" field 
-- ------------------------------------------
DELIMITER $$

DROP PROCEDURE IF EXISTS UpdateSortPositionByGroup;
CREATE PROCEDURE UpdateSortPositionByGroup()

BEGIN
    DECLARE done INT DEFAULT FALSE;
    DECLARE groupId INT;

    -- declare cursor for group id found inside table_name
    DECLARE groupIdCursor
        CURSOR FOR
        SELECT DISTINCT group_id
        FROM table_name;

    -- declare NOT FOUND handler
    DECLARE CONTINUE HANDLER
        FOR NOT FOUND SET done = TRUE;

    OPEN groupIdCursor;
    updatePositionLoop: LOOP
        FETCH groupIdCursor INTO groupId;
        IF done THEN
            LEAVE updatePositionLoop;
        END IF;

        SET @position = -1;
        UPDATE table_name
        SET position = (@position := @position + 1)
        WHERE group_id = groupId
        ORDER BY field;

    END LOOP updatePositionLoop;
    CLOSE groupIdCursor;
END$$

CALL UpdateSortPositionByGroup();
DROP PROCEDURE UpdateSortPositionByGroup;

DELIMITER ;


Soviann

comment created time in 3 months

more