52 Matching Annotations
  1. Nov 2023
    1. Calderys Taicast F60 là một loại bê tông chịu lửa chịu nhiệt 1700 độ C chứa hàm lượng AI2O3 cao nhôm 60%, SiO2 30% có khả năng chịu axit, bazơ, trung tính.

      Bê tông chịu lửa 1700 độ C Calderys Taicast F60

    1. Calderys Taicast F56 chứa hàm lượng cao nhôm 50% là bê tông chịu lửa chịu nhiệt 1500 độ C có khả năng chịu axit, bazơ, trung tính dùng trong các nhà máy lò.

      Bê tông chịu lửa chịu nhiệt 1500 độ C Calderys Taicast F56

  2. May 2023
  3. Mar 2023
  4. Dec 2022
  5. Nov 2022
    1. Work in Progress¶ The HandwritingRecognition plugin uses cloud-based handwriting recogntion to recognize handwritten text from a selection or page layer in a user-specified language.

      This HandwritingRecognition plugin is a work-in-progress, but extremely exciting. They ran into some issues using Google's API; broke strokes into batches of 150 which would make reassembling more than a couple sentences a nontrivial problem.

    1. Currently Xournal++ does not have shortcuts/keybindings configurable in the preferences. However you can write your custom plugin to achieve exactly that.

      Must learn (and install) Lua (version >=5.3) to make custom shortcuts for Xournal++ via personally made plugins.

  6. Oct 2022
    1. Gạch chịu lửa samot (sa mốt) còn được gọi là gạch samot, gạch chịu nhiệt xây lò là một khối gốm chứa hợp kim nhôm (Al2O3) có khả năng chịu nhiệt độ cao.
  7. Sep 2022
  8. Jan 2022
    1. require require('file_path') でluaファイルをモジュールとして読み込みます。Neovimの runtimepath ディレクトリ内の lua ディレクトリに格納されているLuaファイルを require で読み込めます。 例 init.vim lua require('plugins') ~/.config/nvim/lua/plugins/init.lua を読み込みます。 lua require('plugins.completion') ~/.config/nvim/lua/plugins/completion.lua を読み込みます。 lua require('plugins/completion') . or / どっちでもOKです。 . のほうがよく見ます。
  9. Sep 2021
  10. Nov 2019
    1. regex library for lua. The string.match doesn't support some characters such as | so we need to use a more complete set.

    1. t = { name = "Bob" } function t:sayHello() -- note the 't:' part print("Hello" .. self.name) end t:sayHello() -- "Hello Bob"

      Implementing a class in lua.

    1. Nice example repo for lua.

    2. lint: @luacheck -q .

      We should probably run a lua linter at some point.

    1. -- patch os.getenv to not have existing environment variables interfere local _getenv = os.getenv os.getenv = function() end -- luacheck: ignore finally(function() os.getenv = _getenv -- luacheck: ignore end)

      patch os.getenv

    1. Tip: If you see require('mymodule') it is just an alternative syntax for require 'mymodule' the two perform identically and are interchangeable.
    2. Here is the code from main() using different variables, both work fine:

      How to import and call a function in a module in lua. You can also use the local MM = require('mymodule') syntax.

    3. This is the module, notice how the interface table mymodule is local and is returned on the last line of the module:

      How to return functions from a module in lua.

    1. It's good practice to keep file loaded by content_by_lua_file at a minimum and place all processing logic into external modules. This allows lua_code_cache to work its magic and simplifies your testing.

      Kinda counter intuitive but in a way it makes sense since require does built in caching and it makes it easier to test. This actually makes me feel a lot more comfortable making a utils area and just testing the functions in there.

    1. output = lustache:render("{{title}} spends {{calc}}", view_model)

      This will return a string of the rendered template.

  11. Oct 2019
    1. Is anyone aware of a lua http lib that supports keepalive?

      When sending a request you can pass the following keepalive settings which will keep the connection open:

      local http = require "resty.http"
      local httpc = http.new()
      httpc:connect("", 9081)
      local response, err = httpc:request({
        path = "/proxy" .. ngx.var.request_uri, 
        method = "HEAD",
        headers = ngx.req.get_headers(),
        keepalive_timeout = 60,
        keepalive_pool = 10,
    1. non-blocking internal requests

      Note ngx.location.capture only works on internal requests which means if you want to request an external endpoint dynamically then you need to setup something like below and call that internal endpoint instead of calling the external url directly.

      Say for example you want to send a request to / endpoint with the thirdparty url as part of the path (http:proxy-server.com/http://example.com).

            location /external/ {
              set $upstream "";
              rewrite_by_lua_file ./lua/get_external.lua;
              proxy_pass $upstream;

      Where lua/get_external.lua:

      -- strip beginning '/' from uri path
      ngx.var.upstream = ngx.var.request_uri:sub(2)
    1. set $template_root /usr/local/openresty/nginx/html/templates;

      We should probably use this instead of root since root has other implications.

  12. Sep 2019
    1. This API function (as well as ngx.location.capture_multi) always buffers the whole response body of the subrequest in memory. Thus, you should use cosockets and streaming processing instead if you have to handle large subrequest responses.

      So my interpretation of this is the request is issued, the entire response is buffered in memory, then res.headers is read from that buffer. I wonder if there is a way to cut off this buffer and close the connection early such that only the headers make it into the buffer for responses that are very large.

    2. Network I/O operations in user code should only be done through the Nginx Lua API calls as the Nginx event loop may be blocked and performance drop off dramatically otherwise. Disk operations with relatively small amount of data can be done using the standard Lua io library but huge file reading and writing should be avoided wherever possible as they may block the Nginx process significantly. Delegating all network and disk I/O operations to Nginx's subrequests (via the ngx.location.capture method and similar) is strongly recommended for maximum performance.

      Very important ngx.location.capture does not block in nginx.

    1. local LuaSocket = require("socket") client = LuaSocket.connect("example.com", 80) client:send("GET /login.php?login=admin&pass=admin HTTP/1.0\r\nHost: example.com\r\n\r\n") while true do s, status, partial = client:receive('*a') print(s or partial) if status == "closed" then break end end client:close()

      How to issue an http request through a socket in lua.

    1. header_filter_by_lua 'ngx.header.Foo = "blah"';

      Not sure why you wouldn't use raw nginx for this.

    2. access_by_lua ' local res = ngx.location.capture("/auth") if res.status == ngx.HTTP_OK then return end if res.status == ngx.HTTP_FORBIDDEN then ngx.exit(res.status) end ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)

      Potentially something like this for getting the content-type response header and using that to decide which proxy server to send the original request to.

    3. The Lua code cache can be temporarily disabled during development by switching lua_code_cache off

      For dev mode switch the lua file cache off.

  13. Jul 2017
    1. since lua-resty-redis can not be used in set_by_lua*, dynamic routing based on redis should be impelemented in the access_by_lua block

  14. Apr 2017
  15. terralang.org terralang.org
    1. Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language
  16. Feb 2017
  17. Jan 2017
  18. Dec 2016
  19. Sep 2016
    1. I don't know what then, I just remember somehow. Around the same time I install renoise, I also install vim. Then in renoise I go to Help>Show Preferences Folder.... Then I right click on Config.xml, then edit in VIM. Then I /search for showscr or something like that. Change false into true, done. On windows sometimes I'm lazy and I just modify the one shortcut that I use to have --scripting-terminal or something as an argument. Also: if you really do a lot of (re)installs I would advise to back up your Config.xml anyway, just like the KeyBindings.xml, TemplateSong.xrns, etc, it'll save you a lot of time right?

      How to enable Scripting Tools in Renoise Tools menu