Get innerHTML from DOM in PHP?

I have a few divs <div class="appname">Name 1</div> <div class="appname">Name 2</div> <div class="appname">Name 3</div> I use DOM and getElementsByClassName('appname') to parse it using PHP. I want to print out ...
more »

2017-03-19 19:03 (0) Answers

Sorting an array based on calculated values

For a recent java coding test I had a question similar to the following: A function receives a string of comma separated values. Add the digits of each number contained to create a single value for that number. Order these in ascending order Return ...
more »

2017-03-18 22:03 (1) Answers

Middleman tag sort case insensitive

In Middleman static site generator, sorting the tags array is case sensitive. Capital letters are sorted before lower case, as in: "A, B, C, a, b, c" when using the code: <% blog.tags.sort.each do |tag, articles| %> <% end %> It seems...
more »

2017-03-18 20:03 (2) Answers

Comparing two selection sort methods

This question is similar to (link) but not exactly what I am looking for. Here is a selection sort I wrote below, it's in Java. public void sort() { int smallIndex; for(int i = 0; i < arr.length; i++) { smallIndex = i; ...
more »

2017-03-18 19:03 (2) Answers

Extra column returned in PDO query

I'm using PDO to inner join three tables: "Users", "Teams" and the intermediary table "teams_users". "teams_users" handles the many to many relationship between Users and Teams. Many Users can be on a team. Each Team can have many users. The idea...
more »

2017-03-17 20:03 (1) Answers

Loop over state and check if object exists

I have some code that seems to work, just not correctly. I have an onChange handler that sends up a key and value to setState() of its parent component. _onAttributeChange(key, value) { const changes = this.state.changes; const pushObj = {k...
more »

2017-03-17 16:03 (1) Answers

Array sorting in matlab

Hi i have a 289x2 array that i want to sort in MatLab. I want to sort the first column into numerical ascending order. However I want to keep the second column entry that is associated with it. Best way to explain is through an example. x = 76 1 ...
more »

2017-03-17 13:03 (1) Answers

array formula with dates

I have four columns of dates(A,B,C,D),I want to excel verify if each period of "period 2" intersects ALL "period 1" from 1,2,3..... For example 20-28/01/2016 intersects 01-24/01/2016 AND 25/01-03/02/2016. The answer in this case in column E must be...
more »

2017-03-17 09:03 (0) Answers

From Object to Array in JavaScript

I need to write a function that takes in an object and returns an array with this object's property values. Ex.: var obj = { name: "Joao", age: 27, country: "USA" }; The function should return an array like this: var array = ["John"...
more »

2017-03-17 00:03 (4) Answers

Getting data from core data

I am new to Swift and I am beginning to learn Core Data, but I have a problem. I can't get data from my Core Data database. I want to download with Firebase in core data For some reason the data displayed from the Firebase and not from the database...
more »

2017-03-16 18:03 (1) Answers

split a string by newline in react

I have a json string for order.expeditionPlaces which is formatted like: "expeditionPlaces": "Place1, Place2, Place3" I am able to split the data but I can't get the string to go onto a new line as html tags are escaped within react {order.expedi...
more »

2017-03-16 14:03 (2) Answers

split string within react if statement

I have json data for order.expeditionPlaces which is formatted like: "expeditionPlaces": "Place1, Place2", I am trying to split this so that it will display each place on a new line and I also need to be able to check if it is null Place1 Place2...
more »

2017-03-16 12:03 (2) Answers

Sort Multi-dimensional Array by Value?

Hi i will try multi sort array , display array list base on recent post values, i need order list please find my code and help with us. <?php $data = array(); $i = 0; while($loop->have_posts()) : $loop->the_post(); $title = get...
more »

2017-03-16 10:03 (1) Answers