How to copy files on new HDD without empty space at the beginning NTFS partition

I wanted to backup files from one hdd to another similar, empty one without fragmentation. I tried using the Windows copy paste method inside windows Explorer, using SyncBack Pro and using Linux.

Windows and SyncBack Pro gave similar results – the files were fragmented (12% fragmentation shown inside Auslogics DisDefrag and O&O Defrag – which is bad), but there was no free space at the beginning of the NTFS partition (which is good, if you want to copy other files afterwards).

Linux gave a different result – the files were not fragmented, but the copy process left empty space at the beginning of the drive, before the location of the first files on the new drive.

Is it possible to copy files on new HDD without empty space at the beginning NTFS partition?

The results:

O&O Defrag results after SyncBack Pro copy

Smart Defrag results after SyncBack Pro copy

Smart Defrag, after using Windows to copy

As you can see in Smart Defrag I get red regions, meaning fragmented files.

Linux copy gives a different result:

Smart Defrag analysis results, after Linux copy using Files(nautilus)

I therefore started a defragmentation using Smart Defrag 6 – free space defragmentation method, and the files are moved to the beginning of the drive.

Smart Defrag, following Linux copy, during free space defragmentation

I want this final result, but directly using a copy methond inside Linux (or Windows – but I don’t think it’s possible).

Smart defrag 6 colors:

Magenta – Directories;

Red – Fragment;

Green – Frequently used;

Yellow – Master File Table;

Light Blue – Unmovable;

I need the partition to be NTFS.

I used a Ubuntu 14.04.6 x86 Live USB stick.

Inside Nautilus I used the default copy paste method.

I had 16 GB RAM and about 2 ssd-s and 3 HDDs connected.

The new drive had one NTFS partition, partitioned in Windows 7.

Thank you for your help.

How can I remove toy blast off my iphone ios 12 and start from the beginning

I have been trying to delete this game off my phone and to start over from the beginning. I went to storage and deleted it from there. It is not in the icloud either. I cannot find it in purchases in the app store. When I start game over again it remembers where I was and takes back o the exact same level. Please help.

How do I write an asterisk at the beginning of a line in wiki syntax without transforming into a list item?

When using wiki syntax, if I put an asterisk (*) at the beginning of a line, it gets transformed into a unordered list. How is it possible to have the asterisk to remain as it is when at the beginning of a line?

Example :

*Hello world, this sentence is not in an unordered list. 

How can I find matchings in a Bipartite graph beginning with specific vertices?

Context: I’m modelling kidney exchanges through directed acyclic graphs. I convert these to Bipartite graphs (by splitting each node into a donor and receiver, and the edge from the original graph exist between corresponding donors and receivers). I want a way to find maximum number of edges through disjoint chains and I’ve been trying to do so through maximum wtd matching.

I know I can use ford-fulkerson to find a maximum wtd perfect matching, however, the main problem I’m facing is that the matchings can only exist for chains beginning with specific vertices. For example, if this is my directed acyclic graph:

enter image description here

Turning this into a Bipartite graph and using the maximum wtd matching way, I get the chain 0->1->3->5->6 but I also get 2->4. However, I can only have chains beginning with 0 so 2->4 should not come up.

I wanted to know if there were any ways to work around this problem? Someone suggested making this a minimum cost perfect matching problem but I’m confused how.

I realise this is a weird question but any help would be appreciated!

Hitpoints after Bodysnatcher’s “Death is Only the Beginning”

The Mind Switch and True Mind Switch powers in Dreamscarred Press’s psionics supplement state that you retain your hitpoints when you use them.

The Bodysnatcher prestige class that revolves around the use of these powers has a capstone ability at 6th level that allows them to use True Mind Switch against their killer as an immediate action when you would drop to -1 or die to a death effect.

The end result seems pretty straightforward if this is used against a death effect, but I’m curious what would actually happen in the case of hit point damage. The way the ability is written it seems to assume that your former body still dies, but if the switched individuals are retaining their hit point totals, then it seems like you’d generally end up 1 hit from death in your new body and they’d just end up taking the one hit that finished you off, which often won’t be lethal to them unless they’re already low.

Is there something I’m missing about how this ability works, or is it kind of lackluster in the usual case of dying from hit point damage?

How to SUMIFS text beginning with apostrophe

I am receiving a list of products from an external data source. One of the the product names begins with an apostrophe. When I attempt to produce a summary of the products and total quantity using UNIQUE() and SUMIFS() the formula is returning zero for the product that begins with an apostrophe.

I have made an example sheet here:

https://docs.google.com/spreadsheets/d/191bqjUPPPtt5ZKeTw7pUplsve-tBdDBhpBV0Ic3e-nA/edit?usp=sharing

Interestingly, a VLOOKUP will work fine, but that will miss additional entries in the list.

Does anyone have any ideas on how to solve this without removing the leading apostrophe?

Rename JPG’s Based on Portion of Parent and Subfolder and Number them Beginning with 100

Is it possible to make a folder action that runs automatically and only on certain types of files (jpg)? And… add part of the text from the parent folder as well as the subfolder? Is this asking too much? See screenshot for example. (If possible, I would want this to run automatically as jpg files are added to the folder).

The jpgs would stay in each sub folder and begin with number 100 (with a hyphen between because our software is jacked) 2321 Day 1 – 100

Apologies if I’m going about this the wrong way… I’m new here. I have limited experience with Automator and Apple Script, but I’ve managed to scrape together a few successful automations.

enter image description here

How bad of an user experience is to have to start the operations of an app from the beginning if a phone number is changed?

Summarizing my app, it’s main point is that 2 users get to select each other, via the phone number of the other, in the app, without neither on them knowing it for sure at the beginning, and when some actions have been done, in some weeks something happens for both.

Problem is that if any of the users gets to change his mobile phone number during the process, it looks like, (at least I cannot grasp a way not to) both would have to start from the beginning selecting each other again until that things happen, unless I were to do my app way more easy for a malicious user to cheat with it, due to a limitation the server I use for my app has.

Anyway I think that changing a phone number is not that usual, I haven’t changed it in my whole life, and I know few people that have changed it in general, so although it can be annoying for some users, maybe the percentage of affected ones is low enough not to worry much.

But this is just my personal experience, I’d like to know with trusted data how much of a problem would that be or not.

Beginning C character array explanation

I have been following along the book ‘The C Programming Language’ 2nd edition by Kernighan and Ritchie. The below code is an exercise from the book. What I am confused about in this code is the Character array ‘line’. It is a local variable so I don’t understand how the value is changing when it is used as an argument in the ‘get_line’ function.

/*******************************  * Author:                     *  * Date: 4/22/2019             *  * Purpose: Book exercise      *  *******************************/  #include <stdio.h> #include <stdlib.h>  #define MAX_LINE 1000  int get_line(char line[], int maxline); void copy(char to[], char from[]);  /*Print longest input line*/ int main() {     int len;    //Current line length     int max;    //Maximum length seen so far      char line[MAX_LINE];        //Current input line     char longest[MAX_LINE];     //Longest line saved here      max = 0;      //While input length is greater than 0     while((len = get_line(line, MAX_LINE)) > 0)     {         //If current string is longer than max         if (len > max)         {             max = len;              //Assign new max value             copy(longest, line);    //Replace longest string value with current string         }     }      if (max > 0)     {         printf("%s", longest);     }     return 0; }  int get_line(char s[], int lim) {     int c, i;      /*i = 0; i less than limit - 1 *and* input is not EOF *and* input is not enter key */     for (i=0; i<lim - 1 && (c=getchar())!=EOF && c!='\n'; i++)     {         s[i] = c; // input array position i is = input     }      //Once enter key is hit     if (c == '\n')     {         s[i] = c;   //Add enter key '\n' onto array         i++;        //Incr i so that last char can be '' later     }      s[i] = '';    //The last spot on char array is ''     return i; }  void copy(char to[], char from[]) {     int i;      i = 0;      //Assign from[i] to to[i] until null terminator     while((to[i] = from[i]) != '')     {         i++;     } } 

For example if I had a variable in the main routine

int add_num(int num1); main() {     int x = 5;     add_num(x);     printf("%d", x); }  int add_num(int num1) {     num1 += 5;     return num1; } 

x would still remain equal to 5 unless I did:

x = add_num(x); 

then x would equal 10.

So how does the line character array change when the function that it’s used in returns ‘i’? Where I is the length of the string entered.

Sorry if this was a little long, but I wanted to explain myself clearly.

beginning C, hangman

I have been working on this hangman game for a little while trying to get familiar with C programming. The game seems to work fine but I am looking for some pointers on my code. Are the global variables ok or should I have made them local? Should I have used more functions to make the code more readable? Is my commenting style acceptable or should I stay away from the big box style comments? Thank you all for your time.

///////////////////////////////////////////////// /// Title: Hangman /// Author:  /// Date: 4/19/2019 /// Description: Hangman Game /////////////////////////////////////////////////   #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h>  //Global Strings char word [50]; char guessed_letters[20]; char user_guess[] = ""; char blank[1] = "-";  //Global Integers int random_number; int word_len; int user_input; int attempts = 10;  //Function Declarations void start_game(); void get_input(); void print_blanks(); void draw_platform(); void get_word();  int main(void) {     //Game Loop     while(1)     {         start_game();          while(attempts > 0)         {             system("cls");              //If they have guessed all the letters they win             if(strlen(guessed_letters) == word_len - 1)             {                 print_blanks();                 break;             }             //Else, decr attempts and try again             else             {                 printf("Attempts Remaining: %i\n", attempts);                 print_blanks();                 get_input();             }         }          system("cls");          //If they won         if(attempts > 0)         {             print_blanks();             printf("You Won! Play again?\n");         }         //If they lost         else         {             draw_platform();             printf("You Lost! The word was %s, Play again?\n", word);         }          scanf("%i", &user_input);          switch(user_input)         {             case 0:                 return 0;             default:                 continue;         }     } }  void start_game() {     //Initializes Game     get_word();     word_len = strlen(word);     memset(guessed_letters, 0, sizeof guessed_letters);     attempts = 10; }  void get_input() {     //Gets guess from user and checks     //To see if that letter is in the word      int i;     int letter_hit = 0; //Used to tell if the guess letter is in the word      printf("\nYour guess: \n");     scanf(" %c", user_guess);      for(i=0; i < word_len; i++)     {         if(user_guess[0] == word[i])         {             guessed_letters[i] = user_guess[0];             letter_hit ++;         }     }      if(letter_hit > 0)     {         return;     }     else     {         attempts --;     } }  void print_blanks() {     /////////////////////////////////////////////////     /// Prints out a number of blanks equal to the     /// Length of the word     /// Then fills the blanks with the guessed letters     /////////////////////////////////////////////////      int i, j;      draw_platform();     for(i=0; i<word_len; i++)     {         printf("%c", guessed_letters[i]);         printf(" ");     }     printf("\n");      for(j=0; j<word_len - 1; j++)     {         printf("%s", blank);         printf(" ");     }     printf("\n"); }  void draw_platform() {     /////////////////////////////////////////////////     /// Draws a new segment onto     /// The platform every time     /// The user gets a wrong guess     /////////////////////////////////////////////////      char *platform[]={                       "      ===\n",                       "        |\n"                      "        |\n"                      "        |\n"                      "       ===\n",                       "   =====|\n"                      "        |\n"                      "        |\n"                      "        |\n"                      "       ===\n",                       "  |=====|\n"                      "        |\n"                      "        |\n"                      "        |\n"                      "       ===\n",                       "  |=====|\n"                      "  O     |\n"                      "        |\n"                      "        |\n"                      "       ===\n",                       "  |=====|\n"                      "  O     |\n"                      "  |     |\n"                      "        |\n"                      "       ===\n",                       "  |=====|\n"                      "  O     |\n"                      "  |-    |\n"                      "        |\n"                      "       ===\n",                       "  |=====|\n"                      "  O     |\n"                      " -|-    |\n"                      "        |\n"                      "       ===\n",                       "  |=====|\n"                      "  O     |\n"                      " -|-    |\n"                      "  |     |\n"                      "       ===\n",                       "   |=====|\n"                      "   O     |\n"                      "  -|-    |\n"                      "  //     |\n"                      "       ===\n"      };      switch(attempts)     {     case 9:         printf("\n\n%s\n", platform[0]);         break;     case 8:         printf("\n\n%s\n", platform[1]);         break;     case 7:         printf("\n\n%s\n", platform[2]);         break;     case 6:         printf("\n\n%s\n", platform[3]);         break;     case 5:         printf("\n\n%s\n", platform[4]);         break;     case 4:         printf("\n\n%s\n", platform[5]);         break;     case 3:         printf("\n\n%s\n", platform[6]);         break;     case 2:         printf("\n\n%s\n", platform[7]);         break;     case 1:         printf("\n\n%s\n", platform[8]);         break;     case 0:         printf("\n\n%s\n", platform[9]);         break;     } }  void get_word() {     /////////////////////////////////////////////////     /// Scans a file to get the total number of lines     /// The line total is then used as a max range     /// For the random number     /// The word that is on the random line is the word     /// That will be used for the game     /////////////////////////////////////////////////      FILE *fp;     int line_number = 0;     char current_word[50];      fp = fopen("dictionary.txt","r");      if(fp == NULL)     {         perror("Error in opening file");     }      //While not end of file, incr line number     while(fgets(current_word, 50, fp) != NULL)     {         line_number++;     }      random_number = rand() % line_number;      //Start from top of file     rewind(fp);      //Goes to whatever line the random number equals to find the     //Random word     for(line_number = 0; line_number != random_number; line_number++)     {         fgets(current_word, 50, fp);     }      strcpy(word, current_word);     fclose(fp); }