[Solved] SQL Query to fetch salary and distinct no of employees geting that sal from emp table [closed]

[ad_1] select emp.Salary, COUNT(*) from emp GROUP BY emp.Salary Will return a distinct list of Salaries and the number of Employees who have that salary, provided that Salary and Employee are both contained on a communal table (can’t tell from the question wording). Try expanding your question a little to get a better response. 1 … Read more

[Solved] Conversion of C++ class to C# class

[ad_1] It does not work that way, you better use the c++ code only as a description of requirements. If that’s not an option, then I can only provide you with the following hint: // have a create function for you Hash object (I’m trying to simplify here) public class Hash { static const int … Read more

[Solved] Trying to create a simple sum calculator

[ad_1] 1) You can’t have a comma separated list of numbers in a number type input (at least in modern browsers), it has to be type=”text 2) Your onclick=”Sum()” is using a capitalized S, it should be onclick=”sum()” 3) You have no div with the ID sum, so your output never shows. New markup: <input … Read more

[Solved] HTTP POST REQUEST USING PHP [closed]

[ad_1] First, you’re going to want to look into the cURL library for PHP. http://php.net/manual/en/book.curl.php It’s basically a library to help you connect and communicate over various protocols, including HTTP using the POST method. There’s a very simple example on using the library on this page: http://php.net/manual/en/function.curl-init.php Second, you’re going to want to note the … Read more

[Solved] PHP + MySQL Interval query last 1 month with sum problem

[ad_1] You don’t have $row[“mbsent”] in your SELECT clause of your query. Perhaps you meant: $sql = “SELECT SUM(mbsent) AS summ, mbsent FROM data WHERE datum < DATE_ADD(NOW(), INTERVAL -1 MONTH) AND user=”csib” GROUP BY mbsent”; But that doesn’t make any sense either… so not sure what you are going for here. Also, I think … Read more

[Solved] How to import a variable from another function and another class?

[ad_1] You probably want them to be stored in an instance variable (self….). And you probably want your start to be an __init__ method. Your corrected class could look like: class HostMethod: def start(self): self.my_API = requests.get(“http://ip-api.com/json/{0}”.format(socket.gethostbyname(sys.argv[2]))) self.load_json = json.loads(self.my_API.content) Then, you could do: class Run: def Method(self, choice): print “{0}Zip :\t{1}{2}\n”.decode(‘utf-8’).format(Basic_Green, White, choice.load_json[‘zip’]) a … Read more