SMPP registered_delivery - smpp

I would like to know where to add this parameter in the
SMPP bind, so its default value will be changes from 0 to 1.
To be more clear I would like that this parameter to be set to 1 in
the submit_sm.
Thanks.

SMPP 3.4 spec, section 5.2.17 can answer most of your question.
"registered_delivery" field is used to request for delivery confirmation(s). This field can only be set at PDU level, not a bind level.
There are different types of delivery confirmation. You can request for none, one, some or all of them. registered_delivery is represented by 1 byte and is set to 0x00 by default; this means all types of delivery confirmation is disabled. You need to set different bits to override.
Here is a list of possible configurations:
For SMSC Delivery Receipt (bits 1 and 0)
x x x x x x 0 0 => No SMSC Delivery Receipt requested (default).
x x x x x x 0 1 => SMSC Delivery Receipt requested where final delivery outcome is delivery success or failure.
x x x x x x 1 0 => SMSC Delivery Receipt requested where the final delivery outcome is delivery failure.
x x x x x x 1 1 => Reserved.
For SME originated Acknowledgement (bits 3 and 2)
x x x x 0 0 x x => No recipient SME acknowledgment requested (default).
x x x x 0 1 x x => SME Delivery Acknowledgement requested.
x x x x 1 0 x x => SME Manual/User Acknowledgment requested.
x x x x 1 1 x x => Both Delivery and Manual/User Acknowledgment requested.
For Intermediate Notification (bit 5)
x x x 0 x x x x => No Intermediate notification requested (default).
x x x 1 x x x x => Intermediate notification requested.
As you can see, it's possible request for 3 different types of delivery confirmations.
Sending request for one or more types of delivery confirmation does not guarantee that it will be obliged by the SMSC. It is up to the SMSC how exactly it will implement it.

Related

Is it possible to write (0 < x <5) in a conditonal statement. Where x is a variable. IN PYTHON

I set variable x = 0. But under a while statement I changed it to x+=1. I'm trying to account for when x is in between 1 and 4 while also accounting for when x is over 4.

Fast R-Cnn and problems with spatialScale in BrainScript

I have the following code:
model (features, rois) = {
convOut = convLayers (features)
roiOut = ROIPooling (convOut, rois, (9:9),spatialScale=64.0/196.0)
z = fcLayers (roiOut)
}.z
Original taken from: cntk\Examples\Image\Detection\FastRCNN\BrainScript
What is spatialScale in ROIPooling and how do I calculate it?
If have found this in the output from the cntk.exe.
Validating --> z.convOut.z.rn3.r.r = RectifiedLinear (z.convOut.z.rn3.r.r._) : [49 x 49 x 64 x *] -> [49 x 49 x 64 x *]
Validating --> rois = InputValue() : -> [4 x 1000 x *]
Validating --> z.roiOut = ROIPooling (z.convOut.z.rn3.r.r, rois) : [49 x 49 x 64 x *], [4 x 1000 x *] -> [9 x 9 x 64 x 1000 x *]
spatial scale is the ratio of the spatial resolution of the input to the ROI and the spatial resolution of the input image to the network. 1/16.0 is the value used in the original Fast and Faster R-CNN implementation, this value depend on the network.
Pretty much, spatial scale is the scale of the input to ROI relative to the original image.
Thanks,
Emad

Verilog Signed Multiplication of large values

So I am working on DSA processor that must multiply large signed values to check if they fit onto a curve. The function I am using works in python given the same values, but when passed in Verilog I am getting incorrect results. I believe it has to deal with my signed values for y & x. During testbenching multiplying x or y by itself gave incorrect values.
module on_curve (
input wire signed [511:0] point
);
reg signed [255:0] x, y;
always#*
begin
x = point[511:256];
y = point[255:0];
if ((y * y - x * x * x - 0 * x - 7) % 256'hFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F == 0) begin
$write("This value is on the curve");
end
if ((y * y - x * x * x - 0 * x - 7) % 256'hFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F !== 0) begin
$write("This value is not on the curve");
end
end
endmodule
The value i'm using for "point" is
512'h79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8;
which is the generator point for the DSA so it should fall onto the curve.

What does a percentage sign (%) do mathematically in Objective C?

I am super confused what the percentage sign does in Objective C. Can someone explain to me in language that an average idiot like myself can understand?! Thanks.
% is the modulo operator, so for example 10 % 3 would result in 1.
If you have some numbers a and b, a % b gives you just the remainder of a divided by b.
So in the example 10 % 3, 10 divided by 3 is 3 with remainder 1, so the answer is 1.
If there is no remainder to a divided by b, the answer is zero, so for example, 4 % 2 = 0.
Here's a relevant SO question about modular arithmetic.
Same as what it does in C, it's "modulo" (also known as integer remainder).
% is the modulo operator. It returns the remainder of <number> / <number>. For example:
5 % 2
means 5 / 2, which equals 2 with a remainder of 1, so, 1 is the value that is returned. Here's some more examples:
3 % 3 == 0 //remainder of 3/3 is 0
6 % 3 == 0 //remainder of 6/3 is 0
5 % 3 == 2 //remainder of 5/3 is 2
15 % 4 == 3 //remainder of 15/4 is 3
99 % 30 == 9 //remainder of 99/30 is 9
The definition of modulo is:
mod·u·lo
(in number theory) with respect to or using a modulus of a specified number. Two numbers are congruent modulo a given number if they give the same remainder when divided by that number.
In Mathematics, The Percentage Sign %, Called Modulo (Or Sometimes The Remainder Operator) Is A Operator Which Will Find The Remainder Of Two Numbers x And y. Mathematically Speaking, If x/y = {(z, r) : y * z + r = x}, Where All x, y, and z Are All Integers, Then
x % y = {r: ∃z: x/y = (z, r)}. So, For Example, 10 % 3 = 1.
Some Theorems And Properties About Modulo
If x < y, Then x % y = x
x % 1 = 0
x % x = 0
If n < x, Then (x + n) % x = n
x Is Even If And Only If x % 2 = 0
x Is Odd If And Only If x % 2 = 1
And Much More!
Now, One Might Ask: How Do We Find x % y? Well, Here's A Fairly Simple Way:
Do Long Division. I Could Explain How To Do It, But Instead, Here's A Link To A Page Which Explains Long Division: https://www.mathsisfun.com/numbers/long-division-index.html
Stop At Fractions. Once We Reach The Part Where We Would Normally Write The Answer As A Fraction, We Should Stop. So, For Example, 101/2 Would Be 50.5, But, As We Said, We Would Stop At The Fractions, So Our Answer Ends Up Being 50.
Output What's Left As The Answer. Here's An Example: 103/3. First, Do Long Division. 103 - 90 = 13. 13 - 12 = 1. Now, As We Said, We Stop At The Fractions. So Instead Of Continuing The Process And Getting The Answer 34.3333333..., We Get 34. And Finally, We Output The Remainder, In This Case, 1.
NOTE: Some Mathematicians Write x mod y Instead Of x % y, But Most Programming Languages Only Understand %.

What are the optimizations facilitated by -ffinite-math-only?

All the info I can find in documentation and the web for -ffinite-math-only is "Allow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or +-Infs." This does not seem forthcoming to me. Does anyone know exactly what those optimizations are?
Thanks
Lots of little things can be optimized under that assumption, like:
x == x --> 1
x * 1 --> x
x >= y --> !(x < y) and similar.
x/x --> 1 if the compiler can prove x != 0.
it may allow a compiler to use hardware max/min instructions for expressions like x > y ? x : y.
... lots more
You often see this assumption together with assumptions like "sign of zero doesn't matter", which then allows things like:
x - x --> 0
0 / x --> 0
x * 0 --> 0