php – Setting field required and empty value

I am attempting to set the age drop down as a required field. Also setting an empty “–” value, so that a value must be selected. Currently, people just leave it as “18” because it is already there.

Here is an example of having a required field:

            <div class="row form-group">
            <div class="col-md-12">
                <input  type="text" id="guestUsername" class="form-control fadeIn second" name="username" placeholder="Enter username" required>
            </div>
        </div>

This is the field I need to modify and unsure how to:

        <div class="row form-group fadeIn second">
            <div class="col-md-4">
                <select class="form-control" name="age" id="age">
                    <?php for($age=18;$age<99;$age++):?>
                    <option value="<?=$age?>"><?=$age?> years</option>
                    <?php endfor;?>
                </select>
            </div>

Are UV filters required for shooting film?

The light sensitive goodies in photographic film are naturally only sensitive to ultraviolet, violet, and blue light. These blue only sensitive films yield images that sometimes appear strange. Red objects like lipstick lips and rouged cheeks reproduce dark gray, maybe even black. Photo scientist learned to add dye to the film emulsion. These change the color of silver salts forcing them to absorb green and red light. First came orthochromatic (blue & green sensitive) followed by panchromatic (red – green – blue sensitive. Such treated films never lose their sensitivity to the blue regions of the spectrum.

Under ordinary conditions, the fact that films are highly sensitive to UV, are of no consequence. This is because most camera lenses are made of glass. Glass blocks a high percentage of the UV energy. There are situations when a UV filter can be quite helpful. We are talking about the specialty of imaging objects that exhibit fluorescence when illuminated with UV light. Additionally, mounting a UV filter when doing high-altitude aerial photography. This is because, at high- altitude, the air that normally absorbs UV is scant.

In everyday photography, mounting a UV filter works to cut the distant haze present in mountain vistas. Let me add, the UV filter is not effective for distances under several miles.

In recent times the UV filter has been pushed as insurance against accidental scratching and other perils. This concept gives piece of mind however it mainly serves to line the pockets of suppliers of camera paraphernalia.
Modern digital cameras are less susceptible to the effects of UV energy. These too use glass lenses plus the protective cover glass that overlays the image sensor blocks UV and IR radiation.

Let me add, good filters must be optically flat. From a technical viewpoint, making an optical flat is quite difficult. In other words, we mount filters only when the benefit outweighs the bad.

microservices – Thought process required to design domain aggregate in micro service architecture?

I am using DDD pattern in login micro service used in employee management software. Here Organization/Company is an Entity and User is one more entity.

What are my aggregates in this case, if i think with project in mind which is login i will have only one aggregate(user aggregate) but if i think as business in my mind i will get two aggregates(Organization,User).

I might be wrong too with above aggregates. My basic question is what is the thought process when designing a aggregate in micro service? is it with respect to project or business as whole?

workflow – What permissions are required to invoke a custom WCF web service deployed to the ISAPI folder (exposed through /_vti_bin/)?

Related / follow up to this question.

Because a site’s email settings (SMTP server, “from” address, etc.) are not available through any client-side APIs, I created a mini WCF web service that is deployed to the ISAPI folder. It takes a site’s URL as a query parameter, and uses that to open SPSite and SPWeb objects in server side code, retrieve the email settings, and then return that in a simple JSON payload.

It works perfectly fine when I test it from Postman.

But the main reason I need it is because I need to use the HttpSend web request action inside a VisualStudio declarative custom action (.xaml file) in order to get those settings and send them on into a custom code activity run by Workflow Manager. (I’ve gotten CSOM code to run inside the custom code activity, but again, I can’t get those settings from any client APIs.)

I’m used to the general rule that a workflow will run with the permissions of the person who initiated it, but when I test my workflow and it gets to that step, I’m getting a 401 UNAUTHORIZED. And not only that – as one of the first lines in my web service method, I log to ULS that the web service was invoked. I can see those log entries from the times that I invoke the web service from Postman, but I don’t see them for when I tried it with the workflow. Which means to me that it’s not even choking on the part where I SPSite site = new SPSite(siteURL). It’s not even getting that far because the initial log entry isn’t there.

So… what permissions do I need to set up to enable a workflow to invoke a custom WCF web service at <site>/_vti_bin/path/to/service.svc?

I’m no expert at WCF, so I haven’t set up anything that I can see around authentication/authorization there. Do I need to do something explicit there? (Why would I, if it works for me from Postman as it is currently set up?)

Do I need to set up workflows to run with elevated permissions using the whole app permission model? If so, what would the minimum permission level need to be just to get the WCF service to run? I’d rather not give workflows full control on the site, and I have no problem using SPSecuity.RunWithElevatedPrivileges inside the web service to retrieve the values I need, as long as I can get it invoked in the first place.

queue – How to reduce the overhead and processing power required for this FIFO for a 2D array in ANSI C?

I have a 2D array of fixed size and I’ve implemented a FIFO function. So, the array will always be full before it reaches the FIFO function, then the FIFO will remove the oldest array, move all of the arrays up by one and then add the newest array to the other end. Basically a queue. Now, this code will actually be running on a microcontroller, an array will come from an ADC and then I store the ADC array in a 2D array. To design the FIFO algorithm in simple C first, I have written a program that generates random numbers and then stores them into a 2D buffer. The program then asks the user what new values should be stored, user puts in the latest array of values and then the program removes the oldest array, shuffles all the remaining arrays up by one and then the latest user numbers get added to the end. The program does this 10 times. This is designed to simulate what is happening in the microcontroller code. The 2D array is already full with values and then the ADC adds the latest set of values to the array, and the oldest set are forgotten.

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int fixed_number(5) = { 0 };
uint16_t big_array(10)(5) = { 0 };
uint16_t big_array_copy(10)(5) = { 0 };
uint16_t small_array_1(5) = { 0 };
uint16_t k(1) = { 0 };
uint8_t count = 0;
int main()
{
    for (int j = 0; j < 10; j++)
    {
        for (int i = 0; i < 5; i++)
        {
            big_array(j)(i) = rand() % 255;
        }
    }
    for (int j = 0; j < 10; j++)
    {
        for (int i = 0; i < 5; i++)
        {
            big_array_copy(j)(i) = big_array(j)(i);
        }
    }
    printf("These are the original numbers in the big array:n");
    for (int j = 0; j < 10; j++)
    {
        for (int i = 0; i < 5; i++)
        {
            k(0) = big_array(j)(i);
            printf("%d,", k(0));
                    }
        printf("n");
            }
    while (count < 10)
    {
        printf("Please enter values for queue:n");
        for (int i = 0; i < 5; i++)
        {
            scanf_s("%d", &fixed_number(i));
        }
           printf("nn");
        printf("Array values have been swapped:n ");
        for (int k = 0; k < 5; k++)
        {
            big_array_copy(10 - 1)(k) = 0;
        }
                for (int j = 9; j > 0; j--)
        {

            for (int i = 0; i < 5; i++)
            {
                //small_array_1(i) = big_array(j + 1)(i);
                big_array_copy(j)(i) = big_array(j - 1)(i);
            }
        }
        for (int i = 0; i < 5; i++)
        {
            big_array_copy(0)(i) = fixed_number(i);
        }
        for (int j = 0; j < 10; j++)
        {
            for (int i = 0; i < 5; i++)
            {
                k(0) = big_array_copy(j)(i);
                printf("%d,", k(0));
            }
            printf("n");
        }
        for (int j = 0; j < 10; j++)
        {
            for (int i = 0; i < 5; i++)
            {
                big_array(j)(i) = big_array_copy(j)(i);
            }
        }
        count++;
    }
}

Now this code works perfectly fine, but there is a lot of loops and it also requires twice the memory space as the buffer, big_array()() must be copied in to big_array_copy()(). In the real application, the buffer is uint16_t somebuffer(100)(45) which is 4.5kb. I’ve got 512kb of SRAM to use, but I’d rather use as little as I can.

The above method can be implemented on my target platform (STM32F767 for those wondering) but is there a more simple method to implementing the above, that uses fairly portable c with no special functions, that could reduce the memory required and the processing time required?
thanks

AMD Ryzen Dedicated Server Advice (2 Locations Required)

Hello,

I am currently looking for the best deals I can get for 2 Windows Dedicated Servers. My preferred configuration is a single 5950X … | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1838324&goto=newpost

product – Magento 2 – Show non required custom option only when customer is logged in/with dependency

I have 2 custom options (radio buttons) for a product with 2 option values each

  1. Custom Option A

  2. Custom Option B

Requirement:
Custom Option B should be visible only when

  • Customer is logged in
  • Value A2 is selected from Custom Option A

How can this be achieved?

customs and immigration – (Type D visa holder) How much proof is required when validating

I am a non-eu citizen however I hold a German residence permit (type D).

I am entitled to travel to other Schengen countries for 90 days out of every 180 days.

My question is this:

If was to be in a Schengen country other than Germany and an immigration officer asked me to prove that I had been there less than 90 days, how much proof would I need to provide to be given clearance? Would a train ticket showing my date of arrival be enough? Would I also have to show bank transactions proving that I was in Germany prior to the date on the train ticket?

I am just wondering how thorough they are when it comes to validating the evidence of location provided by a traveller. It seems as though it would be pretty easy to buy a train ticket but not actually take the train and then use it as (fake) evidence of your whereabouts.

Am I wrong?

Honest and straight forward review of health blog required

Hi there,
Can someone honestly review my health blog https://myhealthyfitnesstips.com/ considering all major aspects.
Thanks for your suggestions.

Google Forms – two required questions – accept with at least one of them

I collect links to historical records describing persons falling into certain categories (e.g. secret Protestant or vampire/witch case). User specifies the Category with a checkbox answer (multiple options possible).

I want to add more options, describing professions. But now the checkbox list would be too long.

I want to do either:

  1. Add a separate question Profession. One of the the two questions Profession and/or Category must be filled in (required question) or
  2. Format the Category question so that the options are organized into sections or the checkboxes appear in multiple columns.

I do not want to add additional form page.