Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a problem:
My app allow user choose 2 options : Metric or Imperial.
If user select "Metric", height(cm), weight(kg).
If Select "Imperial: height(inch) and weight (lbs).
I need to change value of height from inch to centimeter and weight from lbs to kg.
Example :
user input : 70 (inch) and 120 (lbs) ==> convert to 177.8 (cm) and 54.5 (kg)
Thanks in advance.
The best example of unit convert is below link..
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Basically, I have two points, A and B that are 10 miles apart if you drive. I draw a route using driving directions between them using MapKit.
I want to find point C's latitude and longitude, which is at the point on the route 2 miles from point A. This could also work based on a percentage(ex: 20% of the route is completed between point A and B).
Hopefully, this image can explain better then I can.
Does anyone have any idea on how to do this using Swift and MapKit?
Thanks!
You may want to check out the MKRoute response you receive from the MKDirections.
An MKRoute object defines the geometry for the route—that is, it contains line segments associated with specific map coordinates.
You will find the documentation for MKRoute here:
https://developer.apple.com/documentation/mapkit/mkroute
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
I recently saw a marketing video that cited the "Perabyte" as a unit of disk storage measure. I emailed a representative responsible for the video and got a response that "1 Perabyte (PB) = 1024 Terabytes (TB)."
A quick google search seems to indicate that a Petabyte is defined as 1000 TB.
Is a Perabyte a real thing, and is it 1024 (vs 1000) TB?
Edit: This thread has answered my question, despite the votes to close. No one has heard of a "Perabyte" except as a misspelling of "Petabyte." Thanks.
Edit (2): Petabytes have been tagged real by "BRIGHT SIDE"
A perabyte doesn't exist, but a petabyte is a real thing. It is
2^50 bytes; 1024 terabytes, or a million gigabytes.
It seems likely that your perabyte was the result of a typo, seeing as 'r' and 't' are close on the keyboard.
The 1024 versus 1000 question most likely arises from which base you are using.
1024 is base 2, 1000 is base 10.
See https://en.wikipedia.org/wiki/Petabyte
A petabyte is 10005, or 1000 terabytes.
A pebibyte is 250, or 1024 tebibytes.
A perabyte is not a thing.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am working with delphi.How do i get the total number of elements in a stack and retain the stack after the process.I am aware that this can also be achived by creating a temporary stack and copying the original stack to the new one (temp),so as to then pop the elements from the temp while counting, but i am not allowed to use this formular. Can somebody help me with an algorthm that achieves my task please!
If you are using the generic TStack collection class in Delphi XE4 then the number of elements currently in the stack is already exposed directly via the Count property:
var
myStack: TStack<Integer>;
begin
myStack := TStack<Integer>.Create;
myStack.Push(42);
ShowMessageFmt('Stack contains %d elements', [myStack.Count]);
myStack.Free;
end;
However, since you presumably have not found this property then it is possible you are using some other stack implementation.
Determining how best to access the same information about the stack from the implementation you are using is impossible without further details about that particular implementation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
In my app i have n arrays of annotations in my app, foodannotations, gasannotations, and shoppingannotations. I want each array of annotations to show a different colored pin. I am currently using.
Already a discussion was been done regarding this. Please search question if it is already available before you ask. Thanks.
Pls refer the following links:
iPhone SDK: MapKit multiple custom annotations
Multiple Arrays of Annotations, Different Pin Color for Each Array?
Do this in viewForAnnotation:
int annType = ((YourAnnotationClass *)annotation).annotationType;
switch (annType)
{
case 0 : //Food
pinview.pinColor = MKPinAnnotationColorRed;
case 1 : //Gas
pinview.pinColor = MKPinAnnotationColorGreen;
default : //default or Shopping
pinview.pinColor = MKPinAnnotationColorPurple;
}
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it possible to limit the size of attachment that can be send or received in qmail. Its to stop mail forwardings with large sizes amoung employees.
The maximum message size for emails in a qmail-installation is normally defined by the following file:
./qmail/control/databytes
The size is defined in bytes. Example:
50000000
Limit would be: 50000000Bytes = 48,828Kb = 47,68MB