What the line numbers in hexdump means? [closed] - hex

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I tried to find some explanation in internet about what the line numbers in hexdump means and why they are ordered 00000000, 00000010, 00000020 and not 1,2..a..a2 etc. but it was unsuccessful. Can some one help me understand this one?

The "line numbers" are actually byte offsets at the beginning of each line, represented in hex notation.
Since there are 16 bytes per line, and the first line starts with byte #0, the offsets are:
00000000
00000010 (which means 16 in decimal)
00000020 (which means 32 in decimal)
... etc

Related

How can I make Non-English quotation marks with a help of CSS? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I usually write "" quotation marks but in some Non-English countries you need to write „“. And I am curently working on Non-English website and have no idea how to write Non-English quotation marks with my keyboard. So I was thinking maybe CSS could help me. Any help or ideas about the code? More on Non-English quotation marks: http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks
You could use the q element instead of quotation marks, since browsers are supposed to add language-specific quotation marks, provided that the language is indicated in markup, e.g. with <html lang=de>. However, IE 7 and older do not support q. And you don’t really gain anything by using q, as opposite to having quotation marks in the content.
You should check the quotation mark practices from reliable sources. (See e.g. Chicago Manual of Style, which describes the practices of several languages, or check the CLDR Charts.) It depends on the authoring environment how you implement them – using the characters themselves is usually best, but if you find this inconvenient, you can use entity references.
Specifically for German, there are two practices: using U+201E DOUBLE LOW-9 QUOTATION MARK and U+201C LEFT DOUBLE QUOTATION MARK, „this way“, and using U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK and U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK, »this way«. Using q, browsers use the former; the latter could be requested for using the quotes property in CSS.
If you decide to use the q element, note that it is the language of the enclosing element (language of the surrounding text), not the language of the q element (language of the quoted text), that dictates the choice of quotation marks. For example, quoted text in German should have English quotation marks around it, if it appears in an English-language document.
You can use HTML entities for those:
„quote“
Result:
„quote“
You can also use the unicode character codes:
„quote“

I dont understand recursive functions [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Write a recursive function that computes the value of the recursively defined function
F(n)= -F(n-2), F(0)=1 and F(1) = -2. Iv been staring at this for hours i don't understand. Thanks for help.
Like any programming problem, you can first express the solution using pseudo code, and then move on to implementing it in your language of choice, e.g.
FUNCTION F(n)
IF n == 0 -- recursion terminates when n = 0, with result 0
RETURN 0
ELSE IF n == 1 -- recursion can also terminate when n = 1, with result -2
RETURN -2
ELSE -- otherwise recursion contiunes with F(n - 2), F(n - 4), ...
RETURN -F(n - 2) -- until one of the terminating conditions is reached
END
From here it should be quite straightforward to implement this function in C++ or whatever language you choose. Be sure to also implement a "test harness", i.e. a function which calls F with a range of different input values and then prints the result, so that you can verify whether the function is behaving correctly and debug it if necessary.

manipulating lists in common lisp [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
how does one create a list from a list,what function can i really use i was thinking of using mapcar or maplist with cons together but im not getting any fruitful results,lets say i have a list (a b) then i want a function that will create a list containing the same elements but they should be inform of lists like this ((a) (b)) ,any ideas on how i can solve this problem?? is there a function a use to it?
if i have a list(a b)
the result should be ((a)(b))
thanks guys
What you want to do is this:
(defun listify(ls)
(mapcar (lambda (elem) (list elem)) ls))
EDIT
Which is the same as (Thanks to #RainerJoswig):
(defun listify(ls)
(mapcar #'list ls))
And if you do:
(listify (list 1 2 3))
or
(listify '(1 2 3))
The output will be:
((1) (2) (3))

Get only decimal part in float number in SQL Server [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have following number in SQL Server 2008 : 5.4564556
I just want to get only 4564556 from 5.4564556
it would be better if i can get only 4 among 4564556 that is first digit of fractional part..
How can i do it?
Thanks
You can try in this way :
SELECT (5.4564556 % 1)
You can also use FLOOR():
SELECT Value - FLOOR(Value)
In your case:
5.4564556 - 5 = 0.4564556
in case of negative value you can use ABS
SELECT ABS(Value) - ABS(FLOOR(Value))
To get all the numbers behind the '.', you can (ab)use PARSENAME
select PARSENAME(5.4564556,1)
returns 4564556
Refer also to SQL - How do I get only the numbers after the decimal?
you can get first four decimal parts by :
select SUBSTRING (PARSENAME(5.4564556,1), 1, 4)
Try this
select cast(5.4564556 % 1 * 10 as int)

2D matrix of QStrings [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to make an application with which you can reserve ticket for your travel. In fact, I'm designing the system for an airline. When I want to create a database (a 2D matrix that saves the number of seats in flights), it gives me errors.
The number of flights set in different place and the number is changing this is my code:
QString** matrix = new QString*[numberofFlights];
for (int i = 0; i < numberofFlight; i++)
{
matrix[i] = new QString[numberofSeats];
}
What class in Qt should i use?
A must-read: Qt container classes.
You could use QVectors or QLists or another container class. For example, to build a vector of vectors:
QVector< QVector<QString> > matrix(numberOfFlights);
for (int i=0; i<numberOfFlights; i++)
matrix[i].fill("", numberOfSeats);
This will create numberOfFlights vectors, that each contain numberOfSeats empty strings.
To set a specific seat:
matrix[flight][seat] = "whatever";
You can iterate over the vectors with the usual Qt foreach, or iterators, or plain for.

Resources