Symfony2 doctrine join returns too much data

Im having two tables - categories and topics. Below are those structures: /** * ForumCategories * @ORM\Table(name="forum_categories") * @ORM\Entity */ class ForumCategories { /** *...

Is it possible to add a dynamic class to host in Angular 2?

I know that in Angular2 I can add a class 'red' to a component's selector element by doing this: @Component({ selector: 'selector-el', host: { '[class.red]': 'true' }, ...

How to convert a html table with cells that span into several columns into a list of lists in Python 3?

I am new to Python and have started a little project that needs some webscraping. I started using BS4 but I am getting a little stuck while trying to convert a html table with cells that span into...

How do I expose a private class method of an Objective-C object using protocols in Swift?

Consider two private methods on UIColor: The instance method styleString which returns the RGB string of the color The class method _systemDestructiveTintColor which returns the red color used by...

AngularJs ng-mouseover not working in option tags

I use angularJS and I want to call function when mouse change over in option list. I tried ng-mouseover="changeProjectColor(t)" but it not working for me. <select id="select-tamplete" ...

Creating a service to dynamically append a directive to a DOM element?

I have a semi-complex directive. Here's the HTML which it uses as a template... <div ng-hide="hidden" class="alert-container"> <div ng-class="startFade ? ['alert-box', 'fade', colorClass] :...

UITableView Category Array Drill-Down -Swift iOS

I have 3 view controllers: FirstVC for creating 9 items, SecondVC is a tableView to sort those items by category name/id and display both, and ThirdVC is a tableView to extract and show the items...

passing radio buttons from javascript to django views as a paramater

I have a html page where I am passing the selected checkboxes to django views as parameter which works completely fine. layout.html <form action="{% url 'URL Which calls view' %}"...

Loop with componentDidUpdate

I am passing a self invoking function from App Component into getBgColor function of WeatherForecast Component. This grabs a value from the child component WeatherForecast and passes it into App...

Swift iOS -Get dictionary to accept nil value

I have an array that can hold up to 4 values. The array will always have at least 1 value but the other 3 may be nil. I have to take the elements inside the array and assign them to class...

ng-class with function call that generate random string

I am using Materialize Library for my Angular app. The problem is i am trying to add random class name so that the background would be different for each tag. <ul class="inline-list"...

CKEDITOR using applyStyle removes <br />

I want to: select some text, then press a button and after that surround the selected text with a span-tag Example: [ - start of selection ] - end of selection This is the begi[ning of my text...

React.Js: Prevent onClick-events of siblings while a onClick is executed

what's the best practice for the following problem? I have a parent component (Board) and four child components (GameButton) which are buttons that one can click on. The button click illuminates...

Too many pythons on my Mac, and pip install is not install package into the right python package folder

I want to use virtualenv on my Mac, and I installed it with pip: pip install virtualenv /usr/local/lib/python2.7/site-packages/pip/commands/install.py:194: UserWarning: Disabling all use of...

Dynamic css in vue-loader component not working

I have a Vue Component and I would like to extend it in order to bind a color to a specific message. I tried it with a binding like :style="styles" but then I got the error Property or method...

Swift iOS - How to put timer on Firebase TransactionBlock to prevent it from increasing within a certain time period

Every time different users post something (let's say a color) I get the color they posted, the postID, their userId, the date in secs, and how many times that post was viewed. A different user can...

If statement with Javascript variable using TWIG

Is it possible to write an if statement based on a javascript variable with TWIG? My first approach was this: {% if info_message is defined %} {% include 'includes/alerts/block.html.twig' with...

Shopify - make variant id change in url when selecting product options

Ok, so I'm new to Shopify, so this may be easy to solve and I'm just not "getting it." I think I'm working with an old theme since new themes seem to have a js file already in place to update the...

Rectangle not changing color WPF

I'm trying to make my rectangle change color depending on my tree sliders. B,R and G. Code flow: Sliders have bindings to the colorClass witch set's the g,r and b values depending on the...

"string indices must be integers" error while trying to build a list from json input

I am trying to create a list from a dictiory made from a json file in Python 3.7. The json file has the following structure: watches collection model 0 {…} 1 ...

Rasa init cannot be executed

my rasa init --no-prompt is throwing some import error ImportError: This version of TensorFlow Probability requires TensorFlow version >= 1.14; Detected an installation of version 1.13.2. Please...

Dynamic css classes in react

I'm trying to add css classes dynamically. I have a array of colors that i want to get random color each time component rendered. Here is what i did : import styles from...

How to trouble shoot the lag in the Django live server?

I have a small protein database. You can see the codes here. Say a user searches for their proteins of interest from the database. They can add the sequences to the cart. Also, they can upload...

ERROR: Failed building wheel for httptools

while trying to install rasa nlu i am getting following error: Building wheel for httptools (setup.py) ... error ERROR: Command errored out with exit status 1: command:...

“rasa init –no-prompt” returns NotFoundError

installed rasa successfully but when I try to create new project using rasa init --no-prompt I am getting this...

“rasa x" returns AttributeError

I have installed rasa x on my computer. rasa shell works well. I can chat within terminal. but when I try to run rasa x I get following error.I am using python 3.6 and tensorflow backend. Starting...

SyntaxError when launching a newly created Django application

I just created a project with Django, let me show you how I did it (with the voice of Wix ads ;)): django-admin startproject portfolio But when I launch my application I get a SyntaxError. So I...

How to pick one color from the overrides as default?

I've created a color scheme for my nuxt-tailwind project but I have a problem here. I need to call the class name with the opacity value like this: text-blue-500, bg-blue-500 all the time....

Error of rasa and rasa X intallation and running the local server

I have installed rasa on Max OSX and this output on the terminal: python3.8 -m pip install rasa Collecting rasa Using cached rasa-2.2.2-py3-none-any.whl (688 kB) Processing...

Formatter function not working properly inside Input Control

I need to highlight a few of the table's cell border colors on the basis of a condition and pre-fill it with some negative value. Then I need to SAVE/POST this value to proceed further. View.xml ...