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
| // ── tools.scad ─────────────────────────────────────────────────────────── | |
| // Row format: ["new_name", "start_from", 4x4_matrix] | |
| // or ["new_name", 4x4_matrix] (parent defaults to "world") | |
| // | |
| // "world" (or any undefined name) resolves to identity — use it as root anchor | |
| // | |
| // API: | |
| // pos_matrix("name") → 4×4 matrix from inherited $positions root | |
| // goto("name", from=undef, transform=I) { } → place children at name's world pose | |
| // `from` defaults to the enclosing goto() frame |
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
| class RingBuffer{ | |
| i = 0; /*head pointer*/ | |
| j = 0; /*tail*/ | |
| data = null; | |
| buf_size = 0; | |
| constructor(_size, ArrType){ | |
| if(Number.isInteger(_size)){ | |
| ArrType = ArrType || Array; | |
| this.data = new ArrType(_size + 1); |
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
| /*single thread RingBuffer*/ | |
| template<typename T, int MAX_BUFFER_SIZE = 50> class RingBuffer{ | |
| public: | |
| T data[MAX_BUFFER_SIZE]; | |
| int i = 0; /*tail pointer*/ | |
| int j = 0; /*head*/ | |
| RingBuffer(){}; |
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
| #I didn't find any proper phone number parsers, so wrote one. | |
| import re | |
| #from . import data_utils | |
| PHONE_NUMBER_REGEX = re.compile("^\+?[0-9]+") | |
| country_code_num_digits_map = {"93": [9], "358": [10], "355": [9], "213": [9], "1": [10], "374": [6], "297": [7], "61": [9], "672": [6], "43": [11], "994": [9], "973": [8], "880": [10], "375": [9], "32": [9], "501": [7], "229": [6, 7, 8, 9], "387": [8], "55": [11], "246": [7], "359": [9], "226": [8], "855": [9], "235": [8], "56": [9], "86": [11], "57": [10], "682": [5], "506": [8], "385": [9], "357": [8], "420": [9], "45": [8], "670": [8], "593": [9], "20": [10], "503": [7], "44": [10], "268": [8], "500": [5], "298": [5], "691": [7], "33": [9], "594": [9], "689": [6], "241": [7], "995": [9], "49": [10], "233": [9], "30": [10], "299": [6], "590": [12], "852": [8], "36": [9], "91": [10], "62": [10], "98": [10], "353": [9], "972": [9], "39": [10], "81": [11], "7": [10], "686": [5], "383": [8], "965": [8], "371": [8], "961": [8], "231": [8], "218": [10], "370": [8], "3 |
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
| #include <fcntl.h> | |
| #include <sys/socket.h> | |
| #include <pthread.h> | |
| #include <map> | |
| #include <vector> | |
| #include <set> | |
| #include <errno.h> | |
| #include <ctime> | |
| #include <signal.h> | |
| #include <netinet/in.h> |
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
| package com.appsandlabs.allspark.widgets; | |
| import android.content.Context; | |
| import android.support.v4.view.PagerAdapter; | |
| import android.support.v4.view.ViewPager; | |
| import android.util.AttributeSet; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.LinearLayout; |