text:
Q: How to know which figure I clicked? I have drawn an orthogonal linked list that looks like this.
:
And I want to know if I clicked INSIDE of any Node (rectangle) and tell me witch rectangle with a message box with the data or number that it has
The nodes are drawn with this method:
public void Dnode(float px, float py, int data)
    {
        Pen penBlack= new Pen(Color.Black, 1);
        RectangleF[] rects =
        {
            new RectangleF(px, py, 50.0F, 50.0F),
            new RectangleF(px + 10, py + 10, 30.0F, 30.0F)
        };
        G.DrawRectangles(penBlack, rects);
        G.DrawLine(penBlack, px, py, px + 10, py + 10);
        G.DrawLine(penBlack, px + 50, py, px + 40, py + 10);
        G.DrawLine(penBlack, px + 50, py + 50, px + 40, py + 40);
        G.DrawLine(penBlack, px, py + 50, px + 10, py + 40);
        if (data!= -1)
            G.DrawString(data.ToString(), new Font("Arial", 10, FontStyle.Bold), Brushes.Black,
                new Point((int) px + 16, (int) py + 14));
        else
            G.DrawString("*", new Font("Arial", 12, FontStyle.Bold), Brushes.Red,
                new Point((int) px + 19, (int) py + 18));
    }

every node has this
public class Node
{
    public int data;
    public int pointX, pointY;
    public Node left, right, up, down;

    public Node(int x)
    {
        data = x;
        left = right = up = down = null;
        pointX = 0;
        pointY = 0;
    }
}

The idea that I had was to get the point that I clicked with the click event in the main form and then compare it with every node of the list but then I realized it will only work if I clicked the specific point that the node class has

A: You could add an bool isClicked(float x, float y) method to the node class and see if the point with (x, y) coordinates falls into the square that was drawn for each node.
For that, x and y need to respect all the following conditions:

*

*x >= px; x <= px + 50.0F

*y >= py; y <= py + 50.0F


text:
Q: The term "Coherence" is overloaded! I have troubles with modern terminology in the field of quantum information technologies. There are a lot of new terms that everyone is using and no-one takes time to explain, even though modern textbooks did not catch up to these yet. Two of them are optical coherence lifetime vs spin coherence lifetime in the context of atomic clocks and quantum information storage/processing: definitions are needed.

*

*Please, notice that I am not asking for a classical definition of coherence. I am rather asking about two very specific terms, listed above in the given context.

*The title was given this way to attract attention and because in the given context the term "coherence" is overloaded and it is a known in the community fact (quantum, optical, quantum information coherence, to name a few).

Thanks to Harry Levine: helpful link

A: For a quantum system such as an atom, or rare earth ion in a bulk crystal, the coherence lifetime is defined relative to two states of the system. 'Spin coherence' typically would refer to the situation when the two states are the same up to different nuclear or electronic spin orientations. For example, in a typical atom or ion there are many degenerate ground state levels that are split only by coupling from the nuclear spin to the electron spin (different $F$ levels). The splitting between these states is typically on the scale of < 10 GHz, all within the microwave or radio frequency domain.
However, other types of levels can also be considered: for example, one might consider the coherence between a ground state level and an excited state where an electron is in a higher orbital angular momentum or principal quantum number state. In this case, the energy difference between these states would often correspond to very high frequencies of > 100 THz, which are in the optical domain. Coherence between these types of states would be called optical coherence.
These two different settings are practically very different, in the sense that they are probed either with microwave fields or with laser fields. Their coherence can also be affected by different mechanisms (ie., radiative decay may limit the optical coherence but magnetic field noise might limit the spin coherence).

redpajama_set_name: RedPajamaStackExchange


text:
Q: upload file into Heroku using FileZilla How can I upload a file from local to a Heroku app public folder using FileZilla?
I'm able to upload into EC2 but not into Heroku.

A: In general, uploading files to Heroku doesn't make much sense thanks to its ephemeral filesystem:

Each dyno gets its own ephemeral filesystem, with a fresh copy of the most recently deployed code. During the dyno's lifetime its running processes can use the filesystem as a temporary scratchpad, but no files that are written are visible to processes in any other dyno and any files written will be discarded the moment the dyno is stopped or restarted. For example, this occurs any time a dyno is replaced due to application deployment and approximately once a day as part of normal dyno management.

If you're trying to update code or something that's "part of" your application you should instead commit it to your Git repository and push the new commits to Heroku. This will trigger another build.
If you're trying to add content it might make more sense to store it in an off-site file or object store like Amazon S3.


text:
Q: Remote computer drive information is not precise To get the free disk space of the remote computer I am using below code
ConnectionOptions options = new ConnectionOptions();
        ManagementScope scope = new ManagementScope("\\\\SYSTEM_IP",
        options);
        scope.Connect();
         SelectQuery query1 = new SelectQuery("Select * from Win32_LogicalDisk");

        ManagementObjectSearcher searcher1 = new ManagementObjectSearcher(scope, query1);
        ManagementObjectCollection queryCollection1 = searcher1.Get();

       foreach (ManagementObject mo in queryCollection1)
        {
            // Display Logical Disks information

            Console.WriteLine("              Disk Name : {0}", mo["Name"]);
            Console.WriteLine("              Disk Size : {0}", mo["Size"]);
            Console.WriteLine("              FreeSpace : {0}", mo["FreeSpace"]);
            Console.WriteLine("          Disk DeviceID : {0}", mo["DeviceID"]);
            Console.WriteLine("        Disk VolumeName : {0}", mo["VolumeName"]);
            Console.WriteLine("        Disk SystemName : {0}", mo["SystemName"]);
            Console.WriteLine("Disk VolumeSerialNumber : {0}", mo["VolumeSerialNumber"]);
            Console.WriteLine();
        }
        string line;
        line = Console.ReadLine();

    }

This is giving me result which is not exactly matching with server drive

*

*It is giving me B:/ , C:/, D;/, E:/ and Z:/, but on server I actually have C:/, D:/, E:/, F:/, G:/, H:/, I:/, L:/ and z:/
Why I am not getting all drive status?

*The drive space information is also not precise; ex.: for D drive I am getting "429496725504 bytes" by this code which is 400 GB but actually on my server D:/ is 415 GB

Where I am going wrong?
EDIT - Possible reason
I just checked and found out that the server on which I am running this code have B:/ , C:/, D;/, E:/ and Z:/ and D:/ have 400 GB. So that means, no matter what IP address I am providing it is taking details of the computer on which I am running my code.

A: The management scope is missing some path parts, the correct one should be:
ManagementScope scope = new ManagementScope("\\\\FullComputerName\\root\\cimv2");

Source: http://msdn.microsoft.com/en-us/library/ms257337%28v=vs.80%29.aspx


text:
Q: A warning on power pins of MCUs, explanation? I came across with this warning:

Most Chinese development boards do not have any kind of protection on
  the +5V rail. This means that the +5V pin of the USB connector is
  directly connected to any +5V/VIN pin on the development board. Always
  check if this is the case when you're connecting your development
  board to an external power source while using the USB port.

I could not understand fully that what is the danger? What will be the consequences of this action?
Thanks.

A: Because when you connect two 5V sources together, they fight each other since no two 5V sources are identical. What happens if your computer's USB is 5.1V and your external power source is 4.9V? They cancel out leaving you with 0.2V across a short-circuit across


text:
Q: pandoc conflict Im trying to use some pandocs templates, but it throws an error and I can't correct it.
Template:IEEE Paper Template for Pandoc.
The requirementa are installled, but either running make or by hand with:
pandoc -o build/paper.pdf --bibliography=bibliography.bib --csl=bibliography.csl --filter pandoc-citeproc -s -f markdown --template=template.latex paper.md metadata.yaml

But this gives the next error
!  LaTeX Error: Environment cslreferences undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.145 \begin{cslreferences}

Bibtex is installled and I do not what file as at line 145 the cslreferebces, how can be fixed?
Thanks.


text:
Q: FSSpec Error Handling in Python - Timeout Error I am trying to get Terraclimate Data from Microsoft Planetary and facing time out error. Is there a possiblity of increasing the timeout time ? Please find the code below and the error I am facing. I am using fsspec and xarray for downloading spatial data from MS Planetary portal.
import fsspec
import xarray as xr

store = fsspec.get_mapper(asset.href)
data = xr.open_zarr(store, **asset.extra_fields["xarray:open_kwargs"])

clipped_data = data.sel(time=slice('2015-01-01','2019-12-31'),lon=slice(min_lon,max_lon),lat=slice(max_lat,min_lat))

parsed_data = clipped_data[['tmax', 'tmin', 'ppt', 'soil']]
        lat_list = parsed_data['lat'].values.tolist()
        lon_list = parsed_data['lon'].values.tolist()
        filename = "Soil_Moisture_sample.csv"
        for(i,j) in zip(lat_list,lon_list):
                parsed_data[["soil","tmax","tmin","ppt"]].sel(lon=i, lat=j, method="nearest").to_dataframe().to_csv(filename,mode='a',index=False, header=False)

I am getting the following error
  TimeoutError                              Traceback (most recent call last)
    File ~\Anaconda3\envs\satellite\lib\site-packages\fsspec\asyn.py:53, in _runner(event, coro, result, timeout)
         52 try:
    ---> 53     result[0] = await coro
         54 except Exception as ex:

    File ~\Anaconda3\envs\satellite\lib\site-packages\fsspec\asyn.py:423, in AsyncFileSystem._cat(self, path, recursive, on_error, batch_size, **kwargs)
        422     if ex:
    --> 423         raise ex
        424 if (
        425     len(paths) > 1
        426     or isinstance(path, list)
        427     or paths[0] != self._strip_protocol(path)
        428 ):

    File ~\Anaconda3\envs\satellite\lib\asyncio\tasks.py:455, in wait_for(fut, timeout, loop)
        454 if timeout is None:
    --> 455     return await fut
        457 if timeout <= 0:

    File ~\Anaconda3\envs\satellite\lib\site-packages\fsspec\implementations\http.py:221, in HTTPFileSystem._cat_file(self, url, start, end, **kwargs)
        220 async with session.get(url, **kw) as r:
    --> 221     out = await r.read()
        222     self._raise_not_found_for_status(r, url)

    File ~\Anaconda3\envs\satellite\lib\site-packages\aiohttp\client_reqrep.py:1036, in ClientResponse.read(self)
       1035 try:
    -> 1036     self._body = await self.content.read()
       1037     for trace in self._traces:

    File ~\Anaconda3\envs\satellite\lib\site-packages\aiohttp\streams.py:375, in StreamReader.read(self, n)
        374 while True:
    --> 375     block = await self.readany()
        376     if not block:

    File ~\Anaconda3\envs\satellite\lib\site-packages\aiohttp\streams.py:397, in StreamReader.readany(self)
        396 while not self._buffer and not self._eof:
    --> 397     await self._wait("readany")
        399 return self._read_nowait(-1)

    File ~\Anaconda3\envs\satellite\lib\site-packages\aiohttp\streams.py:304, in StreamReader._wait(self, func_name)
        303     with self._timer:
    --> 304         await waiter
        305 else:

    File ~\Anaconda3\envs\satellite\lib\site-packages\aiohttp\helpers.py:721, in TimerContext.__exit__(self, exc_type, exc_val, exc_tb)
        720 if exc_type is asyncio.CancelledError and self._cancelled:
    --> 721     raise asyncio.TimeoutError from None
        722 return None

    TimeoutError:

    The above exception was the direct cause of the following exception:

    FSTimeoutError                            Traceback (most recent call last)
    Input In [62], in <cell line: 3>()
          1 # Flood Region Point - Thiruvanthpuram
          2 filename = "Soil_Moisture_sample.csv"
    ----> 3 parsed_data[["soil","tmax","tmin","ppt"]].sel(lon=8.520833, lat=76.4375, method="nearest").to_dataframe().to_csv(filename,mode='a',index=False, header=False)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\dataset.py:5898, in Dataset.to_dataframe(self, dim_order)
       5870 """Convert this dataset into a pandas.DataFrame.
       5871
       5872 Non-index variables in this dataset form the columns of the
       (...)
       5893
       5894 """
       5896 ordered_dims = self._normalize_dim_order(dim_order=dim_order)
    -> 5898 return self._to_dataframe(ordered_dims=ordered_dims)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\dataset.py:5862, in Dataset._to_dataframe(self, ordered_dims)
       5860 def _to_dataframe(self, ordered_dims: Mapping[Any, int]):
       5861     columns = [k for k in self.variables if k not in self.dims]
    -> 5862     data = [
       5863         self._variables[k].set_dims(ordered_dims).values.reshape(-1)
       5864         for k in columns
       5865     ]
       5866     index = self.coords.to_index([*ordered_dims])
       5867     return pd.DataFrame(dict(zip(columns, data)), index=index)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\dataset.py:5863, in <listcomp>(.0)
       5860 def _to_dataframe(self, ordered_dims: Mapping[Any, int]):
       5861     columns = [k for k in self.variables if k not in self.dims]
       5862     data = [
    -> 5863         self._variables[k].set_dims(ordered_dims).values.reshape(-1)
       5864         for k in columns
       5865     ]
       5866     index = self.coords.to_index([*ordered_dims])
       5867     return pd.DataFrame(dict(zip(columns, data)), index=index)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\variable.py:527, in Variable.values(self)
        524 @property
        525 def values(self):
        526     """The variable's data as a numpy.ndarray"""
    --> 527     return _as_array_or_item(self._data)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\variable.py:267, in _as_array_or_item(data)
        253 def _as_array_or_item(data):
        254     """Return the given values as a numpy array, or as an individual item if
        255     it's a 0d datetime64 or timedelta64 array.
        256
       (...)
        265     TODO: remove this (replace with np.asarray) once these issues are fixed
        266     """
    --> 267     data = np.asarray(data)
        268     if data.ndim == 0:
        269         if data.dtype.kind == "M":

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\array\core.py:1696, in Array.__array__(self, dtype, **kwargs)
       1695 def __array__(self, dtype=None, **kwargs):
    -> 1696     x = self.compute()
       1697     if dtype and x.dtype != dtype:
       1698         x = x.astype(dtype)

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\base.py:315, in DaskMethodsMixin.compute(self, **kwargs)
        291 def compute(self, **kwargs):
        292     """Compute this dask collection
        293
        294     This turns a lazy Dask collection into its in-memory equivalent.
       (...)
        313     dask.base.compute
        314     """
    --> 315     (result,) = compute(self, traverse=False, **kwargs)
        316     return result

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\base.py:600, in compute(traverse, optimize_graph, scheduler, get, *args, **kwargs)
        597     keys.append(x.__dask_keys__())
        598     postcomputes.append(x.__dask_postcompute__())
    --> 600 results = schedule(dsk, keys, **kwargs)
        601 return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\threaded.py:89, in get(dsk, keys, cache, num_workers, pool, **kwargs)
         86     elif isinstance(pool, multiprocessing.pool.Pool):
         87         pool = MultiprocessingPoolExecutor(pool)
    ---> 89 results = get_async(
         90     pool.submit,
         91     pool._max_workers,
         92     dsk,
         93     keys,
         94     cache=cache,
         95     get_id=_thread_get_id,
         96     pack_exception=pack_exception,
         97     **kwargs,
         98 )
        100 # Cleanup pools associated to dead threads
        101 with pools_lock:

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\local.py:511, in get_async(submit, num_workers, dsk, result, cache, get_id, rerun_exceptions_locally, pack_exception, raise_exception, callbacks, dumps, loads, chunksize, **kwargs)
        509         _execute_task(task, data)  # Re-execute locally
        510     else:
    --> 511         raise_exception(exc, tb)
        512 res, worker_id = loads(res_info)
        513 state["cache"][key] = res

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\local.py:319, in reraise(exc, tb)
        317 if exc.__traceback__ is not tb:
        318     raise exc.with_traceback(tb)
    --> 319 raise exc

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\local.py:224, in execute_task(key, task_info, dumps, loads, get_id, pack_exception)
        222 try:
        223     task, data = loads(task_info)
    --> 224     result = _execute_task(task, data)
        225     id = get_id()
        226     result = dumps((result, id))

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\core.py:119, in _execute_task(arg, cache, dsk)
        115     func, args = arg[0], arg[1:]
        116     # Note: Don't assign the subtask results to a variable. numpy detects
        117     # temporaries by their reference count and can execute certain
        118     # operations in-place.
    --> 119     return func(*(_execute_task(a, cache) for a in args))
        120 elif not ishashable(arg):
        121     return arg

    File ~\AppData\Roaming\Python\Python38\site-packages\dask\array\core.py:128, in getter(a, b, asarray, lock)
        123     # Below we special-case `np.matrix` to force a conversion to
        124     # `np.ndarray` and preserve original Dask behavior for `getter`,
        125     # as for all purposes `np.matrix` is array-like and thus
        126     # `is_arraylike` evaluates to `True` in that case.
        127     if asarray and (not is_arraylike(c) or isinstance(c, np.matrix)):
    --> 128         c = np.asarray(c)
        129 finally:
        130     if lock:

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\indexing.py:459, in ImplicitToExplicitIndexingAdapter.__array__(self, dtype)
        458 def __array__(self, dtype=None):
    --> 459     return np.asarray(self.array, dtype=dtype)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\indexing.py:623, in CopyOnWriteArray.__array__(self, dtype)
        622 def __array__(self, dtype=None):
    --> 623     return np.asarray(self.array, dtype=dtype)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\core\indexing.py:524, in LazilyIndexedArray.__array__(self, dtype)
        522 def __array__(self, dtype=None):
        523     array = as_indexable(self.array)
    --> 524     return np.asarray(array[self.key], dtype=None)

    File ~\Anaconda3\envs\satellite\lib\site-packages\xarray\backends\zarr.py:76, in ZarrArrayWrapper.__getitem__(self, key)
         74 array = self.get_array()
         75 if isinstance(key, indexing.BasicIndexer):
    ---> 76     return array[key.tuple]
         77 elif isinstance(key, indexing.VectorizedIndexer):
         78     return array.vindex[
         79         indexing._arrayize_vectorized_indexer(key, self.shape).tuple
         80     ]

    File ~\Anaconda3\envs\satellite\lib\site-packages\zarr\core.py:788, in Array.__getitem__(self, selection)
        786     result = self.vindex[selection]
        787 else:
    --> 788     result = self.get_basic_selection(pure_selection, fields=fields)
        789 return result

    File ~\Anaconda3\envs\satellite\lib\site-packages\zarr\core.py:914, in Array.get_basic_selection(self, selection, out, fields)
        911     return self._get_basic_selection_zd(selection=selection, out=out,
        912                                         fields=fields)
        913 else:
    --> 914     return self._get_basic_selection_nd(selection=selection, out=out,
        915                                         fields=fields)

    File ~\Anaconda3\envs\satellite\lib\site-packages\zarr\core.py:957, in Array._get_basic_selection_nd(self, selection, out, fields)
        951 def _get_basic_selection_nd(self, selection, out=None, fields=None):
        952     # implementation of basic selection for array with at least one dimension
        953
        954     # setup indexer
        955     indexer = BasicIndexer(selection, self)
    --> 957     return self._get_selection(indexer=indexer, out=out, fields=fields)

    File ~\Anaconda3\envs\satellite\lib\site-packages\zarr\core.py:1247, in Array._get_selection(self, indexer, out, fields)
       1241 if not hasattr(self.chunk_store, "getitems") or \
       1242    any(map(lambda x: x == 0, self.shape)):
       1243     # sequentially get one key at a time from storage
       1244     for chunk_coords, chunk_selection, out_selection in indexer:
       1245
       1246         # load chunk selection into output array
    -> 1247         self._chunk_getitem(chunk_coords, chunk_selection, out, out_selection,
       1248                             drop_axes=indexer.drop_axes, fields=fields)
       1249 else:
       1250     # allow storage to get multiple items at once
       1251     lchunk_coords, lchunk_selection, lout_selection = zip(*indexer)

    File ~\Anaconda3\envs\satellite\lib\site-packages\zarr\core.py:1939, in Array._chunk_getitem(self, chunk_coords, chunk_selection, out, out_selection, drop_axes, fields)
       1935 ckey = self._chunk_key(chunk_coords)
       1937 try:
       1938     # obtain compressed data for chunk
    -> 1939     cdata = self.chunk_store[ckey]
       1941 except KeyError:
       1942     # chunk not initialized
       1943     if self._fill_value is not None:

    File ~\Anaconda3\envs\satellite\lib\site-packages\zarr\storage.py:717, in KVStore.__getitem__(self, key)
        716 def __getitem__(self, key):
    --> 717     return self._mutable_mapping[key]

    File ~\Anaconda3\envs\satellite\lib\site-packages\fsspec\mapping.py:137, in FSMap.__getitem__(self, key, default)
        135 k = self._key_to_str(key)
        136 try:
    --> 137     result = self.fs.cat(k)
        138 except self.missing_exceptions:
        139     if default is not None:

    File ~\Anaconda3\envs\satellite\lib\site-packages\fsspec\asyn.py:111, in sync_wrapper.<locals>.wrapper(*args, **kwargs)
        108 @functools.wraps(func)
        109 def wrapper(*args, **kwargs):
        110     self = obj or args[0]
    --> 111     return sync(self.loop, func, *args, **kwargs)

    File ~\Anaconda3\envs\satellite\lib\site-packages\fsspec\asyn.py:94, in sync(loop, func, timeout, *args, **kwargs)
         91 return_result = result[0]
         92 if isinstance(return_result, asyncio.TimeoutError):
         93     # suppress asyncio.TimeoutError, raise FSTimeoutError
    ---> 94     raise FSTimeoutError from return_result
         95 elif isinstance(return_result, BaseException):
         96     raise return_result

    FSTimeoutError:

A: In the line:
store = fsspec.get_mapper(asset.href)

You can pass extra arguments to the fsspec backend, in this case HTTP, see fsspec.implementations.http.HTTPFileSystem. In this case, client_kwargs get passed to aiohttp.ClientSession, and include an optional timeout argument. Your call may look something like
from aiohttp import ClientTimeout
store = get_mapper(asset.href, client_kwargs={"timeout": ClientTimeout(total=5000, connect=1000)})


text:
Q: Extract n Words Around Defined Term (Multicase) I have a vector of text strings, such as:
Sentences <- c("I would have gotten the promotion, but TEST my attendance wasn't good enough.Let me help you with your baggage.",
               "Everyone was busy, so I went to the movie alone. Two seats were vacant.",
               "TEST Rock music approaches at high velocity.",
               "I am happy to take your TEST donation; any amount will be greatly TEST appreciated.",
               "A purple pig and a green donkey TEST flew a TEST kite in the middle of the night and ended up sunburnt.",
               "Rock music approaches at high velocity TEST.")

I would like to extract n (for example: three) words (a word is characterized by a whitespace before and after character(s)) AROUND (i.e., before and after) a particular term (e.g., 'TEST').
Improtant: Several matches should be allowed (i.e., if a particular term occurs more than one times, the intended solution should capture those cases).
The result might look like this (the format can be improved):
S1  <- c(before = "the promotion, but", after = "my attendance wasn't")
S2  <- c(before = "",                   after = "")
S3  <- c(before = "",                   after = "Rock music approaches")
S4a <- c(before = "to take your",       after = "donation; any amount")
S4b <- c(before = "will be greatly",    after = "appreciated.")
S5a <- c(before = "a green donkey",     after = "flew a TEST")
S5b <- c(before = "TEST flew",          after = "kite in the")
S6  <- c(before = "at high velocit",    after = "")

How can I do this? I already figured out other psots, which are either only for one-case-matches or relate to fixed sentence structures.

A: The quanteda package has a great function for this: kwic() (keywords in context).
Out of the box, this works pretty well on your example:
library("quanteda")
names(Sentences) <- paste0("S", seq_along(Sentences))
(kw <- kwic(Sentences, "TEST", window = 3))
#
# [S1, 9]   promotion, but | TEST | my attendance wasn't
# [S3, 1]                  | TEST | Rock music approaches
# [S4, 7]     to take your | TEST | donation; any
# [S4, 15] will be greatly | TEST | appreciated.
# [S5, 8]   a green donkey | TEST | flew a TEST
# [S5, 11]     TEST flew a | TEST | kite in the
# [S6, 7] at high velocity | TEST | .

(kw2 <- as.data.frame(kw)[, c("docname", "pre", "post")])
#   docname              pre                  post
# 1      S1  promotion , but  my attendance wasn't
# 2      S3                  Rock music approaches
# 3      S4     to take your        donation ; any
# 4      S4  will be greatly         appreciated .
# 5      S5   a green donkey           flew a TEST
# 6      S5      TEST flew a           kite in the
# 7      S6 at high velocity                     .

That's probably a better format than the separate objects you ask for you in the question.  But to get as close as possible to your target, you can further transform it as follows.
# this picks up the empty matching sentence S2
(kw3 <- merge(kw2,
              data.frame(docname = names(Sentences), stringsAsFactors = FALSE),
              all.y = TRUE))
# replaces the NA with the empty string
kw4 <- as.data.frame(lapply(kw3, function(x) { x[is.na(x)] <- ""; x} ),
                     stringsAsFactors = FALSE)
# renames pre/post to before/after
names(kw4)[2:3] <- c("before", "after")
# makes the docname unique
kw4$docname <- make.unique(kw4$docname)

kw4
#   docname           before                 after
# 1      S1  promotion , but  my attendance wasn't
# 2      S2
# 3      S3                  Rock music approaches
# 4      S4     to take your        donation ; any
# 5    S4.1  will be greatly         appreciated .
# 6      S5   a green donkey           flew a TEST
# 7    S5.1      TEST flew a           kite in the
# 8      S6 at high velocity                     .


text:
Q: Как дешифровать объедененные строки? Задача:

Зашифрованный текст должен храниться в файле текстового формата вместе
  с ключом. Перед записью в файл зашифрованного текста и ключа
  предварительно перемешайте записываемые массивы (в получаемом массиве
  выделяются фиксированные позиции для хранения символов ключа; для
  корректной сборки ключа необходимо указать длину ключа в символах и
  шаг фиксированных позиций, т.е. через сколько символов шифрованного
  текста находятся символы ключа; указанные признаки можно записать в
  качестве первых двух байтов файла или же в других позициях файла).

Пример:
 1) Перемешивать строки.

Входные переменные:
  text = "abcd"  key = "12"  step = 2
Выходные переменные:
  result = "1ab2cd"

2) Теперь мне нужно привести перемешанную строку к исходным данным, где заранее известна длина ключа и шаг.

Входные переменные:
  result = "1ab2cd"  key.Length = 2  step = 2
  Выходные переменные:
  text = "abcd"  key = "12"

Алгоритм по перемешиванию строки(1) уже реализован:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Input
{
    class Program
    {
        static void Main(string[] args)
        {
            int step, word;
            string text, key, result = string.Empty;

            Console.Write("Enter Text : ");
            text = Console.ReadLine();
            Console.Write("Enter Key : ");
            key = Console.ReadLine();
            Console.Write("Enter Step : ");
            step = int.Parse(Console.ReadLine());

            // MIX STRING
            word = 0;

            if (step <= text.Length)
            {
                for (int i = 0; i < key.Length; i++)
                {
                    result += key.Substring(i, 1);
                    for (int k = 0; k < step; k++)
                    {
                        try
                        {
                            result += text.Substring(word, 1);
                            word++;
                        }
                        catch
                        {
                            break;
                        }
                    }
                }

                if (word < text.Length)
                {
                    result += text.Substring(word, (text.Length - word));
                }
            }

            Console.WriteLine("Result Text : " + result);

            // DECIPHER STRING

            Console.WriteLine("text: " + text);
            Console.WriteLine("key: " + key);

            Console.ReadKey();
        }
    }
}

Проблема в том, что я не могу заставить алгоритм работать в обратную сторону.

A: Написал лет сто назад , попробуй возможно подойдёт для твоих целей.
        public string EnCrypt_Xs(string text)
        {
            string abc = "qwertyuiopasdfghjklzxcvbnm0123456789QWERTYUIOPASDFGHJKLZXCVBNM";
            int lng = abc.Length;
            string result = null;
            Random rnd = new Random();
            for (int i = 0; i < 512; i++)
            {
                result += abc[rnd.Next(lng)];
            }
            char[] res = result.ToCharArray();
            string ds = null;
            char[] data = text.ToCharArray();
            for (int i = 0; i < data.Length; i++)
            {
                ds += data[i].ToString();
                ds += res[i].ToString();
            }
            string ds1 = null;
            char[] dat = ds.ToCharArray();
            for (int i = 0; i < dat.Length; i++)
            {
                ds1 += dat[i].ToString();
                ds1 += res[i].ToString();
            }
            return ds1.ToString();
        }
        public string DeCryptXs(string text)
        {
            string res = null;
            char[] data = text.ToCharArray();
            for (int i = 0; i < data.Length; i++)
            {
                res += data[i]; i++;
            }
            string result = null;
            char[] str = res.ToCharArray();
            for (int x = 0; x < str.Length; x++)
            {
                result += str[x]; x++;
            }
            return result;
        }

A: Кодировка
private static void Encoding()
{
    var text = "My random text";
    var key = "12345";
    var step = 3;

    if (text.Length + step < key.Length * step)
    {
        Console.WriteLine("\n" + new string('=', 20));
        Console.WriteLine($"Слишком длинный ключ/шаг");
        Console.WriteLine($"Минимальная длина текста при текущем ключе/шаге: {key.Length * step}");
        Console.WriteLine($"Текущая длина текста с учетом шага: {text.Length + step}");
        Console.WriteLine(new string('=', 20) + "\n");
        return;
    }

    var textIterator = 0;
    var keyIterator = 0;
    var result = new StringBuilder();

    for (int i = 0; i < text.Length + key.Length; i++)
    {
        if (i % (step + 1) == 0
            && keyIterator < key.Length)
        {
            result.Append(key[keyIterator++]);
        }
        else
        {
            result.Append(text[textIterator++]);
        }
    }

    Console.WriteLine($"Результат: {result}");
}

Расшифровка
private static void Decoding()
{
    var encodedText = "1My2 r3andom text";
    var keyLength = 3;
    var step = 2;

    if (encodedText.Length < keyLength * step)
    {
        Console.WriteLine("\n" + new string('=', 20));
        Console.WriteLine("Ключ/шаг не соответствуют максимально допустимой длине");
        Console.WriteLine($"Минимальная длина текста при текущем ключе/шаге: {keyLength * step}");
        Console.WriteLine($"Текущая длина текста: {encodedText.Length}");
        Console.WriteLine(new string('=', 20) + "\n");
        return;
    }

    var key = new StringBuilder();
    var text = new StringBuilder();

    for (int i = 0; i < encodedText.Length; i++)
    {
        if (i % (step + 1) == 0
            && key.Length < keyLength)
        {
            key.Append(encodedText[i]);
        }
        else
        {
            text.Append(encodedText[i]);
        }
    }

    Console.WriteLine($"Ключ: {key}");
    Console.WriteLine($"Текст: {text}");
}


text:
Q: I got an error while using the socket.io library I have a question about the socket.
Server side with the address http://node.elyjm.ir I wrote the following code (in the index.js file)
var mysql = require("mysql");
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http, {
cors: {
origin: "http://localhost:3000",
methods: ["GET", "POST"]
}
});
app.get('/', function(req, res){
res.send('connected');
});
http.listen(3000, function(){
console.log('listening on *:3000');
});
io.on('connection', function (socket) {
console.log('a client connected');
});

and in client side:
<!DOCTYPE html>

  <title>Socket.IO chat</title>

  <?php
    echo '';
  ?>

But I see the client side error below
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://node.elyjm.ir:3000/socket.io/?EIO=4&transport=polling&t=NyTVkVU. (Reason: CORS request did not succeed). Status code: (null).

A: Don't re declare socket in myFunc
var socket = io("http://node.elyjm.ir:3000/");
    function myFunc() {
        // var socket = io();  // ################ delete / comment this ################
    socket.on('connect', function () {
      document.getElementById("socketio").innerHTML = "socket connected2222";
    });
    }


text:
Q: Does a Google Map element have to be in the DOM when instantiating? I am instantiating a Google Map object like so:
this.map = new google.maps.Map(this.el, {
    center: new google.maps.LatLng(this.lat, this.lng),
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    zoom: this.zoom
});

Where this.el is an object created via document.createElement('div') but has not yet been inserted into the DOM.  When I later append this.el to the DOM I get a map that looks like this (note all the weird gray space):
http://cl.ly/3B3z1e3g2h1U301r0X1R
I do not have this problem, though, if I first append this.el to the DOM and then instantiate the map object.  Is there a way to create the map and then append it?  This would greatly simplify some of my map code (I am using this in Backbone.js views).
Thanks.
-Scott

A: After you append this.el to the DOM, you have to call google.maps.event.trigger(this.map, 'resize');


text:
Q: django rest serializer: ordering fields appearance Is it possible to specify in which order fields will appear in a serialised model?
To make sure there is no confusion, while searching answers for this I have found lots of suggestions for ordering objects in a list view but this is not what I am looking for.
I really mean for a given model, I'd like their fields, once serialized to appear in a specific order. I have a fairly complex serialized object containing a lot of nested serializers, which appear first. I'd prefer instead key identifying fields such as name and slug to show up first, for readability.
Apologies in advance if this question is a duplicate, but I didn't find any relevant responses.
Solution
Based on @Toni-Sredanović solution I have implemented the following solution
def promote_fields(model: models.Model, *fields):
    promoted_fields = list(fields)
    other_fields = [field.name for field in model._meta.fields if field.name not in promoted_fields]
    return promoted_fields + other_fields

class MySerializer(serializers.ModelSerializer):
    ...
    class Meta:
        model = MyModel
        fields = promote_fields(model, 'id', 'field1', 'field2')

A: For that you can specify which fields you want to show and their order in class Meta:
    class Meta:
        fields = ('id', 'name', 'slug', 'field_1', 'field_2', ..., )

Here is a full example:
class TeamWithGamesSerializer(serializers.ModelSerializer):
    """
    Team ModelSerializer with home and away games.
    Home and away games are nested lists serialized with GameWithTeamNamesSerializer.
    League is object serialized with LeagueSerializer instead of pk integer.
    Current players is a nested list serialized with PlayerSerializer.
    """
    league = LeagueSerializer(many=False, read_only=True)

    home_games = GameWithTeamNamesSerializer(many=True, read_only=True)
    away_games = GameWithTeamNamesSerializer(many=True, read_only=True)

    current_players = PlayerSerializer(many=True, read_only=True)

    class Meta:
        model = Team
        fields = ('id', 'name', 'head_coach', 'league', 'current_players', 'home_games', 'away_games', 'gender')

And the result:
{
    "id": 1,
    "name": "Glendale Desert Dogs",
    "head_coach": "Coach Desert Dog",
    "league": {
        "id": 1,
        "name": "Test league 1"
    },
    "current_players": [
        {
            "id": "rodriem02",
            "first_name": "Emanuel",
            "last_name": "Rodriguez",
            "current_team": 1
        },
        {
            "id": "ruthba01",
            "first_name": "Babe",
            "last_name": "Ruth",
            "current_team": 1
        }
    ],
    "home_games": [
        {
            "id": 6,
            "team_home": {
                "id": 1,
                "name": "Glendale Desert Dogs"
            },
            "team_away": {
                "id": 2,
                "name": "Mesa Solar Sox"
            },
            "status": "canceled",
            "date": "2019-10-01"
        },
        {
            "id": 7,
            "team_home": {
                "id": 1,
                "name": "Glendale Desert Dogs"
            },
            "team_away": {
                "id": 2,
                "name": "Mesa Solar Sox"
            },
            "status": "",
            "date": "2019-10-04"
        }
    ],
    "away_games": [
        {
            "id": 3,
            "team_home": {
                "id": 2,
                "name": "Mesa Solar Sox"
            },
            "team_away": {
                "id": 1,
                "name": "Glendale Desert Dogs"
            },
            "status": "canceled",
            "date": "2019-10-02"
        }
    ],
    "gender": "M"
}

If you would just use fields = '__all__' default ordering would be used which is:

*

*object id

*fields specified in the serializer

*fields specified in the model

Best i can think of right now regarding your comment about generating fields is getting the fields in model, not really sure how to access what you've defined in the serializer so you would still need to write that manually.
Here is how you could do it with my example (this would make the name and gender appear on top):
    class Meta:
        model = Team
        fields = ('name', 'gender')\
                 + tuple([field.name for field in model._meta.fields if field.name not in ('name', 'gender')])\
                 + ('league', 'home_games', 'away_games', 'current_players')


text:
Q: Iterate 50 times over an SQL command I want to make propotion codes for my product.
I have created an appropriate SQL statement which basically uses the current timestamp and runs SHA1 on it.
I tried a while ago to create an iterative loop over my INSERT command but failed
anyone know how?
Do 50 times
   INSERT INTO ......
end

Also, I cannot have two of the same promotion code so the timestamp needs to be different for each iteration (If it is at all possible that the timestamp might be the same between iterations).

A: write the code in python or some other scripting language.
Use a GUID for the promotion code rather than a hash of the timestamp.

A: http://dev.mysql.com/doc/refman/5.0/en/flow-control-constructs.html

A: Your approach with using the PROCEDURE is the best I guess. I would first set another delimiter, because you are using the ';' already:
delimiter //

After that define your procedure. The INSERT INTO ...... is your INSERT code, what you wrote in your question.
CREATE PROCEDURE createPromotions(p1 INT)
BEGIN
   SET @x = 0;
   REPEAT
   SET @x = @x + 1;

   INSERT INTO ......

   UNTIL @x > p1
   END REPEAT;
END
//

After entering the '//' the procedure is ready to CALL. And if you want to execute it 50 times, just call it 50 times:
CALL createPromotions(50)

A: This is pretty dirty, but if you have any table on your system which you know has more than 50 rows, you can do the following:
create table promotion_code ( pc varchar(100) );
set @c = 1;
insert into promotion_code
  select sha1( now() + (@c := @c + 1 ) )
  from mysql.help_relation limit 50;

A: CREATE PROCEDURE createPromotions(p1 INT)
 BEGIN
   SET @x = 0;
   REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT;
END

Some sort of proceedure like this would be nice but I don't know how to get it into the format I need.  which is to repeat an SQL statement 50 times


text:
Q: Spring boot sample: Unable to start embedded container error I am new to spring, so i downloaded jar from spring intializr for maven-web java 1.8 demo. I extracted and imported it to STS to run the main() file and I get below exception. Can some one tell me what's solution for this?
Solutions I tried from web but didn't work:
- Tried adding Hibernate-validator dependency to pom
- Tried adding spring-boot-starter-tomcat dependency to pom
STACK TRACE:
2017-01-26 12:19:32.587  INFO 3816 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2e4b8173: startup date [Thu Jan 26 12:19:32 EST 2017]; root of context hierarchy
2017-01-26 12:19:36.442  WARN 3816 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.http.encoding-org.springframework.boot.autoconfigure.web.HttpEncodingProperties': Initialization of bean failed; nested exception is javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
2017-01-26 12:19:36.454 ERROR 3816 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

The Bean Validation API is on the classpath but no implementation could be found

Action:

Add an implementation, such as Hibernate Validator, to the classpath

Pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>demo</name>
    <description>Demo project for Spring Boot</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

Application file:
package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

A: Had the same problem with release version 1.5.9 of Spring Boot.
To add to the answer by Jim Kiley, you should add the following in Maven pom.xml:
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>5.3.6.Final</version>
</dependency>

You can use the dependency version under properties section of Spring Boot pom.xml file (spring-boot-dependencies-1.5.9.RELEASE.pom):
<hibernate-validator.version>5.3.6.Final</hibernate-validator.version>

Located under path:
/.m2/repository/org/springframework/boot/spring-boot-dependencies/1.5.9.RELEASE/spring-boot-dependencies-1.5.9.RELEASE.pom

A: As the output says, you need to:

Add an implementation, such as Hibernate Validator, to the classpath

Since you're using Maven, that means you need to add the Hibernate Validator to your pom.xml's dependencies.

A: First of all, your pom.xml settings are correct.
spring-boot-starter-web has the dependency to hibernate-validator.
So in your project, you don't need to specify the dependency to hibernate-validator. Otherwise, what's the purpose to use maven?
So back to the resolution, the steps I did to resolve the problem are:

*

*Goto project folder where the pom.xml is located.

*Run mvn verify
The command will download the missing jar again from the repository and also check the correctness(corrupted or not) of jars in maven local repository.
If you see the warning messages similar to following:

[WARNING] error reading /home/vagrant/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.6/tomcat-embed-core-8.5.6.jar; invalid LOC header (bad signature)
[WARNING] error reading /home/vagrant/.m2/repository/org/hibernate/hibernate-validator/5.2.4.Final/hibernate-validator-5.2.4.Final.jar; invalid LOC header (bad signature)
[WARNING] error reading /home/vagrant/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.4/jackson-core-2.8.4.jar; invalid LOC header (bad signature)

Then this means that the jars downloaded by maven previously has been corrupted.

*To correct this, please delete those corrupted jars and run mvn verify again to re-download them and also ensure that there's no warning for jars.

*Go back to your IDE(STS or Eclipse), update your project and run the application again.

In above error the hibernate-validator-5.2.4.Final.jar is the hibernate validator that in quesion.

A: I met same issue and resolved it by delete these two folders under .m2

*

*com\fasterxml --> delete it will resolve TypeResovler issue.

*org\springframework  --> delete it will resolve lack of validator
issue.

then the program works.

A: I faced the same issue while runs the application and resolved the issue by deleting the .m2 folder.
.m2/repository


text:
Q: Are there special rules for voltage division of a high speed clock? High speed signals require special care in PCB layout to prevent high speed effects like ringing and overshoot. This obviously applies to clock signals as well.
Provided that one has a high voltage clock (e.g 3.3V) and wants to connect it to a low voltage input of an FPGA e.g 1.2V, one could use a voltage divider.

*

*Are there any disadvantages in general in dividing clock signal like this e.g increased noise or jitter?

*How should the voltage be reduced in a high speed signal e.g clock that is 100s of MHz?

A: The rules are that you must take into account impedance requirements and consider the effective RC network created by a voltage divider when considering track capacitance. See this excellent application note.
Dividers even at 33MHz are not going to work well, if at all, and I say that from personal experience where I advised against it but it was done anyway with the attendant pain of rework when the clock was not good enough any more. Remember that it is the clock edge you need to preserve.
It might be possible if you use a buffer immediately after a voltage divider, but you are likely to have duty cycle and phase issues relative to the original clock signal.
Track capacitance for a 100 micron track spaced 100 micron from the ground plane is about 1pF per 25mm of track. Even with short tracks and using a 50 ohm divider there is a low pass filter of 530MHz for a 6 inch distribution track and the attendant extra drive requirement on the source. Note that a low pass filter adds deterministic jitter to a high speed signal. PCB tracks (including differential pairs) are low pass filters as well so adding another filter simply adds more attenuation to the overall clock signal.
I would usually use a clock system where the various levels are generated from individual ICs; there are a number of such offerings.
There are translation products available should that actually be necessary.
For an FPGA, I would normally feed a lower frequency clock and use the (commonly available) internal PLLs to generate any really high frequency clocks.

A: There is no magic; clocks are the same signals as any other. If you want a clean signal in 30+ MHz area, you need to take into account:

*

*Traces behave as transmission lines. Threat them as such; typical thin trace has about 65-80 ohms of characteristic impedance, and for more accuracy check your particular PCB layout.

*Output and input pins of ICs have capacitance, 2-10 pF typically;

*An output driver has a finite impedance. Assume 25 ohms for starters, and check with the manufacturer. If Voh and Vol are only given, use this recipe;

*Match the impedance on the input and output of the transmission line;

*Use a simulator (or common sense) to do #4.

Here is a network that I made using LTSpice, using the above assumptions (3.3 V source, 1.2 V destination):

It is for a 50-MHz clock and ~ 6" trace (~ 1 ns delay). In the worst case you will need three resistors. That's it.


text:
Q: Nextflow Docker problem -- permission problem with Docker? Not able to run pomoxis container I'm new to nextflow and docker containers.
I am trying to denovo assemble some reads and map reads to a reference genome but keep getting the following error:
shaun@shaun-HP-Z6-G4-Workstation:~/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble$ nextflow pomoxis_map_assemble_nextflow.nf
N E X T F L O W  ~  version 22.04.5
Launching `pomoxis_map_assemble_nextflow.nf` [goofy_hoover] DSL1 - revision: 6e4be1e0bd
executor >  local (1)
executor >  local (1)
[cf/bc2b69] process > pomoxis (1) [100%] 1 of 1, failed: 1 ✘
WARN: There's no process matching config selector: fastqc
WARN: There's no process matching config selector: porechop
WARN: There's no process matching config selector: bioawk
WARN: There's no process matching config selector: fastqconvert
WARN: There's no process matching config selector: blast_raw
Error executing process > 'pomoxis (1)'

Caused by:
  Process `pomoxis (1)` terminated with an error exit status (127)

Command executed:

  mini_align -i output.fastq -r /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/ref/*.fasta -o results -p > output_test_final.fa

Command exit status:
  127

Command output:
  (empty)

Command error:
  .command.sh: line 2: mini_align: command not found

Work dir:
  /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/work/cf/bc2b696aea0863d76c2c9221315c39

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

The WARN is because I use a master config file for all of my .nf scripts.
Here is the logfile from the above error:
Oct.-12 10:33:04.759 [main] DEBUG nextflow.cli.Launcher - $> nextflow pomoxis_map_assemble_nextflow.nf
Oct.-12 10:33:04.822 [main] INFO  nextflow.cli.CmdRun - N E X T F L O W  ~  version 22.04.5
Oct.-12 10:33:04.837 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/nextflow.config
Oct.-12 10:33:04.838 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/nextflow.config
Oct.-12 10:33:04.856 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Oct.-12 10:33:05.414 [main] DEBUG nextflow.cli.CmdRun - Applied DSL=1 by probing script field
Oct.-12 10:33:05.428 [main] INFO  nextflow.cli.CmdRun - Launching `pomoxis_map_assemble_nextflow.nf` [goofy_hoover] DSL1 - revision: 6e4be1e0bd
Oct.-12 10:33:05.439 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; plugins-dir=/home/shaun/.nextflow/plugins; core-plugins: nf-amazon@1.7.2,nf-azure@0.13.2,nf-console@1.0.3,nf-ga4gh@1.0.3,nf-google@1.1.4,nf-sqldb@0.4.0,nf-tower@1.4.0
Oct.-12 10:33:05.440 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
Oct.-12 10:33:05.449 [main] INFO  org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Oct.-12 10:33:05.449 [main] INFO  org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Oct.-12 10:33:05.452 [main] INFO  org.pf4j.DefaultPluginManager - PF4J version 3.4.1 in 'deployment' mode
Oct.-12 10:33:05.478 [main] INFO  org.pf4j.AbstractPluginManager - No plugins
Oct.-12 10:33:05.527 [main] DEBUG nextflow.Session - Session uuid: ddab5124-cc54-4c39-840d-6cc1bf664773
Oct.-12 10:33:05.527 [main] DEBUG nextflow.Session - Run name: goofy_hoover
Oct.-12 10:33:05.527 [main] DEBUG nextflow.Session - Executor pool size: 16
Oct.-12 10:33:05.547 [main] DEBUG nextflow.cli.CmdRun -
  Version: 22.04.5 build 5708
  Created: 15-07-2022 16:09 UTC (16-07-2022 01:39 ACDT)
  System: Linux 5.13.0-52-generic
  Runtime: Groovy 3.0.10 on OpenJDK 64-Bit Server VM 11.0.15+10-Ubuntu-0ubuntu0.21.10.1
  Encoding: UTF-8 (UTF-8)
  Process: 665521@shaun-HP-Z6-G4-Workstation [127.0.1.1]
  CPUs: 16 - Mem: 62.5 GB (32.1 GB) - Swap: 2 GB (2 GB)
Oct.-12 10:33:05.564 [main] DEBUG nextflow.Session - Work-dir: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/work [ext2/ext3]
Oct.-12 10:33:05.564 [main] DEBUG nextflow.Session - Script base path does not exist or is not a directory: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/bin
Oct.-12 10:33:05.573 [main] DEBUG nextflow.executor.ExecutorFactory - Extension executors providers=[]
Oct.-12 10:33:05.583 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Oct.-12 10:33:05.605 [main] DEBUG nextflow.cache.CacheFactory - Using Nextflow cache factory: nextflow.cache.DefaultCacheFactory
Oct.-12 10:33:05.613 [main] DEBUG nextflow.util.CustomThreadPool - Creating default thread pool > poolSize: 17; maxThreads: 1000
Oct.-12 10:33:05.700 [main] DEBUG nextflow.Session - Session start invoked
Oct.-12 10:33:05.706 [main] DEBUG nextflow.trace.TraceFileObserver - Flow starting -- trace file: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/pipeline_trace.txt
Oct.-12 10:33:05.921 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
Oct.-12 10:33:05.969 [PathVisitor-1] DEBUG nextflow.file.PathVisitor - files for syntax: glob; folder: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/; pattern: *.fastq; options: [:]
Oct.-12 10:33:05.998 [PathVisitor-1] DEBUG nextflow.file.PathVisitor - files for syntax: glob; folder: /home/shaun/nextflow_pipelines/pipelines/pomoxis_map_assemble/ref/; pattern: *.fasta; options: [:]
Oct.-12 10:33:06.048 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct.-12 10:33:06.048 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct.-12 10:33:06.052 [main] DEBUG nextflow.executor.Executor - [warm up] executor > local
Oct.-12 10:33:06.056 [main] DEBUG n.processor.LocalPollingMonitor - Creating local task monitor for executor 'local' > cpus=16; memory=62.5 GB; capacity=16; pollInterval=100ms; dumpInterval=5m
Oct.-12 10:33:06.121 [main] DEBUG nextflow.Session - Workflow process names [dsl1]: pomoxis
Oct.-12 10:33:06.133 [main] WARN  nextflow.Session - There's no process matching config selector: fastqc
Oct.-12 10:33:06.134 [main] WARN  nextflow.Session - There's no process matching config selector: porechop
Oct.-12 10:33:06.135 [main] WARN  nextflow.Session - There's no process matching config selector: bioawk
Oct.-12 10:33:06.135 [main] WARN  nextflow.Session - There's no process matching config selector: fastqconvert
Oct.-12 10:33:06.135 [main] WARN  nextflow.Session - There's no process matching config selector: blast_raw
Oct.-12 10:33:06.135 [main] DEBUG nextflow.script.ScriptRunner - > Await termination
Oct.-12 10:33:06.135 [main] DEBUG nextflow.Session - Session await
Oct.-12 10:33:06.344 [Task submitter] DEBUG nextflow.executor.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Oct.-12 10:33:06.349 [Task submitter] INFO  nextflow.Session - [cf/bc2b69] Submitted process > pomoxis (1)
Oct.-12 10:33:06.457 [Task monitor] DEBUG n.processor.TaskPollingMonitor - Task completed > TaskHandler[id: 1; name: pomoxis (1); status: COMPLETED; exit: 127; error: -; workDir: /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/work/cf/bc2b696aea0863d76c2c9221315c39]
Oct.-12 10:33:06.491 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'pomoxis (1)'

Caused by:
  Process `pomoxis (1)` terminated with an error exit status (127)

Command executed:

  mini_align -i output.fastq -r /home/shaun/nextflow_pipelines/pipelines/pomoxis_map_assemble/ref/*.fasta -o results -p > output_test_final.fa

Command exit status:
  127

Command output:
  (empty)

Command error:
  .command.sh: line 2: mini_align: command not found

Work dir:
  /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/work/cf/bc2b696aea0863d76c2c9221315c39

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
Oct.-12 10:33:06.499 [Task monitor] DEBUG nextflow.Session - Session aborted -- Cause: Process `pomoxis (1)` terminated with an error exit status (127)
Oct.-12 10:33:06.503 [main] DEBUG nextflow.Session - Session await > all process finished
Oct.-12 10:33:06.520 [main] DEBUG nextflow.Session - Session await > all barriers passed
Oct.-12 10:33:06.540 [main] DEBUG nextflow.trace.WorkflowStatsObserver - Workflow completed > WorkflowStats[succeededCount=0; failedCount=1; ignoredCount=0; cachedCount=0; pendingCount=0; submittedCount=0; runningCount=0; retriesCount=0; abortedCount=0; succeedDuration=0ms; failedDuration=1.2s; cachedDuration=0ms;loadCpus=0; loadMemory=0; peakRunning=1; peakCpus=16; peakMemory=60 GB; ]
Oct.-12 10:33:06.540 [main] DEBUG nextflow.trace.TraceFileObserver - Flow completing -- flushing trace file
Oct.-12 10:33:06.715 [main] DEBUG nextflow.cache.CacheDB - Closing CacheDB done
Oct.-12 10:33:06.728 [main] DEBUG nextflow.script.ScriptRunner - > Execution complete -- Goodbye

I have the same error when I try to use pomoxis to devno assemble the the reads:
shaun@shaun-HP-Z6-G4-Workstation:~/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble$ nextflow pomoxis_denovo_nextflow.nf
N E X T F L O W  ~  version 22.04.5
Launching `pomoxis_denovo_nextflow.nf` [intergalactic_sammet] DSL1 - revision: 1927bae9ab
executor >  local (1)
[fb/3868bc] process > pomoxis (1) [100%] 1 of 1, failed: 1 ✘
WARN: There's no process matching config selector: fastqc
WARN: There's no process matching config selector: porechop
WARN: There's no process matching config selector: bioawk
WARN: There's no process matching config selector: fastqconvert
WARN: There's no process matching config selector: blast_raw
Error executing process > 'pomoxis (1)'

Caused by:
  Process `pomoxis (1)` terminated with an error exit status (127)

Command executed:

  mini_assemble -i output.fastq -o results -p > output_test_final.fa

Command exit status:
  127

Command output:
  (empty)

Command error:
  .command.sh: line 2: mini_assemble: command not found

Work dir:
  /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_map_assemble/work/fb/3868bc97cabfa0d2934f4344c13c89

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

This this is the output for the .command.sh
#!/bin/bash -ue
mini_assemble -i output.fastq -o results -p > output_test_final.fa

I have used the the flags for pomoxis from here --> https://nanoporetech.github.io/pomoxis/programs.html
Below are the two .nf files:
#!/usr/bin/env nextflow

//data_location

params.outdir = './results'
params.in = "$PWD/*.fastq"
datasetA = Channel.fromPath(params.in)
params.ref = "$PWD/ref/*.fasta"
datasetB = Channel.fromPath(params.ref)

//map and assemble

process pomoxis {

    publishDir "${params.outdir}", mode:'copy'

    input:
    path (c) from datasetA

    output:
    path "${c.baseName}_test_final.fa" into mapped_ch

    script:
    """
    mini_align -i $c -r $params.ref -o results -p > ${c.baseName}_test_final.fa
    """
}

#!/usr/bin/env nextflow

//data_location

params.outdir = './results'
params.in = "$PWD/*.fastq"
dataset = Channel.fromPath(params.in)

//devno only

process pomoxis {

    publishDir "${params.outdir}", mode:'copy'

    input:
    path (c) from dataset

    output:
    path "${c.baseName}_test_final.fa" into mapped_ch

    script:
    """
    mini_assemble -i $c -o results -p > ${c.baseName}_test_final.fa
    """
}

Here is the config file, I have tried multiple docker containers from docker hub but I get the same error message.
//resume = true

process {
            cpus = 16
            accelerator = 'Quadro-RTX-5000'
              memory = 60. GB
}

trace {
        enabled = true
        file = 'pipeline_trace.txt'
        fields = 'task_id,hash,process,name,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem'
}

docker {
            enabled = true
            temp = 'auto'
            runOption = '--user root'
}

params {
            nt_db_20221011 = '/home/shaun/blast/nt_db_20221011/nt'
}

process {
            withName:fastqc      {container = 'staphb/fastqc:latest'                                               }
            withName:porechop    {container = 'quay.io/biocontainers/porechop:0.2.3_seqan2.1.1--py36h2d50403_3'    }
            withName:bioawk      {container = 'wslhbio/bioawk:1.0-wslh-signed'                                     }
            withName:fastqconvert{container = 'staphb/seqtk:1.3'                                                   }
            withName:blast_raw   {container = 'staphb/blast:2.13.0'                                                }
            withname:pomoxis    {container = 'dpirdmk/pomoxis:0.1.11'                          }
}

Update:
After correcting the syntax error, I changed the container as suggested and added the -h function to the script section.
The following is the output from this:

shaun@shaun-HP-Z6-G4-Workstation:~/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_align$ nextflow pomoxis_align_nextflow.nf
N E X T F L O W  ~  version 22.04.5
Launching `pomoxis_align_nextflow.nf` [voluminous_solvay] DSL1 - revision: 4dca1d1d46
executor >  local (1)
[55/4dad0b] process > pomoxis (1) [  0%] 0 of 1
WARN: There's no process matching config selector: fastqc
WARN: There's no process matching config selector: porechop
WARN: There's no process matching config selector: bioawk
WARN: There's no process matching config selector: fastqconvert
WARN: There's no process matching config selector: blast_raw
Error executing process > 'pomoxis (1)'

Caused by:
  Missing output file(s) `output` expected by process `pomoxis (1)`

Command executed:

  mini_align -h

Command exit status:
  0

Command output:
  (empty)
executor >  local (1)
[55/4dad0b] process > pomoxis (1) [100%] 1 of 1, failed: 1 ✘
WARN: There's no process matching config selector: fastqc
WARN: There's no process matching config selector: porechop
WARN: There's no process matching config selector: bioawk
WARN: There's no process matching config selector: fastqconvert
WARN: There's no process matching config selector: blast_raw
Error executing process > 'pomoxis (1)'

Caused by:
  Missing output file(s) `output` expected by process `pomoxis (1)`

Command executed:

  mini_align -h

Command exit status:
  0

Command output:
  (empty)

Command error:
  mini_align [-h] -r <reference> -i <fastq>

  Align fastq/a formatted reads to a genome using minimap2.

      -h  show this help text.
      -r  reference, should be a fasta file. If correspondng minimap indices
          do not exist they will be created. (required).
      -i  fastq/a input reads (required).
      -I  split index every ~NUM input bases (default: 16G, this is larger
          than the usual minimap2 default).
      -d  set the minimap2 preset, e.g. map-ont, asm5, asm10, asm20 [default: map-ont]
      -f  force recreation of index file.
      -a  aggressively extend gaps (sets -A1 -B2 -O2 -E1 for minimap2).
      -P  filter to only primary alignments (i.e. run samtools view -F 2308).
          Deprecated: this filter is now default and can be disabled with -A.
      -y  filter to primary and supplementary alignments (i.e. run samtools view -F 260)
      -A  do not filter alignments, output all.
      -n  sort bam by read name.
      -c  chunk size. Input reads/contigs will be broken into chunks
          prior to alignment.
      -t  alignment threads (default: 1).
      -p  output file prefix (default: reads).
      -m  fill MD tag.
      -s  fill cs(=long) tag.
      -X  only create reference index files.
      -x  log all commands before running.
      -M  match score
      -S  mismatch score
      -O  open gap penalty
      -E  extend gap penalty.

Work dir:
  /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_align/work/55/4dad0b1df7105e31362f58b0c67f1f

Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`

Athough there is an error, I'm assuming this worked as I can see the help menu?
I then added flags to the script section of the .nf as per the Pomoxis website.
#!/usr/bin/env nextflow

//data_location

params.outdir = './results'
params.in = "$PWD/*.fastq"
datasetA = Channel.fromPath(params.in)
params.ref = "$PWD/SLCMV.fasta"
datasetB = Channel.fromPath(params.ref)

//map and assemble; input fastq only
//output; pomoxis is very particular about names, minimap can out put
//.sam or .paf

process pomoxis {

    publishDir "${params.outdir}", mode:'copy'

    input:
    path (c) from datasetA
    path (d) from datasetB

    output:
    path "${c.simpleName}" into mapped_ch

    script:
    """
    mini_align -r $d -i $c -p ${c.simpleName}
    """
}

The results are below:
shaun@shaun-HP-Z6-G4-Workstation:~/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_align$ nextflow pomoxis_align_nextflow.nf
N E X T F L O W  ~  version 22.04.5
Launching `pomoxis_align_nextflow.nf` [determined_bassi] DSL1 - revision: 1ad3e75c1b
executor >  local (1)
[50/860f9f] process > pomoxis (1) [  0%] 0 of 1
WARN: There's no process matching config selector: fastqc
WARN: There's no process matching config selector: porechop
WARN: There's no process matching config selector: bioawk
WARN: There's no process matching config selector: fastqconvert
WARN: There's no process matching config selector: blast_raw
Error executing process > 'pomoxis (1)'

Caused by:
  Missing output file(s) `output` expected by process `pomoxis (1)`
executor >  local (1)
[50/860f9f] process > pomoxis (1) [100%] 1 of 1, failed: 1 ✘
WARN: There's no process matching config selector: fastqc
WARN: There's no process matching config selector: porechop
WARN: There's no process matching config selector: bioawk
WARN: There's no process matching config selector: fastqconvert
WARN: There's no process matching config selector: blast_raw
Error executing process > 'pomoxis (1)'

Caused by:
  Missing output file(s) `output` expected by process `pomoxis (1)`

Command executed:

  mini_align -r SLCMV.fasta -i output.fastq -p output

Command exit status:
  0

Command output:
  (empty)

Command error:
  Creating fai index file SLCMV.fasta.fai
  Creating mmi index file SLCMV.fasta.map-ont.mmi
  [M::mm_idx_gen::0.003*2.10] collected minimizers
  [M::mm_idx_gen::0.005*2.42] sorted minimizers
  [M::main::0.009*1.77] loaded/built the index for 1 target sequence(s)
  [M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 1
  [M::mm_idx_stat::0.009*1.74] distinct minimizers: 522 (100.00% are singletons); average occurrences: 1.000; average spacing: 5.282; total length: 2757
  [M::main] Version: 2.24-r1122
  [M::main] CMD: minimap2 -I 16G -x map-ont -d SLCMV.fasta.map-ont.mmi SLCMV.fasta
  [M::main] Real time: 0.010 sec; CPU: 0.017 sec; Peak RSS: 0.003 GB
  [M::main::0.005*1.39] loaded/built the index for 1 target sequence(s)
  [M::mm_mapopt_update::0.005*1.37] mid_occ = 10
  [M::mm_idx_stat] kmer size: 15; skip: 10; is_hpc: 0; #seq: 1
  [M::mm_idx_stat::0.005*1.35] distinct minimizers: 522 (100.00% are singletons); average occurrences: 1.000; average spacing: 5.282; total length: 2757
  [M::worker_pipeline::9.159*1.00] mapped 87369 sequences
  [M::main] Version: 2.24-r1122
  [M::main] CMD: minimap2 -x map-ont --secondary=no -L -t 1 -a SLCMV.fasta.map-ont.mmi output.fastq
  [M::main] Real time: 9.182 sec; CPU: 9.145 sec; Peak RSS: 0.299 GB

Work dir:
  /home/shaun/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_align/work/50/860f9ffe37f7a17a4d5e216f67b512

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

I'm not sure how to fix this, I've tried changing the output name but this hasnt help.
interestingly, when I run mini_assemble .nf:
#!/usr/bin/env nextflow

//data_location

params.outdir = './results'
params.in = "$PWD/*.fastq"
dataset = Channel.fromPath(params.in)

//devno only; input is fastq
//output; pomoxis is very particular about names, the name that it out puts is
//prefix_test_final.fa where prefic can be anything and it will add _test_final.fa
//to the end of the file

process pomoxis {

    tag "$c"
    publishDir "${params.outdir}", mode:'copy'

    input:
    path (c) from dataset

    output:
    path ("${c.simpleName}_test_final.fa") into mapped_ch

    script:
    """
    mini_assemble -i $c -p ${c.simpleName}
    """
}

I get the following error:
shaun@shaun-HP-Z6-G4-Workstation:~/nextflow_pipelines/pipelines/WA_MomicaKehoe/Asad/nf_pipeline/pomoxis_assemble$ nextflow pomoxis_assemble_nextflow.nf
N E X T F L O W  ~  version 22.04.5
Launching `pomoxis_assemble_nextflow.nf` [intergalactic_fermi] DSL1 - revision: ce7a466307
executor >  local (1)
[04/28f5e6] process > pomoxis (output.fastq) [  0%] 0 of 1

Error executing process > 'pomoxis (output.fastq)'

Caused by:
  Missing output file(s) `output_test_final.fa` expected by process `pomoxis (output.fastq)`

Command executed:

  mini_assemble -i output.fastq -p output

Command exit status:
  0

Command output:
  Copying FASTX input to workspace: output.fastq > assm/output.fa.gz
  Skipped adapter trimming.
  Skipped pre-assembly correction.
  Overlapping reads...
  Assembling graph...
  Running racon read shuffle 1...
  Running round 1 consensus...
  Running round 2 consensus...
  Running round 3 consensus...
  Running round 4 consensus...
  Waiting for cleanup.
  Final assembly written to assm/output_final.fa. Have a nice day.

Command error:
  [M::mm_idx_stat::0.065*1.04] distinct minimizers: 69519 (92.83% are singletons); average occurrences: 1.101; average spacing: 5.337; total length: 408518
  [M::worker_pipeline::9.872*0.97] mapped 87369 sequences
  [M::main] Version: 2.24-r1122
  [M::main] CMD: minimap2 -L -K 500M -t 1 racon_1_3.fa.gz output.fa.gz
  [M::main] Real time: 9.880 sec; CPU: 9.620 sec; Peak RSS: 0.165 GB
  [racon::Polisher::initialize] loaded target sequences 0.011974 s
  [racon::Polisher::initialize] loaded sequences 2.047803 s
  [racon::Polisher::initialize] loaded overlaps 0.106485 s
  [racon::Polisher::initialize] aligning overlaps [=>                  ] 1.252726 s
  [racon::Polisher::initialize] aligning overlaps [==>                 ] 1.827141 s
  [racon::Polisher::initialize] aligning overlaps [===>                ] 2.413558 s
  [racon::Polisher::initialize] aligning overlaps [====>               ] 2.974846 s
  [racon::Polisher::initialize] aligning overlaps [=====>              ] 3.609222 s
  [racon::Polisher::initialize] aligning overlaps [======>             ] 4.263570 s
  [racon::Polisher::initialize] aligning overlaps [=======>            ] 4.934294 s
  [racon::Polisher::initialize] aligning overlaps [========>           ] 5.554714 s
  [racon::Polisher::initialize] aligning overlaps [=========>          ] 6.164404 s
  [racon::Polisher::initialize] aligning overlaps [==========>         ] 6.746845 s
executor >  local (1)
[04/28f5e6] process > pomoxis (output.fastq) [100%] 1 of 1, failed: 1 ✘
Error executing process > 'pomoxis (output.fastq)'

Caused by:
  Missing output file(s) `output_test_final.fa` expected by process `pomoxis (output.fastq)`

Command executed:

  mini_assemble -i output.fastq -p output

Command exit status:
  0

Command output:
  Copying FASTX input to workspace: output.fastq > assm/output.fa.gz
  Skipped adapter trimming.
  Skipped pre-assembly correction.
  Overlapping reads...
  Assembling graph...
  Running racon read shuffle 1...
  Running round 1 consensus...
  Running round 2 consensus...
  Running round 3 consensus...
  Running round 4 consensus...
  Waiting for cleanup.
  Final assembly written to assm/output_final.fa. Have a nice day.

Command error:
  [M::mm_idx_stat::0.065*1.04] distinct minimizers: 69519 (92.83% are singletons); average occurrences: 1.101; average spacing: 5.337; total length: 408518
  [M::worker_pipeline::9.872*0.97] mapped 87369 sequences
  [M::main] Version: 2.24-r1122
  [M::main] CMD: minimap2 -L -K 500M -t 1 racon_1_3.fa.gz output.fa.gz
  [M::main] Real time: 9.880 sec; CPU: 9.620 sec; Peak RSS: 0.165 GB
  [racon::Polisher::initialize] loaded target sequences 0.011974 s
  [racon::Polisher::initialize] loaded sequences 2.047803 s
  [racon::Polisher::initialize] loaded overlaps 0.106485 s
  [racon::Polisher::initialize] aligning overlaps [=>                  ] 1.252726 s
  [racon::Polisher::initialize] aligning overlaps [==>                 ] 1.827141 s
  [racon::Polisher::initialize] aligning overlaps [===>                ] 2.413558 s
  [racon::Polisher::initialize] aligning overlaps [====>               ] 2.974846 s
  [racon::Polisher::initialize] aligning overlaps [=====>              ] 3.609222 s
  [racon::Polisher::initialize] aligning overlaps [======>             ] 4.263570 s
  [racon::Polisher::initialize] aligning overlaps [=======>            ] 4.934294 s
  [racon::Polisher::initialize] aligning overlaps [========>           ] 5.554714 s
  [racon::Polisher::initialize] aligning overlaps [=========>          ] 6.164404 s
  [racon::Polisher::initialize] aligning overlaps [==========>         ] 6.746845 s
  [racon::Polisher::initialize] aligning overlaps [===========>        ] 7.282895 s
  [racon::Polisher::initialize] aligning overlaps [============>       ] 7.878856 s
  [racon::Polisher::initialize] aligning overlaps [=============>      ] 8.459672 s
  [racon::Polisher::initialize] aligning overlaps [==============>     ] 8.984196 s
  [racon::Polisher::initialize] aligning overlaps [===============>    ] 9.558089 s
  [racon::Polisher::initialize] aligning overlaps [================>   ] 10.072586 s
  [racon::Polisher::initialize] aligning overlaps [=================>  ] 10.648603 s
  [racon::Polisher::initialize] aligning overlaps [==================> ] 11.220553 s
  [racon::Polisher::initialize] aligning overlaps [===================>] 11.753881 s
  [racon::Polisher::initialize] aligning overlaps [====================] 12.364460 s
  [racon::Polisher::initialize] transformed data into windows 0.018851 s
  [racon::Polisher::polish] generating consensus [=>                  ] 0.515508 s
  [racon::Polisher::polish] generating consensus [==>                 ] 1.077083 s
  [racon::Polisher::polish] generating consensus [===>                ] 1.561330 s
  [racon::Polisher::polish] generating consensus [====>               ] 1.967063 s
  [racon::Polisher::polish] generating consensus [=====>              ] 2.574379 s
  [racon::Polisher::polish] generating consensus [======>             ] 3.037187 s
  [racon::Polisher::polish] generating consensus [=======>            ] 3.740370 s
  [racon::Polisher::polish] generating consensus [========>           ] 20.112573 s
  [racon::Polisher::polish] generating consensus [=========>          ] 46.718507 s
  [racon::Polisher::polish] generating consensus [==========>         ] 48.913841 s
  [racon::Polisher::polish] generating consensus [===========>        ] 52.859126 s
  [racon::Polisher::polish] generating consensus [============>       ] 57.495382 s
  [racon::Polisher::polish] generating consensus [=============>      ] 74.111321 s
  [racon::Polisher::polish] generating consensus [==============>     ] 79.382051 s
  [racon::Polisher::polish] generating consensus [===============>    ] 113.129291 s
  [racon::Polisher::polish] generating consensus [================>   ] 115.971094 s
  [racon::Polisher::polish] generating consensus [=================>  ] 123.322513 s
  [racon::Polisher::polish] generating consensus [==================> ] 128.155934 s
  [racon::Polisher::polish] generating consensus [===================>] 130.509134 s
  [racon::Polisher::polish] generating consensus [====================] 131.095442 s
  [racon::Polisher::] total = 145.794273 s

Work dir:
  /home/shaun/nextflow_pipelines/pipelines/WA_MomicaKehoe/Asad/nf_pipeline/pomoxis_assemble/work/04/28f5e6eed13d3fc986739e287594d9

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

However, the file that I need is in:
shaun@shaun-HP-Z6-G4-Workstation:~/nextflow_pipelines/pipelines/nf_pipeline/pomoxis_assemble/work/04/28f5e6eed13d3fc986739e287594d9/assm$ cat output_final.fa

When I cat this file I can see that there are contig in the file as expected.
I can see that pomoxis is expecting output_test_final.fa, which is indeed in the work dir, but pomoxis cant see it or use it?
Do you have any suggestions on why these errors are occuring?
I appreciate your time.

A:
Command error:
  .command.sh: line 2: mini_assemble: command not found

You will get this error when you try to run a command outside of a container and the executable does not exist in your $PATH. Usually we see this when we forget to add docker.enabled = true (or singularity.enabled = true if using Singualarity) to our nextflow.config. However, in this case it's just caused by a typo in your config file. The withName config selector must be camel case. You will also get a 'command not found' error using the chosen container. If we instead use the pomoxis biocontainer, we get the expected result. For example:
Contents of nextflow.config:
docker {
    enabled = true
}

process {

    withName: pomoxis {
        container = 'quay.io/biocontainers/pomoxis:0.3.10--pyhdfd78af_0'
    }
}

Contents of map_and_assembly.nf:
process pomoxis {

    """
    mini_align -h
    """
}

Results:
$ nextflow run map_and_assembly.nf -dsl1
N E X T F L O W  ~  version 22.04.4
Launching `map_and_assembly.nf` [loving_thompson] DSL1 - revision: 6efbc53bf8
executor >  local (1)
[22/23c938] process > pomoxis [100%] 1 of 1 ✔

Completed at: 13-Oct-2022 01:05:27
Duration    : 2m 46s
CPU hours   : (a few seconds)
Succeeded   : 1

$ cat work/22/23c938ca9312037ee10087ba5d48a2/.command.err
Unable to find image 'quay.io/biocontainers/pomoxis:0.3.10--pyhdfd78af_0' locally
0.3.10--pyhdfd78af_0: Pulling from biocontainers/pomoxis
c1a16a04cedd: Already exists
4ca545ee6d5d: Already exists
af0d0c971daf: Pulling fs layer
af0d0c971daf: Verifying Checksum
af0d0c971daf: Download complete
af0d0c971daf: Pull complete
Digest: sha256:b42d95b742be3dc8333f57892c4aa2cc5cd739e796b33c7f310696856dcdea4d
Status: Downloaded newer image for quay.io/biocontainers/pomoxis:0.3.10--pyhdfd78af_0
mini_align [-h] -r <reference> -i <fastq>

Align fastq/a formatted reads to a genome using minimap2.

    -h  show this help text.
    -r  reference, should be a fasta file. If correspondng minimap indices
        do not exist they will be created. (required).
    -i  fastq/a input reads (required).
    -I  split index every ~NUM input bases (default: 16G, this is larger
        than the usual minimap2 default).
    -d  set the minimap2 preset, e.g. map-ont, asm5, asm10, asm20 [default: map-ont]
    -f  force recreation of index file.
    -a  aggressively extend gaps (sets -A1 -B2 -O2 -E1 for minimap2).
    -P  filter to only primary alignments (i.e. run samtools view -F 2308).
        Deprecated: this filter is now default and can be disabled with -A.
    -y  filter to primary and supplementary alignments (i.e. run samtools view -F 260)
    -A  do not filter alignments, output all.
    -n  sort bam by read name.
    -c  chunk size. Input reads/contigs will be broken into chunks
        prior to alignment.
    -t  alignment threads (default: 1).
    -p  output file prefix (default: reads).
    -m  fill MD tag.
    -s  fill cs(=long) tag.
    -X  only create reference index files.
    -x  log all commands before running.
    -M  match score
    -S  mismatch score
    -O  open gap penalty
    -E  extend gap penalty.

The problem with using the dpirdmk/pomoxis:0.1.11 container is that it specifies an alternate entrypoint which makes it difficult to use out of the box without either modifying the command to be run or by supplying some additional Docker configuration:
$ docker run --rm dpirdmk/pomoxis:0.1.11 bash -c 'cat /init.sh'
#!/bin/bash
. /apps/pomoxis/venv/bin/activate
exec "$@"

Reply to follow up questions:
You receive the Missing output file(s) `output` expected by process error when the command completes successfully (i.e. exit status zero) but Nextflow (not pomoxis) couldn't find one or more output file(s) in the working directory as specified in the output declaration. I think what you want is the following. I've taken the liberty of renaming some of the variables to make things a little more clear. The code below is of course untested:
params.outdir = './results'

params.ref_fasta = "SLCMV.fasta"
params.reads = "*.fastq"

reads = Channel.fromPath( params.reads )
ref_fasta = file( params.ref_fasta )

process mini_align {

    tag { fastq.name }

    publishDir "${params.outdir}/mini_align", mode:'copy'

    input:
    path fastq from reads
    path ref_fasta

    output:
    path "${fastq.simpleName}.bam{,.bai}" into mapped_ch

    script:
    """
    mini_align \\
        -r "${ref_fasta}" \\
        -i "${fastq}" \\
        -p "${fastq.simpleName}"
    """
}

params.outdir = './results'

params.reads = "*.fastq"

reads = Channel.fromPath( params.reads )

process mini_assemble {

    tag { fastq.name }

    publishDir "${params.outdir}/mini_assemble", mode:'copy'

    input:
    path fastq from reads

    output:
    path "assm/${fastq.simpleName}_final.fa" into mapped_ch

    script:
    """
    mini_assemble \\
        -i "${fastq}" \\
        -p "${fastq.simpleName}"
    """
}


text:
Q: Opencart : How To Load Different CSS Style, Based On Language I use opencart
I want to load stylesheet-rtl.css when language is ar
and stylesheet.css when language is en
i tried this and some others i found in internet but it doesn't work ?
<?php if($direction == "rtl"){?>
    <link href="catalog/view/theme/tt_palora1/stylesheet/style.css" rel="stylesheet">
<?php } else { ?>
    <link href="catalog/view/theme/tt_palora1/stylesheet/stylesheet.css" rel="stylesheet">
<?php }?>

any help please ?

A: There is a direction variable in header.php:
$data['direction'] = $this->language->get('direction');

You can use it in your view file, edit this file:
catalog\view\theme\your-theme\template\common\header.twig

Find:
<link href="catalog/view/theme/your-theme/stylesheet/stylesheet.css" rel="stylesheet">

Replace it with:
{% if direction == 'rtl' %}
    <link href="catalog/view/theme/your-theme/stylesheet/stylesheet-rtl.css" rel="stylesheet">
{% else %}
    <link href="catalog/view/theme/your-theme/stylesheet/stylesheet.css" rel="stylesheet">
{% endif %}

Then clear your theme and ocmod caches.

A: `
<link href="catalog/view/theme/your-theme/stylesheet/stylesheet.css" rel="stylesheet">
{% if direction == 'rtl' %}
    <link href="catalog/view/theme/your-theme/stylesheet/stylesheet-rtl.css" rel="stylesheet">
{% endif %}

`
in stylesheet-rtl.css just add what will change in RTL version so you get smaller file size


text:
Q: How to fix Unchecked cast warning in generic type casting I'm implementing a list link in the stack. The program successfully passes all the required tests, but I encounter this warning. There is no disruption in the implementation of the program, but I am looking to eliminate this problem.
Can you tell me how to fix it by editing the code in the Equals method?

Unchecked cast: 'java.lang.Object' to 'LinkedStack'

public final class LinkedStack<E> implements Stack<E> {

    private Node head = null;
    private int size = 0;

    @Override
    public int size() {
        return size;
    }

    @Override
    public boolean isEmpty() {
        return size == 0;
    }

    @Override
    public void clear() {
        head = null;
        size = 0;
    }

    @Override
    public boolean contains(E e) {
        for (int i = 0; i < size; i++) {
            E temp = pop();
            if (temp.equals(e)) {
                return true;
            }
        }
        return false;
    }

    @Override
    public E top() throws StackEmptyException {
        if (size == 0) {
            throw new StackEmptyException();
        }
        return head.element;
    }

    @Override
    public void push(E e) {
        head = new Node(e, head);
        size++;
    }

    @Override
    public E pop() throws StackEmptyException {

        if (size == 0) {
            throw new StackEmptyException();
        }
        E temp = head.element;
        head = head.next;
        size--;
        return temp;
    }

    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;
        LinkedStack<E> that = (LinkedStack<E>) o;
        if (that.size() != this.size()) return false;
        Node j = that.head;
        int counter = 0;
        for (Node i = head; counter < size; i = i.next, j = j.next) {
            if (i.element == null && j.element == null) {
                counter++;
                continue;
            }
            if ((i.element != null) && (j.element != null)) {
                if (!i.element.equals(j.element)) {
                    return false;
                }
            } else {
                return false;
            }
            counter++;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int resultat = 1;
        int counter = 0;
        for (Node i = head; counter < size; i = i.next) {
            if (i.element == null) {
                counter++;
                continue;
            }
            resultat = resultat * i.element.hashCode();
            counter++;
        }
        return resultat;
    }

    protected class Node {
        private final E element;
        private final Node next;

        protected Node(final E element, final Node next) {
            this.element = element;
            this.next = next;
        }
    }
}

A: I just realized you could in principle avoid explicitly casting to LinkedStack<E> and instead cast to LinkedStack<?>, since you check elements' equality separately down the line anyway.
As for the difference this makes - casting to LinkedStack<E> you assume that you're comparing this to a LinkedStack holding elements of the same type. The compiler can't check this assumption and warns about the unchecked cast. That could bring about a ClassCastException down the line if you handled the stack's elements as if they were of type E and they actually turned out to be some other type.
The wildcard generic <?> means you have no assumptions about the generic type of the particular LinkedStack you're working with, thus eliminating the warning.
That's what other answers to the "suppress unchecked cast warnings" mean when they say you'd best avoid unchecked casts unless absolutely necessary.
(I'm purposefully avoiding commenting on the rest of the provided code)


text:
Q: DataTables.net columns.width doesn't work I am using https://datatables.net plugin to show a table.
I want to change first column width as wide as possible.
But column width doesn't change when I configure it as below manual:
https://datatables.net/reference/option/columns.width
$(document).ready(function() {
    $('#example').DataTable( {
            "columnDefs": [
                { "width": "50%", "targets": 0 }
            ]
    } );
} );

I have created JsFiddle: https://jsfiddle.net/AntonyBaasan/btjg433y/2/
What am I missing here?

A: You just need to add  this line to increase width of the columns according to your self.
   Name

A: set the width of table


text:
Q: Using analysis in solving exponential inequalities Solve the inequality
$$
35^x+20^x+15^x\le28^x+21^x+25^x,
$$ for $x\in\mathbb{R}$.
I tried to find the solution by hand and to prove that they are the only ones. I saw that $x=0$ verifies the inequality. But now, I don't know what is the next step.

A: It's $$(7^x-5^x)(4^x+3^x-5^x)\geq0.$$
Can you end it now?
I got $0\leq x\leq2.$