Mounted partition apparently stays read only

im very new to linux so please have that in mind!

so i mounted a freshly formatted ext4 partition to /mnt/hdd, i used sudo chown -R user /mnt/hdd to get permissions.

Now when i am trying to create a steam download directory in that partition it says “Failed to create folder, this drive is read-only”

i tried manually mounting and mounting with GNOME “disks” and everything i was able to find online but nothing helped… i really want to get into linux but so thanks in advance 🙂

WebApp for ETL with visual mapping – read csv and map it to data model

a few years ago I wrote a python script for reading CSV, handling the headers, filtering data, renaming stuff via RegEx…bascially to do various ETL stuff. This was done using a exhaustive configuration file that defined all the sources and all the targets. It worked quite fine – but the configuration was everything but intuitively.

I was now wondering what would be the best approach to get the same down using some kind of “visual configuration”. First step would be to visualize the mapping between source and target columns and use a drag and drop approach with a visual representing of the mappings between two listboxes with mapping arrows.

I was thinking about using tkinter for that, but as far as I understand tkinter is not supported by web browsers and that would be another goal: Having an easy to deploy webapp.

So I thought about just HTML5 – but I have no idea if that would be the best approach and if it is possible to recycle the already existing python material and how to connect both parts (python logic + displaying in HTML5).

What would be your suggestion how to deal with that kind of situation – do you know of any projects where something similar was done?

Thanks a lot!

Users with Read permission can not view the “Pending” alerts inside enterprise wiki pages

I am working on an Enterprise wiki site collection inside sharepoint on-premises 2013. and i have set the following approval settings:-

enter image description here

now i edited the home page and i added random text qqqqqq.. where the status for the page became “Pending”. now when i access the page using contributor user or approve user, they can view the pending change + pending yellow message, as follow:- enter image description here

while if i login using a Read user, the user can view the pending change (which sound valid based on the list settings), but the user did not get the yellow pending message, to explain to the user that the page he/she is reading is pending, as follow:- enter image description here

so can anyone advice if i can allow the Reader users to view the pending yellow message similar to contributors and above?

How can I read config schema from a config entity?

I need to read the schema definition from a config entity, which is located in config/schema. For example the schema from a node type defined in node.schema.yml:

node.type.*:   type: config_entity   label: 'Content type'   mapping:     name:       type: label       label: 'Name'     type:       type: string       label: 'Machine-readable name'     description:       type: text       label: 'Description'     help:       type: text       label: 'Explanation or submission guidelines'     new_revision:       type: boolean       label: 'Whether a new revision should be created by default'     preview_mode:       type: integer       label: 'Preview before submitting'     display_submitted:       type: boolean       label: 'Display setting for author and date Submitted by post information' 

How can I do this?

How does a Turing machine with one tape read it’s input?

It’s often implicitly assumed that we don’t have to pay much attention to the difference between the program (which specifies the function being computed) and the input (the value on which that function is evaluated) when reasoning about Turing machines. In particular, people are often happy to assume that the program and inputs are encoded on the same tape two-sided tape. How this actually works out okay isn’t obvious to me though.

Let’s say I have a UTM, $ \Phi_f$ , which has a partially filled two-sided tape specifying a program for calculating the function $ f$ . Since the program is a finite set of symbols, it begins on cell $ b$ and ends on cell $ e$ where $ b < e$ . Now I want to encode the input on the same tape, so I begin at cell $ b-1$ and work in the negative direction to encode my specific input, taking up as much space as I need.

My understanding is that as long as the encoding methodology I use to specify the inputs is computable and fixed in advanced, I can use any input encoding I want. The fact that it needs to be fixed in advanced is clear, since the actual program for calculating $ f$ for two different encodings is very likely different. Intuitively, it makes sense that I can use any encoding I want because if we fix some standard “base” encoding then computing $ f$ on an input encoded by the function $ g$ is the same as computing $ f(g^{-1})$ on an input encoded by the base encoding.

I have two questions:

  1. Is the above correct? In particular, is it always possible to pick an encoding and a function, and then find a single program that computes $ f$ on an arbitrary input using that encoding?
  2. On the tape, what does this look like? The symbols used to encode the input have a meaning to the TM as a program, and that seems like it could cause problems. For example, the (2, 18) UTM has symbols that always result in the head moving left and others resulting in the head always moving right. It seems like if you chose those symbols to encode the input you could run into problems where the UTM could never escape the input section of the tape.

i read tiff image file RGB48(16 per channel) and change the 16bit to 12bit problem

I used libtiff read TIFF image file(16bit per channel).

and i try to change the 16bit to 12bit.

The formula was modified to see open jpeg.

for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) {         unsigned char *dat8;         int step;         tsize_t i, ssize;         ssize = TIFFReadEncodedStrip(tif, strip, buf, strip_size);         dat8 = (unsigned char*)buf;          if (tiBps == 16) {             step = 6 + has_alpha + has_alpha;              for (i = 0; i < ssize; i += step) {                 if (index < imgsize) {                     image->comps[0].data[index] = (dat8[i + 1] << 8) | dat8[i + 0]; /* R */                     image->comps[1].data[index] = (dat8[i + 3] << 8) | dat8[i + 2]; /* G */                     image->comps[2].data[index] = (dat8[i + 5] << 8) | dat8[i + 4]; /* B */                     if (has_alpha) {                         image->comps[3].data[index] = (dat8[i + 7] << 8) | dat8[i + 6];                     }                      if (parameters->cp_cinema) {                         /* Rounding 16 to 12 bits                         */                         image->comps[0].data[index] =                             (image->comps[0].data[index] + 0x08) >> 4 ;                         image->comps[1].data[index] =                             (image->comps[1].data[index] + 0x08) >> 4 ;                         image->comps[2].data[index] =                             (image->comps[2].data[index] + 0x08) >> 4 ;                         if (has_alpha)                             image->comps[3].data[index] =                                 (image->comps[3].data[index] + 0x08) >> 4 ;                     }                     index++;                 } else {                     break;                 } 

this code is 16bit to 12bit.

but this code result is 12,10,1, … this is not 0~4095.

Is not the range of 0 ~ 4095 in 12bit?

so i wondering.

and If read with unsigned char, it is 0 ~ 255, and if shift >> 8, it becomes 0. Is this correct?

so i change the unsigned char -> unsigned short but it is not work.

i read the TIFF image. i convert to jpeg2000.

so problem is jpeg2000?

help plz

How to read muliple csv files and merge them?

This is my csv files witch existent on a specific directory:

output0 output1 output3 output4  out0 out1 out2 out3 

I should merge output0 with out0 , output1 with out1 ect ..

I merged just output0 with out0 but i did not find a way to do this with all the files

PS: this is an exemple I have 100 csv files in my directory

This is my code:

import pandas as pd import time a = pd.read_csv("C:/Users/AQ42770/Documents/merge/outdoctor0.csv") b = pd.read_csv("C:/Users/AQ42770/Documents/merge/output0.csv") merged = a.merge(b, on='Class') merged.to_csv("output.csv", index=False)  time.sleep(60) df = pd.read_csv("output.csv") k=df.loc[~df.Class.duplicated(keep='last')] k.to_csv("test1.csv", index=False, na_rep='NaN') 

Unable to read doc extension file from SharePoint 2019

I am using the code below to read files from SharePoint 2019 server. It works perfectly for docx file extension but with doc files it throw an error. Can you guy s help me out here please?

 using (ClientContext clientContext = new ClientContext("http://sharepoint2019/sites/test/"))         {             Microsoft.SharePoint.Client.ClientResult<System.IO.Stream> stream = null;              KeywordQuery keywordQuery = new KeywordQuery(clientContext);              keywordQuery.QueryText = "SharePoint";              keywordQuery.EnablePhonetic = true;              keywordQuery.EnableOrderingHitHighlightedProperty = true;             //keywordQuery.SummaryLength = 500;               SearchExecutor searchExecutor = new SearchExecutor(clientContext);              ClientResult<ResultTableCollection> results = searchExecutor.ExecuteQuery(keywordQuery);              clientContext.ExecuteQuery();               //sometime if the same query has been made several time,an automatic favorite query is generated so we need to check else the correct rows wont be returned             if (results.Value.Count > 1)             {                 NumberOfRow = 1;             }             else             {                 NumberOfRow = 0;             }              foreach (var resultRow in results.Value[NumberOfRow].ResultRows)             {                 Console.WriteLine("{0}: {1} ({2}) {3}", resultRow["Title"], resultRow["Path"], resultRow["Write"], resultRow["HitHighlightedSummary"]);                  File file = clientContext.Web.GetFileByUrl(resultRow["Path"].ToString());                 stream = file.OpenBinaryStream();                 clientContext.Load(file);                 clientContext.ExecuteQuery();                   if (resultRow["FileExtension"].ToString() == "pdf")                 {                      Filebody = GetTextFromPDF(resultRow["Path"].ToString());                 }                  else if (resultRow["FileExtension"].ToString() == "docx" || resultRow["FileExtension"].ToString() == "doc")                 {                           WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(stream.Value, false);                          body = wordprocessingDocument.MainDocumentPart.Document.Body;                           Filebody = body.InnerText; 

How to read time in url and how to write on url?

I create QR code accordng to url for example, I created like this

www.sitename.com/index.php?user_idx=1 

And read this url another function. (Because when I came with this url, user1’s value change)

But I want to write id and time:

For example

www.sitename.com/index.php?user_idx=1?hh:mm:ss 

And I want to refresh every 30 seconds. When I read every 30 second this url has to be match.

How can I do this ?