TobiasW

1

votes
1

answer
2.6k

views

Multiple Html.dropdownlistfor with the same selectlist, set selected value

I have a Add/Edit View with several dropdownlistfor, all is populated from the same selectlist. When i try to populate the view for editinng all dropdownlist have the same selected as the first one. Is there a way around this? I don't wanna use multiple selectlist because they all have the same cont...
TobiasW
1

votes
1

answer
41

views

How to get a label between the jqm rangeslider and the sliderthumb?

I want my label between the slider and the slider thumb, so that I can save as much screen space as possible. Now is my problem, that the label is above everything and I cant't fix it with z-index... HTML: Test CSS: .sliderlabel { z-index: 1; color: white; left: 35%; position: absolute; } input[typ...
TobiasW
1

votes
1

answer
1.3k

views

Create map with DBContext lookup, using automapper and ninject

So what I'm trying to do is use my DBContext to get some information from the DB for a mapping. So I create a custom TypeConverter: public class RoundVMtoTrampetRound : ITypeConverter { public RoundVMtoTrampetRound(DBTariff context) { this.context = context; } private DBTariff context { get; set; }...
TobiasW
1

votes
2

answer
376

views

Material Design Lite Icons missing when using in Angular

So I started to use MDL inside my Angular project, which works mostly fine, but the MDL icons are just not working in there... I'm using them like this share and the browser just writes 'share' as normal font and not as Icon like it should do it. I've got the mdl css and js included and also got the...
TobiasW
1

votes
1

answer
47

views

How to get X/Y corrdinates with jquerymobile all the time my finger is moving? Like mousemove for Desktop

I'm writing code for a colorpicker, especially for mobile devices. This code is working on my Desktop, where the color is refreshed as long the mouse is moving ('mousemove'), how can i achieve the same with a mobile event? Tap or something is just fired once.
TobiasW
1

votes
1

answer
98

views

Phonegap BarcodeReader is not working

I need some help with implementing the barcode reader plugin into my phonegap application. I've already added the plugin via cli to my phonegap project. Now there is a plugin folder with the barcodescanner.js inside. I've added ''
TobiasW
1

votes
1

answer
1.3k

views

Check if img-src exists with angular

I want a simple determination if the image source exists or not, so that I can replace the image with a default image. Best case would be if this would be possible in pure html maybe with 'ng-if' or something like this. This code obviously doesn't work, but I think it shows what I want. EDIT: New Co...
TobiasW
1

votes
4

answer
3.4k

views

Change pure HTML Slider-Thumb color with jquery (working css included)

I want to change the Slider-thumb color with jquery, but the problem is, that the same CSS-code, which I use in the StyleSheet is not working anymore if I use it with jquery. The example below has a working css to change the thumb color, and a jquery button, which should do the same. Is there any so...
TobiasW
6

votes
1

answer
1.1k

views

Websocket on Android 4.4 with Phonegap

I'm working on an app which needs Websocket to communicate with my server. I'm working with Phonegap so I can run all the code first of all in my browser. Since Android 4.4 Websockets got native support in Android so it should work... I've implemented the Websocket with this code: $(document).read...
TobiasW
3

votes
2

answer
1.3k

views

Map from HttpPostedFileBase to Byte[] with automapper

Im trying to upload a picture and use automapper to convert it from HttpPostedFileBase to Byte[]. This is my CreateMap: Mapper.CreateMap() .ForMember(d => d, opt => opt.MapFrom(s => { MemoryStream target = new MemoryStream(); s.InputStream.CopyTo(target); return target.ToArray(); })); I get an erro...
TobiasW
11

votes
3

answer
35.9k

views

Random “An existing connection was forcibly closed by the remote host.” after a TCP reset

I have two parts, a client and a server. And I try to send data (size > 5840 Bytes) from the client to the server and then the server sends the data back. I loop this a number of times waiting a second between each time. Sometime the server application crash, the crash seems very random the error: U...
TobiasW
11

votes
3

answer
12.9k

views

How to stack items above each other with flex box?

So I just googled a lot and was not able to find a solution for this. I want 2 items to be centered horizontally and vertically. The trick here is that I want to stack them above each other, no problem with position:absolute, but I can't center the elements with an absolute position. I think that th...
TobiasW
2

votes
1

answer
1.2k

views

Horizontally center a flex item in remaining space (not full width) of flex container

I got a responsive design, which has 3 items in a row. If the screen gets smaller, the first one will be deleted. So the 3 items are distributed with flexbox and justify-content:space-between, which makes the outer items bound to the sides and the middle item centered. Now if the first item is delet...
TobiasW
1

votes
7

answer
864

views

How to center a div which position is absolute?

I've got the following code: HTML: Middle CSS: .label { position: absolute; margin-top: 13px; margin-left: auto; margin-right: auto; z-index: 3; } input.ui-slider-input { display: none !important; } #sliderdiv .ui-slider-track { margin-left: 15px; } But I can't center my text div, is there a solutio...
TobiasW
0

votes
5

answer
1.1k

views

Remove white space between div blocks

How can I remove these white space blocks around my div blocks? My code is the following: HTML: CSS: html { margin: 0px; padding: 0px; } .accordion { width: 100%; } .accordionitem { display: inline-block; background-color: green; padding:0; margin:0; } .vertical { width: 10%; height: 100px; } .hori...
TobiasW