This is simple example showing how to add auto-complete for your custom javascript object i.e context.
Open Monaco Editor Playground and paste snippet above into the right panel. Hit run and type context. in the right panel:
auto-complete with list of context's fields should appear
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from bs4 import BeautifulSoup | |
| def tru_crawler(max_pages): | |
| p = '&page=' | |
| page = 1 | |
| while page <= max_pages: | |
| url = 'http://www.therapy-directory.org.uk/search.php?search=Sheffield&distance=40&services[23]=on&services=23&business_type[individual]=on&uqs=626693' + p + str(page) | |
| code = requests.get(url) | |
| text = code.text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| xml = """<Create> | |
| <SubNetwork networkType="GSM" userLabel="BSC"> | |
| </SubNetwork> | |
| <SubNetwork networkType="WCDMA" userLabel="RNC01"> | |
| </SubNetwork> | |
| <SubNetwork networkType="IPRAN" userLabel="IPRAN"> | |
| </SubNetwork> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from lxml import html | |
| raw = '''<table class="list"> | |
| <tr> | |
| <th>Date(s)</th> | |
| <th>Sport</th> | |
| <th>Event</th> | |
| <th>Location</th> | |
| </tr> | |
| <tr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Linq.Expressions; | |
| using System.Runtime.CompilerServices; | |
| namespace BasicListView | |
| { | |
| public class BaseViewModel : INotifyPropertyChanged | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func (h *PolicyHandler) listUsersGrid(c echo.Context) error { | |
| tenant := c.Param("tenant") | |
| id := c.Param("id") | |
| gridParams := c.Get("gridParams").(*query.GridParams) | |
| policy, err := h.PolicyStorage.GetPolicy(tenant, id) | |
| if err != nil { | |
| return response.JSONError(c, http.StatusBadRequest, err) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func filterGridParamsPostgre(params *query.GridParams) (state bool, fullQuery string, fullSorter string) { | |
| var values []string | |
| var query string | |
| var sign string | |
| var complementArg string | |
| var connector string | |
| var queries string | |
| var fullQueries []string | |
| var argument string |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # listen to microphone | |
| pactl load-module module-loopback latency_msec=1 | |
| # stop listening | |
| pactl unload-module module-loopback |
OlderNewer