[Solved] Sort list numericallyC# [closed]

You can in-place sort scores if you want, using List.Sort(Comparison<T>): scores.Sort((a, b) => int.Parse(a.Punten).CompareTo(int.Parse(b.Punten))); Note that because Punten appears to be a string, you need to convert it to an int to compare properly. If you change your code to make Punten an int, the sorting code would simplify to: scores.Sort((a, b) => a.Punten.CompareTo(b.Punten)); What’s … Read more

[Solved] Selected item, doesn`t work [closed]

After read this comment : Hover is ok, but i want to remain activ that hover after I click on it Take the hover class a make a new one : CSS .active { /*css of the hover */ } Jquery $(‘.btn’).on(‘click’, function() { $(this).addClass(‘active’); //if you want to toggle it use toggleClass(‘active’) instead of … Read more

[Solved] Insert form into database [closed]

You need inputs on your form: <form action=”insert.php” method=”post”> Username: <input type=”text” name=”username”> Password: <input type=”password” name=”password”> Confirm Password: <input type=”password” name=”confirm”> <input type=”submit” name=”submit”> </form> Then on insert.php if (isset($_POST[‘submit’])){ $Error = 0; if (!isset($_POST[‘username’])){ $Error++; } if (!isset($_POST[‘password’])){ $Error++; } if (!isset($_POST[‘confirm’])){ $Error++; } if ($Error > 0){ echo “Error in HTML Validation”; … Read more

[Solved] Highcharts has incorrect chart [closed]

I assume that you expect, that tooltip should be displayed in on each point. All series except scatter have to be sorted and only one point for a one x-value. So you can use scatter series with defined lineWidth. series: [{ type:’scatter’, lineWidth:2, data: Data }] http://jsfiddle.net/LtkX2/1/ 3 solved Highcharts has incorrect chart [closed]

[Solved] How do I make a class with the following requirements? [closed]

You must have a main method to put your code in. Like this: public class Character public static void main(String[] args) { System.out.println(“Enter your new character’s name.”); System.out.println(“\t”); new Character(input.nextLine()); } public Character(String name) { this.name = name; } String name; int level = 1; int XP = 0; int maxHP = 20; int HP … Read more

[Solved] Need help understanding some parts of “15 Puzzle Game” in C++ [closed]

A. The board is being shuffled, so 1000 means ‘a lot, but not that much that you really have to start waiting for the board being shuffled’ B. getCandidates() returns the candidates by filling them in the vector, v.clear() resets the vector for new candidates. C. Here 1,2,4,8 just means up,down,left,right (not in particular order). … Read more

[Solved] Counting the lines of several txt files [closed]

Try this code Sub Loop_Through_Text_Files_Count_Lines() Dim fso As Object Dim pth As Object Dim strFolder As String Dim strFile As String Dim r As Long With Application.FileDialog(msoFileDialogFolderPicker) If .Show Then strFolder = .SelectedItems(1) & “\” Else Exit Sub End With Set fso = CreateObject(“Scripting.FileSystemObject”) strFile = Dir(strFolder & “*.txt”) Do While strFile <> “” r … Read more

[Solved] How to change object structure into array structure for highcharts

If you want to convert your list of dictionaries to a list of lists on the server side you can do it like so: >>> data = [{‘tahun’: ‘2010’, ‘apel’: 100, ‘pisang’: 200, ‘anggur’: 300, ‘nanas’: 400, ‘melon’: 500}, {‘tahun’: ‘2011’, ‘apel’: 145, ‘pisang’: 167, ‘anggur’: 210, ‘nanas’: 110, ‘melon’: 78}] >>> [[x[‘tahun’], x[‘apel’]] for … Read more

[Solved] How can i convert this code to swift 4? [closed]

UILocalNotification is deprecated. Try this code: let gregCalrendar = Calendar(identifier: .gregorian) var dateComponent = gregCalrendar.dateComponents([.year, .month, .day, .hour, .minute], from: Date()) dateComponent.year = 2012 dateComponent.month = 9 dateComponent.day = 28 dateComponent.hour = 16 dateComponent.minute = 11 let dd = UIDatePicker() dd.setDate(gregCalrendar.date(from: dateComponent)!, animated: true) let content = UNMutableNotificationContent() content.title = “UMUT CAN ALPARSLAN” let trigger … Read more

[Solved] Please help me correcting this code [closed]

Suggest you to debug it using debugger. Number of issues like ptr1 != ‘0’ should be *ptr1 != ‘\0’ as one stage your loop should fail & it happen by comparing value(*ptr) on that address not by comparing address(ptr). in for loop initialization part ptr1 = &name is wrong it should be ptr1 = name … Read more

[Solved] PHP parameter variable vs reference [duplicate]

A parameter passage by value – value of a variable is passed. $b = 1; function a($c) { $c = 2; // modifying this doesn’t change the value of $b, since only the value was passed to $c. } a($b); echo $b; // still outputs 1 A parameter pass by reference? – a pointer to … Read more

[Solved] how to Multiply 2 columns from different tables but same database mysqli php [closed]

$con = mysqli_connect(“localhost”, “root”, “”, “zoo”); if (mysqli_connect_error()) { echo “Failed to connect” . mysqli_connect_error(); } $sel = “select (quantity* bill) as total from animal inner join price on animal.id=price.animal_id group by price.animal_id”; $result = mysqli_query($con, $sel); while ($row = mysqli_fetch_array($result)) { echo “<tr>”; echo”<td>” . $row[‘total’] . “</td>”; } Before copy and paste check … Read more