Nodejs Change server HTTP to HTTPS

I try change my server to HTTPS, but does not work fine. My page show like I create a new server with anything. In this case I have 2 files, app.js with express required and routes, and my server.js to execute the server require the ./app My app.js...
more »

2017-04-20 21:04 (1) Answers

RXJS - start a timer only when idle?

I'm using a stream which is throttled when I scroll the window. While throttling (as long as scrolling), it emits values to the console. However , when stream is idle (user is not scrolling the window) - I want a timer to kick in. However - if the ...
more »

2017-04-20 19:04 (2) Answers

Each checkbox shows up twice

Set up: jQuery 3.2.1 Semantic UI 2.1 Chrome HTML (based on <div id="checkboxes"> <div class="ui checkbox"> <input type="checkbox" name="checkboxes" value="che...
more »

2017-04-20 19:04 (1) Answers

Race condition with Node.js and Firebase

I'm new to Firebase and Node.js, but what I'm trying to do is the following: gameScoreRef.child(score["ss"][i][10]).once('value', function(snapshot) { if (!snapshot.val()) { // NULL } else { gameID = snapshot.val(); c...
more »

2017-04-20 18:04 (1) Answers

jQuery addclass modification

I have a question How to insert background red color only on One, Three, and Four? $(function() { $("#myid li").addClass("redcolor"); }); .redcolor { background-color: red } .abcsize { font-size: 36px } <script src="https://a...
more »

2017-04-20 12:04 (3) Answers

Bind parsed XML data to AngularJS variable

Im trying to bind XML data to a variable in AngularJS. The data returned from my service is in XML <string xmlns=""> &lt;Response&gt;&#xD; &lt;Firstname&gt;Johanna&...
more »

2017-04-20 12:04 (1) Answers

Switching divs via JS (ASP.NET MVC)

I have AJAX request to get Question1-Question10 from back-end Here is code of request <script> $(document).ready(function() { question_block(); }); function question_block() { $.ajax({ url: '@Url.Action("QuestionBlocks", "Int...
more »

2017-04-20 10:04 (3) Answers

JSON.stringify does not generate correct json

I'm having trouble with JSON.stringify because I can't generate the json format of the model I want to convert. Screen below were the result of JSON.stringify and as you can see on the highlighted part some irregularities on the json itself. Below i...
more »

2017-04-20 10:04 (2) Answers

JavaScript Function is run twice?

I'm a little bit confused. I have a checkbox that a user can click which determines whether a Private Phone number on my page should be visible to all or only the administration. When the box is clicked I wanna make sure you are allowed to first the...
more »

2017-04-20 09:04 (3) Answers

AngularJS - Proven way of handling ng-model data

I have a form, and I'm trying to bind date from it in the angularjs - controller so I can pass it into the djangorestframework view to do more stuff with it. Now my problem is that I don't understand how to properly bind data from the datetimepicker...
more »

2017-04-20 08:04 (1) Answers

state gets updated before setState is called

lifeParser is a method called to process and update boardData. The problem is boardData gets updated while the loop is still processing. lifeParser(){ var parseArray = this.state.boardData.slice(0); for(var i=0;i<30;i++){ for(va...
more »

2017-04-20 04:04 (2) Answers

CSS transition div width from center

I am working on a little menu animation, nothing groundbreaking but just as an experiment. This is what I currently have: HTML <div class="menu"> <div class="bar"></div> <div class="bar"></div> <div class="bar...
more »

2017-04-19 22:04 (2) Answers

Improving iScroll performance on a large table

I'm updating a table header and its first column positions programatically based on how the user scrolls around to keep them aligned. The issue I'm experiencing is that as soon as my data sets gets big enough, the scrolling gets more and more choppy...
more »

2017-04-19 21:04 (4) Answers

only change classes inside a hovered element

So I'm creating a page about user-submitted recipes. Some users have submitted a short quote about the recipe, others have not. I wanted to have the quote, if it exists, to display when the user hovers over the image of the recipe. Right now, I'm u...
more »

2017-04-19 19:04 (4) Answers

Highlighting links based on scroll position

I'm trying to get the my links to highlight if the user is scrolling over the page that is for that link. But for some reason it isn't working properly. I Have commented out my first try in jquery and tried again but link two is highlighting when lin...
more »

2017-04-19 17:04 (4) Answers

Get value from "Bootstrap-Select"

I have a selectbox and when I select the option it updates the input box with the selectbox's values. This is working with an older version of Bootstrap-Select. But in the newer version it doesn't work anymore. I am looking for a way to make this to ...
more »

2017-04-19 15:04 (2) Answers

$(this).text() excludes text after space

$('.ed_name').replaceWith(function() { return '<input placeholder=' + $(this).text() + ' value=' + $(this).html() + ' class="ed_inp">' }); <script src=""></script...
more »

2017-04-19 13:04 (4) Answers

When can I save JSON data in an SQL Table

When using SQL or MySQL (or any relational DB for that matter) - I understand that saving the data in regular columns is better for indexing sake and other purposes... The thing is loading and saving JSON data is sometimes a lot more simple. and mak...
more »

2017-04-19 13:04 (5) Answers