How to split circle in buttons

I'm trying to split a circle with gradient Color in four clickable buttons, as I show on the picture. Does anyone know how to do that without using images? I've tried many different approaches, but I couldn't find any valid solution.







Filter mysql data for chart visualisation

On my portal I have a chart (devexpress) which uses an API to load JSON records.



In my example I have a sensor which inserts a new record into the database every 60 seconds with following fields: id, serialnumber, tag_id, timestamp, value. So on any one day I have about 1440 datapoints in the database.



On the chart I have a datepicker, which I can choose a specific time range. Now when I choose, "last month", my AJAX call will send the 2 timestamps (now and now - 1 month) to the API.



So I will get 30 x 1440 records for my chart. This is too many. Now I need a solution, that when I chose a 7 day period, I get one record for each hour or when I chose last month I get just one record every day as an average of all the records for the day.



My SQL query on the API is:



SELECT * FROM `records` WHERE `timestamp` BETWEEN "' . $posts['from'] . '" AND "' . $posts['to'] . '"'


Answers

You need to add GROUP BY to your sql. In following example you will find exact solution for your needs.



Grouping timestamps in MySQL with PHP





SetWindowPlacement not working on Windows Vista

Using SetWindowPlacement, I am setting the position of an IE browser. I tested the code on Windows XP and Windows 7 and it works, but when I tried it on Windows Vista, an error code 5 (Access is denied) is returned.



Does anybody know any workaround? Or is there any other method that has the same functionality as SetWindowPlacement that works on Vista?





↑このページのトップヘ