sql server: correct way to add a new column in the database

What is the appropriate approach when we add a new column to the existing table? For example, I already have columns like, Foo1, Foo2, Bar1, Bar2. I want to add a new column called Foo3. What is the standard approach (if so) when I want to add a column with a similar name?

I see 2 options,

  1. Create a temporary table with a new structure where the new column is next to the columns with the same name, copy data to the new table from the existing table and release the existing table and rename the temporary table. Complex bit process, but makes the database fields more readable.
  2. Add new column at the end. Simpler operation But column names could not It will be clearly understood if in the end.

To obtain some reference, we are using Database Projects to control changes in the database and we have a more pleasant GUI for application developers to make changes to the database. And we are using some type of ORM to interact with the database, so that no one queries the database using names of database objects.

seo: Mozbar does not display the correct PR / DA information

I just installed Mozbar and I worked a few days well. Now it shows page rank – 1 / Domain Authority – 1 in all search results like this.

enter the description of the image here

Uninstall extension and reinstall,
Chrome browser updated to the latest,
Chrome remove and reinstall

Nothing worked 🙁 He finally contacted the moz team and sent a video tutorial for general problems, without addressing this error.

How can i fix this?

hash: can't find z1 and z2 correct for the transaction

I've been trying to understand the problem and repeat Willem Hengeveld's answer, but I think I'm not getting the correct script for the hash.

I am looking for this transaction, my scripts are:

010000000396773312284612e55b124e19b885038f625ce18f99711c9138d22c391a2abc86000000001976a914fa6b5cff131a62d212f5c99d8bfaf35a9299ad5288acffffffff2f4fcd2541be1e286b7eee1a24bf0b9d6a6333c05ed7955d083f0778e2a23efc0000000000ffffffff40dc504498fa0ff41f2a6d882b640a17a4fbdb96a34ff28ad7f83c85fd78521e0000000000ffffffff0240420f00000000001976a91406f1b66ffe49df7fce684df16c62f59dc9adbd3f88ac66732c00000000001976a914fa6b5cff131a62d212f5c99d8bfaf35a9299ad5288ac0000000001000000

010000000396773312284612e55b124e19b885038f625ce18f99711c9138d22c391a2abc860000000000ffffffff2f4fcd2541be1e286b7eee1a24bf0b9d6a6333c05ed7955d083f0778e2a23efc000000001976a914fa6b5cff131a62d212f5c99d8bfaf35a9299ad5288acffffffff40dc504498fa0ff41f2a6d882b640a17a4fbdb96a34ff28ad7f83c85fd78521e0000000000ffffffff0240420f00000000001976a91406f1b66ffe49df7fce684df16c62f59dc9adbd3f88ac66732c00000000001976a914fa6b5cff131a62d212f5c99d8bfaf35a9299ad5288ac0000000001000000

And the double SHA256 are:

z1 = 1a374484e71c12135cda76c1261801e9f8fc27108e3f5e439679ef13eb300eae

z2 = e366e7bc7d5c12808b88e1b89c27436ac9cb3ae482dd044faeb7fab4654cbeac

Even applying +/- for s1,s2 I am getting those 4 private keys:

68d4ee844087fc39a62269c41a2c7d521966aa9687a596ab9207e997ddee0ba3
5d201313d68f45cfd5b187584efe4e5d9579a571a0876a3e1fb649ed91942897
a2dfecec2970ba302a4e78a7b101b1a1253537750ec135fda01c149f3ea218aa
972b117bbf7803c659dd963be5d382aca148325027a309902dca74f4f248359e

That did not correspond to that public key. What am I doing wrong?

The Linux upower and acpi battery (in T430) does not display the correct information

I have purchased a used Thinkpad T430. When using it, everything seems stable and works like a champion. It didn't come with a battery, so I bought a battery from the aftermarket "DTK". I updated the BIOS using the well-known github patch, to avoid Lenovo's attempt to only allow it to use original OEM batteries. The battery charges and I can use it.

Sometimes the battery status is reported correctly. I am using gnome-power-statistics shows me a graph of how it works over time. Using upower and acpi from the command line to reveal its status.

But then, suddenly, out of nowhere, at different load levels, suddenly shows 0%, empty. Once it does, restart, remove / reinsert the battery, it does not fix it. I cannot get the battery charge level information at that time. The battery is not really empty. I can use it for the expected number of hours. The battery charges and discharges at the expected speeds. Except the information about the charge suddenly disappears. I have looked to see if there is a bad connection between the pins of the laptop and the battery. Looks good. I wonder if there is a loose contact with a flat cable on the motherboard, perhaps, I have not yet checked.
I wonder if the battery itself is bad. Does the battery have an integrated computer that informs the laptop of its status? Are secondary market batteries expected to be flaky when it comes to reporting their charge? Or maybe the whole process of charging, discharging, downloading time and measuring voltage and so on, is done completely at the end of the laptop, while the battery is just a bunch of cells in a case without any logic?

Does anyone have any idea how to fix it further and find a solution / solution / solution, before complaining to the battery seller asking for a replacement or a refund?

sql server: is this database model correct for the university?

The educational system in our country is a bit different from the international one, we take the subject throughout the year and finish the year with the same subject and we have 4 main exams during the year (first exam, mid-year exam, second exam, exam of the last year), so I make the database model but I'm not sure if it is correct or not.

enter the description of the image here

Python Caesar Cipher – Going through a set of chain rotations until the correct index is found

I am building a Ceasar Encryption in Python. My program has 3 options: encode, decode or exit. If the user chooses to code, the program requests a string to code and an integer number of rotation. The output is the coded word. Example: The string "this" in a regular alphabet string has indexes of 19-7-8-18. If you rotate the alphabet in an integer of 3, the new letters in these indexes would be & # 39; wklv & # 39 ;. I did this by configuring a "for" loop. Using string segmenters, the rotated alphabet will be just a concatenation of the alphabet (n: 26) and alphabet (0: n).

If the user chooses to decode, the program requests an encoded string to decode, a plain text word that appears in the text, and the desired output is the integer number of rotation needed to decode the text. (If the program receives a word that belongs to the decoded string, then the program looks for a rotation that finds the world in the decoded string, which is the proper rotation.)

I have downloaded the coding part, but I have problems with the decoding part. With the entries of a decoding string, as well as a word that belongs to the decoded string, I want the program to go through all the rotations (1-25) and return the rotation index that decodes the code. If the program cannot find a match after 25 rotations of the alphabet, you must print a message indicating it. I am having trouble implementing this part of code decoding and any suggestions would be greatly appreciated. Here is the code I have so far:


#Initialize the program
choice = ''

#Choose whether you want to encode, decode, or quit
choice = input("Input a command. Available commands:" +   
               "'e' to encode a string," +  
               "'d' to decode a string," +  
               "'q' to exit the program: ")
options = ('e','d','q') #Store the available options in a list
while choice not in options:
    print(choice,'is not a valid command.')
    choice = input("Input a valid command. Available commands:" +   
               "'e' to encode a string," +  
               "'d' to decode a string," +  
               "'q' to exit the program: ")
#Encode options
if choice == 'e':
    msg = input('Enter a string to encode: ')
    n = int(input('Enter a rotation integer between 1-25: '))
    while n not in range(1,26):
        print('Rotation integer not valid. Please enter an'  +  
                  'integer between 1 and 25.')
        n = int(input('Enter a rotation integer between 1-25: '))

    import string as s
    a = s.ascii_lowercase
    b = s.ascii_uppercase

    rotated_a = (a(n:26) + a(0:n))
    #print(rotated_a)

    for x in msg:
        if x.islower():
            i = a.index(x)
            encoded_message= rotated_a(i)
            print(encoded_message, end='')  
        else:
            i = b.index(x)
            encoded_message= b(i)
            print(encoded_message, end='')

elif choice == 'd':
    encoded_string = input('Enter a string to decode: ')
    plain_text = input('Enter a plain-text word that appears '+ 
                       'in the string: ')

c ++ – How to correct obtaining HWND from SDL2?

I use Urho3D that uses SDL2 as a window system. I want to create another window as a GUI and make it secondary to the main Urho3D window.

What I did is:

// insde virtual void Start() // Urho3D app
SDL_Window * sdlw = context->GetSubsystem()->GetWindow();
int width = context->GetSubsystem()->GetWidth();
int height = context->GetSubsystem()->GetHeight();
HWND mw = SDLWindows::GetWindowHWND(sdlw);
wpfC = WPFI::CreateWPFControl(0, 0, width, height);
HWND www = SetParent(wpfC, mw); // SetParent is windows function
if (www == NULL)
{
    std::cout << "------------------------------n"
        << "www = NULLn"
        << GetLastError() << "n"
        << "------------------------------n";
}

HWND SDLWindows::GetWindowHWND(SDL_Window * wnd)
{
    SDL_SysWMinfo sysInfo;
    SDL_VERSION(&sysInfo.version);
    SDL_GetWindowWMInfo(wnd, &sysInfo);
    return sysInfo.info.win.window;
}

I have Invalid window handle (1400) Error on SetParent().

I'm not sure if I'm doing well, but I'm sure my wpfC It's fine because I have another test project in which it works, but instead of the SDL window, I use the win32 window.

I think SDL_GetWindowWMInfo() Give me a wrong handle.

The question is how to get HWND since SDL_Window correctly and make sure it is correct HWND?

If it is not possible to do it that way, is there another way to create a secondary window from HWND inside the main window of SDL2?

c ++ – Urho3D SDL_GetWindowWMInfo and Invalid window identifier (help) How to correct obtaining HWND from SDL2

I use Urho3D that uses SDL2 as a window system. I want to create another window as a GUI and make it secondary to the main Urho3D window.

What I did is:

// insde virtual void Start() // Urho3D app
SDL_Window * sdlw = context->GetSubsystem()->GetWindow();
int width = context->GetSubsystem()->GetWidth();
int height = context->GetSubsystem()->GetHeight();
HWND mw = SDLWindows::GetWindowHWND(sdlw);
wpfC = WPFI::CreateWPFControl(0, 0, width, height);
HWND www = SetParent(wpfC, mw); // SetParent is windows function
if (www == NULL)
{
    std::cout << "------------------------------n"
        << "www = NULLn"
        << GetLastError() << "n"
        << "------------------------------n";
}

HWND SDLWindows::GetWindowHWND(SDL_Window * wnd)
{
    SDL_SysWMinfo sysInfo;
    SDL_VERSION(&sysInfo.version);
    SDL_GetWindowWMInfo(wnd, &sysInfo);
    return sysInfo.info.win.window;
}

I have Invalid Window Handle (1400) Error in SetParent ().

I am not sure if I am doing well, but I am sure that my wpfC is fine because I have another test project in which it is working, but instead of the SDL window, I use the win32 window.

I think SDL_GetWindowWMInfo () gives me an incorrect identifier.

The question is how to get HWND from SDL_Window correctly and make sure it is correct HWND.

If it is not possible, do it that way, is there another way to create a secondary window from HWND within the main SDL2 window?

boot – How can I correctly correct the SysPrep Gen2 Hyper-V image or fix the one I'm working on?

My goal was to create a Win10 image (with installed programs) that I could quickly copy and reuse in Hyper-V to test things.

I created a Gen2 image, installed Win10 + applications, then SysPrep & # 39; d and closed. I removed the control points so that everything rolled in the *.vhdx file and I thought it was over.

When I create a new VM and use the image, the bootloader cannot find an operating system.

enter the description of the image here

When I mount the image, I see the normal files:

enter the description of the image here

What went wrong? I have an option for PXE boot … but that seems to be a network boot.

Algebra – What is the correct way to multiply percent in Mathematica?

I am very new to Mathematica and I want to calculate percentage multiplications. See the image below. In In[3]I pressed space after fifty% and then pressed 80%. Mathematica automatically added the multiplication sign. In In[4], I pressed manually * *, the sign of multiplication. Both seem not to work. Where is the problem? Thank you.

enter the description of the image here