问:
'dispatch' is not defined when using useReducer with useContext in react
I'm trying to figure out how to change global state from a componenet using useContext and useReducer dispatch method.

The component is simply should change the backgournd of the page on a click

Here is how I defined the context ThemeContext.js

```<code>import { createContext, useReducer } from "react";
import ThemeReducer from './ThemeReducer'

const INITIAL_STATE = {
    isLightTheme: true,
    light: {syntax: '#555', ui: '#ddd', bg: '#eee'},
    dark: {syntax: '#ddd', ui: '#333', bg: '#555'},
}

export const ThemeContext = createContext(INITIAL_STATE);

const ThemeContextProvider = ({ children }) => {
   const [state, dispatch] = useReducer(ThemeReducer, INITIAL_STATE);
    return (
        <ThemeContext.Provider value={{
            isLightTheme: state.isLightTheme,
            light: state.light,
            dark:  state.dark,
            dispatch,
        }}>
            {children}
        </ThemeContext.Provider>
     );
}
export default ThemeContextProvider;
</code>```

The ThemeReducer.js is:

```<code>const ThemeReducer = (state, action) => {
    switch (action.type) {
      case "SET_DARK":
        return {
            isLightTheme: false,
        };
      case "SET_LIGHT":
            return {
                isLightTheme: true,
            };
      default:
        return state;
    }
  };
  export default ThemeReducer;
</code>```

app.js:

```<code>function App() {
  return (
    <div className="App">
       <ThemeContextProvider>
          <Navbar />
          <BookList />
          <ThemeToggle />
       </ThemeContextProvider>
    </div>
  );
}

export default App;
</code>```

And the ThemeToggle.js compoenent

const ThemeToggle = () => {

```<code>    return (
        <button onClick={()=>dispatch({type: "SET_DARK"})}>Change theme</button>
     );
}

export default ThemeToggle;
</code>```

However I get this error:

```<code>src/components/ThemeToggle.jsx
  Line 6:30:  'dispatch' is not defined
</code>```

I don't understand why. Because dispatch is supposed to be in the context. I'm wondering what is wrong here and how can I fix it?

P.S  BooKList compoenent.

```<code>import  { useContext } from 'react'
import { ThemeContext } from '../context/ThemeContext';

const BookList = () => {
    const {isLightTheme, light, dark} = useContext(ThemeContext)
    const theme = isLightTheme ? light : dark;
    return (
        <div  style={{background : theme.ui , color: theme.syntax}}>
            <ul>
                <li stryle={{background: theme.ui}} >The way of kings</li>
                <li stryle={{background: theme.ui}} >The namoe fot the wind</li>
                <li stryle={{background: theme.ui}} >The Final empire</li>
            </ul>
        </div>
     );
}
</code>```

答:
It appears you are missing accessing the ThemeContext in ThemeToggle. Use the useContext hook to access the ThemeContext Context value and destructure the dispatch function.

```<code>const ThemeToggle = () => {
  const { dispatch } = useContext(ThemeContext);
  return (
    <button onClick={() => dispatch({type: "SET_DARK"})}>
      Change theme
    </button>
  );
}

export default ThemeToggle;
</code>```

And for completeness' sake, add dispatch to the default context value.

```<code>const INITIAL_STATE = {
  isLightTheme: true,
  light: {syntax: '#555', ui: '#ddd', bg: '#eee'},
  dark: {syntax: '#ddd', ui: '#333', bg: '#555'},
  dispatch: () => {},
}

export const ThemeContext = createContext(INITIAL_STATE);
</code>```

The ThemeReducer reducer function is stripping out state in the set light/dark cases. You need to preserve the existing state.

```<code>const ThemeReducer = (state, action) => {
  switch (action.type) {
    case "SET_DARK":
      return {
        ...state,
        isLightTheme: false,
      };

    case "SET_LIGHT":
      return {
        ...state,
        isLightTheme: true,
      };

    default:
      return state;
  }
};
</code>```

Body:
I'm trying to figure out how to change global state from a componenet using useContext and useReducer dispatch method.

The component is simply should change the backgournd of the page on a click

Here is how I defined the context ThemeContext.js

import { createContext, useReducer } from "react";
import ThemeReducer from './ThemeReducer'

const INITIAL_STATE = {
    isLightTheme: true,
    light: {syntax: '#555', ui: '#ddd', bg: '#eee'},
    dark: {syntax: '#ddd', ui: '#333', bg: '#555'},
}

export const ThemeContext = createContext(INITIAL_STATE);

const ThemeContextProvider = ({ children }) => {
   const [state, dispatch] = useReducer(ThemeReducer, INITIAL_STATE);
    return (
        <ThemeContext.Provider value={{
            isLightTheme: state.isLightTheme,
            light: state.light,
            dark:  state.dark,
            dispatch,
        }}>
            {children}
        </ThemeContext.Provider>
     );
}
export default ThemeContextProvider;

The ThemeReducer.js is:

const ThemeReducer = (state, action) => {
    switch (action.type) {
      case "SET_DARK":
        return {
            isLightTheme: false,
        };
      case "SET_LIGHT":
            return {
                isLightTheme: true,
            };
      default:
        return state;
    }
  };
  export default ThemeReducer;

app.js:

function App() {
  return (

       <ThemeContextProvider>
          <Navbar />
          <BookList />
          <ThemeToggle />
       </ThemeContextProvider>

  );
}

export default App;

And the ThemeToggle.js compoenent

const ThemeToggle = () => {

    return (
        <button onClick={()=>dispatch({type: "SET_DARK"})}>Change theme</button>
     );
}

export default ThemeToggle;

However I get this error:

src/components/ThemeToggle.jsx
  Line 6:30:  'dispatch' is not defined

I don't understand why. Because dispatch is supposed to be in the context. I'm wondering what is wrong here and how can I fix it?

P.S  BooKList compoenent.

import  { useContext } from 'react'
import { ThemeContext } from '../context/ThemeContext';

const BookList = () => {
    const {isLightTheme, light, dark} = useContext(ThemeContext)
    const theme = isLightTheme ? light : dark;
    return (

The way of kings

The namoe fot the wind

The Final empire

     );
}

Body:
It appears you are missing accessing the ThemeContext in ThemeToggle. Use the useContext hook to access the ThemeContext Context value and destructure the dispatch function.

const ThemeToggle = () => {
  const { dispatch } = useContext(ThemeContext);
  return (
    <button onClick={() => dispatch({type: "SET_DARK"})}>
      Change theme
    </button>
  );
}

export default ThemeToggle;

And for completeness' sake, add dispatch to the default context value.

const INITIAL_STATE = {
  isLightTheme: true,
  light: {syntax: '#555', ui: '#ddd', bg: '#eee'},
  dark: {syntax: '#ddd', ui: '#333', bg: '#555'},
  dispatch: () => {},
}

export const ThemeContext = createContext(INITIAL_STATE);

The ThemeReducer reducer function is stripping out state in the set light/dark cases. You need to preserve the existing state.

const ThemeReducer = (state, action) => {
  switch (action.type) {
    case "SET_DARK":
      return {
        ...state,
        isLightTheme: false,
      };

    case "SET_LIGHT":
      return {
        ...state,
        isLightTheme: true,
      };

    default:
      return state;
  }
};


来源: stackexchange

问:
Assosiation help in ruby on rails
I have fully linked everything together so a contact belongs_to :company and a company has_many :contacts everything works. The only question i have is in the contacts#new form you have to enter a companies ID is it possible to input the name of the company somehow and for it too translate to an ID in the back end? at the moment my form looks like this. You may notice company_id at the bottom of the form this is the field which i want to change. So that it is more user friendly instead of inserting an ID you insert a name or some kind of list of companies that you select. Please help?

```<code><%= form_for(@contact) do |f| %>
  <% if @contact.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:</h2>

      <ul>
      <% @contact.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :position %><br />
    <%= f.text_field :position %>
  </div>
  <div class="field">
    <%= f.label :email %><br />
    <%= f.text_field :email %>
  </div>
  <div class="field">
    <%= f.label :telephone %><br />
    <%= f.text_field :telephone %>
  </div>
  <div class="field">
    <%= f.label :source %><br />
    <%= f.text_field :source %>
  </div>
  <div class="field">
    <%= f.label :company_id %><br />
    <%= f.text_field :company_id %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
</code>```

答:
Sure can:</p>

```<code><%= select_tag "company", options_from_collection_for_select(Company.all, "id", "name") %>
</code>```

ContentLicense: CC BY-SA 3.0

Title: Assosiation help in ruby on rails

Body:
I have fully linked everything together so a contact belongs_to :company and a company has_many :contacts everything works. The only question i have is in the contacts#new form you have to enter a companies ID is it possible to input the name of the company somehow and for it too translate to an ID in the back end? at the moment my form looks like this. You may notice company_id at the bottom of the form this is the field which i want to change. So that it is more user friendly instead of inserting an ID you insert a name or some kind of list of companies that you select. Please help?

<%= form_for(@contact) do |f| %>
  <% if @contact.errors.any? %>

<%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:

      <% @contact.errors.full_messages.each do |msg| %>

<%= msg %>

      <% end %>

  <% end %>

    <%= f.label :name %>

    <%= f.text_field :name %>

    <%= f.label :position %>

    <%= f.text_field :position %>

    <%= f.label :email %>

    <%= f.text_field :email %>

    <%= f.label :telephone %>

    <%= f.text_field :telephone %>

    <%= f.label :source %>

    <%= f.text_field :source %>

    <%= f.label :company_id %>

    <%= f.text_field :company_id %>

    <%= f.submit %>

<% end %>

Body:
Sure can:

<%= select_tag "company", options_from_collection_for_select(Company.all, "id", "name") %>


问:
Passing data to input form inside cell datatable when checkbox selected
I have a checkbox on a table, where when that checkbox is selected it will pass data in the "sisa" variable. When in the console log , I have managed to display the "sisa" data. But how to submit the "sisa" data in the input form in the next column ("diterima" column). This checkbox is a multiple selection, so you can select many at once.

the screenshoot:
https://i.postimg.cc/qq7CpVrf/error.png

My datatable

```<code>$('#produkTabel').DataTable({
    "aaData": response.result,
    "columns": [

        {
            "data": "id", "class": "text-center",
            render: function (data, type, row, meta) {
                return meta.row + meta.settings._iDisplayStart + 1;
            }
        },
        {"data": "produk.item_code"},
        {"data": "produk.name"},
        {"data": "jumlah", "class": "text-center"},
        {"data": "sisa", "class": "text-center"},
        {"data": "id", "class": "text-center", render: function ( data,row) {
                return '<input type="number"  id="inputID" class="open-input form-control bg-white" value="0">';
            },},
        {
            "data": "id",
            "class": "text-center",
            'searchable': false,
            'orderable': false,
            render: function ( data, type ,row ) {
                if ( type === 'display' ) {
                    return '<input type="checkbox" data-sisa="'+row.sisa+'" class="editor-active">';
                }
                return data;
            },
            className: "dt-body-center"
        },
    ],
    "bDestroy": true,
});
</code>```

My Jquery

```<code>$('body').on('change', 'input[type="checkbox"]', function() {
    // var tblData = table.rows('.selected').data();
    let sisa = $(this).data('sisa');
    // console.log(tblData);
    // var inputForm = $(this).'input[type="number"]';
    // $('.open-input').val(sisa);
    // this.checked ? inputForm.val(sisa) : inputForm.val(0);
    console.log(sisa);
});
</code>```

答:
$("#inputID").val(sisa);

Try this in your script....sorry if am wrong

ContentLicense: CC BY-SA 4.0

Body:
I have a checkbox on a table, where when that checkbox is selected it will pass data in the "sisa" variable. When in the console log , I have managed to display the "sisa" data. But how to submit the "sisa" data in the input form in the next column ("diterima" column). This checkbox is a multiple selection, so you can select many at once.

the screenshoot:
https://i.postimg.cc/qq7CpVrf/error.png

My datatable

$('#produkTabel').DataTable({
    "aaData": response.result,
    "columns": [

        {
            "data": "id", "class": "text-center",
            render: function (data, type, row, meta) {
                return meta.row + meta.settings._iDisplayStart + 1;
            }
        },
        {"data": "produk.item_code"},
        {"data": "produk.name"},
        {"data": "jumlah", "class": "text-center"},
        {"data": "sisa", "class": "text-center"},
        {"data": "id", "class": "text-center", render: function ( data,row) {
                return '<input type="number"  id="inputID" class="open-input form-control bg-white" value="0">';
            },},
        {
            "data": "id",
            "class": "text-center",
            'searchable': false,
            'orderable': false,
            render: function ( data, type ,row ) {
                if ( type === 'display' ) {
                    return '<input type="checkbox" data-sisa="'+row.sisa+'" class="editor-active">';
                }
                return data;
            },
            className: "dt-body-center"
        },
    ],
    "bDestroy": true,
});

My Jquery

$('body').on('change', 'input[type="checkbox"]', function() {
    // var tblData = table.rows('.selected').data();
    let sisa = $(this).data('sisa');
    // console.log(tblData);
    // var inputForm = $(this).'input[type="number"]';
    // $('.open-input').val(sisa);
    // this.checked ? inputForm.val(sisa) : inputForm.val(0);
    console.log(sisa);
});


问:
Common function that is used both in `tests` and `src` not found
I have a number of tests defined inside some of my modules with:

```<code>#[cfg(test)]
mod tests {
    ...
</code>```

and a number of tests found inside my /tests directory. All of these happen to need a common function called get_local() that I have put inside a utils module

```<code>+src
 |-lib.rs
 |-utils.rs
 |-...
+tests
 |_common.rs
</code>```

Now since this function is only used in case I run tests I thought I should add a #[cfg(test)] above it.

```<code>#[cfg(test)]
pub fn get_local() -> SomeResult { ... }
</code>```

and then I make sure it is inside lib.rs:

```<code>pub mod utils;
</code>```

When I try using the function in tests/common.rs though:

```<code>use my_crate::utils::get_local;
</code>```

and run the tests with the test command I get the error: no get_local in utils. This error only goes away if I remove #[cfg(test)] from the declaration of get_local. Why does this happen?

答:
Why does this happen?

#[cfg(test)] is only active when the crate is being compiled into a test binary (instead of a library or normal binary) — the same condition under which #[test] functions are compiled to be run rather than ignored. But for a tests/ test, the crate being compiled in test mode is not your library — it's a separate binary crate for the test, which Cargo sets up to depend on your library compiled normally.

Thus,  tests/ tests may only test the "public API" of your library — they see it no differently than a dependent crate outside your library.

As a workaround, you can use #[doc(hidden)] instead of #cfg(test)] so that the function is always available but undocumented, or you can put it in a module which is compiled into the test as well as the main library (but it's tricky to write code that works in both cases).

Body:
I have a number of tests defined inside some of my modules with:

#[cfg(test)]
mod tests {
    ...

and a number of tests found inside my /tests directory. All of these happen to need a common function called get_local() that I have put inside a utils module

+src
 |-lib.rs
 |-utils.rs
 |-...
+tests
 |_common.rs

Now since this function is only used in case I run tests I thought I should add a #[cfg(test)] above it.

#[cfg(test)]
pub fn get_local() -> SomeResult { ... }

and then I make sure it is inside lib.rs:

pub mod utils;

When I try using the function in tests/common.rs though:

use my_crate::utils::get_local;

and run the tests with the test command I get the error: no get_local in utils. This error only goes away if I remove #[cfg(test)] from the declaration of get_local. Why does this happen?


问:
Efficient Regexp matching starting from given index within string
I have already parsed a string up to index idx. My next parse step uses a Regexp. It needs to match the next part of the string, i.e. staring from position idx . How do I do this efficiently?

For example:

let myString = "
ONE

TWO
"
let idx

// some code not shown here parses the first paragraph
// and updates idx
idx = 10

// next parse step must continue from idx
let myRegex = /
[^<]*<\/p>/
let subbed = myString.substring(idx)
let result = myRegex.exec(subbed)
console.log(result) // "
TWO
", not "
ONE
"```

But myString.substring(idx) seems like a quite expensive operation.

Are there no regex operations like this: result = myRegex.execFromIndex(idx, myString);?

In general, I want to start regex matching from different indexes so I can exclude parts of the string and avoid matches that are already parsed. So one time it can be from myString[0] another time myString[51] and so on.

Is there a way to do this efficiently? I'm parsing hundreds of thousands of lines and want to do this in an as cheap way as possible.

答:
Using Regex.exec and lastIndex

Regexp supports what you want to do by:

setting the Regexp y or g flag

with the y flag, the match must start exactly at the specified start index

with the g flag, the match can occur anywhere after the specified index

setting its lastIndex property to the start index

calling exec

I've applied the above steps to your example code:

let myString = "
ONE

TWO
"
let idx

// some code not shown here parses the first paragraph
// and updates idx
idx = 10

// next parse step must continue from idx
let myRegex = /
[^<]*<\/p>/y  // note the 'y' flag!
myRegex.lastIndex = idx
let result = myRegex.exec(myString)
console.log(result) // "
TWO
", not "
ONE
"```

Another useful thing to know is that exec will update lastIndex to point to the position in the string after the returned match. This allows you to do many things, including:

Rerun the same Regexp, which will automatically find the next match after that last match.

Transfer the lastIndex value to a different Regexp, if the next thing you want to parse has a different pattern.

Copy the lastIndex value into a variable used by your non-regex parsing.

Return lastIndex to the caller of your function, so the caller can proceed with the rest of the string however it wants.

Why string.slice and substring are good solutions too

But myString.substring(idx) seems like a quite expensive operation.

Not necessarily so! Although they probably won't be as fast as Rust, all the leading Javascript engines (SpiderMonkey, V8, JavaScriptCore) do exactly what you describe for Rust. They optimize  string.slice and substring behind the scenes, using pointers into the source string rather than making copies.

Adventures in the land of substrings and RegExps has a lot of great detail, pictures and analysis, but it is five years old and things have likely gotten even better since. There is the answer to this StackOverflow question: Is Javascript substring virtual?

Body:
I have already parsed a string up to index idx. My next parse step uses a Regexp. It needs to match the next part of the string, i.e. staring from position idx . How do I do this efficiently?

For example:

let myString = "
ONE

TWO
"
let idx

// some code not shown here parses the first paragraph
// and updates idx
idx = 10

// next parse step must continue from idx
let myRegex = /
[^<]*<\/p>/
let subbed = myString.substring(idx)
let result = myRegex.exec(subbed)
console.log(result) // "
TWO
", not "
ONE
"

But myString.substring(idx) seems like a quite expensive operation.

Are there no regex operations like this: result = myRegex.execFromIndex(idx, myString);?

In general, I want to start regex matching from different indexes so I can exclude parts of the string and avoid matches that are already parsed. So one time it can be from myString[0] another time myString[51] and so on.

Is there a way to do this efficiently? I'm parsing hundreds of thousands of lines and want to do this in an as cheap way as possible.

Body:
Using Regex.exec and lastIndex

Regexp supports what you want to do by:

setting the Regexp y or g flag

with the y flag, the match must start exactly at the specified start index

with the g flag, the match can occur anywhere after the specified index

setting its lastIndex property to the start index

calling exec

I've applied the above steps to your example code:

let myString = "<p>ONE</p><p>TWO</p>"
let idx

// some code not shown here parses the first paragraph
// and updates idx
idx = 10

// next parse step must continue from idx
let myRegex = /<p>[^<]*<\/p>/y  // note the 'y' flag!
myRegex.lastIndex = idx
let result = myRegex.exec(myString)
console.log(result) // "<p>TWO</p>", not "<p>ONE</p>"

Another useful thing to know is that exec will update lastIndex to point to the position in the string after the returned match. This allows you to do many things, including:

Rerun the same Regexp, which will automatically find the next match after that last match.

Transfer the lastIndex value to a different Regexp, if the next thing you want to parse has a different pattern.

Copy the lastIndex value into a variable used by your non-regex parsing.

Return lastIndex to the caller of your function, so the caller can proceed with the rest of the string however it wants.

Why string.slice and substring are good solutions too

But myString.substring(idx) seems like a quite expensive operation.

Not necessarily so! Although they probably won't be as fast as Rust, all the leading Javascript engines (SpiderMonkey, V8, JavaScriptCore) do exactly what you describe for Rust. They optimize  string.slice and substring behind the scenes, using pointers into the source string rather than making copies.

Adventures in the land of substrings and RegExps has a lot of great detail, pictures and analysis, but it is five years old and things have likely gotten even better since. There is the answer to this StackOverflow question: Is Javascript substring virtual?


问:
Get "Value" from simple JSON using "Key" as variable Azure Logic Apps
I have defined a simple JSON

```<code>{
  "12345": "Numbers",
  "AAAAA": "AllAs",
  "ABCXYZ": "AtoZ"
}
</code>```

All I want to extract the value of "Key" when passed as a variable. I have tried body('Parse_JSON')['name'] but its failing.

I just want to get the value of what ever Key I am looking for as variable.

答: As per your comment as you are initializing ABCXYZ value and that you have already declared in inputs you can just type ABCXYZ in value rather than calling Name variable

Body:
I have defined a simple JSON

{
  "12345": "Numbers",
  "AAAAA": "AllAs",
  "ABCXYZ": "AtoZ"
}

All I want to extract the value of "Key" when passed as a variable. I have tried body('Parse_JSON')['name'] but its failing.

I just want to get the value of what ever Key I am looking for as variable.


问:
Suspected memory leak in asp.net application
I have a few asp.net applications running on my IIS6 server. And after I published a new one, it froze after a few hours. When i restart the app-pool it works again.

I see after I restart the app-pool that the memory footprint of w3wp.exe increases steadily by about 4-500kb each second, and it doesn't seem to stop.

How can I find out what is causing the memory leak?

答:
Tess's blog is the place for learning how to track these down.

.NET Debugging Demos


问:
Error: EACCES: permission denied; cannot mkdir
I attempted to run a local hardhat project, but came across this problem:

```<code>➜  hardhat sudo npx hardhat accounts
An unexpected error occurred:

Error: EACCES: permission denied, mkdir '/root/.config/hardhat-nodejs'
    at Object.mkdirSync (node:fs:1336:3)
    at Object.mkdirsSync (/home/hxq/hardhat/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
    at getConfigDirSync (/home/hxq/hardhat/node_modules/hardhat/src/internal/util/global-dir.ts:21:6)
    at hasConsentedTelemetry (/home/hxq/hardhat/node_modules/hardhat/src/internal/util/global-dir.ts:103:21)
    at main (/home/hxq/hardhat/node_modules/hardhat/src/internal/cli/cli.ts:147:70) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.config/hardhat-nodejs'
}
</code>```

I tried many solutions, including:

```<code>sudo npm install -g appium --unsafe-perm=true --allow-root
</code>```

and

```<code>sudo chmod a+w /root/.config
</code>```

but both didn't work for me.
I'm a beginner in Nodejs, and want a soluion and, hopefully, its theoretical explaination

答: Since you are in Ubunutu, try to make yourself as a root user first i.e sudo -i. Then install your hardhat package and it's dependencies. Then logout from root and start working from your account. This worked for me.</p>

Body:
I attempted to run a local hardhat project, but came across this problem:

➜  hardhat sudo npx hardhat accounts
An unexpected error occurred:

Error: EACCES: permission denied, mkdir '/root/.config/hardhat-nodejs'
    at Object.mkdirSync (node:fs:1336:3)
    at Object.mkdirsSync (/home/hxq/hardhat/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
    at getConfigDirSync (/home/hxq/hardhat/node_modules/hardhat/src/internal/util/global-dir.ts:21:6)
    at hasConsentedTelemetry (/home/hxq/hardhat/node_modules/hardhat/src/internal/util/global-dir.ts:103:21)
    at main (/home/hxq/hardhat/node_modules/hardhat/src/internal/cli/cli.ts:147:70) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.config/hardhat-nodejs'
}

I tried many solutions, including:

sudo npm install -g appium --unsafe-perm=true --allow-root

and

sudo chmod a+w /root/.config

but both didn't work for me.
I'm a beginner in Nodejs, and want a soluion and, hopefully, its theoretical explaination


问:
C++ template what does this class assignment in template mean?
```<code>template<classT>
class MyClass {
using KeyType = int;
using MapType = std::map<KeyType, int64_t>;
MapType map_;

template <class T1 = T, class = std::enable_if_t<std::is_same<T1, int>{}>>
  IndexValueType LowerBound(KeyType k) const {
    auto it = map_.lower_bound(k);
    if (it == map_.end()) {
      return NOT_FOUND;
    }
    return it->second;
  }
};
</code>```

What does these 2 assignments do in this context?

class T1 = T

class = std::enable_if_t<std::is_same<T1, int>{}>

答:
LowerBound is a member template function declared inside the class template MyClass. It's similar to a function template but it is enclosed in a class (template).

The code can be simplified as

```<code>template <typename T>
class MyClass {

    template <typename T1 = T, typename = std::enable_if_t<std::is_same<T1, int>{}>>
    IndexValueType LowerBound(KeyType k) const {}
};
</code>```

The first assignment T1 = T means the default argument for the first template parameter is the same type of T. If you are not explicitly specified, T1 will be T. You could of course explicitly specify other types.

The second assignment here is an usage of std::enable_if. Also pointed in the comments, it's a simple way to apply SFINAE. Here it will disable(ignore) templates when T1 is not the same as int. Since the second parameter is only to restrict the first parameter and has no usage in the definition, its name is ignored.

MyClass<int> mc1; // T is int
mc1.LowerBound(...) // T1 is int, when not specified explicitly
mc1.LowerBound<std::int32_t>(...) // T1 is std::int32_t here
MyClass<double> mc2; // T is double
mc2.LowerBound<int>(...) // OK, T1 is int
mc2.LowerBound(...) // T1 is substitued with double here and will cause compile error since is not int
```

Body:
template<classT>
class MyClass {
using KeyType = int;
using MapType = std::map<KeyType, int64_t>;
MapType map_;

template <class T1 = T, class = std::enable_if_t<std::is_same<T1, int>{}>>
  IndexValueType LowerBound(KeyType k) const {
    auto it = map_.lower_bound(k);
    if (it == map_.end()) {
      return NOT_FOUND;
    }
    return it->second;
  }
};

What does these 2 assignments do in this context?

class T1 = T

class = std::enable_if_t<std::is_same<T1, int>{}>

Body:
LowerBound is a member template function declared inside the class template MyClass. It's similar to a function template but it is enclosed in a class (template).

The code can be simplified as

template <typename T>
class MyClass {

    template <typename T1 = T, typename = std::enable_if_t<std::is_same<T1, int>{}>>
    IndexValueType LowerBound(KeyType k) const {}
};

The first assignment T1 = T means the default argument for the first template parameter is the same type of T. If you are not explicitly specified, T1 will be T. You could of course explicitly specify other types.

The second assignment here is an usage of std::enable_if. Also pointed in the comments, it's a simple way to apply SFINAE. Here it will disable(ignore) templates when T1 is not the same as int. Since the second parameter is only to restrict the first parameter and has no usage in the definition, its name is ignored.

MyClass<int> mc1; // T is int
mc1.LowerBound(...) // T1 is int, when not specified explicitly
mc1.LowerBound<std::int32_t>(...) // T1 is std::int32_t here
MyClass<double> mc2; // T is double
mc2.LowerBound<int>(...) // OK, T1 is int
mc2.LowerBound(...) // T1 is substitued with double here and will cause compile error since is not int


问:
Aligning panels with GridBagLayout
I'm not exactly new to java (I've been using it for a year now) but this is my first go at swing. I'm trying to make a very simple chat client to learn both socket and swing at once. My question is "What must I do to align my panels correctly?". I've tried a lot of things (Though I don't have it in my code). Usually I work something like this out on my own, but I'm to the point I need to ask for help.  Do I need to change the wieghtx, weighty? What I want the client to look like is something like this.

This is what it currently looks like.

Here is my code.

```<code>package com.client.core;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Window extends JFrame{

private int screenWidth = 800;
private int screenHeight = 600;

public Window(){

    //Initial Setup
    super("NAMEHERE - Chat Client Alpha v0.0.1");
    setResizable(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(screenWidth,screenHeight);
    GridBagConstraints c = new GridBagConstraints();

    //Main Panel
    JPanel window = new JPanel();
    window.setLayout(new GridBagLayout());
    window.setBackground(Color.black);

    //Panels
    JPanel display = new JPanel();
    JPanel chat = new JPanel();
    chat.setLayout(new GridBagLayout());
    JPanel users = new JPanel();

    display.setBackground(Color.blue);
    c.gridx = 0;
    c.gridy = 0;
    c.insets= new Insets(5,5,5,5);
    window.add(display, c);

    chat.setBackground(Color.red);
    c.gridx = 0;
    c.gridy = 3;
    c.gridheight = 2;
    c.gridwidth = 1;
    c.insets= new Insets(5,5,5,5);
    window.add(chat, c);

    users.setBackground(Color.green);
    c.gridx = 2;
    c.gridy = 0;
    c.insets= new Insets(5,5,5,5);
    window.add(users, c);

    //Buttons

    //Text fields
    JTextArea text = new JTextArea("DEREADFADSFEWFASDFSADFASDF");
    c.gridx = 0;
    c.gridy = 0;
    chat.add(text);
    JTextField input = new JTextField("type here to chat", 50);
    c.gridx = 0;
    c.gridy = 1;
    c.insets= new Insets(5,5,5,5);
    chat.add(input);

    add(window);

}

static class ActLis implements ActionListener{

    @Override
    public void actionPerformed(ActionEvent e) {
        // TODO Auto-generated method stub

    }

}
}
</code>```

答:
I had to build a similar layout using a GridBagLayout. The code below shows how I achieved it.

```<code>import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class GridBagLayoutTest {
    public GridBagLayoutTest() {

    JFrame jframe = new JFrame();
    jframe.setLayout(new GridBagLayout());
    jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    jframe.setSize(800, 600);
    jframe.setVisible(true);

    // Left
    JPanel leftPanel = new JPanel(new GridBagLayout());
    leftPanel.setBackground(Color.YELLOW);

    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = .7f;
    gridBagConstraints.weighty = 1f;
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;

    jframe.add(leftPanel, gridBagConstraints);

    JPanel leftTopPanel = new JPanel(new FlowLayout());
    leftTopPanel.setBackground(Color.RED);

    GridBagConstraints gridBagConstraints0 = new GridBagConstraints();
    gridBagConstraints0.fill = GridBagConstraints.BOTH;
    gridBagConstraints0.weightx = 1f;
    gridBagConstraints0.weighty = .7f;
    gridBagConstraints0.gridx = 0;
    gridBagConstraints0.gridy = 0;

    leftPanel.add(leftTopPanel, gridBagConstraints0);

    JPanel leftMiddlePanel = new JPanel(new FlowLayout());
    leftMiddlePanel.setBackground(Color.BLACK);

    gridBagConstraints0 = new GridBagConstraints();
    gridBagConstraints0.fill = GridBagConstraints.BOTH;
    gridBagConstraints0.weightx = 1f;
    gridBagConstraints0.weighty = .2f;
    gridBagConstraints0.gridx = 0;
    gridBagConstraints0.gridy = 1;

    leftPanel.add(leftMiddlePanel, gridBagConstraints0);

    JPanel leftBottomBottomPanel = new JPanel(new FlowLayout());
    leftBottomBottomPanel.setBackground(Color.PINK);

    gridBagConstraints0 = new GridBagConstraints();
    gridBagConstraints0.fill = GridBagConstraints.BOTH;
    gridBagConstraints0.weightx = 1f;
    gridBagConstraints0.weighty = .1f;
    gridBagConstraints0.gridx = 0;
    gridBagConstraints0.gridy = 2;

    leftPanel.add(leftBottomBottomPanel, gridBagConstraints0);

    // Right
    JPanel rightPanel = new JPanel();
    rightPanel.setBackground(Color.GREEN);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = .3f;
    gridBagConstraints.weighty = 1f;
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;

    jframe.add(rightPanel, gridBagConstraints);
}

public static void main (String args[]) {
    new GridBagLayoutTest();
}
</code>```

Title: Aligning panels with GridBagLayout

Body:
I'm not exactly new to java (I've been using it for a year now) but this is my first go at swing. I'm trying to make a very simple chat client to learn both socket and swing at once. My question is "What must I do to align my panels correctly?". I've tried a lot of things (Though I don't have it in my code). Usually I work something like this out on my own, but I'm to the point I need to ask for help.  Do I need to change the wieghtx, weighty? What I want the client to look like is something like this.

This is what it currently looks like.

Here is my code.

package com.client.core;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Window extends JFrame{

private int screenWidth = 800;
private int screenHeight = 600;

public Window(){

    //Initial Setup
    super("NAMEHERE - Chat Client Alpha v0.0.1");
    setResizable(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(screenWidth,screenHeight);
    GridBagConstraints c = new GridBagConstraints();

    //Main Panel
    JPanel window = new JPanel();
    window.setLayout(new GridBagLayout());
    window.setBackground(Color.black);

    //Panels
    JPanel display = new JPanel();
    JPanel chat = new JPanel();
    chat.setLayout(new GridBagLayout());
    JPanel users = new JPanel();

    display.setBackground(Color.blue);
    c.gridx = 0;
    c.gridy = 0;
    c.insets= new Insets(5,5,5,5);
    window.add(display, c);

    chat.setBackground(Color.red);
    c.gridx = 0;
    c.gridy = 3;
    c.gridheight = 2;
    c.gridwidth = 1;
    c.insets= new Insets(5,5,5,5);
    window.add(chat, c);

    users.setBackground(Color.green);
    c.gridx = 2;
    c.gridy = 0;
    c.insets= new Insets(5,5,5,5);
    window.add(users, c);

    //Buttons

    //Text fields
    JTextArea text = new JTextArea("DEREADFADSFEWFASDFSADFASDF");
    c.gridx = 0;
    c.gridy = 0;
    chat.add(text);
    JTextField input = new JTextField("type here to chat", 50);
    c.gridx = 0;
    c.gridy = 1;
    c.insets= new Insets(5,5,5,5);
    chat.add(input);

    add(window);

}

static class ActLis implements ActionListener{

    @Override
    public void actionPerformed(ActionEvent e) {
        // TODO Auto-generated method stub

    }

}
}

Body:
I had to build a similar layout using a GridBagLayout. The code below shows how I achieved it.

import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class GridBagLayoutTest {
    public GridBagLayoutTest() {

    JFrame jframe = new JFrame();
    jframe.setLayout(new GridBagLayout());
    jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    jframe.setSize(800, 600);
    jframe.setVisible(true);

    // Left
    JPanel leftPanel = new JPanel(new GridBagLayout());
    leftPanel.setBackground(Color.YELLOW);

    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = .7f;
    gridBagConstraints.weighty = 1f;
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;

    jframe.add(leftPanel, gridBagConstraints);

    JPanel leftTopPanel = new JPanel(new FlowLayout());
    leftTopPanel.setBackground(Color.RED);

    GridBagConstraints gridBagConstraints0 = new GridBagConstraints();
    gridBagConstraints0.fill = GridBagConstraints.BOTH;
    gridBagConstraints0.weightx = 1f;
    gridBagConstraints0.weighty = .7f;
    gridBagConstraints0.gridx = 0;
    gridBagConstraints0.gridy = 0;

    leftPanel.add(leftTopPanel, gridBagConstraints0);

    JPanel leftMiddlePanel = new JPanel(new FlowLayout());
    leftMiddlePanel.setBackground(Color.BLACK);

    gridBagConstraints0 = new GridBagConstraints();
    gridBagConstraints0.fill = GridBagConstraints.BOTH;
    gridBagConstraints0.weightx = 1f;
    gridBagConstraints0.weighty = .2f;
    gridBagConstraints0.gridx = 0;
    gridBagConstraints0.gridy = 1;

    leftPanel.add(leftMiddlePanel, gridBagConstraints0);

    JPanel leftBottomBottomPanel = new JPanel(new FlowLayout());
    leftBottomBottomPanel.setBackground(Color.PINK);

    gridBagConstraints0 = new GridBagConstraints();
    gridBagConstraints0.fill = GridBagConstraints.BOTH;
    gridBagConstraints0.weightx = 1f;
    gridBagConstraints0.weighty = .1f;
    gridBagConstraints0.gridx = 0;
    gridBagConstraints0.gridy = 2;

    leftPanel.add(leftBottomBottomPanel, gridBagConstraints0);

    // Right
    JPanel rightPanel = new JPanel();
    rightPanel.setBackground(Color.GREEN);

    gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = .3f;
    gridBagConstraints.weighty = 1f;
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;

    jframe.add(rightPanel, gridBagConstraints);
}

public static void main (String args[]) {
    new GridBagLayoutTest();
}


问:
TOSCA module coming empty when I call it through test case creation folder
Module view from module folder which has all detailes
 Test case view

I just created a module in TOSCA  with two test steps. However, when I call it through the test case creation folder it is coming empty. Not showing module details. Can anyone help me with what I am doing wrong?

答:
You have to click on checkout tree in home tab.
When the module is not checked out and used for teststep by drag and drop, at that time it shows only name of module and not the controls.</p>


问:
Get only unique item from the Line Odoo13
I have this issue where items can be duplicated, but I want to get only unduplicated items and sum the quantity of them as in the pic below. for instance, I have 7 items in the line but they are 2 because the desk item I have 4 copies of It and the    boxW00009 I have 3 copies of it. I want to treat them as singular and calculate the quantity of 2, not 7. If the user added a new item and it is not duplicated I want to add its quantity too.
here is my code:

```<code> @api.depends('move_line_ids.item_id')
def get_item_number(self):
    """
    Compute the unique items.
    """
    for rec in self:
        qyt = 0
        for line in rec.move_line_ids.mapped('item_id'):
            qyt += line.quantity
        rec.update({
            'item_number': qyt,
        })
</code>```

here the pic

答: You can try with python '|=' operator to prepare unique data by looping out of all the records, then you can sum the value.</p>

Body:
I have this issue where items can be duplicated, but I want to get only unduplicated items and sum the quantity of them as in the pic below. for instance, I have 7 items in the line but they are 2 because the desk item I have 4 copies of It and the    boxW00009 I have 3 copies of it. I want to treat them as singular and calculate the quantity of 2, not 7. If the user added a new item and it is not duplicated I want to add its quantity too.
here is my code:

 @api.depends('move_line_ids.item_id')
def get_item_number(self):
    """
    Compute the unique items.
    """
    for rec in self:
        qyt = 0
        for line in rec.move_line_ids.mapped('item_id'):
            qyt += line.quantity
        rec.update({
            'item_number': qyt,
        })

here the pic


问:
How can I proxy/forward data using the Rocket web framework?
I have a list of links I want to serve data randomly from, as if the user manually went to the url themselves. These are not all the same content/file type, however they are all images (jpeg and png) (Ideally I would like to do this with any file type, not just jpeg and png or just images). I know I can serve them directly as an octet stream like this, but this will result in the files being downloaded, instead of being displayed inline. I have considered changing the content type based on the link extension, but I can't find any information on how to use content types that are unknown at compile time. I also feel like there might be a better way than that. How to forward data from a reqwest::blocking::Body in a Rocket responder? Seems to be somewhat similar to my question, however the file type is always png. I am using v0.5-rc of rocket.

#[get("/rand_img")]
async fn get_img() -> Vec<u8> {
    let vs = vec![
        "https://www.publicdomainpictures.net/pictures/320000/velka/background-image.png",
        "https://www.publicdomainpictures.net/pictures/410000/velka/cobalt-city-1.png",
        "https://www.publicdomainpictures.net/pictures/60000/velka/went-boating.jpg",
        "https://www.publicdomainpictures.net/pictures/30000/velka/paulino-nacht.jpg"
    ];
    let choice = vs.choose(&mut rand::thread_rng()).unwrap();
    let response = reqwest::get(*choice).await.unwrap().bytes().await.unwrap();
    response.to_vec()
}
```

答:
I ended up downloading the image data, storing it in memory, and returning a content type and the image data.

    let imager = reqwest::get(&link)
        .await
        .expect("unable to fetch image")
        .bytes()
        .await
        .unwrap();
    let ext = &link.chars().rev().collect::<String>()[0..3] // this is really bad, i should split by `.` instead
    .chars()
    .rev().collect::<String>();
    return (ContentType::from_extension(ext).unwrap(), imager.to_vec())
```


问:
Python Selenium: How to let human interaction in a automated script?
I am working on a script that shows CAPTCHA and a few other stuff in a pop window. I am writing script for FireFox. Is it possible that I feed the values and on hitting Submit button script could resume the operations? I guess, some kind of infinite loop?</p>

答:
One way is to check for some content of the next page that loads after entering captcha and wait till they're found.
Other way is to check for current URL until it changes (usually URL changes after entering CAPTCHA) or wait for the next URL with -</p>
```<code>while driver.current_url == your_current_url:
    wait
</code>```

Body:
One way is to check for some content of the next page that loads after entering captcha and wait till they're found.
Other way is to check for current URL until it changes (usually URL changes after entering CAPTCHA) or wait for the next URL with -

while driver.current_url == your_current_url:
    wait


问:
Devops Pipeline - Catch sql query result in pipeline
I have a devops pipeline (running on an agent in a local server) with a custom task that executes an SQL query using sqlcmd.
I want to catch the result of this query to use in another step.
Any idea about how to do ?

答:
You can try this way:

gen sql script file task

run sql script task and set response as pipeline variables

There are 2 scoped variables, it's more easy to use global scoped variable, the value of variable only support string as far as I know.
"##vso[task.setvariable variable={variableName};]{variableValue}"

```<code>Import-Module SqlServer
$result = Invoke-Sqlcmd -InputFile $SqlScript -ServerInstance $DBServer -Username $DBUser -Password $DBPassword -Database $DBName -OutputSqlErrors $true -verbose
foreach($row in $result) {
    Write-Host ($row | Format-Table | Out-String)
}
</code>```

consume sql response data task

Body:
You can try this way:

gen sql script file task

run sql script task and set response as pipeline variables

There are 2 scoped variables, it's more easy to use global scoped variable, the value of variable only support string as far as I know.
"##vso[task.setvariable variable={variableName};]{variableValue}"

Import-Module SqlServer
$result = Invoke-Sqlcmd -InputFile $SqlScript -ServerInstance $DBServer -Username $DBUser -Password $DBPassword -Database $DBName -OutputSqlErrors $true -verbose
foreach($row in $result) {
    Write-Host ($row | Format-Table | Out-String)
}

consume sql response data task


问:
How to consume api that return json data as string using RestSharp RestClient in dot NET
I am consuming an API that returns json data as string. That is its return type is Task<string>. Generally API returns an object of Response class which is then serialized by dot NET. But in this case the API returns serialized version of Response class.

I am trying to consume this API using RestSharp->RestClient. In the RestClient method ExecutePostAsync<T>(request), the response is deserialized by the method into the object of class specified in place of T. I have class named Response class in which I want the response to be deserialized. So, I make the request as,

_restClient.ExecutePostAsync<Response>(request)

Now the problem I am facing is the json string returned in response by API is in form "{<json-fields>}", but when received to RestClient it is in form \"{<json-fields>}\". That is escape characters are added to it. So, NewtonSoftJSON which is used by RestClient to serialize and deserialize gives error, Error converting \"{<json-fields>}\" to Response class.

Also I need original RestResponse from RestClient as I am performing Validation on RestResponse. So, cannot do like, get response as string and deserialize it. That is I dont't want to do like,

var restResponse = _restClient.ExecutePostAsync<string>(request);
var data = Deserialize(restResponse.Data);
```

As this will only give me object of Response class but I need object of RestResponse<Response> class to perform validations.

What can I do in this situation?

答:
In case that you can't fix the api to response in json format the only way I see is clean your string response:

```<code>var data = Deserialize(restResponse.Data.ToString.Replace('\"',(char)0));
</code>```

Also you should check the RestSharp's documentation, you can make a request passing the [Type] to auto-deserialize the response:

```<code>var request = new CreateOrder("123", "foo", 10100);
// Will post the request object as JSON to "orders" and returns a
// JSON response deserialized to OrderCreated
var result = client.PostJsonAsync<CreateOrder, **OrderCreated**>("orders", request, cancellationToken);
</code>```

I hope this helps!

Body:
I am consuming an API that returns json data as string. That is its return type is Task<string>. Generally API returns an object of Response class which is then serialized by dot NET. But in this case the API returns serialized version of Response class.

I am trying to consume this API using RestSharp->RestClient. In the RestClient method ExecutePostAsync<T>(request), the response is deserialized by the method into the object of class specified in place of T. I have class named Response class in which I want the response to be deserialized. So, I make the request as,

_restClient.ExecutePostAsync<Response>(request)

Now the problem I am facing is the json string returned in response by API is in form "{<json-fields>}", but when received to RestClient it is in form \"{<json-fields>}\". That is escape characters are added to it. So, NewtonSoftJSON which is used by RestClient to serialize and deserialize gives error, Error converting \"{<json-fields>}\" to Response class.

Also I need original RestResponse from RestClient as I am performing Validation on RestResponse. So, cannot do like, get response as string and deserialize it. That is I dont't want to do like,

var restResponse = _restClient.ExecutePostAsync<string>(request);
var data = Deserialize(restResponse.Data);

As this will only give me object of Response class but I need object of RestResponse<Response> class to perform validations.

What can I do in this situation?

Body:
In case that you can't fix the api to response in json format the only way I see is clean your string response:

var data = Deserialize(restResponse.Data.ToString.Replace('\"',(char)0));

Also you should check the RestSharp's documentation, you can make a request passing the [Type] to auto-deserialize the response:

var request = new CreateOrder("123", "foo", 10100);
// Will post the request object as JSON to "orders" and returns a
// JSON response deserialized to OrderCreated
var result = client.PostJsonAsync<CreateOrder, **OrderCreated**>("orders", request, cancellationToken);

I hope this helps!


问:
What is the difference between data validation and data cleaning, And what arethe connections and similarities between them?
I'm studying data science. I looked other references to get an clear answer to this. But no success  with that. Can someone explain me about this.</p>

答:
Data cleaning may include removing typographical mistakes or approving and redressing values against a known run down of entities. A few data cleaning arrangements will clean data by cross checking with an approved data set.

Data validation might be strict.

Example: While submitting any form user enter special characters in name fields. like K@v!ndu. And you want to store only string in db.
So you are using a function which remove the special characters before storing name. So in db the name will be save as Kvndu. This process of removing special characters is Data cleaning.

And If you implement some functionality to check that name field should have only string value. To do that you will apply some validation on name field. This process is called Data validation.

I had used name field just for example and Data validation can be a part of Data cleaning. Like you have remove the special character and using validation for numbers.
Both process allow to save only string in your db.


问:
Ant Design: remove the divider line between table rows
When making a Table in Ant Design, there are always gray divider lines between each row. Is there a way to style these divider lines or completely remove them from the table?</p>

答:
You should override the antd table styles

```<code>.ant-table-tbody > tr > td {
  border: none
}
</code>```

Body:
You should override the antd table styles

.ant-table-tbody > tr > td {
  border: none
}


问:
What does _buildManifest.js in nextjs do, and can it be disabled?
We're building a site with NextJS, and noticed that in the source code of our website, we can find a _buildManifest.js file, which appears to list all pages currently defined on our site. We'd like this to not happen.

How is the _buildManifest.js file created, and what does it do?

How does it pull in the list of pages?

Is there a way disable its creation, and what breaks if we do?

答:
We worked it out on our own, putting an update here.

It appears the build manifest is an autogenerated file that has a mapping of urls to the static JS chunk generated by webpack. This is primarily used for client-side navigation by the next/link component which, among other features, eagerly loads the JS on hover based on the href attribute.

The work is done by a webpack plugin defined here, which grabs all urls and generated JS chunks from webpack and spits out a JSON file.

As of Next v10, overriding this webpack plugin and filtering the output through an allowlist seems to work; the only observed side effect is that clicking these links must be done through a normal href> instead of the next/link component, which disables client-side navigation. This may lead to slightly slower page navs (no eagerly loading client-side JS on hover) but does allow for hiding the urls from a publicly visible endpoint.

Body:
We worked it out on our own, putting an update here.

It appears the build manifest is an autogenerated file that has a mapping of urls to the static JS chunk generated by webpack. This is primarily used for client-side navigation by the next/link component which, among other features, eagerly loads the JS on hover based on the href attribute.

The work is done by a webpack plugin defined here, which grabs all urls and generated JS chunks from webpack and spits out a JSON file.

As of Next v10, overriding this webpack plugin and filtering the output through an allowlist seems to work; the only observed side effect is that clicking these links must be done through a normal <a href> instead of the next/link component, which disables client-side navigation. This may lead to slightly slower page navs (no eagerly loading client-side JS on hover) but does allow for hiding the urls from a publicly visible endpoint.


问:
alpha blending is not working as it supposed to be
I create a new DirectX project and rendered 2 color components and now when I am passing the transparency from shader it is not changing anything, I am new to c++ and DirectX and I used the standard template from visual studio to create a project

project link: https://github.com/AbhishekSharma-SEG/TestAlphaBlending

Blend State

```<code>D3D11_BLEND_DESC blendDesc;
blendDesc.RenderTarget[0].BlendEnable = true;

blendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_COLOR;
blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_COLOR;
blendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;

blendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
blendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
blendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;

blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;;

blendDesc.IndependentBlendEnable = false;
blendDesc.AlphaToCoverageEnable = false;

auto hr = m_d3dDevice->CreateBlendState(&blendDesc, &AlphaEnableBlendingState);
if (SUCCEEDED(hr))
{
    blendDesc.RenderTarget[0].BlendEnable = false;
    m_d3dDevice->CreateBlendState(&blendDesc, &AlphaDisableBlendingState);
    TurnOnAlphaBlending();
}
}
void DX::DeviceResources::TurnOnAlphaBlending()
{
    float input[4] = { 0,0,0,0 };
    m_d3dContext->OMSetBlendState(AlphaEnableBlendingState, input, 1);
}
void DX::DeviceResources::TurnOffAlphaBlending()
{
    float input[4] = { 0,0,0,0 };
    m_d3dContext->OMSetBlendState(AlphaDisableBlendingState, input, 1);
}
</code>```

Swapchain Desc

```<code>// Otherwise, create a new one using the same adapter as the existing Direct3D device.
DXGI_SCALING scaling = DisplayMetrics::SupportHighResolutions ? DXGI_SCALING_NONE : DXGI_SCALING_STRETCH;
DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0};

swapChainDesc.Width = lround(m_d3dRenderTargetSize.Width);      // Match the size of the window.
swapChainDesc.Height = lround(m_d3dRenderTargetSize.Height);
swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;              // This is the most common swap chain format.
swapChainDesc.Stereo = false;
swapChainDesc.SampleDesc.Count = 1;                             // Don't use multi-sampling.
swapChainDesc.SampleDesc.Quality = 0;
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
swapChainDesc.BufferCount = 2;                                  // Use double-buffering to minimize latency.
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;    // All Microsoft Store apps must use _FLIP_ SwapEffects.
swapChainDesc.Flags = 0;
swapChainDesc.Scaling = scaling;
swapChainDesc.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED;
</code>```

Shader

```<code>struct PixelShaderInput
{
    float4 pos : SV_POSITION;
    float3 color : COLOR0;
};

float4 main(PixelShaderInput input) : SV_TARGET
{
    return float4(input.color, 0.2f);
}
</code>```

output

I am unable to find what is wrong, several tutorials and the site only told about setting up the blend state and I tried most of the settings they told me to apply but it is not working also I don't know why but the yellow component is supposed to be behind because renders call for yellow one occurs first but it is printing it above red one if anyone can help, please and thanks

new output after alpha mode ignore and setting blend mode as per straight

Edit: Fixed

so after some digging, I found that I m not using the depth stencil state which is causing this issue after using that it resolves, and obviously thanks to @chukWalbourn suggestion I was able to set up the write configuration for blending now it working perfectly fine here are the  change that helped in it

```<code>//Describe our Depth/Stencil Buffer
CD3D11_DEPTH_STENCIL_DESC depthStencilStateDesc;

depthStencilStateDesc.DepthEnable = false;
depthStencilStateDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
depthStencilStateDesc.DepthFunc = D3D11_COMPARISON_LESS;
depthStencilStateDesc.StencilEnable = true;
depthStencilStateDesc.StencilReadMask = 0xFF;
depthStencilStateDesc.StencilWriteMask = 0xFF;
depthStencilStateDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
depthStencilStateDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
depthStencilStateDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
depthStencilStateDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;

DX::ThrowIfFailed(
    m_d3dDevice->CreateDepthStencilState(
        &depthStencilStateDesc,
        &m_d3dDepthStencilState
    )
);

m_d3dContext->OMSetDepthStencilState(m_d3dDepthStencilState.Get(), 1);
</code>```

答:
so after some digging, I found that I m not using the depth stencil state which is causing this issue after using that it resolves, and obviously thanks to @chukWalbourn suggestion I was able to set up the write configuration for blending now it woking perfectly fine here are the  change that helped in it</p>
```<code>//Describe our Depth/Stencil Buffer
CD3D11_DEPTH_STENCIL_DESC depthStencilStateDesc;

depthStencilStateDesc.DepthEnable = false;
depthStencilStateDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
depthStencilStateDesc.DepthFunc = D3D11_COMPARISON_LESS;
depthStencilStateDesc.StencilEnable = true;
depthStencilStateDesc.StencilReadMask = 0xFF;
depthStencilStateDesc.StencilWriteMask = 0xFF;
depthStencilStateDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
depthStencilStateDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
depthStencilStateDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
depthStencilStateDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;

DX::ThrowIfFailed(
    m_d3dDevice->CreateDepthStencilState(
        &depthStencilStateDesc,
        &m_d3dDepthStencilState
    )
);

m_d3dContext->OMSetDepthStencilState(m_d3dDepthStencilState.Get(), 1);
</code>```

Body:
I create a new DirectX project and rendered 2 color components and now when I am passing the transparency from shader it is not changing anything, I am new to c++ and DirectX and I used the standard template from visual studio to create a project

project link: https://github.com/AbhishekSharma-SEG/TestAlphaBlending

Blend State

D3D11_BLEND_DESC blendDesc;
blendDesc.RenderTarget[0].BlendEnable = true;

blendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_COLOR;
blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_COLOR;
blendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;

blendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
blendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
blendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;

blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;;

blendDesc.IndependentBlendEnable = false;
blendDesc.AlphaToCoverageEnable = false;

auto hr = m_d3dDevice->CreateBlendState(&blendDesc, &AlphaEnableBlendingState);
if (SUCCEEDED(hr))
{
    blendDesc.RenderTarget[0].BlendEnable = false;
    m_d3dDevice->CreateBlendState(&blendDesc, &AlphaDisableBlendingState);
    TurnOnAlphaBlending();
}
}
void DX::DeviceResources::TurnOnAlphaBlending()
{
    float input[4] = { 0,0,0,0 };
    m_d3dContext->OMSetBlendState(AlphaEnableBlendingState, input, 1);
}
void DX::DeviceResources::TurnOffAlphaBlending()
{
    float input[4] = { 0,0,0,0 };
    m_d3dContext->OMSetBlendState(AlphaDisableBlendingState, input, 1);
}

Swapchain Desc

// Otherwise, create a new one using the same adapter as the existing Direct3D device.
DXGI_SCALING scaling = DisplayMetrics::SupportHighResolutions ? DXGI_SCALING_NONE : DXGI_SCALING_STRETCH;
DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0};

swapChainDesc.Width = lround(m_d3dRenderTargetSize.Width);      // Match the size of the window.
swapChainDesc.Height = lround(m_d3dRenderTargetSize.Height);
swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;              // This is the most common swap chain format.
swapChainDesc.Stereo = false;
swapChainDesc.SampleDesc.Count = 1;                             // Don't use multi-sampling.
swapChainDesc.SampleDesc.Quality = 0;
swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
swapChainDesc.BufferCount = 2;                                  // Use double-buffering to minimize latency.
swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;    // All Microsoft Store apps must use _FLIP_ SwapEffects.
swapChainDesc.Flags = 0;
swapChainDesc.Scaling = scaling;
swapChainDesc.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED;

Shader

struct PixelShaderInput
{
    float4 pos : SV_POSITION;
    float3 color : COLOR0;
};

float4 main(PixelShaderInput input) : SV_TARGET
{
    return float4(input.color, 0.2f);
}

output

I am unable to find what is wrong, several tutorials and the site only told about setting up the blend state and I tried most of the settings they told me to apply but it is not working also I don't know why but the yellow component is supposed to be behind because renders call for yellow one occurs first but it is printing it above red one if anyone can help, please and thanks

new output after alpha mode ignore and setting blend mode as per straight

Edit: Fixed

so after some digging, I found that I m not using the depth stencil state which is causing this issue after using that it resolves, and obviously thanks to @chukWalbourn suggestion I was able to set up the write configuration for blending now it working perfectly fine here are the  change that helped in it

//Describe our Depth/Stencil Buffer
CD3D11_DEPTH_STENCIL_DESC depthStencilStateDesc;

depthStencilStateDesc.DepthEnable = false;
depthStencilStateDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
depthStencilStateDesc.DepthFunc = D3D11_COMPARISON_LESS;
depthStencilStateDesc.StencilEnable = true;
depthStencilStateDesc.StencilReadMask = 0xFF;
depthStencilStateDesc.StencilWriteMask = 0xFF;
depthStencilStateDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
depthStencilStateDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
depthStencilStateDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
depthStencilStateDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;

DX::ThrowIfFailed(
    m_d3dDevice->CreateDepthStencilState(
        &depthStencilStateDesc,
        &m_d3dDepthStencilState
    )
);

m_d3dContext->OMSetDepthStencilState(m_d3dDepthStencilState.Get(), 1);

Body:
so after some digging, I found that I m not using the depth stencil state which is causing this issue after using that it resolves, and obviously thanks to @chukWalbourn suggestion I was able to set up the write configuration for blending now it woking perfectly fine here are the  change that helped in it

//Describe our Depth/Stencil Buffer
CD3D11_DEPTH_STENCIL_DESC depthStencilStateDesc;

depthStencilStateDesc.DepthEnable = false;
depthStencilStateDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
depthStencilStateDesc.DepthFunc = D3D11_COMPARISON_LESS;
depthStencilStateDesc.StencilEnable = true;
depthStencilStateDesc.StencilReadMask = 0xFF;
depthStencilStateDesc.StencilWriteMask = 0xFF;
depthStencilStateDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
depthStencilStateDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
depthStencilStateDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
depthStencilStateDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
depthStencilStateDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;

DX::ThrowIfFailed(
    m_d3dDevice->CreateDepthStencilState(
        &depthStencilStateDesc,
        &m_d3dDepthStencilState
    )
);

m_d3dContext->OMSetDepthStencilState(m_d3dDepthStencilState.Get(), 1);


问:
Always up to date content using AJAX
At the moment I am using ajax requests every 10 minutes to update certain content and other time intervals for others.

I do this using jQuery by:

On mouse move, the active page is checked

If the active page has not be updated within the given time interval, the page is updated

I'm doing this because although i want the content to stay up to date, I don't want it to be sending requests in the background (when the user is not using the application). Doing this also means that if the user has not used it for more than the time period, when they start to use it again it will automatically update.

I'm wondering just how efficient this is as whenever the mouse moves the checks are called (and has slowed down performance a bit - especially when trying to click links) - is the a more efficient way to do this?

Thanks!

答:
I would rather activate/reset a timer, on say, 60 seconds, on movement of the mouse, and set your fixed-interval checks to only run if that timer is above zero.

That way, checks aren't made every time the mouse moves, and if the user becomes inactive, update checks stop after 60 seconds.

Title: Always up to date content using AJAX


问:
Could not find any version that matches com.google.android.gms:play-services-base:[15.0.1,16.0.0)
I am using firebase for my android app and suddenly I am getting an error when I tried to run the app. Saturday it was working perfectly. I don't know how this error occurred and how to solve this. Please help me.

dependencies in my build.gradle

```<code>dependencies {
    compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true;
    }
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile 'com.google.code.gson:gson:2.8.4'
    compile 'com.android.support:multidex:1.0.3'
    compile 'com.microsoft.azure:azure-mobile-android:3.1.0'
    compile 'com.mixpanel.android:mixpanel-android:4.8.0'
    compile 'com.firebase:firebase-client-android:2.4.0'

    compile 'com.google.firebase:firebase-core:16.0.0'
    compile 'com.google.firebase:firebase-auth:16.0.1'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.github.tibolte:elasticdownload:1.0.+'
    compile 'me.dm7.barcodescanner:zxing:1.8.4'
    compile 'com.google.android.gms:play-services-vision:15.0.2'
    compile 'com.android.support.constraint:constraint-layout:1.1.1'
    compile 'com.github.amlcurran.showcaseview:library:5.4.3'
    compile 'com.wang.avi:library:2.1.3'
    testCompile 'junit:junit:4.12'
    androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.6.0'
    androidTestCompile 'com.android.support.test:rules:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
</code>```

In my project level build.gradle:

```<code>dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.google.gms:google-services:4.0.0'
    }
</code>```

The Error I am getting:

Could not find any version that matches com.google.android.gms:play-services-base:[15.0.1,16.0.0).

答:
go to build.gradle in android directory , insert

```<code>maven { url 'https://maven.google.com' }
</code>```

in top position of repositories of allprojects same this :

```<code>allprojects {
repositories {
    maven { url 'https://maven.google.com' } //<<--Insert this above google()
    google()
</code>```

Body:
I am using firebase for my android app and suddenly I am getting an error when I tried to run the app. Saturday it was working perfectly. I don't know how this error occurred and how to solve this. Please help me.

dependencies in my build.gradle

dependencies {
    compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true;
    }
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile 'com.google.code.gson:gson:2.8.4'
    compile 'com.android.support:multidex:1.0.3'
    compile 'com.microsoft.azure:azure-mobile-android:3.1.0'
    compile 'com.mixpanel.android:mixpanel-android:4.8.0'
    compile 'com.firebase:firebase-client-android:2.4.0'

    compile 'com.google.firebase:firebase-core:16.0.0'
    compile 'com.google.firebase:firebase-auth:16.0.1'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.github.tibolte:elasticdownload:1.0.+'
    compile 'me.dm7.barcodescanner:zxing:1.8.4'
    compile 'com.google.android.gms:play-services-vision:15.0.2'
    compile 'com.android.support.constraint:constraint-layout:1.1.1'
    compile 'com.github.amlcurran.showcaseview:library:5.4.3'
    compile 'com.wang.avi:library:2.1.3'
    testCompile 'junit:junit:4.12'
    androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.6.0'
    androidTestCompile 'com.android.support.test:rules:1.0.2'
}
apply plugin: 'com.google.gms.google-services'

In my project level build.gradle:

dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.google.gms:google-services:4.0.0'
    }

The Error I am getting:

Could not find any version that matches com.google.android.gms:play-services-base:[15.0.1,16.0.0).

Body:
go to build.gradle in android directory , insert

maven { url 'https://maven.google.com' }

in top position of repositories of allprojects same this :

allprojects {
repositories {
    maven { url 'https://maven.google.com' } //<<--Insert this above google()
    google()


问:
Node.js: Python not found exception due to node-sass and node-gyp
Suddenly in one of my jenkins environment build has started failing, while in local machine it seems to be working fine as i have python installed,

From the logs i was able to detect that the problem is with internal dependency that is node-gyp v3.5.0 from node-sass v3.8.0 when i researched by visiting this about node-gyp and found the prerequisite that Python needs to be installed.

So my question is that what version of node-sass can i install to bypass this or is there a better solution as my build was running fine till this morning on the same environment.

Node v5.10.1

ERROR LOG

```<code>gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\index.js:44:5
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\windows.js:29:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python2 { [Error: not found: python2] code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\index.js:44:5
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\windows.js:29:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python { [Error: not found: python] code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at Object.failNoPython (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack     at Object.<anonymous> (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files (x86)\\Jenkins\\jobs\\NdbSite-hot-fix-Manual-PreBuild\\workspace\\src\\NdbSite.UI\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\node-sass
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Build failed
</code>```

Any thoughts are much appreciated, Thanks.

答:
In my case, i had node version v16 installed in the machine, but the react project used node-sass version v4.x.x, Updating the package.json with node-sass version to v6.0.1 solved the issue,

node version support for node-sass can be checked from official npm page: https://www.npmjs.com/package/node-sass

Body:
Suddenly in one of my jenkins environment build has started failing, while in local machine it seems to be working fine as i have python installed,

From the logs i was able to detect that the problem is with internal dependency that is node-gyp v3.5.0 from node-sass v3.8.0 when i researched by visiting this about node-gyp and found the prerequisite that Python needs to be installed.

So my question is that what version of node-sass can i install to bypass this or is there a better solution as my build was running fine till this morning on the same environment.

Node v5.10.1

ERROR LOG

gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\index.js:44:5
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\windows.js:29:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python2 { [Error: not found: python2] code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\index.js:44:5
gyp verb `which` failed     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\isexe\windows.js:29:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb `which` failed  python { [Error: not found: python] code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at Object.failNoPython (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack     at Object.<anonymous> (C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack     at C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files (x86)\\Jenkins\\jobs\\NdbSite-hot-fix-Manual-PreBuild\\workspace\\src\\NdbSite.UI\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Program Files (x86)\Jenkins\jobs\NdbSite-hot-fix-Manual-PreBuild\workspace\src\NdbSite.UI\node_modules\node-sass
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Build failed

Any thoughts are much appreciated, Thanks.


问:
Fetching all products of a store using phpclassic/php-shopify SDK
I wrote this snippet in order to fetch all the products of a store,

using PHP Shopify SDK :

```<code>$productCount = $shopify->Product->count();
$limit = 250;
$totalpage = ceil($productCount/$limit);

for($i=1; $i<=$totalpage; $i++){

  $params = array(
    'limit' => '250',
    'page' => $i
  );

  $products = $shopify->Product->get($params);
}
</code>```

But I am getting only the first 50 products.
Do you have any suggestions on how to get them all?

Thanks in advance!

答:
You have to pass page_info instead Of page in params and you will get page info from responses like :

```<code>$page_info="";
for($i=1; $i<=$totalpage; $i++){
    $productResource = $shopify->Product();
    $params = array(
                'limit' => '250',
                'page_info' => $page_info
              );

    $product = $productResource->get($params);
    $nextPageProducts = $productResource->getNextPageParams();
    $page_info = $nextPageProducts['page_info'];
}
</code>```

for the first page, you have to pass in empty page_info.

Body:
I wrote this snippet in order to fetch all the products of a store,

using PHP Shopify SDK :

$productCount = $shopify->Product->count();
$limit = 250;
$totalpage = ceil($productCount/$limit);

for($i=1; $i<=$totalpage; $i++){

  $params = array(
    'limit' => '250',
    'page' => $i
  );

  $products = $shopify->Product->get($params);
}

But I am getting only the first 50 products.
Do you have any suggestions on how to get them all?

Thanks in advance!

Body:
You have to pass page_info instead Of page in params and you will get page info from responses like :

$page_info="";
for($i=1; $i<=$totalpage; $i++){
    $productResource = $shopify->Product();
    $params = array(
                'limit' => '250',
                'page_info' => $page_info
              );

    $product = $productResource->get($params);
    $nextPageProducts = $productResource->getNextPageParams();
    $page_info = $nextPageProducts['page_info'];
}

for the first page, you have to pass in empty page_info.


问:
How to use fa-plus-circle icon next to a text field using CSS and HTML?
I want to use fa-plus-circle item next to the text field as below. How can I achieve that using CSS and HTMl. I haven't use any CSS right now since it's affecting to all the other places that using fa-plus-circle.

.html

```<code> <div class="col-sm-6">
        <label class="col-sm-3 col-form-label" >My Name <span class="fa fa-star required-field"></span> </label>
         <input type="text" class="form-control"><span
             class="fa fa-plus-circle text-success cursor-point"></span>
    </div>
</code>```

答:
Try This way

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.0/css/font-awesome.css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" rel="stylesheet"/>

            <input type="text" class="form-control">

```

Body:
I want to use fa-plus-circle item next to the text field as below. How can I achieve that using CSS and HTMl. I haven't use any CSS right now since it's affecting to all the other places that using fa-plus-circle.

.html

        My Name
         <input type="text" class="form-control">

Body:
Try This way

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.0/css/font-awesome.css" rel="stylesheet"/>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-sm-6">
    <div class="d-flex align-items-center">
        <div class="flex-fill">
            <input type="text" class="form-control">
        </div>
        <span class="ml-3 fa fa-plus-circle text-success cursor-point"></span>
    </div>
</div>


问:
Eclipse text-search over all files?
I'm optimizing my code at the moment (android game), and wanted to replace all foreach(for(:)) with normal fors. Is there a way to find them all? Ctrl-F only looks through the current file and Ctrl-H doesn't seem to find any java constructs (not sure if right word: ifs, whiles, accessors etc.). Preferably without a plugin, but any answer accepted. It would also be nice if there would be a possibility to search for any string (* in Search).

TL;DR: Looking for way to find all foreaches in eclipse.

答: Right-Click on the project, choose search and you're able to replace all for-commands with a regular expression like for(.*;.*;.*) with other expressions you want to.

Title: Eclipse text-search over all files?


问:
Unable to fit text within div bubble
this is my first post on stack. I am having trouble getting my about section to fit in its proper bubble. You can see in the image as to what I am talking about. This is still a work in progress obviously so it may not look correct on all displays.(if you have tips to adjust for screen resolution please let me know as well. Thank you :) )

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
}

main {
  min-height: 100vh;
  background: linear-gradient(to right, #43cea2, #185a9d);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass {
  background: white;
  min-height: 80vh;
  width: 60%;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
  display: flex;
}

.dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
}

ul {
  list-style: none;
  text-decoration: none;
}

.link {
  display: flex;
  margin: 2rem 0rem;
  padding: 1rem 5rem;
  align-items: center;
}

.link a {
  padding: 0rem 2rem;
  color: white;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 25px;
  font-weight: 200px;
}

.bubble .link {
  display: block;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2));
  border-radius: 2rem;
  position: relative;
  color: white;
}

.bubble .link:hover {
  color: white;
  background: rgba(225, 255, 255, 0.2);
  letter-spacing: .2px;
}

.main {
  flex: 2;
}

.main h1 {
  color: white;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
  font-size: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-20%) translateY(-50%);
}

.name {
  font-weight: bold;
  font-size: 40px;
  padding: 2rem;
  color: white;
}

.icons a {
  text-decoration: none;
}

.icons a:hover {
  color: white;
  opacity: 0.5;
}

.mainabout {
  flex: 2;
}

.about-bubble {
  background: white;
  min-height: 60vh;
  width: 100%;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
  display: flex;
  transform: translateX(5%) translateY(1%);
}

.mainabout p {
  font-size: 15px;
  color: white;
  position: relative;
  line-height: 20px;
  transform: translateX(2%) translateY(5%);
}

.mainabout h1 {
  color: white;
  padding: 2rem;
  font-size: 40px;
  position: relative;
  text-align: center;
  transform: translateY(10%);
}

.next-bttn {
  color: #34e89e;
  position: relative;
  transform: translateX(-70%) translateY(93%);
  border-radius: 5px;
}

.next-bttn button {
  color: #43cea2;
  position: relative;
  border-radius: 5px;
  padding: 10px 20px;
  opacity: 0.5;
  font-weight: bold;
  border: none;
  background-color: transparent;
}
```
<pre class="lang-html prettyprint-override"><code><body>
  <main>
    <section class=" glass">
      <div class=" dashboard">
        <div class="name" <h1>First Name Last Name</h1>
        </div>
        <div class="bubble">
          <ul>
            <div class="links">
              <div class="link">
                <li>about</li>
              </div>

              <div class="link">
                <li>work</li>
              </div>

              <div class="link">
                <li>skills</li>
              </div>

              <div class="link">
                <li>resume</li>
              </div>

              <div class="link">
                <li>contact</li>
              </div>

          </ul>
          </div>
          <div class="icons">

              <img src="32px.png" alt="" width="32" height="32" />

              <img src="32x32.png" alt="" width="32" height="32" />

              <img src="codepen.png" alt="" width="32" height="32" />
          </div>
        </div>
      </div>
      <div class="mainabout">
        <h1>About Me</h1>

        <div class="about-bubble">
          <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae odio non ipsa perspiciatis vel perferendis at obcaecati repellat molestiae, autem quas dolores nostrum totam corrupti quod beatae, accusamus commodi enim?</p>
        </div>
      </div>
      <div class="next-bttn">
        <form action="work.html">
          <button style="background: white;">Next</button>
        </form>
      </div>
    </section>
</code>```

webpage

答:
Since the paragraph is enclose by about-bubble div class with width of 100% you can make
 have width of 90% so it won't overflow passthrough the bubble border

```<code>p {
width: 90%;
}
</code>```

now text would not overflow from rigth side but would overflow on bottom so the solution is use display: block; so it would become dynamic/ not overflowing when browser is resize for example this

.block {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0px;
  text-align: center;
  display: block;
  padding: 5px 5px 5px 5px;
  line-height: 150%;
  border: 2px solid #000000;
  border-radius: 5px;
  background-color: #FFA500;
  margin: auto auto auto auto;
  width: 50%;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class='block logoerror'>☠ Phasellus sed posuere tincidunt bibendum natoque ultricies si elementum tiam maximus tristique natoque suspendisse pretium proin vestibulum accumsan curabitur. Convallis augue velit erat sodales eget mauris dis curabitur suscipit si proin. Natoque auctor felis fermentum suspendisse neque nisi habitasse volutpat diam ad eleifend.</li><li>Feugiat platea a letius semper diam ex lorem netus nec efficitur posuere. Convallis consequat iaculis auctor dolor tristique nulla integer.</li><li>Platea rhoncus vivamus tempor inceptos per pharetra vehicula.. ☠</div><br></code>```

Title: Unable to fit text within div bubble

Body:
this is my first post on stack. I am having trouble getting my about section to fit in its proper bubble. You can see in the image as to what I am talking about. This is still a work in progress obviously so it may not look correct on all displays.(if you have tips to adjust for screen resolution please let me know as well. Thank you :) )

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
}

main {
  min-height: 100vh;
  background: linear-gradient(to right, #43cea2, #185a9d);
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass {
  background: white;
  min-height: 80vh;
  width: 60%;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
  display: flex;
}

.dashboard {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
}

ul {
  list-style: none;
  text-decoration: none;
}

.link {
  display: flex;
  margin: 2rem 0rem;
  padding: 1rem 5rem;
  align-items: center;
}

.link a {
  padding: 0rem 2rem;
  color: white;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 25px;
  font-weight: 200px;
}

.bubble .link {
  display: block;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2));
  border-radius: 2rem;
  position: relative;
  color: white;
}

.bubble .link:hover {
  color: white;
  background: rgba(225, 255, 255, 0.2);
  letter-spacing: .2px;
}

.main {
  flex: 2;
}

.main h1 {
  color: white;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
  font-size: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-20%) translateY(-50%);
}

.name {
  font-weight: bold;
  font-size: 40px;
  padding: 2rem;
  color: white;
}

.icons a {
  text-decoration: none;
}

.icons a:hover {
  color: white;
  opacity: 0.5;
}

.mainabout {
  flex: 2;
}

.about-bubble {
  background: white;
  min-height: 60vh;
  width: 100%;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
  border-radius: 2rem;
  display: flex;
  transform: translateX(5%) translateY(1%);
}

.mainabout p {
  font-size: 15px;
  color: white;
  position: relative;
  line-height: 20px;
  transform: translateX(2%) translateY(5%);
}

.mainabout h1 {
  color: white;
  padding: 2rem;
  font-size: 40px;
  position: relative;
  text-align: center;
  transform: translateY(10%);
}

.next-bttn {
  color: #34e89e;
  position: relative;
  transform: translateX(-70%) translateY(93%);
  border-radius: 5px;
}

.next-bttn button {
  color: #43cea2;
  position: relative;
  border-radius: 5px;
  padding: 10px 20px;
  opacity: 0.5;
  font-weight: bold;
  border: none;
  background-color: transparent;
}

        <div class="name"
First Name Last Name

about

work

skills

resume

contact

About Me

Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae odio non ipsa perspiciatis vel perferendis at obcaecati repellat molestiae, autem quas dolores nostrum totam corrupti quod beatae, accusamus commodi enim?

        <form action="work.html">
          <button style="background: white;">Next</button>
        </form>

webpage

Body:
Since the paragraph is enclose by about-bubble div class with width of 100% you can make <p> have width of 90% so it won't overflow passthrough the bubble border

p {
width: 90%;
}

now text would not overflow from rigth side but would overflow on bottom so the solution is use display: block; so it would become dynamic/ not overflowing when browser is resize for example this

.block {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0px;
  text-align: center;
  display: block;
  padding: 5px 5px 5px 5px;
  line-height: 150%;
  border: 2px solid #000000;
  border-radius: 5px;
  background-color: #FFA500;
  margin: auto auto auto auto;
  width: 50%;
}

<div class='block logoerror'>&#x2620; Phasellus sed posuere tincidunt bibendum natoque ultricies si elementum tiam maximus tristique natoque suspendisse pretium proin vestibulum accumsan curabitur. Convallis augue velit erat sodales eget mauris dis curabitur suscipit si proin. Natoque auctor felis fermentum suspendisse neque nisi habitasse volutpat diam ad eleifend.</li><li>Feugiat platea a letius semper diam ex lorem netus nec efficitur posuere. Convallis consequat iaculis auctor dolor tristique nulla integer.</li><li>Platea rhoncus vivamus tempor inceptos per pharetra vehicula.. &#x2620;</div><br>