Bind render result to texture id

I want to save the result screen of the rendering and then apply another shader on that result, the typical way is to read the screen using glReadPixels and then buffer that image to gpu and then apply my effect, so is there a way to bind the screen result to a texture id directory in gpu, instead of retrieving it back to CPU and then buffer it to GPU ?

If the all ports are filtered or closed as result of nmap scan, what would be the next logical step to take?

Is that mean I would need to get a physical access to the device? or is there any other ways to get information, I’m trying to scan my own smartphone and all the ports are closed, and I did the same with my laptop and all the ports were filtered, so, I’m kind of stuck. On the other hand, all the information I found on Internet is relying on getting more results with differents nmap scans, so I guess my real question here is , Is there any other software, teqnique or anything to do that’s not involving nmap? `

(This is not a question about what does mean filtered or closed)

`

get_comments with post_status ‘public’ retrieves NULL result

This is my loop:

<?php $  comments = get_comments(array(     'status' => 'approve',     'type' => 'comment',     'number' => 10,     'post_status' => 'public' )); ?>      <ul class="sidebar-comments">         <?php foreach ($  comments as $  comment) { ?>             <li>                 <div><?php echo get_avatar($  comment, $  size = '35'); ?></div>                 <em style="font-size:12px"><?php echo strip_tags($  comment->comment_author); ?></em> (<a href="<?php echo get_option('home'); ?>/?p=<?php echo ($  comment->comment_post_ID); ?>/#comment-<?php echo ($  comment->comment_ID); ?>">link</a>)<br>                 <?php echo wp_html_excerpt($  comment->comment_content, 35); ?>...             </li>         <?php } ?>     </ul> 

This always gives an empty result (no errors). If I remove 'post_status' => 'public' from the get_comments arguments, the function works, comments load but also comments from private posts (which I don’t want).

Any ideas on why 'post_status' => 'public' is not working?

Turning columns result set into independant rows in MySQL

I am pretty new to this and have been struggling over one issue.

I have a result set which for each Opportunity in a table (id as primary key), provides a date for a first cashflow (DFCFW) as a column and the 10 following columns (CFW1, CFW2, …., CFW10) being the 10 possible cashflows for each of the 10 following years, expected as anniversary dates of the first cashflow.

I would like to create a view which displays, for all the opportunities, three columns: opportunity.id, date of the cashflow, cashflow; there should be 10 records for each opportunity.

Any suggestion how to achieve this ?

Thank you so much

Fred

IEEE 754 addition wrong result floating point numbers

I want to add two IEEE 754 numbers. I followed the steps to add two 754 numbers. However the result it not correct. Number 1: S:0 E:01111111 M:11111111111111111111111

Number 2: S:0 E:01111111 M:00000000000000000000000

Here is my calculation:

enter image description here

The site http://weitz.de/ieee/ gives this result: S: 0 E: 10000000 M: 10000000000000000000000

in my calculation the mantissa is 01111… Why?

How can a ‘Request’ store a ‘Result’ code and its associated ‘Error’ code and still enforce the relationship between Result and Error?

I’m an application developer creating the database structure to represent a flat file message format. I’d like to ask the collective knowledge the best/correct way to represent the following scenario:

Request table (PK: RequestID) contains requests; a request has a Result property which is indeterminate (null) until the request has completed.

Result table (PK ResultID) is a lookup table containing (currently) two possible results:

  • Success (Result ID = 0)
  • Failure (Result ID = 1)

ErrorCode table (PK ErrorCodeID) is a lookup table containing error details and their parent ResultID:

  • No Error (ErrorCodeID = 0, ResultID = 0)
  • Generic Error (ErrorCodeID = 1, ResultID = 1)
  • Queue Full (ErrorCodeID = 2, ResultID = 1)
  • Unsupported Interface (ErrorCodeID = 3, ResultID = 1)
  • etc…

I’ve created a one to many relationship between Result (one) and ErrorCode (many). A ‘Success’ Result can only have a ‘No Error’ Error Code, while a ‘Failure’ Result can have a single error code of ‘Generic Error’, ‘Queue Full’, ‘Unsupported Interface’, etc.

When the Request has completed, I need to store the result and its associated error code.

I’ve thought of combining the two tables but that strikes me as repeating columns.

I’ve also thought of having the Request table store the ResultID and the ErrorCodeID but this doesn’t enforce the Result to ErrorCode relationship.

I’m a big believer in database that ‘defends itself’ from bad data so I want the relationship to reject a Result/ErrorCode combination that is invalid; a.k.a. a Result of ‘Success’ and an ErrorCode of ‘Generic Error’ or a Result of ‘Failure’ and an ErrorCode of ‘No Error’.

I’m also a big believer in solid initial design so when changes come down the pike at a later date (as they always do) the structure will not need rework.

Thank you in advance for your time.

Regards, John E.

Unable to get numerical result by using Integrate/NIntegrate

Nfunc[x_?NumericQ] :=   E^(-x^2/2)/    Sqrt[2*Pi]*(1/       2 Erf[(x - 0.256048)/Sqrt[2*1.6^2 + 0.231313^2]/Sqrt[2]] -      1/2 Erf[-Infinity/Sqrt[2]]) nume = N[NIntegrate[x*Nfunc[x], {x, -Infinity, Infinity},     Method -> {Automatic, "SymbolicProcessing" -> 0},     PrecisionGoal -> 3, AccuracyGoal -> 3], 4] den = N[Normal[    Integrate[Nfunc[x], {x, -Infinity, Infinity},      GenerateConditions -> False]], 4] nume/den 

I couldn’t get numerator nor denominator. It keeps "executing" for hours. Is there a mistake or isn’t mathematica able to perform this calculation?

I used functions with NumericQ for speeding up calculation, but no luck.

Returning random integer from interval based on last result and a seed

Suppose we have an interval of integers [a, b]. I would like to have a function that returns random members from within the interval, without repetitions. Once that all members within the interval are explored, the function would start to return the same first random sequence again, in the same order.

Example: a=1, b=5

3, 1, 4, 5, 2, 3, 1, 4, 5, 2, 3, 1, 4, 5, 2, ... 

This would be easy to achieve by shuffling an array of all elements between a and b, and repeating it once the array is finished. However, this would take too much memory space, and this is not suitable for my case (I might have millions of elements).

Instead, the function I’d like to have would be more or less like this:

f(a, b, n, seed) -> n+1 

Where:

a - start of interval b - end of interval n - last element returned from list seed - self-explanatory n+1 - next random element from list, calculated by using the seed and the last element returned (n) 

The trick is knowing some way to get a non-repeated number from the interval based only on the element returned before and the seed. In the end, it would behave like a circular list randomized at its initialization, but without using memory space.

What is the theoretical result of flattening a list containing only itself?

Consider the following python code

X = [None] X[0] = X 

This has many fun properties such as

X[0] == X 

and

X[0][0][0][0][0][0][0][0] == X 

I understand how this works from a practical standpoint, as it’s all just the same pointer.

Now, when flattening a list, we tend to convert things from

[[1, 2, 3], [[4, 5], [6, 7]], 8, 9] 

to

[1, 2, 3, 4, 5, 6, 7, 8, 9] 

In this case, I am considering flattening to be reducing a multi-dimensional list down to a single list of only non-list elements.

In practice, flattening this list would be impossible, as it would create an infinite loop.

This may be more mathematical in nature, but I’m unsure how to put it in mathematical terms. Suppose we could flatten this list, would the result simply be the empty list?

For context, I initially got this idea by considering the list

X = [[], []] X[0] = X 

It is clear to see that at each pass of flattening, the empty list that is the second element simply disappears. This lead me to think that the overall result, may be the empty list.

Could it be possible that flattening this list would theoretically produce an infinitely long list of the list itself, as in

X == [X, X, X, X, X, X, ..., X] 

This is purely a fun thought exercise. Any insight and discussion on this would be appreciated.

P.S. Although I’m looking for an answer in plain terms, if anyone is more mathematically inclined, I would be interested to see how this problem could be formulated in some sort of set notation. Please feel free to point me to a relevant math exchange thread as well.

P.P.S. I would also be interested in a solid proof (not formal) to go along with the answer.