Does a Huge Object that has already been Animated continue to be Animated if it is Enlarged to Gargantuan?

I’m hashing out a collective of NPC Rock Gnomes who live in a small stone castle shaped like a Huge person, about 15 x 15 x 22 feet, which is the maximum size for a creature of Huge size. This collective of gnomes will have two basic talents that they excel at one of which will be:

  • They can animate their castle and enlarge it both to travel short distances and as a defensive measure against creatures of ill intent.

Animate Object states (PHB 213):

You can’t animate any object larger than Huge.

Enlarge/Reduce states (PHB 237):

The target’s size doubles in all dimensions, and its weight is multiplied by eight. This growth increases its size by one category—from Medium to Large, for example.

My question is this: If the castle is currently a Huge object and it is animated as a huge object and then it is enlarged and becomes a Gargantuan object, does the Animate Object spell continue to function?

I know I can bend the rules for NPCs and I’m o.k. doing that if I need to, but I’d like to know RAW on this.

Continue to load HTML when

I was asked in a Job interview, long time ago (advanced defensive Js )

We want to call a synchronous script using JS code (with this following html: <script type="text/javascript" src="...."></script>). On occasions, the script loading takes too much time. Please suggest a way that if the script takes more than X seconds to load , the whole page will be loaded (except this synchronous script). Note that we should not change the script to run asynchronously (for example, via appendChild). No server.

Well, I had a couple of approaches :

-remove the dom -window.abort -mess up the document by document.write("'</s'+'cript>'") -moving it to an iframe -adding headers of CSP 

Nothing worked.

Here is the code (for example) to remove the script dom tag :

Notice that there is TEXT after the script. So it is expected to see the text after 1 sec.

<body>   <script>     setTimeout( function (){  document.querySelector('#s').parentNode.removeChild(document.querySelector('#s'))      },1000); //change here   </script>  <script id ='s'  src="https://www.mocky.io/v2/5c3493592e00007200378f58?mocky-delay=40000ms" ></script>     <span>!!TEXT!!</span> </body> 

Question

I can’t seem to find the trick for how can I make the page continue loading after a certain timeout. How can I do that?

Fiddle

Calculating the total time complexity of algorithm with if, break, continue and function calls?

I’ve done a literature survey of many papers that solve a certain puzzle, and none of them present their algorithms in terms of the big O notation. They only present it in terms of the time taken to run the program, which makes it tough to compare with the results of other papers.

I wrote an algorithm to solve the puzzle, but am confused about how to represent the total time complexity of my algorithm (the number of steps it takes to solve the puzzle), because within the nested loops there can be if conditions that may or may not lead to more loops or functions. There can be break, continue or return statements.

For example, the pseudocode:

t = Number of test puzzles n = Number of squares in puzzle g = Number of sub squares in each square  for i = 1 to t {     function1()     function2()     //and many many more function calls with plenty of     //loops and conditional statements within them }  function1() {     for i = 1 to g {         for j = 1 to g {             //Note how x can be anything from 1 to n here             if (condition1) {x = n} else {x = anything between 1 to n}             for k = 1 to x {                 for k1 = 1 to g {                     if (condition2) {break}                     if (condition3) {continue}                 }             }         }     } }  function2() {     for i = 1 to n {         for j = 1 to n {             ii = 0             while(condition3) {                 if (ii > 25) {break} else {ii++}             }         }     } } 

I had considered representing my algorithm as something like O(t*g*g*n*g)+O(n*n*25) for a worst-case scenario and O(t*g*g*1*1)+O(n*n*1) for a best-case scenario.

But since the algorithm has many many more function calls, I’d have to do O(something)+O(something)+.... and it’ll give a HUGE value. It just doesn’t make sense to have such a complex time complexity representation for an algorithm. Moreover, big O notation doesn’t seem to be the right representation here, because n and g remain constant. Researchers who compare this puzzle’s algorithms always use a puzzle of size n and has sub-squares of size g. So it’s never about measuring how time complexity increases as n grows. It’s about measuring how many steps an algorithm takes to solve the puzzle. How to represent the time complexity of that?

¿Es posible prevenir que un job vuelva a ejecutarse mientras aun continue realizando tareas?

Necesito crear un Job en sql server que se ejecute cada 5 minutos. El job debe ejecutar un procedimiento de almacenado que verifica unos registros en la base de datos, los cuales, dependiendo de su estado deberá realizar la ejecución de otros procedimientos de almacenados. El problema es que he notado que algunos procesos toman un poco mas de tiempo y quisiera saber, si es posible, indicarle al job de alguna manera, luego de su ejecución, que no continue ejecutándose sino hasta haber acabado de realizar todas las tareas que tiene suscritas.

Es decir, algo asi como:

  1. ejecución del job
  2. detener el job para que no vuelva a ejecutarse
  3. ejecutar procedimientos de almacenado …hacer tareas
  4. cuando todas las tareas esten terminadas, habilitar nuevamente el job para que siga ejecutándose en los intervalos de tiempo programados

How to force to automatically continue VIDEO-Recording after being stopped (after 12 mins or so)

Most photo-cameras (canon or whatever) has the limit, as most of them stop the video-recording after 12 minutes. AFAIK, it is related to SD-CARD limits (as FAT format can hold max 4gb file). However, how to force it to auto-continue recording in the same moment, when overgoes 12 minutes?

So, we no longer need to MANUALLY push the record button again? very annoying…

Por que las sentencias break, goto y continue, són una mala practica

Considero que las sentencias break, goto y continue en programación tienen que tener un uso limitado, ya que me enseñaron que estas sentencias es una mala práctica en la programación, y he leído bastante documentación que desaconseja sú uso.

Querría poder escuchar opiniones al respecto, incluso yo propondré mis argumentos, y claramente la respuesta que mejor explique o demuestre que es una buena practica, será la que yo acepte como “respuesta correcta”.

Estos són algunos de los aspectos que hacen que pensar que estás sentencias no són correctas:

1. Dificultan la legibilidad.

2. Difícil depuración.

3. Mayor dificultad de reutilización.


Me refiero a mala práctica con usos excesivos o regulares de las sentencias, excluyo casos puntuales o el uso del bucle switch.

Why I just cannot continue to train tensorflow model

I try to load the saved tensorflow model, but everytime I loaded it and started to train, it just started from the very beginning. I really don’t know what to do. Can somebody please help ?

class model_trainer(object):  def __init__(self, training_mode=True, pretrain_load=False, src_max_len=360, sent_max_len=300, batch_size=56):      #tf.reset_default_graph()     # read into parameter     self.graph = tf.Graph()     self.batch_size = batch_size     self.learning_rate = 4e-4     self.beam_width = 10     self.max_epochs = 300     self.model = Dialogue_Model(training_mode, src_maxlen=src_max_len, tgt_maxlen=sent_max_len, batch_size = self.batch_size)     self.word_list, self.word2vec_table, self.id2word_table, self.id2vec_table = \         self.model.word_list, self.model.word2vec_table, self.model.id2word_table, self.model.id2vec_table     self.src_max_len = src_max_len     vocab_size = self.id2vec_table.shape[0]     vocab_dim = self.id2vec_table.shape[1]     #self.mfcc_feature, self.text_from_mfcc, self.target_input_text, self. = load.data()     self.embedding = tf.get_variable(name="embedding", shape=self.id2vec_table.shape, initializer=tf.constant_initializer(self.id2vec_table), trainable=False)     self.time_major = False     self.output_layer = layers_core.Dense(         vocab_size, use_bias=False, name="output_projection")     self.saver = tf.train.Saver(tf.global_variables())      # Data Init     self.mfcc = tf.placeholder(shape=[None,1000,40], dtype=tf.float32)     self.txt_from_mfcc = tf.placeholder(shape=[None,src_max_len], dtype=tf.int32)     self.txt_target_input = tf.placeholder(shape=[None,src_max_len], dtype=tf.int32)     self.txt_target_output = tf.placeholder(shape=[None, src_max_len], dtype=tf.int32)     self.emo_target_input = tf.placeholder(shape=[None, 10], dtype=tf.float32)     self.emo_target_output = tf.placeholder(shape=[None, 10], dtype=tf.float32)     #self.emo_target_input = tf.placeholder(shape=[None, src_max_len],dtype=tf.int32)     self.sent_max_len = sent_max_len  def brainer_constructor(self):     return emo_train_output,emo_Q_loss, tuning_loss, response_projection  def brain_interpreter(self,response_projection,emo_train_output,training=True): return logits, sample_id, outputs, final_context_state  def brainer_optimize(self, logits, emo_Q_loss, tuning_loss, response_outputs, loss_weight):return final_loss, response_loss, vandys_train  def train_step(self, use_pretrained = False):      sess = tf.Session(config=tf.ConfigProto(             allow_soft_placement=True))         #tf.reset_default_graph()         #saver = tf.train.Saver()         self.saver = tf.train.import_meta_graph('./vandys_model_1_continue/Vandys-101-130.meta')         self.saver.restore(sess, tf.train.latest_checkpoint('./vandys_model_1_continue/'))  # search for checkpoint file         #print([n.name for n in tf.get_default_graph().as_graph_def().node])         #print_tensors_in_checkpoint_file(latest_ckp, all_tensors=True, tensor_name='')         #graph = tf.get_default_graph()         print("continue the training")  logits, sample_id, outputs, final_context_state = \             self.brain_interpreter(response_projection=response_projection,                                    emo_train_output=emo_train_output,                                    training=True)  final_loss, response_loss, vandys_train = self.brainer_optimize(logits=logits, emo_Q_loss = emo_Q_loss,tuning_loss=tuning_loss,                                                              response_outputs=outputs,loss_weight=[0.8,0.2])  sess.run(tf.global_variables_initializer())  sess.run(vandys_train,feed_dict={self.mfcc: mfcc[sample_id, :, :],                                                  self.txt_from_mfcc: txt_from_mfcc[sample_id,:],                                                  self.txt_target_input: text_input_question[                                                                         sample_id, :],                                                  self.txt_target_output: text_input_answer[                                                                          sample_id, :],                                                  self.emo_target_input: input_q_emotion[sample_id,:],                                                  self.emo_target_output: input_a_emotion[sample_id,:]}) 

Should I continue to learn exposure on a film camera or switch to digital?

I have a Canon AE-1 but I’m new to photography. I mean it’s always interesting me but I never did anything until now when I found this camera in my grandma’s attic. It works pretty well. I mean I haven’t gotten the film developed to see what the picture look like, but I’m not sure if they’re gonna be bad because of the camera or because of me. It would probably be me, because I don’t quite understand the aperture and stuff like that. I mean I kinda do / kinda don’t. I just need to get familiar, but I was wondering if I should continue to learn on a film camera or should I use a digital camera. What would be best for me?

Does a user created cart interfere with a REST created cart or continue?

The question I have, if a customer has created a cart via a website….. And then for customer service reasons, the customer calls in a want to place an order, by using the API’s (let’s say Salesforce or some other integratio ), does that cart interfere?

Does it pick up that same cart, or create a new cart

continue button not working to next section

I’m a newbie to magento. The fact is that I’ve installed magento 1.9.3.10 through softaculous on new.bbymotors.ro, installed and update the website, and even check that all the functionality are working properly. Yesterday, I’ve asked my IT guy to move the website new.bbymotors.ro so that it redirrects to bbymotors.ro. After this move, the customers can’t place the orders as the continue button under shipping is not moving forward. Please help!!!! I’ve worked at this website for the last 3 weeks and my IT guy can’t solve it as it doesn’t know what to do…

address of the website is http://bbymotors.ro

Thank you in advance