sharepoint online – SPFX Source URL Redirect NOT Working

I am currently working on a custom WebPart in SPFX and am having some issues with a URL redirect.

The code is looking to see if a field is empty, if the field == empty then it will automatically redirect to the current page. If the field is NOT empty, the code will redirect to the URL provided in the field.

Here is the code:

var tableResults="";
      var response = request.currentTarget.response || request.target.responseText;
      var data = JSON.parse(response);
      var currentPageUrl = this.context.pageContext.site.serverRequestPath;
      var redirectURL = this.properties.redirect;
      if (data.error) {
          console.log(data.error.message.value);
      }
      else {
          tableResults="<table border='1' cellpadding='10' ><tr><th>Enroll</th><th>Event</th><th>Spots Left</th></tr>";
          for (var i=0; i<data.d.results.length; i++)
          {
              //alert(i + ": " + data.d.results(i).Time);
              if(parseInt(data.d.results(i).AttendeesId) < parseInt(data.d.results(i).Quota) && redirectURL == "")
              {
                tableResults=tableResults + "<tr><td><a href='https://ewscripps.sharepoint.com/sites/rsvp/Lists/Register/NewForm.aspx?SessionID="+ data.d.results(i).Id + "&Source=" + currentPageUrl + "'>Click To Enroll</a></td>";
              }
              else if (parseInt(data.d.results(i).AttendeesId) < parseInt(data.d.results(i).Quota) && redirectURL != "")
              {
                console.log(redirectURL);
                tableResults=tableResults + "<tr><td><a href='https://ewscripps.sharepoint.com/sites/rsvp/Lists/Register/NewForm.aspx?SessionID="+ data.d.results(i).Id + "&Source=" + redirectURL + "'>Click To Enroll</a></td>";
              }
              else
              {
                tableResults=tableResults + "<tr><td><font color='red'>Event Full</font></td>";
              }
              var spotsLeft = data.d.results(i).Quota - data.d.results(i).AttendeesId;
              tableResults=tableResults + "<td>" + data.d.results(i).Title + "</td><td>" + spotsLeft + "</td></tr>";
          }
          tableResults=tableResults + "</table>";

            //then you just need to generate the legend
            sessionsdiv.innerHTML= tableResults;
      }

The console.log(redirectURL) is showing the URL entered in the field, but for some reason, SharePoint is redirecting to the “All Items” list as it does by default.

Any help would be much appreciated!

Thanks!

2 Site chạy cùng 1 source web – host có ổn không




Hiện tại e có 2 site và cho nó chạy chung 1 host, data để tránh tăng chi phí…không biết như thế thì ảnh hưởng tới seo nhiều không, có nên tách ra làm 2 site, 2 host riêng biệt không.
Hic mong các đại ca, sư huynh trong đây chỉ giáo thêm

.

audit – Is there any such thing as an independent code vetting project which works for free to vet open source projects?

I’m sure I’m not the only one who is scared to death to blindly trust random strangers with all my data. Which is the case in practice if, for example, I’m to use this library right now, which I’m about to: https://github.com/jfcherng/php-diff

It is impossible for me to know if this (or any other library) does only what it claims, and what kind of security the author has. Tomorrow, he could get compromised and his account uploads an update which adds malware behaviour to his originally clean library, and then Composer will pull it down.

I wouldn’t mind using a slightly outdated version if that version was “verified” somehow by a third party. However, I’ve never encountered such a thing.

Is there really no group of security-aware people who go around and “vet” libraries such as the one I’ve linked to above, marking specific releases as “OK” so that I can use them without (as much) fear? Yes, I have to trust that group, but it’s at least another entity that claims to have done some kind of real vetting.

I almost feel like I’m missing something important. As in, nobody in their right mind would be using these GitHub projects like this, or something. Yet I have to. It is impossible for me to go through others’ code (unless very trivial), but others claim/seem to be able to, so it seems reasonable that they don’t just do it locally for themselves, but report their trusted “seal of approval” somehow to the world.

There must be companies out there who use open source projects and do have some paid guy going through the code before they just put it into production on their enterprise mainframes, right? Wouldn’t it be a great way for them to give something back without having to donate money or actual code, by simply sending a signal saying: “We, Entity X, believe that version Y of library Z is clean, and will be using this in production.”?

If this were standardized in some way, GitHub (or others) could display a little list of gold stars/badges next to each version, showing which trusted companies/groups have vetted the code.

Is there something I’m missing? Why isn’t this (apparently) a thing?

Download source code of thousands of webpages ?

Hello,

I have a list of thousands of web pages and I would like to know if I can download the source code files (1 file /web page) with scrapebox ?

Thank you very much Smile

licensing – Can I use a EPL library in closed source commercial application?

I am planning to use the Jakarta ee library which is licensed under EPL v2.0 in my project.
For example using java.xml.bind annotations.

I wonder if that impacts the license of my closed source commercial application? (I assume not since this is not really a derivative work?)

libreoffice – Cross-referencing from a master document: “Error: Reference source not found”

Background (skip if uninterested in why the solution works)

Normally when you create a cross-reference within a single document, the content of the list item being referenced will be placed inside <text:bookmark-start/> and <text:bookmark-end/> tags, with a text:name attribute containing a unique identifying number. The cross-reference then uses this attribute so that Writer can search the file to locate the original bookmark and update the contents of the cross-reference. So for example:

1. List item
Cross-reference to 1

is implemented as follows inside the file’s content.xml:

<text:list-item>
  <text:p text:style-name="P2">
    <text:bookmark-start text:name="__RefNumPara__6070_2182758442"/>
      List item
    <text:bookmark-end text:name="__RefNumPara__6070_2182758442"/>
  </text:p>
</text:list-item>
<text:p text:style-name="P1">
  Cross-reference to <text:bookmark-ref text:reference-format="number-all-superior" text:ref-name="__RefNumPara__6070_2182758442">1</text:bookmark-ref>
</text:p>

When Writer comes across the cross-reference during an update, it will search the file for a bookmark tagged with __RefNumPara__6070_2182758442 and use that to update the cross-reference.

Going back to the example from the question, the situation inside the subdocument’s content.xml before any cross-referencing is something like this::

<text:list-item>
    <text:p text:style-name="P1">
        Clause
    </text:p>
</text:list-item>
<text:list-item>
    <text:p text:style-name="P1">
        Clause
    </text:p>
</text:list-item>

After making the cross-reference, the master’s content.xml contains something like this:

<text:p text:style-name="P1">
    See clause <text:bookmark-ref text:reference-format="number-all-superior" text:ref-name="__RefNumPara__5977_2182758442">2</text:bookmark-ref>
</text:p>

The problem is that the bookmark tagged with __RefNumPara__5977_2182758442 does not exist in the subdocument. This is because edits made in a master document do not get saved to the subdocument, so the bookmark which is created at the time of the cross-reference is lost upon an update.

Solution (manual)

The workaround is to first create a cross-reference from within the subdocument. So, in the subdocument example from the question, edit the file to include a cross-reference to item number 2, e.g.:

1. Clause
2. Clause2

where the number “2” after the second word “Clause” is the cross-reference to the item number. This causes LibreOffice to assign it a bookmark with a unique identifier as in the first example in this answer. You can now delete the cross-reference and save the file. The thing that enables this workaround to work is that LibreOffice does not delete the bookmark tags, even if you delete the cross-reference. You can now go ahead and create a cross-reference in the master document. The reference will not be lost after an update because the bookmark exists in the subdocument.

Solution (automated)

This workaround is a bit annoying, especially if (as in my case) you are trying to draft a complex document with tens or hundreds of cross-references to numbered items in a subdocument. A potential automated solution would be to prepare all numbered items in the subdocument for cross-referencing by running a script which edits content.xml and inserts bookmarks inside every <text-list-item> tag, being careful to create unique identifiers in a way which is compatible with the open document standard. If at some point I create such a script I will edit this answer to share it.

2 Site chạy cùng 1 source web – host có ổn không



Show at e has 2 site and to it running the general 1 host, data to from the tăng chi phí … không biết như thế nào, ảnh hưởng đến nhiều seo không, nên tách ra làm 2 site, 2 host riêng không.
Hic mong các đại ca, sư huynh trong đây chỉ giáo thêm

.

Open source, google play services, and apk for dummies

Hi I’m 45 years old and have been trying to teach myself about open source, google play services and apk for the past three years and I’m getting no where. Anytime I ask family are friends they have no idea of what I’m talking about are they don’t know any more than I do. This is very important to me that I learn how to use these. I’m begging someone out there reading this post please help me!! On open source I know that you see everything about the page even the hidden stuff right? Ok need help understanding how google play services for instant apps work? And lastly apk android package! Please lmk if I’m correct and maybe further explain. With apk downloaded you can literally do anything you want say you download Facebook apk. Would I be able to have a Facebook that some people could see if they had my password and went on my page would things be hidden from them. How does all of this work. Please for my sanity and the sake of my children someone please help

Magento 2: Product showing out of stock if default source has 0 qty in Multi Source Inventory

I need to use MSI (Multi source inventory) feature but i notice that if qty is 0 in default source then
product is going to out of stock even qty is already available in other source so how can i solve this?
i need to showing the product IN stock if any source store have the qty.

any idea, please share.

open source – Software licensing in academic work

Background

I am a Ph.D. student working in the combined fields of software, electronics, and control engineering. During my research, I have been developing some code that I am considering publishing later as a precompiled library. I made some tests on STM32H7 MCUs using the STM32CubeMX generator. In some parts of the code, to speed-up the computations on a specific core, I use dependencies to CMSIS and HAL. Since I don’t want to go fully into open-source yet (but don’t sell the library either) I don’t plan to redistribute CMSIS and HAL in any way. I would like to inform a potential user in a manual or paper that there is a dependency on some specific methods from CMSIS and HAL and that he needs to obtain and link those libraries on his own. So I came up with the following questions:

Questions

  1. Is commercial usage different than academic usage? Are there any specific licenses from STMicroelectronics and Arm about using their libraries, including Cube, CMSIS, HAL, etc. for academic research? Am I allowed to use those tools to focus on experiments if I need to check any specific algorithms or shall I reinvent the wheel every time to blink a LED?
  2. Is calling a specific method (API reference) in my code, namely usage, treated as redistribution? Let’s say if in my library myLib I call the method void B:A(void);from the library B which has the viral-type license, does it mean I also need to release myLib under the same license, or only if I attach the source code of B in myLib
  3. Similarily to (2.) if I put and publish some example code snippets e.g. about the usage in an article, presentation or training materials? There is no problem for me reducing the snippets but perhaps it might be less undestandable for a reader what is going on. Is this a place where a citation in a comment could be considered, e.g. “This method is a part of library A which is available at (1)”

Thank you for all the answers.