Patte

1

votes
1

answer
177

views

'Invalid override. The type isn't a subtype' when implementing an interface

I'm trying to implement the MealsRepository interface into the MealsRepositoryImpl, but I'm getting the following error: Invalid override. The type of 'MealsRepositoryImpl.findAllForCanteenByDate' ('(int, DateTime) -> Future Map int, dynamic ') isn't a subtype of 'MealRepository.findAllForCanteenByD...
Patte
1

votes
0

answer
37

views

Why encrypt with aspnet_regiis.exe

I want to encrypt my web.config file to hide some sensitive data like passwords with aspnet_regiis. Encryption is made with this code in the command prompt C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -pef 'appSettings' C:\inetpub\wwwroot\testweb And I can decrypt it with this...
Patte
1

votes
1

answer
62

views

Umbraco Json to css class=“[]”

I am using Umbraco and is working with the data-type grid layout and want to add custom settings (css classes) to each row/cell and it kinda work. User interface: The 'modifier': '{X}' give different results the 3 worked 'best'. And the json: [ { 'label': 'Message Box', 'description': 'Message Box',...
Patte
1

votes
1

answer
652

views

Sorting nested lists

Given is a nested list, with the following markup (and sadly can't be changed at this moment). I want to sort this list (and all nested lists by the 'a'-tag title.) The first div (which is not nested in 'li') should be used to sort the 'ul'-siblings. Performance is also important, as this list can...
Patte
1

votes
1

answer
128

views

css word-spacing with mutiple characters

I want all the numbers to be in the center of the boxes ,I am curently using word-spacing but that dont work beacuse the numbers with 2 characters take up more space then the rest of the numbers. I have tried to add a space to the numbers with 1 character ('1 ') ('11') so it looks like that, but tha...
Patte
1

votes
1

answer
44

views

Create language mirror sites in Umbraco

I have a Umbraco site that supports 3 languages. And i want to add content to all 3 sites at the same time, I dont want to add the same content on all 3 sites 3 times. If i add content on the English site I also want it to be added on the Swedish and Danish site. So I only have to translate all text...
Patte
5

votes
1

answer
88

views

Repeat animation after its done javascript css

I am in the progress to make a roulette game, but i got a problem that my 'animation'(or what you call it) only is able to play once. I dont have so much experiense with javascript and have no idea how to fix my problem. var img = document.querySelector('#ball'); ball.addEventListener('click', onC...
Patte
6

votes
1

answer
826

views

Make an image transparent and fill with color relative to a percentage value

I found the following on codepen and really liked this effect. Now I'm trying to adapt this to my needs and ran into some problems: Whenever a user scrolls down or is resizing his screen, the image is behaving weird (I can't describe it in my own words, see jsfiddle for what I mean). I guess this pr...
Patte
2

votes
2

answer
69

views

Take first available item for every year in list

I have a list with dates that I want to retrieve every first existing item for each year. The problem is that it doesn't always contain a item for the first of January. Below code gets everything for the moment but if a day is missing a whole year is not displayed. foreach (var index in pModel.Inde...
Patte
3

votes
0

answer
710

views

iOS: render to and read from depthbuffer for offscreen processing

Problem My main goal is to get model coordinates for touches on the device, so to check what you've touched. Im working with a large model and have to draw many things, that also have to be touchable. To achieve this I know two possible ways: On one hand we could do a ray casting and intersect the c...
patte
2

votes
2

answer
436

views

IntelliJ live template for logging a selected variable in js

I would like to add a new line right after the line where I selected a variable name. This line should than contain the selection. Example: var variable = getValue(); I select the word 'variable', press CMD+J to apply a live template or CMD+Alt+T to surround the selection with a live template and ge...
Patte
2

votes
2

answer
58

views

javascript animate dosnt loop

I have a roulette game that looks like this: I want it to slow down more and more the further it goes, so i have this code: $(document).ready(function() { $('button').click(function() { var moveTime = Math.floor(Math.random() * 1000) + 2000 var slowDown = 1000; while (moveTime > 0) { $('div').a...
Patte
2

votes
4

answer
89

views

Multiple colors in div

I want a div that looks like this How do i set the squares to 100x100px and reapeat the process?
Patte