| Package | Description |
|---|---|
| site.mtnsj.core |
The core package contains classes for network messages like
Block and
Transaction , peer connectivity via PeerGroup ,
and block chain management. |
| site.mtnsj.core.listeners | |
| site.mtnsj.jni | |
| site.mtnsj.protocols.channels |
Micropayment channels allow for rapid tiny payments to be made to a third party once a channel has been set up, using
some of the advanced features of the Bitcoin protocol.
|
| site.mtnsj.protocols.payments |
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses
and authentication.
|
| site.mtnsj.script |
Classes for working with and executing Bitcoin script programs, as embedded in inputs and outputs.
|
| site.mtnsj.signers |
Transaction signers know how to calculate signatures over transactions in different contexts, for example, using
local private keys or fetching them from remote servers.
|
| site.mtnsj.wallet |
Classes that support the
Wallet , which knows how to find and save transactions relevant to
a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended
in various ways, please refer to the website for documentation on how to use it. |
| site.mtnsj.wallet.listeners |
| Modifier and Type | Class and Description |
|---|---|
class |
TransactionLockRequest
Created by Hash Engineering Solutions on 2/22/2015.
|
| Modifier and Type | Field and Description |
|---|---|
static Comparator<Transaction> |
Transaction.SORT_TX_BY_HEIGHT
A comparator that can be used to sort transactions by their chain height.
|
static Comparator<Transaction> |
Transaction.SORT_TX_BY_UPDATE_TIME
A comparator that can be used to sort transactions by their updateTime field.
|
| Modifier and Type | Method and Description |
|---|---|
Transaction |
TransactionInput.getConnectedTransaction()
Returns the connected transaction, assuming the input was connected with
TransactionInput.connect(TransactionOutput) or variants at some point. |
Transaction |
TransactionConfidence.getOverridingTransaction()
If this transaction has been overridden by a double spend (is dead), this call returns the overriding transaction.
|
Transaction |
TransactionOutput.getParentTransaction()
Returns the transaction that owns this output.
|
Transaction |
TransactionInput.getParentTransaction() |
Transaction |
RejectedTransactionException.getTransaction()
Return the original Transaction object whose broadcast was rejected.
|
Transaction |
MessageSerializer.makeTransaction(byte[] payloadBytes)
Make a transaction from the payload.
|
Transaction |
MessageSerializer.makeTransaction(byte[] payloadBytes,
int offset)
Make a transaction from the payload.
|
abstract Transaction |
MessageSerializer.makeTransaction(byte[] payloadBytes,
int offset,
int length,
byte[] hash)
Make a transaction from the payload.
|
Transaction |
BitcoinSerializer.makeTransaction(byte[] payloadBytes,
int offset,
int length,
byte[] hash)
Make a transaction from the payload.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
TransactionBroadcast.broadcast() |
com.google.common.util.concurrent.ListenableFuture<List<Transaction>> |
Peer.downloadDependencies(Transaction tx)
Returns a future that wraps a list of all transactions that the given transaction depends on, recursively.
|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
TransactionBroadcast.future() |
Map<Sha256Hash,Transaction> |
FilteredBlock.getAssociatedTransactions()
Gets the set of transactions which were provided using provideTransaction() which match in getTransactionHashes()
|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
Peer.getPeerMempoolTransaction(Sha256Hash hash)
Asks the connected peer for the given transaction from its memory pool.
|
Map<Sha256Hash,Transaction> |
TransactionBag.getTransactionPool(WalletTransaction.Pool pool)
Returns transactions from a specific pool.
|
List<Transaction> |
StoredUndoableBlock.getTransactions()
Get the full list of transactions if it is stored, otherwise null.
|
List<Transaction> |
Block.getTransactions()
Returns an immutable list of transactions held in this block, or null if this object represents just a header.
|
| Modifier and Type | Method and Description |
|---|---|
void |
InventoryMessage.addTransaction(Transaction tx) |
void |
Block.addTransaction(Transaction t)
Adds a transaction to this block.
|
boolean |
BloomFilter.applyAndUpdate(Transaction tx) |
TransactionBroadcast |
TransactionBroadcaster.broadcastTransaction(Transaction tx)
Broadcast the given transaction on the network
|
TransactionBroadcast |
PeerGroup.broadcastTransaction(Transaction tx)
Calls
PeerGroup.broadcastTransaction(Transaction,int,boolean) with getMinBroadcastConnections() as the number
of connections to wait for before commencing broadcast. |
TransactionBroadcast |
TransactionBroadcaster.broadcastTransaction(Transaction tx,
boolean isSwiftX) |
TransactionBroadcast |
PeerGroup.broadcastTransaction(Transaction tx,
boolean isSwiftX)
Calls
PeerGroup.broadcastTransaction(Transaction,int,boolean) with getMinBroadcastConnections() as the number
of connections to wait for before commencing broadcast. |
TransactionBroadcast |
PeerGroup.broadcastTransaction(Transaction tx,
int minConnections,
boolean isSwiftX)
Given a transaction, sends it un-announced to one peer and then waits for it to be received back from other
peers.
|
TransactionInput.ConnectionResult |
TransactionInput.connect(Transaction transaction,
TransactionInput.ConnectMode mode)
Connects this input to the relevant output of the referenced transaction.
|
static TransactionBroadcast |
TransactionBroadcast.createMockBroadcast(Transaction tx,
com.google.common.util.concurrent.SettableFuture<Transaction> future) |
com.google.common.util.concurrent.ListenableFuture<List<Transaction>> |
Peer.downloadDependencies(Transaction tx)
Returns a future that wraps a list of all transactions that the given transaction depends on, recursively.
|
protected com.google.common.util.concurrent.ListenableFuture<Object> |
Peer.downloadDependenciesInternal(int maxDepth,
int depth,
Transaction tx,
Object marker,
List<Transaction> results) |
EnumSet<Script.VerifyFlag> |
NetworkParameters.getTransactionVerificationFlags(Block block,
Transaction transaction,
VersionTally tally,
Integer height)
The flags indicating which script validation tests should be applied to
the given transaction.
|
void |
Peer.notifyLock(Transaction tx) |
protected void |
Peer.processTransaction(Transaction tx) |
boolean |
FilteredBlock.provideTransaction(Transaction tx)
Provide this FilteredBlock with a transaction which is in its Merkle tree.
|
void |
TransactionConfidence.setOverridingTransaction(Transaction overridingTransaction)
Called when the transaction becomes newly dead, that is, we learn that one of its inputs has already been spent
in such a way that the double-spending transaction takes precedence over this one.
|
static InventoryMessage |
InventoryMessage.with(Transaction... txns)
Creates a new inv message for the given transactions.
|
| Modifier and Type | Method and Description |
|---|---|
TransactionInput.ConnectionResult |
TransactionInput.connect(Map<Sha256Hash,Transaction> transactions,
TransactionInput.ConnectMode mode)
Connects this input to the relevant output of the referenced transaction if it's in the given map.
|
static TransactionBroadcast |
TransactionBroadcast.createMockBroadcast(Transaction tx,
com.google.common.util.concurrent.SettableFuture<Transaction> future) |
protected com.google.common.util.concurrent.ListenableFuture<Object> |
Peer.downloadDependenciesInternal(int maxDepth,
int depth,
Transaction tx,
Object marker,
List<Transaction> results) |
| Constructor and Description |
|---|
RejectedTransactionException(Transaction tx,
RejectMessage rejectMessage) |
TransactionInput(NetworkParameters params,
Transaction parentTransaction,
byte[] scriptBytes)
Creates an input that connects to nothing - used only in creation of coinbase transactions.
|
TransactionInput(NetworkParameters params,
Transaction parentTransaction,
byte[] payload,
int offset)
Deserializes an input message.
|
TransactionInput(NetworkParameters params,
Transaction parentTransaction,
byte[] payload,
int offset,
MessageSerializer serializer)
Deserializes an input message.
|
TransactionInput(NetworkParameters params,
Transaction parentTransaction,
byte[] scriptBytes,
TransactionOutPoint outpoint) |
TransactionInput(NetworkParameters params,
Transaction parentTransaction,
byte[] scriptBytes,
TransactionOutPoint outpoint,
Coin value) |
TransactionOutPoint(NetworkParameters params,
long index,
Transaction fromTx) |
TransactionOutput(NetworkParameters params,
Transaction parent,
byte[] payload,
int offset)
Deserializes a transaction output message.
|
TransactionOutput(NetworkParameters params,
Transaction parent,
byte[] payload,
int offset,
MessageSerializer serializer)
Deserializes a transaction output message.
|
TransactionOutput(NetworkParameters params,
Transaction parent,
Coin value,
Address to)
Creates an output that sends 'value' to the given address (public key hash).
|
TransactionOutput(NetworkParameters params,
Transaction parent,
Coin value,
byte[] scriptBytes) |
TransactionOutput(NetworkParameters params,
Transaction parent,
Coin value,
ECKey to)
Creates an output that sends 'value' to the given public key using a simple CHECKSIG script (no addresses).
|
| Constructor and Description |
|---|
Block(NetworkParameters params,
long version,
Sha256Hash prevBlockHash,
Sha256Hash merkleRoot,
long time,
long difficultyTarget,
long nonce,
List<Transaction> transactions)
Construct a block initialized with all the given fields.
|
StoredUndoableBlock(Sha256Hash hash,
List<Transaction> transactions) |
| Modifier and Type | Method and Description |
|---|---|
void |
OnTransactionBroadcastListener.onTransaction(Peer peer,
Transaction t)
Called when a new transaction is broadcast over the network.
|
void |
AbstractPeerEventListener.onTransaction(Peer peer,
Transaction t)
Deprecated.
|
void |
TransactionConfidenceEventListener.onTransactionConfidenceChanged(Wallet wallet,
Transaction tx)
Called when a transaction changes its confidence level.
|
void |
TransactionReceivedInBlockListener.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new block that contains a relevant transaction. |
void |
AbstractBlockChainListener.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
NativeWalletEventListener.onCoinsReceived(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance) |
void |
NativeWalletCoinsReceivedEventListener.onCoinsReceived(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance) |
void |
NativeWalletEventListener.onCoinsSent(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance) |
void |
NativeWalletCoinsSentEventListener.onCoinsSent(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance) |
void |
NativePeerEventListener.onTransaction(Peer peer,
Transaction t) |
void |
NativeWalletEventListener.onTransactionConfidenceChanged(Wallet wallet,
Transaction tx) |
void |
NativeTransactionConfidenceEventListener.onTransactionConfidenceChanged(Wallet wallet,
Transaction tx) |
void |
NativeBlockChainListener.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset) |
| Modifier and Type | Field and Description |
|---|---|
protected Transaction |
PaymentChannelServerState.contract |
| Modifier and Type | Method and Description |
|---|---|
Transaction |
PaymentChannelV1ClientState.getCompletedRefundTransaction()
Once the servers signature over the refund transaction has been received and provided using
PaymentChannelV1ClientState.provideRefundSignature(byte[], KeyParameter) then this
method can be called to receive the now valid and broadcastable refund transaction. |
Transaction |
PaymentChannelV2ClientState.getContract() |
Transaction |
PaymentChannelV1ClientState.getContract()
Returns the transaction that locks the money to the agreement of both parties.
|
Transaction |
PaymentChannelServerState.getContract()
Gets the multisig contract which was used to initialize this channel
|
abstract Transaction |
PaymentChannelClientState.getContract()
Gets the contract which was used to initialize this channel
|
protected Transaction |
PaymentChannelV2ClientState.getContractInternal() |
protected Transaction |
PaymentChannelV1ClientState.getContractInternal() |
protected abstract Transaction |
PaymentChannelClientState.getContractInternal()
Gets the contract without changing the state machine
|
Transaction |
PaymentChannelV1ClientState.getIncompleteRefundTransaction()
Returns a partially signed (invalid) refund transaction that should be passed to the server.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
PaymentChannelV2ServerState.close() |
com.google.common.util.concurrent.ListenableFuture<Transaction> |
PaymentChannelV1ServerState.close()
Closes this channel and broadcasts the highest value payment transaction on the network.
|
abstract com.google.common.util.concurrent.ListenableFuture<Transaction> |
PaymentChannelServerState.close()
Closes this channel and broadcasts the highest value payment transaction on the network.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
PaymentChannelClientState.isSettlementTransaction(Transaction tx)
Returns true if the tx is a valid settlement transaction.
|
com.google.common.util.concurrent.ListenableFuture<PaymentChannelServerState> |
PaymentChannelServerState.provideContract(Transaction contract)
Called when the client provides the multi-sig contract.
|
byte[] |
PaymentChannelV1ServerState.provideRefundTransaction(Transaction refundTx,
byte[] clientMultiSigPubKey)
Called when the client provides the refund transaction.
|
protected void |
PaymentChannelV2ServerState.verifyContract(Transaction contract) |
protected void |
PaymentChannelServerState.verifyContract(Transaction contract)
Verifies that the given contract meets a set of extra requirements
|
| Modifier and Type | Method and Description |
|---|---|
static List<Transaction> |
PaymentProtocol.parseTransactionsFromPaymentMessage(NetworkParameters params,
org.bitcoin.protocols.payments.Protos.Payment paymentMessage)
Parse transactions from payment message.
|
| Modifier and Type | Method and Description |
|---|---|
static org.bitcoin.protocols.payments.Protos.Payment |
PaymentProtocol.createPaymentMessage(List<Transaction> transactions,
Coin refundAmount,
Address refundAddress,
String memo,
byte[] merchantData)
Create a payment message with one standard pay to address output.
|
static org.bitcoin.protocols.payments.Protos.Payment |
PaymentProtocol.createPaymentMessage(List<Transaction> transactions,
List<org.bitcoin.protocols.payments.Protos.Output> refundOutputs,
String memo,
byte[] merchantData)
Create a payment message.
|
org.bitcoin.protocols.payments.Protos.Payment |
PaymentSession.getPayment(List<Transaction> txns,
Address refundAddr,
String memo)
Generates a Payment message based on the information in the PaymentRequest.
|
com.google.common.util.concurrent.ListenableFuture<PaymentProtocol.Ack> |
PaymentSession.sendPayment(List<Transaction> txns,
Address refundAddr,
String memo)
Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Script.correctlySpends(Transaction txContainingThis,
long scriptSigIndex,
Script scriptPubKey)
Deprecated.
Use
Script.correctlySpends(site.mtnsj.core.Transaction, long, site.mtnsj.script.Script, java.util.Set)
instead so that verification flags do not change as new verification options
are added. |
void |
Script.correctlySpends(Transaction txContainingThis,
long scriptSigIndex,
Script scriptPubKey,
Set<Script.VerifyFlag> verifyFlags)
Verifies that this script (interpreted as a scriptSig) correctly spends the given scriptPubKey.
|
static void |
Script.executeScript(Transaction txContainingThis,
long index,
Script script,
LinkedList<byte[]> stack,
boolean enforceNullDummy)
|
static void |
Script.executeScript(Transaction txContainingThis,
long index,
Script script,
LinkedList<byte[]> stack,
Set<Script.VerifyFlag> verifyFlags)
Exposes the script interpreter.
|
| Modifier and Type | Field and Description |
|---|---|
Transaction |
TransactionSigner.ProposedTransaction.partialTx |
| Constructor and Description |
|---|
ProposedTransaction(Transaction partialTx) |
| Modifier and Type | Field and Description |
|---|---|
protected Transaction |
DefaultRiskAnalysis.nonFinal |
Transaction |
Wallet.SendResult.tx
The Bitcoin transaction message that moves the money.
|
Transaction |
SendRequest.tx
A transaction, probably incomplete, that describes the outline of what you want to do.
|
protected Transaction |
DefaultRiskAnalysis.tx |
| Modifier and Type | Field and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
Wallet.SendResult.broadcastComplete
A future that will complete once the tx message has been successfully broadcast to the network.
|
protected List<Transaction> |
DefaultRiskAnalysis.dependencies |
protected Map<Sha256Hash,Transaction> |
Wallet.transactions |
protected Map<com.google.protobuf.ByteString,Transaction> |
WalletProtobufSerializer.txMap |
| Modifier and Type | Method and Description |
|---|---|
Transaction |
Wallet.createSend(Address address,
Coin value)
Statelessly creates a transaction that sends the given value to address.
|
Transaction |
DefaultRiskAnalysis.getNonFinal()
Returns the transaction that was found to be non-final, or null.
|
Transaction |
DefaultRiskAnalysis.getNonStandard()
Returns the transaction that was found to be non-standard, or null.
|
Transaction |
WalletTransaction.getTransaction() |
Transaction |
Wallet.getTransaction(Sha256Hash hash)
Returns a transaction object given its hash, if it exists in this wallet, or null otherwise.
|
Transaction |
Wallet.sendCoins(Peer peer,
SendRequest request)
Sends coins to the given address, via the given
Peer . |
Transaction |
Wallet.sendCoinsOffline(SendRequest request)
Sends coins to the given address but does not broadcast the resulting pending transaction.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<List<Transaction>> |
Wallet.doMaintenance(org.spongycastle.crypto.params.KeyParameter aesKey,
boolean signAndSend)
A wallet app should call this from time to time in order to let the wallet craft and send transactions needed
to re-organise coins internally.
|
Collection<Transaction> |
Wallet.getPendingTransactions()
Returns an immutable view of the transactions currently waiting for network confirmations.
|
List<Transaction> |
Wallet.getRecentTransactions(int numTransactions,
boolean includeDead)
Returns an list of N transactions, ordered by increasing age.
|
Map<Sha256Hash,Transaction> |
Wallet.getTransactionPool(WalletTransaction.Pool pool)
Returns transactions from a specific pool.
|
Set<Transaction> |
Wallet.getTransactions(boolean includeDead)
Returns a set of all transactions in the wallet.
|
List<Transaction> |
Wallet.getTransactionsByTime()
Returns all non-dead, active transactions ordered by recency.
|
com.google.common.util.concurrent.ListenableFuture<List<Transaction>> |
Wallet.maybeDoMaintenance(org.spongycastle.crypto.params.KeyParameter aesKey,
boolean andSend)
Deprecated.
Renamed to doMaintenance
|
| Modifier and Type | Method and Description |
|---|---|
static SendRequest |
SendRequest.childPaysForParent(Wallet wallet,
Transaction parentTransaction,
Coin feeRaise)
Construct a SendRequest for a CPFP (child-pays-for-parent) transaction.
|
void |
Wallet.commitTx(Transaction tx)
Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs
the onCoinsSent/onCoinsReceived event listener.
|
RiskAnalysis |
RiskAnalysis.Analyzer.create(Wallet wallet,
Transaction tx,
List<Transaction> dependencies) |
DefaultRiskAnalysis |
DefaultRiskAnalysis.Analyzer.create(Wallet wallet,
Transaction tx,
List<Transaction> dependencies) |
void |
FilteringCoinSelector.excludeOutputsSpentBy(Transaction tx) |
static SendRequest |
SendRequest.forTx(Transaction tx)
Simply wraps a pre-built incomplete transaction provided by you.
|
boolean |
Wallet.isPendingTransactionLockRelevant(Transaction tx) |
boolean |
Wallet.isPendingTransactionRelevant(Transaction tx)
This method is used by a
Peer to find out if a transaction that has been announced is interesting,
that is, whether we should bother downloading its dependencies and exploring the transaction to decide how
risky it is. |
static boolean |
DefaultCoinSelector.isSelectable(Transaction tx) |
static boolean |
InstantXCoinSelector.isSelectable(Transaction tx,
boolean usingInstantX) |
static DefaultRiskAnalysis.RuleViolation |
DefaultRiskAnalysis.isStandard(Transaction tx)
Checks if a transaction is considered "standard" by Bitcoin Core's IsStandardTx and AreInputsStandard
functions.
|
boolean |
Wallet.isTransactionRelevant(Transaction tx)
Returns true if the given transaction sends coins to any of our keys, or has inputs spending any of our outputs,
and also returns true if tx has inputs that are spending outputs which are
not ours but which are spent by pending transactions.
|
boolean |
Wallet.isTransactionRisky(Transaction tx,
List<Transaction> dependencies)
Given a transaction and an optional list of dependencies (recursive/flattened), returns true if the given
transaction would be rejected by the analyzer, or false otherwise.
|
boolean |
Wallet.maybeCommitTx(Transaction tx)
Calls
Wallet.commitTx(site.mtnsj.core.Transaction) if tx is not already in the pending pool |
protected void |
Wallet.queueOnCoinsReceived(Transaction tx,
Coin balance,
Coin newBalance) |
protected void |
Wallet.queueOnCoinsSent(Transaction tx,
Coin prevBalance,
Coin newBalance) |
void |
Wallet.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new block that sends coins to one of our addresses or
spends coins from one of our addresses (note that a single transaction can do both). |
void |
Wallet.receiveLock(Transaction tx) |
void |
Wallet.receivePending(Transaction tx,
List<Transaction> dependencies)
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
and want to record it.
|
void |
Wallet.receivePending(Transaction tx,
List<Transaction> dependencies,
boolean overrideIsRelevant)
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
and want to record it.
|
protected boolean |
InstantXCoinSelector.shouldSelect(Transaction tx) |
protected boolean |
DefaultCoinSelector.shouldSelect(Transaction tx)
Sub-classes can override this to just customize whether transactions are usable, but keep age sorting.
|
protected boolean |
AllowUnconfirmedCoinSelector.shouldSelect(Transaction tx) |
| Modifier and Type | Method and Description |
|---|---|
RiskAnalysis |
RiskAnalysis.Analyzer.create(Wallet wallet,
Transaction tx,
List<Transaction> dependencies) |
DefaultRiskAnalysis |
DefaultRiskAnalysis.Analyzer.create(Wallet wallet,
Transaction tx,
List<Transaction> dependencies) |
boolean |
Wallet.isTransactionRisky(Transaction tx,
List<Transaction> dependencies)
Given a transaction and an optional list of dependencies (recursive/flattened), returns true if the given
transaction would be rejected by the analyzer, or false otherwise.
|
void |
Wallet.receivePending(Transaction tx,
List<Transaction> dependencies)
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
and want to record it.
|
void |
Wallet.receivePending(Transaction tx,
List<Transaction> dependencies,
boolean overrideIsRelevant)
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
and want to record it.
|
| Constructor and Description |
|---|
WalletTransaction(WalletTransaction.Pool pool,
Transaction transaction) |
| Modifier and Type | Method and Description |
|---|---|
void |
WalletCoinsReceivedEventListener.onCoinsReceived(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance)
This is called when a transaction is seen that sends coins to this wallet, either because it
was broadcast across the network or because a block was received.
|
void |
AbstractWalletEventListener.onCoinsReceived(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance)
Deprecated.
|
void |
WalletCoinsSentEventListener.onCoinsSent(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance)
This is called when a transaction is seen that sends coins from this wallet, either
because it was broadcast across the network or because a block was received.
|
void |
AbstractWalletEventListener.onCoinsSent(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance)
Deprecated.
|
void |
AbstractWalletEventListener.onTransactionConfidenceChanged(Wallet wallet,
Transaction tx)
Deprecated.
|
Copyright © 2019. All rights reserved.


This include file declares functions that classify Unicode characters
and that test whether Unicode characters have specific properties.
The classification assigns a “general category” to every Unicode
character. This is similar to the classification provided by ISO C in
<wctype.h>
.
Properties are the data that guides various text processing algorithms
in the presence of specific Unicode characters.
Every Unicode character or code point has a general category assigned
to it. This classification is important for most algorithms that work on
Unicode text.
The GNU libunistring library provides two kinds of API for working with
general categories. The object oriented API uses a variable to denote
every predefined general category value or combinations thereof. The
low-level API uses a bit mask instead. The advantage of the object oriented
API is that if only a few predefined general category values are used,
the data tables are relatively small. When you combine general category
values (using uc_general_category_or
, uc_general_category_and
,
or uc_general_category_and_not
), or when you use the low level
bit masks, a big table is used thats holds the complete general category
information for all Unicode characters.
- Type: uc_general_category_t
This data type denotes a general category value. It is an immediate type that
can be copied by simple assignment, without involving memory allocation. It is
not an array type.
The following are the predefined general category value. Additional general
categories may be added in the future.
The UC_CATEGORY_*
constants reflect the systematic general category
values assigned by the Unicode Consortium. Whereas the other UC_*
macros are aliases, for use when readable code is preferred.
- Constant: uc_general_category_t UC_CATEGORY_L
- Macro: uc_general_category_t UC_LETTER
This represents the general category “Letter”.
- Constant: uc_general_category_t UC_CATEGORY_LC
- Macro: uc_general_category_t UC_CASED_LETTER
- Constant: uc_general_category_t UC_CATEGORY_Lu
- Macro: uc_general_category_t UC_UPPERCASE_LETTER
This represents the general category “Letter, uppercase”.
- Constant: uc_general_category_t UC_CATEGORY_Ll
- Macro: uc_general_category_t UC_LOWERCASE_LETTER
This represents the general category “Letter, lowercase”.
- Constant: uc_general_category_t UC_CATEGORY_Lt
- Macro: uc_general_category_t UC_TITLECASE_LETTER
This represents the general category “Letter, titlecase”.
- Constant: uc_general_category_t UC_CATEGORY_Lm
- Macro: uc_general_category_t UC_MODIFIER_LETTER
This represents the general category “Letter, modifier”.
- Constant: uc_general_category_t UC_CATEGORY_Lo
- Macro: uc_general_category_t UC_OTHER_LETTER
This represents the general category “Letter, other”.
- Constant: uc_general_category_t UC_CATEGORY_M
- Macro: uc_general_category_t UC_MARK
This represents the general category “Marker”.
- Constant: uc_general_category_t UC_CATEGORY_Mn
- Macro: uc_general_category_t UC_NON_SPACING_MARK
This represents the general category “Marker, nonspacing”.
- Constant: uc_general_category_t UC_CATEGORY_Mc
- Macro: uc_general_category_t UC_COMBINING_SPACING_MARK
This represents the general category “Marker, spacing combining”.
- Constant: uc_general_category_t UC_CATEGORY_Me
- Macro: uc_general_category_t UC_ENCLOSING_MARK
This represents the general category “Marker, enclosing”.
- Constant: uc_general_category_t UC_CATEGORY_N
- Macro: uc_general_category_t UC_NUMBER
This represents the general category “Number”.
- Constant: uc_general_category_t UC_CATEGORY_Nd
- Macro: uc_general_category_t UC_DECIMAL_DIGIT_NUMBER
This represents the general category “Number, decimal digit”.
- Constant: uc_general_category_t UC_CATEGORY_Nl
- Macro: uc_general_category_t UC_LETTER_NUMBER
This represents the general category “Number, letter”.
- Constant: uc_general_category_t UC_CATEGORY_No
- Macro: uc_general_category_t UC_OTHER_NUMBER
This represents the general category “Number, other”.
- Constant: uc_general_category_t UC_CATEGORY_P
- Macro: uc_general_category_t UC_PUNCTUATION
This represents the general category “Punctuation”.
- Constant: uc_general_category_t UC_CATEGORY_Pc
- Macro: uc_general_category_t UC_CONNECTOR_PUNCTUATION
This represents the general category “Punctuation, connector”.
- Constant: uc_general_category_t UC_CATEGORY_Pd
- Macro: uc_general_category_t UC_DASH_PUNCTUATION
This represents the general category “Punctuation, dash”.
- Constant: uc_general_category_t UC_CATEGORY_Ps
- Macro: uc_general_category_t UC_OPEN_PUNCTUATION
This represents the general category “Punctuation, open”, a.k.a. “start punctuation”.
- Constant: uc_general_category_t UC_CATEGORY_Pe
- Macro: uc_general_category_t UC_CLOSE_PUNCTUATION
This represents the general category “Punctuation, close”, a.k.a. “end punctuation”.
- Constant: uc_general_category_t UC_CATEGORY_Pi
- Macro: uc_general_category_t UC_INITIAL_QUOTE_PUNCTUATION
This represents the general category “Punctuation, initial quote”.
- Constant: uc_general_category_t UC_CATEGORY_Pf
- Macro: uc_general_category_t UC_FINAL_QUOTE_PUNCTUATION
This represents the general category “Punctuation, final quote”.
- Constant: uc_general_category_t UC_CATEGORY_Po
- Macro: uc_general_category_t UC_OTHER_PUNCTUATION
This represents the general category “Punctuation, other”.
- Constant: uc_general_category_t UC_CATEGORY_S
- Macro: uc_general_category_t UC_SYMBOL
This represents the general category “Symbol”.
- Constant: uc_general_category_t UC_CATEGORY_Sm
- Macro: uc_general_category_t UC_MATH_SYMBOL
This represents the general category “Symbol, math”.
- Constant: uc_general_category_t UC_CATEGORY_Sc
- Macro: uc_general_category_t UC_CURRENCY_SYMBOL
This represents the general category “Symbol, currency”.
- Constant: uc_general_category_t UC_CATEGORY_Sk
- Macro: uc_general_category_t UC_MODIFIER_SYMBOL
This represents the general category “Symbol, modifier”.
- Constant: uc_general_category_t UC_CATEGORY_So
- Macro: uc_general_category_t UC_OTHER_SYMBOL
This represents the general category “Symbol, other”.
- Constant: uc_general_category_t UC_CATEGORY_Z
- Macro: uc_general_category_t UC_SEPARATOR
This represents the general category “Separator”.
- Constant: uc_general_category_t UC_CATEGORY_Zs
- Macro: uc_general_category_t UC_SPACE_SEPARATOR
This represents the general category “Separator, space”.
- Constant: uc_general_category_t UC_CATEGORY_Zl
- Macro: uc_general_category_t UC_LINE_SEPARATOR
This represents the general category “Separator, line”.
- Constant: uc_general_category_t UC_CATEGORY_Zp
- Macro: uc_general_category_t UC_PARAGRAPH_SEPARATOR
This represents the general category “Separator, paragraph”.
- Constant: uc_general_category_t UC_CATEGORY_C
- Macro: uc_general_category_t UC_OTHER
This represents the general category “Other”.
- Constant: uc_general_category_t UC_CATEGORY_Cc
- Macro: uc_general_category_t UC_CONTROL
This represents the general category “Other, control”.
- Constant: uc_general_category_t UC_CATEGORY_Cf
- Macro: uc_general_category_t UC_FORMAT
This represents the general category “Other, format”.
- Constant: uc_general_category_t UC_CATEGORY_Cs
- Macro: uc_general_category_t UC_SURROGATE
This represents the general category “Other, surrogate”.
All code points in this category are invalid characters.
- Constant: uc_general_category_t UC_CATEGORY_Co
- Macro: uc_general_category_t UC_PRIVATE_USE
This represents the general category “Other, private use”.
- Constant: uc_general_category_t UC_CATEGORY_Cn
- Macro: uc_general_category_t UC_UNASSIGNED
This represents the general category “Other, not assigned”.
Some code points in this category are invalid characters.
The following functions combine general categories, like in a boolean algebra,
except that there is no ‘not’ operation.
- Function: uc_general_category_t uc_general_category_or (uc_general_category_t category1, uc_general_category_t category2)
Returns the union of two general categories.
This corresponds to the unions of the two sets of characters.
- Function: uc_general_category_t uc_general_category_and (uc_general_category_t category1, uc_general_category_t category2)
Returns the intersection of two general categories as bit masks.
This does not correspond to the intersection of the two sets of
characters.
- Function: uc_general_category_t uc_general_category_and_not (uc_general_category_t category1, uc_general_category_t category2)
Returns the intersection of a general category with the complement of a
second general category, as bit masks.
This does not correspond to the intersection with complement, when
viewing the categories as sets of characters.
The following functions associate general categories with their name.
- Function: const char * uc_general_category_name (uc_general_category_t category)
Returns the name of a general category, more precisely, the abbreviated name.
Returns NULL if the general category corresponds to a bit mask that does not
have a name.
- Function: const char * uc_general_category_long_name (uc_general_category_t category)
Returns the long name of a general category.
Returns NULL if the general category corresponds to a bit mask that does not
have a name.
- Function: uc_general_category_t uc_general_category_byname (const char *category_name)
Returns the general category given by name, e.g. "Lu"
, or by long
name, e.g. "Uppercase Letter"
.
This lookup ignores spaces, underscores, or hyphens as word separators and is
case-insignificant.
The following functions view general categories as sets of Unicode characters.
- Function: uc_general_category_t uc_general_category (ucs4_t uc)
Returns the general category of a Unicode character.
This function uses a big table.
- Function: bool uc_is_general_category (ucs4_t uc, uc_general_category_t category)
Tests whether a Unicode character belongs to a given category.
The category argument can be a predefined general category or the
combination of several predefined general categories.
The following are the predefined general category value as bit masks.
Additional general categories may be added in the future.
- Macro: uint32_t UC_CATEGORY_MASK_L
- Macro: uint32_t UC_CATEGORY_MASK_LC
- Macro: uint32_t UC_CATEGORY_MASK_Lu
- Macro: uint32_t UC_CATEGORY_MASK_Ll
- Macro: uint32_t UC_CATEGORY_MASK_Lt
- Macro: uint32_t UC_CATEGORY_MASK_Lm
- Macro: uint32_t UC_CATEGORY_MASK_Lo
- Macro: uint32_t UC_CATEGORY_MASK_M
- Macro: uint32_t UC_CATEGORY_MASK_Mn
- Macro: uint32_t UC_CATEGORY_MASK_Mc
- Macro: uint32_t UC_CATEGORY_MASK_Me
- Macro: uint32_t UC_CATEGORY_MASK_N
- Macro: uint32_t UC_CATEGORY_MASK_Nd
- Macro: uint32_t UC_CATEGORY_MASK_Nl
- Macro: uint32_t UC_CATEGORY_MASK_No
- Macro: uint32_t UC_CATEGORY_MASK_P
- Macro: uint32_t UC_CATEGORY_MASK_Pc
- Macro: uint32_t UC_CATEGORY_MASK_Pd
- Macro: uint32_t UC_CATEGORY_MASK_Ps
- Macro: uint32_t UC_CATEGORY_MASK_Pe
- Macro: uint32_t UC_CATEGORY_MASK_Pi
- Macro: uint32_t UC_CATEGORY_MASK_Pf
- Macro: uint32_t UC_CATEGORY_MASK_Po
- Macro: uint32_t UC_CATEGORY_MASK_S
- Macro: uint32_t UC_CATEGORY_MASK_Sm
- Macro: uint32_t UC_CATEGORY_MASK_Sc
- Macro: uint32_t UC_CATEGORY_MASK_Sk
- Macro: uint32_t UC_CATEGORY_MASK_So
- Macro: uint32_t UC_CATEGORY_MASK_Z
- Macro: uint32_t UC_CATEGORY_MASK_Zs
- Macro: uint32_t UC_CATEGORY_MASK_Zl
- Macro: uint32_t UC_CATEGORY_MASK_Zp
- Macro: uint32_t UC_CATEGORY_MASK_C
- Macro: uint32_t UC_CATEGORY_MASK_Cc
- Macro: uint32_t UC_CATEGORY_MASK_Cf
- Macro: uint32_t UC_CATEGORY_MASK_Cs
- Macro: uint32_t UC_CATEGORY_MASK_Co
- Macro: uint32_t UC_CATEGORY_MASK_Cn
The following function views general categories as sets of Unicode characters.
- Function: bool uc_is_general_category_withtable (ucs4_t uc, uint32_t bitmask)
Tests whether a Unicode character belongs to a given category.
The bitmask argument can be a predefined general category bitmask or the
combination of several predefined general category bitmasks.
This function uses a big table comprising all general categories.
Every Unicode character or code point has a canonical combining class
assigned to it.
What is the meaning of the canonical combining class? Essentially, it
indicates the priority with which a combining character is attached to its
base character. The characters for which the canonical combining class is 0
are the base characters, and the characters for which it is greater than 0 are
the combining characters. Combining characters are rendered
near/attached/around their base character, and combining characters with small
combining classes are attached "first" or "closer" to the base character.
The canonical combining class of a character is a number in the range
0..255. The possible values are described in the Unicode Character Database
https://www.unicode.org/Public/UNIDATA/UCD.html. The list here is
not definitive; more values can be added in future versions.
- Constant: int UC_CCC_NR
The canonical combining class value for “Not Reordered” characters.
The value is 0.
- Constant: int UC_CCC_OV
The canonical combining class value for “Overlay” characters.
- Constant: int UC_CCC_NK
The canonical combining class value for “Nukta” characters.
- Constant: int UC_CCC_KV
The canonical combining class value for “Kana Voicing” characters.
- Constant: int UC_CCC_VR
The canonical combining class value for “Virama” characters.
- Constant: int UC_CCC_ATBL
The canonical combining class value for “Attached Below Left” characters.
- Constant: int UC_CCC_ATB
The canonical combining class value for “Attached Below” characters.
- Constant: int UC_CCC_ATA
The canonical combining class value for “Attached Above” characters.
- Constant: int UC_CCC_ATAR
The canonical combining class value for “Attached Above Right” characters.
- Constant: int UC_CCC_BL
The canonical combining class value for “Below Left” characters.
- Constant: int UC_CCC_B
The canonical combining class value for “Below” characters.
- Constant: int UC_CCC_BR
The canonical combining class value for “Below Right” characters.
- Constant: int UC_CCC_L
The canonical combining class value for “Left” characters.
- Constant: int UC_CCC_R
The canonical combining class value for “Right” characters.
- Constant: int UC_CCC_AL
The canonical combining class value for “Above Left” characters.
- Constant: int UC_CCC_A
The canonical combining class value for “Above” characters.
- Constant: int UC_CCC_AR
The canonical combining class value for “Above Right” characters.
- Constant: int UC_CCC_DB
The canonical combining class value for “Double Below” characters.
- Constant: int UC_CCC_DA
The canonical combining class value for “Double Above” characters.
- Constant: int UC_CCC_IS
The canonical combining class value for “Iota Subscript” characters.
The following functions associate canonical combining classes with their name.
- Function: const char * uc_combining_class_name (int ccc)
Returns the name of a canonical combining class, more precisely, the
abbreviated name.
Returns NULL if the canonical combining class is a numeric value without a
name.
- Function: const char * uc_combining_class_long_name (int ccc)
Returns the long name of a canonical combining class.
Returns NULL if the canonical combining class is a numeric value without a
name.
- Function: int uc_combining_class_byname (const char *ccc_name)
Returns the canonical combining class given by name, e.g. "BL"
, or by
long name, e.g. "Below Left"
.
This lookup ignores spaces, underscores, or hyphens as word separators and is
case-insignificant.
The following function looks up the canonical combining class of a character.
- Function: int uc_combining_class (ucs4_t uc)
Returns the canonical combining class of a Unicode character.
Every Unicode character or code point has a bidi class assigned to it.
Before Unicode 4.0, this concept was known as bidirectional category.
The bidi class guides the bidirectional algorithm
(https://www.unicode.org/reports/tr9/). The possible values are
the following.
- Constant: int UC_BIDI_L
The bidi class for `Left-to-Right`” characters.
- Constant: int UC_BIDI_LRE
The bidi class for “Left-to-Right Embedding” characters.
- Constant: int UC_BIDI_LRO
The bidi class for “Left-to-Right Override” characters.
- Constant: int UC_BIDI_R
The bidi class for “Right-to-Left” characters.
- Constant: int UC_BIDI_AL
The bidi class for “Right-to-Left Arabic” characters.
- Constant: int UC_BIDI_RLE
The bidi class for “Right-to-Left Embedding” characters.
- Constant: int UC_BIDI_RLO
The bidi class for “Right-to-Left Override” characters.
- Constant: int UC_BIDI_PDF
The bidi class for “Pop Directional Format” characters.
- Constant: int UC_BIDI_EN
The bidi class for “European Number” characters.
- Constant: int UC_BIDI_ES
The bidi class for “European Number Separator” characters.
- Constant: int UC_BIDI_ET
The bidi class for “European Number Terminator” characters.
- Constant: int UC_BIDI_AN
The bidi class for “Arabic Number” characters.
- Constant: int UC_BIDI_CS
The bidi class for “Common Number Separator” characters.
- Constant: int UC_BIDI_NSM
The bidi class for “Non-Spacing Mark” characters.
- Constant: int UC_BIDI_BN
The bidi class for “Boundary Neutral” characters.
- Constant: int UC_BIDI_B
The bidi class for “Paragraph Separator” characters.
- Constant: int UC_BIDI_S
The bidi class for “Segment Separator” characters.
- Constant: int UC_BIDI_WS
The bidi class for “Whitespace” characters.
- Constant: int UC_BIDI_ON
The bidi class for “Other Neutral” characters.
- Constant: int UC_BIDI_LRI
The bidi class for “Left-to-Right Isolate” characters.
- Constant: int UC_BIDI_RLI
The bidi class for “Right-to-Left Isolate” characters.
- Constant: int UC_BIDI_FSI
The bidi class for “First Strong Isolate” characters.
- Constant: int UC_BIDI_PDI
The bidi class for “Pop Directional Isolate” characters.
The following functions implement the association between a bidirectional
category and its name.
- Function: const char * uc_bidi_class_name (int bidi_class)
- Function: const char * uc_bidi_category_name (int category)
Returns the name of a bidi class, more precisely, the abbreviated name.
- Function: const char * uc_bidi_class_long_name (int bidi_class)
Returns the long name of a bidi class.
- Function: int uc_bidi_class_byname (const char *bidi_class_name)
- Function: int uc_bidi_category_byname (const char *category_name)
Returns the bidi class given by name, e.g. "LRE"
, or by long name,
e.g. "Left-to-Right Embedding"
.
This lookup ignores spaces, underscores, or hyphens as word separators and is
case-insignificant.
The following functions view bidirectional categories as sets of Unicode
characters.
- Function: int uc_bidi_class (ucs4_t uc)
- Function: int uc_bidi_category (ucs4_t uc)
Returns the bidi class of a Unicode character.
- Function: bool uc_is_bidi_class (ucs4_t uc, int bidi_class)
- Function: bool uc_is_bidi_category (ucs4_t uc, int category)
Tests whether a Unicode character belongs to a given bidi class.
Decimal digits (like the digits from ‘0’ to ‘9’) exist in many
scripts. The following function converts a decimal digit character to its
numerical value.
- Function: int uc_decimal_value (ucs4_t uc)
Returns the decimal digit value of a Unicode character.
The return value is an integer in the range 0..9, or -1 for characters that
do not represent a decimal digit.
Digit characters are like decimal digit characters, possibly in special forms,
like as superscript, subscript, or circled. The following function converts a
digit character to its numerical value.
- Function: int uc_digit_value (ucs4_t uc)
Returns the digit value of a Unicode character.
The return value is an integer in the range 0..9, or -1 for characters that
do not represent a digit.
There are also characters that represent numbers without a digit system, like
the Roman numerals, and fractional numbers, like 1/4 or 3/4.
The following type represents the numeric value of a Unicode character.
- Type: uc_fraction_t
This is a structure type with the following fields:
| | int numerator;
int denominator;
|
An integer n is represented by numerator = n
,
denominator = 1
.
The following function converts a number character to its numerical value.
- Function: uc_fraction_t uc_numeric_value (ucs4_t uc)
Returns the numeric value of a Unicode character.
The return value is a fraction, or the pseudo-fraction { 0, 0 }
for
characters that do not represent a number.
Character mirroring is used to associate the closing parenthesis character
to the opening parenthesis character, the closing brace character with the
opening brace character, and so on.
The following function looks up the mirrored character of a Unicode character.
- Function: bool uc_mirror_char (ucs4_t uc, ucs4_t *puc)
Stores the mirrored character of a Unicode character uc in
*puc
and returns true
, if it exists. Otherwise it
stores uc unmodified in *puc
and returns false
.
When Arabic characters are rendered, after bidi reordering has taken
place, the shape of the glyphs are modified so that many adjacent glyphs
are joined. Two character properties describe how this “Arabic shaping”
takes place: the joining type and the joining group.
The joining type of a character describes on which of the left and right
neighbour characters the character's shape depends, and which of the two
neighbour characters are rendered depending on this character.
The joining type has the following possible values:
- Constant: int UC_JOINING_TYPE_U
“Non joining”: Characters of this joining type prohibit joining.
- Constant: int UC_JOINING_TYPE_T
“Transparent”: Characters of this joining type are skipped when
considering joining.
- Constant: int UC_JOINING_TYPE_C
“Join causing”: Characters of this joining type cause their neighbour
characters to change their shapes but don't change their own shape.
- Constant: int UC_JOINING_TYPE_L
“Left joining”: Characters of this joining type have two shapes,
isolated and initial. Such characters currently don't exist.
- Constant: int UC_JOINING_TYPE_R
“Right joining”: Characters of this joining type have two shapes,
isolated and final.
- Constant: int UC_JOINING_TYPE_D
“Dual joining”: Characters of this joining type have four shapes,
initial, medial, final, and isolated.
The following functions implement the association between a joining type
and its name.
- Function: const char * uc_joining_type_name (int joining_type)
Returns the name of a joining type.
- Function: const char * uc_joining_type_long_name (int joining_type)
Returns the long name of a joining type.
- Function: int uc_joining_type_byname (const char *joining_type_name)
Returns the joining type given by name, e.g. "D"
, or by long name,
e.g. "Dual Joining
.
This lookup ignores spaces, underscores, or hyphens as word separators and is
case-insignificant.
The following function gives the joining type of every Unicode character.
- Function: int uc_joining_type (ucs4_t uc)
Returns the joining type of a Unicode character.
The joining group of a character describes how the character's shape
is modified in the four contexts of dual-joining characters or in the
two contexts of right-joining characters.
The joining group has the following possible values:
- Constant: int UC_JOINING_GROUP_NONE
- Constant: int UC_JOINING_GROUP_AIN
- Constant: int UC_JOINING_GROUP_ALAPH
- Constant: int UC_JOINING_GROUP_ALEF
- Constant: int UC_JOINING_GROUP_BEH
- Constant: int UC_JOINING_GROUP_BETH
- Constant: int UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE
- Constant: int UC_JOINING_GROUP_DAL
- Constant: int UC_JOINING_GROUP_DALATH_RISH
- Constant: int UC_JOINING_GROUP_E
- Constant: int UC_JOINING_GROUP_FARSI_YEH
- Constant: int UC_JOINING_GROUP_FE
- Constant: int UC_JOINING_GROUP_FEH
- Constant: int UC_JOINING_GROUP_FINAL_SEMKATH
- Constant: int UC_JOINING_GROUP_GAF
- Constant: int UC_JOINING_GROUP_GAMAL
- Constant: int UC_JOINING_GROUP_HAH
- Constant: int UC_JOINING_GROUP_HE
- Constant: int UC_JOINING_GROUP_HEH
- Constant: int UC_JOINING_GROUP_HEH_GOAL
- Constant: int UC_JOINING_GROUP_HETH
- Constant: int UC_JOINING_GROUP_KAF
- Constant: int UC_JOINING_GROUP_KAPH
- Constant: int UC_JOINING_GROUP_KHAPH
- Constant: int UC_JOINING_GROUP_KNOTTED_HEH
- Constant: int UC_JOINING_GROUP_LAM
- Constant: int UC_JOINING_GROUP_LAMADH
- Constant: int UC_JOINING_GROUP_MEEM
- Constant: int UC_JOINING_GROUP_MIM
- Constant: int UC_JOINING_GROUP_NOON
- Constant: int UC_JOINING_GROUP_NUN
- Constant: int UC_JOINING_GROUP_NYA
- Constant: int UC_JOINING_GROUP_PE
- Constant: int UC_JOINING_GROUP_QAF
- Constant: int UC_JOINING_GROUP_QAPH
- Constant: int UC_JOINING_GROUP_REH
- Constant: int UC_JOINING_GROUP_REVERSED_PE
- Constant: int UC_JOINING_GROUP_SAD
- Constant: int UC_JOINING_GROUP_SADHE
- Constant: int UC_JOINING_GROUP_SEEN
- Constant: int UC_JOINING_GROUP_SEMKATH
- Constant: int UC_JOINING_GROUP_SHIN
- Constant: int UC_JOINING_GROUP_SWASH_KAF
- Constant: int UC_JOINING_GROUP_SYRIAC_WAW
- Constant: int UC_JOINING_GROUP_TAH
- Constant: int UC_JOINING_GROUP_TAW
- Constant: int UC_JOINING_GROUP_TEH_MARBUTA
- Constant: int UC_JOINING_GROUP_TEH_MARBUTA_GOAL
- Constant: int UC_JOINING_GROUP_TETH
- Constant: int UC_JOINING_GROUP_WAW
- Constant: int UC_JOINING_GROUP_YEH
- Constant: int UC_JOINING_GROUP_YEH_BARREE
- Constant: int UC_JOINING_GROUP_YEH_WITH_TAIL
- Constant: int UC_JOINING_GROUP_YUDH
- Constant: int UC_JOINING_GROUP_YUDH_HE
- Constant: int UC_JOINING_GROUP_ZAIN
- Constant: int UC_JOINING_GROUP_ZHAIN
- Constant: int UC_JOINING_GROUP_ROHINGYA_YEH
- Constant: int UC_JOINING_GROUP_STRAIGHT_WAW
- Constant: int UC_JOINING_GROUP_MANICHAEAN_ALEPH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_BETH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_GIMEL
- Constant: int UC_JOINING_GROUP_MANICHAEAN_DALETH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_WAW
- Constant: int UC_JOINING_GROUP_MANICHAEAN_ZAYIN
- Constant: int UC_JOINING_GROUP_MANICHAEAN_HETH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_TETH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_YODH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_KAPH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_LAMEDH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_DHAMEDH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_THAMEDH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_MEM
- Constant: int UC_JOINING_GROUP_MANICHAEAN_NUN
- Constant: int UC_JOINING_GROUP_MANICHAEAN_SAMEKH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_AYIN
- Constant: int UC_JOINING_GROUP_MANICHAEAN_PE
- Constant: int UC_JOINING_GROUP_MANICHAEAN_SADHE
- Constant: int UC_JOINING_GROUP_MANICHAEAN_QOPH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_RESH
- Constant: int UC_JOINING_GROUP_MANICHAEAN_TAW
- Constant: int UC_JOINING_GROUP_MANICHAEAN_ONE
- Constant: int UC_JOINING_GROUP_MANICHAEAN_FIVE
- Constant: int UC_JOINING_GROUP_MANICHAEAN_TEN
- Constant: int UC_JOINING_GROUP_MANICHAEAN_TWENTY
- Constant: int UC_JOINING_GROUP_MANICHAEAN_HUNDRED
- Constant: int UC_JOINING_GROUP_AFRICAN_FEH
- Constant: int UC_JOINING_GROUP_AFRICAN_QAF
- Constant: int UC_JOINING_GROUP_AFRICAN_NOON
- Constant: int UC_JOINING_GROUP_MALAYALAM_NGA
- Constant: int UC_JOINING_GROUP_MALAYALAM_JA
- Constant: int UC_JOINING_GROUP_MALAYALAM_NYA
- Constant: int UC_JOINING_GROUP_MALAYALAM_TTA
- Constant: int UC_JOINING_GROUP_MALAYALAM_NNA
- Constant: int UC_JOINING_GROUP_MALAYALAM_NNNA
- Constant: int UC_JOINING_GROUP_MALAYALAM_BHA
- Constant: int UC_JOINING_GROUP_MALAYALAM_RA
- Constant: int UC_JOINING_GROUP_MALAYALAM_LLA
- Constant: int UC_JOINING_GROUP_MALAYALAM_LLLA
- Constant: int UC_JOINING_GROUP_MALAYALAM_SSA
- Constant: int UC_JOINING_GROUP_HANIFI_ROHINGYA_PA
- Constant: int UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA
- Constant: int UC_JOINING_GROUP_THIN_YEH
- Constant: int UC_JOINING_GROUP_VERTICAL_TAIL
The following functions implement the association between a joining group
and its name.
- Function: const char * uc_joining_group_name (int joining_group)
Returns the name of a joining group.
- Function: int uc_joining_group_byname (const char *joining_group_name)
Returns the joining group given by name, e.g. "Teh_Marbuta"
.
This lookup ignores spaces, underscores, or hyphens as word separators and is
case-insignificant.
The following function gives the joining group of every Unicode character.
- Function: int uc_joining_group (ucs4_t uc)
Returns the joining group of a Unicode character.
This section defines boolean properties of Unicode characters. This
means, a character either has the given property or does not have it.
In other words, the property can be viewed as a subset of the set of
Unicode characters.
The GNU libunistring library provides two kinds of API for working with
properties. The object oriented API uses a type uc_property_t
to designate a property. In the function-based API, which is a bit more
low level, a property is merely a function.
The following type designates a property on Unicode characters.
- Type: uc_property_t
This data type denotes a boolean property on Unicode characters. It is an
immediate type that can be copied by simple assignment, without involving
memory allocation. It is not an array type.
Many Unicode properties are predefined.
The following are general properties.
- Constant: uc_property_t UC_PROPERTY_WHITE_SPACE
- Constant: uc_property_t UC_PROPERTY_ALPHABETIC
- Constant: uc_property_t UC_PROPERTY_OTHER_ALPHABETIC
- Constant: uc_property_t UC_PROPERTY_NOT_A_CHARACTER
- Constant: uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT
- Constant: uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT
- Constant: uc_property_t UC_PROPERTY_DEPRECATED
- Constant: uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION
- Constant: uc_property_t UC_PROPERTY_VARIATION_SELECTOR
- Constant: uc_property_t UC_PROPERTY_PRIVATE_USE
- Constant: uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE
The following properties are related to case folding.
- Constant: uc_property_t UC_PROPERTY_UPPERCASE
- Constant: uc_property_t UC_PROPERTY_OTHER_UPPERCASE
- Constant: uc_property_t UC_PROPERTY_LOWERCASE
- Constant: uc_property_t UC_PROPERTY_OTHER_LOWERCASE
- Constant: uc_property_t UC_PROPERTY_TITLECASE
- Constant: uc_property_t UC_PROPERTY_CASED
- Constant: uc_property_t UC_PROPERTY_CASE_IGNORABLE
- Constant: uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED
- Constant: uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED
- Constant: uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED
- Constant: uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED
- Constant: uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED
- Constant: uc_property_t UC_PROPERTY_SOFT_DOTTED
The following properties are related to identifiers.
- Constant: uc_property_t UC_PROPERTY_ID_START
- Constant: uc_property_t UC_PROPERTY_OTHER_ID_START
- Constant: uc_property_t UC_PROPERTY_ID_CONTINUE
- Constant: uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE
- Constant: uc_property_t UC_PROPERTY_XID_START
- Constant: uc_property_t UC_PROPERTY_XID_CONTINUE
- Constant: uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE
- Constant: uc_property_t UC_PROPERTY_PATTERN_SYNTAX
The following properties have an influence on shaping and rendering.
- Constant: uc_property_t UC_PROPERTY_JOIN_CONTROL
- Constant: uc_property_t UC_PROPERTY_GRAPHEME_BASE
- Constant: uc_property_t UC_PROPERTY_GRAPHEME_EXTEND
- Constant: uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND
- Constant: uc_property_t UC_PROPERTY_GRAPHEME_LINK
The following properties relate to bidirectional reordering.
- Constant: uc_property_t UC_PROPERTY_BIDI_CONTROL
- Constant: uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT
- Constant: uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT
- Constant: uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT
- Constant: uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT
- Constant: uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR
- Constant: uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR
- Constant: uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT
- Constant: uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR
- Constant: uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR
- Constant: uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR
- Constant: uc_property_t UC_PROPERTY_BIDI_WHITESPACE
- Constant: uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK
- Constant: uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL
- Constant: uc_property_t UC_PROPERTY_BIDI_PDF
- Constant: uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE
- Constant: uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL
The following properties deal with number representations.
- Constant: uc_property_t UC_PROPERTY_HEX_DIGIT
- Constant: uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT
The following properties deal with CJK.
- Constant: uc_property_t UC_PROPERTY_IDEOGRAPHIC
- Constant: uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH
- Constant: uc_property_t UC_PROPERTY_RADICAL
- Constant: uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR
- Constant: uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR
The following properties deal with pictographic symbols.
- Constant: uc_property_t UC_PROPERTY_EMOJI
- Constant: uc_property_t UC_PROPERTY_EMOJI_PRESENTATION
- Constant: uc_property_t UC_PROPERTY_EMOJI_MODIFIER
- Constant: uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE
- Constant: uc_property_t UC_PROPERTY_EMOJI_COMPONENT
- Constant: uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC
Other miscellaneous properties are:
- Constant: uc_property_t UC_PROPERTY_ZERO_WIDTH
- Constant: uc_property_t UC_PROPERTY_SPACE
- Constant: uc_property_t UC_PROPERTY_NON_BREAK
- Constant: uc_property_t UC_PROPERTY_ISO_CONTROL
- Constant: uc_property_t UC_PROPERTY_FORMAT_CONTROL
- Constant: uc_property_t UC_PROPERTY_DASH
- Constant: uc_property_t UC_PROPERTY_HYPHEN
- Constant: uc_property_t UC_PROPERTY_PUNCTUATION
- Constant: uc_property_t UC_PROPERTY_LINE_SEPARATOR
- Constant: uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR
- Constant: uc_property_t UC_PROPERTY_QUOTATION_MARK
- Constant: uc_property_t UC_PROPERTY_SENTENCE_TERMINAL
- Constant: uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION
- Constant: uc_property_t UC_PROPERTY_CURRENCY_SYMBOL
- Constant: uc_property_t UC_PROPERTY_MATH
- Constant: uc_property_t UC_PROPERTY_OTHER_MATH
- Constant: uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION
- Constant: uc_property_t UC_PROPERTY_LEFT_OF_PAIR
- Constant: uc_property_t UC_PROPERTY_COMBINING
- Constant: uc_property_t UC_PROPERTY_COMPOSITE
- Constant: uc_property_t UC_PROPERTY_DECIMAL_DIGIT
- Constant: uc_property_t UC_PROPERTY_NUMERIC
- Constant: uc_property_t UC_PROPERTY_DIACRITIC
- Constant: uc_property_t UC_PROPERTY_EXTENDER
- Constant: uc_property_t UC_PROPERTY_IGNORABLE_CONTROL
- Constant: uc_property_t UC_PROPERTY_REGIONAL_INDICATOR
The following function looks up a property by its name.
- Function: uc_property_t uc_property_byname (const char *property_name)
Returns the property given by name, e.g. "White space"
. If a property
with the given name exists, the result will satisfy the
uc_property_is_valid
predicate. Otherwise the result will not satisfy
this predicate and must not be passed to functions that expect an
uc_property_t
argument.
This lookup ignores spaces, underscores, or hyphens as word separators, is
case-insignificant, and supports the aliases listed in Unicode's
‘PropertyAliases.txt’ file.
This function references a big table of all predefined properties. Its use
can significantly increase the size of your application.
- Function: bool uc_property_is_valid (uc_property_t property)
Returns true
when the given property is valid, or false
otherwise.
The following function views a property as a set of Unicode characters.
- Function: bool uc_is_property (ucs4_t uc, uc_property_t property)
Tests whether the Unicode character uc has the given property.
The following are general properties.
- Function: bool uc_is_property_white_space (ucs4_t uc)
- Function: bool uc_is_property_alphabetic (ucs4_t uc)
- Function: bool uc_is_property_other_alphabetic (ucs4_t uc)
- Function: bool uc_is_property_not_a_character (ucs4_t uc)
- Function: bool uc_is_property_default_ignorable_code_point (ucs4_t uc)
- Function: bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc)
- Function: bool uc_is_property_deprecated (ucs4_t uc)
- Function: bool uc_is_property_logical_order_exception (ucs4_t uc)
- Function: bool uc_is_property_variation_selector (ucs4_t uc)
- Function: bool uc_is_property_private_use (ucs4_t uc)
- Function: bool uc_is_property_unassigned_code_value (ucs4_t uc)
The following properties are related to case folding.
- Function: bool uc_is_property_uppercase (ucs4_t uc)
- Function: bool uc_is_property_other_uppercase (ucs4_t uc)
- Function: bool uc_is_property_lowercase (ucs4_t uc)
- Function: bool uc_is_property_other_lowercase (ucs4_t uc)
- Function: bool uc_is_property_titlecase (ucs4_t uc)
- Function: bool uc_is_property_cased (ucs4_t uc)
- Function: bool uc_is_property_case_ignorable (ucs4_t uc)
- Function: bool uc_is_property_changes_when_lowercased (ucs4_t uc)
- Function: bool uc_is_property_changes_when_uppercased (ucs4_t uc)
- Function: bool uc_is_property_changes_when_titlecased (ucs4_t uc)
- Function: bool uc_is_property_changes_when_casefolded (ucs4_t uc)
- Function: bool uc_is_property_changes_when_casemapped (ucs4_t uc)
- Function: bool uc_is_property_soft_dotted (ucs4_t uc)
The following properties are related to identifiers.
- Function: bool uc_is_property_id_start (ucs4_t uc)
- Function: bool uc_is_property_other_id_start (ucs4_t uc)
- Function: bool uc_is_property_id_continue (ucs4_t uc)
- Function: bool uc_is_property_other_id_continue (ucs4_t uc)
- Function: bool uc_is_property_xid_start (ucs4_t uc)
- Function: bool uc_is_property_xid_continue (ucs4_t uc)
- Function: bool uc_is_property_pattern_white_space (ucs4_t uc)
- Function: bool uc_is_property_pattern_syntax (ucs4_t uc)
The following properties have an influence on shaping and rendering.
- Function: bool uc_is_property_join_control (ucs4_t uc)
- Function: bool uc_is_property_grapheme_base (ucs4_t uc)
- Function: bool uc_is_property_grapheme_extend (ucs4_t uc)
- Function: bool uc_is_property_other_grapheme_extend (ucs4_t uc)
- Function: bool uc_is_property_grapheme_link (ucs4_t uc)
The following properties relate to bidirectional reordering.
- Function: bool uc_is_property_bidi_control (ucs4_t uc)
- Function: bool uc_is_property_bidi_left_to_right (ucs4_t uc)
- Function: bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc)
- Function: bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc)
- Function: bool uc_is_property_bidi_european_digit (ucs4_t uc)
- Function: bool uc_is_property_bidi_eur_num_separator (ucs4_t uc)
- Function: bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc)
- Function: bool uc_is_property_bidi_arabic_digit (ucs4_t uc)
- Function: bool uc_is_property_bidi_common_separator (ucs4_t uc)
- Function: bool uc_is_property_bidi_block_separator (ucs4_t uc)
- Function: bool uc_is_property_bidi_segment_separator (ucs4_t uc)
- Function: bool uc_is_property_bidi_whitespace (ucs4_t uc)
- Function: bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc)
- Function: bool uc_is_property_bidi_boundary_neutral (ucs4_t uc)
- Function: bool uc_is_property_bidi_pdf (ucs4_t uc)
- Function: bool uc_is_property_bidi_embedding_or_override (ucs4_t uc)
- Function: bool uc_is_property_bidi_other_neutral (ucs4_t uc)
The following properties deal with number representations.
- Function: bool uc_is_property_hex_digit (ucs4_t uc)
- Function: bool uc_is_property_ascii_hex_digit (ucs4_t uc)
The following properties deal with CJK.
- Function: bool uc_is_property_ideographic (ucs4_t uc)
- Function: bool uc_is_property_unified_ideograph (ucs4_t uc)
- Function: bool uc_is_property_radical (ucs4_t uc)
- Function: bool uc_is_property_ids_binary_operator (ucs4_t uc)
- Function: bool uc_is_property_ids_trinary_operator (ucs4_t uc)
The following properties deal with pictographic symbols.
- Function: bool uc_is_property_emoji (ucs4_t uc)
- Function: bool uc_is_property_emoji_presentation (ucs4_t uc)
- Function: bool uc_is_property_emoji_modifier (ucs4_t uc)
- Function: bool uc_is_property_emoji_modifier_base (ucs4_t uc)
- Function: bool uc_is_property_emoji_component (ucs4_t uc)
- Function: bool uc_is_property_extended_pictographic (ucs4_t uc)
Other miscellaneous properties are:
- Function: bool uc_is_property_zero_width (ucs4_t uc)
- Function: bool uc_is_property_space (ucs4_t uc)
- Function: bool uc_is_property_non_break (ucs4_t uc)
- Function: bool uc_is_property_iso_control (ucs4_t uc)
- Function: bool uc_is_property_format_control (ucs4_t uc)
- Function: bool uc_is_property_dash (ucs4_t uc)
- Function: bool uc_is_property_hyphen (ucs4_t uc)
- Function: bool uc_is_property_punctuation (ucs4_t uc)
- Function: bool uc_is_property_line_separator (ucs4_t uc)
- Function: bool uc_is_property_paragraph_separator (ucs4_t uc)
- Function: bool uc_is_property_quotation_mark (ucs4_t uc)
- Function: bool uc_is_property_sentence_terminal (ucs4_t uc)
- Function: bool uc_is_property_terminal_punctuation (ucs4_t uc)
- Function: bool uc_is_property_currency_symbol (ucs4_t uc)
- Function: bool uc_is_property_math (ucs4_t uc)
- Function: bool uc_is_property_other_math (ucs4_t uc)
- Function: bool uc_is_property_paired_punctuation (ucs4_t uc)
- Function: bool uc_is_property_left_of_pair (ucs4_t uc)
- Function: bool uc_is_property_combining (ucs4_t uc)
- Function: bool uc_is_property_composite (ucs4_t uc)
- Function: bool uc_is_property_decimal_digit (ucs4_t uc)
- Function: bool uc_is_property_numeric (ucs4_t uc)
- Function: bool uc_is_property_diacritic (ucs4_t uc)
- Function: bool uc_is_property_extender (ucs4_t uc)
- Function: bool uc_is_property_ignorable_control (ucs4_t uc)
- Function: bool uc_is_property_regional_indicator (ucs4_t uc)
The Unicode characters are subdivided into scripts.
The following type is used to represent a script:
- Type: uc_script_t
This data type is a structure type that refers to statically allocated
read-only data. It contains the following fields:
The name
field contains the name of the script.
The following functions look up a script.
- Function: const uc_script_t * uc_script (ucs4_t uc)
Returns the script of a Unicode character. Returns NULL if uc does not
belong to any script.
- Function: const uc_script_t * uc_script_byname (const char *script_name)
Returns the script given by its name, e.g. "HAN"
. Returns NULL if a
script with the given name does not exist.
The following function views a script as a set of Unicode characters.
- Function: bool uc_is_script (ucs4_t uc, const uc_script_t *script)
Tests whether a Unicode character belongs to a given script.
The following gives a global picture of all scripts.
- Function: void uc_all_scripts (const uc_script_t **scripts, size_t *count)
Get the list of all scripts. Stores a pointer to an array of all scripts in
*scripts
and the length of this array in *count
.
The Unicode characters are subdivided into blocks. A block is an interval of
Unicode code points.
The following type is used to represent a block.
- Type: uc_block_t
This data type is a structure type that refers to statically allocated data.
It contains the following fields:
| | ucs4_t start;
ucs4_t end;
const char *name;
|
The start
field is the first Unicode code point in the block.
The end
field is the last Unicode code point in the block.
The name
field is the name of the block.
The following function looks up a block.
- Function: const uc_block_t * uc_block (ucs4_t uc)
Returns the block a character belongs to.
The following function views a block as a set of Unicode characters.
- Function: bool uc_is_block (ucs4_t uc, const uc_block_t *block)
Tests whether a Unicode character belongs to a given block.
The following gives a global picture of all block.
- Function: void uc_all_blocks (const uc_block_t **blocks, size_t *count)
Get the list of all blocks. Stores a pointer to an array of all blocks in
*blocks
and the length of this array in *count
.
The following properties are taken from language standards. The supported
language standards are ISO C 99 and Java.
- Function: bool uc_is_c_whitespace (ucs4_t uc)
Tests whether a Unicode character is considered whitespace in ISO C 99.
- Function: bool uc_is_java_whitespace (ucs4_t uc)
Tests whether a Unicode character is considered whitespace in Java.
The following enumerated values are the possible return values of the functions
uc_c_ident_category
and uc_java_ident_category
.
- Constant: int UC_IDENTIFIER_START
This return value means that the given character is valid as first or
subsequent character in an identifier.
- Constant: int UC_IDENTIFIER_VALID
This return value means that the given character is valid as subsequent
character only.
- Constant: int UC_IDENTIFIER_INVALID
This return value means that the given character is not valid in an identifier.
- Constant: int UC_IDENTIFIER_IGNORABLE
This return value (only for Java) means that the given character is ignorable.
The following function determine whether a given character can be a constituent
of an identifier in the given programming language.
- Function: int uc_c_ident_category (ucs4_t uc)
Returns the categorization of a Unicode character with respect to the ISO C 99
identifier syntax.
- Function: int uc_java_ident_category (ucs4_t uc)
Returns the categorization of a Unicode character with respect to the Java
identifier syntax.
The following character classifications mimic those declared in the ISO C
header files <ctype.h>
and <wctype.h>
. These functions are
deprecated, because this set of functions was designed with ASCII in mind and
cannot reflect the more diverse reality of the Unicode character set. But
they can be a quick-and-dirty porting aid when migrating from wchar_t
APIs to Unicode strings.
- Function: bool uc_is_alnum (ucs4_t uc)
Tests for any character for which uc_is_alpha
or uc_is_digit
is
true.
- Function: bool uc_is_alpha (ucs4_t uc)
Tests for any character for which uc_is_upper
or uc_is_lower
is
true, or any character that is one of a locale-specific set of characters for
which none of uc_is_cntrl
, uc_is_digit
, uc_is_punct
, or
uc_is_space
is true.
- Function: bool uc_is_cntrl (ucs4_t uc)
Tests for any control character.
- Function: bool uc_is_digit (ucs4_t uc)
Tests for any character that corresponds to a decimal-digit character.
- Function: bool uc_is_graph (ucs4_t uc)
Tests for any character for which uc_is_print
is true and
uc_is_space
is false.
- Function: bool uc_is_lower (ucs4_t uc)
Tests for any character that corresponds to a lowercase letter or is one
of a locale-specific set of characters for which none of uc_is_cntrl
,
uc_is_digit
, uc_is_punct
, or uc_is_space
is true.
- Function: bool uc_is_print (ucs4_t uc)
Tests for any printing character.
- Function: bool uc_is_punct (ucs4_t uc)
Tests for any printing character that is one of a locale-specific set of
characters for which neither uc_is_space
nor uc_is_alnum
is true.
- Function: bool uc_is_space (ucs4_t uc)
Test for any character that corresponds to a locale-specific set of characters
for which none of uc_is_alnum
, uc_is_graph
, or uc_is_punct
is true.
- Function: bool uc_is_upper (ucs4_t uc)
Tests for any character that corresponds to an uppercase letter or is one
of a locale-specific set of characters for which none of uc_is_cntrl
,
uc_is_digit
, uc_is_punct
, or uc_is_space
is true.
- Function: bool uc_is_xdigit (ucs4_t uc)
Tests for any character that corresponds to a hexadecimal-digit character.
- Function: bool uc_is_blank (ucs4_t uc)
Tests for any character that corresponds to a standard blank character or
a locale-specific set of characters for which uc_is_alnum
is false.
This document was generated by Bruno Haible on January, 2 2022 using texi2html 1.78a.


Menu
-
The Robin
- The classic burger, with a beef patty and cheese, lettuce, tomato, and onions.
- $7.00
-
The Eagle
- Our beef patty, with lots of bacon along with the standard toppings.
- $9.00
-
The Veggie
- A vegan veggie patty with our standard vegetable toppings. (Vegan)
- $6.50
- +$0.50 to add cheese (not vegan)
-
Fries
- An extra side of our fresh-made fries.
- $3.00
About Contact Home


More details are here: github.jcabi.com. Also, read this blog post: Object-Oriented Github API. Java 7 or higher is required.
Set of classes in com.jcabi.github
package is
an object oriented API of Github:
public class Main {
public static void main(String[] args) throws IOException {
Github github = new RtGithub(".. your OAuth token ..");
Repo repo = github.repos().get(
new Coordinates.Simple("jcabi/jcabi-github")
);
Issue issue = repo.issues().create("How are you?", "Please tell me...");
issue.comments().post("My first comment!");
}
}
We also provide MkGithub
, a mock version of Github server, which
you can use in unit tests, for example:
public class FooTest {
public void submitsCommentToGithubIssue() {
final Repo repo = new MkGithub().repos().create(
Json.createObjectBuilder().add("name", "test").build()
);
final Issue issue = repo.issues().create("how are you?", "");
new Foo(issue).doSomething(); // should post a message to the issue
MasterAssert.assertThat(
issue.comments().iterate(),
Matchers.iterableWithSize(1)
);
}
}
Questions?
If you have any questions about the framework, or something doesn't work as expected, please submit an issue here.
How to contribute?
Fork the repository, make changes, submit a pull request.
We promise to review your changes same day and apply to
the master
branch, if they look correct.
Please run Maven (3.1 or higher!) build before submitting a pull request:
$ mvn clean install -Pqulice
There are many integration tests that check our classes against live Github accounts. In order to run them, you should create a new Github OAuth access tokens (how?), and provide them in command line, like this:
$ mvn clean install -Dit.test=RtGistITCase -Dfailsafe.github.key=<token> -Dfailsafe.github.key.second=<second-token> -Dfailsafe.github.repo=<repo>
Replace <token>
and <second-token>
with the OAuth access tokens of two different Github
accounts. This test case will try to fork a gist from first account into second. Replace
<repo>
with the name of repository you create in your first account (for test purposes
only), for example yegor256/test
. OAuth access tokens should have permissions in their
respective repos to all scopes needed by the integration test suite you want to run
(including delete_repo
, which is not set by default!).
Please note that different integration tests may need keys with permissions to different scopes. To run all integration tests, the key should have the following OAuth scopes:
- read:org
- repo
- delete_repo
- admin:public_key
- gist
- admin:repo_hook
- user
- user:email
RtForksITCase
requires additional parameter -Dfailsafe.github.organization=<organization>
where <organization>
is an organization name to fork test github repository.
In order to run static analysis checks only use this:
$ mvn clean install -DskipTests -Dinvoker.skip=true -Pqulice


{% extends "FSJ/base_with_banner.html" %}
{% load i18n %} {# NOTE YOU MUST LOAD i18n to every HTML page even though it's also loaded to base.html #}
{# Initially used as a way to differentiate the home page for various user types. #}
{# Like the home.html, will be replaced with an appropriate standard student landing page #}
{% block heading %}
{# Translators: Home page (student) heading #}
{% trans "Home" %}
{% endblock %}
{% block content %}
{# Translators: Student home page greeting #}
{% trans "Hi student" %}
{{FSJ_user.first_name}}
{{FSJ_user.last_name}}
{{FSJ_user.ccid}}
{% endblock %}


Static Tables Different variations
Varius content
| # | Picture | Description | Info | Date | Size | |
|---|---|---|---|---|---|---|
| 1 | Palo Alto | Type: JPEG Dimensions: 200x150 |
September 14, 2012 | 45.6 KB | ||
| 2 | The Sky | Type: PSD Dimensions: 2400x1455 |
November 14, 2012 | 15.3 MB | ||
| 3 | Down the road | Type: JPEG Dimensions: 200x150 |
September 14, 2012 | 49.0 KB | ||
| 4 | The Edge | Type: PNG Dimensions: 210x160 |
September 15, 2012 | 69.1 KB | ||
| 5 | Fortress | Type: JPEG Dimensions: 1452x1320 |
October 1, 2012 | 2.3 MB |
Bordered table
| # | First Name | Last Name | Status | |
|---|---|---|---|---|
| 1 | Mark | Otto |<EMAIL_ADDRESS>| Unconfirmed |
|<EMAIL_ADDRESS>| Active | |||
| 2 | Jacob | Thornton |<EMAIL_ADDRESS>| New |
| 3 | Larry the Bird |<EMAIL_ADDRESS>| Pending |
Merge similar. Just ad .table-bordered
class.
Color the table
| # | First Name | Last Name | Status | |
|---|---|---|---|---|
| 1 | Mark | Otto |<EMAIL_ADDRESS>| Active |
| 2 | Jacob | Thornton |<EMAIL_ADDRESS>| Unconfirmed |
| 3 | Larry | the Bird |<EMAIL_ADDRESS>| New |
| 4 | Peter | Horadnia |<EMAIL_ADDRESS>| Pending |
Each row is unique. .table-colored
is specially for it.
Stripped one
| # | First Name | Last Name | Status | |
|---|---|---|---|---|
| 1 | Mark | Otto |<EMAIL_ADDRESS>| New |
| 2 | Jacob | Thornton |<EMAIL_ADDRESS>| Pending |
| 3 | Larry | the Bird |<EMAIL_ADDRESS>| Unconfirmed |
| 4 | Peter | Horadnia |<EMAIL_ADDRESS>| New |
Each row highlighted. You'll never lost. .table-srtiped
it.
On hover
| # | First Name | Last Name | Status | |
|---|---|---|---|---|
| 1 | Mark | Otto |<EMAIL_ADDRESS>| Pending |
| 2 | Jacob | Thornton |<EMAIL_ADDRESS>| Unconfirmed |
| 3 | Larry | the Bird |<EMAIL_ADDRESS>| New |
| 4 | Peter | Horadnia |<EMAIL_ADDRESS>| Active |
Trace only what's really important. .table-hover
is made for it.


The PBoC prime loan rate decisions: Cut by 5 basis points for 1 and 5 year rates (CNY lower)
by Ross J BurlandThe PBoC prime loan rate decisions which are announced by the People´s Bank of China arrived as follows:
- Cut by 5 basis points for both the for 1 and 5-year rates.
- China 5-year loan prime rate 4.80% (prev 4.85%).
- China 1-year loan prime rate 4.15% (prev 4.20%).
USD/CNY has popped around 0.10% on the decision and AUD/USD has moved 5 pips higher.
In prior meetings and announcements, the Chinese authorities had been repeatedly emphasizing a need to improve financing to the country’s privately run, smaller companies, which account for much of the economic growth. The key points of the new “loan prime rate” were to increase the role of market forces in determining rates. At the same time, there was a focus on lower financing costs to the real economy. However, how effective these rates will be in helping smaller businesses is yet to be seen considering how difficult it may be to spur demand for new loans.
About the PBoC Interest Rate Decision:
If the PBoC is hawkish about the inflationary outlook of the economy and rises the interest rates it is positive, or bullish, for the CNY. Likewise, if the PBoC has a dovish view on the Chinese economy and keeps the ongoing interest rate, or cuts the interest rate it is negative, or bearish.


Each MPI tool information interface variable provides access to a particular control setting or performance property of the MPI implementation. A variable may refer to a specific MPI object such as a communicator, datatype, or one-sided communication window, or the variable may refer more generally to the MPI environment of the process. Except for the last case, the variable must be bound to exactly one MPI object before it can be used. Table 13 lists all MPI object types to which an MPI tool information interface variable can be bound, together with the matching constant that MPI tool information interface routines return to identify the object type.
| Constant | MPI object |
| MPI_T_BIND_NO_OBJECT | N/A; applies globally to entire MPI process |
| MPI_T_BIND_MPI_COMM | MPI communicators |
| MPI_T_BIND_MPI_DATATYPE | MPI datatypes |
| MPI_T_BIND_MPI_ERRHANDLER | MPI error handlers |
| MPI_T_BIND_MPI_FILE | MPI file handles |
| MPI_T_BIND_MPI_GROUP | MPI groups |
| MPI_T_BIND_MPI_OP | MPI reduction operators |
| MPI_T_BIND_MPI_REQUEST | MPI requests |
| MPI_T_BIND_MPI_WIN | MPI windows for one-sided communication |
| MPI_T_BIND_MPI_MESSAGE | MPI message object |
| MPI_T_BIND_MPI_INFO | MPI info object |
Rationale.
Some variables have meanings tied to a specific MPI
object. Examples include the number of send or receive operations
that use a particular datatype, the number of times a particular error handler has been
called, or the communication protocol and ``eager limit'' used for
a particular communicator. Creating a new MPI tool information interface
variable for each
MPI object would cause the number
of variables to grow without bound, since they cannot be reused to
avoid naming conflicts. By associating MPI tool information interface
variables with a
specific MPI object, the MPI implementation only must specify and
maintain a single variable, which can then be applied to as
many MPI objects of the respective type as created during the
program's execution.
( End of rationale.)


This example use hyperspectal images in the visible range. The images come from the Real-World Hyperspectral Images Database (see reference at the end). The images represent objects surrounding us, books, chairs, trees, buildings ... And, as a hyperspectral image in the visible range is usefull, it cannot sort out real-word objects. A car can have any colors and it's true for many others objects. The question is, if we learn a model for an object from one cube, can we use the model on others cubes. The answer, as we will see, is 'yes and no' and we need more, the shape of the object by example. It's a problem well know in the visible range.
The images used are taken from the Real-World Hyperspectral Images Database web site: This is a database of fifty hyperspectral images of indoor and outdoor scenes under daylight illumination, and an additional twenty-five images under artificial and mixed illumination. The images were captured using a commercial hyperspectral camera (Nuance FX, CRI Inc) with an integrated liquid crystal tunable filter capable of acquiring a hyperspectral image by sequentially tuning the filter through a series of thirty-one narrow wavelength bands, each with approximately 10nm bandwidth and centered at steps of 10nm from 420nm to 720nm. The camera is equipped with an apo-chromatic lens and the images were captured with the smallest viable aperture setting, thus largely avoiding chromatic aberration. All the images are of static scenes, with labels to mask out regions with movement during exposure.
For this example we use outdoor scenes with snow accumulation and without. We learn a snow model with one cube using Support Vector Machine and classify six others with the same model. We exercise the sklearn module functionalities. Using hyperspectral processing with machine learning give more information and it can be, some times, usefull.
%matplotlib inline
from __future__ import print_function
import os
import os.path as osp
from pysptools.util import load_mat_file, shrink, display_linear_stretch
from pysptools.skl import HyperEstimatorCrossVal, HyperSVC
from pysptools.skl.examples import DataMine, Mask
# Use PySptools endmembers extraction and NNLS
# Extract 4 endmembers
def data_mine(M, sample_name):
ax = {}
ax['wavelength'] = [(x*10)+420 for x in range(M.shape[2])]
ax['x'] = 'Wavelength (nm)'
ax['y'] = 'Reflectance'
dm = DataMine(M, 4, sample_name)
dm.display_endmembers(axes=ax)
dm.display_abundances()
return dm.get_abundances()
# Create a mask for snow with the fourth endmember
# the threshold is 0.79
def create_mask(M, amaps):
m = Mask('Snow')
m.put1(M, amaps[:,:,3], 0.79)
m.display(colorMap='Paired')
return m.get_roi()
# Use the sklearn module (scikit-learn) Cross Validation functionality
def tune(M, mask, params, title):
ecv = HyperEstimatorCrossVal(HyperSVC, params)
ecv.fit_cube(M, mask)
ecv.print(title)
return ecv.get_best_params()
# Get the snow model
def train(M, mask, C, gamma, class_weight, feature_name):
model = HyperSVC(C=C, gamma=gamma, class_weight=class_weight)
model.fit_rois(M, mask)
return model
# And classify some cubes with the snow model
def batch_classify(spath, model, samples):
for s in samples:
M = load_mat_file(osp.join(spath, s))
Ms = shrink(shrink(shrink(M)))
display_linear_stretch(Ms, 19, 13, 3, suffix='shrink_'+s)
model.classify(Ms)
model.display(suffix=s)
home_path = os.environ['HOME']
source_path = osp.join(home_path, 'data/CZ_hsdb')
sample = 'img1'
# M_img1 is use to create the model
M_img1 = load_mat_file(osp.join(source_path, sample))
# The images are to large for my humble computer and takes to long to process.
# The solution is to cut the pixels number. Each call to shrink() cut by half
# the pixels number and save hours of processing.
M_img1_s = shrink(shrink(shrink(M_img1)))
print('Initial image dimension:', M_img1.shape)
print('Shrinked image dimension:', M_img1_s.shape)
First, we show the hyperspectral image use to create the learned model.
from IPython.core.display import Image
#Image(filename=osp.join(home_path, 'tools2/CZ_hsdb_img/linear_stretch_img1.png'), width=696, height=520)
Image(filename=osp.join(home_path, 'data/CZ_hsdb_img/linear_stretch_img1_348_260.png'))
We isolate the snow on the roof. EM4 is the snow spectrum.
amaps = data_mine(M_img1_s, sample)
And create a mask with it using endmember #4.
mask = create_mask(M_img1_s, amaps)
Support Vector Machine is use to create the model.
For the next step, we do a cross validation on all the cube to tune the C and gamma hyperparameters.
# After some trail, here is a good start for the crossval function:
p_grid = {'C': [5,10,20,30,50], 'gamma': [0.1,0.5,1.0,10.0]}
best = tune(M_img1_s, mask.get_mask(), p_grid, sample)
We use the cross-validation result to train a snow model using all the cube.
mo = train(M_img1_s, mask, best['C'], best['gamma'], {0:1,1:1}, sample)
Last, we test the model using different cubes to verify the presence of snow.
samples = ['img1','img2','imga1','imgc7','imgb1','imgb6','imga7']
batch_classify(source_path, mo, samples)
Comments on results
We need more than the visible range. By example, SPECIM compiled an minerals identification table in relation to wavelengths (see http://www.specim.fi/downloads/SisuROCK_Datasheet-ver1-14.pdf). As we can see, visible range is poor identifying anything with minerals.
On the other hand, we can see, for hyperspectral images, that support vector machine have a good generalisation capability.
Reference
The images came from the Real-World Hyperspectral Images Database and you can get them here: http://vision.seas.harvard.edu/hyperspec/download.html
The full reference is: Ayan Chakrabarti and Todd Zickler, "Statistics of Real-World Hyperspectral Images," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2011.


A bunch of text...
|
If you can see this for more than 10 seconds there was a problem downloading or running javascript. This application requires javascript to run.
Start or Continue a SimulationImport config from file:Load cached simulation:Enter Simulation ParametersSimulation Name:Duration (Years):Carrying Capacity:Animal Diffusion Rate:Animal Growth Rate:Animal Encounter Rate:Encounter Kill Probability:Hunts per Hunter per Year:Hunter Range (km):Rows will gain a gray background when they are valid. Only valid rows are used when the simulation is run. Kill rate and HPHY are both optional and leaving them blank will use the values from the parameters page.
Visual Results
Layers
Fit Map
Fullscreen
LayersVillage Names:
Heatmap:
Opacity:
Explotation Index:
Opacity:
Debug View:
Opacity:
Satellite Map:
Street Map:
Layer Information
Percentage of carrying capacity
100%
0%
Cell Extinction Index - K is carrying capacity
10-50% K
0-10% K
0% K
Shows the simulation extent, positions of each corner of the grid, the grid cell containing each population, and draws circles centered at each population with a radius equal to the hunting range.
Charts and StatisticsSelect Graph Type:
Other Information
Save Configuration: |
Changing these settings can have a huge impact on simulation results and/or runtime.
| Village1, | 32.483, | 24.657 | .9, | 55, | .1, |
| Village2, | 28.726, | 27.014 | .2, | 104, | .17, |
| Village3, | 29.472, | 29.473 | -1, | 86, | .13, |
| Village1, | 32.483, | 24.657 | .2, | 55, | 58, | 62, | 65, | 35, | 36, |
| New Village, | 32.126, | 25.014 | .2, | 0, | 0, | 0, | 0, | 30, | 32, |


Having the conference behind now, I’m reviewing some of my impressions and of sessions I attended.
The people
To begin with, this conference was a big success for me, in many respects. The sessions were great (more on that later), but of course, meeting with new people and with familiar people, was the more important part.
I live in Israel, which makes travel to the US very long and expensive. Apparently not many MySQL community members in my neighborhood, so I don’t ever get to meet the faces. The conference makes that possible. I did not participate in all community events, as I had scheduled calls with little girls who miss their father. And I was very much under jet lag. And I have more excuses on demand.
But I did get to meet known faces; people I only knew by name; unfamiliar people who were familiar with my work (fun!); and otherwise just (ex-)strangers.
The sessions
There was a variety of sessions to choose from. Many times, I had to pick one out of two or three sessions I was interested in, running at the same time. Not all sessions appeal to one in the same way, but looking back, I find there were a lot of GOOD sessions I attended. I mostly like sessions that are very technical; preferably drilling into details of algorithms & implementation.
Today I have delivered my talk, openark-kit: MySQL utilities for everyday use, at the O'REILLY MySQL Conference 2011. The slides are uploaded to the O'Reilly site, and I'm attaching them here as well. Feel free to download the PDF: openark-kit-mysqlconf11.pdf I wish to thank all who attended my talk!
Darn! This means oak-show-limits becomes redundant. Am I not supposed to speak about it on my coming presentation? Bad timing!
You have AUTO_INCREMENT columns. How far are you pushing the limits? Are you going to run out of AUTO_INCREMENT values soon? Perhaps you wonder whether you should ALTER from INT to BIGINT?
The answer is all there in INFORMATION_SCHEMA. The TABLES table shows the current AUTO_INCREMENT value per table, and the COLUMNS table tells us all about a column’s data type.
It takes some ugly code to deduce the maximum value per column type, what with signed/unsigned and data type, but then its very simple. Here is the query:
Have just read Darren Cassar's Recovering a MySQL `root` password – Three solutions. There's a fourth solution: using an init-file, which leads to just one restart of the database instead of two. It also avoids the security issue involved with using skip-grant-tables. I've written all about it before on Dangers of skip-grant-tables. Darren's 1st advice (look for password ini files, scripts, etc.) is a very good one. One password that can always be looked up in files is the replication's password.
An InnoDB table must have a primary key (one is created if you don't do it yourself). You may have a natural key at hand. Stop! Allow me to suggest an AUTO_INCREMENT may be better. Why should one add an AUTO_INCREMENT PRIMARY KEY on a table on which there's a natural key? Isn't an AUTO_INCREMENT a pseudo key, meaning, it doesn't have any explicit relation to the row data, other than it is a number and unique?
I'm still throwing papers to the trash and starting all over, fixing, rewriting and improving my talk at mysqlconf 2011, where I will be presenting openark-kit: MySQL utilities for everyday use. However I've got something up my sleeve: a benefit many can enjoy, that'll make me a respectful, popular and sought after speaker. While others may try and lure you with such earthly temptations as a 20% off discount, I am in a position to offer you a more spiritual gift: my friendship!
Question asked by a student: is there a way to limit a table’s quote on disk? Say, limit a table to 2GB, after which it will refuse to grow? Note that the requirement is that rows are never DELETEd. The table must simply refuse to be updated once it reaches a certain size.
There is no built-in way to limit a table’s quota on disk. First thing to observe is that MySQL has nothing to do with this. It is entirely up to the storage engine to provide with such functionality. The storage engine is the one to handle data storage: how table and keys are stored on disk. Just consider the difference between MyISAM’s .MYD & .MYI to InnoDB’s shared tablespace ibdata1 to InnoDB’s file-per table .ibd files.
The only engine I know of that has a quota is the MEMORY engine: it accepts the max_heap_table_size, which limits the size of a single table in memory. Hrmmm… In memory…
Why limit?
I’m not as yet aware of the specific requirements of said company, but this is not the first time I heard this question.
The fact is: when MySQL runs out of disk space, it goes with a BOOM. It crashed ungracefully, with binary logs being out of sync, replication being out of sync. To date, and I’ve seen some cases, InnoDB merely crashes and manages to recover once disk space is salvaged, but I am not certain this is guaranteed to be the case. Anyone?
And, with MyISAM…, who knows?
Rule #1 of MySQL disk usage: don’t run out of disk space.
Workarounds
I can think of two workarounds, none of which is pretty. The first involves triggers (actually, a few variations for this one), the second involves privileges.
This post continues Generating Google line charts with SQL, part I, in pursue of generating time series based image charts.
We ended last post with the following chart:
http://chart.apis.google.com/chart?cht=lc&chs=400x200&chtt=SQL%20chart&chxt=x,y&chxr=1,-4716.6,5340.0&chd=s:dddddddddeeeeeefffffffffeeeedddcccbbaaZZZYYYXXXXXXXXXYYYZZabbcdeefghhijkkllmmmmmmmmllkkjihgfedcbZYXWVUTSRRQQPPPPQQQRSTUVWXZacdfgijlmnpqrssttuuuttssrqonmkigfdbZXVTSQONMLKJIIIIIIJKLMOPRTVXZbegilnprtvwyz01111110zyxvtrpnkifcaXUSPNLJHFECBBAAABBCEFHJLNQTWZcfilortwy1346789999876420yvspmjfcYVSOL
which has a nice curve, and a proper y-legend, but incorrect x-legend and no ticks nor grids.
To date, Google Image Charts do not support time-series charts. We can’t just throw timestamp values and expect the chart to properly position them. We need to work these by hand.
This is not easily done; if our input consists of evenly spread timestamp values, we are in a reasonable position. If not, what do we do?
There are several solutions to this:
- We can present whatever points we have on the chart, making sure to position them properly. This makes for an uneven distribution of ticks on the x-axis, and is not pleasant to watch.
- We can extrapolate values for round hours (or otherwise round timestamp resolutions), and so show evenly spread timestamps. I don’t like this solution one bit, since we’re essentially inventing values here. Extrapolation is nice when you know you have nice curves, but not when you’re doing database monitoring, for example.
- We can do oversampling, then group together several measurements within round timestamp resolutions. For example, we can make a measurement every 2 minutes, yet present only 6 measurements per hour, each averaging up 10 round minutes. This is the approach I take with mycheckpoint.
The latest approach goes even beyond that: what if we missed 30 minutes of sampling? Say the server was down. We then need to “invent” the missing timestamps. Note that we invent the timestamps, we do not invent values. We must present the chart with missing values on our invented timestamps.
I may show how to do this in a future post. Meanwhile, let’s simplify and assume our values are evenly spread.
You have old_passwords=1 in your my.cnf. I’m guessing this is because you used one of the my-small.cnf, my-large.cnf etc. templates provided with your MySQL distribution.
These files can easily win the “most outdated sample configuration file contest”.
Usually it’s no big deal: if some parameter isn’t right, you just go and change it. Some variables, though, have a long-lasting effect, and are not easily reversed.
What’s the deal with old_passwords?
No one should be using these anymore. This variable makes the password hashing algorithm compatible with that of MySQL 4.0. I’m pretty sure 4.0 was released 9 years ago. I don’t know of anyone still using it (or 4.0 client libraries).
The deal is this: with old_passwords you get a 16 hexadecimal digits (64 bit) hashing of your passwords. With so called “new passwords” you get 40 hexadecimal digits (plus extra “*”). So this is about better encryption of your password. Read more on the manual.
How do I upgrade to new password format?
You can’t just put a comment on the “old_passwords=1” entry in the configuration file. If you do so, the next client to connect will attempt to match a 41 characters hashed password to your existing 16 characters entry in the mysql.users table. So you need to make a simultaneous change: both remove the old_passwords entry and set a new password. You must know all accounts’ passwords before you begin.
Some of this is old stuff, but more people are now converting to InnoDB plugin, so as to enjoy table compression, performance boosts. Same holds for people converting to Percona’s XtraDB. InnoDB plugin requires innodb_file_per_table. No more shared tablespace file.
So your ibdata1 file is some 150GB, and it won’t reduce. Really, it won’t reduce. You set innodb_file_per_table=1, do ALTER TABLE t ENGINE=InnoDB (optionally ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8), and you get all your tables in file-per-table .ibd files.
But the original ibdata1 file is still there. It has to be there, don’t delete it! It contains more than your old data.
InnoDB tablespace files never reduce in size, it’s an old-time annoyance. The only way to go round it, if you need the space, is to completely drop them and start afresh. That’s one of the things so nice about file-per-table: an ALTER TABLE actually creates a new tablespace file and drops the original one.
The procedure
The procedure is somewhat painful:
- Dump everything logically (either use mysqldump, mk-parallel-dump, or do it your own way)
- Erase your data (literally, delete everything under your datadir)
- Generate a new empty database
- Load your dumped data.