Софт блокировки номеров на телефон
Блокировка в тел компаниях стоит денег. А есть инсталлируемая на телефон софта с помощью которой можно блокировать ненужные тел номера?
Перемещено Shaman007 из development
Перемещено Shaman007 из talks
Блокировка в тел компаниях стоит денег. А есть инсталлируемая на телефон софта с помощью которой можно блокировать ненужные тел номера?
Перемещено Shaman007 из development
Перемещено Shaman007 из talks
Не выдержал
Вот здесь, посмотрите что делается, как открывается редактор. Я в восторге. https://youtu.be/2qsmF8HHskg
Кто-нибудь когда-нибудь заглядывал сюда - https://interlisp.org/ , каково ваше мнение?
Здесь эти граждане в сборе https://youtu.be/x6-b_hazcyk
Пытаюсь define site для Opengenera, а оно никак
здесь всё как по Running Open Genera 2.0 on Linux
Standalone Site: Yes No
The local site is not the distribution site
Возможно ли из этого
Кс
-------------------------------------------------------------------
m
[1 + p Σ Ki τi / (1 – Ki)] - (1 – Кс) (1 – рτ)
i = 1
получить вот это
1
------------------------------------------------------
m
1 + p [Σ Ki τi / (1 – Ki) - (1 – Кс) τ] / Кс
i = 1
Граждане и гражданки ЛОР выручайте кто может с математикой. Интегрирование по частям. Пример
положим
x = u и
e^(x/2)dx = dv
тогда du = dx и
v = 2 e^(x/2) - вопрос как эта 2 перед e^(x/2) появилась, не похоже, что брали производную от e^(x/2).
integral xe^(x/2)dx = 2xe^(x/2) - 2 integral e^(x/2)dx = 2xe^(x/2) - 4e^(x/2) + C
Подскажите книжки в интернете где есть таблицы производных и интегралов.
Вот такой вопрос.
Тут нашёл старинную вещь
https://github.com/blakemcbride/PC-LISP
интересно знать, если кто этим пользуется.
И вот такая новая вещь
Тут https://common-lisp.net/project/bdb/qbook/mycl-util/api/function_005FMYCL-UTI..., этот странный нерабочий код, или я ошибаюсь
(defun mappend (fn &rest lsts)
"maps elements in list and finally appends all resulted lists."
(apply #'append (apply #'mapcar fn lsts)))
(mapcar 'car '((3 4) (5 6))) ;; работает
append &rest sequences
(apply 'append (apply 'mapcar 'car '((3 4) (5 6)))) ;; это не работает, второго листа нет
(mappend 'car '((3 4) (5 6))) ;; не работает
(mappend '* '(((3 4)) ((5 6)))) и эта не работат
(require 'debug)
(setq debug-on-quit t)
(setq x 2)
(setq n 3)
(setq r 1)
(while (< 0 n)
(setq n (- n 1))
(setq r (* r x))) ;; такая версия нравится
(defun power (x n)
(if (= 0 n)
1
(if (= 1 n)
x
(if (< 1 n)
(setq r (* r (power x (- n 1))))))))
(trace-function 'power) ;; Lisp nesting exceeds ‘max-lisp-eval-depth’ не понятно где я накосячил аж Emacs виснет.
(power 2 3)
;;Этот алгоритм, просто супер, но результат, зараза, 7.9999999998
(defun pow (x n)
(exp (* n (log x))))
(pow 2 3)
такие вот мысли. Нужно поменять expt x y в коде из-за её
If both arguments are integers and y is positive, the result is an integer; in this case, overflow causes truncation, so watch out. If x is a finite negative number and y is a finite non-integer, expt returns a NaN.
Код из trace.el.
;; (defun fact (n)
;; (if (= n 0) 1
;; (* n (fact (1- n)))))
;; fact
;;
;; (trace-function 'fact)
;; fact
;;
;; Now, evaluating this...
;;
;; (fact 4)
;; 24=============> это да
;;
;; ...will generate the following in *trace-buffer*: ==>ничего подобного
;;
;; 1 -> fact: n=4
;; | 2 -> fact: n=3
;; | | 3 -> fact: n=2
;; | | | 4 -> fact: n=1
;; | | | | 5 -> fact: n=0
;; | | | | 5 <- fact: 1
;; | | | 4 <- fact: 1
;; | | 3 <- fact: 2
;; | 2 <- fact: 6
;; 1 <- fact: 24
;;
не могу разобраться как этим trace пользоваться.
Ничего толком не нашёл. Мое дистро
GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22, modified by Debian
такой пакет eieio установлен а info отсутствует.
while, dolist не могу применить, подкиньте идей
(defun m-lst-PHI4 (lst-1 lst-2)
(if (eq (car lst-1) nil)
*lst-val-PHI4*
(progn
(push (+ (car lst-1) (car lst-2))
*lst-val-PHI4*)
(m-lst-PHI4 (setq lst-1 (cdr lst-1))
(setq lst-2 (cdr lst-2))))))
Ustanavlivayu po default i takaya
Command 'grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=Debian --force' returned non-zero exit status 1.
No space left on device. grub-install: error: failed to register the EFI boot entry: No space left on device.
v BIOS vse otklucheno, nikakih secure boot, i t.d. Vse perechital, nikak.
Partition dlya EFI 300MB, proboval vruchnuyu 2GB, to zhe samoe
Linux Mint 19.3 cannot install grub
«grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot».
mint@mint:~/Desktop$ sudo fdisk -l
Disk /dev/loop0: 1.9 GiB, 2014482432 bytes, 3934536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Device Start End Sectors Size Type
/dev/sda1 2048 3999743 3997696 1.9G EFI System
/dev/sda2 3999744 63999999 60000256 28.6G Linux filesystem
/dev/sda3 64000000 71999487 7999488 3.8G Linux swap
/dev/sda4 71999488 271998975 199999488 95.4G Linux filesystem
/dev/sda5 271998976 976771071 704772096 336.1G Linux filesystem
mint@mint:~/Desktop$ sudo fdisk -l | grep -i "disklabel"
Disklabel type: gpt
mint@mint:~/Desktop$ ls /sys/firmware/efi/
config_table fw_platform_size runtime systab
efivars fw_vendor runtime-map vars
mint@mint:~/Desktop$ efibootmgr
BootCurrent: 000B
Timeout: 2 seconds
BootOrder: 002A,0000,0001,0002,0006,0007,0008,0009,000A,000B,000C,000D,000E
Boot0000 BIOS Setup
Boot0001 Boot Menu
Boot0002 Diagnostic Screen
Boot0003 Recovery and Utility
Boot0004 Diagnostic Program
Boot0005 Diagnostic Progrogram ROM
Boot0006* Floppy Disk Drive:
Boot0007* Drive0 HDD:
Boot0008* Drive2 HDD:
Boot0009* Drive4 HDD:
Boot000A* Drive5 HDD:
Boot000B* CD/DVD Drive:
Boot000C* NETWORK:
Boot000D* USB HDD:
Boot000E* USB CD/DVD:
Boot000F* IDER BOOT CDROM
Boot0010* IDER BOOT Floppy
Boot0011* ATA HDD:
Boot0012 Intel(R) ME Setup
Boot0013 Intel(R) AMT Fast Call for Help
Boot0014* Erase Disk
Boot002A* ubuntu
mint@mint:~/Desktop$ sudo dmidecode -t 0
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.6 present.
Handle 0x000D, DMI type 0, 24 bytes
BIOS Information
Vendor: FUJITSU // Phoenix Technologies Ltd.
Version: Version 2.09
Release Date: 05/27/2013
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 3456 kB
Characteristics:
PCI is supported
PC Card (PCMCIA) is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
3.5"/720 kB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Function key-initiated network boot is supported
Targeted content distribution is supported
BIOS Revision: 2.9
Looks like sort of solution but does not work for me
https://www.linux.org/threads/get-the-error-the-grub-efi-amd64-signed-package...
sudo mkdir -p /mnt/boot/efi
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
sudo apt-get update
sudo apt-get install ubuntu-system-adjustments
apt install --reinstall grub-efi-amd64-signed
sudo os-prober
sudo update-grub
exit
chroot and apt-get commands not found.
Where Disk /dev/loop0 comes from, no idea.
Any ideas how to fix it are really welcomed.
I get some clue at
# efibootmgr -c -d /dev/sdb -p 1 -w -L debian -l '\EFI\debian\grubx64.efi'
BootCurrent: 0019
Timeout: 0 seconds
BootOrder: 0019,0006,0007,0008,0009,000A,000B,000C,000D,000E,000F,0010,0011,0012,0013
Boot0000 Setup
Boot0001 Boot Menu
Boot0002 Diagnostic Splash Screen
Boot0003 Startup Interrupt Menu
Boot0004 ME Configuration Menu
Boot0005 Rescue and Recovery
Boot0006* USB CD
Boot0007* USB FDD
Boot0008* ATAPI CD0
Boot0009* ATA HDD2
Boot000A* ATA HDD0
Boot000B* ATA HDD1
Boot000C* USB HDD
Boot000D* PCI LAN
Boot000E* ATAPI CD1
Boot000F* ATAPI CD2
Boot0010 Other CD
Boot0011* ATA HDD3
Boot0012* ATA HDD4
Boot0013 Other HDD
Boot0014* IDER BOOT CDROM
Boot0015* IDER BOOT Floppy
Boot0016* ATA HDD
Boot0017* ATAPI CD:
Boot0018* PCI LAN
Boot0019* debian
Там где не получается сообразить поставил много вопросительных знаков. Надеюсь получить ответы от профессионалов.
Распространителям зарубежной литературы здесь нечего делать, идите лесом.
(in-package :common-lisp-user)
(defpackage :first-app
(:use :clim :clim-lisp)
(:export first-app))
(in-package :first-app)
(defun av-test-display-screen (frame pane)
(declare (ignore frame))
(with-text-size (pane :large)
(fresh-line pane)
(present '(com-reset-clock-1) 'command :stream pane)
(fresh-line pane)))
(define-application-frame av-test ()
((own-window-p :initform nil)) ;; These slots will typically hold
;; any per-instance frame state.
(:menu-bar t)
(:panes
(screen :application
:display-time t
:display-function #'av-test-display-screen
:text-style (make-text-style :sans-serif :roman :normal))
(interactor :interactor :min-width 600)
(doc :pointer-documentation))
(:layouts
(defaults
(vertically ()
screen
interactor
doc))))
;; default-frame-top-level will also establish a simple restart
;; for abort, and bind the standard stream variables. *query-io* will be bound
;; to the value returned by frame-query-io
(defun reset-clock-1 (&key (stream *query-io*) (ow t))
;; ^^^ ^^^ ^ ^
;; keyword-name var k-n v
(multiple-value-bind (second minute hour day month)
(decode-universal-time (get-universal-time))
(declare (ignore second)) ;; self explanatory, var second is not used
;; anywhere
(restart-case
;; restartable-form
(progn
;; For instance, an accepting-values whose fields consist of
;; gadgets may appear in an ordinary CLIM
;; stream pane.
;; For example, accepting-values dialogs can be implemented by
;; using an encapsulating stream that tailors calls to accept and
;; prompt-for-accept in such a way that the output is captured and
;; formatted into a dialog that contains prompts and fields
;; that can be clicked on and modified by the user.
;; (For example, the behavior of accepting-values can be implemented
;; by creating a special class of stream that turns calls to
;; accept into fields of a dialog.) ????????????? HOW TO???
;; accepting-values (&optional stream &key own-window exit-boxes
;; initially-select-query-identifier modify-initial-query
;; resynchronize-every-pass resize-frame align-prompts label
;; scroll-bars x-position y-position width height command-table
;; frame-class) &body body [Macro]
(clim:accepting-values (stream :own-window ow)
;; (accepting-values (stream :own-window ow)
;; same as?????
;; (accepting-values
;; (&optional stream
;; &key own-window
;; what is ow) ??????????
(format stream "Enter the time~%")
(setq month (clim:accept 'integer :stream stream
:default month :prompt "Month"))
(terpri stream)
(setq day (clim:accept 'integer :stream stream
:default day :prompt "Day"))
(terpri stream)
(setq hour (clim:accept 'integer :stream stream
:default hour :prompt "Hour"))
(terpri stream)
(setq minute (clim:accept 'integer :stream stream
:default minute :prompt "Minute")))
;; This could be code to reset the time, but instead
;; we’re just printing it out
(format nil "New values: Month: ~D, Day: ~D, Time: ~D:~2,'0D."
month day hour minute))
;; case-name is abort, it names this restart.
(abort () (format nil "Time not set")))))
(define-av-test-command (com-reset-clock-1 :name t :menu nil) ()
(with-slots (own-window-p) clim:*application-frame*
(format t "Result: ~S~%" (multiple-value-list
;; (defun reset-clock-1
;; (&key (stream *query-io*) (ow t)) ...)
(reset-clock-1 :ow own-window-p))))
(finish-output *standard-output*)) ;; ^ ^
;; | av-test slot
;; no idea???
(defun first-app ()
(run-frame-top-level (make-application-frame 'av-test)))
Существует путь прописанный в
%echo &PATH /usr/local/sbin
%bin-bin
no such file
%bin-bin
работает
(defclass shape () ()
(:documentation "The foundation of all shapes."))
(defclass triangle (shape)
((a :reader side-a :initarg :side-a)
(b :reader side-b :initarg :side-b)
(c :reader side-c :initarg :side-c)))
;; Constructor
(defun make-triangle (a b c)
;; All sides should be represented as floats
(make-instance 'triangle :side-a (coerce a 'float)
:side-b (coerce b 'float)
:side-c (coerce c 'float)))
;; The function three-sides-to-angle will be useful in the bodies of the
;; methods that return the angles of the triangle.
;;; Return the angle A between adjacent sides b and c
;;; and opposite side a, given all sides of a triangle
;;; Law of Cosine: a^2 = b^2 + c^2 - 2 bc(cos A)
(defun three-sides-to-angle (a b c)
(acos (/ (- (+ (expt b 2)
(expt c 2))
(expt a 2))
(* 2 b c))))
;; Next, we define the methods for returning the individual angles of a
;; triangle.
(defmethod angle-A ((tri triangle))
(three-sides-to-angle
(side-a tri) (side-b tri) (side-c tri)))
(defmethod angle-B ((tri triangle))
(three-sides-to-angle
(side-b tri) (side-c tri) (side-a tri)))
(defmethod angle-C ((tri triangle))
(three-sides-to-angle
(side-c tri) (side-a tri) (side-b tri)))
;; We choose to define explicitly the generic functions for the operations
;; that are part of the exturnal protocol. The defgeneric forms indicate
;; that these three operations are intended to work on any shape:
(defgeneric dimensions (shape)
(:documentation "Returns list of side lengths."))
(defgeneric angles (shape)
(:documentation "Returns list of angles."))
(defgeneric area (shape)
(:documentation "Returns area of the shape."))
;; The three external operations that deal with existing triangles can be
;; defined in terms of the internal operations, without depending on any
;; knowledge of how those internal operations are implemented.
(defmethod dimensions ((tri triangle))
(list (side-a tri)
(side-b tri)
(side-c tri)))
(defmethod angles ((tri triangle))
(list (side-A tri)
(side-B tri)
(side-C tri)))
;;; Return the area of a triangle
;;; Algorithm is: area = ab(sin C) / 2
(defmethod area ((tri triangle))
(* (side-a tri) (side-b tri)
(sin (angle-C tri))
.5))
Как получить результаты от defmethod, defgeneric
CL-USER> (make-triangle 20 30 40)
#<TRIANGLE {100300A2B3}>
CL-USER> (three-sides-to-angle 20 30 40)
0.5053605
CL-USER> (three-sides-to-angle 60 40 80)
0.8127556
Попробовал, а он мне вот
CL-USER> (dimensions triangle)
; Evaluation aborted on #<UNBOUND-VARIABLE TRIANGLE {10030E3E33}>.
CL-USER> (dimensions 'triangle)
; Evaluation aborted on #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {100344E173}>.
CL-USER> (angle-A tri)
; Evaluation aborted on #<UNBOUND-VARIABLE TRI {10035E79E3}>.
Source: Sonya Keene Object-oriented programming in Common Lisp.
Меня интересует как это применять на практике, в умных книжках об этом ничего нет. Надеюсь что кто-нибудь знает.
HyperSpec
loop [name-clause] {variable-clause}* {main-clause}* => result*
name-clause::= named name
variable-clause::= with-clause | initial-final | for-as-clause
with-clause::= with var1 [type-spec] [= form1] {and var2 [type-spec] [= form2]}*
main-clause::= unconditional | accumulation | conditional | termination-test | initial-final
initial-final::= initially compound-form+ | finally compound-form+
unconditional::= {do | doing} compound-form+ | return {form | it}
accumulation::= list-accumulation | numeric-accumulation
list-accumulation::= {collect | collecting | append | appending | nconc | nconcing} {form | it}
[into simple-var]
numeric-accumulation::= {count | counting | sum | summing | }
maximize | maximizing | minimize | minimizing {form | it}
[into simple-var] [type-spec]
conditional::= {if | when | unless} form selectable-clause {and selectable-clause}*
[else selectable-clause {and selectable-clause}*]
[end]
selectable-clause::= unconditional | accumulation | conditional
termination-test::= while form | until form | repeat form | always form | never form | thereis form
for-as-clause::= {for | as} for-as-subclause {and for-as-subclause}*
for-as-subclause::= for-as-arithmetic | for-as-in-list | for-as-on-list | for-as-equals-then |
for-as-across | for-as-hash | for-as-package
for-as-arithmetic::= var [type-spec] for-as-arithmetic-subclause
for-as-arithmetic-subclause::= arithmetic-up | arithmetic-downto | arithmetic-downfrom
arithmetic-up::= [[{from | upfrom} form1 | {to | upto | below} form2 | by form3]]+
arithmetic-downto::= [[{{from form1}}1 | {{{downto | above} form2}}1 | by form3]]
arithmetic-downfrom::= [[{{downfrom form1}}1 | {to | downto | above} form2 | by form3]]
for-as-in-list::= var [type-spec] in form1 [by step-fun]
for-as-on-list::= var [type-spec] on form1 [by step-fun]
for-as-equals-then::= var [type-spec] = form1 [then form2]
for-as-across::= var [type-spec] across vector
for-as-hash::= var [type-spec] being {each | the}
{{hash-key | hash-keys} {in | of} hash-table
[using (hash-value other-var)] |
{hash-value | hash-values} {in | of} hash-table
[using (hash-key other-var)]}
for-as-package::= var [type-spec] being {each | the}
{symbol | symbols |
present-symbol | present-symbols |
external-symbol | external-symbols}
[{in | of} package]
type-spec::= simple-type-spec | destructured-type-spec
simple-type-spec::= fixnum | float | t | nil
destructured-type-spec::= of-type d-type-spec
d-type-spec::= type-specifier | (d-type-spec . d-type-spec)
var::= d-var-spec
var1::= d-var-spec
var2::= d-var-spec
other-var::= d-var-spec
d-var-spec::= simple-var | nil | (d-var-spec . d-var-spec)
(defun list-moment-left-A
(map left-moment-A *left-forces-A* *left-A*))
; in: DEFUN LIST-MOMENT-LEFT-A
; (SB-INT:NAMED-LAMBDA LIST-MOMENT-LEFT-A
; (MAP LEFT-MOMENT-A *LEFT-FORCES-A* *LEFT-A*)
; (BLOCK LIST-MOMENT-LEFT-A))
;
; caught STYLE-WARNING:
; The variable MAP is defined but never used.
;
; caught STYLE-WARNING:
; The variable LEFT-MOMENT-A is defined but never used.
;
; compilation unit finished
; caught 2 STYLE-WARNING conditions
LIST-MOMENT-LEFT-A
М-х slime работает на ура, хотя inferior-lisp в моём .emacs не прописан. Скажите где эти конфиги устанавливаются при установке этих пакетов?
| ← назад | следующие → |