graphics3d – Would replacing one side of the Dynamic Clock Box with an image be easy or a complete rewrite?

I’ve been looking at the code and reading other questions. I don’t know where to start. Here is the code from the Wolfram example with the addition of importing and resizing an image in the first two lines. I also changed one of the coords elements to {0.5, 0.5, 0.5}.

pablo = WebImage(
   "https://commons.wikimedia.org/wiki/Category:Pablo_Picasso#/media/
File:Pablo_picasso_1.jpg");
pablo1 = ImageTake(pablo, {101, 500}, {201, 600});

vtc = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
coords = {{{0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}}, {{0.5, 0.5, 
     0.5}, {1, 0, 0}, {1, 0, 1}, {0, 0, 1}}, {{1, 0, 0}, {1, 1, 
     0}, {1, 1, 1}, {1, 0, 1}}, {{1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {1, 
     1, 1}}, {{0, 1, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 1}}, {{0, 0, 
     1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}}};
DynamicModule({}, 
 Graphics3D({Dynamic(Texture(clock), UpdateInterval -> 1), 
   Polygon(coords, VertexTextureCoordinates -> Table(vtc, {6}))}, 
  Lighting -> "Neutral", Boxed -> False), 
 Initialization :> (clock := 
    Module({hour, min, sec, ht, mt, st}, {hour, min, sec} = 
      Take(DateList(), -3); 
     ht = Pi/2 - 2 (Pi) hour/12 - (2 (Pi)) min/720; 
     mt = Pi/2 - 2 (Pi) min/60; st = Pi/2 - 2 (Pi) Floor(sec)/60; 
     Graphics({Thick, Arrowheads(Large), 
       Arrow({{0, 0}, 0.6 {Cos(ht), Sin(ht)}}), 
       Arrow({{0, 0}, 0.9 {Cos(mt), Sin(mt)}}), PointSize(Large), 
       Table(Point(0.9 {Cos(i), Sin(i)}), {i, 0, 2 Pi, (Pi)/6}), 
       Point({0, 0}), Circle(), Red, 
       Line({{0, 0}, 0.85 {Cos(st), Sin(st)}})}))))

Replacing SharePoint toxic serves – Guidelines?

I am working on replacing toxic servers(Windows 2008 R2) with new servers Windows 2012 R2. Below are the steps I completed.

We are not replacing DB sever as it already Windows 2012 R2. Im only replacing 2 Web servers, 1 App server and 1 search server. Following are the steps I did till now.

  1. Installing preqs and SP 2013 in new severs
  2. Made new sever as same patch level of the existing servers
  3. Running PS Config in new severs to add them to current farm connecting to current config DB.
  4. Setting search topology with new servers.

My next step is to change the load balancer pointing to new web servers – Before Im doing that I just want to know If there anything else that I should be alert on. My few worries are below. Please guide me.

  • What about hosted custom applications(webparts) in the farm
  • Layout folder and master pages?
  • InfoPath form templates in CA?
  • Other things that I should care about while replacing servers.

My question is, would all above thing automatically transferred to new severs on adding servers to new farm/enabling services? Or What are the steps I should perform additionally to make new farm exactly same as the old one.

Any help/blog would be greatly appreciated.

Solve an equation in mathematica without replacing the value of the parameter

Suppose I want to solve a simple equation in mathematica x-a=0.So I am writing the mathematica code for this as below:

Solve[x - a == 0, x]

So the output will be as below:

{{x -> a}}

Now suppose I have assigned a value for ‘a’ beforehand and then want to solve the same equation.So my code will look like below:

a = 1;
Solve[x - a == 0, x]

And the output in this case will be like below:

{{x -> 1}}

Now if I want an output in this case as {{x -> a}},what modification should I do in my code ?

Note: Clear[a] will work,but I don’t want to remove permanently the assigned value to a

Replacing removed secure empty trash feature

Is this code reliable? Is there any extra precaution I should or should not be taking here? How is my code to securely delete a file by repeatedly overwriting the contents?

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
int main(int Argc, const char *Argv()) {
    srand(time(NULL));
    unsigned int *RandBuf = NULL;
    for (int I = 1; I < Argc; I++) {
        long FileSize;
        const char *const Path = Argv(I);
        FILE *const File = fopen(Path, "r+");
        if (!File || fseek(File, 0, SEEK_END) || (FileSize = ftell(File)) < 0) {
            perror(Path);
            continue;
        }
        const unsigned long IntCount = (FileSize+3)>>2;
        RandBuf = realloc(RandBuf, IntCount<<2);
        const unsigned char WriteCount = ((unsigned int)rand()&0xF)+16;
        for (unsigned char Write = 0; Write < WriteCount; Write++) {
            for (unsigned long Int = 0; Int < IntCount; Int++) {
                RandBuf(Int) ^= (unsigned int)rand();
            }
            if (fseek(File, 0, SEEK_SET) || fwrite(RandBuf, 1, FileSize, File) < FileSize) {
                perror(Path);
                continue;
            }
        }
        if (fclose(File) || remove(Path)) {
            perror(Path);
            continue;
        }
    }
    free(RandBuf);
    return 0;
}

usb storage – Hard drive not detected after replacing board

I have a 4TB WD “Elements” (WD Blue inside of the casing) Model: WD40NMZW-11GX681 portable drive that I use for my Xbox One. The drive has stopped working. When I plug it in nothing happens, it doesn’t sound like it spins up, and I don’t hear anything obviously going wrong inside.

I opened up the case and took a look inside, the USB port looked a little burned on the board (2060-800041-003 REV P1) so I found a replacement online and bought it. I have now replaced the board and when I plug the drive in it spins up and sounds good, but I cannot get it to be detected on my Xbox One or my Mac book pro. The drive doesn’t even show up unmounted in the disk utility list like it would with an incompatible format.

What is going on here? How can I get the drive to show up and work as normal? Preferably without losing my data, but it’s not the end of the world if I have to wipe it. Judging by the evidence was I incorrect in the diagnosis of the board/port being the issue?

COUNT Rows in Column, Copy to Last Row, Paste to another sheet to Last Row(FIRST EMPTY ROW, adding, not replacing value) Excel VBA

Im New in VBA. Could you help me at this?

So, we have 2 columns: AB with data, in Sheet1
I want to COPY until Last Row in AB Column from Sheet1
and paste it to Sheet2, column CD in FIRST EMPTY ROW (i mean while adding more data, cause CD is supposed to have previous data)

Can anyone help? It would be a huge favour for me! THANKS !!

java – Replacing jcenter() in Android Gradle Repositories

Per JFrog, they are sunsetting Bintray (which includes JCenter) on May 1st, 2021.

To prep for this, I opened my build.gradle and replaced jcenter() with mavenCentral(). My build.gradle now looks like this (with some parts removed):

buildscript {
    ext.kotlin_version = '1.4.21'

    repositories {
        google()
        // jcenter()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.5'
    }
}

allprojects {
    repositories {
        google()
        // jcenter()
        mavenCentral()

        maven {
            url "https://jitpack.io"
        }
    }
}

However, since replacing jcenter() with mavenCentral(), I receive this error:

A problem occurred configuring root project 'Redacted'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.jetbrains.trove4j:trove4j:20160824.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
       - https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
     Required by:
         project : > com.android.tools.build:gradle:4.1.2 > com.android.tools.build:builder:4.1.2 > com.android.tools:sdk-common:27.1.2

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Is there another repository I can add to resolve this, or does com.android.tools:sdk-common need to update to use a different version of org.jetbrains.trove4j:trove4j?

replace – Replacing a specific string in oracle

I’ve a database value 'INS. Company Cancelled' where multiple values are separated by '.'
I’m trying to replace 'INS' with 'INSEXP' my expected result is 'INSEXP. Company Cancelled'

I’ve tried below two queries to update the field my output is like 'INSEXP. Company Cancelled. Company Cancelled'

update my_table
SET column_name = (select replace(column_name, 'INS', 'INSEXP') 
                    from my_table WHERE seq_num = 123)
WHERE seq_num = 123;

update my_table
set column_name = replace(column_name, 'INS', 'INSEXP')
WHERE seq_num = 123;

Could someone please tell me what I’m doing wrong here?

java – Comparing and replacing values in an array

I am currently working on a program that replaces the value in an array if the value next to it is the same as the current value. So If the array is (0,0,0,1,0,1,0), when the program runs it’ll turn to (0,0,1,1,1,1,1). Currently, the code works to an extent, it runs but I still get an “Index out of bounds exception” after it terminates, and it prints out one less value than it should. So an array that had 5 elements ends up having 4 elements. Here’s my code:

int arr() = {0,1,0,0,1,0,0};

int days = 0;
int arr() = {0,1,0,0,1,0,0};
do {
    int n = arr.length;
    for(int i=0; i<arr.length; i++) {//iterates through the array and subs in 0s for duplicates and 1s for regulars
        if(arr(i) == arr(i+1)) {
            arr(i) = 0;
        }else{
            arr(i) = 1;
        }
        
        System.out.println(" "+arr(i));
    }
    
    
    days++;
}while(days<=30);

What can I do to fix that issue and stop the error after the program runs?

dnd 5e – How to work with Portent for replacing enemy rolls

With the Divination Wizard in my party, the basic idea has always been that the Wizard tells me beforehand if they want to mess with a roll.

This usually takes the form of “I’m going to cast this and replace their saving throw” or “If this guy attacks my Rogue buddy, I’m failing his roll” and if none of those things happen, I just roll as usual.

I always make sure to include enough story and description to give players an idea of what’s going to happen and give them a moment to interrupt.

So if the evil advisor to the king is about to deceive him into getting the party thrown into jail, I will first say “The advisor bends over to the king and whispers things in his ear while giving you the evil eye” and then wait a second or two and if nobody reacts with “I’m interrupting this” then I make the roll, whatever it is. Could be a Deception, could be a Saving Throw for the king, depends on what happens.

But the players will know what in-game fiction they can interrupt and if the Wizard asks “what kind of roll is this? I might want to change it”, then I tell them, and they can decide to apply portent.

It could also sometimes include rolls that the players might not otherwise know had been made.

This shouldn’t come up as often as you think. A portent can only be applied when you can see the target, and generally when you see them you’ll be aware of what they’re doing. In the few exceptions, I’d call it out beforehand.