Can I write a Twig Extension to access previous and next element in a loop

Twig
I was wondering if there is a way to create functions (or whatever) in Twig, so I can access the next and the previous element in a for loop. Somethin...
1 year ago

Configure Identity Server 4 With Ionic 2

TypeScript
I'm trying to configure Identity Server to work with Ionic 2. I'm a bit confused on how to configure the Redirect urls. For when I'm testing in the b...
1 year ago

Vue.js can't set background-image in :style (twig template)

Twig
I'm using Vue.js at my Symfony 3.4 project. I have a problem with seting my background-image from object via Vue.js I'm looping through my elements ...
1 year ago

Firebase create model which has optional values in swift

Swift
I would like to create model which has optional values. I implemented flatmap to achieve that. node look like this and imageUrl does not exist everyti...
1 year ago

using ajax in a symfony project to delete item

Twig
hello I'm looking for a script that could allow me to delete item in a symfony project using ajax, I didn't find any solution for this I tried to dele...
1 year ago

typescript/eS5-ES6 module is not getting called

TypeScript
I don't know what's wrong as I'm new in Angular2,typescript,es5 and es6. Look at plnkr. I don't understand why my FirstComponent is not getting called...
1 year ago

How do I navigate forward and backward within UIPageViewController using buttons?

Swift
I'm creating an onboarding app for New Patients of a physical therapy clinic. The new patient will answer questions on each view controller within the...
1 year ago

Twig - Iterating over Form fields

Twig
I'm facing a problem trying to iterate over all form elements in a Twig form theme. Actually I used this to iterate over them: {% for child in form.p...
1 year ago

swift set image center pie chart

Swift
I am using a pie chart from iOS-Charts I want to add an image to the center of the chart instead of the pie chart. image What should I do? This i...
1 year ago

Ignore unknown tags in twig

Twig
I have a few set of templates written with Twig. I have then written a separate script to be run using the CLI. This script allows me to scan my templ...
1 year ago

How does addSubview work with intrinsicSizes?

Swift
The result of the following code is: I don't see the label. My understanding was that the intrinsicSize of the label would allow the label to stretch...
1 year ago

One form for multiple addresses in Symfony - Twig

Twig
First I want to make clear that I'm not using Entities/Doctrine for my forms (or even). I'm using webservices to add/edit the data fields for the data...
1 year ago

Swift generic data conversion function

Swift
I'd like to create a generic function to convert stored Data to different data types like: import UIKit import AVKit func represent<T>(_ data:...
1 year ago

Twig date loop each day in a period

Twig
So, here's my situation, I have a beginning date and an ending date, with Twig I want to be able to loop through all days in the so called period so t...
1 year ago

Remove class active onclick (angularjs)

Twig
I have an ul with up to 3 possible li's inside (meaning it can have 1, 2 or 3). All 3, when clicked, open a modal and get an class="active". My goal ...
1 year ago

Move Sprite Node While Rotating

Swift
I am attempting to move a sprite node (a frisbee) in Swift while rotating it. The object moves as expected, but does not rotate. I grouped the two act...
1 year ago

Symfony 3 using a macro in a macro?

Twig
i want to use a macro in a macro. But how is this working? macro in my twig: {% import _self as formSubmacros %} {% macro printSubcategoriesRo...
1 year ago

Unable to access form values in array with key-array subset

Twig
For a project I'm working on a company with addresses related to that company. I created a form for the company with it's physical address (this addre...
1 year ago

Swift protocol extensions with enums

Swift
So I have several enums representing various unit systems: enum MassUnit:Double{ case Pound = 453.59237, Ounce = 28.349523125, Gram = 1.0, Kilog...
1 year ago

Unable to find template symfony3

Twig
I'm doing a project as a web dev student on symfony3. I've been looking for similar errors, but i cant get the solution for mine. I have a problem whe...
1 year ago

Supply chain SQL query

SQL
I am having issues with my SQL code. I want to display the total count of stores that correspond with a certain Distribution Center/ WH. I want both ...
1 year ago

How to insert MAX function in a subquery? (SQL Server)

SQL
I have the following SQL code that's shows me the number of selling per seller per sector. SELECT [JO_Info].Name, [Proc].Sector, COUNT([J...
1 year ago

Line up CenterYAnchor of UIButton to UIPageControl Swift

Swift
I have some code where I'm adding in a "close" UIButton to the UIPageController.view, and that works great. WORKING CODE: class func closeButton(_ ...
1 year ago

Same select criteria with multiple where conditions in SQL Server

SQL
Is it possible to do something like this when there are same fields required from the table but having different where conditions. I have tried to do...
1 year ago

How to improve query execution time?

SQL
I have a rather complex query, which takes 1-2 minutes to execute. Is there a way to improve execution time? Here is the query: select o.orders_id,...
1 year ago