[Solved] joins on multiple keys in linq [closed]

[ad_1] Try code like this using System.Collections.ObjectModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace ConsoleApplication57 { class Program { static void Main(string[] args) { int employeeId = 113; List<E_JOURNAL> employee = E_JOURNAL.journals.Where(x => x.JOURNALID == employeeId).ToList(); var results = (from j in employee join s in E_ABSENCE.absenses on j.JOURNALID equals s.JOURNALID … Read more

[Solved] c++ merge sort trouble [closed]

[ad_1] So one small mistake that you don’t take into account is that, you are passing pointer array ini but inside the method you still use the method initial and one more thing is, you should take in a temp array that would assign the sorted values to your ini array. So your code should … Read more

[Solved] How to order posts by date added [closed]

[ad_1] You want to sort on the datetime (or if that doesn’t exist you could use the ID, but that is not how “it should be”) in descending order instead of ascending. Example query: SELECT `title`, `text` FROM `news` ORDER BY `datetime` DESC LIMIT 5 https://dev.mysql.com/doc/refman/5.7/en/sorting-rows.html [ad_2] solved How to order posts by date added … Read more

[Solved] How to get an string array from JSON arrays? [closed]

[ad_1] First of all you need to convert the raw response from the server to a Swift Dictionary. let payload = [ “cars”: [ [ “color”: “red”, “model”: “ferrari”, “othersAtributes”: “others atributes” ], [ “color”: “blue”, “model”: “honda”, “othersAtributes”: “others atributes” ], [ “color”: “green”, “model”: “ford”, “othersAtributes”: “others atributes” ], [ “color”: “yellow”, “model”: … Read more

[Solved] 2D array Seating Chart C++ [closed]

[ad_1] If I choose seat # 1 and Row # 1 it makes the mark on the chart at seat and row #2… The problem is that arrays in C start with index 0, so the left most seat has index 0, not 1. Thus, if you enter 1 into row2, and write map[row2][column2] = … Read more

[Solved] Is it possible to write this type of query with MySQL?

[ad_1] Maybe this is what you are looking for: SELECT * FROM products WHERE (product_type = “abc” AND (product_price >= 100 AND product_price <= 1000)) OR (product_type = “def” AND (product_price >= 2500 AND product_price <= 5000)) OR product_type NOT IN (“abc”, “def”) [ad_2] solved Is it possible to write this type of query with … Read more

[Solved] Convert JSON to array in Javascript

[ad_1] You could splice the values and get only the first two elements as number. var array = [{ time: “18:00:00” }, { time: “10:00:00″ }, { time:”16:30:00” }], result = array.map(o => o.time.split(‘:’).slice(0, 2).map(Number)); console.log(result); .as-console-wrapper { max-height: 100% !important; top: 0; } If you have JSON sting, then you need to parse it … Read more

[Solved] Javascript – string + var alert [closed]

[ad_1] You are missing one + sign in the alert parameter: alert(“The string ” + fullName + ” is ” + fullNameLength + ” characters long.”); // ^ here You should write your code in some proper editor or IDE (webstorm, vs code, …). That way the editor will highlight those simple syntax errors for … Read more

[Solved] Excel Number Separation [closed]

[ad_1] A solution with a formula only: We assume that A1=1-3. Fill the following formula into A2 and copy it down. =IF(A1<>””,IF(ISNUMBER(A1),IF(A1+1<=VALUE(RIGHT(A$1,LEN(A$1)-FIND(“-“,A$1))),A1+1,””),VALUE(LEFT(A$1,FIND(“-“,A$1)-1))),””) The result will be 1 2 3 This works for any numbers devided by -. 1 [ad_2] solved Excel Number Separation [closed]